[NTG-context] First and last lines on a grid

2011-04-22 Thread Oliver Buerschaper
Dear all,

I'm having a little trouble with grids and page layout…

I'm trying to align the first and last line of a page properly with the frame 
of the textblock. That is, I'd like to position the first baseline a certain 
distance below the textblock's upper border (say, the height of a C or even 
É) and the last baseline a certain distance above the textblock's lower 
border (say, the actual depth of a g).

How would I do that? I tried playing with \setupinterlinespace, however, its 
options top and bottom appear to set relative distances. Once I change the 
leading funny things happen… like an empty first line.

Also I'd like to typeset the page number flush with the lower border of the 
footer frame. How would I achieve that?

Please find the source code of my attempt below.

Oliver



---
\definemeasure
[gridwidth]
[\dimexpr\paperwidth/9\relax]
\definemeasure
[gridheight]
[\dimexpr\paperheight/9\relax]

\setuplayout
[grid=yes,
 backspace=\measure{gridwidth},
 width=\dimexpr6\measure{gridwidth}\relax,
 topspace=\measure{gridheight},
 height=\dimexpr7\measure{gridheight}\relax,
 leftmargin=\zeropoint,
 rightmargin=\zeropoint,
 header=\zeropoint,
 footer=\measure{gridheight}]

\setupinterlinespace
[line=\dimexpr\textheight/20\relax]

\setuppagenumbering
[alternative=doublesided,
 location={footer,right}]


\starttext


\showframe
\showgrid

É
\dorecurse{10}{\input zapf\par}


\stoptext
---
___
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
___


Re: [NTG-context] First and last lines on a grid

2011-04-22 Thread Wolfgang Schuster

Am 22.04.2011 um 14:04 schrieb Oliver Buerschaper:

 Also I'd like to typeset the page number flush with the lower border of the 
 footer frame. How would I achieve that?

\setuppagenumbering[strut=no]

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
___


Re: [NTG-context] First and last lines on a grid

2011-04-22 Thread Oliver Buerschaper
 Also I'd like to typeset the page number flush with the lower border of the 
 footer frame. How would I achieve that?
 
 \setuppagenumbering[strut=no]

That's wonderful!

Any idea about the other thing?

Thanks,
Oliver


___
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
___


Re: [NTG-context] First and last lines on a grid

2011-04-22 Thread Oliver Buerschaper
 Also I'd like to typeset the page number flush with the lower border of the 
 footer frame. How would I achieve that?
 
 \setuppagenumbering[strut=no]

I just realized that when I use oldstyle figures any pagenumber with a 
descender is bumped upwards a little. Is there a way to have them protrude 
(vertically) beyond the frame border?

Oliver
___
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
___


Re: [NTG-context] First and last lines on a grid

2011-04-22 Thread Wolfgang Schuster

Am 22.04.2011 um 19:32 schrieb Oliver Buerschaper:

 Also I'd like to typeset the page number flush with the lower border of the 
 footer frame. How would I achieve that?
 
 \setuppagenumbering[strut=no]
 
 I just realized that when I use oldstyle figures any pagenumber with a 
 descender is bumped upwards a little. Is there a way to have them protrude 
 (vertically) beyond the frame border?

This should do the trick:

\define[1]\PagenumberCommand
  {\smash[d]{#1}}

\setuppagenumbering
  [  strut=no,
   command=\PagenumberCommand]

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
___


Re: [NTG-context] First and last lines on a grid

2011-04-22 Thread Oliver Buerschaper
 I just realized that when I use oldstyle figures any pagenumber with a 
 descender is bumped upwards a little. Is there a way to have them protrude 
 (vertically) beyond the frame border?
 
 This should do the trick:
 
 \define[1]\PagenumberCommand
  {\smash[d]{#1}}
 
 \setuppagenumbering
  [  strut=no,
   command=\PagenumberCommand]

And how well it does it!

Thanks,
Oliver
___
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
___


Re: [NTG-context] Grid typesetting and inline math

2011-04-21 Thread Christoph Redecker
Are there any other suggestions? I did read the manual chapter about 
grids and details.pdf and don't know what I'm doing wrong. In fact, I 
don't even understand the examples in the manual chapter. When reading 
the example code, I can't figure out how it leads to the shown behavior, 
and why the shown effect is desired.


The \startlinecorrection ... \stoplinecorrection description in the wiki 
is also no help. What does it do and how does it differ from a globally 
enabled grid?


Regards,

Christoph

Am 20.04.2011 12:31, schrieb Christoph Redecker:

Thanks for the suggestion!

With grid=on, I get a different result, but it's not better. Code:

Testing inline math: \gform{x_2 = \sqrt{\frac{a}{b_2}}}. The following
line should be seperated from this one with half a line, but it isn't.
In this case, there is no space and the root sign reaches deeply into
the following line.

Regards,

Christoph

Am 20.04.2011 11:56, schrieb Khaled Hosny:

On Tue, Apr 19, 2011 at 11:59:34AM +0200, Christoph Redecker wrote:

Hello,

I'm struggling with the grid. I've stepped from LaTeX to luaLaTeX
for a simpler font selection, and from luaLaTeX to ConTeXt for
getting a usable grid (because I was told that it supports
typesetting on a grid). Now that I got font selection working as
desired in ConTeXt, the grid is driving me crazy.

I'm trying to use the grid as described in details.pdf, and I want
halfline spacing around formulas in text, because a full line is
definitely too much. This is what I'm compiling:

\setupbodyfont[10pt,serif] % should be lm?
\setuplayout[grid=yes]
\setuptextformulas[step=halfline]
\starttext
\showgrid
Testing inline math: \gform{x_2 = \frac{a}{b}}. The following line
should be seperated from this one by half a line, but it isn't.

Testing inline math: \gform[-]{x_2 = \frac{a}{b}}. The following
line should be seperated from this one by half a line, but it isn't.
\stoptext

Both paragraphs look identical, the second line is too far away from
the first one. What's wrong with my code?


Not sure, but try grid=on.

Regards,
Khaled


___

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
___


[NTG-context] Grid typesetting and inline math

2011-04-20 Thread Christoph Redecker

Hello,

I'm struggling with the grid. I've stepped from LaTeX to luaLaTeX for a 
simpler font selection, and from luaLaTeX to ConTeXt for getting a 
usable grid (because I was told that it supports typesetting on a grid). 
Now that I got font selection working as desired in ConTeXt, the grid is 
driving me crazy.


I'm trying to use the grid as described in details.pdf, and I want 
halfline spacing around formulas in text, because a full line is 
definitely too much. This is what I'm compiling:


\setupbodyfont[10pt,serif] % should be lm?
\setuplayout[grid=yes]
\setuptextformulas[step=halfline]
\starttext
\showgrid
Testing inline math: \gform{x_2 = \frac{a}{b}}. The following line 
should be seperated from this one by half a line, but it isn't.


Testing inline math: \gform[-]{x_2 = \frac{a}{b}}. The following line 
should be seperated from this one by half a line, but it isn't.

\stoptext

Both paragraphs look identical, the second line is too far away from the 
first one. What's wrong with my code?


Also, how can I manually depart from the grid, e.g. for block quotes?

Regards,

Christoph
___
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
___


Re: [NTG-context] Grid typesetting and inline math

2011-04-20 Thread Khaled Hosny
On Tue, Apr 19, 2011 at 11:59:34AM +0200, Christoph Redecker wrote:
 Hello,
 
 I'm struggling with the grid. I've stepped from LaTeX to luaLaTeX
 for a simpler font selection, and from luaLaTeX to ConTeXt for
 getting a usable grid (because I was told that it supports
 typesetting on a grid). Now that I got font selection working as
 desired in ConTeXt, the grid is driving me crazy.
 
 I'm trying to use the grid as described in details.pdf, and I want
 halfline spacing around formulas in text, because a full line is
 definitely too much. This is what I'm compiling:
 
 \setupbodyfont[10pt,serif] % should be lm?
 \setuplayout[grid=yes]
 \setuptextformulas[step=halfline]
 \starttext
 \showgrid
 Testing inline math: \gform{x_2 = \frac{a}{b}}. The following line
 should be seperated from this one by half a line, but it isn't.
 
 Testing inline math: \gform[-]{x_2 = \frac{a}{b}}. The following
 line should be seperated from this one by half a line, but it isn't.
 \stoptext
 
 Both paragraphs look identical, the second line is too far away from
 the first one. What's wrong with my code?

Not sure, but try grid=on.

Regards,
 Khaled

-- 
 Khaled Hosny
 Egyptian
 Arab
___
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
___


Re: [NTG-context] Grid typesetting and inline math

2011-04-20 Thread Christoph Redecker

Thanks for the suggestion!

With grid=on, I get a different result, but it's not better. Code:

Testing inline math: \gform{x_2 = \sqrt{\frac{a}{b_2}}}. The following 
line should be seperated from this one with half a line, but it isn't. 
In this case, there is no space and the root sign reaches deeply into 
the following line.


Regards,

Christoph

Am 20.04.2011 11:56, schrieb Khaled Hosny:

On Tue, Apr 19, 2011 at 11:59:34AM +0200, Christoph Redecker wrote:

Hello,

I'm struggling with the grid. I've stepped from LaTeX to luaLaTeX
for a simpler font selection, and from luaLaTeX to ConTeXt for
getting a usable grid (because I was told that it supports
typesetting on a grid). Now that I got font selection working as
desired in ConTeXt, the grid is driving me crazy.

I'm trying to use the grid as described in details.pdf, and I want
halfline spacing around formulas in text, because a full line is
definitely too much. This is what I'm compiling:

\setupbodyfont[10pt,serif] % should be lm?
\setuplayout[grid=yes]
\setuptextformulas[step=halfline]
\starttext
\showgrid
Testing inline math: \gform{x_2 = \frac{a}{b}}. The following line
should be seperated from this one by half a line, but it isn't.

Testing inline math: \gform[-]{x_2 = \frac{a}{b}}. The following
line should be seperated from this one by half a line, but it isn't.
\stoptext

Both paragraphs look identical, the second line is too far away from
the first one. What's wrong with my code?


Not sure, but try grid=on.

Regards,
  Khaled


___
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
___


[NTG-context] Defining new head grid problem

2011-03-19 Thread Bart Wise
The code below prints out the word Text: in bold and then follows with the
text.  However, if I turn the grid on (as is coded below), the first line of
the paragraph is printed, followed by a blank line, followed by the
remaining text.  The blank line after the first line should not be there.
 If I don't use the grid, I don't get the extra blank line.

Is something broken (I'm using the latest beta), or am I doing something
wrong?

Thanks,
Bart


\setuplayout[grid=yes]

\definehead[paragraph][subsubsubject]
\setuphead[paragraph][
alternative=text,
style=bold]

\starttext
\paragraph{Text: } \input knuth
\stoptext
___
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
___


Re: [NTG-context] Defining new head grid problem

2011-03-19 Thread Wolfgang Schuster

Am 19.03.2011 um 12:57 schrieb Bart Wise:

 The code below prints out the word Text: in bold and then follows with the 
 text.  However, if I turn the grid on (as is coded below), the first line of 
 the paragraph is printed, followed by a blank line, followed by the remaining 
 text.  The blank line after the first line should not be there.  If I don't 
 use the grid, I don't get the extra blank line.
 
 Is something broken (I'm using the latest beta), or am I doing something 
 wrong?

\setuplayout[grid=yes]

\definehead[paragraph][subsubsubject]

\setuphead
  [paragraph]
  [strut=no,
   textcommand=\groupedcommand{}{:},
   alternative=text,
   style=bold]

\starttext
\paragraph{Text} \input knuth
\stoptext

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
___


Re: [NTG-context] Defining new head grid problem

2011-03-19 Thread Bart Wise
Wolfgang,

Works great.  Thanks!

Bart

On Sat, Mar 19, 2011 at 6:54 AM, Wolfgang Schuster 
schuster.wolfg...@googlemail.com wrote:


 Am 19.03.2011 um 12:57 schrieb Bart Wise:

  The code below prints out the word Text: in bold and then follows with
 the text.  However, if I turn the grid on (as is coded below), the first
 line of the paragraph is printed, followed by a blank line, followed by the
 remaining text.  The blank line after the first line should not be there.
  If I don't use the grid, I don't get the extra blank line.
 
  Is something broken (I'm using the latest beta), or am I doing something
 wrong?

 \setuplayout[grid=yes]

 \definehead[paragraph][subsubsubject]

 \setuphead
  [paragraph]
   [strut=no,
   textcommand=\groupedcommand{}{:},
alternative=text,
   style=bold]

 \starttext
 \paragraph{Text} \input knuth
 \stoptext

 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

 ___

___
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
___


[NTG-context] Problem with typing to the grid

2011-02-18 Thread Jaroslav Hajtmar

Hello ConTeXist,
Is there a way to achieve alignment all of texts in a grid lines?
The attached example shows, that inserting of picture violate fixed 
spacing inside the \startframedtext \stopframedtext environment (on left 
on line 22 ) and final sequel of the text is not right too. (from line 25)

It's way at some point the rate of return text back to the grid?
Or it is necessary to determine the amount of Figures to match multiples 
of \lineheight?


Thanx Jaroslav


\setuplayout[grid=yes]

\showgrid

\starttext

\input tufte

\placefigure[here,none]{}
\startframedtext[width=13cm, offset=none]
\startsimplecolumns
Sed congue quis porta senectus Proin hendrerit platea In at Vivamus. 
Lorem lacus dolor orci wisi faucibus iaculis in ut nibh sit faucibus 
iaculis in.


\externalfigure[myfig][width=4cm, height=2.3cm, frame=on]

Pretium lacinia sapien vel vitae eget tempus natoque lacinia convallis 
ultrices.


Pretium lacinia sapien vel vitae eget tempus natoque lacinia convallis 
ultrices. Tellus libero ultrices Ut lacus tincidunt euismod nulla 
ultrices faucibus leo.


Pretium lacinia sapien vel vitae eget tempus natoque lacinia convallis 
ultrices.


Pretium lacinia sapien vel vitae eget tempus natoque lacinia convallis 
ultrices.

\stopsimplecolumns
\stopframedtext

\input tufte

\stoptext


___
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
___


Re: [NTG-context] delimitedtext, spacebefore and grid

2011-02-14 Thread Oliver Buerschaper
 Not sure if there are side effects but this works (requires mkiv and a recent 
 installation):
 
 \setuplayout[grid=yes]\showgrid
 \setupbodyfont[14pt]
 
 \usemodule[annotation]
 
 \define[2]\ZitatCommand
  {\topskip\dimexpr\topskip+\lineheight/2\relax
   \startnarrower
   “#2”%
   \stopnarrower}
 
 \defineannotation
  [zitat]
  [alternative=command,
   command=\ZitatCommand,
   spacebefore=halfline,
spaceafter=halfline]
 
 \starttext
 
 \startzitat
 \input tufte
 \stopzitat
 
 \dorecurse{2}{\input tufte\par}
 
 \startzitat
 \input tufte
 \stopzitat
 
 \dorecurse{3}{\input tufte\par}
 
 \startzitat
 \input tufte
 \stopzitat
 
 \input tufte
 
 \stoptext

Indeed, this solves the grid issue for block quotations broken across pages. 
Many thanks!

Unfortunately introducing a \blank just before the last \input tufte in the 
above example breaks grid alignment.

Oliver
___
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
___


Re: [NTG-context] delimitedtext, spacebefore and grid

2011-02-14 Thread Wolfgang Schuster

Am 14.02.2011 um 12:20 schrieb Oliver Buerschaper:

 Unfortunately introducing a \blank just before the last \input tufte in 
 the above example breaks grid alignment.

The afterspace-value from \stopzitat is ignored with your \blank and you get 
only one empty line while you need one and a half (one from the \blank command 
and a half from \stopzitat).

Nevertheless you can force the correct value with \blank[halfline,line]

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
___


Re: [NTG-context] delimitedtext, spacebefore and grid

2011-02-14 Thread Oliver Buerschaper
 Unfortunately introducing a \blank just before the last \input tufte in 
 the above example breaks grid alignment.
 
 The afterspace-value from \stopzitat is ignored with your \blank and you get 
 only one empty line while you need one and a half (one from the \blank 
 command and a half from \stopzitat).
 
 Nevertheless you can force the correct value with \blank[halfline,line]

Sure, that's a good workaround.

In the long run would it be possible in grid mode to have \blank insert 1+x 
lines of vertical space where x is adjusted such that the following material is 
aligned on the grid?

Oliver
___
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
___


Re: [NTG-context] delimitedtext, spacebefore and grid

2011-02-14 Thread Oliver Buerschaper
 In the long run would it be possible in grid mode to have \blank insert 1+x 
 lines of vertical space where x is adjusted such that the following material 
 is aligned on the grid?

… or simply make it not swallow the previous halfline correction from the 
quotation?

Oliver
___
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
___


Re: [NTG-context] delimitedtext, spacebefore and grid

2011-02-14 Thread Wolfgang Schuster

Am 14.02.2011 um 18:18 schrieb Oliver Buerschaper:

 In the long run would it be possible in grid mode to have \blank insert 1+x 
 lines of vertical space where x is adjusted such that the following material 
 is aligned on the grid?
 
 … or simply make it not swallow the previous halfline correction from the 
 quotation?


Took me a while but this does what you want:

\blank[line,category:4]

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
___


Re: [NTG-context] delimitedtext, spacebefore and grid

2011-02-12 Thread Wolfgang Schuster

Am 12.02.2011 um 08:47 schrieb Oliver Buerschaper:

 Just wanted to ask whether anyone has looked into these issues… a solution 
 would be much appreciated (and put to immediate use in a current project ;-)


Not sure if there are side effects but this works (requires mkiv and a recent 
installation):

\setuplayout[grid=yes]\showgrid
\setupbodyfont[14pt]

\usemodule[annotation]

\define[2]\ZitatCommand
  {\topskip\dimexpr\topskip+\lineheight/2\relax
   \startnarrower
   “#2”%
   \stopnarrower}

\defineannotation
  [zitat]
  [alternative=command,
   command=\ZitatCommand,
   spacebefore=halfline,
spaceafter=halfline]

\starttext

\startzitat
\input tufte
\stopzitat

\dorecurse{2}{\input tufte\par}

\startzitat
\input tufte
\stopzitat

\dorecurse{3}{\input tufte\par}

\startzitat
\input tufte
\stopzitat

\input tufte

\stoptext

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
___


[NTG-context] grid=verytolerant causes overlapping

2011-02-11 Thread Andreas Harder
Hi all,

if one sets the grid option to verytolerant the list entries overlap. Is this a 
but or did I miss something?

\setuppapersize[A5][A5]

% \setuplayout[grid=yes] % OK
% \setuplayout[grid=tolerant] % OK
\setuplayout[grid=verytolerant] % - overlapping

\setupheads[expansion=yes]

\starttext  \showgrid
  \placelist[chapter,section,subsection,subsubsection]
  \def\SampleHead{\dorecurse{10}{test } test}
  \dorecurse
{5}
{\chapter{\SampleHead}
 \section{\SampleHead}
 \subsection{\SampleHead}
 \subsubsection{\SampleHead}}
\stoptext

Greeting
Andreas
___
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
___


Re: [NTG-context] grid=verytolerant causes overlapping

2011-02-11 Thread luigi scarso
On Fri, Feb 11, 2011 at 2:33 PM, Andreas Harder
andreas.har...@rz-online.de wrote:
 Hi all,

 if one sets the grid option to verytolerant the list entries overlap. Is this 
 a but or did I miss something?

 \setuppapersize[A5][A5]

 % \setuplayout[grid=yes] % OK
 % \setuplayout[grid=tolerant] % OK
 \setuplayout[grid=verytolerant] % - overlapping

 \setupheads[expansion=yes]

 \starttext  \showgrid
  \placelist[chapter,section,subsection,subsubsection]
  \def\SampleHead{\dorecurse{10}{test } test}
  \dorecurse
    {5}
    {\chapter{\SampleHead}
     \section{\SampleHead}
     \subsection{\SampleHead}
     \subsubsection{\SampleHead}}
 \stoptext
I don't see problems here with latest minimals --- what is wrong in your pdf ?

-- 
luigi
___
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
___


Re: [NTG-context] grid=verytolerant causes overlapping

2011-02-11 Thread Andreas Harder

Am 11.02.2011 um 14:46 schrieb luigi sc

test-toc-on-grid.pdf
Description: Adobe PDF document
arso:

 On Fri, Feb 11, 2011 at 2:33 PM, Andreas Harder
 andreas.har...@rz-online.de wrote:
 Hi all,
 
 if one sets the grid option to verytolerant the list entries overlap. Is 
 this a but or did I miss something?
 
 \setuppapersize[A5][A5]
 
 % \setuplayout[grid=yes] % OK
 % \setuplayout[grid=tolerant] % OK
 \setuplayout[grid=verytolerant] % - overlapping
 
 \setupheads[expansion=yes]
 
 \starttext  \showgrid
  \placelist[chapter,section,subsection,subsubsection]
  \def\SampleHead{\dorecurse{10}{test } test}
  \dorecurse
{5}
{\chapter{\SampleHead}
 \section{\SampleHead}
 \subsection{\SampleHead}
 \subsubsection{\SampleHead}}
 \stoptext
 I don't see problems here with latest minimals --- what is wrong in your pdf ?

Hmm, I've just updated the beta … 



test-toc-on-grid.pdf
Description: Adobe PDF document


Andreas___
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
___


Re: [NTG-context] grid=verytolerant causes overlapping

2011-02-11 Thread luigi scarso
On Fri, Feb 11, 2011 at 2:55 PM, Andreas Harder ahar...@uni-koblenz.de wrote:

 Am 11.02.2011 um 14:46 schrieb luigi sc
 arso:

 On Fri, Feb 11, 2011 at 2:33 PM, Andreas Harder
 andreas.har...@rz-online.de wrote:
 Hi all,

 if one sets the grid option to verytolerant the list entries overlap. Is 
 this a but or did I miss something?

 \setuppapersize[A5][A5]

 % \setuplayout[grid=yes] % OK
 % \setuplayout[grid=tolerant] % OK
 \setuplayout[grid=verytolerant] % - overlapping

 \setupheads[expansion=yes]

 \starttext  \showgrid
  \placelist[chapter,section,subsection,subsubsection]
  \def\SampleHead{\dorecurse{10}{test } test}
  \dorecurse
    {5}
    {\chapter{\SampleHead}
     \section{\SampleHead}
     \subsection{\SampleHead}
     \subsubsection{\SampleHead}}
 \stoptext
 I don't see problems here with latest minimals --- what is wrong in your pdf 
 ?

 Hmm, I've just updated the beta …
this is my pdf

-- 
luigi


test.pdf
Description: Adobe PDF document
___
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
___


Re: [NTG-context] grid=verytolerant causes overlapping

2011-02-11 Thread Andreas Harder

Am 11.02.2011 um 15:08 schrieb luigi scarso:

 On Fri, Feb 11, 2011 at 2:55 PM, Andreas Harder ahar...@uni-koblenz.de 
 wrote:
 
 Am 11.02.2011 um 14:46 schrieb luigi sc
 arso:
 
 On Fri, Feb 11, 2011 at 2:33 PM, Andreas Harder
 andreas.har...@rz-online.de wrote:
 Hi all,
 
 if one sets the grid option to verytolerant the list entries overlap. Is 
 this a but or did I miss something?
 
 \setuppapersize[A5][A5]
 
 % \setuplayout[grid=yes] % OK
 % \setuplayout[grid=tolerant] % OK
 \setuplayout[grid=verytolerant] % - overlapping
 
 \setupheads[expansion=yes]
 
 \starttext  \showgrid
  \placelist[chapter,section,subsection,subsubsection]
  \def\SampleHead{\dorecurse{10}{test } test}
  \dorecurse
{5}
{\chapter{\SampleHead}
 \section{\SampleHead}
 \subsection{\SampleHead}
 \subsubsection{\SampleHead}}
 \stoptext
 I don't see problems here with latest minimals --- what is wrong in your 
 pdf ?
 
 Hmm, I've just updated the beta …
 this is my pdf

You have commented the paper size setting, therefore the lines do not break. 
Otherwise in your pdf nothing is on grid, although you're using the same 
minimals …

I've changed the example a bit:

\setuplayout[grid=verytolerant] % - overlapping
\setupheads[expansion=yes]

\starttext  \showgrid
  \placelist[chapter,section,subsection,subsubsection]
  \def\SampleHead{\dorecurse{15}{test } test}
  \dorecurse
{5}
{\chapter{\SampleHead}
 \section{\SampleHead}
 \subsection{\SampleHead}
 \subsubsection{\SampleHead}}
\stoptext

Andreas
___
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
___


Re: [NTG-context] grid=verytolerant causes overlapping

2011-02-11 Thread luigi scarso
On Fri, Feb 11, 2011 at 3:15 PM, Andreas Harder ahar...@uni-koblenz.de wrote:

 Am 11.02.2011 um 15:08 schrieb luigi scarso:

 On Fri, Feb 11, 2011 at 2:55 PM, Andreas Harder ahar...@uni-koblenz.de 
 wrote:

 Am 11.02.2011 um 14:46 schrieb luigi sc
 arso:

 On Fri, Feb 11, 2011 at 2:33 PM, Andreas Harder
 andreas.har...@rz-online.de wrote:
 Hi all,

 if one sets the grid option to verytolerant the list entries overlap. Is 
 this a but or did I miss something?

 \setuppapersize[A5][A5]

 % \setuplayout[grid=yes] % OK
 % \setuplayout[grid=tolerant] % OK
 \setuplayout[grid=verytolerant] % - overlapping

 \setupheads[expansion=yes]

 \starttext  \showgrid
  \placelist[chapter,section,subsection,subsubsection]
  \def\SampleHead{\dorecurse{10}{test } test}
  \dorecurse
    {5}
    {\chapter{\SampleHead}
     \section{\SampleHead}
     \subsection{\SampleHead}
     \subsubsection{\SampleHead}}
 \stoptext
 I don't see problems here with latest minimals --- what is wrong in your 
 pdf ?

 Hmm, I've just updated the beta …
 this is my pdf

 You have commented the paper size setting, therefore the lines do not break. 
 Otherwise in your pdf nothing is on grid, although you're using the same 
 minimals …
true sorry.

 I've changed the example a bit:

 \setuplayout[grid=verytolerant] % - overlapping
 \setupheads[expansion=yes]

 \starttext  \showgrid
  \placelist[chapter,section,subsection,subsubsection]
  \def\SampleHead{\dorecurse{15}{test } test}
  \dorecurse
    {5}
    {\chapter{\SampleHead}
     \section{\SampleHead}
     \subsection{\SampleHead}
     \subsubsection{\SampleHead}}
 \stoptext
same here: both examples show overlapping.
-- 
luigi
___
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
___


Re: [NTG-context] grid=verytolerant causes overlapping

2011-02-11 Thread Wolfgang Schuster

Am 11.02.2011 um 14:33 schrieb Andreas Harder:

 Hi all,
 
 if one sets the grid option to verytolerant the list entries overlap. Is this 
 a but or did I miss something?
 
 \setuppapersize[A5][A5]
 
 % \setuplayout[grid=yes] % OK
 % \setuplayout[grid=tolerant] % OK
 \setuplayout[grid=verytolerant] % - overlapping

There is no grid option “verytolerant”.

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
___


Re: [NTG-context] grid=verytolerant causes overlapping

2011-02-11 Thread luigi scarso
On Fri, Feb 11, 2011 at 3:27 PM, Wolfgang Schuster
schuster.wolfg...@googlemail.com wrote:

 Am 11.02.2011 um 14:33 schrieb Andreas Harder:

 Hi all,

 if one sets the grid option to verytolerant the list entries overlap. Is 
 this a but or did I miss something?

 \setuppapersize[A5][A5]

 % \setuplayout[grid=yes] % OK
 % \setuplayout[grid=tolerant] % OK
 \setuplayout[grid=verytolerant] % - overlapping

 There is no grid option “verytolerant”.
true, the same with
\setuplayout[grid=ztolerant]
If I recall correctly there a way to see the in the log.
-- 
luigi
___
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
___


Re: [NTG-context] grid=verytolerant causes overlapping

2011-02-11 Thread Wolfgang Schuster

Am 11.02.2011 um 15:32 schrieb luigi scarso:

 There is no grid option “verytolerant”.
 true, the same with
 \setuplayout[grid=ztolerant]
 If I recall correctly there a way to see the in the log.

Depends on the commands, sometimes the value is checked but no with 
gridsnapping.

The “yes” value is defined as

\definegridsnapping[yes][maxheight,maxdepth,strut]

and you enable with with “grid=yes” a where context tests if “yes”
is a predefined lists but “grid={maxheight,maxdepth,strut}” is also
valid and in this case context defined a dummy list which is passed
to lua. The same happens with “verytolerant”, context creates
a dummy list and use ”verytolerant” as value for this list.

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
___


Re: [NTG-context] grid=verytolerant causes overlapping

2011-02-11 Thread Andreas Harder

Am 11.02.2011 um 15:55 schrieb Wolfgang Schuster:

 
 Am 11.02.2011 um 15:32 schrieb luigi scarso:
 
 There is no grid option “verytolerant”.
 true, the same with
 \setuplayout[grid=ztolerant]
 If I recall correctly there a way to see the in the log.
 
 Depends on the commands, sometimes the value is checked but no with 
 gridsnapping.
 
 The “yes” value is defined as
 
 \definegridsnapping[yes][maxheight,maxdepth,strut]
 
 and you enable with with “grid=yes” a where context tests if “yes”
 is a predefined lists but “grid={maxheight,maxdepth,strut}” is also
 valid and in this case context defined a dummy list which is passed
 to lua. The same happens with “verytolerant”, context creates
 a dummy list and use ”verytolerant” as value for this list.

Thank you Wolfgang!

Now I've defined verytolerant in order to get some fractions on grid.

\definegridsnapping[verytolerant][maxdepth:1.6,maxheight:1.4,strut]

\setuplayout[grid=verytolerant]
% \setuplayout[grid=tolerant]

\setupbodyfont[palatino]

\starttext
test\crlf
$b = \frac p q$\crlf
test
\stoptext

Andreas
___
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
___


Re: [NTG-context] delimitedtext, spacebefore and grid

2011-02-11 Thread Oliver Buerschaper
 I want to have both a halfline space before and after blockquotations.
 Normally, this works fine; after the quotation the main text snaps
 back to the grid (see page 3 of the example file).
 
 \setupdelimitedtext
 [blockquote]
 [spacebefore=halfline]
 
 spacebefore={force,halfline}
 
 Hello Wolfgang, thank you for your answer.  Sadly, your solution only
 works for blockquotes starting at the top of the page.  When blockquotes
 are broken up between two pages the main text doesn't find its way back
 to the grid (see page 2 of my minimal example).
 
 I think I've discovered another little problem of the same sort if directly 
 after the quotation a blank line is requested:
 
 ---
 \setuplayout
[grid=yes]
 
 \setupdelimitedtext
[quotation]
[spacebefore=halfline]
 
 \showgrid
 
 \starttext
 
 \input tufte
 
 \startquotation
\input tufte
 \stopquotation
 
 \blank
 \input tufte
 
 \stoptext
 ---
 
 Unfortunately the trailing main text doesn't align with the grid either. Any 
 solution to both problems?

Just wanted to ask whether anyone has looked into these issues… a solution 
would be much appreciated (and put to immediate use in a current project ;-)

Oliver
___
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
___


Re: [NTG-context] delimitedtext, spacebefore and grid

2011-01-23 Thread Oliver Buerschaper
 I want to have both a halfline space before and after blockquotations.
 Normally, this works fine; after the quotation the main text snaps
 back to the grid (see page 3 of the example file).
 
 \setupdelimitedtext
 [blockquote]
 [spacebefore=halfline]
 
 spacebefore={force,halfline}
 
 Hello Wolfgang, thank you for your answer.  Sadly, your solution only
 works for blockquotes starting at the top of the page.  When blockquotes
 are broken up between two pages the main text doesn't find its way back
 to the grid (see page 2 of my minimal example).

I think I've discovered another little problem of the same sort if directly 
after the quotation a blank line is requested:

---
\setuplayout
[grid=yes]

\setupdelimitedtext
[quotation]
[spacebefore=halfline]

\showgrid

\starttext

\input tufte

\startquotation
\input tufte
\stopquotation

\blank
\input tufte

\stoptext
---

Unfortunately the trailing main text doesn't align with the grid either. Any 
solution to both problems?

Best wishes,
Oliver
___
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
___


[NTG-context] delimitedtext, spacebefore and grid

2011-01-20 Thread Oliver Heins
Hello,

I want to have both a halfline space before and after blockquotations.
Normally, this works fine; after the quotation the main text snaps
back to the grid (see page 3 of the example file).

\setupdelimitedtext
  [blockquote]
  [spacebefore=halfline]

However, this fails when the blockquote is the first element on the
page, either because a new blockquote starts on the top of the page
(cf. p. 1) or because a blockquote continues from the last page
(cf. p. 2).  Is it possible to tell ConTeXt to insert a halfline of
space on the top of the page in these cases?

TIA,
 olli


\setuppapersize[a5][A4]
\setuplayout[location=middle,marking=on,grid=yes]
\setupbodyfont[14pt]

\setupdelimitedtext
  [blockquote]
  [spacebefore=halfline]

\showgrid

\starttext

\startblockquote
  \input tufte
\stopblockquote

\dorecurse{2}{\input tufte}

\startblockquote
  \input tufte
\stopblockquote

\dorecurse{3}{\input tufte}

\startblockquote
  \input tufte
\stopblockquote

\input tufte

\stoptext


-- 
Oliver Heins he...@sopos.org  http://www.sopos.org/olli
GPG: F27A BA8C 1CFB B905 65A8  2544 0F07 B675 9A00 D827
1024D/9A00D827 2004-09-24 -- gpg --recv-keys 0x9A00D827
Please avoid sending me Word or PowerPoint attachments:
http://www.gnu.org/philosophy/no-word-attachments.html
___
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
___


Re: [NTG-context] delimitedtext, spacebefore and grid

2011-01-20 Thread Wolfgang Schuster

Am 20.01.2011 um 17:04 schrieb Oliver Heins:

 Hello,
 
 I want to have both a halfline space before and after blockquotations.
 Normally, this works fine; after the quotation the main text snaps
 back to the grid (see page 3 of the example file).
 
 \setupdelimitedtext
  [blockquote]
  [spacebefore=halfline]

spacebefore={force,halfline}

 […]
 
 \setuppapersize[a5][A4]

\setuppapersize[A5][A4]

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
___


Re: [NTG-context] delimitedtext, spacebefore and grid

2011-01-20 Thread Oliver Heins
Wolfgang Schuster schuster.wolfg...@googlemail.com writes:

 Am 20.01.2011 um 17:04 schrieb Oliver Heins:

 Hello,
 
 I want to have both a halfline space before and after blockquotations.
 Normally, this works fine; after the quotation the main text snaps
 back to the grid (see page 3 of the example file).
 
 \setupdelimitedtext
  [blockquote]
  [spacebefore=halfline]

 spacebefore={force,halfline}

Hello Wolfgang, thank you for your answer.  Sadly, your solution only
works for blockquotes starting at the top of the page.  When blockquotes
are broken up between two pages the main text doesn't find its way back
to the grid (see page 2 of my minimal example).

Another point is: The space inserted at the top of the page is not a
half line big but of one and a half line.

 […]
 
 \setuppapersize[a5][A4]

 \setuppapersize[A5][A4]

Thanks, it was a typo.  I already wondered about how huge an A5-sized
page in ConTeXt is :) However, the setup of my minimal example
illustrates the problems best on A4, so *here* it should read either
\setuppapersize[A4] or nothing (since A4 seems to be the default
anyway).

Best regards,
 olli

-- 
Oliver Heins he...@sopos.org  http://www.sopos.org/olli
GPG: F27A BA8C 1CFB B905 65A8  2544 0F07 B675 9A00 D827
1024D/9A00D827 2004-09-24 -- gpg --recv-keys 0x9A00D827
Please avoid sending me Word or PowerPoint attachments:
http://www.gnu.org/philosophy/no-word-attachments.html
___
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
___


Re: [NTG-context] \startquotation, grid and footnote

2011-01-16 Thread Oliver Heins
Wolfgang Schuster schuster.wolfg...@googlemail.com writes:

 \mainlanguage[de]
 \setuplanguage[de][leftquotation=\rightguillemot,rightquotation=\leftguillemot]

 With MkIV you can just write

 \setuplanguage[de][leftquotation=»,rightquotation=«]

 \setupquotation[
 before={\startlinecorrection[blank]\noindentation},
 after={\stoplinecorrection},
 style=\tfx]

 \setupdelimitedtext
   [blockquote]
   [spacebefore=line,
style=\tfx]

 […]
 
 \startquotation
  \getbuffer[quot]\footnote{foobar}
 \stopquotation

 \startblockquote
 …
 \stopblockquote

Thank you Wolfgang,

it works.

Best regards,
 olli


-- 
Oliver Heins he...@sopos.org  http://www.sopos.org/olli
GPG: F27A BA8C 1CFB B905 65A8  2544 0F07 B675 9A00 D827
1024D/9A00D827 2004-09-24 -- gpg --recv-keys 0x9A00D827
Please avoid sending me Word or PowerPoint attachments:
http://www.gnu.org/philosophy/no-word-attachments.html
___
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
___


[NTG-context] \startquotation, grid and footnote

2011-01-15 Thread Oliver Heins
Hello,

I have to typeset paragraphed quotations in a smaller font (and maybe
a smaller baselineskip, but this is not necessary) and with larger
margins.  However, after the quotation, the main text has to be on the
grid again.

Main Text Main Text
Main Text (on grid)
Main Text Main Text
Main Text (on grid)
Main Text Main Text

  quotation  text
  (need not to be
  on  grid, in  a
  smaller   font) 
  quotation text

Main Text Main Text
Main Text (on grid)
Main Text Main Text
Main Text (on grid)
Main Text Main Text


I tried to use contexts quotation-mechanism, but it puts quotationmarks
around the quotation, which is not only unnecessary (as the smaller font
size marks the paragraph as a quotation already), but a problem, because
footnotemarks appear right in front of the ending quotation mark
(»quot¹« instead of »quot«¹, which would be right).

Footnotes seem to be a bigger problem.  When using the linecorrection
mechanism (either with \start|\stoplinecorrection and with
\placeongrid), the footnotetexts don't get typeset at all.  They seem to
get lost within the linecorrection environment.

TIA for your help,
 olli


\setuppapersize[A5][A4]
\setuplayout[location=middle,
  marking=on,
  offset=0mm,
  grid=yes,
]

\mainlanguage[de]
\setuplanguage[de][leftquotation=\rightguillemot,rightquotation=\leftguillemot]

\setupquotation[
before={\startlinecorrection[blank]\noindentation},
after={\stoplinecorrection},
style=\tfx]

\def\begquote{%
  \placeongrid[low]\bgroup
\rightskip=10mm \leftskip=10mm \baselineskip=13pt
\blank[small]
\noindentation\small
}
\def\endquote{%
\blank[small]
  \egroup
}

\startbuffer[quot]
  Ein autobiografischer Spielfilm ohne Bekenntnis des Regisseurs und
  ohne dessen Verkörperung einer Figur wird nur als fiktionale
  Biografie verstanden. Ein autobiografischer Spielfilm ohne
  Bekenntnis des Regisseurs, aber mit dessen Verkörperung einer
  fiktionalen Figur wird zumindest selbstreflexiv gedeutet.
\stopbuffer

\showgrid

\starttext

\input tufte

\startquotation
  \getbuffer[quot]\footnote{foobar}
\stopquotation

\input tufte

\begquote
  \getbuffer[quot]\footnote{barbaz}
\endquote

\input tufte

\stoptext


-- 
Oliver Heins he...@sopos.org  http://www.sopos.org/olli
GPG: F27A BA8C 1CFB B905 65A8  2544 0F07 B675 9A00 D827
1024D/9A00D827 2004-09-24 -- gpg --recv-keys 0x9A00D827
Please avoid sending me Word or PowerPoint attachments:
http://www.gnu.org/philosophy/no-word-attachments.html
___
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
___


Re: [NTG-context] \startquotation, grid and footnote

2011-01-15 Thread Oliver Heins
I forgot to say that I use mkiv.

 olli
-- 
Oliver Heins he...@sopos.org  http://www.sopos.org/olli
GPG: F27A BA8C 1CFB B905 65A8  2544 0F07 B675 9A00 D827
1024D/9A00D827 2004-09-24 -- gpg --recv-keys 0x9A00D827
Please avoid sending me Word or PowerPoint attachments:
http://www.gnu.org/philosophy/no-word-attachments.html
___
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
___


Re: [NTG-context] \startquotation, grid and footnote

2011-01-15 Thread Wolfgang Schuster

Am 15.01.2011 um 11:44 schrieb Oliver Heins:

 Hello,
 
 I have to typeset paragraphed quotations in a smaller font (and maybe
 a smaller baselineskip, but this is not necessary) and with larger
 margins.  However, after the quotation, the main text has to be on the
 grid again.
 
Main Text Main Text
Main Text (on grid)
Main Text Main Text
Main Text (on grid)
Main Text Main Text
 
  quotation  text
  (need not to be
  on  grid, in  a
  smaller   font) 
  quotation text
 
Main Text Main Text
Main Text (on grid)
Main Text Main Text
Main Text (on grid)
Main Text Main Text
 
 
 I tried to use contexts quotation-mechanism, but it puts quotationmarks
 around the quotation, which is not only unnecessary (as the smaller font
 size marks the paragraph as a quotation already), but a problem, because
 footnotemarks appear right in front of the ending quotation mark
 (»quot¹« instead of »quot«¹, which would be right).
 
 Footnotes seem to be a bigger problem.  When using the linecorrection
 mechanism (either with \start|\stoplinecorrection and with
 \placeongrid), the footnotetexts don't get typeset at all.  They seem to
 get lost within the linecorrection environment.
 
 TIA for your help,
 olli
 
 
 \setuppapersize[A5][A4]
 \setuplayout[location=middle,
  marking=on,
  offset=0mm,
  grid=yes,
 ]
 
 \mainlanguage[de]
 \setuplanguage[de][leftquotation=\rightguillemot,rightquotation=\leftguillemot]

With MkIV you can just write

\setuplanguage[de][leftquotation=»,rightquotation=«]

 \setupquotation[
 before={\startlinecorrection[blank]\noindentation},
 after={\stoplinecorrection},
 style=\tfx]

\setupdelimitedtext
  [blockquote]
  [spacebefore=line,
   style=\tfx]

 […]
 
 \startquotation
  \getbuffer[quot]\footnote{foobar}
 \stopquotation

\startblockquote
…
\stopblockquote

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
___


[NTG-context] heading in margin + grid

2010-11-21 Thread Philipp Gesang
Dear fellow Contexters,

there are some subheadings I’d like to place in the margin
approximately like that:

···8

\def\text{knuth}

\setuplayout[grid=yes] \showgrid

\setuphead[section][
  %grid=yes,
  style={\tf\bf\color[red]},
  command=\placeheadinmargin,
  before=,after=,
]

\setupwhitespace[none]

\def\placeheadinmargin#1#2{%
  %\margintitle{#2}%
  \margintitle{\raise-\baselineskip\hbox{#2}}% needed with grid
}

\starttext

\dorecurse{10}{%
  \section{\text}
  \input \text
  \par
}

\stoptext

···8

Question is: how do I get rid of the empty line before the
heading? I thought I exhausted every possibility by unsetting the
‘after’ and ‘before’ keys and disabling interpar whitespace --
but not quite!

Thanks for any suggestions, Philipp

-- 
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments


pgp8JCZc3xhTu.pgp
Description: PGP signature
___
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
___


Re: [NTG-context] heading in margin + grid

2010-11-21 Thread Wolfgang Schuster

Am 21.11.2010 um 12:28 schrieb Philipp Gesang:

 Dear fellow Contexters,
 
 there are some subheadings I’d like to place in the margin
 approximately like that:

\setuplayout[grid=yes]\showgrid

\define[2]\SectionCommand
  {\inleftmargin{#2}}

\setuphead
  [section]
  [alternative=text,
   style=bold,
   color=red,
   command=\SectionCommand,
   distance=0pt,
   before={\blank[nowhite]}]

\starttext

\dorecurse{10}
  {\section{Knuth}
   \input knuth\par}

\stoptext

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
___


Re: [NTG-context] heading in margin + grid

2010-11-21 Thread Philipp Gesang
On 2010-11-21 13:22:32, Wolfgang Schuster wrote:
 
 Am 21.11.2010 um 12:28 schrieb Philipp Gesang:
 
  Dear fellow Contexters,
  
  there are some subheadings I’d like to place in the margin
  approximately like that:
 
 \setuplayout[grid=yes]\showgrid
 
 \define[2]\SectionCommand
   {\inleftmargin{#2}}
 
 \setuphead
   [section]
   [alternative=text,
style=bold,
color=red,
command=\SectionCommand,
distance=0pt,
before={\blank[nowhite]}]
 
 \starttext
 
 \dorecurse{10}
   {\section{Knuth}
\input knuth\par}
 
 \stoptext
 
 Wolfgang

Works like a charm, many, many thanks!

 
 ___
 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
 ___

-- 
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments


pgp51fsWJ1EvS.pgp
Description: PGP signature
___
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
___


Re: [NTG-context] Grid typesetting

2010-10-30 Thread Andrzej Orłowski-Skoczyk
On 10/23/2010 06:18 AM, Wolfgang Schuster wrote:
 \setuplayout[grid=yes]
 %\showgrid
 \starttext
 \title{Example texts}
 \subject{Knuth}
 \input knuth
 \subject{Tufte}
 \input tufte
 \stoptext

Thank you very much. It worked.

This puzzled me a lot, as seemingly the same setup refused to work in my
document. Then I started to delete other preamble content step by step,
and the grid still didn't work after I removed all of it. Then I found
out that the grid option was not being read at all, because there was
a space character before the comma. My setuplayout looked like that:
\setuplayout[%%
width=105mm ,%%
height=162mm ,%%
backspace=20mm ,%%
topspace=18mm ,%%
header=0pt ,%%
footerdistance=5mm ,%%
footer=5mm ,%%
marking=off ,%%
location=doublesided,%%
veroffset=5mm ,%%
grid=yes ,%% space character ruins the option
margin=15mm ,%%
%top=5mm ,%%
]%%

When can I use a space like that, and I can't? I found out that also
some other options can't be followed by a space. Why is that?
-- 
Andrzej Orłowski-Skoczyk



signature.asc
Description: OpenPGP digital signature
___
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
___


Re: [NTG-context] Grid typesetting

2010-10-30 Thread Wolfgang Schuster

Am 30.10.2010 um 21:42 schrieb Andrzej Orłowski-Skoczyk:

 On 10/23/2010 06:18 AM, Wolfgang Schuster wrote:
 \setuplayout[grid=yes]
 %\showgrid
 \starttext
 \title{Example texts}
 \subject{Knuth}
 \input knuth
 \subject{Tufte}
 \input tufte
 \stoptext
 
 Thank you very much. It worked.
 
 This puzzled me a lot, as seemingly the same setup refused to work in my
 document. Then I started to delete other preamble content step by step,
 and the grid still didn't work after I removed all of it. Then I found
 out that the grid option was not being read at all, because there was
 a space character before the comma. My setuplayout looked like that:
 \setuplayout[%%
   width=105mm ,%%
   height=162mm ,%%
   backspace=20mm ,%%
   topspace=18mm ,%%
   header=0pt ,%%
   footerdistance=5mm ,%%
   footer=5mm ,%%
   marking=off ,%%
   location=doublesided,%%
   veroffset=5mm ,%%
   grid=yes ,%% space character ruins the option
   margin=15mm ,%%
   %top=5mm ,%%
 ]%%
 
 When can I use a space like that, and I can't? I found out that also
 some other options can't be followed by a space. Why is that?

Space are only allowed before keys, in all other places a space is either a 
space in the key or the value itself, in your case it works with the dimensions 
because they are passed to normal tex dimension but never rely on this.

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
___


[NTG-context] Grid typesetting

2010-10-22 Thread Andrzej Orłowski-Skoczyk

Hello Contexters

I've been typesetting (mainly books and reports) in LaTeX for ca 15 years now. 
Recently I got really fed up with various problems related to typesetting on 
grid in LaTeX, and this is how I learned about ConTeXt. You can't imagine how 
excited I was when I started reading about it, especially given my recent 
grid-related LaTeX frustrations. Now I'm past all the ConTeXt manuals available 
in English, but still with no practical experience. ConTeXt is still a wild 
animal to be tamed, for me, but with a lot of sex appeal.

So - it's grid that attracted me. But I can't get it - the grid - in my test 
document. I find it hard to understand what the below commands (which are 
hardly documented) do:
- placeongrid,
- moveongrid,
- start/stop|linecorrection
and how is framed related to them. I experimented with various 
settings/combinations of the above, but none seem to actually FORCE my content on the 
grid.
The explanation in the manual is not clear for me, there is no explanation in 
the Wikia.

What I need is a way to FORCE a line of text onto nearest grid line available 
(so that baselines match), for example:
- on page opening a chapter, so that all body text is forced on grid regardless 
of the amount of space taken by headers etc.,
- on any page, when the text is being interrupted by figures, tables, formulas 
or fancy breaks.
Is there an easy way to accomplish that? By 'easy' I mean other than manual 
setting the height of headers/figures/tables/formulas/fancy breaks so that 
following text sits on the grid (which is more or less also doable in LaTeX).

Thank you.
--
Andrzej Orłowski-Skoczyk
___
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
___


Re: [NTG-context] Grid typesetting

2010-10-22 Thread Wolfgang Schuster

Am 22.10.2010 um 21:59 schrieb Andrzej Orłowski-Skoczyk:

 Hello Contexters
 
 I've been typesetting (mainly books and reports) in LaTeX for ca 15 years 
 now. Recently I got really fed up with various problems related to 
 typesetting on grid in LaTeX, and this is how I learned about ConTeXt. You 
 can't imagine how excited I was when I started reading about it, especially 
 given my recent grid-related LaTeX frustrations. Now I'm past all the ConTeXt 
 manuals available in English, but still with no practical experience. ConTeXt 
 is still a wild animal to be tamed, for me, but with a lot of sex appeal.
 
 So - it's grid that attracted me. But I can't get it - the grid - in my test 
 document. I find it hard to understand what the below commands (which are 
 hardly documented) do:
 - placeongrid,
 - moveongrid,
 - start/stop|linecorrection
 and how is framed related to them. I experimented with various 
 settings/combinations of the above, but none seem to actually FORCE my 
 content on the grid.
 The explanation in the manual is not clear for me, there is no explanation in 
 the Wikia.
 
 What I need is a way to FORCE a line of text onto nearest grid line available 
 (so that baselines match), for example:
 - on page opening a chapter, so that all body text is forced on grid 
 regardless of the amount of space taken by headers etc.,
 - on any page, when the text is being interrupted by figures, tables, 
 formulas or fancy breaks.
 Is there an easy way to accomplish that? By 'easy' I mean other than manual 
 setting the height of headers/figures/tables/formulas/fancy breaks so that 
 following text sits on the grid (which is more or less also doable in LaTeX).

\setuplayout[grid=yes]
%\showgrid
\starttext
\title{Example texts}
\subject{Knuth}
\input knuth
\subject{Tufte}
\input tufte
\stoptext

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
___


Re: [NTG-context] placing a paragraph with non-standard interlinear spacing onto the grid

2010-10-03 Thread Talal Al-Azem
Dear all,

By way of further definition and clarification of the issue: back in the world 
of LaTeX, I was kindly given the following code on CTT by Donald Arseneau to 
produce the desired effect. Mind you, it was only meant to work with a 
paragraph if the entire paragraph was on one page; it wouldn't work if split 
across pages:

%%% Donald Arseneau’s Gridblock Environment %%%
% For placing paragraphs into a box, and that box then
% being placed on a “grid” of the baselineskip. This ensures
% that following paragraphs are also on the grid.
\makeatletter
\...@ifundefined{@tempdimc}{\newdim...@tempdimc}{} 
\newenvironment{gridblock}{\par 
  \setb...@tempboxa\vtop\bgroup 
}{\par\egroup 
  % measurements of top 
  \...@tempdima=\ht\@tempboxa 
  \...@tempdimc=\dp\@tempboxa 
  \ifd...@tempdima\ht\strutbox 
\advan...@tempdimc\@tempdima 
\...@tempdima=\ht\strutbox 
\advan...@tempdimc-\@tempdima 
  \fi 
  % measurements of bottom 
  \setb...@tempboxa\vbox{\unvbox\@tempboxa}% 
  \ifdim\...@tempboxa\dp\strutbox 
\...@tempdimb=\dp\strutbox 
  \else 
\...@tempdimb=\dp\@tempboxa 
  \fi 
 \advan...@tempdimc-\@tempdimb 
  \...@tempcnta=\@tempdimc 
  \divi...@tempcnta\baselineskip 
  \advan...@tempdimc -...@tempcnta\baselineskip 
  \ifd...@tempdimc 2\vfuzz \advan...@tempdimc-\baselineskip \fi 
  \divi...@tempdimc\tw@ 
  \vbox t...@tempdima{}% 
  \nobreak \nointerlineskip \ker...@tempdima \ker...@tempdimc \nobreak 
  \b...@tempboxa 
  \nobreak \nointerlineskip \ker...@tempdimb \ker...@tempdimc \nobreak 
  \hbox{\vrule height \z@ width \z@ depth \...@tempdimb}% 
} 
\makeatother


Seeing how systematised ConTeXt is, I'm assuming something much simpler could 
probably be used to achieve the same effect?

Kind regards,
Talal
On 3 Oct 2010, at 20:10, Talal Al-Azem wrote:

 By way of further definition and clarification of the issue: back in the 
 world of LaTeX, I was kindly given the following code on CTT by Donald 
 Arseneau to produce the desired effect. Mind you, it was only meant to work 
 with a paragraph if the entire paragraph was on one page; it wouldn't work if 
 split across pages:
 
 %%% Donald Arseneau’s Gridblock Environment %%%
 % For placing paragraphs into a box, and that box then
 % being placed on a “grid” of the baselineskip. This ensures
 % that following paragraphs are also on the grid.
 \makeatletter
 \...@ifundefined{@tempdimc}{\newdim...@tempdimc}{} 
 \newenvironment{gridblock}{\par 
   \setb...@tempboxa\vtop\bgroup 
 }{\par\egroup 
   % measurements of top 
   \...@tempdima=\ht\@tempboxa 
   \...@tempdimc=\dp\@tempboxa 
   \ifd...@tempdima\ht\strutbox 
 \advan...@tempdimc\@tempdima 
 \...@tempdima=\ht\strutbox 
 \advan...@tempdimc-\@tempdima 
   \fi 
   % measurements of bottom 
   \setb...@tempboxa\vbox{\unvbox\@tempboxa}% 
   \ifdim\...@tempboxa\dp\strutbox 
 \...@tempdimb=\dp\strutbox 
   \else 
 \...@tempdimb=\dp\@tempboxa 
   \fi 
  \advan...@tempdimc-\@tempdimb 
   \...@tempcnta=\@tempdimc 
   \divi...@tempcnta\baselineskip 
   \advan...@tempdimc -...@tempcnta\baselineskip 
   \ifd...@tempdimc 2\vfuzz \advan...@tempdimc-\baselineskip \fi 
   \divi...@tempdimc\tw@ 
   \vbox t...@tempdima{}% 
   \nobreak \nointerlineskip \ker...@tempdima \ker...@tempdimc \nobreak 
   \b...@tempboxa 
   \nobreak \nointerlineskip \ker...@tempdimb \ker...@tempdimc \nobreak 
   \hbox{\vrule height \z@ width \z@ depth \...@tempdimb}% 
 } 
 \makeatother
 
 
 Seeing how systematised ConTeXt is, I'm assuming something much simpler could 
 probably be used to achieve the same effect?
 
 Kind regards,
 Talal
 
 
 On 2 Oct 2010, at 23:23, Talal Al-Azem wrote:
 
 Dear all,
 
 This is important for anyone working with mixed language (font) texts. In my 
 example,  the overall document is Latin-based (e.g. English), with a 
 paragraph of Arabic text; I want this Arabic paragraph as a whole to fit 
 onto the grid (though obviously the individual Arabic lines of the paragraph 
 would not).
 
 Currently, when I typeset an English paragraph, followed by an Arabic 
 paragraph, followed by an English paragraph, the second English paragraph is 
 no longer on the grid, having been throw off by the Arabic one. I'm looking 
 for some way to automatically calculate and fill in the vspace needed for 
 this.
 
 This is not the same as the issue of an Arabic word or phrase (or mathematic 
 formula) being typeset in the midst of Latin text, as discussed 
 http://www.mail-archive.com/ntg-context@ntg.nl/msg46163.html. Having read a 
 few other matters on the mailing list (largely involving Idris and Hans), 
 I'm sure it's possible, but I can't figure it out.
 
 Any help would be most appreciated.
 
 Kind regards,
 Talal
 

___
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

Re: [NTG-context] placing a paragraph with non-standard interlinear spacing onto the grid

2010-10-03 Thread Hans Hagen

On 3-10-2010 9:14, Talal Al-Azem wrote:

Dear all,

By way of further definition and clarification of the issue: back in the world 
of LaTeX, I was kindly given the following code on CTT by Donald Arseneau to 
produce the desired effect. Mind you, it was only meant to work with a 
paragraph if the entire paragraph was on one page; it wouldn't work if split 
across pages:


does \setulayout[grid=yes] give acceptable results?


-
  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
___


Re: [NTG-context] placing a paragraph with non-standard interlinear spacing onto the grid

2010-10-03 Thread Wolfgang Schuster

Am 03.10.2010 um 00:23 schrieb Talal Al-Azem:

 Dear all,
 
 This is important for anyone working with mixed language (font) texts. In my 
 example,  the overall document is Latin-based (e.g. English), with a 
 paragraph of Arabic text; I want this Arabic paragraph as a whole to fit onto 
 the grid (though obviously the individual Arabic lines of the paragraph would 
 not).
 
 Currently, when I typeset an English paragraph, followed by an Arabic 
 paragraph, followed by an English paragraph, the second English paragraph is 
 no longer on the grid, having been throw off by the Arabic one. I'm looking 
 for some way to automatically calculate and fill in the vspace needed for 
 this.
 
 This is not the same as the issue of an Arabic word or phrase (or mathematic 
 formula) being typeset in the midst of Latin text, as discussed 
 http://www.mail-archive.com/ntg-context@ntg.nl/msg46163.html. Having read a 
 few other matters on the mailing list (largely involving Idris and Hans), I'm 
 sure it's possible, but I can't figure it out.
 
 Any help would be most appreciated.

\setuplayout[grid=yes]\showgrid

\starttext

\input knuth

\startbaselinecorrection\setupinterlinespace[line=3.6ex]
\input knuth
\stopbaselinecorrection

\input knuth

\stoptext

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
___


Re: [NTG-context] placing a paragraph with non-standard interlinear spacing onto the grid

2010-10-03 Thread Talal Al-Azem
Hello Hans and Wolfgang,

Hans: Thanks for your reply. No, simply setting up the grid does not work. 
Because of the size of Arabic fonts relative to latin fonts, the Arabic 
paragraph naturally needs a bit more interlinear spacing; as such, I do not 
expect the paragraph to lineup on the grid (effectively, I am happy to treat it 
like one would a graphic or math equation). But in the English paragraph which 
follows, I would like the English paragraph to be realigned on the grid.

BUT: it seems that Wolfgang's suggestion works well! (At least with my minimal 
example, which I've attached below). Thank you both so much.

Amazing. I cannot express how impressed I am with ConTeXt at the moment, and 
how what used to require so much hacking in LaTeX (which I never could have 
come up with), and so many myriad packages, is all largely done from within 
ConTeXt itself! My last hurdle for shifting my work into ConTeXt remains the 
issue of the features needed for critical editions--most importantly the 
ability to key lemmas to line numbers; but that will be left to a dedicated 
email.

Many thanks to you both again, and to all those who've played a role in the 
development of ConTeXt. :-)

Kind regards,
Talal



testminimal.tex
Description: Binary data


testminimal.pdf
Description: Adobe PDF document


On 3 Oct 2010, at 20:50, Hans Hagen wrote:

 On 3-10-2010 9:14, Talal Al-Azem wrote:
 Dear all,
 
 By way of further definition and clarification of the issue: back in the 
 world of LaTeX, I was kindly given the following code on CTT by Donald 
 Arseneau to produce the desired effect. Mind you, it was only meant to work 
 with a paragraph if the entire paragraph was on one page; it wouldn't work 
 if split across pages:
 
 does \setulayout[grid=yes] give acceptable results?
 
 
 -
  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
___


Re: [NTG-context] placing a paragraph with non-standard interlinear spacing onto the grid

2010-10-03 Thread Talal Al-Azem
Dear Hans and Wolfgang (et al),

Unfortunately, I think I may have spoken too soon, as I've run into a small 
problem. :-)  Using Wolfgang's suggestion of baselinecorrection:

\startbaselinecorrection\setupinterlinespace[line=5ex]
...
\stopbaselinecorrection

I can no longer get footnotes which are in the Arabic paragraph to work. The 
footnote marker in the text shows up; but that particular footnote does not 
show at the bottom of the page, though a footnote from text outside of that 
paragraph do show, with their correct numbering. See attachments for an example.

Kind regards,
Talal



testminimal.tex
Description: Binary data


testminimal.pdf
Description: Adobe PDF document


On 3 Oct 2010, at 22:47, Talal Al-Azem wrote:

 Hello Hans and Wolfgang,
 
 Hans: Thanks for your reply. No, simply setting up the grid does not work. 
 Because of the size of Arabic fonts relative to latin fonts, the Arabic 
 paragraph naturally needs a bit more interlinear spacing; as such, I do not 
 expect the paragraph to lineup on the grid (effectively, I am happy to treat 
 it like one would a graphic or math equation). But in the English paragraph 
 which follows, I would like the English paragraph to be realigned on the grid.
 
 BUT: it seems that Wolfgang's suggestion works well! (At least with my 
 minimal example, which I've attached below). Thank you both so much.
 
 Amazing. I cannot express how impressed I am with ConTeXt at the moment, and 
 how what used to require so much hacking in LaTeX (which I never could have 
 come up with), and so many myriad packages, is all largely done from within 
 ConTeXt itself! My last hurdle for shifting my work into ConTeXt remains the 
 issue of the features needed for critical editions--most importantly the 
 ability to key lemmas to line numbers; but that will be left to a dedicated 
 email.
 
 Many thanks to you both again, and to all those who've played a role in the 
 development of ConTeXt. :-)
 
 Kind regards,
 Talal
 
 testminimal.textestminimal.pdf
 
 On 3 Oct 2010, at 20:50, Hans Hagen wrote:
 
 On 3-10-2010 9:14, Talal Al-Azem wrote:
 Dear all,
 
 By way of further definition and clarification of the issue: back in the 
 world of LaTeX, I was kindly given the following code on CTT by Donald 
 Arseneau to produce the desired effect. Mind you, it was only meant to work 
 with a paragraph if the entire paragraph was on one page; it wouldn't work 
 if split across pages:
 
 does \setulayout[grid=yes] give acceptable results?
 
 
 -
 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
 ___

___
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
___


Re: [NTG-context] placing a paragraph with non-standard interlinear spacing onto the grid

2010-10-03 Thread Hans Hagen

On 4-10-2010 12:40, Talal Al-Azem wrote:

Dear Hans and Wolfgang (et al),

Unfortunately, I think I may have spoken too soon, as I've run into a small 
problem. :-)  Using Wolfgang's suggestion of baselinecorrection:

\startbaselinecorrection\setupinterlinespace[line=5ex]

\stopbaselinecorrection

I can no longer get footnotes which are in the Arabic paragraph to work. The 
footnote marker in the text shows up; but that particular footnote does not 
show at the bottom of the page, though a footnote from text outside of that 
paragraph do show, with their correct numbering. See attachments for an example.


does

\automigrateinserts

help?

(concerning the grid ... at some point we can associate lineht/dp with a 
font ... it's rather trivial to influence)


-
  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
___


Re: [NTG-context] placing a paragraph with non-standard interlinear spacing onto the grid

2010-10-03 Thread Talal Al-Azem
 Unfortunately, I think I may have spoken too soon, as I've run into a small 
 problem. :-)  Using Wolfgang's suggestion of baselinecorrection:
 
 \startbaselinecorrection\setupinterlinespace[line=5ex]
 
 \stopbaselinecorrection
 
 I can no longer get footnotes which are in the Arabic paragraph to work. The 
 footnote marker in the text shows up; but that particular footnote does not 
 show at the bottom of the page, though a footnote from text outside of that 
 paragraph do show, with their correct numbering. See attachments for an 
 example.
 
 does
 
 \automigrateinserts
 
 help?

It does indeed. Many thanks, Hans, for your quick responses and help!

Kind regards,
Talal


 (concerning the grid ... at some point we can associate lineht/dp with a font 
 ... it's rather trivial to influence)


___
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
___


[NTG-context] placing a paragraph with non-standard interlinear spacing onto the grid

2010-10-02 Thread Talal Al-Azem
Dear all,

This is important for anyone working with mixed language (font) texts. In my 
example,  the overall document is Latin-based (e.g. English), with a paragraph 
of Arabic text; I want this Arabic paragraph as a whole to fit onto the grid 
(though obviously the individual Arabic lines of the paragraph would not).

Currently, when I typeset an English paragraph, followed by an Arabic 
paragraph, followed by an English paragraph, the second English paragraph is no 
longer on the grid, having been throw off by the Arabic one. I'm looking for 
some way to automatically calculate and fill in the vspace needed for this.

This is not the same as the issue of an Arabic word or phrase (or mathematic 
formula) being typeset in the midst of Latin text, as discussed 
http://www.mail-archive.com/ntg-context@ntg.nl/msg46163.html. Having read a few 
other matters on the mailing list (largely involving Idris and Hans), I'm sure 
it's possible, but I can't figure it out.

Any help would be most appreciated.

Kind regards,
Talal___
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
___


[NTG-context] grid typesetting with Mark IV

2010-09-17 Thread sebastien-listes
Hi,

I don't get the expected result when I compile the following code with
context minimal (ConTeXt  ver: 2010.09.14 23:27 MKIV).

With mk II (ConTeXt  ver: 2010.09.14 23:27 MKII) it's ok -- lines are
well aligned on the grid.

Any clue?

Here's the code:

\setuplayout[grid=yes,marking=on]
\showgrid
\showframe

\setuphead[chapter][%
  before={\blank[force,2*line]},
  after={\blank[1*line]}]

\starttext

\chapter{test}

\input tufte

\stoptext

PS : thanks for the nice pics and slides of the context meeting!

PS II : to Idris, I'd be *very* happy to contribute to a translation
of your forthcoming book into french.
-- 
Sébastien Mengin
Édition et logiciels libres
 Mise en page avec LaTeX 
http://edilibre.net
tél. : 06 84 88 49 17
jid. : sebastien-men...@jabber.org

___
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
___


Re: [NTG-context] natural tables -- split 'n grid

2010-09-12 Thread Hans Hagen

On 11-9-2010 6:03, Philipp Gesang wrote:

Hi,

line correction leads to unwanted vertical spacing in split
natural tables. Example (in both MkII and MkIV):

··8·
%\setuplayout[grid=yes] % not required to reproduce it
\starttext
\dorecurse{4}{\input knuth\par}
\startlinecorrection% fine without line correction
\bTABLE[split=yes]  % fine with split=no
\bTABLEhead
\bTR\bTH p\eTH\bTH q\eTH\bTH p or q\eTH\eTR
\eTABLEhead
\bTABLEbody
\bTR\bTC False\eTC\bTC False\eTC\bTC False\eTC\eTR
\bTR\bTC True\eTC\bTC False\eTC\bTC True\eTC\eTR
\bTR\bTC False\eTC\bTC True\eTC\bTC True\eTC\eTR
\bTR\bTC True\eTC\bTC True\eTC\bTC True\eTC\eTR
\eTABLEbody
\eTABLE
\stoplinecorrection
\stoptext
··8·

What am I missing here? Is line correction even recommended for
use with tables? Why isn't it ignored if grid typesetting is
switched off? Thanks in advance,


that you should not use linecorrection with split


-
  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
___


[NTG-context] natural tables -- split 'n grid

2010-09-11 Thread Philipp Gesang
Hi,

line correction leads to unwanted vertical spacing in split
natural tables. Example (in both MkII and MkIV):

··8·
%\setuplayout[grid=yes] % not required to reproduce it
\starttext
\dorecurse{4}{\input knuth\par}
\startlinecorrection% fine without line correction
\bTABLE[split=yes]  % fine with split=no
\bTABLEhead
\bTR\bTH p\eTH\bTH q\eTH\bTH p or q\eTH\eTR
\eTABLEhead
\bTABLEbody
\bTR\bTC False\eTC\bTC False\eTC\bTC False\eTC\eTR
\bTR\bTC True\eTC\bTC False\eTC\bTC True\eTC\eTR
\bTR\bTC False\eTC\bTC True\eTC\bTC True\eTC\eTR
\bTR\bTC True\eTC\bTC True\eTC\bTC True\eTC\eTR
\eTABLEbody
\eTABLE
\stoplinecorrection
\stoptext
··8·

What am I missing here? Is line correction even recommended for
use with tables? Why isn't it ignored if grid typesetting is
switched off? Thanks in advance,

Philipp

-- 
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments


pgppUVXhT9VuC.pgp
Description: PGP signature
___
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
___


Re: [NTG-context] caught in the grid

2010-08-12 Thread Steffen Wolfrum

Am 12.08.2010 um 00:31 schrieb Hans Hagen:

 On 11-8-2010 9:49, Steffen Wolfrum wrote:
 Hi,
 
 
 as there is no setup for paragraphs (see thread before), I really don' know 
 how to come out of this trap:
 
 I need a tight interlinespace for the normal body text, but no lunatic 
 headings!!
 
 
 Have a look, please:
 
 I have no time now. I will document the grid snapper once I've finished the 
 (still somewhat experimental) mechanism.



OK. ... Just to avoid basic mistakes:

What is right syntax (direct/indirect)?
The results differ (see below) ...

Steffen



\definegridsnapping[MyGrid][no]

%\setuplayout[grid=no] % - alternative a
\setuplayout[grid=MyGrid] % - alternative b

\showgrid


\setuphead[chapter]

\starttext
   \chapter{one} \input tufte
   \chapter{one\\two}\input tufte
   \chapter{one\\two\\three} \input tufte
\stoptext

___
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
___


Re: [NTG-context] caught in the grid

2010-08-12 Thread Piotr Kopszak
You can play with embedding \section inside \start and
\stoplinecorrection to get rid of overlapping, but I'm not sure if
it's the right thing to do.

Piotr

2010/8/12 Steffen Wolfrum cont...@st.estfiles.de:

 Am 12.08.2010 um 00:31 schrieb Hans Hagen:

 On 11-8-2010 9:49, Steffen Wolfrum wrote:
 Hi,


 as there is no setup for paragraphs (see thread before), I really don' know 
 how to come out of this trap:

 I need a tight interlinespace for the normal body text, but no lunatic 
 headings!!


 Have a look, please:

 I have no time now. I will document the grid snapper once I've finished the 
 (still somewhat experimental) mechanism.



 OK. ... Just to avoid basic mistakes:

 What is right syntax (direct/indirect)?
 The results differ (see below) ...

 Steffen

 

 \definegridsnapping[MyGrid]    [no]

 %\setuplayout[grid=no] % - alternative a
 \setuplayout[grid=MyGrid] % - alternative b

 \showgrid


 \setuphead[chapter]

 \starttext
   \chapter{one}             \input tufte
   \chapter{one\\two}        \input tufte
   \chapter{one\\two\\three} \input tufte
 \stoptext

 ___
 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
 ___




-- 
http://okle.pl
___
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
___


Re: [NTG-context] caught in the grid

2010-08-12 Thread Hans Hagen

On 12-8-2010 12:30, Piotr Kopszak wrote:

You can play with embedding \section inside \start and
\stoplinecorrection to get rid of overlapping, but I'm not sure if
it's the right thing to do.


there will be more control over nested snapping

as said, the current mechanism is experimental

-
  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
___


Re: [NTG-context] caught in the grid

2010-08-12 Thread Steffen Wolfrum
This can only be used in single, controlled situations.
Look what happens when the section is to be placed at top of page:

\definegridsnapping[MyGrid] [off]
\showframe

\starttext

\setuplayout[grid=MyGrid]

\switchtobodyfont[42pt]
\setupinterlinespace[line=30pt]

Big text\crlf written in\crlf three row

\startlinecorrection
\section{One\\Two\\Three}
\stoplinecorrection

Big text\crlf written in\crlf three row

Big text\crlf written in\crlf three row

\startlinecorrection
\section{One\\Two\\Three}
\stoplinecorrection

Big text\crlf written in\crlf three row

\stoptext


Steffen



Am 12.08.2010 um 12:30 schrieb Piotr Kopszak:

 You can play with embedding \section inside \start and
 \stoplinecorrection to get rid of overlapping, but I'm not sure if
 it's the right thing to do.
 
 Piotr
 
 2010/8/12 Steffen Wolfrum cont...@st.estfiles.de:
 
 Am 12.08.2010 um 00:31 schrieb Hans Hagen:
 
 On 11-8-2010 9:49, Steffen Wolfrum wrote:
 Hi,
 
 
 as there is no setup for paragraphs (see thread before), I really don' 
 know how to come out of this trap:
 
 I need a tight interlinespace for the normal body text, but no lunatic 
 headings!!
 
 
 Have a look, please:
 
 I have no time now. I will document the grid snapper once I've finished the 
 (still somewhat experimental) mechanism.
 
 
 
 OK. ... Just to avoid basic mistakes:
 
 What is right syntax (direct/indirect)?
 The results differ (see below) ...
 
 Steffen
 
 
 
 \definegridsnapping[MyGrid][no]
 
 %\setuplayout[grid=no] % - alternative a
 \setuplayout[grid=MyGrid] % - alternative b
 
 \showgrid
 
 
 \setuphead[chapter]
 
 \starttext
   \chapter{one} \input tufte
   \chapter{one\\two}\input tufte
   \chapter{one\\two\\three} \input tufte
 \stoptext
 
 ___
 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
 ___
 
 
 
 
 -- 
 http://okle.pl
 ___
 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
___


[NTG-context] caught in the grid

2010-08-11 Thread Steffen Wolfrum
Hi,


as there is no setup for paragraphs (see thread before), I really don' know how 
to come out of this trap:

I need a tight interlinespace for the normal body text, but no lunatic 
headings!!


Have a look, please:

\definegridsnapping[MyGrid] [off]% broad/both/bold/local fit for the text

\starttext

\setuplayout[grid=MyGrid]

\switchtobodyfont[42pt]
 \setupinterlinespace[line=30pt]
 \lineskiplimit-\maxdimen
 Big text\crlf written in\crlf three row

\section{One\\Two\\Three}

 Big text\crlf written in\crlf three row

\stoptext


Literally the whole day I tried various grid key combinations ... for 
setuplayout and setuphead ... in vain.

I am going crazy!

Steffen
___
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
___


Re: [NTG-context] caught in the grid

2010-08-11 Thread Hans Hagen

On 11-8-2010 9:49, Steffen Wolfrum wrote:

Hi,


as there is no setup for paragraphs (see thread before), I really don' know how 
to come out of this trap:

I need a tight interlinespace for the normal body text, but no lunatic 
headings!!


Have a look, please:


I have no time now. I will document the grid snapper once I've finished 
the (still somewhat experimental) mechanism.


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
___


Re: [NTG-context] the grid (MkIV)

2010-04-27 Thread Hans Hagen

On 19-4-2010 1:37, Steffen Wolfrum wrote:

Hi,


how can I exclude a section head from grid?

Just compare setuplayout with grid=yes/no.

Is there a solution?


\showgrid

\starttext

\setuplayout[grid=yes]% [grid=no]
\setuphead[chapter][grid=none]

\chapter{one}

\page

\chapter{one\\line}

\page

\chapter{one\\line\\line}

\stoptext


how about

\setuplayout[grid=yes] \showgrid

\definegridsnapping[chapter][mindepth,maxheight,local]

\setuphead[chapter][grid=chapter,alternative=top]

\starttext
\chapter{one} \input tufte
\chapter{one\\two}\input tufte
\chapter{one\\two\\three} \input tufte
\stoptext



-
  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
___


Re: [NTG-context] the grid (MkIV)

2010-04-27 Thread Hans Hagen

On 27-4-2010 7:14, Steffen Wolfrum wrote:


I was reading spac-ver.mkiv on gridsnapping values ... but didn't find the 
local switch.

What's it about?


using local interlinespace vs bodyfont related

-
  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
___


Re: [NTG-context] the grid (MkIV)

2010-04-22 Thread Steffen Wolfrum

No answer at all ... Does that mean that nobody uses MkIV grid-typesting?

Or does that mean that excluding section heads from gridsnapping is impossible?


Steffen




Am 19.04.2010 um 13:37 schrieb Steffen Wolfrum:

 Hi,
 
 
 how can I exclude a section head from grid?
 
 Just compare setuplayout with grid=yes/no.
 
 Is there a solution?
 
 
 \showgrid
 
 \starttext
 
 \setuplayout[grid=yes]% [grid=no]
 \setuphead[chapter][grid=none]
 
 \chapter{one}
 
 \page
 
 \chapter{one\\line}
 
 \page
 
 \chapter{one\\line\\line}
 
 \stoptext
 
 
 
 Thanks,
 Steffen
 
 ___
 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
___


Re: [NTG-context] the grid (MkIV)

2010-04-22 Thread luigi scarso
On Thu, Apr 22, 2010 at 1:40 PM, Steffen Wolfrum cont...@st.estfiles.de wrote:

 No answer at all ... Does that mean that nobody uses MkIV grid-typesting?

 Or does that mean that excluding section heads from gridsnapping is 
 impossible?

sorry, no answer
BTW I was experimenting with \vtop

\chapter{\vtop{one\\line}}


-- 
luigi
___
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
___


Re: [NTG-context] the grid (MkIV)

2010-04-22 Thread Taco Hoekwater

Steffen Wolfrum wrote:

No answer at all ... Does that mean that nobody uses MkIV grid-typesting?


Nobody that wants to exclude section heads from the grid, it seems.


Or does that mean that excluding section heads from gridsnapping is impossible?


I would say that \setuphead[chapter][grid=none] is severely bugged,
I've added a tracker item to that effect. It does move the chapter
head off the grid, sort of (into the header ...)

Best wishes,

Taco
___
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
___


Re: [NTG-context] the grid (MkIV)

2010-04-22 Thread Hans Hagen

On 22-4-2010 2:18, Taco Hoekwater wrote:

Steffen Wolfrum wrote:

No answer at all ... Does that mean that nobody uses MkIV grid-typesting?


Nobody that wants to exclude section heads from the grid, it seems.


Or does that mean that excluding section heads from gridsnapping is
impossible?


I would say that \setuphead[chapter][grid=none] is severely bugged,
I've added a tracker item to that effect. It does move the chapter
head off the grid, sort of (into the header ...)


i have to check it but 'none' is not the same as 'no' or 'off'

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
___


Re: [NTG-context] the grid (MkIV)

2010-04-22 Thread Taco Hoekwater

Hans Hagen wrote:

On 22-4-2010 2:18, Taco Hoekwater wrote:

Steffen Wolfrum wrote:
No answer at all ... Does that mean that nobody uses MkIV 
grid-typesting?


Nobody that wants to exclude section heads from the grid, it seems.


Or does that mean that excluding section heads from gridsnapping is
impossible?


I would say that \setuphead[chapter][grid=none] is severely bugged,
I've added a tracker item to that effect. It does move the chapter
head off the grid, sort of (into the header ...)


i have to check it but 'none' is not the same as 'no' or 'off'


Well, no and off have no effect at all. As 'none' does something
at least, my guess was that it is just a little bugged.

Best wishes,
Taco
___
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
___


[NTG-context] Grid typesetting, colums and vertical spacing

2010-04-20 Thread Jan Pohanka


Hello,

I'm trying to typeset on the grid, but I also need to reduce vertical  
spacing around headings. Unfortunately when i specify the 'before/after'  
setting for head, grid typesetting fails.

Is there any option to make \blank more flexible?
(I'm using MKII)

example:


\setupoutput[pdftex]

\setuppapersize[A4,landscape][A4,landscape]
\setuplayout[backspace=0.5cm,topspace=0.5cm,top=0cm,footer=0.5cm,
 width=middle,height=middle,margin=0cm,header=0cm]

\setupbodyfont[10pt]

\mainlanguage[cz]
\enableregime[utf8]

\setuppagenumbering[location=]

\setuphead[section][style={\bf}]
\setuphead[section][before={\blank[halfline,flexible]}] % not working well
% \setuphead[section][after={\blank[halfline,flexible]}] % not working well


\starttext

\setuplayout[grid=yes] \showgrid
\definecolumnset[my][n=4,distance=1.2em,balance=yes] % balance not work

\startcolumnset[my]

\section{Pokus}
\input knuth
\input knuth
\subsection{Pokus 2}
\input knuth
\input knuth
\input knuth
\subsection{Pokus 3}
\input knuth

\stopcolumnset

\stoptext


greetings
Jan


--
Ing. Jan Pohanka
Department of Measurement
Faculty of Electrical Engineering
Czech Technical University
Technická 2, 16627 Praha 6
tel. 224352058
email: poha...@fel.cvut.cz
___
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
___


Re: [NTG-context] Grid typesetting, colums and vertical spacing

2010-04-20 Thread Peter Rolf
Hello Jan,

Am 20.04.2010 14:11, schrieb Jan Pohanka:
 
 Hello,
 
 I'm trying to typeset on the grid, but I also need to reduce vertical
 spacing around headings. Unfortunately when i specify the 'before/after'
 setting for head, grid typesetting fails.
 Is there any option to make \blank more flexible?
 (I'm using MKII)
 

see

http://www.pragma-ade.com/general/manuals/details.pdf

and (maybe outdated example)

http://archive.contextgarden.net/message/20051226.174723.f5c32d5c.en.html


Best wishes, Peter

 example:
 
 
 \setupoutput[pdftex]
 
 \setuppapersize[A4,landscape][A4,landscape]
 \setuplayout[backspace=0.5cm,topspace=0.5cm,top=0cm,footer=0.5cm,
  width=middle,height=middle,margin=0cm,header=0cm]
 
 \setupbodyfont[10pt]
 
 \mainlanguage[cz]
 \enableregime[utf8]
 
 \setuppagenumbering[location=]
 
 \setuphead[section][style={\bf}]
 \setuphead[section][before={\blank[halfline,flexible]}] % not working well
 % \setuphead[section][after={\blank[halfline,flexible]}] % not working well
 
 
 \starttext
 
 \setuplayout[grid=yes] \showgrid
 \definecolumnset[my][n=4,distance=1.2em,balance=yes] % balance not work
 
 \startcolumnset[my]
 
 \section{Pokus}
 \input knuth
 \input knuth
 \subsection{Pokus 2}
 \input knuth
 \input knuth
 \input knuth
 \subsection{Pokus 3}
 \input knuth
 
 \stopcolumnset
 
 \stoptext
 
 
 greetings
 Jan
 
 

___
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
___


[NTG-context] the grid (MkIV)

2010-04-19 Thread Steffen Wolfrum
Hi,


how can I exclude a section head from grid?

Just compare setuplayout with grid=yes/no.

Is there a solution?


\showgrid

\starttext

\setuplayout[grid=yes]% [grid=no]
\setuphead[chapter][grid=none]

\chapter{one}

\page

\chapter{one\\line}

\page

\chapter{one\\line\\line}

\stoptext



Thanks,
Steffen

___
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
___


[NTG-context] Grid typesetting, colums and vertical spacing

2010-04-19 Thread Honza Pohanka

Hello,

I'm trying to typeset on the grid, but I also need to reduce vertical  
spacing around headings. Unfortunately when i specify the 'before/after'  
setting for head, grid typesetting fails.

Is there any option to make \blank more flexible?
(I'm using MKII)

example:


\setupoutput[pdftex]

\setuppapersize[A4,landscape][A4,landscape]
\setuplayout[backspace=0.5cm,topspace=0.5cm,top=0cm,footer=0.5cm,
 width=middle,height=middle,margin=0cm,header=0cm]

\setupbodyfont[10pt]

\mainlanguage[cz]
\enableregime[utf8]

\setuppagenumbering[location=]

\setuphead[section][style={\bf}]
\setuphead[section][before={\blank[halfline,flexible]}] % not working well
% \setuphead[section][after={\blank[halfline,flexible]}] % not working well


\starttext

\setuplayout[grid=yes] \showgrid
\definecolumnset[my][n=4,distance=1.2em,balance=yes] % balance not work

\startcolumnset[my]

\section{Pokus}
\input knuth
\input knuth
\subsection{Pokus 2}
\input knuth
\input knuth
\input knuth
\subsection{Pokus 3}
\input knuth

\stopcolumnset

\stoptext


greetings
Jan


--
Tato zpráva byla vytvořena převratným poštovním klientem Opery:  
http://www.opera.com/mail/

___
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
___


Re: [NTG-context] grid in footnotes, was: Re: footnote marks fail

2010-04-14 Thread Hans Hagen

On 13-4-2010 3:33, Michael Saunders wrote:

Peter M?nster wrote:



\setupfootnotes[numbercommand=, textcommand=, style=, textstyle=,
  bodyfont=]


Thanks, Peter.  With some experimentation I got what I wanted.  For
the record, I'm using:

\definefontfeature[su][body][sups=yes,ordn=yes]%superior
\definefontfeature[nu][body][numr=yes]%numerator
\definefontfeature[po][body][pnum=yes,onum=yes]%proportional old style

\newcommand{\fnmstyle}{\addff{nu}\switchtobodyfont[12pt]}
\newcommand{\fntstyle}{\addff{po}}


i was not even aware that \newcommand was there ... probably more a 
catch for bibtex issues



\setupnote[footnote][location=columns,numbercommand=\fnmstyle,textcommand=\fntstyle,textstyle=\addff{su},align={normal,hanging},split=verystrict,interaction=yes]

I don't know quite why it works, but it works---except for one little
thing---there is a little vertical space between each footnote
(apparently because of the \switchtobodyfont[12pt]).


that will indeed define the interlinespace; also, the regular \high 
command does some snapping while with the supp feature you're dependent 
on what the fonts delivers as ht/dp of a glyph



-
  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
___


Re: [NTG-context] grid in footnotes, was: Re: footnote marks fail

2010-04-14 Thread Michael Saunders
 i was not even aware that \newcommand was there ... probably more a
catch for bibtex issues

I have been using it a lot since, although Context seems to use a lot
of brackets, it won't allow nested ones.  For example, I have to use:

\newcommand{\hfstyle}{\switchtobodyfont[15pt]}
\setupheader[style=\hfstyle]

because I'll get an error from:

\setupheader[style=\switchtobodyfont[15pt]]

Is there an easier way?

  \setupnote[footnote][location=columns,numbercommand=\fnmstyle,textcommand=\fntstyle,textstyle=\addff{su},align={normal,hanging},split=verystrict,interaction=yes]
 
  I don't know quite why it works, but it works---except for one little
  thing---there is a little vertical space between each footnote
 (apparently because of the \switchtobodyfont[12pt]).
 
 that will indeed define the interlinespace; also, the regular \high
 command does some snapping while with the supp feature you're dependent
 on what the fonts delivers as ht/dp of a glyph

I don't see how could you possibly use \high{} for the footnote marks
(\setupnote[footnote][?]).  Besides, as I understand it, \high{} just
rescales the body font---which always looks bad.   So, I don't want to
use \high{}.  I use my numr feature which gives me exactly the right
shape and height, but I have a little space between the footnotes.
How do I eliminate the space?  Maybe by setting a verytolerant grid
for the footnotes?  I don't know how.
___
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
___


Re: [NTG-context] grid in footnotes, was: Re: footnote marks fail

2010-04-14 Thread Hans Hagen

On 14-4-2010 4:51, Michael Saunders wrote:

i was not even aware that \newcommand was there ... probably more a

catch for bibtex issues

I have been using it a lot since, although Context seems to use a lot
of brackets, it won't allow nested ones.  For example, I have to use:

\newcommand{\hfstyle}{\switchtobodyfont[15pt]}
\setupheader[style=\hfstyle]

because I'll get an error from:

\setupheader[style=\switchtobodyfont[15pt]]


\setupheader[style={\switchtobodyfont[15pt]}]

-
  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
___


[NTG-context] grid in footnotes, was: Re: footnote marks fail

2010-04-13 Thread Michael Saunders
Peter M?nster wrote:


 \setupfootnotes[numbercommand=, textcommand=, style=, textstyle=,
  bodyfont=]

Thanks, Peter.  With some experimentation I got what I wanted.  For
the record, I'm using:

\definefontfeature[su][body][sups=yes,ordn=yes]%superior
\definefontfeature[nu][body][numr=yes]%numerator
\definefontfeature[po][body][pnum=yes,onum=yes]%proportional old style

\newcommand{\fnmstyle}{\addff{nu}\switchtobodyfont[12pt]}
\newcommand{\fntstyle}{\addff{po}}
\setupnote[footnote][location=columns,numbercommand=\fnmstyle,textcommand=\fntstyle,textstyle=\addff{su},align={normal,hanging},split=verystrict,interaction=yes]

I don't know quite why it works, but it works---except for one little
thing---there is a little vertical space between each footnote
(apparently because of the \switchtobodyfont[12pt]).

So I have one more question:  is there a way to force the footnotes
onto their own grid to prevent this?  I am already using
\setuplayout[...,grid=verytolerant], which I thought would take care
of it.
___
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
___


[NTG-context] grid + section in text - unwanted vertical space

2010-03-19 Thread Mikael Persson
Dear list,

With the following example:

\setuplayout[grid=yes]
\setuphead[section][alternative=text]

\starttext
\section{Test}\input knuth
\stoptext

I get the attached result. I would expect no empty line between the
section line and the rest of the paragraph. Any advices?

Best regards, Mikael

PS Using an updated MKIV


gridsec.pdf
Description: Adobe PDF document
___
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
___


Re: [NTG-context] grid + section in text - unwanted vertical space

2010-03-19 Thread Wolfgang Schuster

Am 19.03.10 08:21, schrieb Mikael Persson:

Dear list,

With the following example:

\setuplayout[grid=yes]
\setuphead[section][alternative=text]
   

\setuphead[section][alternative=text,strut=no]

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
___


Re: [NTG-context] grid + section in text - unwanted vertical space

2010-03-19 Thread Mikael Persson
On Fri, Mar 19, 2010 at 3:10 PM, Wolfgang Schuster
schuster.wolfg...@googlemail.com wrote:
 Am 19.03.10 08:21, schrieb Mikael Persson:

 Dear list,

 With the following example:

 \setuplayout[grid=yes]
 \setuphead[section][alternative=text]


 \setuphead[section][alternative=text,strut=no]

 Wolfgang

Thank you very much Wolfgang, that works perfectly!

Mikael
___
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
___


Re: [NTG-context] grid + section in text - unwanted vertical space

2010-03-19 Thread Alex Lubberts
My solution was ... :
\setuphead[section][grid={low,fit}]

Regards,
Alex

On vr, 2010-03-19 at 15:10 +0100, Wolfgang Schuster wrote:
 Am 19.03.10 08:21, schrieb Mikael Persson:
  Dear list,
 
  With the following example:
 
  \setuplayout[grid=yes]
  \setuphead[section][alternative=text]
 
 \setuphead[section][alternative=text,strut=no]
 
 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
 ___


-- 
Alex Lubberts a...@lubberts.org

___
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
___


[NTG-context] MkIV grid ?

2010-02-17 Thread Steffen Wolfrum
Hi,

I have seen Hans' reply to Peter Rolf from Nov. 19th 2009 on grid snapping 
(mkiv).
What has changed since then? Is there some more info somewhere?

I am missing my MkII optimized section setting, like  ... 
grid={page,3.5pt,fit,low}

Steffen
___
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
___


Re: [NTG-context] MkIV grid ?

2010-02-17 Thread Hans Hagen

On 17-2-2010 10:58, Steffen Wolfrum wrote:

Hi,

I have seen Hans' reply to Peter Rolf from Nov. 19th 2009 on grid snapping 
(mkiv).
What has changed since then? Is there some more info somewhere?

I am missing my MkII optimized section setting, like  ... 
grid={page,3.5pt,fit,low}


i have no time not to explain it but the system is somewhat different 
than in mkii


% \installsnapvalues{loose} {\v!maxdepth:0.8,\v!maxheight:0.8,\v!strut}
% \installsnapvalues{normal}{\v!maxdepth:1.0,\v!maxheight:1.0,\v!strut}
% \installsnapvalues{tight} {\v!maxdepth:1.2,\v!maxheight:1.2,\v!strut}

% none don't enlarge
% halfline enlarge by halfline/halfline
% line enlarge by line/line
% strutenlarge by ht/dp (default)
% firstalign to top line
% last align to bottom line
% mindepth round depth down
% maxdepth round depth up
% minheightround height down
% maxheightround height up

%D We're not downward compatible with \MKII !

\definegridsnapping[\v!normal]   [\v!maxheight,\v!maxdepth,\v!strut]
\definegridsnapping[\v!standard] [\v!maxheight,\v!maxdepth,\v!strut]
\definegridsnapping[\v!yes]  [\v!maxheight,\v!maxdepth,\v!strut]

\definegridsnapping[\v!strict]   [\v!maxdepth:0.8,\v!maxheight:0.8,\v!strut]
\definegridsnapping[\v!tolerant] [\v!maxdepth:1.2,\v!maxheight:1.2,\v!strut]

\definegridsnapping[\v!top]  [\v!minheight,\v!maxdepth,\v!strut]
\definegridsnapping[\v!bottom]   [\v!maxheight,\v!mindepth,\v!strut]
\definegridsnapping[\v!both] [\v!minheight,\v!mindepth,\v!strut]

\definegridsnapping[\v!broad][\v!maxheight,\v!maxdepth,\v!strut,0.8] 
% maybe 0.85
\definegridsnapping[\v!fit]  [\v!maxheight,\v!maxdepth,\v!strut,1.2] 
% tight 0.15


\definegridsnapping[\v!first][\v!first]
\definegridsnapping[\v!last] [\v!last]
\definegridsnapping[\v!high] [\v!minheight,\v!maxdepth,\v!none]
\definegridsnapping[\v!low]  [\v!maxheight,\v!mindepth,\v!none]
\definegridsnapping[\v!line] [\v!line]
\definegridsnapping[\v!strut][\v!strut]

\definegridsnapping[\v!max]  [\v!maxdepth,\v!maxheight,\v!strut]
\definegridsnapping[\v!min]  [\v!mindepth,\v!minheight,\v!strut]

in one (experimental) style i use:

% none will effectively smash the box to one line (zero inner) but is 
the same as strut as outer will snap

% however you can use {none,top:3} to move it down 3 lines then
% {local,strut} will use the style related settings and move one line 
down because the font is larger


\setuphead
  [chapter]
  [grid=strut]

\setuphead
  [section]
  [grid=strut]

most structure components will get a grid key and these are normally local

the bottomline is that you snap up/down, within certain rounding specs, 
and add/subtract/distribute extra lineheights to the ht/dp's of the 
gridded material


Hans


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 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
___


Re: [NTG-context] Grid, Footnotes and MkIV

2010-02-14 Thread Hans Hagen

On 14-2-2010 19:39, Steffen Wolfrum wrote:


Am 14.02.2010 um 19:25 schrieb Hans Hagen:


On 14-2-2010 19:15, Steffen Wolfrum wrote:

\usetypescript[postscript]
\definetypeface[postscript][rm][serif][times][default]
\mainlanguage[de]
\setupbodyfont[postscript,10pt]

\setuplayout
[grid=yes]

  \def\setnotebodyfont
{\let\setnotebodyfont\relax
 \restoreglobalbodyfont
\switchtobodyfont[rm,9pt]
\interwordspace 2.70pt
\interwordstretch 1.7pt
\interwordshrink 0.9pt
\setupinterlinespace[line=9.8pt,height=.79,depth=.21]\setupalign[block,hanging]\parskip2pt}


\setupinterlinespace is global, \setuplocalinterlinespace is local

so you need to use the local variant

just like we have setupbodyfont, switchtobodyfont, we now have 
setupinterlinespace and setuplocalinterlinespace




I assume \setupinterlinespace then should only be used once for the body text.
And everything else is classified as local?!


i'm still reconsidering this ... maybe in mkiv we will have

- \setupbodyinterlinespace
- \switchtobodyinterlinespace

and \setupinterlinespace being local (or global till starttext)

Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 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
___


[NTG-context] smaller inter line space for headings (on a grid)

2009-12-30 Thread Andreas Harder
Hi all,

I have three questions:

1) Is there a convenient way to reduce the inter line space for an head on a 
grid? First I tried 
\setuphead[section][style={\ssb\setupinterlinespace[line=1ex]}]—no effect. 
Finally I defined three commands to get it work. Perhaps someone knows a better 
way.

2) In a manual I found an example \setuphead[section][grid={line,-5pt}], but it 
doesn’t seem to work. Is it outdated? Is there an MkIV alternative?

3) Is there a MkIV pendant for \showgridboxes?


test-head-interlinespace.tex
Description: Binary data


Thank you in advance

Andreas___
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
___


Re: [NTG-context] grid snapping (mkiv)

2009-11-19 Thread Hans Hagen

Peter Rolf wrote:

Hi,

is the 'grid={line,??pt}' functionality already implemented in mkiv? I 
use it in a multicolumn environment and all I get is snapping to the 
'full' baseline.


\setuphead[section]
 [%style={\SectionHeaderFont},
  style={\switchtobodyfont[12.3pt]\ss\bf\setupinterlinespace},
%   grid={high}, % ok
  grid={line,3pt}, % snaps to 'second' baseline
  after=,
 ]


grid support is partially reimplemented and will differ in some aspects 
from mkii


i have no time now to discuss it in detail (will probably explain a few 
things in a chapter of hybrid.pdf or the style manual)


we have now grid definitions, with predefined:

\definegridsnapping[normal]   [maxheight,maxdepth,strut]
\definegridsnapping[standard] [maxheight,maxdepth,strut]
\definegridsnapping[yes]  [maxheight,maxdepth,strut]

\definegridsnapping[strict]   [maxdepth:0.8,maxheight:0.8,strut]
\definegridsnapping[tolerant] [maxdepth:1.2,maxheight:1.2,strut]

\definegridsnapping[top]  [minheight,maxdepth,strut]
\definegridsnapping[bottom]   [maxheight,mindepth,strut]
\definegridsnapping[both] [minheight,mindepth,strut]

\definegridsnapping[broad][maxheight,maxdepth,strut,0.8] 
\definegridsnapping[fit]  [maxheight,maxdepth,strut,1.2]

\definegridsnapping[first][first]
\definegridsnapping[last] [last]
\definegridsnapping[high] [minheight,maxdepth,none]
\definegridsnapping[low]  [maxheight,mindepth,none]
\definegridsnapping[line] [line]
\definegridsnapping[strut][strut]

\definegridsnapping[max]  [maxdepth,maxheight,strut]
\definegridsnapping[min]  [mindepth,minheight,strut]

so we have height/depth snapping, tolerance factors, strut or line based 
distribution, and some more; also there will be more strategies, like


\setuplayout[grid=tolerant] \showgrid

most structural elements will have a grid key (if it makes sense)

\setuphead[chapter][grid=strut] \startchapter[title={Test: 
strut}]   test \par test \par test \stopchapter
\setuphead[chapter][grid={local,strut}] \startchapter[title={Test: 
local,strut}] test \par test \par test \stopchapter
\setuphead[chapter][grid={strut,top:3}] \startchapter[title={Test: 
strut,top:3}] test \par test \par test \stopchapter


multi columns are not touched yet (i will do that as soon as we've 
opened up a it more of tex in luatex)


Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 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
___


Re: [NTG-context] stay on grid in double column

2008-08-14 Thread Jelle Huisman
Jelle Huisman wrote:
 Hi,

 I have text with a small intro section in a double column environment. 
 The main text is set on a grid and the intro text is slightly off-grid 
 with a \vskip -2pt before and a \vskip 2pt after the intro. As this 
 sample shows this works fine, until the intro text is broken over two 
 columns. In that case the last part of the intro starts on grid (in the 
 second column) and the main text is moved off-grid and does not longer 
 register with the main text in the first column :( [see example code].
 Is there is way to detect and prevent this (automatically)? Can ConTeXt 
 remember that it is setting some text \vskip-ped, while it is breaking 
 the current paragraph over columns? (Basically I want to keep all the 
 B's on the grid and all the A's \vskipped.)

Should I conclude that this is not possible?

Jelle
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] stay on grid in double column

2008-08-14 Thread Taco Hoekwater


Jelle Huisman wrote:
 the current paragraph over columns? (Basically I want to keep all the 
 B's on the grid and all the A's \vskipped.)
 
 Should I conclude that this is not possible?

My first (and second) answer would indeed be not possible.

Best wishes,
Taco

___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] stay on grid in double column

2008-08-14 Thread Jelle Huisman
Hans Hagen wrote:
 ok, you suffered enough ... so, this is for your eyes only because 
 otherwise i get complaints about a non documented feature: 
 \synchronizegrid (we needed it once in a project; it worked ok there but 
 was never tested being that which is why it's still on cont-new)
   
(...)
 the thing with grids is that one can make things work for most cases but 
 normally doc are always more tricky

OK, thank you Hans, this does (almost) what I need and that is enough 
(in this case.)

Jelle
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] stay on grid in double column

2008-08-14 Thread Hans Hagen
Jelle Huisman wrote:
 Jelle Huisman wrote:
 Hi,

 I have text with a small intro section in a double column environment. 
 The main text is set on a grid and the intro text is slightly off-grid 
 with a \vskip -2pt before and a \vskip 2pt after the intro. As this 
 sample shows this works fine, until the intro text is broken over two 
 columns. In that case the last part of the intro starts on grid (in the 
 second column) and the main text is moved off-grid and does not longer 
 register with the main text in the first column :( [see example code].
 Is there is way to detect and prevent this (automatically)? Can ConTeXt 
 remember that it is setting some text \vskip-ped, while it is breaking 
 the current paragraph over columns? (Basically I want to keep all the 
 B's on the grid and all the A's \vskipped.)
 
 Should I conclude that this is not possible?

ok, you suffered enough ... so, this is for your eyes only because 
otherwise i get complaints about a non documented feature: 
\synchronizegrid (we needed it once in a project; it worked ok there but 
was never tested being that which is why it's still on cont-new)

\definecolumnset[doublecolumn][n=2]
\setupcolumnset[doublecolumn][2][distance=5mm]
\setupbodyfont[12pt]
\setupinterlinespace[line=11pt]
\setuplayout[grid=yes]
\showgrid
\starttext
\startcolumnset[doublecolumn]
\ss \subject{Header}
\dorecurse {2} {
 \vskip -2pt
 This text is vskipped. A \dorecurse{40}{ aa aa}
 \vskip 2pt % intro text
 \synchronizegrid
 This text should stay on the grid. B \dorecurse{270}{ bb bb}} % main
 text should stay on grid
\stopcolumnset
\stoptext

the thing with grids is that one can make things work for most cases but 
normally doc are always more tricky

in mkiv i will add some more advanced grid support (i did some 
experiments last year .. no time now to finish that)



-
   Hans Hagen | PRAGMA ADE
   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | fax: 038 477 53 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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] stay on grid in double column

2008-08-13 Thread Jelle Huisman
Hi,

I have text with a small intro section in a double column environment. 
The main text is set on a grid and the intro text is slightly off-grid 
with a \vskip -2pt before and a \vskip 2pt after the intro. As this 
sample shows this works fine, until the intro text is broken over two 
columns. In that case the last part of the intro starts on grid (in the 
second column) and the main text is moved off-grid and does not longer 
register with the main text in the first column :( [see example code].
Is there is way to detect and prevent this (automatically)? Can ConTeXt 
remember that it is setting some text \vskip-ped, while it is breaking 
the current paragraph over columns? (Basically I want to keep all the 
B's on the grid and all the A's \vskipped.)

Thanks, Jelle

% sample code
\definecolumnset[doublecolumn][n=2]
\setupcolumnset[doublecolumn][2][distance=5mm]
\setupbodyfont[12pt]
\setupinterlinespace[line=11pt]
\setuplayout[grid=yes]
\showgrid
\starttext
\startcolumnset[doublecolumn]
\ss \subject{Header}
\dorecurse{2}{\vskip -2pt This text is vskipped. A \dorecurse{40}{ aa 
aa} \vskip 2pt % intro text
This text should stay on the grid. B \dorecurse{270}{ bb bb}} % main 
text should stay on grid
\stopcolumnset
\stoptext
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Bigger interline space and grid

2008-06-22 Thread Hans Hagen
Aditya Mahajan wrote:
 Hi,
 
 I cannot figure out how to increase the interline space with grid 
 snapping. The following does not work
 
 \setuplayout[grid=yes]
 
 \setupinterlinespace[auto,big]
 \setupwhitespace  [medium]
 \setupindenting   [medium,yes]
 
 \showgrid
 
 \starttext
 
 \dorecurse{4}{\input knuth \endgraf}
 
 \stoptext
 
 
 What am I missing?

the concept of snapping -)

\setuplayout[grid=yes]

\setupinterlinespace[line=20pt]
\setupwhitespace  [halfline]

\showgrid

\starttext

\dorecurse{4}{\input knuth \endgraf}

\stoptext




-
   Hans Hagen | PRAGMA ADE
   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | fax: 038 477 53 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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] Bigger interline space and grid

2008-06-21 Thread Aditya Mahajan
Hi,

I cannot figure out how to increase the interline space with grid 
snapping. The following does not work

\setuplayout[grid=yes]

\setupinterlinespace[auto,big]
\setupwhitespace  [medium]
\setupindenting   [medium,yes]

\showgrid

\starttext

\dorecurse{4}{\input knuth \endgraf}

\stoptext


What am I missing?

Aditya
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Bigger interline space and grid

2008-06-21 Thread Taco Hoekwater
Aditya Mahajan wrote:
 Hi,
 
 I cannot figure out how to increase the interline space with grid 
 snapping. The following does not work
 

You will probably have to adjust the default interlinespace
because that is what is used by the grid snapping routines:

\setuplayout[grid=yes]

\setupbodyfontenvironment[12pt][interlinespace=20pt]
\setupbodyfont[12pt] % re-activate

\showgrid

\starttext

\dorecurse{4}{\input knuth \endgraf}

\stoptext


Best wishes,
Taco
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Bigger interline space and grid

2008-06-21 Thread Aditya Mahajan
On Sat, 21 Jun 2008, Taco Hoekwater wrote:

 Aditya Mahajan wrote:
 Hi,

 I cannot figure out how to increase the interline space with grid
 snapping. The following does not work


 You will probably have to adjust the default interlinespace
 because that is what is used by the grid snapping routines:

 \setuplayout[grid=yes]

 \setupbodyfontenvironment[12pt][interlinespace=20pt]
 \setupbodyfont[12pt] % re-activate

 \showgrid

 \starttext

 \dorecurse{4}{\input knuth \endgraf}

 \stoptext

Ah, thanks.

Aditya
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] need help with creating a grid with context

2007-10-11 Thread Wolfgang Schuster
2007/10/10, Mojca Miklavec [EMAIL PROTECTED]:
 On 10/10/07, Wolfgang Schuster wrote:
  2007/10/10, Mojca Miklavec:
   On 10/10/07, MASON Peter J wrote:
  
Hope to create a regular (1cm spacing) grid on page, of bullets. 
Ultimately
over the whole page.
  
   Why not using MetaPost?
  
   \starttext
   \startMPcode % or \startMPpage
   for i=0 upto 10:
 for j=0 upto 20:
fill fullcircle scaled 1mm shifted ((i,j) scaled 1cm);
 endfor;
   endfor;
   \stopMPcode
   \stoptext
  
   Mojca
 
  Because TeX is faster in this situation and it takes more time to write
  the Metapost code in external file, process this file, convert it into a PDF
  file and include it into the document etc.
 
  I know what I say because this was one of the reasons why the sgf module
  place the field within TeX and not with Metapost, a matter of speed and you
  can reuse the objects.

 OK, that's a good point, and I fully agree with it. It's only that I
 would probably use something like that for really simple, short,
 one-page documents, where I would be concerned about the speed I need
 to come to a solution, not with the speed of document processing -
 half a second more or less.

This was in my case also a one page document but I created over hundret
full page graphics (needed for fieldstacks) and it is a real problem in this
case, the other problem for this solution was, I had to pass dozen graphic
position to Metapost and it was easier to do the whole work within TeX and
use Metapost only to create the needed graphics one and reuse them.

 With the route tex - .plt file - gnuplot - tex (metafun) -
 metapost (- mpto or \sometxt) - pdf, which I frequently use, the
 situation is much much worse, but it's still acceptable. ConTeXt
 became at least 10 times faster during the last three or four years.
 (Or at least that's my impression.)

I don't use gnuplot and I think a lua driven Tikz should solve this in
the future,
calculate the graphs with lua definition and draw the graphics with TeX macros.

  You should also replace the fullcircle with drawdot in your example, drawdot
  renders better on screen and looks better.

 Thanks. I always use fill fullcircle for some reason. Perhaps I should
 changle my habit :)

Sorry, my fault. What I meant was the difference between draw point and
drawpoint point where the first should be replaced in this situation with the
later, fullcircle produce nice circles and Donald Knuth took care about this.

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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] need help with creating a grid with context

2007-10-11 Thread Wolfgang Schuster
2007/10/10, Peter Rolf [EMAIL PROTECTED]:
 Hi Peter,

 MASON Peter J schrieb:
  I'm trying to layout a grid of bullets. The results isn't the expected
  one. Perhaps someone could offer help here? Thanks.
 
  Here's the sort of thing I'm doing 
 
  \setuplayout[leftmargin=0pt, leftmargindistance=0pt, backspace=0pt,
  rightmargin=0pt, rightmargindistance=0pt, cutspace=0pt, width=middle,
  topspace=0pt, header=0pt, headerdistance=0pt, footer=0pt,
  footerdistance=0pt, bottomspace=0pt, height=middle]
 
  %\showlayout
 
  \starttext
  \setuppositioning[unit=cm]
  \startpositioning
  \newcount\Row
 
  \Row= 0
  \loop
  {
   ^^
  \newcount\Col
 
  ^^
  \Col = 0
  \loop
  \position(\Col, \Row) {$\bullet$}
  \ifnum\Col  14
  \advance\Col by 1
  \repeat
  }
   ^^
  \ifnum\Row  36
  \advance\Row by 1
  \repeat
  \stoppositioning
  \stoptext
 
 You introduce spurious spaces (line break sometimes adds a space) in
 you loops. See

 http://tug.ctan.org/tex-archive/info/texbytopic/

 if you want to learn more about it.


 \starttext
 \setuppositioning[unit=cm]
 \startpositioning
 \newcount\Row
 \newcount\Col

 \Row=0
 \dorecurse{36}
  {\Col=0
   \dorecurse{14}
 {\position(\Col,\Row){$\bullet$}
  \advance\Col by 1
 }%
   \advance\Row by 1
  }
 \stoppositioning
 \stoptext


 Remove the comment sign behind the inner loop and see what happens.

 Also see

 http://wiki.contextgarden.net/System_Macros/Loops_and_Recursion

 for the nicer ConTeXt loop macros.


 Best wishes, Peter

Hi,

there is smarter and better solution than loop for doing this work,
you can use leaders. I prefer myself xledaers in this example (alternative b).

\defineoverlay[PageGrid][\PageGrid]

\setupbackgrounds[page][background=PageGrid,offset=5mm]

\starttext

% alternative a:

\def\PageGrid
  {\setbox\scratchbox\hbox to\dimexpr\paperwidth-1cm\relax
 {\leaders\hbox to 1cm{\hss$\bullet$\hss}\hfill}%
   \vbox to\dimexpr\paperheight-1cm\relax
 {\leaders\vbox to 1cm{\vss\box\scratchbox\vss}\vfill}}

\page[empty]

% alternative b:

\def\PageGrid
  {\setbox\scratchbox\hbox to\dimexpr\paperwidth-1cm\relax
 {\xleaders\hbox to 1cm{\hss$\bullet$\hss}\hfill}%
   \vbox to\dimexpr\paperheight-1cm\relax
 {\xleaders\vbox to 1cm{\vss\box\scratchbox\vss}\vfill}}

\page[empty]

% alternative c:

\def\PageGrid
  {\setbox\scratchbox\hbox to\dimexpr\paperwidth-1cm\relax
 {\cleaders\hbox to 1cm{\hss$\bullet$\hss}\hfill}%
   \vbox to\dimexpr\paperheight-1cm\relax
 {\cleaders\vbox to 1cm{\vss\box\scratchbox\vss}\vfill}}

\page[empty]

\stoptext

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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] need help with creating a grid with context

2007-10-10 Thread Peter Rolf
Hi Peter,

MASON Peter J schrieb:
 I'm trying to layout a grid of bullets. The results isn't the expected
 one. Perhaps someone could offer help here? Thanks.
 
 Here's the sort of thing I'm doing 
 
 \setuplayout[leftmargin=0pt, leftmargindistance=0pt, backspace=0pt,
 rightmargin=0pt, rightmargindistance=0pt, cutspace=0pt, width=middle,
 topspace=0pt, header=0pt, headerdistance=0pt, footer=0pt,
 footerdistance=0pt, bottomspace=0pt, height=middle]
 
 %\showlayout
 
 \starttext
 \setuppositioning[unit=cm]
 \startpositioning
 \newcount\Row
 
 \Row= 0
 \loop
 {
   ^^
 \newcount\Col
 
 ^^
 \Col = 0
 \loop
 \position(\Col, \Row) {$\bullet$}
 \ifnum\Col  14
 \advance\Col by 1
 \repeat
 }
   ^^
 \ifnum\Row  36
 \advance\Row by 1
 \repeat
 \stoppositioning
 \stoptext

You introduce spurious spaces (line break sometimes adds a space) in
you loops. See

http://tug.ctan.org/tex-archive/info/texbytopic/

if you want to learn more about it.


\starttext
\setuppositioning[unit=cm]
\startpositioning
\newcount\Row
\newcount\Col

\Row=0
\dorecurse{36}
  {\Col=0
   \dorecurse{14}
 {\position(\Col,\Row){$\bullet$}
  \advance\Col by 1
 }%
   \advance\Row by 1
  }
\stoppositioning
\stoptext


Remove the comment sign behind the inner loop and see what happens.

Also see

http://wiki.contextgarden.net/System_Macros/Loops_and_Recursion

for the nicer ConTeXt loop macros.


Best wishes, Peter

  
 
 Before printing, please consider the environment.
 
 IMPORTANT NOTICE: This e-mail and any attachment to it are intended only
 to be read or used by the named addressee. It is confidential and may
 contain legally privileged information. No confidentiality or privilege
 is waived or lost by any mistaken transmission to you. The RTA is not
 responsible for any unauthorised alterations to this e-mail or
 attachment to it. Views expressed in this message are those of the
 individual sender, and are not necessarily the views of the RTA. If you
 receive this e-mail in error, please immediately delete it from your
 system and notify the sender. You must not disclose, copy or use any
 part of this e-mail if you are not the intended recipient.
 
  
 
 
 
 
 ___
 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  : https://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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] need help with creating a grid with context

2007-10-10 Thread Mojca Miklavec
On 10/10/07, MASON Peter J wrote:

 Hope to create a regular (1cm spacing) grid on page, of bullets. Ultimately
 over the whole page.

Why not using MetaPost?

\starttext
\startMPcode % or \startMPpage
for i=0 upto 10:
   for j=0 upto 20:
  fill fullcircle scaled 1mm shifted ((i,j) scaled 1cm);
   endfor;
endfor;
\stopMPcode
\stoptext

Mojca
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


<    1   2   3   4   >