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
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
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
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
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
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
participants (2)
-
Bart C. Wise
-
Taco Hoekwater