I have also handled French/English maps by writing duplicate tex-map blocks of 
code, then toggling with two small changes.

  # language en_UK
  # copy LayoutExperimentalHeaderPlan 
  language fr
  copy LayoutExperimentalHeaderPlan-fr

I imagine that what you are doing is similar.  The user impact is OK, but I 
dislike this approach as it is wasteful writing and maintaining nearly 
identical blocks of code (especially for three or more languages).  Mistakes 
and getting them out of sync is inevitable.
I would really like to have access to a tex 'language variable' in the manner 
you describe.

Bruce


-----Original Message-----
From: Therion [mailto:[email protected]] On Behalf Of Xavier Robert via 
Therion
Sent: Friday, 29 September 2017 11:56 AM
To: Therion <[email protected]>
Cc: Xavier Robert <[email protected]>
Subject: [Therion] Tex and language ?

Hi all,

I am currently working on maps that can be in french or in spanish.

The thing is that I wrote some tex macros to add items in the header, like « 
Synthèse : X Y ». Inside a code tex-map/endcode block, I define the term « 
synthèse » as : \newtoks\thsynth \thsynth={Synthèse }. This is the french word. 
All my macros are in a config file placed in a parent folder.

In that case, each time I change the language to spanish with the therion « 
language es » command that I use in my thconfig files, I also need to change 
the definition of \thsynth in my code tex-map/endcode block to \newtoks\thsynth 
\thsynth={Síntesis}.

Is there a way to add a condition on the language in the code tex-map/endcode 
block to avoid changing manually the config file? 

In fact, I am looking for something like:
code tex-map
        \if {language variable = es} \newtoks\thsynth \thsynth={Síntesis} 
        \elsif {language variable = fr} \newtoks\thsynth \thsynth={Synthèse }
        \else \newtoks\thsynth \thsynth={Synthesys}
        \fi     
endcode

Thanks a lot for you lights,
Cheers,

Xavier


_______________________________________________
Therion mailing list
[email protected]
https://mailman.speleo.sk/listinfo/therion

_______________________________________________
Therion mailing list
[email protected]
https://mailman.speleo.sk/listinfo/therion

Reply via email to