The font family for inconsolata
is actually zi4
:
\documentclass{book}
\usepackage{fancyvrb}
\usepackage{inconsolata}
\DefineVerbatimEnvironment{VerbOutA}{Verbatim}{fontfamily=courier}% Courier
\DefineVerbatimEnvironment{VerbOutB}{Verbatim}{fontfamily=cmtt}% Computer Modern Typewriter
\DefineVerbatimEnvironment{VerbOutC}{Verbatim}{fontfamily=zi4}% Inconsolata
\begin{document}
Normal paragraph with \texttt{code using texttt}.
\begin{VerbOutA}
VerbOut environment.
\end{VerbOutA}
\begin{VerbOutB}
VerbOut environment.
\end{VerbOutB}
\begin{VerbOutC}
VerbOut environment.
\end{VerbOutC}
\end{document}
Here is my \listfiles
:
*File List*
book.cls 2007/10/19 v1.4h Standard LaTeX document class
bk10.clo 2007/10/19 v1.4h Standard LaTeX file (size option)
fancyvrb.sty 2008/02/07
keyval.sty 1999/03/16 v1.13 key=value parser (DPC)
inconsolata.sty 2013/06/09 zi4a
textcomp.sty 2005/09/27 v1.99g Standard LaTeX package
ts1enc.def 2001/06/05 v3.0e (jk/car/fm) Standard LaTeX file
ts1cmr.fd 1999/05/25 v2.5h Standard LaTeX font definitions
upquote.sty 2012/04/19 v1.3 upright-quote and grave-accent glyphs in verbat
im
ot1zi4.fd 2013/06/09 OT1/zi4 (Inconsolata)
ot1pcr.fd 2001/06/04 font definitions for OT1/pcr.
***********
It looks like you have something equivalent to
Where in the right hand box (like your first image) the normal size text is set on a too-small baseline so the letters are too close together in most lines and accented letters or descenders cause the line spacing to change to avoid over-printing.
\documentclass{article}
\usepackage[T1]{fontenc}
\begin{document}
\parbox[t]{3cm}{
Some German text
Some German text
Some german text with \"U and g
Some German text
Some German text
Some German text with g
Some german text with \"U and g
}
\quad
\parbox[t]{3cm}{\footnotesize{\normalsize
Some German text
Some German text
Some german text with \"U and g
Some German text
Some German text
Some German text with g
Some german text with \"U and g}
}
\end{document}
The usual cause is as shown here having a size change command without including the end of paragraph in its scope, that causes the font size to change but the paragraph settings revert at the }
so this is setting \normalsize
text on a baselin spacing set for \footnotesize
.
The above guess was essentially right the exmple finally provided shows the form was
\documentclass{article}
\usepackage[T1]{fontenc}
\newenvironment{oops}{\fontsize{9.8pt}{11.4pt}\selectfont}{}
\begin{document}
\parbox[t]{3cm}{
Some German text
Some German text
Some german text with \"U and g
Some German text
Some German text
Some German text with g
Some german text with \"U and g
}
\quad
\parbox[t]{3cm}{
Some German text
Some German text
Some german text with \"U and g
Some German text
Some German text
Some German text with g
Some german text with \"U and g
\begin{oops}
\end{oops}
}
\end{document}
Here the second paragraph is using normal size text but does not end until inside the oops
enviornment at which point \baselineskip
is too small.
The solution is to make sure the paragraph ends before the size change, either by putting \par
before it in the definition or (better in your real case) changing the font in the \list
setup so the \list
handler can take control of he paragraph end.
Best Answer
Just patch
\verbatim@font
or (even safer)\verbatim
macro to add your code before verbatim blocks.Alternatively, if you use
fancyvrb
package for verbatim, you could use\fvset
to setformatcom
option for allVerbatim
(notverbatim
) environments: