gnumed-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnumed-devel] placeholders in latex


From: Karsten Hilbert
Subject: Re: [Gnumed-devel] placeholders in latex
Date: Tue, 3 Jan 2012 23:10:33 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

On Sun, Jan 01, 2012 at 11:01:31PM +0000, Jim Busser wrote:

> >>    form_name
> >> 
> >>    (maybe also form_version ?)
> > 
> > The placeholder handler does not have that information. In
> > fact, it does not even know it is replacing placeholders
> > inside a form (rather than in something else).
> 
> Can you think of a manageable way of getting, outputted to LaTex, the name of 
> the form associated with the template that was selected in writing a letter?

It needed inventing "injectable" placeholder the values of
which would be injected into the placeholder replacement
data source at appropriate times (and removed again later).

The list of valid injectables is in gmMacro.py, as with
other types of placeholders. The syntax is "name::::max length".

Instances of the cLatexForm class now inject
"form_name_long", "form_name_short", and "form_version" into
the placehoder data source just before placeholder
substitution. This also required passing the cFormTemplate
instance to the actual form instance from which it was
created such that the instance knows its template (and can
thus query it for the name/version information). Other
cFormEngines can do so as well as needed.

Done in git head.

Karsten
-- 
GPG key ID E4071346 @ gpg-keyserver.de
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346



reply via email to

[Prev in Thread] Current Thread [Next in Thread]