The algorithm used for breaking a paragraph in LaTeX export is changed
for avoiding spurious blank lines causing too much vertical space.
This change is tied to the introduction of a new inset (with two
different specializations) helping in either outputing LaTeX paragraph
breaks or separating environments in LyX. Both of the above goals were
previously achieved by the ---Separator--- layout and can now be
accomplished by the new inset in a more natural way. As an example,
after leaving an environment by hitting the Return key for two times,
a third return automatically inserts a parbreak inset, which is
equivalent to the old separator layout, i.e., it also introduces a
blank line in the output. If this blank line is not wanted, the
parbreak separator can be changed to a plain separator by a right
click of the mouse. Of course, an environment can still be separated
by the following one by using the Alt+P+Return shortcut (or the
corresponding menu key), but now the plain separator inset is used
instead of the old separator layout, such that no blank line occurs in
the LaTeX output.
Old documents are converted such that the LaTeX output remains unchanged.
As a result of this conversion, the old separator layout is replaced by
the new parbreak inset, which may also appear in places where the old
algorithm was introducing blank lines while the new one is not.
Note that not all blank lines were actually affecting the LaTeX output,
because a blank line is simply ignored by the TeX engine when it occurs
in the so called "vertical mode" (e.g., after an alignment environment).
The old ---Separator--- layout is now gone and old layout files using it
are also automatically converted.
Round trip conversions between old and new format should leave a document
unchanged. This means that the new behavior about paragraph breaking is
not "carried back" to the old format. Indeed, this would need introducing
special LaTeX commands in ERT that would accumulate in roundtrip
conversions, horribly cluttering the document. So, when converting a
modified document to old formats, the LaTeX output may slightly differ in
vertical spacing if the document is processed by an old version of LyX.
In other words, forward compatibility is guaranteed, but not backwards.
lyx2lyx sets all new math packages to off when converting from old formats.
This is correct if any command which would cause an automatic package loading
exists in the document. However, it is wrong if no command exists: This leads
to problems if later a command is added (bug #9069), which is especially
annoying for templates.
The fix consists of two parts:
1) convert_use_package() considers now the used commands like
revert_use_package(), and uses them to decide whether to set the package to
auto or off.
2) convert_undertilde() and revert_undertilde() use a slightly adjusted copy of
convert_use_package() and revert_use_package(), so that the bug is also
fixed for undertilde. We cannot use the latter functions directly, because
of "\usepackage undertilde" vs. "\use_undertilde".
When doing the lyx2lyx round trip of the 2.0.8 user guide from format
413 -> 474 -> 413 you get an invalid document, because the math packages
mhchem and undertilde are incorrectly converted.
It turned out that the old reversion code did only work for particular
package oderings. The new one works for abitrary sorted packages.
When doing the lyx2lyx round trip of the 2.0.8 user guide from format
413 -> 474 -> 413 you do not get a zero diff. The most important problem is
caused by the conversion of the argument insets to the old syntax: This
conversion adds an additional empty line (harmless), and it destroys the
document structure if the first inset in e.g. a subsection is not an argument
inset, but e.g. an index or label inset.
The fix is quite easy: Ensure that the paragraph begin is set to the first
argument inset.
revert_justification() issues a warning if the \justification parameter does
not exist, and LyX itself always writes it unconditionally as well, so add it
also in lyx2lyx when converting old documents.
Currently this does not have any user visible effect, but it decouples the
default value of BufferParams::justification from the conversion of old
documents: Now it is possible to set the default to false in LyX, and old
documents will still be converted correctly.
Compilation was failing with TeX Live 2013 because of
the format of one of the references. This commit just
changes one of the references to a different one.
As discussed. achemso.layout contains both "Chart" and "Graph", therefore it
does not make sense to use "Graph" in the "Chart" / "Graph" / "Diagram" sense,
but in the mathematical sense like in "graph theory".
Therefore I added the context [[mathematicl]].
All translations are unchanged except the german one, which is now again
"Graph" as in 2.0.0 instead of "Schaubild".
This string was not picked up by the script to generate the layouttranslations file. After deleting the file and re-running the script, this string was picked up.
- this brings back all our template files (they are no example files, would have been a regression otherwise because LyX 2.0 offers them already in "new from template")
- the thesis files will stay in the examples folder for now until we have a real fiix for bug #8643
I only left out the following:
1) chinese translation - we have no GPL statement yet, if we don't get it the
big update would need to be removed unfortunately.
2) I kept the dutch translation for "Chart", although this is ambigous, since
nl.po does not contain a translation
3) I kept the danish translation for "Note", since da.po does not contain a
translation
The review file is updated as well to contain all translations without a
documented review.
The Japanese math manual was not compiling because of some
complications with foreign language switching. This would
have been fixed after the translation from English to Japanese
is done but I want to make sure the document is compilable
for 2.1.
Now lib/layouttranslations.review contains all translations which have been
changed since the 2.0.0 release except for the ones where the commit log
mentioned that they were reviewed.
The pgf package 3.0.0 update lead to an error being given with
this document. Loading the 'etex' package fixes the problem.
For more information, see:
https://sourceforge.net/p/pgf/bugs/296/
filehook.sty is required when you use non-TeX fonts and also the non-TeX math default font
In the same context LyX requires the font "latinmodern-math.otf", but we can currently not check for it, see my post to the list
I should have had a closer look much earlier, since the fix is simple and
safe, but at that time I did not notice. The problem was that an invalid
.lyx document was created when converting unicode characters with two
backslashes in their LaTeX definition from lib/unicodesymbols to pre-unicode
LyX format.
The frame decoration IconPalette contains already \overset etc. and \sideset has the same logic like \over- and \underset. Moreover we should keep the math panel clean and avoid the listing of many very special commands
We don't need to check for every exotic package and this one is also very large. Due to nowadays new speed limit of some CTAN servers, downloading the package takes ages and therefore a fresh installation on Windows often times out. The advantage of the automatic package installation on Windows is therefore a disadvantage in case of this package.
This makes the defaults of Inset::inheritFont() and Inset::resetFontEdit()
compatible. There is no user visible change except for the Chunk inset which
does not produce invalid LaTeX after editing operations anymore.
This is the safe version for 2.1.0, for later there are still open questions:
- All insets with ResetsFont true should be audited: Is this really needed,
or do they show similar editing problems as the Chunk inset?
- Does inheritFont() need to be customizable in the layout file as well?
- Is resetFontEdit() != !inheritFont() needed at all?
I did not use change tracking for the docs, since I updated all existing
translations.
As discussed in trac. Unformatted Text is removed, since it is too similar to
Plain text, adn nobody knows why it is needed in the standard menu. The lfun
is kept, so users can easily activate it in private ui files if needed.