diff options
author | Karl Berry <karl@freefriends.org> | 2013-11-26 23:20:04 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2013-11-26 23:20:04 +0000 |
commit | fb91667b247fe27096e359343eab502290656a11 (patch) | |
tree | 56f12c77535cee07c7ac0d643f7efd3058efc411 /Master/texmf-dist/tex/csplain/base | |
parent | 93d97c86679ad3e449ccb58cff961c4dfca740e9 (diff) |
csplain
git-svn-id: svn://tug.org/texlive/trunk@32248 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/csplain/base')
-rw-r--r-- | Master/texmf-dist/tex/csplain/base/csplain.ini | 9 | ||||
-rw-r--r-- | Master/texmf-dist/tex/csplain/base/hyphen.lan | 91 | ||||
-rw-r--r-- | Master/texmf-dist/tex/csplain/base/luaplain.ini | 117 | ||||
-rw-r--r-- | Master/texmf-dist/tex/csplain/base/xeplain.ini | 116 |
4 files changed, 293 insertions, 40 deletions
diff --git a/Master/texmf-dist/tex/csplain/base/csplain.ini b/Master/texmf-dist/tex/csplain/base/csplain.ini index 0616351b125..81f0a9b2ae7 100644 --- a/Master/texmf-dist/tex/csplain/base/csplain.ini +++ b/Master/texmf-dist/tex/csplain/base/csplain.ini @@ -7,7 +7,7 @@ \input hyphen.lan % czech / slovak hyphenation pattern (may be others too) \input plaina4 % \hsize and \vsize for A4 \everyjob=\expandafter{\the\everyjob - \message{The format: csplain <Sep. 2013>.} + \message{The format: csplain <Nov. 2013>.} \message{The cs-fonts are preloaded and A4 size implicitly defined.}} \ifx\xprncode\undefined \else %% The encTeX is detected \count255=128 % All codes > 128 are printable: @@ -192,6 +192,13 @@ file extcode.tex renamed to il2code.tex (suggested by Jan Kasprzak) * \letfont in csfontsm.tex reimplemented (XeTeX's \fontname with spaces) * ams-math.tex and tx-math.tex use \letfont. +** 12 ** <Nov. 2013> +* hyphen.lan: cz -> cs (by ISO 639-1), \onlyUnicode introduced +* \normalmathloading introduced in ams-math.tex, tx-math.tex, lmfonts.tex +* luafonts.tex: new code for version 0.76 of LuaTeX +* The files luaplain.ini and xeplain.ini added. + + COPYRIGHT ========= diff --git a/Master/texmf-dist/tex/csplain/base/hyphen.lan b/Master/texmf-dist/tex/csplain/base/hyphen.lan index c8749b90a23..62f2d988fd6 100644 --- a/Master/texmf-dist/tex/csplain/base/hyphen.lan +++ b/Master/texmf-dist/tex/csplain/base/hyphen.lan @@ -19,22 +19,26 @@ \ifx#8\relax \else \expandafter\def\expandafter#8\expandafter{#8\let#9#1}\fi \edef\pattlist{\pattlist #1=#2 } + \advance\numpatterns by1 \fi } \def\pattlist{} \def\initlanguage#1{} +\newcount\numpatterns \def\robustpatterns{\let\oripatterns=\patterns \def\patterns##1{\scanpatterns##1{}{##1}}} \def\scanpatterns#1{\if$#1$\expandafter\oripatterns\else \ifnum`#1<128 \else \lccode`#1=`#1 \fi \expandafter\scanpatterns\fi} +\def\ucodeset{\ifx\font\unicoded \else \input ucode \fi} + \def\tmp#1#2\relax{\def\tmp{#2}}\tmp ^^^^abcd\relax % 16bit TeX engine? \ifx\allpatterns\undefined \catcode`\:=14 \else \catcode`\:=9 \fi % comment or ignored \def\iltwolangs{} \def\corklangs{} \def\unicodelangs{} %% \corklangs (etc.) cummulates the commands -%% \let\czPatt=\czCork \let\skPatt=\skCork (etc.) -%% You can run \corklangs before \language=\czPatt or \language=\skPatt +%% \let\csPatt=\csCork \let\skPatt=\skCork (etc.) +%% You can run \corklangs before \language=\csPatt or \language=\skPatt %% if you want to work in T1 encoding. %% You can remove the colon character if you want to use @@ -43,9 +47,12 @@ %% or %% pdftex -ini "\let\allpaterns=y \input csplain.ini" +%% If you are using 16bit TeX engine then you can say \let\onlyUnicode=y +%% and the ISO- and Cork- encoded patterns will be skipped + %% ASCII (these patterns work independently on choosen encoding): -\let\USenglish=\patterns % Default plainTeX US English +\let\enPatt=\patterns % Default plainTeX US English :\let\enusPatt=\patterns % US English extended :\let\engbPatt=\patterns % UK English :\let\itPatt=\patterns % Italian @@ -54,7 +61,9 @@ %% ISO-8859-2 (default patterns in csplain): -\let\czILtwo=\patterns +\ifx\onlyUnicode\undefined % + +\let\csILtwo=\patterns \let\skILtwo=\patterns %% You can say @@ -63,7 +72,7 @@ \ifx\Cork\undefined -\let\czCork=\patterns % Czech +\let\csCork=\patterns % Czech \let\skCork=\patterns % Slovak \ifx\tmp\empty\else @@ -98,13 +107,13 @@ :\let\tkCork=\patterns % Turkmen :\let\laCork=\patterns % Latin -\fi\fi +\fi\fi\fi %% test of Unicoded TeX engine \ifx\tmp\empty -\let\czUnicode=\patterns % Czech +\let\csUnicode=\patterns % Czech \let\skUnicode=\patterns % Slovak :\let\deUnicode=\patterns % German :\let\frUnicode=\patterns % French @@ -160,12 +169,13 @@ :\let\teUnicode=\patterns % Telugu \fi +\let\czILtwo=\csILtwo \let\czCork=\csCork \let\czUnicode=\csUnicode \catcode58=12 % colon has normal meaning now \def\patt{hyphenation patterns } -\loadpatterns \USenglish 0 us {US English \patt in ASCII} - {\input hyphen.ex }23 \relax \USenglish +\loadpatterns \enPatt 0 en {US English \patt in ASCII} + {\input hyphen.ex }23 \relax \enPatt \loadpatterns \enusPatt 100 enus {US English extended \patt in ASCII} {\input hyph-en-us }23 \relax \enusPatt @@ -182,15 +192,15 @@ \loadpatterns \idPatt 104 id {Indonesian \patt in ASCII} {\input hyph-id }23 \relax \idPatt -\loadpatterns \czILtwo 5 cz {Czech \patt in ISO-8859-2} - {\doaccents \input czhyphen.tex \input czhyphen.ex }23 \iltwolangs \czPatt +\loadpatterns \csILtwo 5 cs {Czech \patt in ISO-8859-2} + {\doaccents \input czhyphen.tex \input czhyphen.ex }23 \iltwolangs \csPatt \loadpatterns \skILtwo 6 sk {Slovak \patt in ISO-8859-2} {\doaccents \input skhyphen.tex \input skhyphen.ex }23 \iltwolangs \skPatt -\loadpatterns \czCork 15 cz {Czech \patt in Cork} +\loadpatterns \csCork 15 cs {Czech \patt in Cork} {\input t1code \doaccents \input czhyphen.tex \input czhyphen.ex }23 - \corklangs \czPatt + \corklangs \csPatt \loadpatterns \skCork 16 sk {Slovak \patt in Cork} {\input t1code \doaccents \input skhyphen.tex \input skhyphen.ex }23 @@ -244,7 +254,7 @@ \loadpatterns \nlCork 37 nl {Dutch \patt in Cork} {\input conv-utf8-ec \input hyph-nl }22 \corklangs \nlPatt -\loadpatterns \ptCork 38 pt {Portugesse \patt in Cork} +\loadpatterns \ptCork 38 pt {Portuguese \patt in Cork} {\lccode`\-=`\- \input conv-utf8-ec \input hyph-pt }23 \corklangs \ptPatt \loadpatterns \roCork 39 ro {Romanian \patt in Cork} @@ -278,12 +288,12 @@ \loadpatterns \laCork 48 la {Latin \patt in Cork} {\lccode`\'=`\' \input conv-utf8-ec \input hyph-la }22 \corklangs \laPatt -\loadpatterns \czUnicode 115 cz {Czech \patt in Unicode} - {\input ucode \doaccents \input czhyphen.tex \input czhyphen.ex }23 - \unicodelangs \czPatt +\loadpatterns \csUnicode 115 cs {Czech \patt in Unicode} + {\ucodeset \doaccents \input czhyphen.tex \input czhyphen.ex }23 + \unicodelangs \csPatt \loadpatterns \skUnicode 116 sk {Slovak \patt in Unicode} - {\input ucode \doaccents \input skhyphen.tex \input skhyphen.ex }23 + {\ucodeset \doaccents \input skhyphen.tex \input skhyphen.ex }23 \unicodelangs \skPatt \loadpatterns \deUnicode 121 de {German \patt in Unicode} @@ -334,7 +344,7 @@ \loadpatterns \nlUnicode 137 nl {Dutch \patt in Unicode} {\robustpatterns \input hyph-nl }22 \unicodelangs \nlPatt -\loadpatterns \ptUnicode 138 pt {Portugesse \patt in Unicode} +\loadpatterns \ptUnicode 138 pt {Portuguese \patt in Unicode} {\robustpatterns \lccode`\-=`\- \input hyph-pt }23 \unicodelangs \ptPatt \loadpatterns \roUnicode 139 ro {Romanian \patt in Unicode} @@ -436,49 +446,52 @@ \loadpatterns \taUnicode 221 ta {Tamil \patt in Unicode} {\robustpatterns \input hyph-ta }11 \unicodelangs \taPatt -\loadpatterns \teUnicode 222 te {Telgu \patt in Unicode} +\loadpatterns \teUnicode 222 te {Telugu \patt in Unicode} {\robustpatterns \input hyph-te }11 \unicodelangs \tePatt -\message{Patterns: \pattlist} +\message{\the\numpatterns\space patterns preloaded: \pattlist} \message{Defaults: \string\language=\the\language, - \string\cmaccents, \string\nofrenchspacing, - ISO-8859-2 font encoding} + \string\cmaccents, \string\nofrenchspacing,} % ========= for backward compatibility ======== -\newcount\czech \newcount\slovak +\let\iltwoczech=\csILtwo \let\iltwoslovak=\skILtwo +\let\toneczech=\csCork \let\toneslovak=\skCork -\let\iltwoczech=\czILtwo \let\iltwoslovak=\skILtwo -\let\toneczech=\czCork \let\toneslovak=\skCork +\let\czILtwo=\csILtwo \let\czCork=\csCork \let\czUnicode=\csUnicode \expandafter \def\expandafter\iltwolangs \expandafter {\iltwolangs - \czech\czILtwo \slovak\skILtwo} + \let\czech\csILtwo \let\slovak\skILtwo} -\ifx\czCork\undefined \else +\ifx\csCork\undefined \else \expandafter \def\expandafter\corklangs \expandafter {\corklangs - \czech\czCork \slovak\skCork} + \let\czech\csCork \let\slovak\skCork} \fi -\ifx\czUnicode\undefined \else +\ifx\csUnicode\undefined \else \expandafter \def\expandafter\unicodelangs \expandafter {\unicodelangs - \czech\czUnicode \slovak\skUnicode} + \let\czech\csUnicode \let\slovak\skUnicode} \fi -\def\uslang{\language=\USenglish \initlanguage{us}\nonfrenchspacing - \lefthyphenmin=2 \righthyphenmin=3 +\def\enlang{\language=\enPatt \initlanguage{en}\nonfrenchspacing + \lefthyphenmin=2 \righthyphenmin=3 \message{English hyphenation used (\string\language=\the\language). \string\nonfrenchspacing\space is set on.}} -\let\ehyph=\uslang \let\chyph=\czlang \let\shyph=\sklang +\let\uslang=\enlang \let\ehyph=\enlang \let\chyph=\cslang \let\shyph=\sklang -\iltwolangs % csplain default is ISO-8859-2 encoding +\ifx\onlyUnicode\undefined + \iltwolangs \message{ISO-8859-2 font encoding} +\else + \unicodelangs \message{Unicode font encoding} +\fi \endinput %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -If \<lang>Code (for example \czUnicode, \deCork) is undefined, the patterns +If \<lang>Code (for example \csUnicode, \deCork) is undefined, the patterns are not loaded. If user sets \<lang>Code=\patterns before this file is loaded, then the patterns are loaded. @@ -491,8 +504,8 @@ or in order to load the additional patterns. -By default, only \USenglish=0 \czILtwo=5, \skILtwo=6, \czCork=15, \skCork=16 -are loaded in 8bit TeX. The additional \czUnicode=115, \skUnicode=116 are +By default, only \USenglish=0 \csILtwo=5, \skILtwo=6, \csCork=15, \skCork=16 +are loaded in 8bit TeX. The additional \csUnicode=115, \skUnicode=116 are loaded in 16bit TeX. The macro \loadpatterns \langCode <num> <lang> {note} @@ -501,7 +514,7 @@ does following: - If \langCode is undefined, does nothing. - Declares \chadref\langCode=<num>. - Loads new pattern with the number <num> by {action} in the group, -- Defines \"<lang>lang" macro (for example \czlang), which sets +- Defines \"<lang>lang" macro (for example \cslang), which sets \language=\switch \lefthyphenmin=<lhm> \righthypgenmin=<rhm> and runs \initlanguage{<lang>}. The \initlanguage is dumy by default but macro programmer can define it. diff --git a/Master/texmf-dist/tex/csplain/base/luaplain.ini b/Master/texmf-dist/tex/csplain/base/luaplain.ini new file mode 100644 index 00000000000..731302c535b --- /dev/null +++ b/Master/texmf-dist/tex/csplain/base/luaplain.ini @@ -0,0 +1,117 @@ +%% luaplain.ini -- luaTeX with csplain +%% Petr Olsak 2013 +%% ------------------------------------ +%% You can generate the luaplain format: luatex -ini luaplain.ini +%% See the end of this file for more information + +\catcode`\{=1 \catcode`\}=2 \catcode`\#=6 + +%% We will skip the \font section in plain.tex file. +%% In order to do this we temporary re-define the \font primitive: + \let\orifont=\font + \long\def\font#1\ttfam=\tentt{} % skip the font section from plain.tex + \let\rm=\relax \let\tenex=\relax % some macros are set to temporary meaning + \def\mit{\fam1 } \def\cal{\fam2 } % some macros are set by plain TeX + \def\it{\fam\itfam\tenit} \def\sl{\fam\slfam\tensl} + \def\bf{\fam\bffam\tenbf} \def\tt{\fam\ttfam\tentt} + \def\oldstyle{\fam1 \the\textfont1 } + +%% \outer macros do problems only, no profit: + \let\outer=\relax + +%% plain TeX macros are loaded now (including hyphenation pattern 0): + \input plain % format Plain + +%% LuaTeX initialisation: + \input luatexiniconfig.tex + +%% Next base macros: + \input plaina4 % \hsize and \vsize for A4 + \def\font#1 {} % ignore \font\tenbi=csbxti10 + \input csfontsm % macros: \sizespec, \resizefont, \resizeall, \tenbi, \bi + \let\font=\orifont % original meaning of the font + \input ucode % extra codes for czech / slovak letters in Unicode + \def\fontfeatures{mode=base;script=latn;+tlig} + \input lmfonts % Latin Modern fonts preloaded in Unicode + \let\fontfeatures=\undefined + +%% Hyphenation patterns loading: + % \let\allpatterns=y % uncomment this if you needd all patterns + % \let\deUnicode=y % uncomment this if you need only en+cs+sk+de patterns + \let\onlyUnicode=y % comment this if you need Iso+Cork+Unicode patterns + \input hyphen.lan + +%% We need to reaload the otfload lua code: + \def\font{\input luafonts \global\let\font=\orifont \font} + +%% Default output format: + \pdfoutput=1 + +\everyjob={% + \message{The format: luaplain based on csplain <Nov. 2013>.}% + \message{Unicode internal encoding is set.}% + \message{Latin Modern fonts + ams-math are preloaded and A4 size implicitly defined.}% + \message{\the\numpatterns\space hyphenation patterns are preloaded + (see \string\pattlist), \string\enlang\space is default.}} + +\dump + +==================== Comments ======================== + +You can generate your LuaTeX format based o csplain by: + + luatex -ini luaplain.ini + +and use it by: + + luatex -fmt luaplain document + +You can create an alias "luaplain = luatex -fmt luaplain" in your system. +You can modify this file for your needs without limitation. + +Here is a test: + + \chyph + Ahoj světe, toto je česky napsaný text zpracovaný v Unicode. + \end + +Try to process it by ``luaplain document''. + +The main reason of this format: user needn't to write lines + + \input ucode + \input lmfonts + +at the beginning of his/her document. The document processed by csplain +(with encTeX and pdfTeX) should give the same result as processing it by +luaplain. + +Warning: The LuaTeX and OTFload Lua code are in the beta testing phase. +Use it with care. + + +Notices about triks used in this file +------------------------------------- + +The part of loading fonts in plain.tex file is skipped because we needn't to +preload the old 7bit fonts. These fonts are unusable in Unicoded TeX-engine +when Czech or Slovak languages are used. On the other hand, the Latin Modern +fonts (in Unicode) are preloded. + +So: the \font primitive is re-defined before \input plain.tex. +Some skipped macros from plain.tex are copied here. + +You can comment/uncomment or add names of the desired language patterns in +the Hyphenation section of this file. See the hyphen.lan file for more details. + +The lua code preloaded in order to set more intelligence to the \font +primitive (OTF loading) isn't stored to the format file, unfortunatelly. +So we need to load this in lua-virTeX again. There is some trick here which +loads this code at the first usage of the \font command (\font primitive is +redefined and it retuns its original meaning after desired lua code is loaded. + +The font feature mode=base is set because we need to store the metrics including +kerning/ligature tables to the dumped format. + + +------------------------------------------------ diff --git a/Master/texmf-dist/tex/csplain/base/xeplain.ini b/Master/texmf-dist/tex/csplain/base/xeplain.ini new file mode 100644 index 00000000000..181baeda470 --- /dev/null +++ b/Master/texmf-dist/tex/csplain/base/xeplain.ini @@ -0,0 +1,116 @@ +%% xeplain.ini -- XeTeX with csplain +%% Petr Olsak 2013 +%% ------------------------------------ +%% You can generate the xeplain format: xetex -etex -ini xeplain.ini +%% See the end of this file for more information + +\catcode`\{=1 \catcode`\}=2 \catcode`\#=6 + +%% We will skip the \font section in plain.tex file. +%% In order to do this we temporary re-define the \font primitive: + \let\orifont=\font + \long\def\font#1\ttfam=\tentt{} % skip the font section from plain.tex + \let\rm=\relax \let\tenex=\relax % some macros are set to temporary meaning + \orifont\tenrm=cmr10 \orifont\tenit=cmti10 % temporary fonts + \def\mit{\fam1 } \def\cal{\fam2 } % some macros are set by plain TeX + \def\it{\fam\itfam\tenit} \def\sl{\fam\slfam\tensl} + \def\bf{\fam\bffam\tenbf} \def\tt{\fam\ttfam\tentt} + \def\oldstyle{\fam1 \the\textfont1 } + +%% \outer macros do problems only, no profit: + \let\outer=\relax + +%% plain TeX macros are loaded now (including hyphenation pattern 0): + \input plain % format Plain + +%% XeTeX initialisation: + \newcount\XeTeXallocatorG \XeTeXallocatorG=3 + \def\newXeTeXintercharclass#1{% \newXeTeXintercharclas is documented + \global\advance\XeTeXallocatorG by1 % in xetex-reference.pdf + \ifnum\XeTeXallocatorG<255 + \global\chardef#1=\XeTeXallocatorG + \wlog{\string#1=\string\XeTeXintercharclass\the\XeTeXallocatorG}% + \else \errmessage{No room for a new \XeTeXintercharclass}\fi} + \XeTeXuseglyphmetrics=1 % use -etex extension during format generation + +%% Next base macros: + \input plaina4 % \hsize and \vsize for A4 + \def\font#1 {} % ignore \font\tenbi=csbxti10 + \input csfontsm % macros: \sizespec, \resizefont, \resizeall, \tenbi, \bi + \let\font=\orifont + \input ucode % extra codes for czech / slovak letters in Unicode + \input ams-math % AMS math fonts + \def\fontfeatures{mapping=tex-text;script=latn} + +%% Hyphenation patterns loading: + % \let\allpatterns=y % uncomment this if you needd all patterns + % \let\deUnicode=y % uncomment this if you need only en+cs+sk+de patterns + \let\onlyUnicode=y % comment this if you need Iso+Cork+Unicode patterns + \input hyphen.lan + +\everyjob={% + \message{The format: xeplain based on csplain <Nov. 2013>.}% + \message{Unicode internal encoding is set.}% + \font\tenrm="[lmroman10-regular]:\fontfeatures" + \font\tenbf="[lmroman10-bold]:\fontfeatures" + \font\tenit="[lmroman10-italic]:\fontfeatures" + \font\tenbi="[lmroman10-bolditalic]:\fontfeatures" + \font\tentt="[texgyrecursor-regular]" + \tenrm + \message{Latin Modern fonts + ams-math are preloaded and A4 size implicitly defined.}% + \message{\the\numpatterns\space hyphenation patterns are preloaded + (see \string\pattlist), \string\enlang\space is default.}} + +\dump + +==================== Comments ======================== + +You can generate your XeTeX format based o csplain by: + + xetex -ini -etex xeplain.ini + +and use it by: + + xetex -fmt xeplain document + +You can create an alias "xeplain = xetex -fmt xeplain" in your system. +You can modify this file for your needs without limitation. + +Here is a test: + + \cslang + Ahoj světe, toto je česky napsaný text zpracovaný v Unicode. + \end + +Try to process it by ``xeplain document''. + +The main reason of this format: user needn't to write lines + + \input ucode + \input lmfonts + +at the beginning of his/her document. The document processed by csplain +(with encTeX and pdfTeX) should give the same result as processing it by +xeplain. + + +Notices about triks used in this file +------------------------------------- + +The part of loading fonts in plain.tex file is skipped because we needn't to +preload the old 7bit fonts. These fonts are unusable in Unicoded TeX-engine +when Czech or Slovak languages are used. On the other hand, the Latin Modern +fonts (in Unicode) are preloded. + +So: the \font primitive is re-defined before \input plain.tex. +Some skipped macros from plain.tex are copied here. + +You can comment/uncomment or add names of the desired language patterns in +the Hyphenation section of this file. See the hyphen.lan file for more details. + +XeTeX is unable to store OTF fonts into format file. This is the reason why +the LM fonts are read in \everyjob. Only math 8bit fonts are preloaded from +ams-math file. + + +------------------------------------------------ |