Discussion:
Instant preview & auto loading of AMS package
aparsloe
2014-05-13 08:08:11 UTC
Permalink
In a new document, place a math inset inside another inset, say a
(yellow) note (although I discovered this with a math inset inside a
custom inset) and insert a formula that needs a symbol from another
package, say amssymb. In the attachments I've entered "1+1 \thickapprox
2". LyX displays the formula correctly (cursor-inside.png) but when the
cursor is placed outside the note (cursor-outside.png) instant preview
doesn't display \thickapprox and you get what looks like "1+12".
Changing the math option for amssymb from "Load Automatically" to "Load
Always" corrects the display, but if "Load Automatically" means what it
says, the formula should really display correctly with that option.

Andrew
Richard Heck
2014-05-13 13:32:35 UTC
Permalink
Post by aparsloe
In a new document, place a math inset inside another inset, say a
(yellow) note (although I discovered this with a math inset inside a
custom inset) and insert a formula that needs a symbol from another
package, say amssymb. In the attachments I've entered "1+1
\thickapprox 2". LyX displays the formula correctly
(cursor-inside.png) but when the cursor is placed outside the note
(cursor-outside.png) instant preview doesn't display \thickapprox and
you get what looks like "1+12". Changing the math option for amssymb
from "Load Automatically" to "Load Always" corrects the display, but
if "Load Automatically" means what it says, the formula should really
display correctly with that option.
I am pretty sure we ignore what's in notes, since these are not going to
be present in the output. Granted, that's an issue here, but that's what
the bug is: When "validating" for instant preview, we need to include
what's in notes.

Please file a bug about this.

Richard
Enrico Forestieri
2014-05-13 15:01:39 UTC
Permalink
Post by Richard Heck
Post by aparsloe
In a new document, place a math inset inside another inset, say a
(yellow) note (although I discovered this with a math inset inside
a custom inset) and insert a formula that needs a symbol from
another package, say amssymb. In the attachments I've entered "1+1
\thickapprox 2". LyX displays the formula correctly
(cursor-inside.png) but when the cursor is placed outside the note
(cursor-outside.png) instant preview doesn't display \thickapprox
and you get what looks like "1+12". Changing the math option for
amssymb from "Load Automatically" to "Load Always" corrects the
display, but if "Load Automatically" means what it says, the
formula should really display correctly with that option.
I am pretty sure we ignore what's in notes, since these are not
going to be present in the output. Granted, that's an issue here,
but that's what the bug is: When "validating" for instant preview,
we need to include what's in notes.
Hmm... I would rather say that what's in notes should not be shown
as instant preview. This is because notes are omitted in the output
and thus also their requirements should.
--
Enrico
Richard Heck
2014-05-13 15:42:52 UTC
Permalink
Post by Enrico Forestieri
Post by Richard Heck
Post by aparsloe
In a new document, place a math inset inside another inset, say a
(yellow) note (although I discovered this with a math inset inside
a custom inset) and insert a formula that needs a symbol from
another package, say amssymb. In the attachments I've entered "1+1
\thickapprox 2". LyX displays the formula correctly
(cursor-inside.png) but when the cursor is placed outside the note
(cursor-outside.png) instant preview doesn't display \thickapprox
and you get what looks like "1+12". Changing the math option for
amssymb from "Load Automatically" to "Load Always" corrects the
display, but if "Load Automatically" means what it says, the
formula should really display correctly with that option.
I am pretty sure we ignore what's in notes, since these are not
going to be present in the output. Granted, that's an issue here,
but that's what the bug is: When "validating" for instant preview,
we need to include what's in notes.
Hmm... I would rather say that what's in notes should not be shown
as instant preview. This is because notes are omitted in the output
and thus also their requirements should.
Yes, I thought about that possibility, too.

