Microtype plus eplain 和葡萄牙语

Microtype plus eplain 和葡萄牙语

我正在使用 eplain 准备一组文档。文本是葡萄牙语,所以我想使用正确的连字符。同时,我想使用微排版增强功能。这是我目前的尝试。

\input eplain

\input portuges.sty

% \beginpackages
%   \usepackage{letterspace}
% \endpackages

\begindocument


Oi! Um texto muito curto para testar se a quebra de palavras e a se
micro-tipografia funcionam. Pala\-vreado verboso, buscando
quebras-de-linha. Este documento seria processado
usando pdf\TeX. Um exemplo de palavra extremamente longa.

\bye

这会产生以下结果。

在此处输入图片描述

我不明白为什么添加注释掉的行会导致我在pdftex阅读文档时出现以下错误。

$ pdftex micro.tex
This is pdfTeX, Version 3.141592653-2.6-1.40.25 (TeX Live 2023) (preloaded format=pdftex)
 restricted \write18 enabled.
entering extended mode
(./micro.tex (/home/tassio/builds/texlive/2023/texmf-dist/tex/eplain/eplain.tex
) (/home/tassio/builds/texlive/2023/texmf-dist/tex/generic/babel/portuges.sty
(/home/tassio/builds/texlive/2023/texmf-dist/tex/generic/babel-portuges/portuge
s.ldf (/home/tassio/builds/texlive/2023/texmf-dist/tex/generic/babel/babel.def
(/home/tassio/builds/texlive/2023/texmf-var/tex/generic/config/language.def)
(/home/tassio/builds/texlive/2023/texmf-dist/tex/generic/babel/txtbabel.def))))

(/home/tassio/builds/texlive/2023/texmf-dist/tex/plain/graphics-pln/miniltx.tex
! Illegal parameter number in definition of \@yargdef.
<to be read again>
                   \relax
l.192   \let\@hash@\relax

? h
You meant to type ## instead of #, right?
Or maybe a } was forgotten somewhere earlier, and things
are all screwed up? I'm going to assume that you meant ##.

?
! Illegal parameter number in definition of \@yargdef.
<to be read again>
                   \the
l.197 ...  \edef\reserved@a{\reserved@a\@hash@\the
                                                  \@tempcntb}%
?
! Illegal parameter number in definition of \@yargdef.
<to be read again>
                   \l@ngrel@x
l.200   \l@ngrel@x
                  \expandafter\def\expandafter#1\reserved@a}
?
)
[. . . I'm omitting further messages . . . ]

任何帮助是极大的赞赏!

答案1

固定在源头

https://github.com/davidcarlisle/graphics-pln/commit/2ac07f2e8c63f30949ad1111bc877150948f78e3

我将在 ctan 安排更新。


两个包都在定义,\@hash@ 只需在第二个包之前取消定义即可

\input eplain


\input portuges.sty

\expandafter\let\csname @hash@\endcsname\relax
 \beginpackages
   \usepackage{letterspace}
 \endpackages

\begindocument


Oi! Um texto muito curto para testar se a quebra de palavras e a se
micro-tipografia funcionam. Pala\-vreado verboso, buscando
quebras-de-linha. Este documento seria processado
usando pdf\TeX. Um exemplo de palavra extremamente longa.

\bye

答案2

如果使用 eplain 的原因是您的文档包含纯 TeX 构造,那么还有另一种选择:OpTeX。

\fontfam[lm]                   % Latin modern, Unicode alternative of CM
\ptlang                        % Portugese language
\load[mte]\enablemte           % MicroTypographic Extension
\margins/1 letter (1,1,1,1)in  % Paper format as in plain TeX

Oi! Um texto muito curto para testar se a quebra de palavras e a se
micro-tipografia funcionam. Palavreado verboso, buscando
quebras-de-linha. Este documento seria processado
usando \OpTeX. Um exemplo de palavra extremamente longa.

\bye

请注意,如果您的纯 TeX 文档加载miniltx(如您的示例所示),那么结果几乎就是 LaTeX。

相关内容