ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Using \setupinterlinespace with \setuparranging[XY], and more
@ 2013-06-21 20:27 Pavneet Arora
  2013-06-25 19:00 ` Wolfgang Schuster
  0 siblings, 1 reply; 5+ messages in thread
From: Pavneet Arora @ 2013-06-21 20:27 UTC (permalink / raw)
  To: ntg-context

Hello,

I am using Willi's MAPS 37 and the "Example" section from the \setuppaper command:

http://wiki.contextgarden.net/Command/setuppaper

to print a set of labels, 2x6 configuration on U.S. Letter waterproof
label paper.

For the most part things are working well, but I have a number of questions:

1.  A difference between MAPS 37 and wiki entry for \setuppaper is the
inclusion of the following line in the later:

\setuplayout[location=middle]

which seems to play a significant role.  Otherwise, I cannot get the
labels to honour the topspace and backspace specified in the setuppaper
command.  My question is why is this significant?  What role does it
play?  This can be tested by simply deleting the line in the MWE below.

2.	I would like to have every label "centered", i.e.,
\framed[alignment=center] should be set for all labels.  However,
including it in the setupframedtexts command doesn't seem to have any
effect as shown in the MWE down below.  Is there another way for all
labels to inherit this alignment setting?

3.  I cannot get interlinespacing to affect the line spacing even though
the baselineskip variable is changed as shown in the MWE.

advTHANKSance.


EXAMPLE:

\definepapersize
	[Label]
	[width=4in,height=3.33in]

\setuppapersize[Label][letter,portrait]

\setuppaper
	[topspace=0.4688in,
	backspace=0.1875in,
	dx=0.1875in,
	dy=0in,
	nx=2,
	ny=3]

\setuplayout
	[topspace=0in,
	backspace=0in,
	margin=0in,
	width=4in,
	height=3.33in,
	header=0in,
	footer=0in]

\setuparranging[XY]

\setupframedtexts
	[width=\textwidth,
	height=\textheight,
	alignment=center,
	frame=off,
	location=lohi,
	alignment=center,
	offset=0pt]

\setuplayout[location=middle]

\definelayer
	[Label]
	[width=\paperwidth,
	height=\paperheight]

\usemodule[simplefonts]
\setmainfont[schola]
\setupbodyfont[rm,48pt]
\setupinterlinespace[line=2.8ex]

\showframe

\starttext
\the\baselineskip\page
\framed[frame=off,width=\textwidth,height=\textheight,aligment=center]{Label 1}\page
\the\baselineskip\page
\framed[frame=off,width=\textwidth,height=\textheight,aligment=center]{\definedfont[Serif at 18pt]\setupinterlinespace \the\baselineskip\crlf A long description label that needs to be have its interline spacing adjusted.}\page
Label 2\page
Label 3\page
Label 4\page
Label 5\page
Label 6\page
Label 7\page
Label 8\page
\stoptext



-- 
----
Pavneet Arora           m: 647.406.6843
Waroc Informatik        t: 416.937.9276
___________________________________________________________________________________
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] 5+ messages in thread

* Re: Using \setupinterlinespace with \setuparranging[XY], and more
  2013-06-21 20:27 Using \setupinterlinespace with \setuparranging[XY], and more Pavneet Arora
@ 2013-06-25 19:00 ` Wolfgang Schuster
  2013-06-26 19:25   ` Pavneet Arora
  0 siblings, 1 reply; 5+ messages in thread
From: Wolfgang Schuster @ 2013-06-25 19:00 UTC (permalink / raw)
  To: Pavneet Arora, mailing list for ConTeXt users


Am 21.06.2013 um 22:27 schrieb Pavneet Arora <pavneet_arora@waroc.com>:

> Hello,
> 
> I am using Willi's MAPS 37 and the "Example" section from the \setuppaper command:
> 
> http://wiki.contextgarden.net/Command/setuppaper
> 
> to print a set of labels, 2x6 configuration on U.S. Letter waterproof
> label paper.
> 
> For the most part things are working well, but I have a number of questions:
> 
> 1.  A difference between MAPS 37 and wiki entry for \setuppaper is the
> inclusion of the following line in the later:
> 
> \setuplayout[location=middle]
> 
> which seems to play a significant role.  Otherwise, I cannot get the
> labels to honour the topspace and backspace specified in the setuppaper
> command.  My question is why is this significant?  What role does it
> play?  This can be tested by simply deleting the line in the MWE below.

The setups acts here as a keyword to enable the topspace/backspace keys.

> 2.	I would like to have every label "centered", i.e.,
> \framed[alignment=center] should be set for all labels.  However,
> including it in the setupframedtexts command doesn't seem to have any
> effect as shown in the MWE down below.  Is there another way for all
> labels to inherit this alignment setting?

The global settings for \framed are changed with the \setupframed command,
the \setupframedtext commands changes the values for \startframedtext.

> 3.  I cannot get interlinespacing to affect the line spacing even though
> the baselineskip variable is changed as shown in the MWE.

You have to add \par at the end of each paragraph, e.g. \framed{\definedfont[…]\setupinterlinespace …\par}

Wolfgang
___________________________________________________________________________________
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] 5+ messages in thread

* Re: Using \setupinterlinespace with \setuparranging[XY], and more
  2013-06-25 19:00 ` Wolfgang Schuster
