Provide functions for translating to the LyX name
of an encoding from either a LaTeX name or an Iconv
name, with the possibility to specify the package.
This is in anticipation of changing to use the LyX
name of the encoding in the .lyx file format and
allowing multiple lib/encodings entries to have
the same LaTeX name (but different packages!).
The tex2lyx parser needs to worry about the iconv
name of the input encoding, so store that instead
of the latex name.
These encodings were not defined, since they must not be used as document
encodings (the characters {, } and \ may appear in high bytes, and latex
would be confused). However, they are supported by CJK.sty (which uses a
preprocessor to circumvent the limitations of the latex executable). These
encodings are now defined, but used for import in tex2lyx only.
The test case CJK.tex contained fake tests for shift-jis and big5 (the
japanese and chinese characters were entered using the utf8 encoding), and
therefore the wrong interpretation of these encoding looked as if it worked.
The comments about missing iconv support of shift-jis and big5 were wrong as
well (otherwise shift-jis-plain would not work either).
Math commands need it as well as text commands. At the same time, this
further unifies the checking for termination and fixes cases of wrong
output (e.g. for 0x2005).
* do not terminate macros by {} if not necessary (prevent kerning violation)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40891 a592a061-630c-0410-9148-cb99ea01b6c8
now) and move more packages to the new exclude mechanism.
The remaining ones are not so easy.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40442 a592a061-630c-0410-9148-cb99ea01b6c8
dialog by only converting text mode latex macros to unicode points.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30070 a592a061-630c-0410-9148-cb99ea01b6c8
Cyrillic formatted text in mathmode
If some other letters from some script need to be typeset in italic,
it will suffice adding the flag "mathalpha" to the unicodesymbols file.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@28731 a592a061-630c-0410-9148-cb99ea01b6c8
for entering math accents, such that an umlauted A is translated as \ddot{A},
for example.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26577 a592a061-630c-0410-9148-cb99ea01b6c8
unicodesymbols file. Also take into account that a unicode symbol
may appear in both mathmode and textmode and thus both the mathmode
and textmode features may be required. As a side effect, the problem
that the \lyxmathsym definition is added to the preamble even when
a unicode symbol appears only in textmode is solved.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26548 a592a061-630c-0410-9148-cb99ea01b6c8
* src/Encoding.h:
- new member hasFixedWidth()
* src/output_latex.{cpp,h} (switchEncoding):
- add option to force encoding switch
* src/insets/InsetListing.cpp (latex):
- force encoding switch only in multibyte context, switch the encoding properly,
and add some error messages.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25730 a592a061-630c-0410-9148-cb99ea01b6c8
can be encoded in the current latex encoding before resorting to the
unicodesymbols file.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25725 a592a061-630c-0410-9148-cb99ea01b6c8
- build an exception list of characters that must be output as LaTeX command in any case
(except in utf8-plain). I.e., the utf8 encodings now also honour the "force" flag.
* lib/unicodesymbols:
- add "force" flag to combine characters. Fixes rest of bug 4946.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25361 a592a061-630c-0410-9148-cb99ea01b6c8
http://bugzilla.lyx.org/show_bug.cgi?id=1527
* src/mathed/*.cpp:
- Track mode (math or text) when outputting latex code and
properly wrap commands that are in the wrong mode with
either \ensuremath or \lyxmathsym.
* src/mathed/MathParser.cpp:
- Parse \ensuremath and \lyxmathsym, such that exported latex
produces the same result when imported back.
- Replace latex commands with corresponding unicode symbols.
* src/Encoding.cpp:
- Implement Encodings::fromLaTeXCommand() for converting either
a single or a sequence of latex commands to unicode symbols.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25270 a592a061-630c-0410-9148-cb99ea01b6c8
unicodesymbols file. When the command for a mode is not specified, the
other one is used (taking care that it also works in the "wrong" mode).
This allows to avoid the \lyxmathsym macro when a native math command
is available. Patch from Georg, modifications to the unicodesymbols
file by me.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25061 a592a061-630c-0410-9148-cb99ea01b6c8
* src/Paragraph.cpp (knownLangChars): renamed as writeScriptChars.
Now only deals with characters that cannot be encoded using the
current latex encoding.
(latexSpecialChars): only call writeScriptChars if the character
cannot be encoded.
* src/Encoding.{cpp,h} (isKnownLangChar): renamed as isKnownScriptChar.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21183 a592a061-630c-0410-9148-cb99ea01b6c8
necessary to mark them in the proper language for typesetting.
* src/Paragraph.cpp
(Paragraph::Pimpl::knownLangChars): new method.
(Paragraph::Pimpl::simpleTeXSpecialChars): output proper
latex code for greek and cyrillic chars.
* src/LaTeXFeatures.cpp: add textgreek and textcyr features.
* src/Encoding.{cpp,h}
(Encodings::isKnownLangChar): new method.
* lib/unicodesymbols: add greek and cyrillic alphabetic chars.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20931 a592a061-630c-0410-9148-cb99ea01b6c8
Introduces new encodings for the CJK-languages.
The CJK-languages can now be selected from LyX's menu.
For remaining small problems, see the thread "Help needed for bug 3043" on the devel-list.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18216 a592a061-630c-0410-9148-cb99ea01b6c8