我使用 inconsolata 字体来显示等宽文本。当我在minted
环境中使用它时,右括号在输出中显示为引号。
以下是展示该问题的一个最小示例,以及分别使用 TeX Gyre Cursor 和 Inconsolata 的两个输出(请忽略红框,我在截图时选择了文本)。
我正在使用 TeXlive 2019 发行版中的 pdflatex,该发行版已更新至最新版本,在 Linux 和 Windows 上也会发生相同的行为。
日志很长,但有两个警告可能相关:
LaTeX Font Info: Try loading font information for OT1+zi4 on input line 7.
(/opt/texlive/2019/texmf-dist/tex/latex/inconsolata/ot1zi4.fd
File: ot1zi4.fd 2018/01/14 OT1/zi4 (Inconsolata)
)
LaTeX Font Info: Font shape `OT1/zi4/m/n' will be
(Font) scaled to size 10.0pt on input line 7.
LaTeX Font Info: Try loading font information for OMS+zi4 on input line 7.
LaTeX Font Info: No file OMSzi4.fd. on input line 7.
LaTeX Font Warning: Font shape `OMS/zi4/m/n' undefined
(Font) using `OMS/cmsy/m/n' instead
(Font) for symbol `textbraceleft' on input line 7.
\openout3 = `mwe.pyg'.
(./_minted-mwe/default-pyg-prefix.pygstyle) (./_minted-mwe/default.pygstyle)
(./_minted-mwe/D45B374E46DD72D9FA3B8B0693E36919E39308E2C003C2F5C215819D1C34C667
.pygtex
LaTeX Font Info: Font shape `OT1/zi4/bx/n' in size <10> not available
(Font) Font shape `OT1/zi4/b/n' tried instead on input line 3.
LaTeX Font Info: Font shape `OT1/zi4/b/n' will be
(Font) scaled to size 10.0pt on input line 3.
) [1
{/opt/texlive/2019/texmf-var/fonts/map/pdftex/updmap/pdftex.map}]
(./mwe.aux)
LaTeX Font Warning: Some font shapes were not available, defaults substituted.
runsystem(rm mwe.pyg)...executed.
)
\documentclass{article}
\usepackage{inconsolata}
% \usepackage{tgcursor}
\usepackage{minted}
\begin{document}
Some text in \texttt{monospace font (including braces: \{\})}.
\begin{minted}{json}
{
"a": {
"b": null
}
}
\end{minted}
\end{document}