ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Dangling lines.
@ 2008-12-06 11:22 Bart C. Wise
  2008-12-07 10:56 ` Taco Hoekwater
  0 siblings, 1 reply; 6+ messages in thread
From: Bart C. Wise @ 2008-12-06 11:22 UTC (permalink / raw)
  To: Context Mailing List


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

I created an Author's note (code below).  It is designed to print out a note, 
skip a line, and then follow with the Author's signature.  The problem I'm 
having is that ConTeXt will break the page just before the author's signature 
leaving it dangling on the next page.  If I use a \vbox, that has problems 
when the notes need to go more than the current page.  How do I fix the code 
below?

\definestartstop[AuthorNote][
    before={
        \bgroup
        \startnarrower
        \switchtobodyfont[10pt]
        },
     after={
        \vskip-0.2ex
        Author
        \stopnarrower
        \egroup
        \blank
        \noindentation
         },
]

Thanks,
Bart

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

[-- Attachment #2: Type: text/plain, Size: 487 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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Dangling lines.
  2008-12-06 11:22 Dangling lines Bart C. Wise
@ 2008-12-07 10:56 ` Taco Hoekwater
  2008-12-08 10:18   ` Bart C. Wise
  0 siblings, 1 reply; 6+ messages in thread
From: Taco Hoekwater @ 2008-12-07 10:56 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Bart C. Wise wrote:
> 
> 
> I created an Author's note (code below). It is designed to print out a 
> note, skip a line, and then follow with the Author's signature. The 
> problem I'm having is that ConTeXt will break the page just before the 
> author's signature leaving it dangling on the next page. If I use a 
> \vbox, that has problems when the notes need to go more than the current 
> page. How do I fix the code below?
> 
> \definestartstop[AuthorNote][
> 
> before={\bgroup
> \startnarrower
> \switchtobodyfont[10pt]
> },
> after={%
> \vskip-0.2ex

You can try adding \nobreak commands before and after the \vskip
command.

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
___________________________________________________________________________________


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

* Re: Dangling lines.
  2008-12-07 10:56 ` Taco Hoekwater
@ 2008-12-08 10:18   ` Bart C. Wise
  2008-12-08 10:40     ` Taco Hoekwater
  0 siblings, 1 reply; 6+ messages in thread
From: Bart C. Wise @ 2008-12-08 10:18 UTC (permalink / raw)
  To: ntg-context


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

On Sunday 07 December 2008 03:56:11 am Taco Hoekwater wrote:
> Bart C. Wise wrote:
> > I created an Author's note (code below). It is designed to print out a
> > note, skip a line, and then follow with the Author's signature. The
> > problem I'm having is that ConTeXt will break the page just before the
> > author's signature leaving it dangling on the next page. If I use a
> > \vbox, that has problems when the notes need to go more than the current
> > page. How do I fix the code below?
> >
> > \definestartstop[AuthorNote][
> >
> > before={\bgroup
> > \startnarrower
> > \switchtobodyfont[10pt]
> > },
> > after={%
> > \vskip-0.2ex
>
> You can try adding \nobreak commands before and after the \vskip
> command.
>
I added those, but it had no effect.

I also tried replacing \vskip with \blank and that had no effect either (I 
didn't think it would).

Other thoughts?

Is there a way to tell ConTeXt to treat the author's signature (the dangling 
line) as part of the previous paragraph?

Bart

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

[-- Attachment #2: Type: text/plain, Size: 487 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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Dangling lines.
  2008-12-08 10:18   ` Bart C. Wise
@ 2008-12-08 10:40     ` Taco Hoekwater
  2008-12-08 11:38       ` Bart C. Wise
  0 siblings, 1 reply; 6+ messages in thread
From: Taco Hoekwater @ 2008-12-08 10:40 UTC (permalink / raw)
  To: mailing list for ConTeXt users



Bart C. Wise wrote:
> 
> Is there a way to tell ConTeXt to treat the author's signature (the
> dangling line) as part of the previous paragraph?

If \nobreak didn't work, then your paragraph wasn't ended yet,
and you need an extra empty line or an \endgra. Try this:

\definestartstop[AuthorNote]
  [before={\bgroup \startnarrower\switchtobodyfont[10pt]},
   after={\endgraf\nobreak\vskip-0.2ex\nobreak Author
          \stopnarrower \egroup \blank \noindentation}]


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
___________________________________________________________________________________


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

* Re: Dangling lines.
  2008-12-08 10:40     ` Taco Hoekwater
@ 2008-12-08 11:38       ` Bart C. Wise
  2008-12-08 11:53         ` Taco Hoekwater
  0 siblings, 1 reply; 6+ messages in thread
From: Bart C. Wise @ 2008-12-08 11:38 UTC (permalink / raw)
  To: ntg-context


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

On Monday 08 December 2008 03:40:55 am Taco Hoekwater wrote:
> Bart C. Wise wrote:
> > Is there a way to tell ConTeXt to treat the author's signature (the
> > dangling line) as part of the previous paragraph?
>
> If \nobreak didn't work, then your paragraph wasn't ended yet,
> and you need an extra empty line or an \endgra. Try this:
>
> \definestartstop[AuthorNote]
>   [before={\bgroup \startnarrower\switchtobodyfont[10pt]},
>    after={\endgraf\nobreak\vskip-0.2ex\nobreak Author
>           \stopnarrower \egroup \blank \noindentation}]
>

Excellent!  That works!

Now the only problem I have is I have no idea what \endgraf does. I've 
searched the web and I'm having a difficult time getting a search term that will 
point me to the information.  Will you give me a brief explanation or point me 
where to look

Thanks,
Bart

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

[-- Attachment #2: Type: text/plain, Size: 487 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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Dangling lines.
  2008-12-08 11:38       ` Bart C. Wise
@ 2008-12-08 11:53         ` Taco Hoekwater
  0 siblings, 0 replies; 6+ messages in thread
From: Taco Hoekwater @ 2008-12-08 11:53 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Bart C. Wise wrote:
> 
> Now the only problem I have is I have no idea what \endgraf does. I've 
> searched the web and I'm having a difficult time getting a search term 
> that will point me to the information. Will you give me a brief 
> explanation or point me where to look

\endgraf is just an alias for \par. There are some places where \par
is prohibited by TeX's parser but in such cases \endgraf is still
allowed. The prohibition helps to catch runaway definitions (because an
empty line is equal to a \par commnad).

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
___________________________________________________________________________________


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

end of thread, other threads:[~2008-12-08 11:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-12-06 11:22 Dangling lines Bart C. Wise
2008-12-07 10:56 ` Taco Hoekwater
2008-12-08 10:18   ` Bart C. Wise
2008-12-08 10:40     ` Taco Hoekwater
2008-12-08 11:38       ` Bart C. Wise
2008-12-08 11:53         ` Taco Hoekwater

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