问题

问题

我正在尝试排版以下内容:

\documentclass{standalone}

\usepackage[LGR]{fontenc}
\newcommand{\textgreek}[1]{\begingroup\fontencoding{LGR}\selectfont#1\endgroup}

\begin{document}
\textgreek{\<hm\~wn}
\end{document}

这看起来应该是这样的:

在此处输入图片描述

具体来说,我在 Debian Jessie (8.1) 上做过这个3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt11-1+deb8u3 (2015-08-04) x86_64 GNU/Linux。具体来说,我试图在 Ubuntu Server 14.04 安装上制作完全相同的 PDF 3.13.0-51-generic #84-Ubuntu SMP Wed Apr 15 12:08:34 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux,但失败了。

我刚刚按照以下说明在 Ubuntu 上完全重新安装了 TeXlive这里。曾经有一个 2013 版本。我也彻底删除了所有texmf存在的目录。但问题仍然存在。

问题

我该如何调查这里发生的事情?


以下是在 Debian 上发生的情况:

This is pdfTeX, Version 3.14159265-2.6-1.40.15 (TeX Live 2015/dev/Debian) (preloaded format=pdflatex 2015.6.6)  28 SEP 2015 22:45
entering extended mode
 restricted \write18 enabled.
 %&-line parsing enabled.
**asper.tex
(./asper.tex
LaTeX2e <2014/05/01>
Babel <3.9l> and hyphenation patterns for 79 languages loaded.
(/home/camilstaps/texmf/tex/latex/standalone/standalone.cls
Document Class: standalone 2012/09/15 v1.1b Class to compile TeX sub-files stan
dalone
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifluatex.sty
Package: ifluatex 2010/03/01 v1.3 Provides the ifluatex switch (HO)
Package ifluatex Info: LuaTeX not detected.
)
(/usr/share/texlive/texmf-dist/tex/generic/oberdiek/ifpdf.sty
Package: ifpdf 2011/01/30 v2.3 Provides the ifpdf switch (HO)
Package ifpdf Info: pdfTeX in PDF mode is detected.
)
(/usr/share/texlive/texmf-dist/tex/generic/ifxetex/ifxetex.sty
Package: ifxetex 2010/09/12 v0.6 Provides ifxetex conditional
)
(/usr/share/texlive/texmf-dist/tex/latex/xkeyval/xkeyval.sty
Package: xkeyval 2014/05/25 v2.7 package option processing (HA)

(/usr/share/texlive/texmf-dist/tex/generic/xkeyval/xkeyval.tex
(/usr/share/texlive/texmf-dist/tex/generic/xkeyval/xkvutils.tex
\XKV@toks=\toks14
\XKV@tempa@toks=\toks15

(/usr/share/texlive/texmf-dist/tex/generic/xkeyval/keyval.tex))
\XKV@depth=\count79
File: xkeyval.tex 2014/05/25 v2.7 key=value parser (HA)
))
\sa@internal=\count80

(/home/camilstaps/texmf/tex/latex/standalone/standalone.cfg
File: standalone.cfg 2012/09/15 v1.1b Default configuration file for 'standalon
e' class
)
(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo
File: size10.clo 2014/09/29 v1.4h Standard LaTeX file (size option)
)
\c@part=\count81
\c@section=\count82
\c@subsection=\count83
\c@subsubsection=\count84
\c@paragraph=\count85
\c@subparagraph=\count86
\c@figure=\count87
\c@table=\count88
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
)
\sa@box=\box26
)
(/usr/share/texlive/texmf-dist/tex/latex/base/fontenc.sty
Package: fontenc 2005/09/27 v1.99g Standard LaTeX package

(/usr/share/texlive/texmf-dist/tex/latex/greek-fontenc/lgrenc.def
File: lgrenc.def 2013/12/02 v0.11.2 LGR Greek font encoding definitions

(/usr/share/texlive/texmf-dist/tex/latex/greek-fontenc/greek-fontenc.def
File: greek-fontenc.def 2013/11/28 v0.11 Common Greek font encoding definitions

))
LaTeX Font Info:    Try loading font information for LGR+cmr on input line 100.


(/usr/share/texlive/texmf-dist/tex/latex/cbfonts-fd/lgrcmr.fd
File: lgrcmr.fd 2013/09/01 v1.0 Greek European Computer Regular
)) (./asper.aux)
\openout1 = `asper.aux'.

LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 6.
LaTeX Font Info:    ... okay on input line 6.
LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 6.
LaTeX Font Info:    ... okay on input line 6.
LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 6.
LaTeX Font Info:    ... okay on input line 6.
LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 6.
LaTeX Font Info:    ... okay on input line 6.
LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 6.
LaTeX Font Info:    ... okay on input line 6.
LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 6.
LaTeX Font Info:    ... okay on input line 6.
LaTeX Font Info:    Checking defaults for LGR/cmr/m/n on input line 6.
LaTeX Font Info:    ... okay on input line 6.

[1

{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}] (./asper.aux) ) 
Here is how much of TeX's memory you used:
 1580 strings out of 493105
 25861 string characters out of 6137073
 64771 words of memory out of 5000000
 5087 multiletter control sequences out of 15000+600000
 4324 words of font info for 15 fonts, out of 8000000 for 9000
 1141 hyphenation exceptions out of 8191
 34i,4n,56p,564b,108s stack positions out of 5000i,500n,10000p,200000b,80000s
</usr/share
/texlive/texmf-dist/fonts/type1/public/cbfonts/grmn1000.pfb>
Output written on asper.pdf (1 page, 12136 bytes).
PDF statistics:
 12 PDF objects out of 1000 (max. 8388607)
 7 compressed objects within 1 object stream
 0 named destinations out of 1000 (max. 500000)
 1 words of extra memory for PDF output out of 10000 (max. 10000000)

以下是在 Ubuntu 上发生的情况:

This is pdfTeX, Version 3.14159265-2.6-1.40.16 (TeX Live 2015) (preloaded format=pdflatex 2015.9.28)  28 SEP 2015 22:40
entering extended mode
 restricted \write18 enabled.
 %&-line parsing enabled.
**asper.tex
(./asper.tex
LaTeX2e <2015/01/01> patch level 2
Babel <3.9m> and hyphenation patterns for 79 languages loaded.
(/usr/local/texlive/2015/texmf-dist/tex/latex/standalone/standalone.cls
Document Class: standalone 2015/07/15 v1.2 Class to compile TeX sub-files stand
alone
(/usr/local/texlive/2015/texmf-dist/tex/generic/oberdiek/ifluatex.sty
Package: ifluatex 2010/03/01 v1.3 Provides the ifluatex switch (HO)
Package ifluatex Info: LuaTeX not detected.
)
(/usr/local/texlive/2015/texmf-dist/tex/generic/oberdiek/ifpdf.sty
Package: ifpdf 2011/01/30 v2.3 Provides the ifpdf switch (HO)
Package ifpdf Info: pdfTeX in PDF mode is detected.
)
(/usr/local/texlive/2015/texmf-dist/tex/generic/ifxetex/ifxetex.sty
Package: ifxetex 2010/09/12 v0.6 Provides ifxetex conditional
)
(/usr/local/texlive/2015/texmf-dist/tex/latex/xkeyval/xkeyval.sty
Package: xkeyval 2014/12/03 v2.7a package option processing (HA)

(/usr/local/texlive/2015/texmf-dist/tex/generic/xkeyval/xkeyval.tex
(/usr/local/texlive/2015/texmf-dist/tex/generic/xkeyval/xkvutils.tex
\XKV@toks=\toks14
\XKV@tempa@toks=\toks15

(/usr/local/texlive/2015/texmf-dist/tex/generic/xkeyval/keyval.tex))
\XKV@depth=\count79
File: xkeyval.tex 2014/12/03 v2.7a key=value parser (HA)
))
\sa@internal=\count80
\c@sapage=\count81

(/usr/local/texlive/2015/texmf-dist/tex/latex/standalone/standalone.cfg
File: standalone.cfg 2015/07/15 v1.2 Default configuration file for 'standalone
' class
)
(/usr/local/texlive/2015/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/usr/local/texlive/2015/texmf-dist/tex/latex/base/size10.clo
File: size10.clo 2014/09/29 v1.4h Standard LaTeX file (size option)
)
\c@part=\count82
\c@section=\count83
\c@subsection=\count84
\c@subsubsection=\count85
\c@paragraph=\count86
\c@subparagraph=\count87
\c@figure=\count88
\c@table=\count89
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
)
\sa@box=\box26
)
(/usr/local/texlive/2015/texmf-dist/tex/latex/base/fontenc.sty
Package: fontenc 2005/09/27 v1.99g Standard LaTeX package

(/usr/local/texlive/2015/texmf-dist/tex/latex/greek-fontenc/lgrenc.def
File: lgrenc.def 2015/08/08 v0.13 LGR Greek font encoding definitions

(/usr/local/texlive/2015/texmf-dist/tex/latex/greek-fontenc/greek-fontenc.def
File: greek-fontenc.def 2015/08/04 v0.13 Common Greek font encoding definitions

))
LaTeX Font Info:    Try loading font information for LGR+cmr on input line 105.

(/usr/local/texlive/2015/texmf-dist/tex/latex/cbfonts-fd/lgrcmr.fd
File: lgrcmr.fd 2013/09/01 v1.0 Greek European Computer Regular
))
No file asper.aux.
\openout1 = `asper.aux'.

LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 6.
LaTeX Font Info:    ... okay on input line 6.
LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 6.
LaTeX Font Info:    ... okay on input line 6.
LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 6.
LaTeX Font Info:    ... okay on input line 6.
LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 6.
LaTeX Font Info:    ... okay on input line 6.
LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 6.
LaTeX Font Info:    ... okay on input line 6.
LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 6.
LaTeX Font Info:    ... okay on input line 6.
LaTeX Font Info:    Checking defaults for LGR/cmr/m/n on input line 6.
LaTeX Font Info:    ... okay on input line 6.
! Undefined control sequence.
<argument> \<
             hm\~wn
l.7 \textgreek{\<hm\~wn}

? 
! Emergency stop.
<argument> \<
             hm\~wn
l.7 \textgreek{\<hm\~wn}

End of file on the terminal!


Here is how much of TeX's memory you used:
 1596 strings out of 493091
 26446 string characters out of 6134970
 65931 words of memory out of 5000000
 5130 multiletter control sequences out of 15000+600000
 4324 words of font info for 15 fonts, out of 8000000 for 9000
 1141 hyphenation exceptions out of 8191
 34i,0n,56p,564b,90s stack positions out of 5000i,500n,10000p,200000b,80000s
!  ==> Fatal error occurred, no output PDF file produced!

以下是 Debian 上的文件列表:

 *File List*
standalone.cls    2012/09/15 v1.1b Class to compile TeX sub-files standalone
ifluatex.sty    2010/03/01 v1.3 Provides the ifluatex switch (HO)
   ifpdf.sty    2011/01/30 v2.3 Provides the ifpdf switch (HO)
 ifxetex.sty    2010/09/12 v0.6 Provides ifxetex conditional
 xkeyval.sty    2014/05/25 v2.7 package option processing (HA)
 xkeyval.tex    2014/05/25 v2.7 key=value parser (HA)
standalone.cfg    2012/09/15 v1.1b Default configuration file for 'standalone' 
class
 article.cls    2014/09/29 v1.4h Standard LaTeX document class
  size10.clo    2014/09/29 v1.4h Standard LaTeX file (size option)
 fontenc.sty
  lgrenc.def    2013/12/02 v0.11.2 LGR Greek font encoding definitions
greek-fontenc.def    2013/11/28 v0.11 Common Greek font encoding definitions
  lgrcmr.fd    2013/09/01 v1.0 Greek European Computer Regular

答案1

greek-fontenc.def0.13 版本(Ubuntu 发行版中)中,我们发现

% Symbol macros for the breathings:
%
% Moved to ``textalpha.sty`` to avoid clashes with local definitions
% of ``\<`` and ``\>`` in documents using LGR or babel-greek.
% (Bugreport David Kastrup). If you want to use the short macros without
% loading `textalpha`, you can define them in the document preamble like
%
% .. code:: latex
%
%   \DeclareTextCommand{\<}{LGR}{\accdasia}
%   \DeclareTextCommand{\>}{LGR}{\accpsili}
%   \DeclareTextCompositeCommand{\>}{LGR}{'}{\accpsilioxia}
%   \DeclareTextCompositeCommand{\>}{LGR}{`}{\accpsilivaria}
%   \DeclareTextCompositeCommand{\>}{LGR}{~}{\accpsiliperispomeni}
%   \DeclareTextCompositeCommand{\<}{LGR}{'}{\accdasiaoxia}
%   \DeclareTextCompositeCommand{\<}{LGR}{`}{\accdasiavaria}
%   \DeclareTextCompositeCommand{\<}{LGR}{~}{\accdasiaperispomeni}

因此,你可以通过添加来解决问题

\usepackage{textalpha}

这对两个系统来说都没有什么影响(当然,除了解决问题)。

另一方面,醂醂可以直接输入<,不需要textalpha。使用以下文档

\documentclass[border=2]{standalone}

\usepackage[LGR]{fontenc}
\usepackage{textalpha}
\newcommand{\textgreek}[1]{\begingroup\fontencoding{LGR}\selectfont#1\endgroup}

\begin{document}

\textgreek{\<hm\~wn} \textgreek{<hm\~wn}

\end{document}

我明白了

在此处输入图片描述

>同样,还有莱尼斯精神

以下是事实证明:

\documentclass[border=2,varwidth]{standalone}

\usepackage[LGR,T1]{fontenc}
\newcommand{\greektext}{\fontencoding{LGR}\selectfont}
\DeclareTextFontCommand{\textgreek}{\greektext}

\begin{document}

\textgreek{<hm\~wn} This is not Greek

\textgreek{>a >e >h >i >o >u >w}

\textgreek{<a <e <h <i <o <u <w}

\textgreek{>A >E >H >I >O >U >W}

\textgreek{<A <E <H <I <O <U <W}

\end{document}

在此处输入图片描述

问题只出在脱字符号上,它需要非主动的~

相关内容