@ 2013-06-26 19:25   ` Pavneet Arora
  2013-06-26 19:31     ` Wolfgang Schuster
  0 siblings, 1 reply; 5+ messages in thread
From: Pavneet Arora @ 2013-06-26 19:25 UTC (permalink / raw)
  To: ntg-context

Thanks for the explanation, Wolfgang.

I am, however, getting some strange interline behaviour exhibited using
the \par approach.  In the MWE below the quoted text, which have both
approaches (\par and explicit \setinterlinespace outside the \framed)
listed, you will see with the \par approach that the text is aligned
slightly lower than middle (so not properly vertically centred), and the
spacing below the first line is larger than the subsequent lines.

Regards.

On 25Jun13, Wolfgang Schuster wrote:
> 
> Am 21.06.2013 um 22:27 schrieb Pavneet Arora <pavneet_arora@waroc.com>:
> 
> > 3.  I cannot get interlinespacing to affect the line spacing even though
> > the baselineskip variable is changed as shown in the MWE.
> 
> You have to add \par at the end of each paragraph, e.g. \framed{\definedfont[…]\setupinterlinespace …\par}
> 
> Wolfgang

MWE:

\definepapersize
	[Label]
	[width=4in,height=3.33in]

\setuppapersize[Label][letter,portrait]

\setuppaper
	[topspace=0.4688in,
	backspace=0.1875in,
	dx=0.1875in,
	dy=0in,
	nx=2,
	ny=3]

\setuplayout
	[topspace=0in,
	backspace=0in,
	margin=0in,
	width=4in,
	height=3.33in,
	header=0in,
	footer=0in]

\setuparranging[XY]

\setupframedtexts
	[width=\textwidth,
	height=\textheight,
	frame=off,
	location=lohi,
	offset=0pt]

\setupframed
	[frame=off,
	width=\textwidth,
	height=\textheight,
	alignment=center]

\setuplayout[location=middle]

\definelayer
	[Label]
	[width=\paperwidth,
	height=\paperheight]

\usemodule[simplefonts]
\setmainfont[schola]
\setupbodyfont[rm,48pt]
\setupinterlinespace[line=2.8ex]

\showframe

\starttext
\framed{Label 1}\page
\framed{\definedfont[Serif at 18pt]\setupinterlinespace A long description label that needs to be have its interline spacing adjusted.\par}\page
\setupbodyfont[rm,18pt]
\setupinterlinespace
\framed{Another long description label that seems to have proper interline spacing.}\page
\framed{Yet another long description label that seems to have proper interline spacing.}\page
Label 2\page
Label 3\page
Label 4\page
Label 5\page
Label 6\page
Label 7\page
Label 8\page
\stoptext

-- 
----
Pavneet Arora           m: 647.406.6843
Waroc Informatik        t: 416.937.9276
___________________________________________________________________________________
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] 5+ messages in thread

* Re: Using \setupinterlinespace with \setuparranging[XY], and more
  2013-06-26 19:25   ` Pavneet Arora
@ 2013-06-26 19:31     ` Wolfgang Schuster
  0 siblings, 0 replies; 5+ messages in thread
From: Wolfgang Schuster @ 2013-06-26 19:31 UTC (permalink / raw)
  To: Pavneet Arora, mailing list for ConTeXt users


Am 26.06.2013 um 21:25 schrieb Pavneet Arora <pavneet_arora@waroc.com>:

> Thanks for the explanation, Wolfgang.
> 
> I am, however, getting some strange interline behaviour exhibited using
> the \par approach.  In the MWE below the quoted text, which have both
> approaches (\par and explicit \setinterlinespace outside the \framed)
> listed, you will see with the \par approach that the text is aligned
> slightly lower than middle (so not properly vertically centred), and the
> spacing below the first line is larger than the subsequent lines.


