From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/117371 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: jbf via ntg-context Newsgroups: gmane.comp.tex.context Subject: Re: English-Vietnamese facing pages Date: Tue, 4 Apr 2023 10:54:15 +1000 Message-ID: References: <5E15185D-F26F-42B2-9555-307177857926@bittext.nl> Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============4590170445307251308==" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30391"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Cc: jbf , mailing list for ConTeXt users To: Taco Hoekwater Original-X-From: ntg-context-bounces@ntg.nl Tue Apr 04 02:55:00 2023 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane-mx.org Original-Received: from [5.39.185.232] (helo=zapf.ntg.nl) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pjUwu-0007m6-CF for gctc-ntg-context-518@m.gmane-mx.org; Tue, 04 Apr 2023 02:55:00 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 80E9D1C0F3B; Tue, 4 Apr 2023 02:54:36 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 5-KS36I7AqMv; Tue, 4 Apr 2023 02:54:34 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 38EE41C0FA8; Tue, 4 Apr 2023 02:54:34 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 5C3ED1C0F3B for ; Tue, 4 Apr 2023 02:54:30 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9M_QHZkxioNU for ; Tue, 4 Apr 2023 02:54:24 +0200 (CEST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.216.49; helo=mail-pj1-f49.google.com; envelope-from=roma83537@gmail.com; receiver= Original-Received: from mail-pj1-f49.google.com (mail-pj1-f49.google.com [209.85.216.49]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 0DC681C0F0D for ; Tue, 4 Apr 2023 02:54:23 +0200 (CEST) Original-Received: by mail-pj1-f49.google.com with SMTP id h12-20020a17090aea8c00b0023d1311fab3so32334300pjz.1 for ; Mon, 03 Apr 2023 17:54:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680569662; h=in-reply-to:cc:from:references:to:content-language:subject :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=s1PtECjXFFm37Npy8VZzT5d6cVVcAsmmc8wYnNyfVSQ=; b=d7IHq7chXqj63iXgXrvYyPOUZUS7yZG3DMlqReE7UosBEkYuQfhVMlYLlDl/wC+LR3 OP92HzBTWEuhts3elgaU2x8a+PIxTPbyMpI1zQ5zNiXy/fMI9vcGBzuje0uyg866M91w PamqSBr6fgodTQnwsxZ8JkMRNqwVqDpZ4c31sewHZnQo2PFsxcTdU+awh23BRyrjXHVr ndrW4xOvQzJ5egvvY639yVUIhoApTjscl+SFED2imSqYSKAAdg32HAz0W0MxYN+SFOC+ iSJvVhNzqtZvjrrIJjyhdcdtIUXjRQEW+jl6F/OMxUaZ7IxTetEp8oqXtsKl5YueAWY6 wabQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680569662; h=in-reply-to:cc:from:references:to:content-language:subject :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=s1PtECjXFFm37Npy8VZzT5d6cVVcAsmmc8wYnNyfVSQ=; b=jk4gZilWmNADohA9a6RYhi9zhcW1qXNFBJGtLUf5WewifWVoHV/+E8wLQhFJVly4xk sGL4iaShL4RulDJ83tUjPm9t3rkjE/KiQuNzC86jl3co5CmMmtiJpXi/jpmdmOEmK1zd 2upQPBSQkMrKmW5OVQdIr8lLXf0GeqYNyNODYi2ayvKcqjA9kz1i+LdnMG/CuP6dS1EG nIXwe9WZDVxXp6deVH4o3SkB/ZU3V7BkzTXPAYr2KbdItTJd7UsQD+050eR9Xkt+PKUx R4XaQ98uO2B1EK9+qL1mn7bGJdbGMDYhOKbhsxTFUt2ADAlvBywSQS77D4OpEpuP3o94 5KRA== X-Gm-Message-State: AAQBX9fZMZmf7TuNCZQMzr/wFmuWOXQ35c/7e7nbpMtO8nNnZ+I6QvZ4 uzstp8ktDU2MQgwoX4s3gTANHf3nsUY= X-Google-Smtp-Source: AKy350YiHXhZ8Lm86TG5IWfMTm6A7L0dPVy3fxZiWENwqg0Z58Er72ue/1Ribm+lEpPN3N1QITQhuw== X-Received: by 2002:a17:903:187:b0:1a0:6ed9:f9d0 with SMTP id z7-20020a170903018700b001a06ed9f9d0mr905426plg.68.1680569661239; Mon, 03 Apr 2023 17:54:21 -0700 (PDT) Original-Received: from ?IPV6:2405:6e00:293:f9d7:adc5:1b92:28ca:cf35? ([2405:6e00:293:f9d7:adc5:1b92:28ca:cf35]) by smtp.gmail.com with ESMTPSA id l28-20020a63ba5c000000b004fbd91d9716sm6433667pgu.15.2023.04.03.17.54.18 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 03 Apr 2023 17:54:20 -0700 (PDT) Content-Language: en-AU In-Reply-To: <5E15185D-F26F-42B2-9555-307177857926@bittext.nl> X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.26 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: "ntg-context" X-Broken-Reverse-DNS: no host name found for IP address 5.39.185.232 Xref: news.gmane.io gmane.comp.tex.context:117371 Archived-At: This is a multi-part message in MIME format. --===============4590170445307251308== Content-Type: multipart/alternative; boundary="------------eCrw07XNujzZLz5AMQbX6X5O" Content-Language: en-AU This is a multi-part message in MIME format. --------------eCrw07XNujzZLz5AMQbX6X5O Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Okay Taco, so that's a possibility I can explore, even though it is not a nice one, as you say. I can think of a couple of other not-so-nice ways of achieving a result as well. The manuscript shown me (in MSWord, obviously) has been carefully prepared to ensure no text flows over a page, so we are really dealing with separate pages. But of course, all that changes once page dimensions and font size etc. get involved at the ConTeXt stage. However, you gave me a clue: 3 files: "by creating two separate pdfs for the page bodies only and using a third context doc to include those pages alternated'. For the first chapter of the proposed book I have tried Wolfgang's suggestion as listed in https://wiki.contextgarden.net/Columns#Streams by simply using the \input method. Obviously 'en' and 'vn' stand for two tex files set up as I normally would with preamble and bodymatter. I certainly get a good result once the chapter starts. It would seem logical that further chapters can be added. Obviously I only want one TOC, not two (only call it in for, say, the en.tex but not for vn.tex) and for some reason I have several blank pages before everything starts... but hopefully can solve that. Maybe I can adapt what we have below with the project structure. Not ready to give up yet! Julian \starttext \startoutputstream[one] \startcolor[red] \input en\par \stopcolor \stopoutputstream \startoutputstream[two] \startcolor[blue] \input vn\par \stopcolor \stopoutputstream \synchronizestreams[one,two] \setbox\scratchboxone\outputstreambox[one] \setbox\scratchboxtwo\outputstreambox[two] \doloop {\ifvoid\scratchboxone \exitloop \else \setbox\scratchboxfour\vsplit\scratchboxone to \textheight \vbox to \vsize{\box\scratchboxfour\vss}% \setbox\scratchboxfive\vsplit\scratchboxtwo to \textheight \vbox to \vsize{\box\scratchboxfive\vss}% \fi} \stoptext On 3/4/23 20:15, Taco Hoekwater wrote: > Way, way back when, I did a document in NL + EN by creating two separate pdfs for the page bodies only and using a third context doc to included those pages alternated, with the correct headers added in that third document. Not a ’nice’ solution at all, but it worked for me. (this was in the nineties, though) --------------eCrw07XNujzZLz5AMQbX6X5O Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit

Okay Taco, so that's a possibility I can explore, even though it is not a nice one, as you say. I can think of a couple of other not-so-nice ways of achieving a result as well. The manuscript shown me (in MSWord, obviously) has been carefully prepared to ensure no text flows over a page, so we are really dealing with separate pages. But of course, all that changes once page dimensions and font size etc. get involved at the ConTeXt stage.

However, you gave me a clue: 3 files: "by creating two separate pdfs for the page bodies only and using a third context doc to include those pages alternated'.

For the first chapter of the proposed book I have tried Wolfgang's suggestion as listed in https://wiki.contextgarden.net/Columns#Streams by simply using the \input method. Obviously 'en' and 'vn' stand for two tex files set up as I normally would with preamble and bodymatter. I certainly get a good result once the chapter starts. It would seem logical that further chapters can be added. Obviously I only want one TOC, not two (only call it in for, say, the en.tex but not for vn.tex) and for some reason I have several blank pages before everything starts... but hopefully can solve that. Maybe I can adapt what we have below with the project structure.

Not ready to give up yet!

Julian

\starttext

\startoutputstream[one]

\startcolor[red]

\input en\par

\stopcolor

\stopoutputstream

\startoutputstream[two]

\startcolor[blue]

\input vn\par

\stopcolor

\stopoutputstream

\synchronizestreams[one,two]

\setbox\scratchboxone\outputstreambox[one]

\setbox\scratchboxtwo\outputstreambox[two]

\doloop

{\ifvoid\scratchboxone

\exitloop

\else

\setbox\scratchboxfour\vsplit\scratchboxone to \textheight

\vbox to \vsize{\box\scratchboxfour\vss}%

\setbox\scratchboxfive\vsplit\scratchboxtwo to \textheight

\vbox to \vsize{\box\scratchboxfive\vss}%

\fi}

\stoptext

On 3/4/23 20:15, Taco Hoekwater wrote:
Way, way back when, I did a document in NL + EN by creating two separate pdfs for the page bodies only and using a third context doc to included those pages alternated, with the correct headers added in that third document. Not a ’nice’ solution at all, but it worked for me. (this was in the nineties, though)
--------------eCrw07XNujzZLz5AMQbX6X5O-- --===============4590170445307251308== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cHM6Ly93d3cubnRnLm5sL21haWxtYW4v bGlzdGluZm8vbnRnLWNvbnRleHQKd2VicGFnZSAgOiBodHRwczovL3d3dy5wcmFnbWEtYWRlLm5s IC8gaHR0cDovL2NvbnRleHQuYWFuaGV0Lm5ldAphcmNoaXZlICA6IGh0dHBzOi8vYml0YnVja2V0 Lm9yZy9waGcvY29udGV4dC1taXJyb3IvY29tbWl0cy8Kd2lraSAgICAgOiBodHRwczovL2NvbnRl eHRnYXJkZW4ubmV0Cl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCg== --===============4590170445307251308==--