[Therion] FW: 2D output header title when therion can't decide which one to use
Martin Budaj
m.budaj at gmail.com
Sun Feb 14 11:36:39 CET 2010
Hi Bruce,
if you run therion in debug mode (command line -d option) you will get
thTMPDIR/th_texts.tex file where \cavename is defined.
I suspect that it would be really empty in your case. If I remember
correctly, the reason why you can't redefine an empty \cavename is
that macro \legendcontent (which is responsible for displaying the
texts in the map header) tests if \cavename is empty before you assign
some text into \cavename and is set up to display nothing, regardless
of whether \cavename is later empty or not.
I think it would be sufficient to change these lines in \legendcontent
definition
\edef\tmp{\the\cavename} \ifx\tmp\empty \else
{\the\legendtextheadersize\the\cavename}\vskip1cm
\fi
to
\edef\tmp{\the\cavename} \ifx\tmp\empty{\the\legendtextheadersize
Your cave name}\vskip1cm\else
{\the\legendtextheadersize\the\cavename}\vskip1cm
\fi
Please test if it would work.
Martin
On Sun, Feb 14, 2010 at 12:57 AM, Bruce <dangle at tomo.co.nz> wrote:
> I have figured out by trial and error that if Therion cannot determine a
> unique map output title, it assigns a value of ‘sort of empty but not quite
> empty’ to \cavename.
>
> What ever that value is, it looks like a space character, ie blank but with
> a height that equals a typical text line height.
>
> It’s not one space, not two spaces, not an empty string, and I can see I
> could end up testing a lot of non printing characters before I find it.
>
>
>
> Maybe the programmer can remember what the magic value is, or someone with
> better tex skills (than my almost non-existent tex skills) can offer some
> code to identify the contents of a string variable, ie it’s length or much
> better a list of ascii codes?
>
>
>
> code tex-map
>
> \edef\therioninferedmaptitle{\the\cavename} %save existing calculated
> cavename to variable
>
> %could put some code here to output the ascii codes
> contained in \cavename
>
> \edef\nostring{ } %save ‘empty string’ to variable
>
> \ifx\therioninferedmaptitle\nostring %test if
> therioninferedmaptitle matches empty string
>
> \cavename={Caves of the Flora
> Area} %if therioninferedmaptitle is empty do this
>
> \else
>
> %if it's not empty, do nothing, ie keep the value set by therion
>
> \fi
>
> endcode
>
>
>
> ;- )
>
>
>
> Bruce
>
> _______________________________________________
> Therion mailing list
> Therion at speleo.sk
> http://mailman.speleo.sk/mailman/listinfo/therion
>
>
More information about the Therion
mailing list