* Re: Two columns in a frame
2012-11-02 7:37 ` Mari Voipio
@ 2012-11-19 12:31 ` Willi Egger
0 siblings, 0 replies; 3+ messages in thread
From: Willi Egger @ 2012-11-19 12:31 UTC (permalink / raw)
To: mailing list for ConTeXt users
[-- Attachment #1: Type: text/plain, Size: 655 bytes --]
Hi Mari,
the command to switch columns is \column.
You can influence the outcome by setting up tolerance.
You could probably better use also the height and width operators in \setuplayout
I suggest not to use columns for this purpose, because depending on the length of words in either language you will get shifted information. What about tabulate environment?
For usability reasons you might also think of using CSV data table, enabling you to check the translations easily.
I would suggest to use a topspace of at least the space the printer can not print on the paper
I submit the edited file again.
Success with the recipes!
Willi
[-- Attachment #2: A6_laput_valmistusaineet_20121102.pdf --]
[-- Type: application/pdf, Size: 15106 bytes --]
[-- Attachment #3: A6_laput_valmistusaineet_20121102.tex --]
[-- Type: application/octet-stream, Size: 3262 bytes --]
% \setupbodyfont[lucidaot,10pt]
\setupbodyfont[palatino,rm,10pt]
\showframe
\mainlanguage[fi] %Added by Willi
\setuppapersize[A6][A4]
\setuppaper
[topspace=0mm,
backspace=0mm,
nx=2,
ny=2]
\setuplayout
[% page=A6,
topspace=0mm,
backspace=10mm,%changed by Willi
height=middle, %Added by Willi
width=middle, %Added by Willi
margin=0mm,
header=0mm,
footer=0mm,
location=middle]
\setuptolerance[tolerant,stretch]
\startbuffer[title1]
{\tfb\cg Shrewsbury Cakes}
\stopbuffer
\startbuffer[ingr1]
{\bf Valmistusaineet:} Vähälaktoosinen voi, täysjyväspelttijauho (=vehnää), ruokosokeri, muskottipähkinä, kananmuna, ruusuvesi.
% spot for column break
\column %Added by Willi
{\it Ingredients: low-lactose butter, wholemeal spelt wheat flour, cane sugar, nutmeg, egg, rosewater.}
\stopbuffer
\startbuffer[ingr2]
\starttabulate[|p(.45\textwidth)|p(.45\textwidth)I|]
\NC {\bf Valmistusaineet:}\NC Ingredients: \NC\NR
\NC Vähälaktoosinen voi \NC low-lactose butter \NC\NR
\NC täysjyväspelttijauho (=vehnää) \NC wholemeal spelt wheat flour \NC\NR
\NC muskottipähkinä \NC cane sugar \NC\NR
\NC ruokosokeri \NC nutmeg \NC\NR
\NC kananmuna \NC egg \NC\NR
\NC ruusuvesi \NC rosewater \NC\NR
\stoptabulate
\stopbuffer
% \startbuffer[ingr2]
%
% \blank[2*big]
% {\tfb\cg Kryddiga pepparkakor
% \blank
% {\tfa Spicy gingerbread}}
% \blank[4*big]
% {\bf Innehåll:} Mörk sirap, socker, låglaktossmör, vetemjöl, salt, kanel, ingefära, nejlika, kardemumma, svartpeppar.
% \blank
% {\itx Ingredients:} {\itx Molasses, sugar, low-lactose butter, wheat flour, salt, cinnamon, ginger, cloves , cardamom, black pepper.}
%
% \stopbuffer
\startbuffer[title3]
{\tfb\cg Biskets}
\stopbuffer
\startbuffer[ingr3]
{\bf Innehåll: Vetemjöl, socker, ägg, malen anis, malen koriander.}
% column break here
{\it Ingredients: Wheat flour, sugar, egg, ground aniseed, ground coriander seed.}
\stopbuffer
% \startbuffer[ingr4]
%
% \blank[2*big]
% {\tfb\cg Jumbles}
% \blank[4*big]
% {\bf Innehåll:} Mjölkfri margarin, citronsaft, socker, ägg, malen anis, vetemjöl.
% \blank[2*big]
% {\itx Ingredients: Dairy free margarine, lemon juice, sugar, egg, ground aniseed, wheat flour.}
%
\stopbuffer
\setuparranging[XY]
% \dorecurse{4}{\externalfigure[photo\recurselevel]}
%
% Beware, \recurselevel counts go like this 1 2 3 4 5 …. If your
% photos are not numbered according to this scheme, the 10th picture
% will bite you.
\starttext
\dorecurse{1}
{
\framed[align=middle,frame=on,width=\textwidth,height=\textheight,offset=0pt] % this is the title/cookie name offset changed by Willi
{\getbuffer[title\recurselevel]}
\framed[width=\textwidth]% ,location=top] % this is the ingredient list in Finnish/Swedish and English Changed by Willi
\bgroup
\startnarrower[2*middle]
\setlocalhsize \hsize\localhsize
\startsimplecolumns
{\getbuffer[ingr\recurselevel]}
\stopsimplecolumns
\stopnarrower
\egroup
}
\getbuffer[ingr2]
\stoptext
[-- Attachment #4: Type: text/plain, Size: 92 bytes --]
On Nov 2, 2012, at 8:37 AM, Mari Voipio wrote:
> <A6_laput_valmistusaineet_20121102.tex>
[-- Attachment #5: 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] 3+ messages in thread