On 06/17/2018 07:52 PM, Thomas A. Schmitz wrote:
Hi,
I have a conceptual problem integrating btx into my xml workflow. There are too many files involved, so no minimal example, but a minimal description. Root of my xml document:
<document language="en"> ... </document>
I have two files with btx definitions:
publ-imp-deutsch.mkvi publ-imp-english.mkvi
Loading one of these two should depend on the main language:
\doifelse {\currentlanguage} {en} {\usebtxdefinitions [english]} {\usebtxdefinitions [deutsch]}
My problem: the main language is set within the processing rules for the root of my xml document:
\startxmlsetups xml:document \mainlanguage[\xmlatt{#1}{language}] \stopxmlsetups
Hi Thomas, this may work in your case: \startxmlsetups xml:document \mainlanguage[\xmlatt{#1}{language}] \doifmodeelse{**en} {\usebtxdefinitions [english]} {\usebtxdefinitions [deutsch]} \stopxmlsetups I have just checked in with another document and it worked as expected. Of course, "\doifelse{\currentmainlanguage}{en}" also works fine for me. I hope it helps, Pablo -- http://www.ousia.tk