]> git.lyx.org Git - lyx.git/blobdiff - lib/encodings
Additional manual - few updates about VCS info inset from Joel and me.
[lyx.git] / lib / encodings
index f6b9b2b0914800a96b4bca2406631d15c711fa15..ca47cf18220d68275c1c7a4983781ecbb86ac1ba 100644 (file)
@@ -3,7 +3,7 @@
 
 # Note that you can only add singlebyte encodings to this file.
 # LyX does not support the output of multibyte encodings (e.g. utf16).
 
 # Note that you can only add singlebyte encodings to this file.
 # LyX does not support the output of multibyte encodings (e.g. utf16).
-# It does support singlebyte encodings with variable with (e.g. utf8).
+# It does support singlebyte encodings with variable width (e.g. utf8).
 # These are marked with the "variable" keyword.
 # Fixed width encodings are marked with the "fixed" keyword.
 # The code points of TeX control characters like {, } and \ can occur in the
 # These are marked with the "variable" keyword.
 # Fixed width encodings are marked with the "fixed" keyword.
 # The code points of TeX control characters like {, } and \ can occur in the
 # set as document encodings and are marked with the "variableunsafe" keyword.
 # They are only needed for proper tex2lyx import.
 
 # set as document encodings and are marked with the "variableunsafe" keyword.
 # They are only needed for proper tex2lyx import.
 
-# Syntax: Encoding <LyX name> <LaTeX name> <GUI name> <iconv name> fixed|variable|variableunsafe <package> End
+# Most encodings require loading a latex package such as "inputenc" or "CJK".
+# There is no "japanese" latex package, rather this keyword indicates to LyX
+# to switch the buffer format and use platex instead of standard (pdf)latex.
+# In this case, TeX control characters in high bytes is not a problem.
+# The invocation is platex -kanji=<LaTeX name>
 
 
-# encodings used by inputenc.sty
+# The set of "iconv" supported encodings is system dependent.
 
 
-Encoding utf8 utf8 "Unicode (utf8)" UTF-8 variable inputenc
+# For Gnu libiconv, supported encodings are listed at
+# https://www.gnu.org/software/libiconv/
+# and available via the `iconv --list` command.
+
+# Syntax: Encoding <LyX name> <LaTeX name> <GUI name> <iconv name> <width> <package> End
+
+# LyX name:    Name used by the file format and in lib/languages. Must be unique!
+# LaTeX name:  Used in the latex export or passed to platex as command-line switch.
+# GUI name:    Displayed in document settings.
+# iconv name:  Used by iconv.
+# width:       One of fixed, variable, or variableunsafe (see above).
+# package:     One of none, inputenc, CJK, or japanese (see above).
+
+# Encodings used with inputenc.sty
+# ================================
+
+# "inputenc" is a base LaTeX package that provides an extensible framework
+# for conversion of a document encoding into an "LaTeX Internal Character
+# Representation" (LICR) and a set of encoding definitions
+# (<LaTeX name>.def files). Additional encoding definitions are provided by
+# several language support packages.
+#
+# The following encodings from http://www.ctan.org/pkg/latex-cyrillic are
+# not included, because they are not widely used and lack iconv support:
+# ctt, dbk, isoir111, koi8-ru, lcyenc, maccyr, macukr, mik, mls, mnk, mos,
+# and pt254.
+
+# inputenc's standard utf8 support:
+Encoding utf8 utf8 "Default" UTF-8 variable inputenc
 End
 
 End
 
-# This one is used by many CJK packages. utf8 is supposed to be the successor,
-# but does not have all features of utf8x yet.
-Encoding utf8x utf8x "Unicode (ucs-extended) (utf8x)" UTF-8 variable inputenc
+# extended utf8 support from the "ucs" package:
+# Larger set of supported characters but conflicts with some packages.
+Encoding utf8x utf8x "Extended [ucs] (utf8x)" UTF-8 variable inputenc
 End
 
 End
 
-# This encoding is used to typeset Armenian using the armTeX package
+# from http://www.ctan.org/pkg/armtex
 Encoding armscii8 armscii8 "Armenian (ArmSCII8)" ARMSCII-8 fixed inputenc
 End
 
 Encoding armscii8 armscii8 "Armenian (ArmSCII8)" ARMSCII-8 fixed inputenc
 End
 
@@ -39,13 +71,15 @@ End
 Encoding iso8859-4 latin4 "Baltic (ISO 8859-4)" ISO-8859-4 fixed inputenc
 End
 
 Encoding iso8859-4 latin4 "Baltic (ISO 8859-4)" ISO-8859-4 fixed inputenc
 End
 
+# from http://www.ctan.org/pkg/latex-cyrillic
 Encoding iso8859-5 iso88595 "Cyrillic (ISO 8859-5)" ISO-8859-5 fixed inputenc
 End
 
 Encoding iso8859-5 iso88595 "Cyrillic (ISO 8859-5)" ISO-8859-5 fixed inputenc
 End
 
