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: [email protected]
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 : [email protected] / 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
___________________________________________________________________________________