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.
Move them to a subdir, ignore this subdir for other tests.
Dedicated test samples for LaTeX-specific problems don't give additional value if tested for loading, conversion, or other exports.
Revert to the strategy used at 8f86ee74 but not using mathedWordList
because it may be still uninitialized at load time. Instead, use the
globalMacros method for getting the same info.
There was a thinko at 8ec91e80, because globalMacros always returns
null for user defined macros.
It may happen that mathedWordList is not still updated at load time,
so we would still be using a bogus pointer. Better fetching the
necessary info from the global macro table.
The math macros system is quite complex. Macros are updated during
metrics calculation, so a missing update is very likely to cause a
crash. This commit tries to assure that they are updated at export
time, which also happens when the table of contents is updated.
Moreover, in order to circumvent a possible missing update, when
a math macro is detected we try to avoid using the sym_ member
of the MacroData class, as it may contain bogus values.
Load required package textcomp.
Replace call to non-existent packages textcyr and textgreek with the backup definition of the commands as done by LyX export.
Do not load marvosym (clash with pifont) (LyX does not load the package either).
Remove invalid command \\ascii.
On export, a macro defined in ERT (or not defined at all) is left
in the same environment it is entered. So, don't explicitly insert
it in an ensuremath environment when it is entered in a textmode one.
From Günter [1]:
the difference is the textcommand for ETB which changed from
{\ascii\ETB} to
0x21a8 "\\ETB" "ascii" "force=utf8" # UP DOWN
ARROW WITH BASE
because the former resulted in
l.513 \ascii
\ETB{}
! Undefined control sequence.
[1]
https://www.mail-archive.com/search?l=mid&q=nr48qn%242gb%241%40blaine.gmane.org
sidecap does not work well for some reason with the Japanese doc, so
the sidecap bool is set to false to restore compilation.
The following test now passes:
export/doc/ja/EmbeddedObjects_pdf3