1

I am using inconsolata font for monospace text. When I use it in minted environments, closing braces are shown as quotes in output.

The following is a minimal example showing the issue, and the two outputs using respectively TeX Gyre Cursor and Inconsolata (please ignore the red frame, the text was selected when I took the screenshot).

I am using pdflatex from TeXlive 2019 distribution updated to the latest, same behaviour happens on Linux and Windows.

The log is quite long, but there are these two warnings that might be related:


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}

Correct output with TeX Gyre Cursor

Closing brace is converted to quotes with Inconsolata

3

Use T1-encoding:

\documentclass{article}
\usepackage[T1]{fontenc}
\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}

enter image description here

  • I just noticed that there was an update to inconsolata on CTAN (51155 -> 51433), and with this new version I do not encounter the issue anymore even without \usepackage[T1]{fontenc}. Changelog says "Corrected an error in i4-ot1-0.enc." (I think, there are no dates and I am not sure about version numbers). Was that really a bug? – Claudio Jun 24 at 19:18
  • 2
    yes, looks like someone noticed. – Ulrike Fischer Jun 24 at 19:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.