Problem with \setupinterlinespace
In this example interlines spaces look a bit strange to me \starttext \input knuth \begingroup \tfx\setupinterlinespace[reset] \starttyping function newCounter() local i = 0 return function() i = i+1 return i end end c1 = newCounter() print(c1()) --> 1 print(c1()) --> 2 c2 = newCounter() print(c2()) --> 1 print(c1()) --> 3 print(c2()) --> 2 \stoptyping \endgroup \input tufte \stoptext Can someone confirm this ? -- luigi
luigi scarso schrieb:
In this example interlines spaces look a bit strange to me \starttext \input knuth \begingroup \tfx\setupinterlinespace[reset] \starttyping function newCounter() local i = 0 return function() i = i+1 return i end end c1 = newCounter() print(c1()) --> 1 print(c1()) --> 2 c2 = newCounter() print(c2()) --> 1 print(c1()) --> 3 print(c2()) --> 2 \stoptyping \endgroup
\input tufte \stoptext
Can someone confirm this ?
yep! the third paragraph has wrong interlinespace here. but if you add a \par or an emtpy line after '\input knuth' things look ok here. bug or feature ;) best wishes, peter
What about this ? \usemodule[maps] \usemodule[visual] \setupinteraction[state=start] \setuplanguage[en] \definecolumnsetspan[wide][n=2] \def\Tfx{\tfx\setupinterlinespace[line=2.5ex]} \starttext \startArticle [Year=2009, Number=xx, Period=xx, Page=1, Title={foo}, Author={Luigi Scarso}] \input knuth \blank \begingroup \Tfx \input knuth\par \starttyping function newCounter() local i = 0 return function() i = i+1 return i end end c1 = newCounter() print(c1()) --> 1 print(c1()) --> 2 c2 = newCounter() print(c2()) --> 1 print(c1()) --> 3 print(c2()) --> 2 \stoptyping \input knuth\par \endgroup \blank \input tufte \par \stopArticle \stoptext -- luigi
Hi, please look at the attachment. I want different interline spacing for big, normal and small font sizes. What is the best approach? I tried \setupinterlinespace[big] (works only after \starttext!) or \setupinterlinespace[line=3.5ex] (works also before \starttext) but this changes, as intended, interline spacing as a whole. There is also \setupbodyfontenvironment (Problem with \chapter{…} or did I something wrong?). Now I've to use \switchtobodyfont[…] instead of \tfa and so on. Is there a trick? Thank you in advance Andreas
Andreas Harder schrieb:
Hi,
please look at the attachment. I want different interline spacing for big, normal and small font sizes. What is the best approach?
I tried \setupinterlinespace[big] (works only after \starttext!) or \setupinterlinespace[line=3.5ex] (works also before \starttext) but this changes, as intended, interline spacing as a whole.
There is also \setupbodyfontenvironment (Problem with \chapter{…} or did I something wrong?). Now I've to use \switchtobodyfont[…] instead of \tfa and so on. Is there a trick?
sorry, no direct answer to your questions. but if you add a \showstruts to your document (after \starttext), you will see two big struts on both sides of the chapter number. looks like these struts (~80pt) cause the trouble here. hth, peter
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 ___________________________________________________________________________________
Andreas Harder wrote:
There is also \setupbodyfontenvironment (Problem with \chapter{…} or did I something wrong?). Now I've to use \switchtobodyfont[…] instead of \tfa and so on.
Why not do that? If you are fiddling with the interline space, it is IMO better to switch the whole bodyfont, just in case. Best wishes, Taco
Taco Hoekwater wrote:
Andreas Harder wrote:
There is also \setupbodyfontenvironment (Problem with \chapter{…} or did I something wrong?). Now I've to use \switchtobodyfont[…] instead of \tfa and so on.
Why not do that? If you are fiddling with the interline space, it is IMO better to switch the whole bodyfont, just in case.
Oh, I see. Somehow the interlinespace setting from the typescript doesn't come through. You could do this: \setuphead [chapter] [style={\switchtobodyfont[18pt]\setupinterlinespace[line=10ex]}] but it is weird that it does not work out of the box. Best wishes, Taco
Am 15.10.2009 um 21:55 schrieb Taco Hoekwater:
Taco Hoekwater wrote:
Andreas Harder wrote:
There is also \setupbodyfontenvironment (Problem with \chapter{…} or did I something wrong?). Now I've to use \switchtobodyfont[…] instead of \tfa and so on.
Why not do that? If you are fiddling with the interline space, it is IMO better to switch the whole bodyfont, just in case.
Okay, thank you for your advise. Why I can't say: \setupbodyfontenvironment [minion] [14.4pt] [interlinespace=3ex] % \tfa \setupbodyfontenvironment [minion] [9.6pt] [interlinespace=4ex] % \tfx and then use style=\tfa?
Oh, I see. Somehow the interlinespace setting from the typescript doesn't come through. You could do this:
\setuphead [chapter] [style={\switchtobodyfont[18pt]\setupinterlinespace[line=10ex]}]
but it is weird that it does not work out of the box.
Because it works if one set \setupinterlinespace[line=5ex] for the whole document … By the way, what happened with \setupinterlinespace [big]? Anyway, thanks for your reply! PS. I don't want to be too greedy, but could you also have a look at http://archive.contextgarden.net/message/20091014.122329.48e0bcc0.en.html ? Andreas
Andreas Harder wrote:
Okay, thank you for your advise. Why I can't say: \setupbodyfontenvironment [minion] [14.4pt] [interlinespace=3ex] % \tfa \setupbodyfontenvironment [minion] [9.6pt] [interlinespace=4ex] % \tfx and then use style=\tfa?
In the interest of speed, \tfa only does the bare necessities to get a larger visual font size, and consequently all changes it makes are 'local', \switchtobodyfont sets up the 'global' settings as well, and these are the ones used by grid snapping and insertions etc.
Oh, I see. Somehow the interlinespace setting from the typescript doesn't come through. You could do this:
\setuphead [chapter] [style={\switchtobodyfont[18pt]\setupinterlinespace[line=10ex]}]
but it is weird that it does not work out of the box.
Because it works if one set \setupinterlinespace[line=5ex] for the whole document … By the way, what happened with \setupinterlinespace[big]?
I have no idea, Hans should have a look at that.
Anyway, thanks for your reply!
PS. I don't want to be too greedy, but could you also have a look at http://archive.contextgarden.net/message/20091014.122329.48e0bcc0.en.html ?
I'll get back to you, Best wishes, Taco
Taco Hoekwater wrote:
Because it works if one set \setupinterlinespace[line=5ex] for the whole document … By the way, what happened with \setupinterlinespace[big]?
I have no idea, Hans should have a look at that.
\start \setupinterlinespace[big] \input tufte \par \stop work sok here 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 -----------------------------------------------------------------
Am 16.10.2009 um 14:12 schrieb Hans Hagen:
Taco Hoekwater wrote:
Because it works if one set \setupinterlinespace[line=5ex] for the whole document … By the way, what happened with \setupinterlinespace[big]? I have no idea, Hans should have a look at that.
\start \setupinterlinespace[big] \input tufte \par \stop
work sok here
But not in the preamble, or isn't it meant to be used in the preamble? In contrast \setupinterlinespace[line=…] works in any location. Andreas
Andreas Harder wrote:
Am 16.10.2009 um 14:12 schrieb Hans Hagen:
Taco Hoekwater wrote:
Because it works if one set \setupinterlinespace[line=5ex] for the whole document … By the way, what happened with \setupinterlinespace[big]? I have no idea, Hans should have a look at that.
\start \setupinterlinespace[big] \input tufte \par \stop
work sok here
But not in the preamble, or isn't it meant to be used in the preamble? In contrast \setupinterlinespace[line=…] works in any location.
small example please 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 -----------------------------------------------------------------
Am 16.10.2009 um 14:35 schrieb Hans Hagen:
Andreas Harder wrote:
Taco Hoekwater wrote:
Because it works if one set \setupinterlinespace[line=5ex] for the whole document … By the way, what happened with \setupinterlinespace[big]? I have no idea, Hans should have a look at that.
\start \setupinterlinespace[big] \input tufte \par \stop
work sok here But not in the preamble, or isn't it meant to be used in the
Am 16.10.2009 um 14:12 schrieb Hans Hagen: preamble? In contrast \setupinterlinespace[line=…] works in any location.
small example please
\setupinterlinespace[big] % \setupinterlinespace[line=24pt] \starttext \input tufte \stoptext Andreas
On Fri, 16 Oct 2009, Andreas Harder wrote:
Am 16.10.2009 um 14:35 schrieb Hans Hagen:
Andreas Harder wrote:
Am 16.10.2009 um 14:12 schrieb Hans Hagen:
Taco Hoekwater wrote:
Because it works if one set \setupinterlinespace[line=5ex] for the whole document … By the way, what happened with \setupinterlinespace[big]? I have no idea, Hans should have a look at that.
\start \setupinterlinespace[big] \input tufte \par \stop
work sok here But not in the preamble, or isn't it meant to be used in the preamble? In contrast \setupinterlinespace[line=…] works in any location.
small example please
\setupinterlinespace[big]
\setupinterlinespace[big,auto]
% \setupinterlinespace[line=24pt]
\starttext \input tufte \stoptext
Aditya
Am 16.10.2009 um 15:39 schrieb Aditya Mahajan:
On Fri, 16 Oct 2009, Andreas Harder wrote:
Am 16.10.2009 um 14:35 schrieb Hans Hagen:
Andreas Harder wrote:
Taco Hoekwater wrote:
> Because it works if one set \setupinterlinespace[line=5ex] for > the whole document … By the way, what happened with > \setupinterlinespace[big]? I have no idea, Hans should have a look at that. \start \setupinterlinespace[big] \input tufte \par \stop work sok here But not in the preamble, or isn't it meant to be used in the
Am 16.10.2009 um 14:12 schrieb Hans Hagen: preamble? In contrast \setupinterlinespace[line=…] works in any location. small example please
\setupinterlinespace[big]
\setupinterlinespace[big,auto]
It's still not spaced big (latest beta) … Andreas
participants (6)
-
Aditya Mahajan
-
Andreas Harder
-
Hans Hagen
-
luigi scarso
-
Peter Rolf
-
Taco Hoekwater