* 2 columns: 1 language per column
@ 2012-07-29 15:57 Peter Münster
2012-07-31 9:06 ` Hans Hagen
0 siblings, 1 reply; 15+ messages in thread
From: Peter Münster @ 2012-07-29 15:57 UTC (permalink / raw)
To: ConTeXt users
Hi,
Is it possible today with mkiv, to automatically typeset one text
(german) on the left column and the translation (french) on the right
column (perhaps with streams)?
And if yes, how?
TIA for any help!
--
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: 2 columns: 1 language per column
2012-07-29 15:57 2 columns: 1 language per column Peter Münster
@ 2012-07-31 9:06 ` Hans Hagen
2012-07-31 9:27 ` Peter Münster
0 siblings, 1 reply; 15+ messages in thread
From: Hans Hagen @ 2012-07-31 9:06 UTC (permalink / raw)
To: ConTeXt users
On 29-7-2012 17:57, Peter Münster wrote:
> Hi,
>
> Is it possible today with mkiv, to automatically typeset one text
> (german) on the left column and the translation (french) on the right
> column (perhaps with streams)?
>
> And if yes, how?
there's also
%D \defineparallel[main][one,two]
%D
%D \startmain
%D \startone
%D first 1
%D [reference] first 2
%D first 3
%D \stopone
%D \starttwo
%D second 1
%D \stoptwo
%D \stopmain
%D
%D \placeparallel[main][one,two][criterium=all]
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
| 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://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: 2 columns: 1 language per column
2012-07-31 9:06 ` Hans Hagen
@ 2012-07-31 9:27 ` Peter Münster
2012-07-31 9:44 ` Hans Hagen
0 siblings, 1 reply; 15+ messages in thread
From: Peter Münster @ 2012-07-31 9:27 UTC (permalink / raw)
To: mailing list for ConTeXt users
On Tue, Jul 31 2012, Hans Hagen wrote:
> there's also
>
> %D \defineparallel[main][one,two]
Is it possible with this to make 2 columns, one language on the left,
another language on the right?
--
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: 2 columns: 1 language per column
2012-07-31 9:27 ` Peter Münster
@ 2012-07-31 9:44 ` Hans Hagen
2012-07-31 14:15 ` 2 columns: 1 language per column (solved) Peter Münster
0 siblings, 1 reply; 15+ messages in thread
From: Hans Hagen @ 2012-07-31 9:44 UTC (permalink / raw)
To: mailing list for ConTeXt users
On 31-7-2012 11:27, Peter Münster wrote:
> On Tue, Jul 31 2012, Hans Hagen wrote:
>
>> there's also
>>
>> %D \defineparallel[main][one,two]
>
> Is it possible with this to make 2 columns, one language on the left,
> another language on the right?
maybe something
\setupparallel
[setups=parallel:place:mine]
\startsetups parallel:place:mine
\setups[parallel:place:default]
\column[yes]
\stopsetups
\startmixedcolumns
\placeparallel[main][one,two][criterium=all]
\stopmixedcolumns
there will be better support for that kind of things at some point
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
| 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://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: 2 columns: 1 language per column (solved)
2012-07-31 9:44 ` Hans Hagen
@ 2012-07-31 14:15 ` Peter Münster
2012-07-31 15:17 ` Otared Kavian
0 siblings, 1 reply; 15+ messages in thread
From: Peter Münster @ 2012-07-31 14:15 UTC (permalink / raw)
To: mailing list for ConTeXt users
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: 2 columns: 1 language per column (solved)
2012-07-31 14:15 ` 2 columns: 1 language per column (solved) Peter Münster
@ 2012-07-31 15:17 ` Otared Kavian
2012-07-31 16:23 ` Peter Münster
0 siblings, 1 reply; 15+ messages in thread
From: Otared Kavian @ 2012-07-31 15:17 UTC (permalink / raw)
To: mailing list for ConTeXt users
Hi Peter,
Can you give please an example showing how to use your code?
Thanks: OK
On 31 juil. 2012, at 16:15, Peter Münster <pmlists@free.fr> wrote:
> 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
> ___________________________________________________________________________________
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: 2 columns: 1 language per column (solved)
2012-07-31 15:17 ` Otared Kavian
@ 2012-07-31 16:23 ` Peter Münster
2012-07-31 21:46 ` Otared Kavian
0 siblings, 1 reply; 15+ messages in thread
From: Peter Münster @ 2012-07-31 16:23 UTC (permalink / raw)
To: mailing list for ConTeXt users
On Tue, Jul 31 2012, Otared Kavian wrote:
> Can you give please an example showing how to use your code?
Save it in "test.cld", then run "context test.cld".
Then open "test.pdf" in a PDF-viewer.
--
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: 2 columns: 1 language per column (solved)
2012-07-31 16:23 ` Peter Münster
@ 2012-07-31 21:46 ` Otared Kavian
2012-07-31 22:29 ` Peter Münster
` (2 more replies)
0 siblings, 3 replies; 15+ messages in thread
From: Otared Kavian @ 2012-07-31 21:46 UTC (permalink / raw)
To: mailing list for ConTeXt users
Thanks Peter! It is a very nice piece of code, but could this be included in a TeX file? (Otherwise one cannot use something like TeXShop on a Mac to typeset the file).
Best regards: OK
On 31 juil. 2012, at 18:23, Peter Münster <pmlists@free.fr> wrote:
> On Tue, Jul 31 2012, Otared Kavian wrote:
>
>> Can you give please an example showing how to use your code?
>
> Save it in "test.cld", then run "context test.cld".
> Then open "test.pdf" in a PDF-viewer.
>
> --
> 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
> ___________________________________________________________________________________
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: 2 columns: 1 language per column (solved)
2012-07-31 21:46 ` Otared Kavian
@ 2012-07-31 22:29 ` Peter Münster
2012-07-31 22:41 ` Rogers, Michael K
2012-08-01 7:34 ` Hans Hagen
2 siblings, 0 replies; 15+ messages in thread
From: Peter Münster @ 2012-07-31 22:29 UTC (permalink / raw)
To: mailing list for ConTeXt users
On Tue, Jul 31 2012, Otared Kavian wrote:
> Thanks Peter! It is a very nice piece of code, but could this be included in a
> TeX file?
Probably yes, but I'm too busy to do this now. I'm sorry...
--
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: 2 columns: 1 language per column (solved)
2012-07-31 21:46 ` Otared Kavian
2012-07-31 22:29 ` Peter Münster
@ 2012-07-31 22:41 ` Rogers, Michael K
2012-08-01 6:39 ` Otared Kavian
2012-08-01 7:34 ` Hans Hagen
2 siblings, 1 reply; 15+ messages in thread
From: Rogers, Michael K @ 2012-07-31 22:41 UTC (permalink / raw)
To: mailing list for ConTeXt users
If you wish to use TeXShop, you can set it up...in my typically kludgy way. This mimics the TeXShop setup for Context Standalone (see http://wiki.contextgarden.net/ConTeXt_Standalone/Mac_Installation) and assumes that "context" is in your regular execution path.
Create a new plain-text file in ~/Library/TeXShop/Engines -- call it whatever you like -- let's say "ConTeXt-CLD.engine". Add these lines
------------CUT HERE--------------
#!/bin/bash
context --forcecld "$1"
------------CUT HERE--------------
This will create a ConTeXt-CLD menu item in the popup menu on new file windows. (You may have to restart TeXShop first.) You can select it and run Peter's column program.
If you like, add these three lines to the beginning of your .tex file to force TeXShop to use ConTeXt-CLD:
------------CUT HERE--------------
--[[
%!TEX TS-program = ConTeXt-CLD
]]--
------------CUT HERE--------------
A drawback is that your cld files will be masquerading as .tex files. But you can process cld files in TeXShop if you want to.
Michael
On Jul 31, 2012, at 5:46 PM, Otared Kavian wrote:
> Thanks Peter! It is a very nice piece of code, but could this be included in a TeX file? (Otherwise one cannot use something like TeXShop on a Mac to typeset the file).
>
> Best regards: OK
>
>
> On 31 juil. 2012, at 18:23, Peter Münster <pmlists@free.fr> wrote:
>
>> On Tue, Jul 31 2012, Otared Kavian wrote:
>>
>>> Can you give please an example showing how to use your code?
>>
>> Save it in "test.cld", then run "context test.cld".
>> Then open "test.pdf" in a PDF-viewer.
>>
>> --
>> 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
>> ___________________________________________________________________________________
>
> ___________________________________________________________________________________
> 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
> ___________________________________________________________________________________
________________________________
This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.
If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: 2 columns: 1 language per column (solved)
2012-07-31 22:41 ` Rogers, Michael K
@ 2012-08-01 6:39 ` Otared Kavian
2012-08-01 12:44 ` Rogers, Michael K
0 siblings, 1 reply; 15+ messages in thread
From: Otared Kavian @ 2012-08-01 6:39 UTC (permalink / raw)
To: mailing list for ConTeXt users
Hi,
Thanks!
Your solution works as far as creating a « ConTeXt-CLD.engine » which creates a menu item for typesetting a CLD document, upon choosing it for the code written by Peter Münster, provided the suffix of the document's name is .tex, not .cld.
However adding the line
%!TEX TS-program = ConTeXt-CLD
at the top of the file results in an error message saying:
> tex > error on line 72 in file /context-minimal/tex/texmf-context/tex/context/base/cont-yes.mkiv: LuaTeX error
(here context-minimal is the directory where I have the latest version of the standalone ConTeXt).
Also enclosing the code written by Peter between \startluacode …. \stopluacode in a TEX file does not allow to to typeset the file, contrary to other examples in the manual written by Hans « ConTeXt, Lua Documents ».
In any case thanks for your attention: now there is another way to typeset two languages in two columns…
Best regards: OK
On 1 août 2012, at 00:41, "Rogers, Michael K" <mroge02@emory.edu> wrote:
> If you wish to use TeXShop, you can set it up...in my typically kludgy way. This mimics the TeXShop setup for Context Standalone (see http://wiki.contextgarden.net/ConTeXt_Standalone/Mac_Installation) and assumes that "context" is in your regular execution path.
>
> Create a new plain-text file in ~/Library/TeXShop/Engines -- call it whatever you like -- let's say "ConTeXt-CLD.engine". Add these lines
> ------------CUT HERE--------------
> #!/bin/bash
> context --forcecld "$1"
> ------------CUT HERE--------------
>
> This will create a ConTeXt-CLD menu item in the popup menu on new file windows. (You may have to restart TeXShop first.) You can select it and run Peter's column program.
>
> If you like, add these three lines to the beginning of your .tex file to force TeXShop to use ConTeXt-CLD:
>
> ------------CUT HERE--------------
> --[[
> %!TEX TS-program = ConTeXt-CLD
> ]]--
> ------------CUT HERE--------------
>
> A drawback is that your cld files will be masquerading as .tex files. But you can process cld files in TeXShop if you want to.
>
> Michael
>
> On Jul 31, 2012, at 5:46 PM, Otared Kavian wrote:
>
>> Thanks Peter! It is a very nice piece of code, but could this be included in a TeX file? (Otherwise one cannot use something like TeXShop on a Mac to typeset the file).
>>
>> Best regards: OK
>>
>>
>> On 31 juil. 2012, at 18:23, Peter Münster <pmlists@free.fr> wrote:
>>
>>> On Tue, Jul 31 2012, Otared Kavian wrote:
>>>
>>>> Can you give please an example showing how to use your code?
>>>
>>> Save it in "test.cld", then run "context test.cld".
>>> Then open "test.pdf" in a PDF-viewer.
>>>
>>> --
>>> 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
>>> ___________________________________________________________________________________
>>
>> ___________________________________________________________________________________
>> 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
>> ___________________________________________________________________________________
>
>
> ________________________________
>
> This e-mail message (including any attachments) is for the sole use of
> the intended recipient(s) and may contain confidential and privileged
> information. If the reader of this message is not the intended
> recipient, you are hereby notified that any dissemination, distribution
> or copying of this message (including any attachments) is strictly
> prohibited.
>
> If you have received this message in error, please contact
> the sender by reply e-mail message and destroy all copies of the
> original message (including attachments).
> ___________________________________________________________________________________
> 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
> ___________________________________________________________________________________
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: 2 columns: 1 language per column (solved)
2012-07-31 21:46 ` Otared Kavian
2012-07-31 22:29 ` Peter Münster
2012-07-31 22:41 ` Rogers, Michael K
@ 2012-08-01 7:34 ` Hans Hagen
2 siblings, 0 replies; 15+ messages in thread
From: Hans Hagen @ 2012-08-01 7:34 UTC (permalink / raw)
To: mailing list for ConTeXt users; +Cc: Otared Kavian
On 31-7-2012 23:46, Otared Kavian wrote:
> Thanks Peter! It is a very nice piece of code, but could this be included in a TeX file? (Otherwise one cannot use something like TeXShop on a Mac to typeset the file).
"context whatever.cld" should process ok, so texshop etc should just
treat a cld file as context file
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
| 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://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: 2 columns: 1 language per column (solved)
2012-08-01 6:39 ` Otared Kavian
@ 2012-08-01 12:44 ` Rogers, Michael K
2012-08-01 13:37 ` Hans Hagen
2012-08-01 14:17 ` Otared Kavian
0 siblings, 2 replies; 15+ messages in thread
From: Rogers, Michael K @ 2012-08-01 12:44 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 1914 bytes --]
On Aug 1, 2012, at 2:39 AM, Otared Kavian wrote:
...
However adding the line
%!TEX TS-program = ConTeXt-CLD
at the top of the file results in an error message saying:
> tex > error on line 72 in file /context-minimal/tex/texmf-context/tex/context/base/cont-yes.mkiv: LuaTeX error
(here context-minimal is the directory where I have the latest version of the standalone ConTeXt).......
On 1 août 2012, at 00:41, "Rogers, Michael K" <mroge02@emory.edu<mailto:mroge02@emory.edu>> wrote:
...
If you like, add these three lines to the beginning of your .tex file to force TeXShop to use ConTeXt-CLD:
------------CUT HERE--------------
--[[
%!TEX TS-program = ConTeXt-CLD
]]--
------------CUT HERE--------------
You need all three lines. The TeX comment has to be enclosed in a Lua comment. The double hyphen after the "]]" is optional, I think, but I've seen it done that way. (As a neophyte, I imitate.)
@Hans, the problem with TeXShop is that it seems to refuse to process files whose names do not end in .tex, AFAIK. (The typeset button is disabled.) So a straightforward solution seems impossible. You can always type "context file.cld" in a terminal window.
Also enclosing the code written by Peter between \startluacode …. \stopluacode in a TEX file does not allow to to typeset the file
Good to know.
________________________________
This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.
If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).
[-- Attachment #1.2: Type: text/html, Size: 3922 bytes --]
[-- Attachment #2: Type: text/plain, Size: 485 bytes --]
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: 2 columns: 1 language per column (solved)
2012-08-01 12:44 ` Rogers, Michael K
@ 2012-08-01 13:37 ` Hans Hagen
2012-08-01 14:17 ` Otared Kavian
1 sibling, 0 replies; 15+ messages in thread
From: Hans Hagen @ 2012-08-01 13:37 UTC (permalink / raw)
To: mailing list for ConTeXt users; +Cc: koch
On 1-8-2012 14:44, Rogers, Michael K wrote:
> On Aug 1, 2012, at 2:39 AM, Otared Kavian wrote:
>
> ....
> However adding the line
> %!TEX TS-program = ConTeXt-CLD
> at the top of the file results in an error message saying:
>> tex > error on line 72 in file /context-minimal/tex/texmf-context/tex/context/base/cont-yes.mkiv: LuaTeX error
> (here context-minimal is the directory where I have the latest version of the standalone ConTeXt).......
>
> On 1 août 2012, at 00:41, "Rogers, Michael K" <mroge02@emory.edu<mailto:mroge02@emory.edu>> wrote:
>
> ....
> If you like, add these three lines to the beginning of your .tex file to force TeXShop to use ConTeXt-CLD:
>
> ------------CUT HERE--------------
> --[[
> %!TEX TS-program = ConTeXt-CLD
> ]]--
> ------------CUT HERE--------------
>
> You need all three lines. The TeX comment has to be enclosed in a Lua comment. The double hyphen after the "]]" is optional, I think, but I've seen it done that way. (As a neophyte, I imitate.)
>
> @Hans, the problem with TeXShop is that it seems to refuse to process files whose names do not end in .tex, AFAIK. (The typeset button is disabled.) So a straightforward solution seems impossible. You can always type "context file.cld" in a terminal window.
In that case we just ask Richard Koch if it can be done ...
=================================
Hi Dick,
Context files can have several suffixes: .tex .mkiv .mkii .cld (to
mention some). Is it possible to let texshop see all of these as source
that can be processed by the 'context' script?
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
| 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://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: 2 columns: 1 language per column (solved)
2012-08-01 12:44 ` Rogers, Michael K
2012-08-01 13:37 ` Hans Hagen
@ 2012-08-01 14:17 ` Otared Kavian
1 sibling, 0 replies; 15+ messages in thread
From: Otared Kavian @ 2012-08-01 14:17 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1.1: Type: text/plain, Size: 1072 bytes --]
On 1 août 2012, at 14:44, "Rogers, Michael K" <mroge02@emory.edu> wrote:
>> […]
>>> If you like, add these three lines to the beginning of your .tex file to force TeXShop to use ConTeXt-CLD:
>>>
>>> ------------CUT HERE--------------
>>> --[[
>>> %!TEX TS-program = ConTeXt-CLD
>>> ]]--
>>> ------------CUT HERE--------------
>
> You need all three lines. The TeX comment has to be enclosed in a Lua comment. The double hyphen after the "]]" is optional, I think, but I've seen it done that way. (As a neophyte, I imitate.)
Thanks for the information: indeed the three lines above allow a CLD code in a TEX file to be typeset by ConTeXt, using the TeXShop engine created with your indications.
By the way, as you guessed the third line can be either
]]--
or
]]
> @Hans, the problem with TeXShop is that it seems to refuse to process files whose names do not end in .tex, AFAIK. (The typeset button is disabled.) So a straightforward solution seems impossible. You can always type "context file.cld" in a terminal window.
Best regards: OK
[-- Attachment #1.2: Type: text/html, Size: 2013 bytes --]
[-- Attachment #2: Type: text/plain, Size: 485 bytes --]
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2012-08-01 14:17 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-29 15:57 2 columns: 1 language per column Peter Münster
2012-07-31 9:06 ` Hans Hagen
2012-07-31 9:27 ` Peter Münster
2012-07-31 9:44 ` Hans Hagen
2012-07-31 14:15 ` 2 columns: 1 language per column (solved) Peter Münster
2012-07-31 15:17 ` Otared Kavian
2012-07-31 16:23 ` Peter Münster
2012-07-31 21:46 ` Otared Kavian
2012-07-31 22:29 ` Peter Münster
2012-07-31 22:41 ` Rogers, Michael K
2012-08-01 6:39 ` Otared Kavian
2012-08-01 12:44 ` Rogers, Michael K
2012-08-01 13:37 ` Hans Hagen
2012-08-01 14:17 ` Otared Kavian
2012-08-01 7:34 ` Hans Hagen
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).