Vertical space around displayed formulas
Hello, has something been changed in the last few months in the vertical spacing of displayed formulas, frames or other environments? I am re-typesetting some presentations using the latest beta and the content of slides (especially those containing formulas) now tends to flow to the next page, while before it used to fit in one page. I paste below an example, if that helps. I am using a system font, so you may not be able to reproduce my problem without it. Is there something I should change in my documents? Nicola %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \setuppapersize[S6][S6] \setuplayout[ width=middle, height=middle, topspace=2mm, header=0mm, headerdistance=0mm, location=singlesided, backspace=5mm, margin=0mm, edgedistance=0mm, margindistance=0mm ] \setupalign[nothyphenated,flushleft] % Ocean Sunset (color.adobe.com) \definecolor[colorone] [r=0.251, g=0.349, b=0.322] \definecolor[colortwo] [r=0.612, g=0.608, b=0.478] \definecolor[colorthree] [r=1.0, g=0.827, b=0.576] \definecolor[colorfour] [r=1.0, g=0.592, b=0.310] \definecolor[colorfive] [r=0.960, g=0.310, b=0.161] %t=0.8 , a=multiply] \definecolor[nearlywhite] [s=0.996] % Fonts \definefontfamily[slidesfont][serif][Avenir] [ tf=name:Avenir Light, it=name:Avenir Light Oblique, bf=name:Avenir Heavy, bi=name:Avenir Heavy Oblique ] \definefontfamily[slidesfont][sans][Avenir] [ tf=name:Avenir Light, it=name:Avenir Light Oblique, bf=name:Avenir Heavy, bi=name:Avenir Heavy Oblique ] \definefallbackfamily[slidesfont][mono][Xits][range={"0222A,"02229,"02205}] % ∪, ∩, ∅ \definefontfamily[slidesfont][mono][Latin Modern Mono Light][features=none] \definefallbackfamily[slidesfont][math][Xits][range={"025C7,"27D5}] % WHITE DIAMOND, left-join, WHITE RIGHT-POINTING TRIANGLE \definefontfamily[slidesfont][math][TeX Gyre Pagella Math] \setupbodyfont[slidesfont] % Foreground/background color \setupcolors[textcolor=colorone] \setupbackgrounds[page][background=color, backgroundcolor=nearlywhite] % Header \startreusableMPgraphic{header:background} fill OverlayBox leftenlarged BackSpace rightenlarged CutSpace topenlarged TopSpace withcolor OverlayColor ; setbounds currentpicture to OverlayBox enlarged max(BackSpace,CutSpace) ; \stopreusableMPgraphic \defineoverlay[header:background][\reuseMPgraphic{header:background}] \define[2]\MySlide{\framed[ frame=off, background=header:background, backgroundcolor=colorfive, width=\textwidth, align=flushleft ]{#2}} \definehead[slide][subject] \setuphead[slide][ style=\ssb, command=\MySlide, color=nearlywhite, insidesection=\doifnot{\structureuservariable{align}}{top}\vfill, aftersection=\doifnot{\structureuservariable{align}}{top}\vfill, page=yes, ] % Footer \setuppagenumbering[location=] \setupfooter[style=small, color=colortwo] \setupfootertexts[][\userpagenumber/\lastuserpage] % Lists \startuseMPgraphic{itemize:main} save p; path p; p := fullcircle scaled 1.5ExHeight; fill p withcolor \MPcolor{colorfive}; \stopuseMPgraphic \startuseMPgraphic{itemize:nested} save p; path p; p := ((0,-0.5)--(0,0.5)--(0.866,0)--cycle) scaled 1.5ExHeight; fill p withcolor \MPcolor{colorfive}; \stopuseMPgraphic \definesymbol[itemize:main][\useMPgraphic{itemize:main}] \definesymbol[itemize:nested][\useMPgraphic{itemize:nested}] \setupitemize[1][symbol=itemize:main] \setupitemize[2][symbol=itemize:nested, width=1.5ex] \setupitemize[2][nowhite] \setupitemize[ headstyle=\ssa, headcolor=colorfive, afterhead={\blank[none]}, inbetween={\blank[big]}, leftmargin=1em, rightmargin=1em, ] % Tables \setuptables[rulethickness=0.06em] \setupinteraction[state=start, % make hyperlinks active, etc. style=\tf, color=colortwo, title={What Do You Mean, “Null”?}, author={Nicola Vitacolonna}, keyword={null}] % \usebtxdataset[main.bib] % \usebtxdefinitions[apa] \setupcombinations[distance=3cm,location=top] \defineframedcontent[tablebackground][frame=off,background=color,backgroundcolor=colorthree] \setuptables[rulethickness=0.06em,frame=tablebackground] \setupalign[nothyphenated,flushleft] \defineparagraphs[twocol][n=2] \setupparagraphs[twocol][1][width=.7\textwidth] \starttext \switchtobodyfont[17.3pt] \startslide[title={Which Nulls?}][align=top] All of the above may be abstracted into three categories: \startitemize[packed] \item Exists, but unknown ({\bf missing value}) \startformula \exists x\,\hbox{Yalta}(\hbox{Winston},x,\hbox{Churchill}) \stopformula \item Nonexistent, not applicable ({\bf inapplicable null}) \startformula \neg\exists x\,\hbox{Yalta}(\hbox{Winston},x,\hbox{Churchill}) \land \hbox{Yalta}_{-2}(\hbox{Winston},\hbox{Churchill}) \stopformula \item Not known to exist ({\bf no-information null}) \startformula \hbox{Yalta}_{-2}(\hbox{Winston},\hbox{Churchill}) \stopformula \stopitemize \midaligned{\tfxx \starttable[|l|l|l|] \NC \THREE Yalta \cite[Atzeni:1993] \NC \AR \NC FirstName \NC MiddleName \NC LastName \NC \AR \HL \NC Franklin \NC Delano \NC Roosevelt \NC \AR \NC Winston \NC UNK \NC Churchill \NC \AR \NC Charles \NC NA \NC DeGaulle \NC \AR \NC Joseph \NC NI \NC Stalin \NC \AR \stoptable} \stopslide \stoptext
Hi Nicola, Indeed there is a recent bug, reported by Mikael Sundqvist a few days ago, and Hans is aware of this. Hans said in the next release of ConTeXt beta the issue will be fixed. Best regards: OK
On 18 Jan 2017, at 16:00, Nicola
wrote: Hello, has something been changed in the last few months in the vertical spacing of displayed formulas, frames or other environments?
I am re-typesetting some presentations using the latest beta and the content of slides (especially those containing formulas) now tends to flow to the next page, while before it used to fit in one page.
I paste below an example, if that helps. I am using a system font, so you may not be able to reproduce my problem without it.
Is there something I should change in my documents?
Nicola
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \setuppapersize[S6][S6]
\setuplayout[ width=middle, height=middle, topspace=2mm, header=0mm, headerdistance=0mm, location=singlesided, backspace=5mm, margin=0mm, edgedistance=0mm, margindistance=0mm ]
\setupalign[nothyphenated,flushleft]
% Ocean Sunset (color.adobe.com) \definecolor[colorone] [r=0.251, g=0.349, b=0.322] \definecolor[colortwo] [r=0.612, g=0.608, b=0.478] \definecolor[colorthree] [r=1.0, g=0.827, b=0.576] \definecolor[colorfour] [r=1.0, g=0.592, b=0.310] \definecolor[colorfive] [r=0.960, g=0.310, b=0.161] %t=0.8 , a=multiply] \definecolor[nearlywhite] [s=0.996]
% Fonts \definefontfamily[slidesfont][serif][Avenir] [ tf=name:Avenir Light, it=name:Avenir Light Oblique, bf=name:Avenir Heavy, bi=name:Avenir Heavy Oblique ] \definefontfamily[slidesfont][sans][Avenir] [ tf=name:Avenir Light, it=name:Avenir Light Oblique, bf=name:Avenir Heavy, bi=name:Avenir Heavy Oblique ] \definefallbackfamily[slidesfont][mono][Xits][range={"0222A,"02229,"02205}] % ∪, ∩, ∅ \definefontfamily[slidesfont][mono][Latin Modern Mono Light][features=none] \definefallbackfamily[slidesfont][math][Xits][range={"025C7,"27D5}] % WHITE DIAMOND, left-join, WHITE RIGHT-POINTING TRIANGLE \definefontfamily[slidesfont][math][TeX Gyre Pagella Math]
\setupbodyfont[slidesfont]
% Foreground/background color \setupcolors[textcolor=colorone] \setupbackgrounds[page][background=color, backgroundcolor=nearlywhite]
% Header \startreusableMPgraphic{header:background} fill OverlayBox leftenlarged BackSpace rightenlarged CutSpace topenlarged TopSpace withcolor OverlayColor ; setbounds currentpicture to OverlayBox enlarged max(BackSpace,CutSpace) ; \stopreusableMPgraphic
\defineoverlay[header:background][\reuseMPgraphic{header:background}]
\define[2]\MySlide{\framed[ frame=off, background=header:background, backgroundcolor=colorfive, width=\textwidth, align=flushleft ]{#2}}
\definehead[slide][subject] \setuphead[slide][ style=\ssb, command=\MySlide, color=nearlywhite, insidesection=\doifnot{\structureuservariable{align}}{top}\vfill, aftersection=\doifnot{\structureuservariable{align}}{top}\vfill, page=yes, ]
% Footer \setuppagenumbering[location=] \setupfooter[style=small, color=colortwo] \setupfootertexts[][\userpagenumber/\lastuserpage]
% Lists \startuseMPgraphic{itemize:main} save p; path p; p := fullcircle scaled 1.5ExHeight; fill p withcolor \MPcolor{colorfive}; \stopuseMPgraphic
\startuseMPgraphic{itemize:nested} save p; path p; p := ((0,-0.5)--(0,0.5)--(0.866,0)--cycle) scaled 1.5ExHeight; fill p withcolor \MPcolor{colorfive}; \stopuseMPgraphic
\definesymbol[itemize:main][\useMPgraphic{itemize:main}] \definesymbol[itemize:nested][\useMPgraphic{itemize:nested}]
\setupitemize[1][symbol=itemize:main] \setupitemize[2][symbol=itemize:nested, width=1.5ex] \setupitemize[2][nowhite]
\setupitemize[ headstyle=\ssa, headcolor=colorfive, afterhead={\blank[none]}, inbetween={\blank[big]}, leftmargin=1em, rightmargin=1em, ]
% Tables \setuptables[rulethickness=0.06em]
\setupinteraction[state=start, % make hyperlinks active, etc. style=\tf, color=colortwo, title={What Do You Mean, “Null”?}, author={Nicola Vitacolonna}, keyword={null}]
% \usebtxdataset[main.bib] % \usebtxdefinitions[apa] \setupcombinations[distance=3cm,location=top] \defineframedcontent[tablebackground][frame=off,background=color,backgroundcolor=colorthree] \setuptables[rulethickness=0.06em,frame=tablebackground]
\setupalign[nothyphenated,flushleft]
\defineparagraphs[twocol][n=2] \setupparagraphs[twocol][1][width=.7\textwidth]
\starttext \switchtobodyfont[17.3pt]
\startslide[title={Which Nulls?}][align=top] All of the above may be abstracted into three categories:
\startitemize[packed] \item Exists, but unknown ({\bf missing value}) \startformula \exists x\,\hbox{Yalta}(\hbox{Winston},x,\hbox{Churchill}) \stopformula \item Nonexistent, not applicable ({\bf inapplicable null}) \startformula \neg\exists x\,\hbox{Yalta}(\hbox{Winston},x,\hbox{Churchill}) \land \hbox{Yalta}_{-2}(\hbox{Winston},\hbox{Churchill}) \stopformula \item Not known to exist ({\bf no-information null}) \startformula \hbox{Yalta}_{-2}(\hbox{Winston},\hbox{Churchill}) \stopformula \stopitemize
\midaligned{\tfxx \starttable[|l|l|l|] \NC \THREE Yalta \cite[Atzeni:1993] \NC \AR \NC FirstName \NC MiddleName \NC LastName \NC \AR \HL \NC Franklin \NC Delano \NC Roosevelt \NC \AR \NC Winston \NC UNK \NC Churchill \NC \AR \NC Charles \NC NA \NC DeGaulle \NC \AR \NC Joseph \NC NI \NC Stalin \NC \AR \stoptable} \stopslide \stoptext
___________________________________________________________________________________ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___________________________________________________________________________________
On 18/01/2017 16:53, Otared Kavian wrote:
Hi Nicola,
Indeed there is a recent bug, reported by Mikael Sundqvist a few days ago, and Hans is aware of this. Hans said in the next release of ConTeXt beta the issue will be fixed.
Sorry, I hadn't noticed the other thread. I'll wait for the next beta then. Thanks! Nicola
Hi Nicola, In fact, if you are in a hurry and don’t use subtle things introduced since May 2016, you can use the stable version of ConTeXt from TeXLive 2016 (the bug noticed by Mikael, and you, is absent from that version of ConTeXt). Best regards: OK
On 18 Jan 2017, at 17:26, Nicola
wrote: On 18/01/2017 16:53, Otared Kavian wrote:
Hi Nicola,
Indeed there is a recent bug, reported by Mikael Sundqvist a few days ago, and Hans is aware of this. Hans said in the next release of ConTeXt beta the issue will be fixed.
Sorry, I hadn't noticed the other thread. I'll wait for the next beta then.
Thanks! Nicola
___________________________________________________________________________________ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___________________________________________________________________________________
On 18/01/2017 17:53, Otared Kavian wrote:
Hi Nicola,
In fact, if you are in a hurry and don’t use subtle things introduced since May 2016, you can use the stable version of ConTeXt from TeXLive 2016 (the bug noticed by Mikael, and you, is absent from that version of ConTeXt).
Thanks, that's what I am doing now. Strangely enough, it fixes the layout for all the slides, *except* the one I have posted before. But that one I can easily fix. Nicola
On 1/18/2017 6:23 PM, Nicola wrote:
On 18/01/2017 17:53, Otared Kavian wrote:
Hi Nicola,
In fact, if you are in a hurry and don’t use subtle things introduced since May 2016, you can use the stable version of ConTeXt from TeXLive 2016 (the bug noticed by Mikael, and you, is absent from that version of ConTeXt).
Thanks, that's what I am doing now. Strangely enough, it fixes the layout for all the slides, *except* the one I have posted before. But that one I can easily fix.
the current (yesterdays) beta should be ok .. (the midpar flushing of a formula) a while ago i reimplemented spacing around display math and as a side effect there might be slightly different spacing (in which case probably the old situation was wrong it relates to the fact that tex (traditionally) has some assumptions and does some spacing that interferes with the way we want to control spacing (e.g. it always forces baselineskips while we don't always want them) and it was close to impossible to identify such cases robustly (think of preceding lines with different depths) recent luatex has ways to disable that so i could finally come up with cleaner spacing models for display math so, apart from bugs the current model is the one that will stay (or course more control can be added) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
Hi Hans, Thanks for your attention which fixed most of the difficulties with vertical distances around math formulas. However, after typesetting a long document, I noticed that there are still some incorrect behaviours. The following minimal example, extracted from that long document, shows what is wrong: please have a look at the second formula in the attached PDF. (The output with the older version from TeXLIve 2016 is correct). %% begin vertical-space-bug.tex \starttext \input knuth.tex \startformula a \leq a_{n+1} \leq a_{n} \leq b_{n+1} \leq b_{n} \leq b, \qquad\mbox{et}\qquad 0 \leq b_{n} - a_{n} \leq 2^{-n}(b_{0} - a_{0}). \stopformula \input ward.tex \startformula g(x_{*}) = \lim_{n\to\infty} g(a_{n}) \leq 0 \leq \lim_{n\to\infty} g(b_{n}) = g(x_{*}), \stopformula \input knuth.tex \stoptext %% end vertical-space-bug.tex
On 18 Jan 2017, at 19:15, Hans Hagen
wrote: On 1/18/2017 6:23 PM, Nicola wrote:
On 18/01/2017 17:53, Otared Kavian wrote:
Hi Nicola,
In fact, if you are in a hurry and don’t use subtle things introduced since May 2016, you can use the stable version of ConTeXt from TeXLive 2016 (the bug noticed by Mikael, and you, is absent from that version of ConTeXt).
Thanks, that's what I am doing now. Strangely enough, it fixes the layout for all the slides, *except* the one I have posted before. But that one I can easily fix.
the current (yesterdays) beta should be ok .. (the midpar flushing of a formula)
a while ago i reimplemented spacing around display math and as a side effect there might be slightly different spacing (in which case probably the old situation was wrong
it relates to the fact that tex (traditionally) has some assumptions and does some spacing that interferes with the way we want to control spacing (e.g. it always forces baselineskips while we don't always want them) and it was close to impossible to identify such cases robustly
(think of preceding lines with different depths)
recent luatex has ways to disable that so i could finally come up with cleaner spacing models for display math
so, apart from bugs the current model is the one that will stay (or course more control can be added)
Hans
----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl ----------------------------------------------------------------- ___________________________________________________________________________________ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___________________________________________________________________________________
participants (3)
-
Hans Hagen
-
Nicola
-
Otared Kavian