Use the foregroundstyle key to change the font size:

  \framed[foregroundstyle={\definedfont[Serif at 18pt]}]{A long description label that needs to be have its interline spacing adjusted.}\page

Wolfgang
___________________________________________________________________________________
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] 5+ messages in thread

* Re: Using \setupinterlinespace with \setuparranging[XY], and more
       [not found] <mailman.3.1371895202.27529.ntg-context@ntg.nl>
@ 2013-06-25 15:10 ` Pavneet Arora
  0 siblings, 0 replies; 5+ messages in thread
From: Pavneet Arora @ 2013-06-25 15:10 UTC (permalink / raw)
  To: ntg-context

By chance I found a possible, but not very satisfying, solution to the
\setupinterlinspace issue when trying to print labels using
\setuparranging[XY]. That is to explicitly set
\setupbodyfont[rm,18pt]\setupinterlinespace
once again outside the \framed directive for the specific label as in the
following MWE.

I haven't seen any answers on my other two questions from the original
post (included down below), so if anyone has any ideas, I would be most
grateful.

MWE:

\definepapersize
	[Label]
	[width=4in,height=3.33in]

\setuppapersize[Label][letter,portrait]

\setuppaper
	[topspace=0.4688in,
	backspace=0.1875in,
	dx=0.1875in,
	dy=0in,
	nx=2,
	ny=3]

\setuplayout
	[topspace=0in,
	backspace=0in,
	margin=0in,
	width=4in,
	height=3.33in,
	header=0in,
	footer=0in]

\setuparranging[XY]

\setupframedtexts
	[width=\textwidth,
	height=\textheight,
	alignment=center,
	frame=off,
	location=lohi,
	alignment=center,
	offset=0pt]

\setuplayout[location=middle]

\definelayer
	[Label]
	[width=\paperwidth,
	height=\paperheight]

\usemodule[simplefonts]
\setmainfont[schola]
\setupbodyfont[rm,48pt]
\setupinterlinespace[line=2.8ex]

\showframe

\starttext
\the\baselineskip\page
\framed[frame=off,width=\textwidth,height=\textheight,aligment=center]{Label 1}\page
\the\baselineskip\page
\framed[frame=off,width=\textwidth,height=\textheight,aligment=center]{\definedfont[Serif at 18pt]\setupinterlinespace \the\baselineskip\crlf A long description label that needs to be have its interline spacing adjusted.}\page
Label 2\page
\setupbodyfont[rm,18pt]
\setupinterlinespace
\framed[frame=off,width=\textwidth,height=\textheight,aligment=center]{ \the\baselineskip\crlf Another long description label that needs to be have its interline spacing adjusted.}\page
Label 3\page
Label 4\page
Label 5\page
Label 6\page
Label 7\page
Label 8\page
\stoptext




On 22Jun13, ntg-context-request@ntg.nl wrote:
> Hello,
> 
> I am using Willi's MAPS 37 and the "Example" section from the \setuppaper command:
> 
> http://wiki.contextgarden.net/Command/setuppaper
> 
> to print a set of labels, 2x6 configuration on U.S. Letter waterproof
> label paper.
> 
> For the most part things are working well, but I have a number of questions:
> 
> 1.  A difference between MAPS 37 and wiki entry for \setuppaper is the
> inclusion of the following line in the later:
> 
> \setuplayout[location=middle]
> 
> which seems to play a significant role.  Otherwise, I cannot get the
> labels to honour the topspace and backspace specified in the setuppaper
> command.  My question is why is this significant?  What role does it
> play?  This can be tested by simply deleting the line in the MWE below.
> 
> 2.	I would like to have every label "centered", i.e.,
> \framed[alignment=center] should be set for all labels.  However,
> including it in the setupframedtexts command doesn't seem to have any
> effect as shown in the MWE down below.  Is there another way for all
> labels to inherit this alignment setting?
> 
> 3.  I cannot get interlinespacing to affect the line spacing even though
> the baselineskip variable is changed as shown in the MWE.
> 
> advTHANKSance.
> 
> 

-- 
----
Pavneet Arora           m: 647.406.6843
Waroc Informatik        t: 416.937.9276
___________________________________________________________________________________
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] 5+ messages in thread

end of thread, other threads:[~2013-06-26 19:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-21 20:27 Using \setupinterlinespace with \setuparranging[XY], and more Pavneet Arora
2013-06-25 19:00 ` Wolfgang Schuster
2013-06-26 19:25   ` Pavneet Arora
2013-06-26 19:31     ` Wolfgang Schuster
     [not found] <mailman.3.1371895202.27529.ntg-context@ntg.nl>
2013-06-25 15:10 ` Pavneet Arora

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