[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gnumed-devel] Latex failure
From: |
Karsten Hilbert |
Subject: |
Re: [Gnumed-devel] Latex failure |
Date: |
Thu, 29 Nov 2012 23:51:44 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Thu, Nov 29, 2012 at 06:41:47PM +0000, Vaibhav Banait wrote:
> it is blackslash in subjective field \ that has resulted
> in failed pdf generation. I removed it from temp\gnumed tex
> file and i could generate the pdf. No doubt about the
> problem. I would send the tex file once i could get it on
> internet
Well, you found a bug of sorts :-)
> {\small S} & {\small Follow up. Stool frequency 2/day. No blood. Abdominal
> discomfort+, Fever + mild. Received crocin$\backslash$O2 with relief}
> \tabularnewline
What GNUmed does (did) is replace a literal "\" with the
string "$\backslash$". "\backslash" is one way to say "print
a \ here" in LaTeX. This command, however, only works in
what's called Math Mode -- which is started and ended by "$"
(which, in turn, is why "$" itself is a special LaTeX
character and needs escaping if needed literally).
While GNUmed properly inserts "$\backslash$" still *another*
layer goes over the content _again_ trying to escape special
LaTeX chars inside data. This double-escaping is what's
causing the trouble - it escapes the "$"s into "\$"s
effectively disabling them from starting/ending Math Mode.
I will investigate where the double-escape comes from tomorrow.
The current GNUmed code uses a better method for escaping
which does not rely on Math Mode anymore. I'll backport that
to 1.2 as well.
Cheers,
Karsten
--
GPG key ID E4071346 @ gpg-keyserver.de
E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346
- Re: [Gnumed-devel] Latex failure,
Karsten Hilbert <=