由于某种原因,使用小写字母\textsc{}
会导致字符丢失。例如,以下代码:
\documentclass[12pt]{article}
\begin{document}
\textsc{Hello world}
Hello world
\end{document}
呈现为:
但一旦我删除小型大写字母,它就会正常呈现:
\documentclass[12pt]{article}
\begin{document}
% \textsc{Hello world}
Hello world
\end{document}
我曾尝试使用\usepackage[T1]{fontenc}
,但没有什么区别。
日志文件如下所示:
This is pdfTeX, Version 3.141592653-2.6-1.40.22 (TeX Live 2021) (preloaded format=pdflatex 2021.9.1) 19 JUN 2022 13:01
entering extended mode
restricted \write18 enabled.
%&-line parsing enabled.
LaTeX2e <2020-10-01> patch level 4
L3 programming layer <2021-02-18>
(/usr/local/texlive/2021/texmf-dist/tex/latex/base/article.cls
Document Class: article 2020/04/10 v1.4m Standard LaTeX document class
(/usr/local/texlive/2021/texmf-dist/tex/latex/base/size12.clo
File: size12.clo 2020/04/10 v1.4m Standard LaTeX file (size option)
)
\c@part=\count179
\c@section=\count180
\c@subsection=\count181
\c@subsubsection=\count182
\c@paragraph=\count183
\c@subparagraph=\count184
\c@figure=\count185
\c@table=\count186
\abovecaptionskip=\skip47
\belowcaptionskip=\skip48
\bibindent=\dimen138
)
(/usr/local/texlive/2021/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def
File: l3backend-pdftex.def 2021-03-18 L3 backend support: PDF output (pdfTeX)
\l__color_backend_stack_int=\count187
\l__pdf_internal_box=\box47
)
(./test.aux)
\openout1 = `test.aux'.
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 2.
LaTeX Font Info: ... okay on input line 2.
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 2.
LaTeX Font Info: ... okay on input line 2.
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 2.
LaTeX Font Info: ... okay on input line 2.
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 2.
LaTeX Font Info: ... okay on input line 2.
LaTeX Font Info: Checking defaults for TS1/cmr/m/n on input line 2.
LaTeX Font Info: ... okay on input line 2.
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 2.
LaTeX Font Info: ... okay on input line 2.
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 2.
LaTeX Font Info: ... okay on input line 2.
[1
{/usr/local/texlive/2021/texmf-var/fonts/map/pdftex/updmap/pdftex.map}] (./test
.aux) )
Here is how much of TeX's memory you used:
383 strings out of 478994
6892 string characters out of 5858185
289938 words of memory out of 5000000
17948 multiletter control sequences out of 15000+600000
404029 words of font info for 29 fonts, out of 8000000 for 9000
1141 hyphenation exceptions out of 8191
44i,4n,50p,169b,100s stack positions out of 5000i,500n,10000p,200000b,80000s
</usr/local/texlive/2021/texmf-dist/fonts/type1/public/amsfonts/cm/cmcsc
10.pfb></usr/local/texlive/2021/texmf-dist/fonts/type1/public/amsfonts/cm/cmr12
.pfb>
Output written on test.pdf (1 page, 18403 bytes).
PDF statistics:
16 PDF objects out of 1000 (max. 8388607)
10 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)
不确定如何进一步调试,因为没有明显的错误/警告。有人能给我指出正确的方向吗?
编辑:第一个代码片段在 Overleaf 上运行,所以它可能只是我的机器特有的东西。
答案1
事实证明问题不在于 latex,而在于我的 pdf 查看器。我latex-preview-pane
在 MacOS 上使用 emacs 模式查看 pdf。然而,经过进一步调查,我发现 ghostscript 已安装但未正确链接。我使用以下命令修复了此问题:
brew install ghostscript
brew link --overwrite ghostscript
然后我重新启动了 emacs。此后,预览窗格就可以正确显示小写字母了!
感谢 David Carlisle 为我指明正确的方向。