Richard
Kornel Benko
2014-05-13 15:46:07 UTC
Permalink
Post by Richard Heck
Post by Enrico Forestieri
Post by Richard Heck
Post by aparsloe
In a new document, place a math inset inside another inset, say a
(yellow) note (although I discovered this with a math inset inside
a custom inset) and insert a formula that needs a symbol from
another package, say amssymb. In the attachments I've entered "1+1
\thickapprox 2". LyX displays the formula correctly
(cursor-inside.png) but when the cursor is placed outside the note
(cursor-outside.png) instant preview doesn't display \thickapprox
and you get what looks like "1+12". Changing the math option for
amssymb from "Load Automatically" to "Load Always" corrects the
display, but if "Load Automatically" means what it says, the
formula should really display correctly with that option.
I am pretty sure we ignore what's in notes, since these are not
going to be present in the output. Granted, that's an issue here,
but that's what the bug is: When "validating" for instant preview,
we need to include what's in notes.
Hmm... I would rather say that what's in notes should not be shown
as instant preview. This is because notes are omitted in the output
and thus also their requirements should.
Yes, I thought about that possibility, too.
I prefer the way it is now. It does not harm. And if changing the 'note' to something different
there is no surprise.
Post by Richard Heck
Richard
Kornel
Georg Baum
2014-05-13 18:45:51 UTC
Permalink
Post by Richard Heck
Post by Enrico Forestieri
Hmm... I would rather say that what's in notes should not be shown
as instant preview. This is because notes are omitted in the output
and thus also their requirements should.
Yes, I thought about that possibility, too.
I'd slightly prefer skipping notes as well, but I don't have a strong
opinion. Anyway, either instant preview should be skipped for notes, or the
requirements should be automatically collected. The current state is
definitely a bug.


Georg
aparsloe
2014-05-13 21:55:27 UTC
Permalink
Post by Enrico Forestieri
Post by Richard Heck
Post by aparsloe
In a new document, place a math inset inside another inset, say a
(yellow) note (although I discovered this with a math inset inside
a custom inset) and insert a formula that needs a symbol from
another package, say amssymb. In the attachments I've entered "1+1
\thickapprox 2". LyX displays the formula correctly
(cursor-inside.png) but when the cursor is placed outside the note
(cursor-outside.png) instant preview doesn't display \thickapprox
and you get what looks like "1+12". Changing the math option for
amssymb from "Load Automatically" to "Load Always" corrects the
display, but if "Load Automatically" means what it says, the
formula should really display correctly with that option.
I am pretty sure we ignore what's in notes, since these are not
going to be present in the output. Granted, that's an issue here,
but that's what the bug is: When "validating" for instant preview,
we need to include what's in notes.
Hmm... I would rather say that what's in notes should not be shown
as instant preview. This is because notes are omitted in the output
and thus also their requirements should.
Perhaps the choice of a note inset was a distraction. The problem arises
for any inset (as far as I can see) that can contain a math inset, e.g.
a float, a table, a custom inset.

Andrew
Richard Heck
2014-05-14 00:10:55 UTC
Permalink
Post by aparsloe
Perhaps the choice of a note inset was a distraction. The problem
arises for any inset (as far as I can see) that can contain a math
inset, e.g. a float, a table, a custom inset.
That would be a *much* more serious bug. Can you file a bug, including a
simple example file, illustrating the various versions of the problem?

Richard
aparsloe
2014-05-14 09:32:27 UTC
Permalink
Post by Richard Heck
Post by aparsloe
Perhaps the choice of a note inset was a distraction. The problem
arises for any inset (as far as I can see) that can contain a math
inset, e.g. a float, a table, a custom inset.
That would be a *much* more serious bug. Can you file a bug, including
a simple example file, illustrating the various versions of the problem?
Richard
Bug #9118. It's a bit messy because my initial recipe wasn't precise
enough and was confusing me. However I've added a comment and an
attachment which I hope clarify things.

On the question of whether instant preview should apply to notes, let me
offer a user's opinion. I think it should. I have a number of documents
which I really intend to be read in LyX rather than as pdfs. Notes, in
that case, are as much part of the document as the main text. The fact
that they aren't seen by LaTeX is irrelevant. LyX is not just a pdf
producer.

Andrew

Loading...