delimitedtext, spacebefore and grid
![](https://secure.gravatar.com/avatar/012fd266d02187820a1c08322c498933.jpg?s=120&d=mm&r=g)
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 heins@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
![](https://secure.gravatar.com/avatar/93131e1e6e2204bd13501390d768dbdc.jpg?s=120&d=mm&r=g)
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
![](https://secure.gravatar.com/avatar/012fd266d02187820a1c08322c498933.jpg?s=120&d=mm&r=g)
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}
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 heins@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
![](https://secure.gravatar.com/avatar/da275274bab3cdbc839a9d0e8f2c2299.jpg?s=120&d=mm&r=g)
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
![](https://secure.gravatar.com/avatar/da275274bab3cdbc839a9d0e8f2c2299.jpg?s=120&d=mm&r=g)
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
![](https://secure.gravatar.com/avatar/93131e1e6e2204bd13501390d768dbdc.jpg?s=120&d=mm&r=g)
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
![](https://secure.gravatar.com/avatar/da275274bab3cdbc839a9d0e8f2c2299.jpg?s=120&d=mm&r=g)
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
![](https://secure.gravatar.com/avatar/93131e1e6e2204bd13501390d768dbdc.jpg?s=120&d=mm&r=g)
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
![](https://secure.gravatar.com/avatar/da275274bab3cdbc839a9d0e8f2c2299.jpg?s=120&d=mm&r=g)
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
![](https://secure.gravatar.com/avatar/93131e1e6e2204bd13501390d768dbdc.jpg?s=120&d=mm&r=g)
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
participants (3)
-
Oliver Buerschaper
-
Oliver Heins
-
Wolfgang Schuster