ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Willi Egger <context@boede.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Two columns in a frame
Date: Mon, 19 Nov 2012 13:31:29 +0100	[thread overview]
Message-ID: <AE75A5EA-8962-46FC-92DF-777F81D93912@boede.nl> (raw)
In-Reply-To: <CAGbDsP14MFw3F2aXihJN013Tcrcg_JAvrBecFV=kriOo5RqLLg@mail.gmail.com>

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

      reply	other threads:[~2012-11-19 12:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-02  7:33 Mari Voipio
2012-11-02  7:37 ` Mari Voipio
2012-11-19 12:31   ` Willi Egger [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=AE75A5EA-8962-46FC-92DF-777F81D93912@boede.nl \
    --to=context@boede.nl \
    --cc=ntg-context@ntg.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).