Coverity correctly spotted that the existing code creates a temporary
map and returns a value from it. It is not possible to make the map
const& directly because operator[] may change the map.
Therefore, we use map::find instead.
Previous fontspec loaded xunicode internally, for recent version, this
is no longer desired. However, we still need it for tipa emulation.
We use fontspec's trick to bypass XeTeX test with LuaTeX.
This adds support for the chapterbib package, but also adds ways to
produce this sort of multibib with biblatex and bibtopic (which are
both incompatible with chapterbib).
File format change.
File format change.
This allows for the relevant InsetCommand-based dialogs (such as
citation text before/after, Bibitem label, hyperlink name etc.)
to provide both the input of verbatim code or text that is transformed
to proper LaTeX code.
Some dialogs (Nomencl, Href) already had some methods (although they
could not be toggled), which are now centralized and streamlined.
The initial work of this patch has been done by Georg Baum (see
http://www.lyx.org/trac/attachment/ticket/2751/x.diff)
Fixes: #2751, #8227.
Biblatex can be used with Japanese, but then, biber (not pbibtex) should
be used as processor.
I this context, bring the jbibtex UI in line with bibtex, allowing for
a selection of alternatives.
This is now set as default. It selects biber for Biblatex (with
fall-back to first bibtex8, then bibtex, if the former is not
installed), and bibtex for BibTeX-based engines.
With this, users do not normally need to care for the processor when
they switch cite engines.
Next to the cmd name, introduce optional latex names (that might differ
from the cmd name) and aliases (that are "obsoleted by" the cmd).
This enhances portability between the engines.
* 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).