ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Two columns in a frame
@ 2012-11-02  7:33 Mari Voipio
  2012-11-02  7:37 ` Mari Voipio
  0 siblings, 1 reply; 3+ messages in thread
From: Mari Voipio @ 2012-11-02  7:33 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: text/plain, Size: 650 bytes --]

Hi All,

I'm doing something where the example at
http://wiki.contextgarden.net/Columns#.28Simple.29Columns_in_a_narrow_frame
would be quiet useful. Except that if I copy-paste the example in my
ConTeXt, I get two columns typeset almost on top of each other, with
non-existent column distance (a lot less than on the graphic in the
wiki). Attached is what I get out of my ConTeXt, version 2012.05.30
11:26 MKIV


BTW, the columns page doesn't seem to contain information on how to
force a column break, at least not under that name.... I'm attaching a
short version of the file where I'd need it.


Being clueless again, thankful for any help,

Mari

[-- Attachment #2: simplecolumns.pdf --]
[-- Type: application/pdf, Size: 9165 bytes --]

[-- Attachment #3: simplecolumns.tex --]
[-- Type: application/x-tex, Size: 238 bytes --]

[-- Attachment #4: 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

* Re: Two columns in a frame
  2012-11-02  7:33 Two columns in a frame Mari Voipio
@ 2012-11-02  7:37 ` Mari Voipio
  2012-11-19 12:31   ` Willi Egger
  0 siblings, 1 reply; 3+ messages in thread
From: Mari Voipio @ 2012-11-02  7:37 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: text/plain, Size: 580 bytes --]

I'm really being a clueless idiot again this morning, hit send instead
of attach (and they are not even next to each other....). Here's my
own file that tries to implement the example from the wiki, with
limited success.

If you don't have Lucida OT, it may look a bit funny, but the pdf
should explaien the problem pretty well.

> BTW, the columns page doesn't seem to contain information on how to
> force a column break, at least not under that name.... I'm attaching a
> short version of the file where I'd need it.
>
>
> Being clueless again, thankful for any help,
>
> Mari

[-- Attachment #2: A6_laput_valmistusaineet_20121102.tex --]
[-- Type: application/x-tex, Size: 2373 bytes --]

[-- Attachment #3: A6_laput_valmistusaineet_20121102.pdf --]
[-- Type: application/pdf, Size: 18481 bytes --]

[-- Attachment #4: 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

* 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

end of thread, other threads:[~2012-11-19 12:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-02  7:33 Two columns in a frame Mari Voipio
2012-11-02  7:37 ` Mari Voipio
2012-11-19 12:31   ` Willi Egger

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).