Re: [NTG-context] Strange behaviour of TABLE with \currentTABLErow
Tomas Hala schrieb am 03.12.18 um 20:23: Hi all, at https://wiki.contextgarden.net/Command/currentTABLEcolumn I learnt about \currentTABLErow etc. for counting lines in natural tables. I have got the following two minimal non-working examples (on TeXlive 2018): \starttext\setupTABLE[split=yes] \bTABLE \bTABLEhead\bTR\bTH head \eTH\eTR\eTABLEhead \bTABLEbody \dorecurse{100}{\bTR\bTD \currentTABLErow xxx \eTD\eTR} \eTABLEbody \eTABLE \stoptext In this case, the head-line is alse counted which makes no sense and I do not know how to supress it. Even though this is not what you expect it makes sense because when ConTeXt creates the table the whole thing is only one huge part which the headers for the first and the following pages on top and the footer on the bottom. The number of rows is now determined by the number of all rows (including header and footer) and the counting starts also from the first row in the table independent of the type of the row. What you want is a counter which removes the header row from the value but to keep backwards compatibility this has to be a new command, e.g. \currentTABLEbodyrow If I add \bTABLEnext (below), I receive very strange result -- both heads are at the beginning of the table and both counted. Moreover, the "next" head is not used on the following pages. \starttext\setupTABLE[split=yes] \bTABLE \bTABLEhead\bTR\bTH head \eTH\eTR\eTABLEhead \bTABLEnext\bTR\bTH next head \eTH\eTR\eTABLEnext \bTABLEbody \dorecurse{100}{\bTR\bTD \currentTABLErow xxx \eTD\eTR} \eTABLEbody \eTABLE \stoptext I tried \TC and \TD instead of \TH, also without success. What I am doing wrong? You need split=repeat. The normal command to create a cell is \bTD, the \bTH command is usefull for the header because it changes the font style to bold and it also disables the character alignment for the current cell. Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Font fallback
> On 3 Dec 2018, at 19:35, Wolfgang Schuster > wrote: > > Hans Åberg schrieb am 03.12.18 um 19:22: >> I can't get create a font fallback in the the example below, so some input >> is welcome. It works when using STIX2 only (the commented out part), but >> somehow the font name is not recognized in the fallback, not when using what >> is listed by 'mtxrun --script fonts --list --all'. >> — >> \definefontfamily[stix-two][mono][Stix Two Text] >> \definefontfamily[stix-two][math][Stix Two Math] >> %\setupbodyfont[stix-two,10pt] >> \definefallbackfamily [mainface] [rm] [Stix Two Text] [range={02070,0208F}] >> \definefallbackfamily [mainface] [serif] [Stix Two Text] >> [range={02070,0208F}] > > 1. You’re creating the same fallback two times because rm=serif. Thanks, I was sort of aware of that, but expected at least one to be valid. :-) > > 2. To pass a range use “-” as separator. > > \definefallbackfamily [mainface] [serif] [Stix Two Text] [range={02070-0208F}] This was the issue. It works now. >> \definefallbackfamily [mainface] [mono] [Stix Two Text] [range={02070,0208F}] >> \definefallbackfamily [mainface] [math] [Stix Two Math] [range={02070,0208F}] >> \definefontfamily [mainface] [rm] [stix] >> \definefontfamily [mainface] [math] [stix] >> \definefontfamily [mainface] [mono] [stix] > > Do you have the Stix font on your system? Yes, both are in TeX Live 2018, but I have them on the system as well, and the mtxrun command above lists them. > On my system this isn’t the case but I can use the XITS fonts. > > \definefontfamily [mainface] [serif] [XITS] > \definefontfamily [mainface] [math] [XITS Math] Is XITS still needed? It had some adaptations I think for OTF, but STIX has been developed since. ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Interlinear translations in Context
Huseyin Özoguz schrieb am 03.12.18 um 20:45: Probably something with your font/alignment switching. Yes, probably, but this switching is necessary, look at your example: It gives wrong aligning of the arabic letters (left to right instead of right to left), so at some point one has to inject a \setupalign[r2l], but all my tries only gave this one as a correct result: \define[2]\InterlinearText {\setupalign[r2l]\definedfont[file:arial*arabic at 16 pt] \ruby{{\setupalign[r2l]#1}}{\setupalign[l2r]\definedfont[name:arial at 10pt]#2}} \defineruby [interlineartext] [style=\lefttoright\txx] \define[2]\InterlinearText {\ruby[interlineartext]{#1}{#2} } But that as mentioned looses all other databse entries except the first. Some hints where to make the r2l-switch with getting the same result? \starttext \setupalign[r2l] \processdatabasebuffer[interlineartext][sample] \stoptext or when you want to change the alignment only for a part of your document \starttext \startalignment[r2l] \processdatabasebuffer[interlineartext][sample] \stopalignment \stoptext There is no command which changes the order of words in a sentence but this should be easy with a short Lua function. Thank you, if some day one is available, I will use it. Or wil learn Lua, right, should be a very basic function to implement. You can find many Lua examples for this online. Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Interlinear translations in Context
Probably something with your font/alignment switching. Yes, probably, but this switching is necessary, look at your example: It gives wrong aligning of the arabic letters (left to right instead of right to left), so at some point one has to inject a \setupalign[r2l], but all my tries only gave this one as a correct result: \define[2]\InterlinearText {\setupalign[r2l]\definedfont[file:arial*arabic at 16 pt] \ruby{{\setupalign[r2l]#1}}{\setupalign[l2r]\definedfont[name:arial at 10pt]#2}} But that as mentioned looses all other databse entries except the first. Some hints where to make the r2l-switch with getting the same result? There is no command which changes the order of words in a sentence but this should be easy with a short Lua function. Thank you, if some day one is available, I will use it. Or wil learn Lua, right, should be a very basic function to implement. Huseyin Özoguz E-Mail: h.oezo...@mmnetz.de Am 03.12.2018 um 18:34 schrieb Wolfgang Schuster: Huseyin Özoguz schrieb am 03.12.18 um 17:47: Before you write your own commands try to use what is available. Right, but in many cases I am just not aware of what is available, to be honest, though I quite often use the wikigarden. I tried to change your example into arabic-german, seems to work, except only the first translation-pair is shown (see attachment). Why? \usemodule [database] \startbuffer[sample] "قال","sagte (Es)" "رسول","Gesandte (der)" "الله","Gottes" \stopbuffer \define[2]\InterlinearText {\setupalign[r2l]\definedfont[file:arial*arabic at 16 pt] \ruby{{\setupalign[r2l]#1}}{\setupalign[l2r]\definedfont[name:arial at 10pt]#2}} \definedatabase [interlineartext] [quotechar={"}, command=\InterlinearText] \setupinterlinespace[line=8ex] \setupruby[voffset=-3ex] \starttext \definedfont[file:arial*arabic at 16 pt] \processdatabasebuffer[interlineartext][sample] \stoptext Probably something with your font/alignment switching. \usemodule [database] \startbuffer[sample] "قال","sagte (Es)" "رسول","Gesandte (der)" "الله","Gottes" \stopbuffer \define[2]\InterlinearText {\ruby{#1}{#2} } % \defineruby % [interlineartext] % [style=] % % \define[2]\InterlinearText % {\ruby[interlineartext]{#1}{#2} } \definedatabase [interlineartext] [quotechar={"}, command=\InterlinearText] \setupinterlinespace[line=8ex] \definefontfamily [arial] [ss] [Arial] [features=arabic] \setupbodyfont [arial,16pt] \starttext \processdatabasebuffer[interlineartext][sample] \stoptext And second: Of course it would be best readable, if one could write instead \startbuffer[sample] "قال","(Es) sagte" \stopbuffer but with same output, s.t. the order of the words in the second database-element is inverted. Is that possible? There is no command which changes the order of words in a sentence but this should be easy with a short Lua function. Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Strange behaviour of TABLE with \currentTABLErow
Hi all, at https://wiki.contextgarden.net/Command/currentTABLEcolumn I learnt about \currentTABLErow etc. for counting lines in natural tables. I have got the following two minimal non-working examples (on TeXlive 2018): \starttext\setupTABLE[split=yes] \bTABLE \bTABLEhead\bTR\bTH head \eTH\eTR\eTABLEhead \bTABLEbody \dorecurse{100}{\bTR\bTD \currentTABLErow xxx \eTD\eTR} \eTABLEbody \eTABLE \stoptext In this case, the head-line is alse counted which makes no sense and I do not know how to supress it. If I add \bTABLEnext (below), I receive very strange result -- both heads are at the beginning of the table and both counted. Moreover, the "next" head is not used on the following pages. \starttext\setupTABLE[split=yes] \bTABLE \bTABLEhead\bTR\bTH head \eTH\eTR\eTABLEhead \bTABLEnext\bTR\bTH next head \eTH\eTR\eTABLEnext \bTABLEbody \dorecurse{100}{\bTR\bTD \currentTABLErow xxx \eTD\eTR} \eTABLEbody \eTABLE \stoptext I tried \TC and \TD instead of \TH, also without success. What I am doing wrong? Thanks in advance for help. Best wishes, Tomáš ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Font fallback
Hans Åberg schrieb am 03.12.18 um 19:22: I can't get create a font fallback in the the example below, so some input is welcome. It works when using STIX2 only (the commented out part), but somehow the font name is not recognized in the fallback, not when using what is listed by 'mtxrun --script fonts --list --all'. — \definefontfamily[stix-two][mono][Stix Two Text] \definefontfamily[stix-two][math][Stix Two Math] %\setupbodyfont[stix-two,10pt] \definefallbackfamily [mainface] [rm] [Stix Two Text] [range={02070,0208F}] \definefallbackfamily [mainface] [serif] [Stix Two Text] [range={02070,0208F}] 1. You’re creating the same fallback two times because rm=serif. 2. To pass a range use “-” as separator. \definefallbackfamily [mainface] [serif] [Stix Two Text] [range={02070-0208F}] \definefallbackfamily [mainface] [mono] [Stix Two Text] [range={02070,0208F}] \definefallbackfamily [mainface] [math] [Stix Two Math] [range={02070,0208F}] \definefontfamily [mainface] [rm] [stix] \definefontfamily [mainface] [math] [stix] \definefontfamily [mainface] [mono] [stix] Do you have the Stix font on your system? On my system this isn’t the case but I can use the XITS fonts. \definefontfamily [mainface] [serif] [XITS] \definefontfamily [mainface] [math] [XITS Math] Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Font fallback
I can't get create a font fallback in the the example below, so some input is welcome. It works when using STIX2 only (the commented out part), but somehow the font name is not recognized in the fallback, not when using what is listed by 'mtxrun --script fonts --list --all'. — \definefontfamily[stix-two][mono][Stix Two Text] \definefontfamily[stix-two][math][Stix Two Math] %\setupbodyfont[stix-two,10pt] \definefallbackfamily [mainface] [rm] [Stix Two Text] [range={02070,0208F}] \definefallbackfamily [mainface] [serif] [Stix Two Text] [range={02070,0208F}] \definefallbackfamily [mainface] [mono] [Stix Two Text] [range={02070,0208F}] \definefallbackfamily [mainface] [math] [Stix Two Math] [range={02070,0208F}] \definefontfamily [mainface] [rm] [stix] \definefontfamily [mainface] [math] [stix] \definefontfamily [mainface] [mono] [stix] \setupbodyfont[mainface] \starttext \startformula \startalign \NC 𝑨₀ 0 ₁ 1 ₂ 2 ₃ 3 ₄ 4 ₅ 5 ₆ 6 ₇ 7 ₈ 8 ₉ 9 ₊ + ₋ - ₌ = ₍ ( ₎ )\NR \NC 𝑩⁰ 0 ¹ 1 ² 2 ³ 3 ⁴ 4 ⁵ 5 ⁶ 6 ⁷ 7 ⁸ 8 ⁹ 9 ⁺ + ⁻ - ⁼ = ⁽ ( ⁾ )\NR \stopalign \stopformula \starttyping 𝑨₀ 0 ₁ 1 ₂ 2 ₃ 3 ₄ 4 ₅ 5 ₆ 6 ₇ 7 ₈ 8 ₉ 9 ₊ + ₋ - ₌ = ₍ ( ₎ ) 𝑩⁰ 0 ¹ 1 ² 2 ³ 3 ⁴ 4 ⁵ 5 ⁶ 6 ⁷ 7 ⁸ 8 ⁹ 9 ⁺ + ⁻ - ⁼ = ⁽ ( ⁾ ) \stoptyping 𝑨₀ 0 ₁ 1 ₂ 2 ₃ 3 ₄ 4 ₅ 5 ₆ 6 ₇ 7 ₈ 8 ₉ 9 ₊ + ₋ - ₌ = ₍ ( ₎ ) 𝑩⁰ 0 ¹ 1 ² 2 ³ 3 ⁴ 4 ⁵ 5 ⁶ 6 ⁷ 7 ⁸ 8 ⁹ 9 ⁺ + ⁻ - ⁼ = ⁽ ( ⁾ ) \stoptext — ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Interlinear translations in Context
Huseyin Özoguz schrieb am 03.12.18 um 17:47: Before you write your own commands try to use what is available. Right, but in many cases I am just not aware of what is available, to be honest, though I quite often use the wikigarden. I tried to change your example into arabic-german, seems to work, except only the first translation-pair is shown (see attachment). Why? \usemodule [database] \startbuffer[sample] "قال","sagte (Es)" "رسول","Gesandte (der)" "الله","Gottes" \stopbuffer \define[2]\InterlinearText {\setupalign[r2l]\definedfont[file:arial*arabic at 16 pt] \ruby{{\setupalign[r2l]#1}}{\setupalign[l2r]\definedfont[name:arial at 10pt]#2}} \definedatabase [interlineartext] [quotechar={"}, command=\InterlinearText] \setupinterlinespace[line=8ex] \setupruby[voffset=-3ex] \starttext \definedfont[file:arial*arabic at 16 pt] \processdatabasebuffer[interlineartext][sample] \stoptext Probably something with your font/alignment switching. \usemodule [database] \startbuffer[sample] "قال","sagte (Es)" "رسول","Gesandte (der)" "الله","Gottes" \stopbuffer \define[2]\InterlinearText {\ruby{#1}{#2} } % \defineruby % [interlineartext] % [style=] % % \define[2]\InterlinearText % {\ruby[interlineartext]{#1}{#2} } \definedatabase [interlineartext] [quotechar={"}, command=\InterlinearText] \setupinterlinespace[line=8ex] \definefontfamily [arial] [ss] [Arial] [features=arabic] \setupbodyfont [arial,16pt] \starttext \processdatabasebuffer[interlineartext][sample] \stoptext And second: Of course it would be best readable, if one could write instead \startbuffer[sample] "قال","(Es) sagte" \stopbuffer but with same output, s.t. the order of the words in the second database-element is inverted. Is that possible? There is no command which changes the order of words in a sentence but this should be easy with a short Lua function. Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Interlinear translations in Context
Before you write your own commands try to use what is available. Right, but in many cases I am just not aware of what is available, to be honest, though I quite often use the wikigarden. I tried to change your example into arabic-german, seems to work, except only the first translation-pair is shown (see attachment). Why? \usemodule [database] \startbuffer[sample] "قال","sagte (Es)" "رسول","Gesandte (der)" "الله","Gottes" \stopbuffer \define[2]\InterlinearText {\setupalign[r2l]\definedfont[file:arial*arabic at 16 pt] \ruby{{\setupalign[r2l]#1}}{\setupalign[l2r]\definedfont[name:arial at 10pt]#2}} \definedatabase [interlineartext] [quotechar={"}, command=\InterlinearText] \setupinterlinespace[line=8ex] \setupruby[voffset=-3ex] \starttext \definedfont[file:arial*arabic at 16 pt] \processdatabasebuffer[interlineartext][sample] \stoptext And second: Of course it would be best readable, if one could write instead \startbuffer[sample] "قال","(Es) sagte" \stopbuffer but with same output, s.t. the order of the words in the second database-element is inverted. Is that possible? Huseyin Özoguz E-Mail: h.oezo...@mmnetz.de Am 03.12.2018 um 13:36 schrieb Wolfgang Schuster: Huseyin Özoguz schrieb am 03.12.18 um 12:51: Thanks and I may have questions to the actual question about interlinear typesetting later, will try to define some nice macros with arabic-german interlinear texts. Before you write your own commands try to use what is available. If there is something missing existing commands can be extended and Hans is in many cases open to add new function to ConTeXt. \usemodule [database] % Source for the sample text: % https://interlinearbooks.com/blog/german-interlinear-translation-of-franz-kafkas-the-metamorphosis-released/ \startbuffer[sample] "Als","As" "Gregor","Gregor" "Samsa","Samsa" "eines","one" "Morgens","morning" "aus","from" "unruhigen","uneasy" "Träumen","dreams" "erwachte,","woke up," "fand","found" "er","he" "sich","himself" "in","in" "seinem","his" "Bett","bed" "zu","in" "einem","an" "ungeheuren","enormous" "Ungeziefer","kind of monstrous vermin" "verwandelt.","transformed." \stopbuffer \define[2]\InterlinearText {\ruby{#1}{#2} } \definedatabase [interlineartext] [quotechar={"}, command=\InterlinearText] \setupinterlinespace[line=6ex] \setupruby[voffset=-2.5ex] \starttext \processdatabasebuffer[interlineartext][sample] \stoptext Wolfgang main.pdf Description: Adobe PDF document ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Interlinear translations in Context
Floris van Manen schrieb am 03.12.18 um 14:59: where can i find the description and features of the \ruby and \defineruby commands? For a list with all keys/values look into setup-en.pdf. Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Interlinear translations in Context
where can i find the description and features of the \ruby and \defineruby commands? .F > On 3 Dec 2018, at 13:36, Wolfgang Schuster > wrote: > > > > Huseyin Özoguz schrieb am 03.12.18 um 12:51: >> Thanks and I may have questions to the actual question about interlinear >> typesetting later, will try to define some nice macros with arabic-german >> interlinear texts. > > Before you write your own commands try to use what is available. > > If there is something missing existing commands can be extended > and Hans is in many cases open to add new function to ConTeXt. > > \usemodule [database] > > % Source for the sample text: > % > https://interlinearbooks.com/blog/german-interlinear-translation-of-franz-kafkas-the-metamorphosis-released/ > > \startbuffer[sample] > "Als","As" > "Gregor","Gregor" > "Samsa","Samsa" > "eines","one" > "Morgens","morning" > "aus","from" > "unruhigen","uneasy" > "Träumen","dreams" > "erwachte,","woke up," > "fand","found" > "er","he" > "sich","himself" > "in","in" > "seinem","his" > "Bett","bed" > "zu","in" > "einem","an" > "ungeheuren","enormous" > "Ungeziefer","kind of monstrous vermin" > "verwandelt.","transformed." > \stopbuffer > > \define[2]\InterlinearText > {\ruby{#1}{#2} } > > \definedatabase > [interlineartext] > [quotechar={"}, > command=\InterlinearText] > > \setupinterlinespace[line=6ex] > > \setupruby[voffset=-2.5ex] > > \starttext > \processdatabasebuffer[interlineartext][sample] > \stoptext > > Wolfgang > > ___ > If your question is of interest to others as well, please add an entry to the > Wiki! > > maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : http://contextgarden.net > ___ signature.asc Description: Message signed with OpenPGP using GPGMail ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Interlinear translations in Context
Huseyin Özoguz schrieb am 03.12.18 um 12:51: Thanks and I may have questions to the actual question about interlinear typesetting later, will try to define some nice macros with arabic-german interlinear texts. Before you write your own commands try to use what is available. If there is something missing existing commands can be extended and Hans is in many cases open to add new function to ConTeXt. \usemodule [database] % Source for the sample text: % https://interlinearbooks.com/blog/german-interlinear-translation-of-franz-kafkas-the-metamorphosis-released/ \startbuffer[sample] "Als","As" "Gregor","Gregor" "Samsa","Samsa" "eines","one" "Morgens","morning" "aus","from" "unruhigen","uneasy" "Träumen","dreams" "erwachte,","woke up," "fand","found" "er","he" "sich","himself" "in","in" "seinem","his" "Bett","bed" "zu","in" "einem","an" "ungeheuren","enormous" "Ungeziefer","kind of monstrous vermin" "verwandelt.","transformed." \stopbuffer \define[2]\InterlinearText {\ruby{#1}{#2} } \definedatabase [interlineartext] [quotechar={"}, command=\InterlinearText] \setupinterlinespace[line=6ex] \setupruby[voffset=-2.5ex] \starttext \processdatabasebuffer[interlineartext][sample] \stoptext Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Interlinear translations in Context
there is no need to kill sumatra, just add --autopdf to the context call also --synctex is replaced by Thank you, perfect maybe this works out ok: mtxrun --tree=c:/data/mytex --script context --autopdf .. I does indeed. Thanks. Huseyin Özoguz E-Mail: h.oezo...@mmnetz.de Am 03.12.2018 um 13:24 schrieb Hans Hagen: On 12/3/2018 12:51 PM, Huseyin Özoguz wrote: Thank you, I will investigate it, seems to be a pretty powerful mechanism. First it failed to compile (with Context version from 2015, did not know \defineruby), but with the most recent beta it does well. So a small btw-question, I compile out of notepad++ (windows 7, 64 bit) with this code: cd $(CURRENT_DIRECTORY) context $(CURRENT_DIRECTORY)\main.tex --synctex=1 taskkill \im SumatraPDF.exe C:\Users\Huseyin\sumatra.bat "$(CURRENT_DIRECTORY)\main.pdf" there is no need to kill sumatra, just add --autopdf to the context call also --synctex is replaced by \setupsynctex[state=start] This always uses the default context-version, which path' is saved the environment-variables of windows. How can I switch (and control) between different context-versions or pathes for compiling without changing the environment variables in Win (and after that I have to restart)? I tried to write the path directly into the command above, but did not work. maybe this works out ok: mtxrun --tree=c:/data/mytex --script context --autopdf .. Thanks and I may have questions to the actual question about interlinear typesetting later, will try to define some nice macros with arabic-german interlinear texts. - 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 / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Interlinear translations in Context
On 12/3/2018 12:51 PM, Huseyin Özoguz wrote: Thank you, I will investigate it, seems to be a pretty powerful mechanism. First it failed to compile (with Context version from 2015, did not know \defineruby), but with the most recent beta it does well. So a small btw-question, I compile out of notepad++ (windows 7, 64 bit) with this code: cd $(CURRENT_DIRECTORY) context $(CURRENT_DIRECTORY)\main.tex --synctex=1 taskkill \im SumatraPDF.exe C:\Users\Huseyin\sumatra.bat "$(CURRENT_DIRECTORY)\main.pdf" there is no need to kill sumatra, just add --autopdf to the context call also --synctex is replaced by \setupsynctex[state=start] This always uses the default context-version, which path' is saved the environment-variables of windows. How can I switch (and control) between different context-versions or pathes for compiling without changing the environment variables in Win (and after that I have to restart)? I tried to write the path directly into the command above, but did not work. maybe this works out ok: mtxrun --tree=c:/data/mytex --script context --autopdf .. Thanks and I may have questions to the actual question about interlinear typesetting later, will try to define some nice macros with arabic-german interlinear texts. - 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 / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Interlinear translations in Context
Thank you, I will investigate it, seems to be a pretty powerful mechanism. First it failed to compile (with Context version from 2015, did not know \defineruby), but with the most recent beta it does well. So a small btw-question, I compile out of notepad++ (windows 7, 64 bit) with this code: cd $(CURRENT_DIRECTORY) context $(CURRENT_DIRECTORY)\main.tex --synctex=1 taskkill \im SumatraPDF.exe C:\Users\Huseyin\sumatra.bat "$(CURRENT_DIRECTORY)\main.pdf" This always uses the default context-version, which path' is saved the environment-variables of windows. How can I switch (and control) between different context-versions or pathes for compiling without changing the environment variables in Win (and after that I have to restart)? I tried to write the path directly into the command above, but did not work. Thanks and I may have questions to the actual question about interlinear typesetting later, will try to define some nice macros with arabic-german interlinear texts. Huseyin Huseyin Özoguz E-Mail: h.oezo...@mmnetz.de Am 03.12.2018 um 11:17 schrieb Hans Hagen: On 12/3/2018 10:29 AM, Huseyin Özoguz wrote: Hello, I have now the challenge in a book to set an interlinear translation. That is two languages word-by-word (original above translation), so the sentence structure follows the originals language, like its common in many scientific bible translations. My problem: The TABLES are not suitable, because 1. I have to determine in advance, how many words are in the row, which depens obviously on the page-width and widths of the words. 2. Its not readable and well editable, because in Context (and most other languages) one has to write the table in rows and not in columns, as I need it for interlinear translations. Example: \bTABLE \bTR \bTD word 1, language 1\eTD \bTD word 2, language 1\eTD \bTD word 3, language 1\eTD \eTR \bTR \bTD word 1, language 2\eTD \bTD word 2, language 2\eTD \bTD word 3, language 2\eTD \eTR \eTABLE So I can not make this into and simple macro \interlinear{#1}{#2}, which I could use this way: \interlinear{word 1, language 1}{word 1, language 2} \interlinear{word 2, language 1}{word 2, language 2} \interlinear{word 3, language 1}{word 3, language 2} (all three blocks in the same horizontal line, if no linebreak is needed) On top of this, the language 1 (arabic) is right-to-left (so language 2 (german) must follow), it should be compatible with right-to-left reading someway. I tried with \framed, but failed, because the framed blocks are set one under the other, not side by side. How can I achieve a nice way with this simple readable macros? Processing this might give you some ideas: \usemodule[art-01]\setupbodyfont[dejavu,12pt] \defineruby[auto] [align=auto,color=darkred] \defineruby[left] [align=flushleft,color=darkred] \defineruby[right] [align=flushright,color=darkred] \defineruby[spread][stretch=yes] \showframe \showglyphs \showfontkerns \setupinterlinespace[22pt] \starttext \startbuffer \dorecurse{20}{\ruby{XYZ}{a|bc|d} }\par \dorecurse{20}{\ruby{PQR}{p|q|r} }\par \dorecurse{20}{\ruby{XYZ}{1|22|333} }\par \dorecurse{20}{\ruby{XYZ}{111|222|333} }\par \dorecurse{20}{\ruby{XYZ}{foobar} }\par \dorecurse{20}{\ruby{XYZ}{fooledbar} }\par \dorecurse{20}{\ruby[spread]{XYZ}{fooledbar} }\par \dorecurse{20}{\ruby{extremely}{wide} }\par \dorecurse{20}{\ruby{wide}{extremely} }\par stopbuffer \testfeatureonce{1}{\start \setupinterlinespace[16pt] \setupruby[location=none] \getbuffer \stop \page} \testfeatureonce{1}{\start \setupinterlinespace[16pt] \setupruby[location=right] \getbuffer \stop \page} \testfeatureonce{1}{\start \setupinterlinespace[28pt] \setupruby[align=auto,color=darkred] \getbuffer \stop \page} \testfeatureonce{1}{\start \setupinterlinespace[28pt] \setupruby[align=flushleft,color=darkgreen] \getbuffer \stop \page} \testfeatureonce{1}{\start \setupinterlinespace[28pt] \setupruby[align=flushright,color=darkblue] \getbuffer \stop \page} \testfeatureonce{1}{\start \setupinterlinespace[28pt] \setupruby[align=middle,color=darkyellow] \getbuffer \stop \page} \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Completecontent has problems with chapter, in table
Huseyin Özoguz schrieb am 03.12.18 um 10:13: You should keep a copy of your current installation for your existing books. When you use the installation from the ConTeXt garden you can have multiple installations without problems. Thank you, so thats the way to go for us. (Sorry for my late reply.) Where exactly should the image appear in the output? Originally it should on the left from the chapter-title. But meanwhile the design changed and it appears now in the center above the title, so the question dissolved (but still I dont know, how to make it safely). The best solution is to create your own layout for the chapter etc. title and pass the name of the graphic with the second argument of the \startchapter command. With this method you keep your document clean and all the magic happens in the style file. \startsetups [chapter:image] \vbox { \doifsomething{\structureuservariable{image}}{\midaligned{\externalfigure[\structureuservariable{image}]}\endgraf} \headsetupspacing \setbox\scratchbox\hbox{\headnumbercontent} \hangindent\dimexpr\wd\scratchbox+\headnumberdistance\relax \noindent \box\scratchbox\hskip\headnumberdistance \headtextcontent } \stopsetups \defineheadalternative [chapterimage] [alternative=vertical, renderingsetup=chapter:image] \setuphead [chapter] [distance=2ex, alternative=chapterimage] \setupexternalfigure [location={local,global,default}] \starttext \startchapter [title={Knuth}] \samplefile{Knuth} \stopchapter \startchapter [title={Zapf}] [image=cow] \samplefile{zapf} \stopchapter \stoptext Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Interlinear translations in Context
On 12/3/2018 10:29 AM, Huseyin Özoguz wrote: Hello, I have now the challenge in a book to set an interlinear translation. That is two languages word-by-word (original above translation), so the sentence structure follows the originals language, like its common in many scientific bible translations. My problem: The TABLES are not suitable, because 1. I have to determine in advance, how many words are in the row, which depens obviously on the page-width and widths of the words. 2. Its not readable and well editable, because in Context (and most other languages) one has to write the table in rows and not in columns, as I need it for interlinear translations. Example: \bTABLE \bTR \bTD word 1, language 1\eTD \bTD word 2, language 1\eTD \bTD word 3, language 1\eTD \eTR \bTR \bTD word 1, language 2\eTD \bTD word 2, language 2\eTD \bTD word 3, language 2\eTD \eTR \eTABLE So I can not make this into and simple macro \interlinear{#1}{#2}, which I could use this way: \interlinear{word 1, language 1}{word 1, language 2} \interlinear{word 2, language 1}{word 2, language 2} \interlinear{word 3, language 1}{word 3, language 2} (all three blocks in the same horizontal line, if no linebreak is needed) On top of this, the language 1 (arabic) is right-to-left (so language 2 (german) must follow), it should be compatible with right-to-left reading someway. I tried with \framed, but failed, because the framed blocks are set one under the other, not side by side. How can I achieve a nice way with this simple readable macros? Processing this might give you some ideas: \usemodule[art-01]\setupbodyfont[dejavu,12pt] \defineruby[auto] [align=auto,color=darkred] \defineruby[left] [align=flushleft,color=darkred] \defineruby[right] [align=flushright,color=darkred] \defineruby[spread][stretch=yes] \showframe \showglyphs \showfontkerns \setupinterlinespace[22pt] \starttext \startbuffer \dorecurse{20}{\ruby{XYZ}{a|bc|d} }\par \dorecurse{20}{\ruby{PQR}{p|q|r} }\par \dorecurse{20}{\ruby{XYZ}{1|22|333} }\par \dorecurse{20}{\ruby{XYZ}{111|222|333} }\par \dorecurse{20}{\ruby{XYZ}{foobar} }\par \dorecurse{20}{\ruby{XYZ}{fooledbar} }\par \dorecurse{20}{\ruby[spread]{XYZ}{fooledbar} }\par \dorecurse{20}{\ruby{extremely}{wide} }\par \dorecurse{20}{\ruby{wide}{extremely} }\par stopbuffer \testfeatureonce{1}{\start \setupinterlinespace[16pt] \setupruby[location=none] \getbuffer \stop \page} \testfeatureonce{1}{\start \setupinterlinespace[16pt] \setupruby[location=right] \getbuffer \stop \page} \testfeatureonce{1}{\start \setupinterlinespace[28pt] \setupruby[align=auto,color=darkred]\getbuffer \stop \page} \testfeatureonce{1}{\start \setupinterlinespace[28pt] \setupruby[align=flushleft,color=darkgreen] \getbuffer \stop \page} \testfeatureonce{1}{\start \setupinterlinespace[28pt] \setupruby[align=flushright,color=darkblue] \getbuffer \stop \page} \testfeatureonce{1}{\start \setupinterlinespace[28pt] \setupruby[align=middle,color=darkyellow] \getbuffer \stop \page} \stoptext -- - 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 / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Interlinear translations in Context
Hello, I have now the challenge in a book to set an interlinear translation. That is two languages word-by-word (original above translation), so the sentence structure follows the originals language, like its common in many scientific bible translations. My problem: The TABLES are not suitable, because 1. I have to determine in advance, how many words are in the row, which depens obviously on the page-width and widths of the words. 2. Its not readable and well editable, because in Context (and most other languages) one has to write the table in rows and not in columns, as I need it for interlinear translations. Example: \bTABLE \bTR \bTD word 1, language 1\eTD \bTD word 2, language 1\eTD \bTD word 3, language 1\eTD \eTR \bTR \bTD word 1, language 2\eTD \bTD word 2, language 2\eTD \bTD word 3, language 2\eTD \eTR \eTABLE So I can not make this into and simple macro \interlinear{#1}{#2}, which I could use this way: \interlinear{word 1, language 1}{word 1, language 2} \interlinear{word 2, language 1}{word 2, language 2} \interlinear{word 3, language 1}{word 3, language 2} (all three blocks in the same horizontal line, if no linebreak is needed) On top of this, the language 1 (arabic) is right-to-left (so language 2 (german) must follow), it should be compatible with right-to-left reading someway. I tried with \framed, but failed, because the framed blocks are set one under the other, not side by side. How can I achieve a nice way with this simple readable macros? Thank you. Huseyin -- Huseyin Özoguz E-Mail: h.oezo...@mmnetz.de ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Completecontent has problems with chapter, in table
You should keep a copy of your current installation for your existing books. When you use the installation from the ConTeXt garden you can have multiple installations without problems. Thank you, so thats the way to go for us. (Sorry for my late reply.) Where exactly should the image appear in the output? Originally it should on the left from the chapter-title. But meanwhile the design changed and it appears now in the center above the title, so the question dissolved (but still I dont know, how to make it safely). -- Huseyin Özoguz E-Mail: h.oezo...@mmnetz.de ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___