[kramdown-users] German LaTeX output

Thomas Leitner t_leitner at gmx.at
Sat Jul 17 03:59:14 EDT 2010

On 2010-06-21 19:22 +0200 Michael Franzl wrote:
> Thomas Leitner wrote:
> > Just copy the included `document.latex` template from the
> > `data/kramdown` directory of the kramdown distribution to a new
> > file in your local directory and change it to fit your needs, ie.
> > include the above line! Then you can use the `template` option to
> > use your modified template.
> Thank you for the hint!
> > Hmm... this is currently hard-coded. I assume that there are rules
> > for each language, not only English and German, on how the quotes
> > should be transformed?! If that is the case, the easiest way would
> > probably be to add a new option `latex_quotes` which specifies how
> > opening/closing double and single quotes are transformed - would
> > this fit your needs?
> Yes. Only as long as it is generally useful also for others. In 
> France/Switzerland they might need guillements instead of quotation 
> marks. Here are a few infos:
> http://en.wikibooks.org/wiki/LaTeX/Internationalization
> Right now I have to do the following to be able to print correct 
> German punctuation:
>      sed -i 's|``|"`|g' file.tex
>      sed -i "s|''|\"'|g" file.tex
>      perl -i -pe "s|([^\"])\`(.*?)\'|\1\\\glq{}\2\\\grq{}|g" file.tex
> So it can be done also without kramdown, but I try to make it as 
> 'beautiful' and straightforward as possible. Don't know if that is 
> worth implementing though.

Added some information on the LaTeX documentation page on how this can
be done with Ruby by setting some hash values. The changes will appear
online when the 0.10.0 version is released.

I have added a TODO item nonetheless since there is a problem in the
described approach when using kramdown not as standalone utility but
inside another application like radiant because the values are
overwritten on a global level.

-- Thomas

More information about the kramdown-users mailing list