ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen via ntg-context <ntg-context@ntg.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Cc: Hans Hagen <j.hagen@xs4all.nl>
Subject: Re: critical fun
Date: Fri, 7 Jan 2022 15:34:10 +0100	[thread overview]
Message-ID: <463b6ad7-d9a9-89aa-9e1f-df56592bc261@xs4all.nl> (raw)
In-Reply-To: <b972d44e-0225-6079-0484-861c50a2ad1b@fiee.net>

On 1/6/2022 10:36 PM, Henning Hraban Ramm via ntg-context wrote:
> Am 06.01.22 um 20:00 schrieb Hans Hagen via ntg-context:
>> Hi,
>>
>> Maybe this is of interest to critical users:
>>
>> \setupsynchronize [paralleltext] [color=darkblue]
>> % \setupsynchronize [paralleltext] [style=\tx,color=darkred]
>> % \setupsynchronize [paralleltext] [style=\txx,color=darkgreen]
> 
> I played a bit with it:
> 
> 
> \mainlanguage[de]
> \setupbodyfont[dejavu]
> \setupsynchronize [paralleltext] [color=darkblue]
> 
> \starttext
> 
> \paralleltext{Dies}{This}\space
> \paralleltext{könnte}{could}\space
> \paralleltext{für}{for}\space
> \paralleltext{Übersetzungen}{translations}\space
> \paralleltext{interessant}{interesting}\space
> \paralleltext{sein.}{be.}\space
> \blank
> 
> \paralleltext{Dies}{This}\space
> \paralleltext{könnte}{could}\space
> \paralleltext{sein}{be}\space
> \paralleltext{interessant}{interesting}\space
> \paralleltext{für}{for}\space
> \paralleltext{Übersetzungen.}{translations.}\space
> \blank[2*line]
> 
> \paralleltext{Dies}{Это}\space
> \paralleltext{könnte}{может}\space
> \paralleltext{für}{для}\space
> \paralleltext{Übersetzungen}{переводов}\space
> \paralleltext{interessant}{интересно}\space
> \paralleltext{sein.}{быть.}\space
> \blank
> 
> \paralleltext{Dies}{Это}\space
> \paralleltext{könnte}{может}\space
> \paralleltext{sein}{быть}\space
> \paralleltext{interessant}{интересно}\space
> \paralleltext{für}{для}\space
> \paralleltext{Übersetzungen.}{переводов.}\space
> \blank[2*line]
> 
> \paralleltext{\m{E}}{Energie}\space
> \paralleltext{\m{=}}{ist}\space
> \paralleltext{\m{m}}{Masse}\space
> \paralleltext{\m{·}}{mal}\space
> \paralleltext{\m{c^2}}{Lichtgeschwindigkeit im Quadrat}\space
> 
> \stoptext
> 
> 
> I guess it could be useful for short educational examples.
> If I needed this, I might have tried the steps module.
> 
> It doesn’t work with more than two versions, and the syntax is a bit 
> verbose.
in the next upload:

\startbuffer[en]
     This is an english text and
     this is also something english;
     as is this.
     Not that there is much meaning in it.
\stopbuffer

\startbuffer[nl]
     Dit is een nederlandse tekst
     en dit is ook wat nederlands;
     net als dit.
     Niet dat het veel te betekenen heeft.
\stopbuffer

\definesynchronizecontent
   [nl]
   [language=nl,
    color=darkred]

\definesynchronizecontent
   [en]
   [language=en,
    color=darkgreen]

\definesynchronize
   [parallel-en-nl]
   [list={en,nl}]

\placesynchronize
   [parallel-en-nl]
   [buffer={en,nl}]

\blank

\placesynchronize
   [parallel-en-nl]
   [split={.},
    text={
     {This is an english text and this is also something english; as is 
this. Not that there is much meaning in it.},
     {Dit is een nederlandse tekst en dit is ook wat nederlands; net als 
dit. Niet dat het veel te betekenen heeft.}
    }]

\blank

\placesynchronize
   [parallel-en-nl]
   [split={.},
    text={
     {
         {This is an english text and this is also something english;},
         {as is this.},
         {Not that there is much meaning in it.}
     },
     {
         {Dit is een nederlandse tekst en dit is ook wat nederlands;},
         {net als dit.},
         {Niet dat het veel te betekenen heeft.}
     }
    }]

\enabletrackers[synchronize]


\setupsynchronizecontent
   [nl]
   [language=nl,
    style=\tx,
    left={[},
    right={]},
    color=darkblue]

\placesynchronize
   [parallel-en-nl]
   [distance=1pt,
    buffer={en,nl}]



-----------------------------------------------------------------
                                           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
___________________________________________________________________________________

      parent reply	other threads:[~2022-01-07 14:34 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-06 19:00 Hans Hagen via ntg-context
2022-01-06 21:09 ` Jean-Pierre Delange via ntg-context
2022-01-06 21:14   ` Henning Hraban Ramm via ntg-context
2022-01-06 22:03   ` Otared Kavian via ntg-context
2022-01-08  1:03     ` Jean-Pierre Delange via ntg-context
2022-01-06 21:36 ` Henning Hraban Ramm via ntg-context
2022-01-06 22:19   ` Hans Hagen via ntg-context
2022-01-07 14:34   ` Hans Hagen via ntg-context [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=463b6ad7-d9a9-89aa-9e1f-df56592bc261@xs4all.nl \
    --to=ntg-context@ntg.nl \
    --cc=j.hagen@xs4all.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).