From: "David Allsopp" <dra-news@metastack.com>
To: <caml-list@inria.fr>
Subject: RE: [Caml-list] ocamldoc-latex error
Date: Sun, 1 Jun 2008 10:46:09 +0100 [thread overview]
Message-ID: <B472621AA2794D32BD41ED8E6835588A@countertenor> (raw)
In-Reply-To: <4841A6FF.6050203@gushee.net>
> I just compiled Camomile 0.7.1, and generated the latex documentation
> with 'make doclatex'. Much to my surprise, when I attempt to process the
> LaTeX file with either the 'latex' or 'pdflatex' program, I get the
> following error:
>
> ! You can't use `macro parameter character #' in horizontal mode.
> <argument> ...n Unicode Technical Report \verb `##
> `21
> l.9 ...ned in Unicode Technical Report \verb`#`21}
This is not a TeX bug, as you correctly surmised...
> I am using TeXLive 2007.2 ... given the caution with which TeX is
> developed, it's hard to believe this is a bug in the TeX distribution.
> On the other hand, it's hard to believe that OCamlDoc is generating
> incorrect LaTeX code. Maybe some misconfiguration in my TeX
> installation? Any hints appreciated.
>
> BTW, if I edit the generated LaTeX file, replacing every instance of
> \verb`#` with \#{}, it runs fine.
ocamldoc should be doing this -- the \catcode value for # is 6 (The TeXbook,
pp. 37, 343) which means that it cannot be used as a basic character. Note
that # only needs to be written \# -- the braces are unnecessary as \# is a
parameter-less macro (in fact, it's a \chardef). From what I can see, the
bug is on line 89 of ocamldoc/odoc_latex.ml. Without seeing the faulty TeX
file, I can't confirm it for certain, but I would imagine that the problem
is that \verb is being used inside a \def or \newcommand which won't work
without a lot of (unnecessary) \catcode trickery surrounding the macro
definition. You could possibly say that it's a bug in LaTeX because \verb
should really be declared \outer in the LaTeX sources but that's a bit
off-topic for this list...
David
prev parent reply other threads:[~2008-06-01 9:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-31 19:29 Matt Gushee
2008-06-01 9:46 ` David Allsopp [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=B472621AA2794D32BD41ED8E6835588A@countertenor \
--to=dra-news@metastack.com \
--cc=caml-list@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox