From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/77672 Path: news.gmane.org!not-for-mail From: =?utf-8?Q?Peter_M=C3=BCnster?= Newsgroups: gmane.comp.tex.context Subject: Re: 2 columns: 1 language per column (solved) Date: Tue, 31 Jul 2012 16:15:24 +0200 Message-ID: <87obmw6mpv.fsf_-_@micropit.couberia.bzh> References: <87vch6muf0.fsf@micropit.couberia.bzh> <5017A00B.3020809@wxs.nl> <87ehns8emb.fsf@micropit.couberia.bzh> <5017A8F8.9060404@wxs.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1343744134 23672 80.91.229.3 (31 Jul 2012 14:15:34 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 31 Jul 2012 14:15:34 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Tue Jul 31 16:15:34 2012 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SwDET-0004so-K5 for gctc-ntg-context-518@m.gmane.org; Tue, 31 Jul 2012 16:15:33 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 1B4071026F; Tue, 31 Jul 2012 16:15:32 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id Qp3TCatGzpfu; Tue, 31 Jul 2012 16:15:30 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id EF36A10213; Tue, 31 Jul 2012 16:15:29 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 3919110213 for ; Tue, 31 Jul 2012 16:15:29 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id nfqZMIbNXowP for ; Tue, 31 Jul 2012 16:15:28 +0200 (CEST) Original-Received: from filter1-til.mf.surf.net (filter1-til.mf.surf.net [194.171.167.217]) by balder.ntg.nl (Postfix) with ESMTP id 381691020A for ; Tue, 31 Jul 2012 16:15:28 +0200 (CEST) Original-Received: from smtp.smtpout.orange.fr (smtp07.smtpout.orange.fr [80.12.242.129]) by filter1-til.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id q6VEFQnJ014397 for ; Tue, 31 Jul 2012 16:15:27 +0200 Original-Received: from micropit.couberia.bzh ([2.14.208.194]) by mwinf5d30 with ME id h2FR1j0084CBZ2y032FRry; Tue, 31 Jul 2012 16:15:26 +0200 Original-Received: by micropit.couberia.bzh (Postfix, from userid 1000) id 96D5C5007F2; Tue, 31 Jul 2012 16:15:24 +0200 (CEST) Mail-Followup-To: mailing list for ConTeXt users In-Reply-To: <5017A8F8.9060404@wxs.nl> (Hans Hagen's message of "Tue, 31 Jul 2012 11:44:24 +0200") User-Agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.1 (gnu/linux) X-Bayes-Prob: 0.9999 (Score 4.7, tokens from: @@RPTN) X-CanIt-Geo: ip=80.12.242.129; country=FR; latitude=46.0000; longitude=2.0000; http://maps.google.com/maps?q=46.0000,2.0000&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0RHF2frnU - 944d64d27a2b - 20120731 X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.217 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.14 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-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:77672 Archived-At: On Tue, Jul 31 2012, Hans Hagen wrote: > \startmixedcolumns > \placeparallel[main][one,two][criterium=all] > \stopmixedcolumns > > there will be better support for that kind of things at some point I don't get the desired result with \placeparallel, but I've found a solution, that works quite well. I just can't place figures, that span the 2 columns, but that's no problem for my project. Here the (not very contextish) solution (cld-file): --8<---------------cut here---------------start------------->8--- local C = context local format = string.format local function create_environment() local fp = io.open("env.tex", "w") fp:write([[ \startenvironment env \def\ColumnDistance{1cm} \startmode[columns] \definepapersize[columns][ width=\dimexpr (\textwidth - \ColumnDistance) / 2 \relax, height=\textheight] \setuppapersize[columns] \setuplayout[page] \setuppagenumbering[location=] \setupalign[verytolerant, stretch, line] \setupwhitespace[small] \stopmode \startbuffer[german] \it\dorecurse{15}{\dorecurse{20}{german }\par} \stopbuffer \startbuffer[french] \bf\dorecurse{15}{\dorecurse{20}{french }\par} \stopbuffer \stopenvironment ]]) fp:close() end local function create_pages(s) local fp = io.open("pages.tex", "w") fp:write(format([[ \enablemode[columns] \environment env \starttext \getbuffer[%s] \stoptext ]], s)) fp:close() os.execute(format("context --result=pages-%s pages", s)) end local function create_columns(l, r) local function pdf(x) return "pages-" .. x .. ".pdf" end create_pages(l) create_pages(r) local pdfobj = epdf.open(pdf(l)) local n = pdfobj:getNumPages() for i = 1, n do C.dontleavehmode() C.externalfigure({pdf(l)}, {page = i}) C"\\hskip\\ColumnDistance" C.externalfigure({pdf(r)}, {page = i}) C.page() end end create_environment() C.environment(false, "env ") C.starttext() C"Before" C.page() create_columns("german", "french") C"After" C.stoptext() --8<---------------cut here---------------end--------------->8--- -- Peter ___________________________________________________________________________________ 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________