Hi,
A while ago there was some demand for language support in tagging and
export (which already has some).
One approach is to do it automatically, so
test {\nl test} test
would then be split in pieces but also error prone and maybe
non-intentional. But then one can actually wonder about structure there
anywaym so this makes more sense:
\definehighlight[isdutch] [language=nl,color=darkred]
\definehighlight[isgerman] [language=de,color=darkblue]
\definestartstop[someczech] [language=cz,color=darkgreen]
\definestartstop[somefrench][language=fr,color=darkyellow]
% pablo will check the other languages and also the
% kind of language tags we want to end up in the pdf
% as he will check how viewers 'speak' - yesterday i
% suddenly got some english youtube video where the
% normally low pitch male voice (that i knew) became
% high pitch female dutch for no reason ... and i
% never asked for that ... so I fear future pdf
% viewers
test \isdutch {test} test
test \isgerman {test} test
test \someczech {test} test
test \somefrench{test} test
so that is what i added. Now, the question is, what commands
(environments) need support for the language key; we have some 70
potential places and 270 possible edits .. oneliners, but kind of boring
as we need to expliclty check where it kicks in (probably needs some
distracting music on the speaker to get it done)
Concerning impact on performance, I tested with 10000 * 2 of the above
highlights and got this:
% 20K no support : 2.52
% 20K language not set : 2.55
% 20K language set : 3.12 % needs to be compensated
so we loose some performance which means i have to gain in back
someplace else (kind of regular challenge when adding something)
so, the question is 'selective' or 'everywhere'
(this is independent of tagging etc ... assuming some structure it's
trivial to add there; a general {\nl test} is more tricky as then we
need to do more consistency testing, which i got kind of working and
then removed again because in the end we then reward sloppy code which
is bad and we should stay away from that)
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : ntg-context@ntg.nl /
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___________________________________________________________________________________