Re: [NTG-context] tlig feature sometimes does not work
Added some notes to the wiki: https://wiki.contextgarden.net/Featuresets#Open-type_features On Sat, Mar 13, 2021 at 3:12 AM Hans Hagen wrote: > On 3/13/2021 2:01 AM, Mohammad Hossein Bateni wrote: > > Umm... the fallbacks are correct. My conclusion is that tlig does not > > work when the character is not in the font itself. Is that the case? > > Is this a bug or a feature? > > > > \starttext > > > > > \definefontfallback[fall][dejavusansmono][0-0xf][check=yes,force=no] > > \definefontsynonym[Test][file:Mikhak-Medium.ttf][fallbacks=fall] > > \definefontfeature[tf][arabic][tlig=yes] > > \definedfont[Test*tf] > > foo--bar > > [\char"2013] > > [\char"2014] > > \stoptext > ... or a misunderdstanding: > > \starttext > > > \definefontfallback[myfallback][dejavuserif*default][0x02d,0x2013,0x2014][check=yes,force=yes] > > > \definefontsynonym[mytestfont][file:Mikhak-Medium.ttf][fallbacks=myfallback] > \definedfont[mytestfont*arabic] > foo--ofo---oof [\char"002D] [\char"2013] [\char"2014] > \stoptext > > for a ligature to be made all the glyphs involved have to come from the > same font > > I think you should wikify this (also because the font once complete is a > nice one to use in examples), > > 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 ___
Re: [NTG-context] Multiple Layouts
Jeroen schrieb am 13.03.2021 um 18:12: I have the following document, but I want a different \setuplayout[backspace] for the titlepage and copyright space. What is the best way to achieve this? [...] \definemakeup [copyrightpage] Each makeup page has its own named layout and to change values of the layout for the block all you have to do is to change the layout. \setuplayout [copyrightpage] [backspace=..., width=...] Wolfgang ___ 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 ___
Re: [NTG-context] (no subject)
Hello! On Sat, Mar 13, 2021 at 6:09 PM Jeroen wrote: > I have the following document, but I want a different > \setuplayout[backspace] for the titlepage and copyright space. What is > the best way to achieve this? > https://wiki.contextgarden.net/Layout section Multiple layouts J. ___ 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 ___
[NTG-context] Multiple Layouts
I have the following document, but I want a different \setuplayout[backspace] for the titlepage and copyright space. What is the best way to achieve this? \setupcolors [state=start] \usecolors [xwi] \usetypescriptfile [euler] \definetypeface [mainface][rm][serif][pagella][default] \definetypeface [mainface][tt][mono][dejavu][default] \definetypeface [mainface][mm][math][pagellaovereuler][default] \setupbodyfont [mainface,11.5pt] \setuppapersize [A4, portrait] \setuplayout [backspace=19mm, width=176mm, topspace=7mm, header=10mm, headerdistance=3mm, height=middle, footerdistance=5mm, footer=9mm, bottomspace=11mm] \setuphead [chapter] [style={\bfb}, before={\vskip 0mm}, after={\vskip-\parskip}] \setuphead [section] [style=bold, before={\vskip 6mm}, after={\vskip 2mm}] \setuppagenumbering [alternative=doublesided] \setupheadertexts [] \setupfooter [style=\it] \setupfootertexts [{Footer Title} \hfill \pagenumber] \definemakeup [titlepage] [align=left] \definemakeup [copyrightpage] \setupmakeup [copyrightpage] [align={right,bottom}, top=\vfill, pagestate=stop, style=smallbodyfont] \definealternativestyle [authorstyle] [\rm\tfb] [] \definealternativestyle [titlestyle] [{\rm\bfd\color[red]}] [] \definealternativestyle [subtitlestyle] [\rm\tfb] [] \definealternativestyle [publisherstyle] [\rm\bfb] [] \starttext \startmakeup[titlepage] \authorstyle{The Author} \blank[13*big] \titlestyle{Title 1} \blank[5*small] \titlestyle{Title 2} \blank[2*big] \subtitlestyle{Subtitle} \blank[47*big] \publisherstyle{Publisher} \stopmakeup \startmakeup[copyrightpage] Title \crlf Subtitle \blank Geprint in Country. \crlf Document Reference ABC-ABC-001. \crlf Eerste draft versie, gepubliceerd op \date. \crlf Dit document is getypset met \CONTEXT\ LMTX op Microsoft Windows 10. \blank \startalignment[flushmiddle] Copyright \copyright\ 2021, Publisher. Alle rechten voorbehouden. \crlf Niets uit deze uitgave mag worden verveelvoudigd, opgeslagen in een geautomatiseerd gegevensbestand en/of openbaar gemaakt in enige vorm of op enige wijze, hetzij elektronisch, mechanisch, door fotokopieën, opnamen of op enige andere manier zonder voorafgaande schriftelijk bevestigde toestemming van Publisher. \stopalignment \stopmakeup \startcolumns[2] \startchapter[title={Bryson and Tufte}] \dorecurse{5}{ \startsection[title={Bryson}] \input{bryson} \stopsection \startsection[title={Tufte}] \input{tufte} \stopsection} \stopchapter \startchapter[title={Zapf and Ward}] \dorecurse{5}{ \startsection[title={Zapf}] \input{zapf} \stopsection \startsection[title={Ward}] \input{ward} \stopsection} \stopchapter \stopcolumns \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 ___
[NTG-context] (no subject)
I have the following document, but I want a different \setuplayout[backspace] for the titlepage and copyright space. What is the best way to achieve this? \setupcolors [state=start] \usecolors [xwi] \usetypescriptfile [euler] \definetypeface [mainface][rm][serif][pagella][default] \definetypeface [mainface][tt][mono][dejavu][default] \definetypeface [mainface][mm][math][pagellaovereuler][default] \setupbodyfont [mainface,11.5pt] \setuppapersize [A4, portrait] \setuplayout [backspace=19mm, width=176mm, topspace=7mm, header=10mm, headerdistance=3mm, height=middle, footerdistance=5mm, footer=9mm, bottomspace=11mm] \setuphead [chapter] [style={\bfb}, before={\vskip 0mm}, after={\vskip-\parskip}] \setuphead [section] [style=bold, before={\vskip 6mm}, after={\vskip 2mm}] \setuppagenumbering [alternative=doublesided] \setupheadertexts [] \setupfooter [style=\it] \setupfootertexts [{Footer Title} \hfill \pagenumber] \definemakeup [titlepage] [align=left] \definemakeup [copyrightpage] \setupmakeup [copyrightpage] [align={right,bottom}, top=\vfill, pagestate=stop, style=smallbodyfont] \definealternativestyle [authorstyle] [\rm\tfb] [] \definealternativestyle [titlestyle] [{\rm\bfd\color[red]}] [] \definealternativestyle [subtitlestyle] [\rm\tfb] [] \definealternativestyle [publisherstyle] [\rm\bfb] [] \starttext \startmakeup[titlepage] \authorstyle{The Author} \blank[13*big] \titlestyle{Title 1} \blank[5*small] \titlestyle{Title 2} \blank[2*big] \subtitlestyle{Subtitle} \blank[47*big] \publisherstyle{Publisher} \stopmakeup \startmakeup[copyrightpage] Title \crlf Subtitle \blank Geprint in Country. \crlf Document Reference ABC-ABC-001. \crlf Eerste draft versie, gepubliceerd op \date. \crlf Dit document is getypset met \CONTEXT\ LMTX op Microsoft Windows 10. \blank \startalignment[flushmiddle] Copyright \copyright\ 2021, Publisher. Alle rechten voorbehouden. \crlf Niets uit deze uitgave mag worden verveelvoudigd, opgeslagen in een geautomatiseerd gegevensbestand en/of openbaar gemaakt in enige vorm of op enige wijze, hetzij elektronisch, mechanisch, door fotokopieën, opnamen of op enige andere manier zonder voorafgaande schriftelijk bevestigde toestemming van Publisher. \stopalignment \stopmakeup \startcolumns[2] \startchapter[title={Bryson and Tufte}] \dorecurse{5}{ \startsection[title={Bryson}] \input{bryson} \stopsection \startsection[title={Tufte}] \input{tufte} \stopsection} \stopchapter \startchapter[title={Zapf and Ward}] \dorecurse{5}{ \startsection[title={Zapf}] \input{zapf} \stopsection \startsection[title={Ward}] \input{ward} \stopsection} \stopchapter \stopcolumns \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 ___
Re: [NTG-context] add more blank space when using \starteffect[hidden]
On 3/12/2021 10:08 PM, Jeong Dal wrote: Hi, Sometimes, I need to hide the solution of a problem. So I use \doifmode{} and \starteffect[hidden] as in the following sample file. Since I want to set more blank space if it is hidden, I add \blank[5cm] when it is in the \enablemode[hideSolution]. It works well except the figures and bars are not hidden. Only texts, even in the mp part, are hidden. It is OK for me. However, it would be much better to set the height of blank space depends on the height of hidden texts. Is there a way to set the variable height using “overlay” stuff instead of \blank[5cm]? Thank for reading. Best regards, Dalyoung \startbuffer[circles] draw fullcircle scaled 1cm; draw fullcircle scaled 1cm shifted (2cm,0); dotlabel.top(“O”,origin); \stopbuffer \def\StartHide{\doifmode{hideSolution}{\starteffect[hidden]}} \def\StopHide{\doifmode{hideSolution}{\stopeffect\blank[5cm]}} %\enablemode[hideSolution] \starttext \framed[]{This is what I want:} \framedtext[]{ \StartHide \samplefile{knuth} Overbar is not \overbar{hidden}. {\processMPbuffer[circles]} \StopHide } \stoptext In your case it's easier than you mightt think: \framedtext[empty=yes] - 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 ___
Re: [NTG-context] missing space after \date[] (was: printing the current date)
On 3/13/2021 12:10 AM, Peter Münster wrote: On Wed, Jan 27 2021, Wolfgang Schuster wrote: When not all optional arguments are used the space after the last given argument is gobbled. This was normal behavior for a long time until you changed the code in MkIV to keep them. Hi, What does that mean? Is that going to be changed? How should \date[] be used now in the text? For now, I do it like "bla \date[d=3]\ bla". Is there a nicer way? TIA for any hints, The problem with an interface with optional arguments is that it has to look ahead. There are actually some macros that use this feature to get rid of upcoming spaces (picking up two optional arguments where one is needed). So, no matter what solution is chosen: push back a space or not, it has some unpredictable character. This is why I always am explicit, as in \date[d=3]\ bla because no matter what happens bvehind the screens, the \ terminates the argument check so it will stay. (I admit that i'm mnore often bitten by the pushed back one than the gobbled one so i make it a habit to be explicit about spaces, like like i use \removeunwantedspaces when i'm not sure when there can be spaces that crept in). We can of course in lmtx bring back the 'push back a space' behaviour but we then also introduce some fuzzyness. Now we have "we scan upto n arguments and gobble spaces when doing so". Btw, there is also another aspect: when looking for optional arguments the next token gets looked at and that one can be in an upcoming macro or content. \startfoo[a][b] content \stopfoo \startfoo[a] [ that starts content \stopfoo so sometimes one needs \startfoo[a] \relax [ that starts content \stopfoo to abort the scanning. 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 ___
Re: [NTG-context] tlig feature sometimes does not work
On 3/13/2021 2:01 AM, Mohammad Hossein Bateni wrote: Umm... the fallbacks are correct. My conclusion is that tlig does not work when the character is not in the font itself. Is that the case? Is this a bug or a feature? \starttext \definefontfallback[fall][dejavusansmono][0-0xf][check=yes,force=no] \definefontsynonym[Test][file:Mikhak-Medium.ttf][fallbacks=fall] \definefontfeature[tf][arabic][tlig=yes] \definedfont[Test*tf] foo--bar [\char"2013] [\char"2014] \stoptext ... or a misunderdstanding: \starttext \definefontfallback[myfallback][dejavuserif*default][0x02d,0x2013,0x2014][check=yes,force=yes] \definefontsynonym[mytestfont][file:Mikhak-Medium.ttf][fallbacks=myfallback] \definedfont[mytestfont*arabic] foo--ofo---oof [\char"002D] [\char"2013] [\char"2014] \stoptext for a ligature to be made all the glyphs involved have to come from the same font I think you should wikify this (also because the font once complete is a nice one to use in examples), 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 ___
Re: [NTG-context] tlig feature sometimes does not work
On 3/13/2021 1:13 AM, Mohammad Hossein Bateni wrote: Any idea why the ligature {U+647 and U+654 => U+6C0} does not kick in? because it's not defined as ligature - 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 ___