* b `british' (``inner quotation'')
* w >>swedishg>> ('inner quotation') ["g" = Guillemets]
* f <<french>> (``inner quotation'')
* i <<frenchin>> (<<inner quotation>>) ["in" = Imprimerie Nationale]
* r <<russian>> (,,inner quotation``)
Rename "french" to "swiss"
Also rename "single/double" to "secondary/primary" ("inner/outer" in
the UI) and "left/right" to "opening/closing". Note that the inset
identifier string is left as is ("s/d" and "l/r")
The current char-based implementation gets increasingly unreadable,
especially if styles are added that do not follow the strict
single-double paradigm.
1. We must always output all (diverging) options, including
default options; if not, default options might get overwritten.
2. Do not output options in \setotherlanguage, since we might have
multiple "other languages" varieties from the same language (such
as naustrian, nswissgerman). And the options are output for the
language switches anyway.
Hence, LaTeXFeatures::getPolyglossiaLanguages() does not have to record
varieties. This was not done correctly anyway, since the map allowed
for one entry per language only.
This enables error reporting for the preamble, provided the preamble is written
using the new InPreamble layouts.
In the future, I find it preferable to deprecate the usual preamble in favour of
InPreamble layouts rather than implementing error reporting for the usual
preamble. This requires some improvements to code editing in the buffer view
first (line breaking behaviour, syntax highlighting).
Do not assume that the /systemlyxdir path prefix in \origin refers
to the system directory of the running instance, but check through
some heuristics what the real system dir is. In this way, a document
in the system dir of any other LyX installation is correctly spotted
and the \origin tag properly updated. For example, one can use an
installed version of lyx to edit a document in the lib/doc dir of a
git repo and obtain the same result as when running lyx in place.
The differentiation of "xetex" and "platex" is not needed here,
is ambiguous and confusing (see #10013). The code that relies on
it can/should get its information otherwise.
Furthermore, polyglossia-exclusive languages now also work with
LuaTeX, since we support LuaTeX + polyglossia.
XeTeX with TeX fonts is only safe with ASCII input encoding (see #9740)
and we therefore force "ascii" when exporting with XeTeX and 8-bit TeX-fonts.
However, "utf8-plain" is a "power-user" option, which allows to switch off LyX's
encoding of the LaTeX file:
keep this also for "XeTeX with TeX fonts".
The user is responsible to ensure all characters can be processed and are
correctly shown in the output. The provided test sample shows the problems
with this encoding without special measures (like loading fontspec in the
user-preamble or a document class).
\origin is a transient property in the sense that in a collaborative context
each co-author is going to have a different value for it. Moreover, \save_origin
is a global (lyxrc) setting that cannot yet be deactivated for a single file,
but one author's setting is going to impact other authors, even those who have
set save_origin=false.
There is only one location where lyxrc.save_origin produces an effect, modified
by this patch. With this patch, everything happens as if lyxrc.save_origin was
false whenever save_transient_properties=false.
This is not a file format change. When a file has
save_transient_properties=false but an origin is set (for instance a file
produced before this patch) then the origin produces its effect before the file
is saved. This produces the same effect as if the user decided to disable
save_origin between two sessions.
Increment LyX format to 504.
With this new parameter, the user can indicate that some other parameters that
are frequently switched must not be recorded in the file (as if they were a
setting specific to the user or transient, rather than a document setting). This
will play nicer with version control systems.
See the discussion, e.g.:
http://thread.gmane.org/gmane.editors.lyx.devel/157824/focus=157993 (third
solution mentioned)
TODO:
* The interface remains to be set up. We cannot change this setting from LyX
for now.
* If save_transient_properties is false, we should read the user setting as a
per-user-per-document (session) setting (e.g. like the cursor position).
* Once the above is done, we can treat \justification the same way (but it would
be even better if \justification was moved to lyxrc).
Simplify the logic for language package selection and make it more consistent:
Use polyglossia with non-TeX fonts (system fonts/Unicode fonts) for all
export flavours (XeTeX, LuaTeX, DVI-LuaTeX), if the language package setting
is "auto" and there is no language not supported by Babel and no package
providing Babel.
This solves some Babel-related autotest cases and leads to some new failures
due to the polyglossia language nesting problem.
\output_changes is now output at a distance from \tracking_changes.
Since both parameters can be seen as per-user preferences, they can cause
undesirable merge conflicts, in a multi-author setting, were it treated as a
single block by the version control system, as was the case before this patch.
A plausible scenario is that change tracking is used together with a versioning
system. In this case, parallel modifications might remove an \author line on one
side, and add another change of this author on the other side. This scenario
causes a bad merge after which the added change has no associated author. In
this case, LyX used to display a list of errors on opening and deliberately
removed the corresponding change tracking information.
* If ever a tracked change refers to an author that does not exist, then add a
dummy author. This dummy author is not saved to the file afterwards.
* Have a very clear error message on opening such a corrupt file.
Prevent encoding changes whenever the TeX engine is XeTeX or LuaTeX,
as XeTeX/LuaTeX use only one encoding per document:
* with useNonTeXFonts: "utf8plain",
* with XeTeX and TeX fonts: "ascii" (inputenc fails),
* with LuaTeX and TeX fonts: only one encoding accepted by luainputenc.
+1 no needless encoding switches
+1 runparams.encoding matches the correct encoding at any time
+1 less complicated code.
-1 there may still be problems with CJK (possibly impossible to
solve for Xe/LuaTeX with TeX fonts).
For LuaTeX & TeX fonts, the complete document uses the encoding
of the global document language.
See also #9740.
Actually, the changed tests were used to prevent overwriting the encoding
changed in Buffer::writeLaTeX with a language-default encoding.
This is still required for XeTeX with TeX-fonts unless a proper solution is found.
Documents with more than one encoding and TeX-fonts fail with LuaTeX,
as "luainputenc" can only handle one encoding.
This is one part of bug 9744: If you toggle between TeX fonts and non-TeX
fonts, the settings of the other choice are no longer thrown away, but stored
and re-activated if you switch back. Most parts of the patch are purely
mechanical (duplicating some BufferParams members), the only non-mechanical
change is in the GUI logic.
Fixes output for 3 of the 4 test lyx-files.
Includes "FIXME"s at places where further action is required to get the XeTeX
export right but I don't know how.
Both \origin and \textclass tags may be paths and contain spaces.
In this case, enclose them in double quotes such that they can be
correctly read by the lexer.