Using minted for code listings I have set my font to inconsolata and get the wargning:
LaTeX Font Warning: Font shape `T1/zi4/m/it' undefined
when using Inconsolata font and Python documentation strings -- e.g.:
def foo():
""" Docstring
"""
return 0
If the documentation string is not present, there is no warning.
Minimal example:
\documentclass[
12pt,
paper=a4
]{scrreprt}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[ngerman]{babel}
\usepackage{libertine}
\usepackage[libertine,cmintegrals,cmbraces,vvarbb]{newtxmath}
\usepackage{inconsolata}
\usepackage{minted}
\begin{document}
Some Text.
\inputminted{Python}{some_code.py}
\end{document}
Edit: The Warning still appears, despite your solution. Could it be because I defined my own environment:
\documentclass[
12pt,
paper=a4
]{scrreprt}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[ngerman]{babel}
\usepackage{libertine}
\usepackage[libertine,cmintegrals,cmbraces,vvarbb]{newtxmath}
\usepackage{inconsolata}
\usepackage{minted}
\usepackage{etoolbox}
\AtBeginEnvironment{minted}{\let\itshape\relax}
\newmintedfile[Python]{python}{
fontsize=\small,
%bgcolor=mintedback,
linenos=true,
numberblanklines=true,
numbersep=12pt,
numbersep=5pt,
gobble=0,
frame=leftline,
framerule=1pt,
framesep=2mm,
funcnamehighlighting=true,
tabsize=4,
obeytabs=false,
}
\begin{document}
Some Text.
\Python{test.py}
\end{document}


font=\ttfamilyoption but the error still occures. – ap0 Jan 21 '15 at 13:05\textttor\ttfamilythat is causing the error. It is minted! I have no idea why the warning message (from vim-latex-suite btw) was pointing to that tikzpicture. After removing all minted code includes the warning was gone and it comes back after I put them back again. If I can not find the cause by my own I will ask here again. But should I now delete the question and start a new one or edit it? – ap0 Jan 21 '15 at 13:23mintedstyles use italic text, whichinconsolatadoesn't provide. You can use a different font that does provide italics. Or you can disable the italics withinmintedenvironments by loadingetoolboxand then using something like\AtBeginEnvironment{minted}{\let\textit\relax}. – G. Poore Jan 21 '15 at 14:39