[NTG-context] The best command for parallel texts

Idris Samawi Hamid ادريس سماوي حامد Idris.Hamid at colostate.edu
Wed Jul 4 03:01:32 CEST 2018


On Tue, 03 Jul 2018 15:30:18 -0600, Idris Samawi Hamid ادريس سماوي حامد  
<Idris.Hamid at colostate.edu> wrote:

> Hi Martin, Wolfgang,
>
> On Mon, 02 Jul 2018 14:41:31 -0600, Wolfgang Schuster  
> <schuster.wolfgang at gmail.com> wrote:
>
>>> Martin Hasoň <mailto:martin.hason at gmail.com>
>>> 1. Juli 2018 um 12:18
>>> Hi all,
>>>
>>> I need to type parallel text on double columns. I've tried paragraphs,
>>> tabulate, table and column environments.The best result of these
>>> options gives the tabulate.Unfortunately, it does not respect
>>> alignment - many \hbox errors in all environments except columns
>>> :(.What should I use and set up?
>>
>> None of the table environments use the global alignment settings and
>> you have to set them again to get better results for the content.
>
> Martin, have you tried streams?
>
> http://wiki.contextgarden.net/Columns#Streams
>
> Under the examples you will find an example of a columnar, aligned  
> streams setup - by Wolfgang.

Ok, needed a break from work, so for fun and for learning something new:

==============
\setuppapersize[A4][A4]
\defineparagraphs[TwoLang][n=2]
\setuptabulate[split=yes]
\setupalign[verytolerant,stretch]

\starttext
\showframe

\startoutputstream[one]
    \setupalign[flushleft]
    \framedtext[width=17.4em,align=verytolerant,stretch,frame=on,offset=overlay]
    {\input lorem }
    \hfill
    \par
\stopoutputstream

\startoutputstream[two]
    \setupalign[flushright]
    \hfill
    \framedtext[width=17.4em,align=verytolerant,stretch,frame=on,offset=overlay]
    {\input davis }
    \par
\stopoutputstream

\synchronizestreams[one,two]

\startoverlay
    {\raise2\strutdp\outputstreambox[one]}
    {\raise0\strutdp\outputstreambox[two]}
\stopoverlay
\startTwoLang
\input lorem
\nextTwoLang
\input davis
\stopTwoLang

\starttabulate[|p|p|]
\NC\input lorem
\NC\input davis
\NC\NR
\stoptabulate

\bTABLE[frame=off,align=yes,split=yes]
\bTR
\bTD[roffset=2mm]\input lorem\eTD
\bTD[loffset=2mm]\input davis\eTD
\eTR
\eTABLE

\startcolumns[n=2]
\input lorem
\column
\input davis
\stopcolumns

\stoptext
==============

The \raise2\strutdp etc. feels like a hack, Wolfgang knows better why it's  
needed, as as how and why the value for one stream affects the other..

Idris
-- 
Idris Samawi Hamid, Professor
Department of Philosophy
Colorado State University
Fort Collins, CO 80512
-------------- next part --------------
A non-text attachment was scrubbed...
Name: scratch.pdf
Type: application/pdf
Size: 25558 bytes
Desc: not available
URL: <http://mailman.ntg.nl/pipermail/ntg-context/attachments/20180703/fea5f4fb/attachment-0001.pdf>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: scratch.tex
Type: application/x-tex
Size: 1395 bytes
Desc: not available
URL: <http://mailman.ntg.nl/pipermail/ntg-context/attachments/20180703/fea5f4fb/attachment-0001.tex>


More information about the ntg-context mailing list