Re: django templates and tex/latex
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
iEYEARECAAYFAlFAq7wACgkQ12ptzpkpIltdngCfamqCc+lvINJv1WYfQOwduejS
Nr0AoJw+xuONwjt90OPsJdCp6HtTQLhM
=X9HL
-----END PGP SIGNATURE-----
On Wed, 13 Mar 2013 07:01:45 -0700 (PDT)
Ken <teh@anl.gov> wrote:
> I would like to write a tex/latex file with django tags in it. Load it
> with the template loader and render it with a context. The problem is
> that my tex/latex file has quite a few '{%' in them. They are
> conventional in TeX for writing readable macros and are used to escape
> the newline. I could try rewriting them but before I do, I thought I'd
> ask if this is even worth tackling. TeX uses curly braces as grouping
> and percent signs as a comment.
>
> The TeX file would look rather confusing but the more important question
> is what the loader does when it sees braces and brace comments. Is it
> possible to reassign the block and variable tags?
>
> Thanks
>
>
I have done this in the past (with Plone rather than django) by calling a
python wrapper script to generate a file which latex can process;
essentially construct the Latex source as python strings
and have the script assemble the components you want. The objective was to
generate a PDF file by Latex with variables fed from SQL & a web page. But
this may not be what you are interested in.
Are you trying to render a Latex source document as a web page?
--
Drew

0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home