[OS X TeX] Listing indentation

Alan Munn amunn at gmx.com
Sat Nov 13 20:36:25 EST 2010


On Nov 13, 2010, at 8:15 PM, David Arnold wrote:

> All,
>
> See attached:
>
> In this frame, I'm trying to get the listings package to respect the  
> indenting I want:
>
> \begin{lstlisting}[escapeinside=!~]
> \begin{tikzpicture}
> \draw[help lines] (-5,-5) grid (5,5);
> \draw[thick,<->] (-5,0) -- (5,0) node[right] {$x$};
> \draw[thick,<->] (0,-5) -- (0,5) node[above] {$y$};
> \begin{scope}
> 	\clip (-5,-5) rectangle (5,5);
> 	\draw [thick,blue] plot (\x,{\x*(\x+2)*(\x-2)});
> \end{scope}
> \end{tikzpicture}
> \end{lstlisting}
>
> However, everything comes out justified against the left margin.  
> Anyone know how I can get those two lines to indent?

Use spaces instead of a tab.

Alan

-- 
Alan Munn
amunn at gmx.com







More information about the MacOSX-TeX mailing list