-# Not standard, see http://tug.ctan.org/tex-archive/language/arabic/arabi/arabi/texmf/latex/arabi/
+# from http://www.ctan.org/pkg/arabi
 Encoding iso8859-6 8859-6 "Arabic (ISO 8859-6)" ISO-8859-6 fixed inputenc
 End
 
 Encoding iso8859-6 8859-6 "Arabic (ISO 8859-6)" ISO-8859-6 fixed inputenc
 End
 
+# from http://www.ctan.org/pkg/greek-inputenc
 Encoding iso8859-7 iso-8859-7 "Greek (ISO 8859-7)" ISO-8859-7 fixed inputenc
 End
 
 Encoding iso8859-7 iso-8859-7 "Greek (ISO 8859-7)" ISO-8859-7 fixed inputenc
 End
 
@@ -55,8 +89,7 @@ End
 Encoding iso8859-9 latin5 "Turkish (ISO 8859-9)" ISO-8859-9 fixed inputenc
 End
 
 Encoding iso8859-9 latin5 "Turkish (ISO 8859-9)" ISO-8859-9 fixed inputenc
 End
 
-# Not standard, see http://www.vtex.lt/tex/littex/index.html
-Encoding iso8859-13 l7xenc "Baltic (ISO 8859-13)" ISO-8859-13 fixed inputenc
+Encoding iso8859-13 latin7 "Baltic (ISO 8859-13)" ISO-8859-13 fixed inputenc
 End
 
 Encoding iso8859-15 latin9 "Western European (ISO 8859-15)" ISO-8859-15 fixed inputenc
 End
 
 Encoding iso8859-15 latin9 "Western European (ISO 8859-15)" ISO-8859-15 fixed inputenc
@@ -71,7 +104,7 @@ End
 Encoding cp437 cp437 "DOS (CP 437)" CP437 fixed inputenc
 End
 
 Encoding cp437 cp437 "DOS (CP 437)" CP437 fixed inputenc
 End
 
-# cp437, but on position 225 is sz instead of beta
+# like cp437, but on position 225 is sz instead of beta
 Encoding cp437de cp437de "DOS-de (CP 437-de)" CP437 fixed inputenc
 End
 
 Encoding cp437de cp437de "DOS-de (CP 437-de)" CP437 fixed inputenc
 End
 
@@ -81,9 +114,12 @@ End
 Encoding cp852 cp852 "Central European (CP 852)" CP852 fixed inputenc
 End
 
 Encoding cp852 cp852 "Central European (CP 852)" CP852 fixed inputenc
 End
 
+# from http://www.ctan.org/pkg/latex-cyrillic
 Encoding cp855 cp855 "Cyrillic (CP 855)" CP855 fixed inputenc
 End
 
 Encoding cp855 cp855 "Cyrillic (CP 855)" CP855 fixed inputenc
 End
 
+# Gnu iconv only supports cp858, if configured with "--enable-extra-encodings"
+# (see https://www.gnu.org/software/libiconv/)
 Encoding cp858 cp858 "Western European (CP 858)" CP858 fixed inputenc
 End
 
 Encoding cp858 cp858 "Western European (CP 858)" CP858 fixed inputenc
 End
 
@@ -93,12 +129,14 @@ End
 Encoding cp865 cp865 "Nordic languages (CP 865)" CP865 fixed inputenc
 End
 
 Encoding cp865 cp865 "Nordic languages (CP 865)" CP865 fixed inputenc
 End
 
+# from http://www.ctan.org/pkg/latex-cyrillic
 Encoding cp866 cp866 "Cyrillic (CP 866)" CP866 fixed inputenc
 End
 
 Encoding cp1250 cp1250 "Central European (CP 1250)" CP1250 fixed inputenc
 End
 
 Encoding cp866 cp866 "Cyrillic (CP 866)" CP866 fixed inputenc
 End
 
 Encoding cp1250 cp1250 "Central European (CP 1250)" CP1250 fixed inputenc
 End
 
+# from http://www.ctan.org/pkg/latex-cyrillic
 Encoding cp1251 cp1251 "Cyrillic (CP 1251)" CP1251 fixed inputenc
 End
 
 Encoding cp1251 cp1251 "Cyrillic (CP 1251)" CP1251 fixed inputenc
 End
 
@@ -109,25 +147,30 @@ End
 Encoding cp1255 cp1255 "Hebrew (CP 1255)" CP1255 fixed inputenc
 End
 
 Encoding cp1255 cp1255 "Hebrew (CP 1255)" CP1255 fixed inputenc
 End
 
-# Not standard, see http://tug.ctan.org/tex-archive/language/arabic/arabi/arabi/texmf/latex/arabi/
+# from http://www.ctan.org/pkg/arabi
 Encoding cp1256 cp1256 "Arabic (CP 1256)" CP1256 fixed inputenc
 End
 
 Encoding cp1257 cp1257 "Baltic (CP 1257)" CP1257 fixed inputenc
 End
 
 Encoding cp1256 cp1256 "Arabic (CP 1256)" CP1256 fixed inputenc
 End
 
 Encoding cp1257 cp1257 "Baltic (CP 1257)" CP1257 fixed inputenc
 End
 
-Encoding koi8 koi8-r "Cyrillic (KOI8-R)" KOI8-R fixed inputenc
+# from http://www.ctan.org/pkg/latex-cyrillic
+Encoding koi8-r koi8-r "Cyrillic (KOI8-R)" KOI8-R fixed inputenc
 End
 
 End
 
+# from http://www.ctan.org/pkg/latex-cyrillic
 Encoding koi8-u koi8-u "Cyrillic (KOI8-U)" KOI8-U fixed inputenc
 End
 
 Encoding koi8-u koi8-u "Cyrillic (KOI8-U)" KOI8-U fixed inputenc
 End
 
+# from http://www.ctan.org/pkg/latex-cyrillic
 Encoding pt154 pt154 "Cyrillic (pt 154)" PT154 fixed inputenc
 End
 
 Encoding pt154 pt154 "Cyrillic (pt 154)" PT154 fixed inputenc
 End
 
-Encoding pt254 pt254 "Cyrillic (pt 254)" PT254 fixed inputenc
+# from https://ctan.org/pkg/babel-thai
+Encoding tis620-0 tis620 "Thai (TIS 620-0)" TIS620-0 fixed inputenc
 End
 
 End
 
+
 # encodings used by CJK.sty
 
 # The following encodings that are supported by the CJK package are not
 # encodings used by CJK.sty
 
 # The following encodings that are supported by the CJK package are not
@@ -169,7 +212,7 @@ Encoding euc-kr KS "Korean (EUC-KR)" EUC-KR variable CJK
 End
 
 # The CJK package has yet another name for utf8...
 End
 
 # The CJK package has yet another name for utf8...
-Encoding utf8-cjk UTF8 "Unicode (CJK) (utf8)" UTF-8 variable CJK
+Encoding utf8-cjk UTF8 "Extended [CJK] (Chinese/Japanese/Korean)" UTF-8 variable CJK
 End
 
 # For traditional chinese
 End
 
 # For traditional chinese
@@ -184,29 +227,27 @@ End
 
 # Traditional Japanese TeX programs require the japanese package.
 # that is incompatible with CJK and inputenc.
 
 # Traditional Japanese TeX programs require the japanese package.
 # that is incompatible with CJK and inputenc.
-Encoding euc-jp-plain euc "Japanese (non-CJK) (EUC-JP)" EUC-JP variable japanese
-End
-Encoding jis-plain jis "Japanese (non-CJK) (JIS)" ISO-2022-JP variable japanese
+Encoding euc-jp-platex euc "Japanese (pLaTeX) (EUC-JP)" EUC-JP variable japanese
 End
 End
-# FIXME: Should use variableunsafe (would be a file format change)
-Encoding shift-jis-plain sjis "Japanese (non-CJK) (SJIS)" CP932 variable japanese
+Encoding jis-platex jis "Japanese (pLaTeX) (JIS)" ISO-2022-JP variable japanese
 End
 End
-Encoding utf8 utf8 "Japanese (non-CJK) (utf8)" UTF-8 variable japanese
+Encoding shift-jis-platex sjis "Japanese (pLaTeX) (SJIS)" CP932 variable japanese
 End
 End
-
-# This one needs hardcoded support, since the inputenc package does not know
-# tis620-0, and thailatex sets up babel directly to use tis620-0, so the
-# LaTeX name is never output to .tex files (but needed for the hardcoded
-# tis620-0 support).
-Encoding tis620-0 tis620-0 "Thai (TIS 620-0)" TIS620-0 fixed none
+Encoding utf8-platex utf8 "Extended [pLaTeX] (Japanese)" UTF-8 variable japanese
 End
 
 End
 
-# A plain utf8 encoding that does not use the inputenc package.
-# Such an encoding is required for XeTeX.
-Encoding utf8-plain utf8-plain "Unicode (XeTeX) (utf8)" UTF-8 variable none
+# A plain utf8 encoding that does not use the inputenc package
+# nor the LyX-added conversions in lib/unicodesymbols.
+# Such an encoding is required for XeTeX and LuaTeX.
+Encoding utf8-plain utf8-plain "Direct" UTF-8 variable none
 End
 
 # Pure 7bit ASCII encoding (partially hardcoded in LyX)
 Encoding ascii ascii "ASCII" ascii fixed none
 End
 
 End
 
 # Pure 7bit ASCII encoding (partially hardcoded in LyX)
 Encoding ascii ascii "ASCII" ascii fixed none
 End
 
+# Semantic encodings
+
+# Inherit encoding of the context (used by verbatim)
+Encoding inherit inherit "" "" fixed none
+End