[OS X TeX] Beginner problem with lstlisting

Bruno Voisin bvoisin at mac.com
Wed Feb 16 11:42:04 EST 2005


Le 16 févr. 05, à 17:25, Doug Fields a écrit :

> I apologize for posting such a beginner problem, as I'm just learning.  
> I managed to get a simple hello world working with latex and the DVI  
> to PDF conversion tools (command line) happily, but then following a  
> setup tutorial here:
>
> http://www.cs.wright.edu/~jslater/mac-tex/mac-tex-intro/ 
> mactexintro.html
>
> I was unable to get the more complicated example to work due to an  
> error with the initial line:
>
> \begin{lstlisting}

I don't think this line is significant. Looking at the source (the HTML  
code) for this web page, it seems to have been generated automatically  
from a LaTeX file using TeX4ht:

<meta name="generator" content="TeX4ht  
(http://www.cis.ohio-state.edu/~gurari/TeX4ht/mn.html)">
<meta name="originator" content="TeX4ht  
(http://www.cis.ohio-state.edu/~gurari/TeX4ht/mn.html)">

It seems something went wrong during the conversion process, generating  
the two lines:

\begin{lstlisting}
\end{lstlisting}

which shouldn't really be there (a LaTeX document should begin with  
\documentclass). This is at least the impression I get from looking at  
the HTML source for the example document:

<table width="100%"
class="verbatim"><tr class="verbatim"><td
class="verbatim"><div class="verbatim">
\begin{lstlisting}
 <br />\documentclass{article}
 <br />\author{me}
 <br />\date{\today}
 <br />\title{My First Document}
 <br />
 <br />\begin{document}
[...]
 <br />\end{document}
 <br />\end{lstlisting}
 <br />
</div>
</td></tr></table>

Hope this helps,

Bruno Voisin
--------------------- Info ---------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
           & FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Post: <mailto:MacOSX-TeX at email.esm.psu.edu>





More information about the MacOSX-TeX mailing list