On Tue, 14 Apr 2009, Guenter Milde wrote:

> On 2009-04-11, Jeremy C. Reed wrote:
> 
> > Or is there a way to tell TeX to use a proportional typeface but force it 
> > to use a fixed width so it will line up?
> 
> The listings package has such an option. (Read its documentation.)

Thank you. I now scanned through the entire "The Listings Package" 
documentation. This appears to work for me. The default is to use the 
already defined font.

So I have:

\usepackage{listings}
\lstset{
        columns=fixed
}

(I am not sure what the default is for columns, and didn't test others.)

But now document (the final PDF) has:
11Command invalid in math modeCommand invalid in math mode

Doesn't say what command. And nothing about this in my my latex logging.

I can reproduce this when I have two listlisting blocks that define a 
custom basicstyle. So my workaround is to simply change one of them to:

\begin{lstlisting}{basicstyle=\footnotesize}
to:
\begin{lstlisting}

But I need to reduce the size so a line doesn't wrap. Unless I can figure 
out how to increase the margin or get the text to not wrap.

Any thoughts on how to turn off any math mode or other?

Thanks again for pointing me to use listings package. Now the font looks 
correct and is still spaced accordingly.


  Jeremy C. Reed

echo 'EhZ[h ^jjf0%%h[[Zc[Z_W$d[j%Xeeai%ZW[ced#]dk#f[d]k_d%' | \
  tr            '#-~'            '\-.-{'

Reply via email to