ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Command only if \testpage is active
@ 2013-04-18 16:51 "H. Özoguz"
  2013-04-18 16:56 ` Wolfgang Schuster
  0 siblings, 1 reply; 5+ messages in thread
From: "H. Özoguz" @ 2013-04-18 16:51 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1: Type: text/plain, Size: 514 bytes --]


> I can't reproduce the problem, the text on the second page stays on the grid.
>
> Wolfgang
> ------------------------------------------------------------------------
Sorry, my fault, wrong number in \dorecurse.
Now you can reporduce it, I think.

\setuplayout[grid=yes]
\showgrid
\setuphead[subsection]
    [after=\vskip-1.6mm,
before={\testpage[5]\vskip1.6mm}]]

\starttext
\dorecurse{18}{Linefill\\}
\input tufte
\subsection{Hallo}
\input tufte
\subsection{Hallo}
\input tufte \input tufte
\stoptext

Huseyin

[-- Attachment #1.2: Type: text/html, Size: 869 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Command only if \testpage is active
  2013-04-18 16:51 Command only if \testpage is active "H. Özoguz"
@ 2013-04-18 16:56 ` Wolfgang Schuster
  0 siblings, 0 replies; 5+ messages in thread
From: Wolfgang Schuster @ 2013-04-18 16:56 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 18.04.2013 um 18:51 schrieb H. Özoguz <h.oezoguz@mmnetz.de>:

> 
>> I can’t reproduce the problem, the text on the second page stays on the grid.
>> 
>> Wolfgang
> Sorry, my fault, wrong number in \dorecurse.
> Now you can reporduce it, I think.
> 
> \setuplayout[grid=yes]
> \showgrid
> \setuphead[subsection]
>    [after=\vskip-1.6mm,
> before={\testpage[5]\vskip1.6mm}]]

Don’t use such odd values for the spaces before/after the heading which don’t make
sense when you use the grid. When you have a heading with more text or a bigger font
size try to change the value for the grid-key in \setuphead.

Wolfgang
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Command only if \testpage is active
@ 2013-04-18 20:19 "H. Özoguz"
  0 siblings, 0 replies; 5+ messages in thread
From: "H. Özoguz" @ 2013-04-18 20:19 UTC (permalink / raw)
  To: ntg-context

> Don’t use such odd values for the spaces before/after the heading which don’t make
> sense when you use the grid. When you have a heading with more text or a bigger font
> size try to change the value for the grid-key in \setuphead.
>
> Wolfgang

Ok, I tried. Best result so far is:

\setuplayout[grid=yes]
\showgrid
\setuphead[subsection]
[before={\testpage[5]\blank[2*line]}]
\setuphead[grid=high]
\starttext
\dorecurse{15}{Linefill\\}
\input tufte
\subsection{Hallo}
\input tufte
\subsection{Hallo}
\input tufte \input tufte
\stoptext

But it is not good as my original, and the so the values make sense:

\setuplayout[grid=yes]
\showgrid
\setuphead[subsection]
[after=\vskip-1.6mm,
before={\testpage[5]\vskip1.6mm}]]
\starttext
\dorecurse{18}{Linefill\\}
\input tufte
\subsection{Hallo}
\input tufte
\subsection{Hallo}
\input tufte \input tufte
\stoptext

The second example has better (nicer) distances. The reason is: The 
title should not be perfectly on the grid, only the text. Is there a way 
to achieve that without those "odd" values, and so without the grid-error?

Huseyin
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Command only if \testpage is active
  2013-04-18 15:44 "H. Özoguz"
@ 2013-04-18 16:39 ` Wolfgang Schuster
  0 siblings, 0 replies; 5+ messages in thread
From: Wolfgang Schuster @ 2013-04-18 16:39 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 18.04.2013 um 17:44 schrieb "H. Özoguz" <h.oezoguz@mmnetz.de>:

> Hi,
> 
> for subsections I use
> 
> \setuphead[subsection]
>  [after=\vskip-1.6mm,
> before={\testpage[5]\vskip1.6mm}]
> 
> The reason is perfect distances between text-subsection-text with activated gridding.
> 
> If the subsection is not set by \testpage on the next page, then everything workes fine! But if, then I want to not use the \vskips in "after" and "before". I want (in pseudo-pseudocode) something like this:
> 
> if(less then 5 lines, thas is, testpage sets the subsection on the next page)
> then:
> \setuphead[subsection]
>  [after=,
> before=]
> 
> I hope I could make clear, what I intend to achieve.
> 
> For testing:
> +++++++++++++++++++++++++++++++++++++
> \setuplayout[grid=yes]
> \showgrid
> \setuphead[subsection]
>  [after=\vskip-1.6mm,
> before={\testpage[5]\vskip1.6mm}]]
> 
> \starttext
> \dorecurse{13}{Linefill\\}
> \input tufte
> \subsection{Hallo}
> \input tufte
> \subsection{Hallo}
> \input tufte \input tufte
> \stoptext
> +++++++++++++++++++++++++++++++++++++
> 
> You see on the second page the problem: gridding is lost.

I can’t reproduce the problem, the text on the second page stays on the grid.

Wolfgang
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Command only if \testpage is active
@ 2013-04-18 15:44 "H. Özoguz"
  2013-04-18 16:39 ` Wolfgang Schuster
  0 siblings, 1 reply; 5+ messages in thread
From: "H. Özoguz" @ 2013-04-18 15:44 UTC (permalink / raw)
  To: ntg-context

Hi,

for subsections I use

\setuphead[subsection]
   [after=\vskip-1.6mm,
before={\testpage[5]\vskip1.6mm}]

The reason is perfect distances between text-subsection-text with 
activated gridding.

If the subsection is not set by \testpage on the next page, then 
everything workes fine! But if, then I want to not use the \vskips in 
"after" and "before". I want (in pseudo-pseudocode) something like this:

if(less then 5 lines, thas is, testpage sets the subsection on the next 
page)
then:
\setuphead[subsection]
   [after=,
before=]

I hope I could make clear, what I intend to achieve.

For testing:
+++++++++++++++++++++++++++++++++++++
\setuplayout[grid=yes]
\showgrid
\setuphead[subsection]
   [after=\vskip-1.6mm,
before={\testpage[5]\vskip1.6mm}]]

\starttext
\dorecurse{13}{Linefill\\}
\input tufte
\subsection{Hallo}
\input tufte
\subsection{Hallo}
\input tufte \input tufte
\stoptext
+++++++++++++++++++++++++++++++++++++

You see on the second page the problem: gridding is lost.

Huseyin
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-04-18 20:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-18 16:51 Command only if \testpage is active "H. Özoguz"
2013-04-18 16:56 ` Wolfgang Schuster
  -- strict thread matches above, loose matches on Subject: below --
2013-04-18 20:19 "H. Özoguz"
2013-04-18 15:44 "H. Özoguz"
2013-04-18 16:39 ` Wolfgang Schuster

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).