[NTG-context] Trial to use LibreOffice Calc (+ python) to build ConTeXt customized environnements files
[features=default] \definefontsynonym [HandwritingItalic] [name:snellroundhandltstdscr] [features=default] \definefontsynonym [HandwritingBold] [name:snellroundhandltstdscr] [features=default] \definefontsynonym [HandwritingBoldItalic] [name:snellroundhandltstdscr] [features=default] \stoptypescript \starttypescript [calligraphy] [myfont] \setups[font:fallback:calligraphy] \definefontsynonym [Calligraphy] [name:sabonltstdroman] [features=default] \definefontsynonym [CalligraphyItalic] [name:sabonltstditalic] [features=default] \definefontsynonym [CalligraphyBold] [name:sabonltstdbold] [features=default] \definefontsynonym [CalligraphyBoldItalic] [name:sabonltstdbolditalic] [features=default] \stoptypescript \starttypescript[myfont] \definetypeface [myfont] [rm] [serif] [myfont] [default] \definetypeface [myfont] [ss] [sans][myfont] [default] \definetypeface [myfont] [tt] [mono][myfont] [default] \definetypeface [myfont] [mm] [math][myfont] [default] \definetypeface [myfont] [hm] [handwriting] [myfont] [default] \definetypeface [myfont] [cg] [calligraphy] [myfont] [default] \stoptypescript \setuptolerance[strict] \setupalign[hz] \setupalign[hanging] \setupalign[lesshyphenated] \setupalign[verytolerant] \setupalign[stretch] \setupwhitespace [big] \setupbodyfont[myfont,ss,12pt] \definecolor [MaCouleur0] [h=340.0,s=0.85,v=0.1,a=1.0,t=1.0] \definecolor [MaCouleur1] [h=210.0,s=0.9,v=0.5,a=1.0,t=1.0] \definecolor [MaCouleur2] [h=210.0,s=0.8,v=0.6,a=1.0,t=1.0] \definecolor [MaCouleur3] [h=210.0,s=0.7,v=0.7,a=1.0,t=1.0] \definecolor [MaCouleur4] [h=210.0,s=0.6,v=0.8,a=1.0,t=1.0] \definecolor [MaCouleur5] [h=210.0,s=0.5,v=0.9,a=1.0,t=1.0] \definecolor [MaCouleur6] [h=30.0,s=0.9,v=0.5,a=1.0,t=1.0] \definecolor [MaCouleur7] [h=30.0,s=0.8,v=0.6,a=1.0,t=1.0] \definecolor [MaCouleur8] [h=30.0,s=0.7,v=0.7,a=1.0,t=1.0] \definecolor [MaCouleur9] [h=30.0,s=0.6,v=0.8,a=1.0,t=1.0] \definecolor [MaCouleur10][h=30.0,s=0.5,v=0.9,a=1.0,t=1.0] \definecolor [MaCouleur11][h=120.0,s=0.3,v=1.0,a=1.0,t=1.0] \definecolor [MaCouleur12][h=200.0,s=0.3,v=1.0,a=1.0,t=1.0] \definecolor [MaCouleur13][h=200.0,s=0.9,v=0.9,a=1.0,t=1.0] \definecolor [MaCouleur14][h=120.0,s=0.9,v=0.9,a=1.0,t=1.0] \definecolor [MaCouleur15][h=200.0,s=0.9,v=0.9,a=1.0,t=1.0] \definecolor [CouleurPrincipale] [MaCouleur0] \definecolor [Couleur1] [MaCouleur1] \definecolor [Couleur2] [MaCouleur2] \definecolor [Couleur3] [MaCouleur3] \definecolor [Couleur4] [MaCouleur4] \definecolor [Couleur5] [MaCouleur5] \definecolor [CouleurContraste1] [MaCouleur6] \definecolor [CouleurContraste2] [MaCouleur7] \definecolor [CouleurContraste3] [MaCouleur8] \definecolor [CouleurContraste4] [MaCouleur9] \definecolor [CouleurContraste5] [MaCouleur10] \definecolor [CouleurFond1] [MaCouleur11] \definecolor [CouleurFond2] [MaCouleur12] \definecolor [CouleurURL] [MaCouleur13] \definecolor [CouleurType][MaCouleur14] \definecolor [CouleurLiens] [MaCouleur15] \setupcolors [ textcolor=CouleurPrincipale, ] \setuphead [part] [ style=\bfd, textcolor=Couleur1, numbercolor=CouleurContraste1, bodypartlabel=Part, placehead=yes, page=left, header=high, align=flushleft, alternative=middle, before={\strut\godown[4cm]}, ] \setuphead [chapter] [ style=\bfc, textcolor=Couleur2, numbercolor=CouleurContraste2, sectionsegments=1:2, page=yes, align=flushleft, ] \setuphead [title] [ ] \setuphead [section] [ style=\bfb, textcolor=Couleur3, numbercolor=CouleurContraste3, sectionsegments=1:3, page=yes, align=flushleft, ] \setuphead [subject] [ ] \setuphead [subsection] [ style=\bfa, textcolor=Couleur4, numbercolor=CouleurContraste4, sectionsegments=1:4, align=flushleft, ] \setuphead [subsubject] [ ] \setuphead [subsubsection] [ style=\bf, textcolor=Couleur5, numbercolor=CouleurContraste5, sectionsegments=1:5, align=flushleft, ] \setuphead [subsubsubject] [ ] \setuphead [subsubsubsection] [ textcolor=CouleurContraste3, numbercolor=CouleurContraste3, ] ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Horizontal spacing
Hi, these line can modify the space between words: \installtolerancemethod {horizontal} {MySpace} {\spaceskip2.75pt plus1.60pt minus1.10pt\relax} \setupalign[line,block]\setfalse\raggedonelinerstate% kein hz=expansion mehr? \setuptolerance[MySpace] But how can I adjust in general the horizontal distance between glyphs (I don't mean \kern, I am looking for a general setup)? Steffen ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] Is rendering furigana over horizontal or vertical japanese text doable in ConTeXt?
On 8/21/2022 12:10 PM, Wolfgang Schuster via ntg-context wrote: 黄复雄 via ntg-context schrieb am 21.08.2022 um 10:24: Currently, the ruby module does not seem to support cjk fonts? I have a preliminary implementation of furigana(pinyin in Chinese) as: attached a variant (no pdf attached) using wolfgangs font definition plus some more - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -% in font-imp-scripts, line 145, comment a few lines % % orientate = function(character) % local width = character.width or 0 % local height = character.height or 0 % local depth = character.depth or 0 % -- character.width = height + depth + rightshift + rightshift % character.height = width - downshift % character.depth = shift % -- character.xoffset = height + rightshift % -- character.yoffset = - downshift % -- character.orientation = orientation % end \definefontfeature [vertical] [vertical={% orientation=3,% down=.1,% right=.1,% ranges={% cjkcompatibility,% cjkcompatibilityforms,% cjkcompatibilityideographs,% cjkcompatibilityideographssupplement,% cjkradicalssupplement,% % cjkstrokes,% cjksymbolsandpunctuation,% cjkunifiedideographs,% cjkunifiedideographsextensiona,% cjkunifiedideographsextensionb,% cjkunifiedideographsextensionc,% cjkunifiedideographsextensiond,% cjkunifiedideographsextensione,% cjkunifiedideographsextensionf,% }% }] \definefont[NotoCJKvertical][NotoSanstc-Regular*default,vertical @ 24pt] \definefont[NotoCJKverticalBold][NotoSanstc-Bold*default,vertical @ 48pt] \definefallbackfamily [documentfont] [rm] [Noto Serif CJK SC] [preset=range:chinese,features={default,vertical}] \definefallbackfamily [documentfont] [ss] [Noto Sans CJK SC] [preset=range:chinese,features={default,vertical}] \definefallbackfamily [documentfont] [tt] [Noto Sans Mono CJK SC] [preset=range:chinese,features={default,vertical}] \definefontfamily [documentfont] [rm] [Noto Serif] \definefontfamily [documentfont] [ss] [Noto Sans] \definefontfamily [documentfont] [tt] [Noto Sans Mono] \setupbodyfont [documentfont,24pt] \setuppapersize [A4,landscape,rotated,270] [A4,portrait] \setuplayout[middle] \showframe \setuphead [chapter] [numbercolor=darkred, conversion=chinesenumerals] \setuptolerance [verytolerant,stretch] \setupinterlinespace [40pt] \setuplayout [color=darkblue] \setuppagenumbering [location=footer] \defineconversionset [pagenumber] [] [chinesenumerals] \protected\def\stripe#1{\hbox orientation 0 yoffset 3pt{\strut #1}} \setscript[hangul] \starttext % \startscript[hangul] \chapter{通用规} \placefigure [left,none] {汉字表} {\framed [width=4cm, height=2\lineheight, frame=off, backgroundcolor=darkgreen, foregroundcolor=white, background=color] {汉字表}} \dorecurse{40}{% 通用规\ruby{范}{x}汉字表 \stripe{test #1} } % \stopscript \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] Is rendering furigana over horizontal or vertical japanese text doable in ConTeXt?
urrent last = current end else if first then head, current = flushrange(head,current,first,last) first = false end head, current = flushchar(head,current) end elseif id == kern_code then if first then last = current end elseif first then head, current = flushrange(head,current,first,last) first = false end current = getnext(current) end if first then head, current = flushrange(head,current,first,last) end setlist(box,head) end \stopluacode % % % % % % % % % % \setuptolerance[verytolerant,stretch] \definefont[NotoCJK][NotoSanstc-Regular*default @ 24pt] \setupinterlinespace[40pt] \unexpanded\def\stripe#1{\hbox orientation 0 yoffset 3pt{\strut #1}} \setbox1000\hbox{\NotoCJK\startscript[hangul]\dorecurse{20}{通用规范汉字表 \stripe{test #1} }\stopscript} \ctxlua{document.manipulate_one(1000)} \ruledvbox orientation 1 to \textwidth \bgroup \hsize \textheight \unhbox1000 \vfill \egroup \page \setbox1000\hbox{\NotoCJK\startscript[hangul]\dorecurse{20}{通用规\ruby{范}{x}汉字表 \stripe{test #1} }\stopscript} \ctxlua{document.manipulate_one(1000)} \ruledvbox orientation 1 to \textwidth \bgroup \hsize \textheight \unhbox1000 \vfill \egroup \page \setupinterlinespace[40pt] \definefontfeature [vertical] [vertical={% orientation=3,% down=.1,% right=.1,% ranges={% cjkcompatibility,% cjkcompatibilityforms,% cjkcompatibilityideographs,% cjkcompatibilityideographssupplement,% cjkradicalssupplement,% % cjkstrokes,% cjksymbolsandpunctuation,% cjkunifiedideographs,% cjkunifiedideographsextensiona,% cjkunifiedideographsextensionb,% cjkunifiedideographsextensionc,% cjkunifiedideographsextensiond,% cjkunifiedideographsextensione,% cjkunifiedideographsextensionf,% }% }] \definefont[NotoCJKvertical][NotoSanstc-Regular*default,vertical @ 24pt] \showglyphs \unexpanded\def\stripe#1{\hbox orientation 0 yoffset 3pt{\strut #1}} \setbox1000\hbox{\NotoCJKvertical\startscript[hangul]\dorecurse{20}{通用规范汉字表 \stripe{test #1} }\stopscript} \ruledvbox orientation 1 to \textwidth \bgroup \hsize \textheight \unhbox1000 \vfill \egroup \page \setbox1000\hbox{\NotoCJKvertical\startscript[hangul]\dorecurse{20}{通用规\ruby{范}{x}汉字表 \stripe{test #1} }\stopscript} \ruledvbox orientation 1 to \textwidth \bgroup \hsize \textheight \unhbox1000 \vfill \egroup % \stopscript \stoptext test-directions-006.pdf Description: Adobe PDF document \dontcomplain % in font-imp-scripts, line 145, comment a few lines % % orientate = function(character) % local width = character.width or 0 % local height = character.height or 0 % local depth = character.depth or 0 % -- character.width = height + depth + rightshift + rightshift % character.height = width - downshift % character.depth = shift % -- character.xoffset = height + rightshift % -- character.yoffset = - downshift % -- character.orientation = orientation % end \setuplayout[middle] \starttext \startluacode local nuts = nodes.nuts local nextglyph = nuts.traversers.glyph local newhlist = nuts.pool.hlist local getboth= nuts.getboth local setboth= nuts.setboth local setlink= nuts.setlink local getlist= nuts.getlist local setlist= nuts.setlist local setwhd = nuts.setwhd local getwhd = nuts.getwhd local setorientation = nuts.setorientation local getbox = nuts.getbox local xheights = fonts.hashes.xheights local function is_vertical(c) return c >= 0x04E00 and c <= 0x09FFF end function document.manipulate_one(boxnumber) local box = getbox(boxnumber) local list = getlist(box) local all = { } for n, c, f in nextglyph, list do if is_vertical(c) then all[n] = f end end for n, f in next, all do local o = .2 * xheights[f] local prev, next = getboth(n) setboth(n) local l = newhlist(n) local w, h, d = getwhd(n) setlink(prev,l,next) setwhd(l,h+d+o,w,0) setorientation(l,0x003,o/2,-o/2,0,h,d-o)
Re: [NTG-context] Count (and limit) glyphs per line?
Dear Hans, This is the friendly reminder you requested for the "crappyspecs" parbuilder as per your example in early July. With ConTeXt ver: 2022.07.06 21:42 LMTX fmt: 2022.7.8 I get tex error > tex error on line 12 in file ./test-wrapping2.tex: Undefined control sequence \crappyspeccount potentially as there is no crappyspec parbuilder yet? \defineparbuilder [crappyspec] % implemented in the builder namespace \defineparbuilder [default] % implemented in the builder namespace \setmainparbuilder[crappyspec] \setuptolerance[verytolerant,stretch] \dontcomplain \protected\def\CrappyTraced {\par \strut \rlap \bgroup\infofont (\enspace max = \the\crappyspeccount \quad step = \the\crappyspecstep \quad hsize = \the\hsize \quad used = \the\crappyspecdimen \enspace ) \egroup \par} \starttext \crappyspeccount60 \samplefile{tufte} \CrappyTraced \par \crappyspeccount40 \samplefile{tufte} \CrappyTraced \par % \crappyspecstep 2pt \samplefile{tufte} \CrappyTraced \par \samplefile{tufte} \CrappyTraced \startitemize \startitem \samplefile{tufte} \CrappyTraced \stopitem \startitem \samplefile{ward} \CrappyTraced \stopitem \stopitemize \startnarrower[6*left,right] \samplefile{tufte} \CrappyTraced \stopnarrower \starthanging [distance=4em,n=2] {test} \samplefile{tufte} \CrappyTraced \stophanging \page % \stoptext \setuppapersize[landscape,letter] \samplefile{knuth} \CrappyTraced \startitemize[width=5em] \startitem \samplefile{knuth} \CrappyTraced \stopitem \startitem {\smallcaps \darkblue \samplefile{knuth}} \CrappyTraced \stopitem \stopitemize \crappyspeccount60 \startitemize[width=5em] \startitem \samplefile{knuth} \CrappyTraced \stopitem \startitem {\smallcaps \darkgreen \samplefile{knuth}} \CrappyTraced \stopitem \stopitemize \page Thank you once again for your help! Benjamin -- The problem with these thing is that there is more involved than just counting, like font features, hyphenation, current paragrph properties, etc. and you don't want interference with other features. You also want the paragraphs to look somewhat ok. Folks who enforce such demands on authors never wonder where the tools do do that come from (publishers and probably most designers are not interested in that anyway: thinking probably stops at the number '120'). Attached a proof of concept that gives an idea. No upload as first we need to do some wrapping up of math. Not that we needed something in the engine other than the linebreak helper to accept direct modes (no need to go back and forth then and i only want write this crap once). Could be a module although it's only some 70 lines of code in the end. Maybe it makes a nice (lmtx) demo for the ctx meeting too. Here we work per paragraph not per line which looks better on the average. One could mess with parshapes but why bother. (The todo in the name refers to the fact that it might do into a th elow level paragraph manual.) (No more time now but we can add later; remind me if I forget.) 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 - > On Jun 26, 2022, at 18:32, Max Chernoff wrote: > > On 2022-06-26 9:59 a.m., Benjamin Buchmuller wrote: >> Hi Max, >> Thank you so much for your help and pointing me to the documents; always a >> lot of things to learn in TeX! > > No problem :) > >> I'm afraid that including the hyphen width doesn't solve the issue yet. It >> seems to move the problem to other parts of the text. > > Ah, too bad. My next step would have been to insert \penalty1's (prevent > breaks) at the potential breaks before/after the "selected" break, but Hans > provided a _much_ better solution that you should use instead. > >> My guess is that one could equivalently have said "local max_length = 111", >> right? > > Not really; the hyphen is added to the accumulated width, not the accumulated > character count. > >> I made the following MWE (reproducible also online) to illustrate what I see: > > My code assumes that each line has _roughly_ "max_length" characters before > it runs. These lines each only have ~60 characters, so I'm not entirely > surprised that there are issues. Just use Hans's solution, which is much less > of a total hack than this is :) > >> * Running with hsize only makes the problem worse in itemizations, so I >> think localhsize is the way to go. My guess, localhsize is the width of the >> "text" part of a paragraph, for example, excluding the symbols in the >> itemization.
Re: [NTG-context] upload
On 7/9/2022 12:40 AM, Otared Kavian via ntg-context wrote: I just found that \choose has been replaced with \binom (binomial coefficient): \starttext \meaning\choose \meaning\binom $\binom{n}{k}$ \stoptext Sorry for complaining… :-) no problem ... maybe we should have a wiki page for 'use this instead of that' as you're playing with it ... there is a lot we haven't yet introduced but we will do that stepwise .. here's one inline formulas like $(x + a + 2)$ will break across lines but traditionally \left( .. \right) doesn't which is why these \bigg things are there : manual solution for breaking inline math however, in lmtx these do break across lines but there are of course still cases where the penalties injected will discourage it; there is agranular penalty system in place but current it is configured as traditional tex now, when a formula doesn't break and is somehow wrapped it doesn't play that well with linebreaks but you can cheat: formulas can becoem liek glue where the inter atom stretch and shrink can play a more prominent role ... here's a test: % turning small inline formulas into leaders to that we don't get overflows % or excessive spacing \continuewhenlmtxmode \startbuffer[threshold-none] \setupbodyfont[modern] \setuppapersize[A5] \setuplayout[tight] \setupmathematics[threshold=none] \dorecurse {950} { test $\darkblue \showboxes x + #1$ test $\darkred \showboxes x + #1 + z$ } \stopbuffer \startbuffer[threshold-small] \setupbodyfont[modern] \setuppapersize[A5] \setuplayout[tight] \setupmathematics[threshold=small] \dorecurse {950} { test $\darkblue \showboxes x + #1$ test $\darkred \showboxes x + #1 + z$ } \stopbuffer \startbuffer[threshold-medium] \setupbodyfont[modern] \setuppapersize[A5] \setuplayout[tight] \setupmathematics[threshold=medium] \dorecurse {950} { test $\darkblue \showboxes x + #1$ test $\darkred \showboxes x + #1 + z$ } \stopbuffer \startbuffer[threshold-big] \setupbodyfont[modern] \setuppapersize[A5] \setuplayout[tight] \setupmathematics[threshold=big] \dorecurse {950} { test $\darkblue \showboxes x + #1$ test $\darkred \showboxes x + #1 + z$ } \stopbuffer \starttext \dorecurse {10} { \startcombination[2*2] {\hbox to .45\textwidth{\typesetbuffer[threshold-none] [frame=on,width=.45\textwidth,page=#1]\hss}} {\type {threshold=none}} {\hbox to .45\textwidth{\typesetbuffer[threshold-small] [frame=on,width=.45\textwidth,page=#1]\hss}} {\type {threshold=small}} {\hbox to .45\textwidth{\typesetbuffer[threshold-medium][frame=on,width=.45\textwidth,page=#1]\hss}} {\type {threshold=medium}} {\hbox to .45\textwidth{\typesetbuffer[threshold-big] [frame=on,width=.45\textwidth,page=#1]\hss}} {\type {threshold=big}} \stopcombination } \stoptext There is also a system like widows and orphans in the sense that one can set forward and backward penalties, as in: \setuplayout[width=11cm] \startbuffer \dorecurse {50} { test $\darkblue a + #1 + b > 2$ % test $\darkreda + b + #1 + c + d > 2$ % test $\darkgreen a + b + c + #1 + d + e + f > 2$ % } \stopbuffer \setuptolerance[verytolerant,stretch] \starttext \start \mathforwardpenalties 0 \mathbackwardpenalties 0 \getbuffer \par \stop \page \start \mathforwardpenalties 2 -200 -100 \mathbackwardpenalties 2 -100 -50 \getbuffer \par \stop \page \start \mathforwardpenalties 2 200 100 \mathbackwardpenalties 2 100 50 \getbuffer \par \stop \page \stoptext but we currently don't have a high level interface for that; it will be part of the more general math penalties setup. These are just a few of the things to play with. 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 / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] interwordspace error after update
On 6/6/2022 8:12 PM, Steffen Wolfrum via ntg-context wrote: with my last ConTeXt ver 2022.01.21 20:31 LMTX (arm64) this work: \startsetups footnotesetup \interwordspace 2.75pt % \setuptolerance[NEUNspace] hat hier keine Wirkung! \interwordstretch 1.7pt \interwordshrink 0.9pt \setupinterlinespace[line=11pt, height=.79,depth=.21] \lineskiplimit-\maxdimen \setupwhitespace[0pt] \stopsetups You're using the wrong skip. These interwors* things are not meant to be set, as they are basically font dimensions (and in traditional tex you'd then set them global for each shared font) .. consider them constants (which is also why they are lexed as such in syntax highlighting) .. you were just lucky and in lmtx we're more restrictive. If you want to go low level you can try: \spaceskip 12.75pt plus 1.8pt minus 0.9pt 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 ___
[NTG-context] interwordspace error after update
Hi, with my last ConTeXt ver 2022.01.21 20:31 LMTX (arm64) this work: \startsetups footnotesetup \interwordspace 2.75pt % \setuptolerance[NEUNspace] hat hier keine Wirkung! \interwordstretch 1.7pt \interwordshrink 0.9pt \setupinterlinespace[line=11pt, height=.79,depth=.21] \lineskiplimit-\maxdimen \setupwhitespace[0pt] \stopsetups Now, with ver 2022.05.11 11:36 LMTX (arm64) the same document gives an error: tex error > tex error on line 4 in file ./01_Fara.tex: You can't use '\scaledinterwordspace' in internal vertical mode \22>:footnotesetup #1->\interwordspace 2.75pt\clubpenalty =1\widowpenalty =1\displaywidowpenalty =1\brokenpenalty =0\setupinterlinespace [line=11pt, height=.79,depth=.21]\lineskiplimit -\maxdimen \setupwhitespace [0pt] \m_syst_setups_asked \clf_autosetups {\m_syst_setups_asked } \relax \handlenoteinsert ...ngroup \edef \currentnote {#1}\strc_constructions_initialize {#1}\strc_notes_synchronize \the \everybeforenoteinsert \insert \currentnoteinsertionnumber \bgroup \the \everyinsidenoteinsert \relax \usesetupsparameter \noteparameter \useinterline ... \currentconstructionsynchronize ...es \global \settrue \postponednote \orelse \ifconditional \c_strc_notes_flushed \handlenoteitself \currentnote \currentnotenumber \orelse \ifconditional \c_strc_notes_delayed \else \handlenoteinsert \currentnote \currentnotenumber \fi \endgroup ... \currentconstructionsynchronize \csname \??constructionnotehandler \currentconstructionhandler \endcsname \strc_constructions_finalize \strc_notations_finalize \stopfootnote } Is there any chance my setup might work again? Steffen ___ 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] Switching fonts changes framedtext justification
On Sat, 2 Apr 2022 17:36:35 -0700 Thangalin via ntg-context wrote: > The following code produces framed text areas, each having different > justification: > > […] > How would you ensure that both text areas remain fully justified? I don't have that Emoji font, but replacing it with other fonts, framedtext justifies the text here. Are you sure it's not a tolerance issue? Frames don't inherit the tolerance from the main environment¹. Try with \setupframedtext [align=verytolerant] %% [align={verytolerant, stretch}] Marco ¹ https://wiki.contextgarden.net/Command_old/setuptolerance ___ 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] Bad linebreak in figure caption
I was asking myself that too as I fall into this trap from time to time. I would have thought that global settings are just that, global, and that other elements inherit these settings unless they modify them. Denis Von: ntg-context im Auftrag von Marco Patzer via ntg-context Gesendet: Freitag, 3. Dezember 2021 13:21:40 An: mailing list for ConTeXt users Cc: Marco Patzer Betreff: Re: [NTG-context] Bad linebreak in figure caption On Fri, 3 Dec 2021 09:14:59 +0100 Taco Hoekwater wrote: > Captions have their own alignment setting: > > \setupcaption[figure][align={verytolerant,stretch}] Thanks. Wikified: https://wiki.contextgarden.net/Command/setuptolerance Is there a good reason why captions (as well as e.g. framed texts) don't honour the global tolerance setting? Marco ___ 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 ___ ___ 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] Bad linebreak in figure caption
On Fri, 3 Dec 2021 09:14:59 +0100 Taco Hoekwater wrote: > Captions have their own alignment setting: > > \setupcaption[figure][align={verytolerant,stretch}] Thanks. Wikified: https://wiki.contextgarden.net/Command/setuptolerance Is there a good reason why captions (as well as e.g. framed texts) don't honour the global tolerance setting? Marco ___ 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] Bad linebreak in figure caption
Hi! The caption "FOO" runs into the right figure's caption: \setuplayout [width=18.4cm] \setuptolerance [verytolerant, stretch] %% even with stretch \starttext \startplacefigure \startfloatcombination \startplacefigure [title=Unexpectedly unnecessary FOO-BAR whatever] \framed[width=.4\textwidth]{} \stopplacefigure \startplacefigure [title={Lorem ipsum dolor siit amet}] \framed[width=.4\textwidth]{} \stopplacefigure \stopfloatcombination \stopplacefigure \stoptext Why does ConTeXt not break the line between "unnecessary" and "FOO"? How to kindly persuade it to do so? Marco LMTX 2021.11.26 11:38 ___ 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] body text and footnote space
Ah, I see the latest is 10 Oct. Mine is 17 September, so I'll upgrade and see the difference, hopefully. Thanks Julian On 12/10/21 10:25 pm, Hans Hagen wrote: On 10/12/2021 3:09 AM, jbf via ntg-context wrote: Dear list, I note previous discussions on the matter of body text invading footnote space (as late as last year). As I am currently typesetting a 400 plus page academic text with hundreds of footnotes, and do not have the option of making them endnotes, I am facing this issue page after page. The only solution I have for now is to make per page layout adjustments to reduce a line or two, so there is a way to handle it, but given ConTeXt's 'perfection' generally, I would be very interested to know if there is any other solution forthcoming. I've tried various options in \setupfootnotes and \setuptolerance', but to no avail. Is this still the case in the latest version? 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] body text and footnote space
> Am 12.10.2021 um 13:25 schrieb Hans Hagen via ntg-context > : > > On 10/12/2021 3:09 AM, jbf via ntg-context wrote: >> Dear list, >> I note previous discussions on the matter of body text invading footnote >> space (as late as last year). As I am currently typesetting a 400 plus page >> academic text with hundreds of footnotes, and do not have the option of >> making them endnotes, I am facing this issue page after page. The only >> solution I have for now is to make per page layout adjustments to reduce a >> line or two, so there is a way to handle it, but given ConTeXt's >> 'perfection' generally, I would be very interested to know if there is any >> other solution forthcoming. I've tried various options in \setupfootnotes >> and \setuptolerance', but to no avail. > Is this still the case in the latest version? In my projects it looks good with the latest LMTX. Hraban ___ 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] body text and footnote space
On 10/12/2021 3:09 AM, jbf via ntg-context wrote: Dear list, I note previous discussions on the matter of body text invading footnote space (as late as last year). As I am currently typesetting a 400 plus page academic text with hundreds of footnotes, and do not have the option of making them endnotes, I am facing this issue page after page. The only solution I have for now is to make per page layout adjustments to reduce a line or two, so there is a way to handle it, but given ConTeXt's 'perfection' generally, I would be very interested to know if there is any other solution forthcoming. I've tried various options in \setupfootnotes and \setuptolerance', but to no avail. Is this still the case in the latest version? 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 ___
[NTG-context] body text and footnote space
Dear list, I note previous discussions on the matter of body text invading footnote space (as late as last year). As I am currently typesetting a 400 plus page academic text with hundreds of footnotes, and do not have the option of making them endnotes, I am facing this issue page after page. The only solution I have for now is to make per page layout adjustments to reduce a line or two, so there is a way to handle it, but given ConTeXt's 'perfection' generally, I would be very interested to know if there is any other solution forthcoming. I've tried various options in \setupfootnotes and \setuptolerance', but to no avail. Julian ___ 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] Code document and simpleslides and create in one go the document with simpleslides added
> > > One final question on this one. As per latest comments this works great, > but is there a way so the presentation pages in the appendix are made-up > landscape as they are now, but are rotated 90 degrees so they are created > in the pdf document as the first two pages. \startbuffer[slides] \setuptolerance[ horizontal, tolerant, stretch] \setuppapersize[ A4,landscape] \setuplayout[ width=middle, backspace=35mm, cutspace=35mm, height=middle, topspace=5mm, bottomspace=20mm] \setuppagenumbering[ location={footer,center}] \setuphead [section] [page={yes}] \usetypescript[pagella] \setupbodyfont[pagella,18pt] \setupbodyfontenvironment[ 28pt][ % For body d=36pt, % For title a=12pt, % For author & date ] \setuptype[style=medium] \setuptyping[typing][bodyfont=16pt] \setupwhitespace[medium] \setbreakpoints[compound] \setuphead[chapter][style=\bfd] \setuphead[section][style=\bfc] \setuphead[subsection][style=\bfb] \setuphead[subsubsection][style=\bf] \setupitemize[autointro] % prevent orphan list intro \setupitemize[indentnext=no] \starttext \startsection[title={MySlideTitle},ref={myref1}] Body text \startitemize \item Item 1 \item Item 2 \stopitemize \stopsection \startsection[title={MySlideTitle},ref={myref2}] Body text \startitemize \item Item 1 \item Item 2 \stopitemize \stopsection \stoptext\starttext text \stoptext \stopbuffer \savebuffer[list=slides, file=slides.tex] \starttext \startbodymatter \dorecurse{10}{\input zapf\par} \typesetfile[\jobname-slides.tex][--purgeall][object=no, width=0pt] \stopbodymatter \startappendices \getfiguredimensions[\jobname-slides.pdf] \dorecurse{\noffigurepages} {\startTEXpage \externalfigure[\jobname-slides.pdf][page=\recurselevel] \stopTEXpage} \stopappendices \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] Code document and simpleslides and create in one go the document with simpleslides added
I worked around it, instead of simpleslides just use larger fonts to with regular pages \startbuffer[slides] \setuptolerance[ horizontal, tolerant, stretch] \setuppapersize[ A4,landscape] \setuplayout[ width=middle, backspace=35mm, cutspace=35mm, height=middle, topspace=5mm, bottomspace=20mm] \setuppagenumbering[ location={footer,center}] \setuphead [section] [page={yes}] \usetypescript[pagella] \setupbodyfont[pagella,18pt] \setupbodyfontenvironment[ 28pt][ % For body d=36pt, % For title a=12pt, % For author & date ] \setuptype[style=medium] \setuptyping[typing][bodyfont=16pt] \setupwhitespace[medium] \setbreakpoints[compound] \setuphead[chapter][style=\bfd] \setuphead[section][style=\bfc] \setuphead[subsection][style=\bfb] \setuphead[subsubsection][style=\bf] \setupitemize[autointro] % prevent orphan list intro \setupitemize[indentnext=no] \starttext \startsection[title={MySlideTitle},ref={myref1}] Body text \startitemize \item Item 1 \item Item 2 \stopitemize \stopsection \startsection[title={MySlideTitle},ref={myref2}] Body text \stopsection \stoptext\starttext text \stoptext \stopbuffer \savebuffer[list=slides, file=\jobname_slides.tex, prefix=no] \starttext \startbodymatter \dorecurse{25}{\input zapf\par} \typesetfile[\jobname_slides.tex][--purgeall][object=no, width=0pt] \stopbodymatter \startappendices \getfiguredimensions[\jobname_slides.pdf] \dorecurse{\noffigurepages} {\startTEXpage \externalfigure[\jobname_slides.pdf][page=\recurselevel] \stopTEXpage} \stopappendices \stoptext Op za 31 jul. 2021 om 16:22 schreef Thomas A. Schmitz via ntg-context < ntg-context@ntg.nl>: > > On 7/31/21 4:06 PM, Pablo Rodriguez via ntg-context wrote: > > BTW, I cannot get simpleslides working with LMTX. > > > I had to make some slight adjustments but have been to lazy to upload a > new and improved version. One reason being that I can't remember my > username and password for the modules section of the garden... I'll have > to ask Taco to reset it for me. > > Thomas > > ___ > 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 > > ___ > ___ 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] setupalign[line]/setupalign[height] break \testpage
Hi everyone, I've recently asked this question: https://www.mail-archive.com/ntg-context@ntg.nl/msg98293.html To reiterate: Is there any way to add a \vfill on a page immediately before a section heading? On the mailing list I then found a possible solution : \setuphead[section][aftersection=cmd] So, I thought \testpage or \checkpage here could be a solution. However, the vertical stretching algorithm seems to interfere with \testpage in some way as the example below tries to illustrate. Can anyone confirm this? Is this a bug or am I missing something? \setuppapersize[A5][A5] % Activate this and \testpage stops working %\setupalign[height] %\setuptolerance[vertical,stretch] %\setupinterlinespace[ % stretch=0.001, % shrink=0.001, % ] % \showframe \starttext \section{Section} \input knuth\par \input knuth\par \input knuth\par \input ward \input ward \testpage[20] % This stops working as soon as vertical stretching is active \input ward \section{Section} \input knuth\par \stoptext Best, Denis ___ 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] conditionally add \vfill before section if at end of page
Hi, I'm still playing/struggling with vertical glue to have pages of a constant height. The following settings give reasonable results: = \setuppapersize[A5][A5] \setupalign[line] \setuptolerance[vertical,stretch] \setupinterlinespace[ stretch=0.001, shrink=0.001, ] \showframe \starttext \section{Section} \input knuth\par \input knuth\par \input knuth\par \input ward \input ward \input ward %\vfill % can a \vfill be added automatically here? \section{Section} \input knuth\par % here we don't have a \vfill as this is on the middle of the page \section{Section} \input knuth\par \stoptext == However, I don't want the stretching if the next page starts with a section heading. Is there any way to add a \vfill on a page immediately before a section heading? \doifatpageborder \doifatpagestart or something similar ? Thanks for you help, Denis ___ 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] calculating optimal height of textblock
One thing, I've noticed: Lines=40 seems to add more space than strictly necessary. Why is that? Example: === \setupbodyfont[10pt] \definepapersize[test][width=140mm,height=208mm] \setuppapersize[test][test] \setuppagenumbering[location={footer,middle}] \setuplayout[reset] \setuplayout[backspace=17mm, topspace=19mm, header=0mm, headerdistance=0mm, footerdistance=4mm, footer=5mm, width=105mm, %height=177mm, % does not suffice for a complete line height=178mm, % enough for a complete line %lines=40, % adds a bit of extra whitespace below the last line rightmargin=0mm, leftmargin=0mm, ] % \setupalign[line] % \setuptolerance[vertical,verytolerant,stretch] % \setupinterlinespace[stretch=0.01] \startsetups[mypenalties] \setdefaultpenalties \setpenalties\clubpenalties{2}{0} \setpenalties\widowpenalties{2}{0} \setpenalties\displaywidowpenalties{2}{0} \stopsetups \setuplayout[setups=mypenalties] %\showframe \showmakeup \showsetups \starttext \dorecurse{5}{\input knuth\par} \stoptext === > -Ursprüngliche Nachricht- > Von: Maier, Denis Christian (UB) > Gesendet: Donnerstag, 29. April 2021 10:03 > An: 'Hans Hagen' ; mailing list for ConTeXt users cont...@ntg.nl> > Betreff: AW: [NTG-context] calculating optimal height of textblock > > Thanks, Hans. That's really helpful. > > Denis > > > -Ursprüngliche Nachricht- > > Von: Hans Hagen > > Gesendet: Mittwoch, 28. April 2021 17:58 > > An: mailing list for ConTeXt users ; Maier, Denis > > Christian (UB) > > Betreff: Re: [NTG-context] calculating optimal height of textblock > > > > On 4/28/2021 2:07 PM, denis.ma...@ub.unibe.ch wrote: > > > > > how do you usually calcultate your layouts? For example in this > > > example, the third value for height is not really helpful as there > > > will never be a complete line : > > > > you can use > > > >lines=40, > > > > instead of height > > > > 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] \setupalign[height] and \setupalign[line] in LMTX
Ok, after dabbling around a bit more, I can now come up with the following example \setuppapersize[A5][A5] \showframe \setuptolerance[vertical,stretch] %\setupalign[line] %\setupinterlinespace[stretch=0.1] % vertical stretching seems to kick in for stretch !=0, no matter how small \setupalign[height] \setupinterlinespace[stretch=0.001] % vertical stretching seems to kick in for stretch !=0, no matter how small \setupdelimitedtext[blockquote] [style={\switchtobodyfont[x]}, spacebefore={medium,flexible}, leftmargin=no] \starttext \dorecurse{10}{ \input knuth \startblockquote \input knuth \stopblockquote \input knuth } \stoptext Two noteworthy things: 1. In LMTX you'll need \setupinterlinespace[stretch=X] with X not 0 for vertical to kick in. 2. \setupalign[line] insists to fill the last page completely. Denis Von: Maier, Denis Christian (UB) Gesendet: Montag, 26. April 2021 11:34 An: 'mailing list for ConTeXt users' Betreff: AW: \setupalign[height] and \setupalign[line] in LMTX Hi, sorry to be such a nuisance, but i'd still love to hear if I'm missing something or if something is going off the rails in LMTX. Best, Denis Von: Maier, Denis Christian (UB) Gesendet: Donnerstag, 22. April 2021 15:07 An: 'mailing list for ConTeXt users' mailto:ntg-context@ntg.nl>> Betreff: \setupalign[height] and \setupalign[line] in LMTX Hi, \setupalign[height] and \setupalign[line] seem to have no effect in a LMTX. Do I need to change something? Best, Denis ``` \setuppapersize[A5][A5] \showframe %\setupalign[line] \setupalign[height] \setupdelimitedtext[blockquote] [ before={\setupindenting[yes]\tfx\setupinterlinespace}, spacebefore=medium, indentnext=no, leftmargin=no, rightmargin=no, ] \starttext \dorecurse{10}{ \input knuth \startblockquote \input knuth \stopblockquote \input knuth } \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] Page building and vertical stretching
Hi, in addition to my previous mails about \setupalign[height], a further question related to page building : I'm trying to understand how ConTeXt builds pages, and how this can be influenced. Regarding the example below, the aim is to have pages that always end at the same place. Now, how will ConTeXt use stretching? Blanks are set to flexible, and the interlinespacing is set to stretch. (But different values for blockquotes.) In which order will ConTeXt proceed? Interlinespacing first, then blanks? Or the other way round? Or both at the same time? And, can this be influenced somehow? Best, Denis \setuppapersize[A5][A5] \showframe \setupblank[big,flexible] \setupinterlinespace[stretch=0.03] \setuptolerance[vertical,stretch] \setupalign[height] \setuphead [section,subject] [ before={\blank[2*big,flexible]}, after={\blank[big,flexible]}, ] \setupdelimitedtext[blockquote] [ before={\tfx\setupinterlinespace[stretch=0.05]}, spacebefore={medium,flexible}, left= ] \starttext \input knuth \section{A section heading} \input knuth\par \blank \input knuth\par \startblockquote \input knuth\par \stopblockquote \input knuth\par \startblockquote \input knuth\par \stopblockquote \input knuth\par \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] arbitrary context commands in xml file
On 3/5/2021 10:27 PM, denis.ma...@ub.unibe.ch wrote: Just to provide more information about what I was thinking: You do your typesetting based on an XML doc. Now it is time for the finishing touches. In a tex document you'd add the usual commands to manipulate the layout: \adaptlayout[lines=+1] \testpage[3] \looseness=-1 / \looseness=+1 \blank \setuptolerance etc. Now, of course you can define an injector for these commands, some are predefined, like page, column, blank. But, if my understanding is correct, you'd have to define one for each of the possible parameters. So, you'll need: \startsetups xml:directive:injector:testpagethree \testpage[3] \stopsetups \startsetups xml:directive:injector:testpagefour \testpage[4] \stopsetups etc., and \startsetups xml:directive:injector:addoneline \adaptlayout[lines=+1] \stopsetups \startsetups xml:directive:injector:addtwolines \adaptlayout[lines=+1] \stopsetups Here, I was thinking if something like this could be easier: you can also do this: \startxmlsetups xml:testpage \testpage[\xmlatt{#1}{n}] \stopxmlsetup and register that one (as in previous 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] arbitrary context commands in xml file
Just to provide more information about what I was thinking: You do your typesetting based on an XML doc. Now it is time for the finishing touches. In a tex document you'd add the usual commands to manipulate the layout: \adaptlayout[lines=+1] \testpage[3] \looseness=-1 / \looseness=+1 \blank \setuptolerance etc. Now, of course you can define an injector for these commands, some are predefined, like page, column, blank. But, if my understanding is correct, you'd have to define one for each of the possible parameters. So, you'll need: \startsetups xml:directive:injector:testpagethree \testpage[3] \stopsetups \startsetups xml:directive:injector:testpagefour \testpage[4] \stopsetups etc., and \startsetups xml:directive:injector:addoneline \adaptlayout[lines=+1] \stopsetups \startsetups xml:directive:injector:addtwolines \adaptlayout[lines=+1] \stopsetups Here, I was thinking if something like this could be easier: Wolfgang's solutions seems to provide that with different means. If I understand correctly, you'd just map an arbitrary XML element to this setup, and you can then do this: \testpage[4] Correct? If yes, that would be a nice solution, but those elements are probably not allowed if your document needs to be validated against a schema, yet processor instructions will be ignored during validation. Any ideas for alternative approaches? What do you think about a raw-tex injector? (Another possibility would be to use Wolfgang's suggestion, and then to use an XSLT stylesheet to remove those illegal nodes for validation purposes...) Best, Denis > -Ursprüngliche Nachricht- > Von: ntg-context Im Auftrag von > denis.ma...@ub.unibe.ch > Gesendet: Freitag, 5. März 2021 16:26 > An: wolfgang.schuster.li...@gmail.com; ntg-context@ntg.nl > Betreff: Re: [NTG-context] arbitrary context commands in xml file > > Thanks. But won't that break the xml? I'll need a new element for this right? > But what if the schema doesn't allow this? > > > Von: Wolfgang Schuster > Gesendet: Freitag, 5. März 2021 16:01:25 > An: mailing list for ConTeXt users > Cc: Maier, Denis Christian (UB) > Betreff: Re: [NTG-context] arbitrary context commands in xml file > > denis.ma...@ub.unibe.ch schrieb am 05.03.2021 um 15:53: > > I mean without breaking the xml of course. Something like an ad hoc > injector... > > \startxmlsetups ... > \xmlflushcontext{#1} > \stopxmlsetups > > 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 > __ > _ ___ 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] Setuptolerance vs setupalign
denis.ma...@ub.unibe.ch schrieb am 02.03.2021 um 11:50: Ok, so this combination will disable tolerant and stretch again? \setuptolerance[tolerant,stretch] \setupalign[hz,hanging] Or will it be preserved? The tolerance settings remain. 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] Setuptolerance vs setupalign
Ok, so this combination will disable tolerant and stretch again? \setuptolerance[tolerant,stretch] \setupalign[hz,hanging] Or will it be preserved? Denis > -Ursprüngliche Nachricht- > Von: Hans Hagen > Gesendet: Dienstag, 2. März 2021 11:49 > An: mailing list for ConTeXt users ; Maier, Denis > Christian (UB) > Betreff: Re: [NTG-context] Setuptolerance vs setupalign > > On 3/2/2021 11:40 AM, denis.ma...@ub.unibe.ch wrote: > > Hi, > > > > I've just noticed that it's possible to do > > > > \setupalign [tolerant,stretch] > > > > and > > > > \setuptolerance [tolerant,stretch] > > > > Are these equivalent? > > > > Will this here have the desired effect? > > > > \setuptolerance[tolerant,stretch] > > > > \setupalign[hz,hanging] > > > > Or will \setupalign overwrite the tolerance settings? > both overwrite ... same underlying code ... at some point it made sense to > support the tolerance keys in align (which is often an option in environments > and commands) > > 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] Setuptolerance vs setupalign
On 3/2/2021 11:40 AM, denis.ma...@ub.unibe.ch wrote: Hi, I’ve just noticed that it’s possible to do \setupalign [tolerant,stretch] and \setuptolerance [tolerant,stretch] Are these equivalent? Will this here have the desired effect? \setuptolerance[tolerant,stretch] \setupalign[hz,hanging] Or will \setupalign overwrite the tolerance settings? both overwrite ... same underlying code ... at some point it made sense to support the tolerance keys in align (which is often an option in environments and commands) 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 ___
[NTG-context] Setuptolerance vs setupalign
Hi, I've just noticed that it's possible to do \setupalign [tolerant,stretch] and \setuptolerance [tolerant,stretch] Are these equivalent? Will this here have the desired effect? \setuptolerance[tolerant,stretch] \setupalign[hz,hanging] Or will \setupalign overwrite the tolerance settings? Best, Denis ___ 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] Issue with text running into footnotes
Hi Pablo, By setting \setupwhitespace[big] the specific issue could be solved, but then the number of pages became too big as a consequence. However, cutting the text into one more paragraph, without changing the whitespace, solved the issue of the text running into the footnote. I don't know how to setup a different penalty, nor what would be its influence in some other parts of my text. Best regards: OK > On 9 Nov 2019, at 11:04, Pablo Rodriguez wrote: > > On 11/4/19 9:49 PM, Wolfgang Schuster wrote: >> Otared Kavian schrieb am 04.11.2019 um 20:30: >>> Hi all, >>> >>> I have a lecture note in which a few footnotes are given, but in some >>> cases the text runs into the footnote, and it has been impossible for >>> me to exhibit a minimal example where the issue appears. In the link >>> https://www.dropbox.com/s/o9h0j6i21emyw2v/footnote-issue.pdf?dl=0 >>> the issue is shown in the real case. >>> [...] >> >> You can increase the vertical tolerance, e.g. >> >> \setuptolerance[vertical,verytolerant] > > Hi Wolfgang, > > I have a much worse sample (text runs totally into foonote space as > there were no footnotes). > > Setting tolerance makes no difference, setting a higher spacebefore or > before makes no difference. > > Hi Otared, > > I wonder whether you could fix your problem. > >> change the penalty settings or use a bigger whitespace between the >> paragraphs. > > Which would be those penalty settings? > > Sorry, but I don’t understand why ConTeXt has this kind of problems with > notes. Why is so difficult to keep the space before notes? > > Many thanks for your help, > > Pablo > -- > http://www.ousia.tk > > ___ > 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 > ___ ___ 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] Issue with text running into footnotes
On 11/4/19 9:49 PM, Wolfgang Schuster wrote: > Otared Kavian schrieb am 04.11.2019 um 20:30: >> Hi all, >> >> I have a lecture note in which a few footnotes are given, but in some >> cases the text runs into the footnote, and it has been impossible for >> me to exhibit a minimal example where the issue appears. In the link >> https://www.dropbox.com/s/o9h0j6i21emyw2v/footnote-issue.pdf?dl=0 >> the issue is shown in the real case. >> [...] > > You can increase the vertical tolerance, e.g. > > \setuptolerance[vertical,verytolerant] Hi Wolfgang, I have a much worse sample (text runs totally into foonote space as there were no footnotes). Setting tolerance makes no difference, setting a higher spacebefore or before makes no difference. Hi Otared, I wonder whether you could fix your problem. > change the penalty settings or use a bigger whitespace between the > paragraphs. Which would be those penalty settings? Sorry, but I don’t understand why ConTeXt has this kind of problems with notes. Why is so difficult to keep the space before notes? Many thanks for your help, Pablo -- http://www.ousia.tk ___ 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] Issue with text running into footnotes
Otared Kavian schrieb am 04.11.2019 um 20:30: Hi all, I have a lecture note in which a few footnotes are given, but in some cases the text runs into the footnote, and it has been impossible for me to exhibit a minimal example where the issue appears. In the link https://www.dropbox.com/s/o9h0j6i21emyw2v/footnote-issue.pdf?dl=0 the issue is shown in the real case. If I remove a few lines of text before the last paragraph on th tepage shown in the above link, the issue disappears, but of course this is not a solution. I am aware that overuse of footnotes is not recommended, but in my lecture notes I have very few of them. Is there a way to prevent such conflicts between footnotes and the last lines of text on a page? You can increase the vertical tolerance, e.g. \setuptolerance[vertical,verytolerant] change the penalty settings or use a bigger whitespace between the paragraphs. 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] Overfull hbox issues: different font,
Julian G schrieb am 03.09.2019 um 23:17: Hello everyone, I apologize if this has been brought up already (or if my mistake is painfully obvious), but I'm having a slight issue with overfull hboxes. I think it is connected to hyphenation and/or using different fonts. Test file: at the end of this mail or at https://gist.github.com/JulianGmp/fe20df633554f5aff02e02eb47a6780f The output PDF I got: https://i.imgur.com/c8S7Di5.png Best regards, Julian % Compiled document (screenshot): % https://i.imgur.com/c8S7Di5.png \setuppapersize[A4] \showframe \setuplayout[ topspace=1cm, header=0cm, width=16cm, footer=0cm, bottom=1cm, ] \definefontfamily[arialFamily] [sans] [Arial] \definefontfamily[calibriFamily] [sans] [Calibri] % \setupbodyfont[myfontfamily, 12pt] \define\printExample{Es kann allerdings ein Problem auftreten: Es ist nicht immer eindeutig, ob die gemessen Phasenerschiebung eine komplette Umdrehung enthaltem. Angenommen sei eine gemessene Verschiebung von \m{\Delta_{\varphi}}, visualisiert in Abbildung 10 ... \blank[small] Zwar wird dadurch eine gewisse Übersicht geschaffen, jedoch werden potentielle Namens- konflikte nicht verhindert.} \setuptolerance[verytolerant] or \setupalign[verytolerant] \starttext \language[de] \section{Standard Font} \subsection{German} \language[de] \printExample{} \subsection{English} \language[en] \printExample{} \switchtobodyfont[arialFamily, 12pt] \section{Arial 12pt} \subsection{German} \language[de] \printExample{} \subsection{English} \language[en] \printExample{} \page \switchtobodyfont[calibriFamily, 14pt] \section{Calibri 14pt} \subsection{German} \language[de] \printExample{} \subsection{English} \language[en] \printExample{} \stoptext 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 ___
[NTG-context] white space after a float in a column
Dear list members, I am struggling with floats in a two-column layout. I understand that there are three up-to-date mechanisms for columns: columnsets, pagecolumns and pagegrids. However, in neither setup I succeed in producing some extra vertical whitespace after the float if a caption is omitted (i.e. location=none in \setupcaption). My example: \definepapersize[square21][width=21cm,height=21cm] \setuppapersize[square21][square21] \definecolumnset[Two][n=2] \setupcolumnset[Two] \setupcaption[intermezzo][location=none,spaceafter=1cm] % no value for spaceafter seems to work \setuptolerance[verytolerant,stretch] \setupframedtexts[frame=on,corner=round,width=local] \setuplayout[grid=yes] \starttext \startcolumnset[Two] \input knuth \par \placeintermezzo[bottom][]{} \startframedtext \input tufte \par \stopframedtext \input knuth \par \stopcolumnset \stoptext If 'columnset' is replaced everywhere by 'pagecolumns' or by 'pagegrid' through a find-and-replace operation, the result remains identical. Is it possible to insert more vertical white space after the intermezzo? A secondary remark: \placeintermezzo always puts the framed text at the top of the next column, no matter whether the parameter is top or bottom. But this is not a big deal. Sytse Knypstra ___ 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] Graphics placement with columnsets/page grids (was "no subject)
Ok, I have now tested a more minimal example with version in TL 2019 and with the current standalone. The example works perfectly with the version that was included in TL 2019 (2019.03.21 21:39). In the current beta I get this behaviour: A figure on a page after page 1 does not stick to the bottom of the page if we have no caption. ``` \usemodule[newcolumnsets] \setuplayout [grid=yes] \definecolumnset[example][n=2] \starttext \startcolumnset[example] \dorecurse{11}{ \input ward\par } \placefigure [btrl,none] {} { \externalfigure[placeholder][width=\columnsetspanwidth{2}] } \dorecurse{10}{ \input ward\par } \stopcolumnset \stoptext ``` Is this a bug, or am I making a mistake somewhere? Best, Denis Am Mi., 24. Juli 2019 um 09:08 Uhr schrieb Denis Maier : > Hi, > > just a quick follow up: > > This (i.e., deleting the "none") gives the right result: > > ``` > \placefigure [btrl] > {} > { > \externalfigure[placeholder][width=\columnsetspanwidth{2}] > } > ``` > > The figure is indeed at the bottom of the page. Yet, `\placefigure > [btrl,none]` seems to remove the caption, but the figure stays where it was > and we have additional lines under the figure. Shouldn't the figure stick > to the margin? > > Best, > Denis > > > Am Di., 23. Juli 2019 um 16:16 Uhr schrieb Denis Maier >: > >> Hi, >> I am typesetting a newsletter using newcolumnsets, and I am struggling >> with placing my graphics. Why isn't the graphic on page 2 at the bottom >> (code below)? >> Best, >> Denis >> >> ``` >> \usemodule[newcolumnsets,simulate] >> >> \useMPlibrary[dum] >> >> \setupbodyfont >> [palatino] >> >> \setuphead[section][style=\bfa\ss] >> >> \setuplayout >> [grid=yes] >> >> \setuplayout >> [backspace=20mm, >> cutspace=15mm, >> width=middle, >> height=middle] >> >> \setupsystem >> [random=1234] >> >> \setuppagenumbering [ >> alternative=, >> location=, >> ] >> >> \setupfootertexts >> [Laubblatt 2019/1] [{\externalfigure[cow][height=15mm]}] >> >> \setupfooter >> [style=\ss] >> >> \setuptolerance >> [verytolerant,stretch] >> >> \definecolor[color-1][.5(red,green)] >> \definecolor[color-2][.5(green,blue)] >> \definecolor[color-3][.5(blue,red)] >> \definecolor[color-4][.5(white,black)] >> \definecolor[color-5][.5(white,color-4)] >> >> \startuniqueMPgraphic{frame} >> fill OverlayBox withcolor \MPcolor{color-1} ; >> \stopuniqueMPgraphic >> >> \startuniqueMPgraphic{contrast} >> fill OverlayBox withcolor \MPcolor{color-2} ; >> \stopuniqueMPgraphic >> >> \defineoverlay[frame] [\uniqueMPgraphic{frame}] >> \defineoverlay[contrast][\uniqueMPgraphic{contrast}] >> >> \definecolumnset[example][n=2] >> >> %\setupcolumnsetstart[example][1][1][2] >> %\setupcolumnsetstart[example][1][2][4] >> %\setupcolumnsetlines[example][1][1][-5] >> %\setupcolumnsetlines[example][1][2][-5] >> >> >> >> \definecolumnsetspan[wide] [n=2, >> background=contrast, >> color=white, >> ] >> >> >> \starttext >> >> \startcolumnset[example] >> >> >> >> \startcolumnsetspan[wide] >> \subject{Einleitung} >> {\tfx\setupinterlinespace\em >> \dorecurse{1}{\fakewords{50}{100}\par} >> } >> \stopcolumnsetspan >> >> \placefigure [btrl,none] >> {} >> { >> \externalfigure[placeholder][width=\columnsetspanwidth{1}] >> } >> >> \dorecurse{5}{\fakewords{50}{100}\par} >> >> \placefigure [btrl,none] >> {} >> { >> \externalfigure[placeholder][width=\columnsetspanwidth{2}] >> } >> >> \dorecurse{5}{\fakewords{50}{100}\par} >> >> \stopcolumnset >> \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] Graphics placement with columnsets/page grids (was "no subject)
Hi, just a quick follow up: This (i.e., deleting the "none") gives the right result: ``` \placefigure [btrl] {} { \externalfigure[placeholder][width=\columnsetspanwidth{2}] } ``` The figure is indeed at the bottom of the page. Yet, `\placefigure [btrl,none]` seems to remove the caption, but the figure stays where it was and we have additional lines under the figure. Shouldn't the figure stick to the margin? Best, Denis Am Di., 23. Juli 2019 um 16:16 Uhr schrieb Denis Maier : > Hi, > I am typesetting a newsletter using newcolumnsets, and I am struggling > with placing my graphics. Why isn't the graphic on page 2 at the bottom > (code below)? > Best, > Denis > > ``` > \usemodule[newcolumnsets,simulate] > > \useMPlibrary[dum] > > \setupbodyfont > [palatino] > > \setuphead[section][style=\bfa\ss] > > \setuplayout > [grid=yes] > > \setuplayout > [backspace=20mm, > cutspace=15mm, > width=middle, > height=middle] > > \setupsystem > [random=1234] > > \setuppagenumbering [ > alternative=, > location=, > ] > > \setupfootertexts > [Laubblatt 2019/1] [{\externalfigure[cow][height=15mm]}] > > \setupfooter > [style=\ss] > > \setuptolerance > [verytolerant,stretch] > > \definecolor[color-1][.5(red,green)] > \definecolor[color-2][.5(green,blue)] > \definecolor[color-3][.5(blue,red)] > \definecolor[color-4][.5(white,black)] > \definecolor[color-5][.5(white,color-4)] > > \startuniqueMPgraphic{frame} > fill OverlayBox withcolor \MPcolor{color-1} ; > \stopuniqueMPgraphic > > \startuniqueMPgraphic{contrast} > fill OverlayBox withcolor \MPcolor{color-2} ; > \stopuniqueMPgraphic > > \defineoverlay[frame] [\uniqueMPgraphic{frame}] > \defineoverlay[contrast][\uniqueMPgraphic{contrast}] > > \definecolumnset[example][n=2] > > %\setupcolumnsetstart[example][1][1][2] > %\setupcolumnsetstart[example][1][2][4] > %\setupcolumnsetlines[example][1][1][-5] > %\setupcolumnsetlines[example][1][2][-5] > > > > \definecolumnsetspan[wide] [n=2, > background=contrast, > color=white, > ] > > > \starttext > > \startcolumnset[example] > > > > \startcolumnsetspan[wide] > \subject{Einleitung} > {\tfx\setupinterlinespace\em > \dorecurse{1}{\fakewords{50}{100}\par} > } > \stopcolumnsetspan > > \placefigure [btrl,none] > {} > { > \externalfigure[placeholder][width=\columnsetspanwidth{1}] > } > > \dorecurse{5}{\fakewords{50}{100}\par} > > \placefigure [btrl,none] > {} > { > \externalfigure[placeholder][width=\columnsetspanwidth{2}] > } > > \dorecurse{5}{\fakewords{50}{100}\par} > > \stopcolumnset > \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)
Hi, I am typesetting a newsletter using newcolumnsets, and I am struggling with placing my graphics. Why isn't the graphic on page 2 at the bottom (code below)? Best, Denis ``` \usemodule[newcolumnsets,simulate] \useMPlibrary[dum] \setupbodyfont [palatino] \setuphead[section][style=\bfa\ss] \setuplayout [grid=yes] \setuplayout [backspace=20mm, cutspace=15mm, width=middle, height=middle] \setupsystem [random=1234] \setuppagenumbering [ alternative=, location=, ] \setupfootertexts [Laubblatt 2019/1] [{\externalfigure[cow][height=15mm]}] \setupfooter [style=\ss] \setuptolerance [verytolerant,stretch] \definecolor[color-1][.5(red,green)] \definecolor[color-2][.5(green,blue)] \definecolor[color-3][.5(blue,red)] \definecolor[color-4][.5(white,black)] \definecolor[color-5][.5(white,color-4)] \startuniqueMPgraphic{frame} fill OverlayBox withcolor \MPcolor{color-1} ; \stopuniqueMPgraphic \startuniqueMPgraphic{contrast} fill OverlayBox withcolor \MPcolor{color-2} ; \stopuniqueMPgraphic \defineoverlay[frame] [\uniqueMPgraphic{frame}] \defineoverlay[contrast][\uniqueMPgraphic{contrast}] \definecolumnset[example][n=2] %\setupcolumnsetstart[example][1][1][2] %\setupcolumnsetstart[example][1][2][4] %\setupcolumnsetlines[example][1][1][-5] %\setupcolumnsetlines[example][1][2][-5] \definecolumnsetspan[wide] [n=2, background=contrast, color=white, ] \starttext \startcolumnset[example] \startcolumnsetspan[wide] \subject{Einleitung} {\tfx\setupinterlinespace\em \dorecurse{1}{\fakewords{50}{100}\par} } \stopcolumnsetspan \placefigure [btrl,none] {} { \externalfigure[placeholder][width=\columnsetspanwidth{1}] } \dorecurse{5}{\fakewords{50}{100}\par} \placefigure [btrl,none] {} { \externalfigure[placeholder][width=\columnsetspanwidth{2}] } \dorecurse{5}{\fakewords{50}{100}\par} \stopcolumnset \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] background color, was: CMYK Color profile
When stupidity strikes, no one's safe. Turns out \setupbackgrounds has an option called backgroundoffset, and this is the solution. The not colorized part was the bleed part of the document, so the background command would be: \setupbackgrounds [paper] [ background=color, backgroundcolor=blue, backgroundoffset=\measured{bleed} ] wonder if this would be handy in the DIN lang folder template in the wiki, as most such brochures will supposingly have a colored background...? Am Samstag, den 01.06.2019, 05:48 +0200 schrieb Benjamin Koppe: > Here's the example. It's basically the code from DIN Lang Folder in > the > Wiki plus a setupbackgrounds command. It works with `page` but fails > to > work with `paper`: > > > > > %% This is a template for a Din lang Folder. > %% The folded page of such a flyer is shorter (97mm) than the other > pages (100mm) > > %% This measure shows how much shorter the folded page is. > \definemeasure > [shortfold] > [3mm] > > %% The bleed measure is necessary if you have colored page > backgrounds > %% or images in the bleed. > %% Different print shops need different bleeds. > \definemeasure > [bleed] > [1mm] > > %% This is the pagesize of the final PDF. > %% The bleed size is added two times to width and height. > \definepapersize > [A4-flyer] > [width=\dimexpr297mm+2\measured{bleed}\relax, > height=\dimexpr210mm+2\measured{bleed}\relax] > > %% The size of a normal page. > \definepapersize > [flyer-page] > [width=100mm, > height=210mm] > > %% The size of the folded page. > \definepapersize > [flyer-page-small] > [width=\dimexpr100mm-\measure{shortfold}\relax, > height=210mm] > > %% Imposition: With the following two commands we arrange the six > pages > %% on the final PDF print sheet. > > %% The flyerpages are imposed on the printed sheet. > \setuppapersize > [flyer-page] > [A4-flyer] > > %% The pages are arranged as a tryptichon. > \setuparranging > [TRYPTICHON] > > %% Because of the shorter folded page and the bleed the pages has > %% to be shifted horizontally on the printed sheet. > %% The values are calculated here. > \definepageshift > [flyer] > [horizontal] > [\dimexpr\measure{bleed}-\measured{shortfold}\relax, > \measure{bleed}, > \measure{bleed}, > \dimexpr2\measured{shortfold}+\measured{bleed}\relax, > \measure{bleed}, > \dimexpr\measure{bleed}-\measured{shortfold}\relax > ] > > > %% The vertical pageshift is simple. > \definepageshift > [flyer] > [vertical] > [\measure{bleed}] > > \setuppageshift > [paper] > [flyer] > > %% We define some measures to construct the page layout. > \definemeasure > [small] > [3mm] > > \definemeasure > [big] > [\measure{small}*2] > > %% Each page has a slightly different page layout. > %% The named layouts (1. bracket) inherit values from other layouts > %% which are assigned in the second bracket. > \definelayout > [first] > [page] > [page=flyer-page, > topspace=2\measured{big}, > backspace=2\measured{small}, > width=\dimexpr\paperwidth-4\measured{small}\relax, > height=\dimexpr\paperheight-4\measured{big}\relax] > > \definelayout > [second] > [first] > [topspace=2\measured{big}, > backspace=2\measured{small}, > width=\dimexpr\paperwidth-2\measured{big}\relax] > > \definelayout > [thirdandfourth] > [second] > [backspace=\measure{big}, > width=\dimexpr\paperwidth-2\measured{big}\relax] > > \definelayout > [fifthandsixth] > [first] > [backspace=\measure{big}, > width=\dimexpr\paperwidth-2\measured{big}\relax] > > %% We assign the layouts to the pages. > \definelayout [1] [first] > \definelayout [2] [second] > \definelayout [3] [thirdandfourth] > \definelayout [4] [thirdandfourth] > \definelayout [5] [fifthandsixth] > \definelayout [6] [fifthandsixth] > > > %% Some setups > \setupmakeup [doublesided=no] > \setuptolerance [verytolerant] > > > %% We want to see page and layout borders. > %% COMMENT THIS OUT BEFORE YOU PRINT! > \showframe > > \setupbackgrounds[paper][background=color,backgroundcolor=blue] > > \starttext > \starttitle[title={First page}] > \input lorem > \stoptitle > \starttitle[title={Second page}] > \input lorem > > \stoptitle > \starttitle[title={Third page}] > \input lorem > > \stoptitle > > \starttitle[title={Fourth page}] > \setuppapersize [flyer-p
Re: [NTG-context] background color, was: CMYK Color profile
Here's the example. It's basically the code from DIN Lang Folder in the Wiki plus a setupbackgrounds command. It works with `page` but fails to work with `paper`: %% This is a template for a Din lang Folder. %% The folded page of such a flyer is shorter (97mm) than the other pages (100mm) %% This measure shows how much shorter the folded page is. \definemeasure [shortfold] [3mm] %% The bleed measure is necessary if you have colored page backgrounds %% or images in the bleed. %% Different print shops need different bleeds. \definemeasure [bleed] [1mm] %% This is the pagesize of the final PDF. %% The bleed size is added two times to width and height. \definepapersize [A4-flyer] [width=\dimexpr297mm+2\measured{bleed}\relax, height=\dimexpr210mm+2\measured{bleed}\relax] %% The size of a normal page. \definepapersize [flyer-page] [width=100mm, height=210mm] %% The size of the folded page. \definepapersize [flyer-page-small] [width=\dimexpr100mm-\measure{shortfold}\relax, height=210mm] %% Imposition: With the following two commands we arrange the six pages %% on the final PDF print sheet. %% The flyerpages are imposed on the printed sheet. \setuppapersize [flyer-page] [A4-flyer] %% The pages are arranged as a tryptichon. \setuparranging [TRYPTICHON] %% Because of the shorter folded page and the bleed the pages has %% to be shifted horizontally on the printed sheet. %% The values are calculated here. \definepageshift [flyer] [horizontal] [\dimexpr\measure{bleed}-\measured{shortfold}\relax, \measure{bleed}, \measure{bleed}, \dimexpr2\measured{shortfold}+\measured{bleed}\relax, \measure{bleed}, \dimexpr\measure{bleed}-\measured{shortfold}\relax ] %% The vertical pageshift is simple. \definepageshift [flyer] [vertical] [\measure{bleed}] \setuppageshift [paper] [flyer] %% We define some measures to construct the page layout. \definemeasure [small] [3mm] \definemeasure [big] [\measure{small}*2] %% Each page has a slightly different page layout. %% The named layouts (1. bracket) inherit values from other layouts %% which are assigned in the second bracket. \definelayout [first] [page] [page=flyer-page, topspace=2\measured{big}, backspace=2\measured{small}, width=\dimexpr\paperwidth-4\measured{small}\relax, height=\dimexpr\paperheight-4\measured{big}\relax] \definelayout [second] [first] [topspace=2\measured{big}, backspace=2\measured{small}, width=\dimexpr\paperwidth-2\measured{big}\relax] \definelayout [thirdandfourth] [second] [backspace=\measure{big}, width=\dimexpr\paperwidth-2\measured{big}\relax] \definelayout [fifthandsixth] [first] [backspace=\measure{big}, width=\dimexpr\paperwidth-2\measured{big}\relax] %% We assign the layouts to the pages. \definelayout [1] [first] \definelayout [2] [second] \definelayout [3] [thirdandfourth] \definelayout [4] [thirdandfourth] \definelayout [5] [fifthandsixth] \definelayout [6] [fifthandsixth] %% Some setups \setupmakeup [doublesided=no] \setuptolerance [verytolerant] %% We want to see page and layout borders. %% COMMENT THIS OUT BEFORE YOU PRINT! \showframe \setupbackgrounds[paper][background=color,backgroundcolor=blue] \starttext \starttitle[title={First page}] \input lorem \stoptitle \starttitle[title={Second page}] \input lorem \stoptitle \starttitle[title={Third page}] \input lorem \stoptitle \starttitle[title={Fourth page}] \setuppapersize [flyer-page-small] [A4-flyer] \input lorem \stoptitle \starttitle[title={Fifth page}] \input lorem \stoptitle \starttitle[title={Sixth page}] \setuppapersize [flyer-page] [A4-flyer] \input lorem \stoptitle \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] DIN lang folder with crop marks
Hallo, I'm new to ConTeXt and am crazy enough to start with something nonstandard. Of course I got stuck pretty fast. I started out with this: https://wiki.contextgarden.net/DIN_lang_folder and then found some info on crop marks here: https://wiki.contextgarden.net/PaperSetup#Crop_marks I tried different options (marked=on, market=colour, marked=color..., something with \setuplayout[location={middle,middle}]...) Some times the crop marks don't show at all, sometimes they are set off a bit so they don't fit with the actual document. I added the whole file as I really do not knwo (yet) how to reduce things... Thanks for any help De Benny %% This is a template for a Din lang Folder. %% The folded page of such a flyer is shorter (97mm) than the other pages (100mm) %% This measure shows how much shorter the folded page is. \definemeasure [shortfold] [3mm] %% The bleed measure is necessary if you have colored page backgrounds %% or images in the bleed. %% Different print shops need different bleeds. \definemeasure [bleed] [3mm] %% This is the pagesize of the final PDF. %% The bleed size is added two times to width and height. \definepapersize [A4-flyer] [width=\dimexpr297mm+2\measured{bleed}\relax, height=\dimexpr210mm+2\measured{bleed}\relax] %% The size of a normal page. \definepapersize [flyer-page] [width=100mm, height=210mm] %% The size of the folded page. \definepapersize [flyer-page-small] [width=\dimexpr100mm-\measure{shortfold}\relax, height=210mm] %% Imposition: With the following two commands we arrange the six pages %% on the final PDF print sheet. %% The flyerpages are imposed on the printed sheet. \setuppapersize [flyer-page] [A4-flyer] %% The pages are arranged as a tryptichon. \setuparranging [TRYPTICHON] %% Because of the shorter folded page and the bleed the pages has %% to be shifted horizontally on the printed sheet. %% The values are calculated here. \definepageshift [flyer] [horizontal] [\dimexpr\measure{bleed}-\measured{shortfold}\relax, \measure{bleed}, \measure{bleed}, \dimexpr2\measured{shortfold}+\measured{bleed}\relax, \measure{bleed}, \dimexpr\measure{bleed}-\measured{shortfold}\relax ] %% The vertical pageshift is simple. \definepageshift [flyer] [vertical] [\measure{bleed}] \setuppageshift [paper] [flyer] %% We define some measures to construct the page layout. \definemeasure [small] [3mm] \definemeasure [big] [\measure{small}*2] %% Each page has a slightly different page layout. %% The named layouts (1. bracket) inherit values from other layouts %% which are assigned in the second bracket. \definelayout [first] [page] [page=flyer-page, topspace=2\measured{big}, backspace=2\measured{small}, width=\dimexpr\paperwidth-4\measured{small}\relax, height=\dimexpr\paperheight-4\measured{big}\relax] \definelayout [second] [first] [topspace=2\measured{big}, backspace=2\measured{big}, width=\dimexpr\paperwidth-3\measured{big}\relax] \definelayout [thirdandfourth] [second] [backspace=\measure{big}, width=\dimexpr\paperwidth-2\measured{big}\relax] \definelayout [fifthandsixth] [first] [backspace=\measure{big}, width=\dimexpr\paperwidth-2\measured{big}\relax] %% We assign the layouts to the pages. \definelayout [1] [first] \definelayout [2] [second] \definelayout [3] [thirdandfourth] \definelayout [4] [thirdandfourth] \definelayout [5] [fifthandsixth] \definelayout [6] [fifthandsixth] %% Some setups \setupmakeup [doublesided=no] \setupbodyfont [mainface,10pt] \setuptolerance [verytolerant] \setuplayout[marking=color] %% We want to see page and layout borders. %% COMMENT THIS OUT BEFORE YOU PRINT! \showframe \starttext \starttitle[title={First page},marking{ }] \input lorem \stoptitle \starttitle[title={Second page},marking{ }] \input lorem \stoptitle \starttitle[title={Third page},marking{ }] \input lorem \stoptitle \starttitle[title={Fourth page},marking{ }] \setuppapersize [flyer-page-small] [A4-flyer] \input lorem \stoptitle \starttitle[title={Fifth page},marking{ }] \input lorem \stoptitle \starttitle[title={Sixth page},marking{ }] \setuppapersize [flyer-page] [A4-flyer] \input lorem \stoptitle \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] Creating flyers with ConTeXt
Hi Marco, On 21.09.18 16:56, Marco Patzer wrote: > A while ago I made a corporate flyer with context using the > TRYPTICHON method. Printing required 3mm bleed. Thanks a lot for this template. This is exactly what I need. I try to understand it in order to adapt it to the requirements of my print shop which only needs a bleed of 1mm. I hope that I understand it right: Page 1,2,3 and 6 are 100mm Page 4 and 5 are 97mm as these are the pages that are folded to the inside. The measure "shortfold" (3mm) reduces the 100mm page to 97mm. Right? The pageshift thing is beyond my horizon so I won't comment on this. You adjust the backspace of the pages with multiples of the measure "big". Right? As you can see in my example I use layers on page 2-4 to have bleeding images on the top of the page. This works more or less. But as you can see there are blank white spaces between the images of page 2-4. Maybe I can adjust this by using absolut measures like 100mm or 97mm in the layers. I have to adjust the layout of pages 2-4 so that the text starts below the images. An now here is my question. Is there a value I can simply change to have a pdf with only 1mm bleed? Only adjusting the papersize A4-flyer to 299mm/212mm does not work of course. TIA juh %% The page shift of page #6 needs to be adjusted if the value is changed, no %% clue why. %% A4-flyer pagesize needs to be adjusted as well \definemeasure [shortfold] [3mm] \definepapersize [A4-flyer] [width=303mm, height=216mm] \definepapersize [flyer-page] [width=100mm, height=210mm] \definepapersize [flyer-page-small] [width=\dimexpr100mm-\measure{shortfold}\relax, height=210mm] \setuppapersize [flyer-page] [A4-flyer] \setuparranging [TRYPTICHON] %% The page shift of page #6 needs to be adjusted if shortfold is adjusted, no %% clue why. \definepageshift [flyer] [horizontal] [\zeropoint, \measure{shortfold}, \measure{shortfold}, 3\measured{shortfold}, \measure{shortfold}, \zeropoint] \definepageshift [flyer] [vertical] [\measure{shortfold}] \setuppageshift [paper] [flyer] \definemeasure [small] [3mm] \definemeasure [big] [\measure{small}*2] \definelayout [first] [page] [page=flyer-page, topspace=2\measured{big}, backspace=2\measured{small}, width=\dimexpr\paperwidth-4\measured{small}\relax, height=\dimexpr\paperheight-4\measured{big}\relax] \definelayout [second] [first] [topspace=4\measured{big}, backspace=2\measured{big}, width=\dimexpr\paperwidth-3\measured{big}\relax, height=\dimexpr\paperheight-4\measured{big}-2\measured{big}\relax] \definelayout [thirdandfourth] [second] [backspace=\measure{big}, width=\dimexpr\paperwidth-2\measured{big}\relax] \definelayout [fifthandsixth] [first] [backspace=\measure{big}, width=\dimexpr\paperwidth-2\measured{big}\relax] \definelayout [1] [first] \definelayout [2] [second] \definelayout [3] [thirdandfourth] \definelayout [4] [thirdandfourth] \definelayout [5] [fifthandsixth] \definelayout [6] [fifthandsixth] \setuphead[title][header=none,footer=none] \definecolor [hs-logoblau] [c=1.0,m=0.46,y=0.0,k=0.42] \definecolor [hs-dunkelblau] [c=0.65,m=0.36,y=0.0,k=0.26] \definecolor [hs-mittelblau] [c=0.72,m=0.33,y=0.0,k=0.28] \definecolor [hs-hellblau] [c=0.30,m=0.14,y=0.0,k=0.14] \definecolor [hs-orange] [c=0.0,m=0.67,y=1.0,k=0.13] \definefontfamily [mainface] [rm] [Tex Gyre Heros] \setupmakeup [doublesided=no] \setupinterlinespace[line=3ex] \setuphead [title] [textcolor=hs-dunkelblau,textstyle=\bfc, align=right] \setupbodyfont [mainface,10pt] \setuptolerance [verytolerant] \mainlanguage [de] \setbreakpoints[compound] \definelayer[Hintergrund] [x=0, y=0, width=\paperwidth, height=\paperwidth] \setlayer[Hintergrund] [x=1.2cm, y=1cm] {\externalfigure[../bilder/logo.pdf][width=7cm]} \definelayer[topic1] [x=-3mm, y=-3mm, width=\paperwidth, height=\paperheight] \setlayer[topic1] [x=-3mm, y=-3mm] {\externalfigure[../bilder/topic1.png][width=102mm]} \definelayer[topic2] [x=0, y=-3mm, width=\paperwidth, height=\paperheight] \setlayer[topic2] [x=0cm, y=-3mm] {\externalfigure[../bilder/topic2.png][width=99mm,height=58mm]} \definelayer[topic3] [x=0, y=0, width=\paperwidth, height=\paperwidth] \setlayer[topic3] [x=0cm, y=-3mm] {\externalfigure[../bilder/topic3.png][width=102mm]} \definelayer[blau] [x=0, y=-3mm, width=\paperwidth, height=\paperheight] \setlayer[blau] [x=0mm,y=-3mm] {\framed[frame=off,background=color, backgroundcolor=hs-dunkelblau,width=102mm, height=303mm]{}} \showframe \starttext \setupbackgrounds[page][background=blau] \startstandardmakeup \externalfigure [../bilder/example.png] [width=\textwidth] \blank[5*big] \externalfigure [../bilder/logo.svg] [width=\textwidth] \stopstandardmakeup \starttitle[title={PAGE 2},marking{}] \setupbackgrounds[page][background=topic1] \input lorem \stoptitle \starttitle[title={PAGE 3},marking{ }] \setupbackgrounds[page][backgr
Re: [NTG-context] Issues with hyphenation with latest beta 2018.09.12
On 9/12/2018 18:16, Joseph Canedo wrote: Hello, Typesetting some documents I notice several overfull boxes and having a look to output document it looks that somehow no hyphenation at all is performed (comparing to document produced with previous beta). I use thiese settings linked to hyphenation \setupalign[hanging, lesshyphenation, hz] \language[fr] % french hyphenation \mainlanguage[fr] In some places I use ‘morehyphenation’ align option and still no hyphenation at all. Any setting has changed by any chance ? Thanks a lot Best regards Joseph Seconding the issue. No hyphenation in ragged right text with no change in setup-- I use: \setuptolerance[horizontal,verystrict] \setupalign[flushleft,hanging,nohz,hyphenated,morehyphenation,height] Oddly, I do see hyphenation in one place where I have overridden the default via \startexceptions. -- Rik ___ 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] Horizontal line after text in an environment
Hi Hans, Thank you it works perfectly. I know this command but I never know when to use it. Fabrice 2018-04-25 21:22 GMT+02:00 Hans Hagen <j.ha...@xs4all.nl>: > On 4/25/2018 4:59 PM, Fabrice Couvreur wrote: > >> Hello, >> In this environment, when the text has sufficient height, the horizontal >> line is well below the figure. However when the height of text is not >> sufficient, the position of the line is not correct and I would like it >> also below the figure. >> > > \flushsidefloats > >> Thanks >> Fabrice >> >> >> \setuptolerance[stretch,verytolerant] >> \useMPlibrary[dum] >> >> >> \define[1]\ProprieteHeadcommand >>{\textrule[top]{#1}} >> >> \defineenumeration >>[propriete] >>[text=Propriété, >> title=yes, >> headstyle={bold}, >> style=italic, >> headcommand=\ProprieteHeadcommand, >> numbercommand=\groupedcommand{}{\nbsp}, >> after=\textrule] >> >> \starttext >> >> \startpropriete >> \placefigure[right,none]{}{\externalfigure[dummy]} >> \startitemize >> \item \input ward >> >> \item \input ward >> \stopitemize >> \stoppropriete >> \startpropriete >> \placefigure[right,none]{}{\externalfigure[dummy]} >> \startitemize >> \item First item >> >> \item Second item >> \stopitemize >> \stoppropriete >> >> \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/list >> info/ntg-context >> webpage : http://www.pragma-ade.nl / http://context.aanhet.net >> archive : https://bitbucket.org/phg/context-mirror/commits/ >> wiki : http://contextgarden.net >> >> ___ >> >> > > -- > > - > 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/list > info/ntg-context > webpage : http://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : http://contextgarden.net > > ___ ___ 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] Horizontal line after text in an environment
On 4/25/2018 4:59 PM, Fabrice Couvreur wrote: Hello, In this environment, when the text has sufficient height, the horizontal line is well below the figure. However when the height of text is not sufficient, the position of the line is not correct and I would like it also below the figure. \flushsidefloats Thanks Fabrice \setuptolerance[stretch,verytolerant] \useMPlibrary[dum] \define[1]\ProprieteHeadcommand {\textrule[top]{#1}} \defineenumeration [propriete] [text=Propriété, title=yes, headstyle={bold}, style=italic, headcommand=\ProprieteHeadcommand, numbercommand=\groupedcommand{}{\nbsp}, after=\textrule] \starttext \startpropriete \placefigure[right,none]{}{\externalfigure[dummy]} \startitemize \item \input ward \item \input ward \stopitemize \stoppropriete \startpropriete \placefigure[right,none]{}{\externalfigure[dummy]} \startitemize \item First item \item Second item \stopitemize \stoppropriete \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 ___ -- - 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 ___
[NTG-context] Horizontal line after text in an environment
Hello, In this environment, when the text has sufficient height, the horizontal line is well below the figure. However when the height of text is not sufficient, the position of the line is not correct and I would like it also below the figure. Thanks Fabrice \setuptolerance[stretch,verytolerant] \useMPlibrary[dum] \define[1]\ProprieteHeadcommand {\textrule[top]{#1}} \defineenumeration [propriete] [text=Propriété, title=yes, headstyle={bold}, style=italic, headcommand=\ProprieteHeadcommand, numbercommand=\groupedcommand{}{\nbsp}, after=\textrule] \starttext \startpropriete \placefigure[right,none]{}{\externalfigure[dummy]} \startitemize \item \input ward \item \input ward \stopitemize \stoppropriete \startpropriete \placefigure[right,none]{}{\externalfigure[dummy]} \startitemize \item First item \item Second item \stopitemize \stoppropriete \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] Text overflowing on a figure included in a float
Hi Hans, The solution you propose fixes the problem with the attached file, thanks. However, the problem is not solved if I use the class you created for the document fonts-mkiv. Fabrice 2018-04-08 11:54 GMT+02:00 Hans Hagen <j.ha...@xs4all.nl>: > On 4/8/2018 11:08 AM, Fabrice Couvreur wrote: > >> Hello, >> Sorry if the example is not minimal but otherwise it would be difficult >> to explain the problem. The text overflows on the figure and I do not know >> how to correct this. >> > > By choosing the right language: > > \mainlanguage[fr] > > or increasing the tolerance: > > % \setuptolerance[stretch,verytolerant] > > > Thank you >> Fabrice >> >> >> \usemodule[pgfplots] >> >> \pgfplotsset{compat=newest} >> >> \starttext >> \placefigure[right,none]{}{ >> \hbox{\framed{\switchtobodyfont[8pt] >> \starttikzpicture[/pgf/declare function={g(\x)=3*\x +7;},/pgf/declare >> function={f(\x)=-4*\x +1;},/pgf/declare function={h(\x)=2*\x -5;}] >> \startaxis[ >> restrict x to domain=-20:20, xmax=20, xmin=-20, >> restrict y to domain=-25:30, ymax=30, ymin=-25, >> x=0.1cm, >> y=0.1cm, >> axis x line = middle, >> axis y line = middle, >> axis line style = thick, >> major grid style=gray, >> minor grid style=gray, >> tickwidth=0.1cm, >> xtick align=outside, >> ytick align=outside, >> grid=both, >> xtick={-15,-10,...,15}, >> ytick={-20,-15,...,25}, >> xticklabels={\empty,\empty,\empty,\empty,5,\empty,\empty,\empty}, >> yticklabels={\empty,\empty,\empty,\empty,\empty,5,\empty,\ >> empty,\empty,\empty,\empty,\empty}, >> extra x ticks={-20,20}, >> extra x tick label={\null}, >> extra y ticks={-25,30}, >> extra y tick label={\null}, >> extra tick style={tick style={draw=none}}, >> every tick/.style={ >> black, >> thick, >>}, >> y tick label style={ >> /pgf/number format/1000 sep={} >> }, >> xlabel=$x$,ylabel=$y$, >> every axis x label/.style={ >> at={(ticklabel* cs:1.01)}, >> anchor=west, >> }, >> every axis y label/.style={ >> at={(ticklabel* cs:1.01)}, >> anchor=south, >> }, >> samples=2000, >> >=stealth, >> ] >> >> \addplot [smooth,domain=-20:20,thick,darkblue] {f(x)} ; >> \addplot [smooth,domain=-20:20,thick,darkred] {g(x)} ; >> \addplot [smooth,domain=-20:20,thick,yellow] {h(x)} ; >> >> \draw[thick,darkgreen](5,-25)--(5,30) ; >> >> \node[below left=2pt] at (-0.1,-0.1,0) {\math{0}} ; >> >> \stopaxis >> \stoptikzpicture}}} >>\startitemize[n] >>\item On considère les droites \math{{\cal D}\,\colon x=5} et >> \math{{\cal D'}\,\colon y=3x+7}. >> >> \startitemize[a] >> \item Que vaut l'abscisse du point d'intersection de \math{{\cal D}} >> et \math{{\cal D'}} ? >> \item Calculer alors son ordonnée. >> \item Interpréter graphiquement le résultat sur le graphique. >> \stopitemize >>\item On considère les droites \math{\Delta \,\colon y=-4x+1} et >> \math{\Delta '\,\colon y=2x-5}. >> >> \startitemize[a] >> \item Résoudre l'équation \math{-4x+1=2x-5}. >> \item Donner une interprétation graphique de la solution obtenue. >> \item Donner les coordonnées du point d'intersection de >> \math{\Delta} et \math{\Delta '}. >> \item Interpréter graphiquement le résultat sur le graphique. >> \stopitemize >>\stopitemize >> \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/list >> info/ntg-context >> webpage : http://www.pragma-ade.nl / http://context.aanhet.net >> archive : https://bitbucket.org/phg/context-mirror/commits/ >> wiki : http://contextgarden.net >> >> ___ >> >> > > -- > > - > Hans Hagen | PRAGMA ADE > Ridderstraat 27 | 8061 GH Hasselt | The Netherlands >tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl > - >
Re: [NTG-context] Text overflowing on a figure included in a float
On 4/8/2018 11:08 AM, Fabrice Couvreur wrote: Hello, Sorry if the example is not minimal but otherwise it would be difficult to explain the problem. The text overflows on the figure and I do not know how to correct this. By choosing the right language: \mainlanguage[fr] or increasing the tolerance: % \setuptolerance[stretch,verytolerant] Thank you Fabrice \usemodule[pgfplots] \pgfplotsset{compat=newest} \starttext \placefigure[right,none]{}{ \hbox{\framed{\switchtobodyfont[8pt] \starttikzpicture[/pgf/declare function={g(\x)=3*\x +7;},/pgf/declare function={f(\x)=-4*\x +1;},/pgf/declare function={h(\x)=2*\x -5;}] \startaxis[ restrict x to domain=-20:20, xmax=20, xmin=-20, restrict y to domain=-25:30, ymax=30, ymin=-25, x=0.1cm, y=0.1cm, axis x line = middle, axis y line = middle, axis line style = thick, major grid style=gray, minor grid style=gray, tickwidth=0.1cm, xtick align=outside, ytick align=outside, grid=both, xtick={-15,-10,...,15}, ytick={-20,-15,...,25}, xticklabels={\empty,\empty,\empty,\empty,5,\empty,\empty,\empty}, yticklabels={\empty,\empty,\empty,\empty,\empty,5,\empty,\empty,\empty,\empty,\empty,\empty}, extra x ticks={-20,20}, extra x tick label={\null}, extra y ticks={-25,30}, extra y tick label={\null}, extra tick style={tick style={draw=none}}, every tick/.style={ black, thick, }, y tick label style={ /pgf/number format/1000 sep={} }, xlabel=$x$,ylabel=$y$, every axis x label/.style={ at={(ticklabel* cs:1.01)}, anchor=west, }, every axis y label/.style={ at={(ticklabel* cs:1.01)}, anchor=south, }, samples=2000, >=stealth, ] \addplot [smooth,domain=-20:20,thick,darkblue] {f(x)} ; \addplot [smooth,domain=-20:20,thick,darkred] {g(x)} ; \addplot [smooth,domain=-20:20,thick,yellow] {h(x)} ; \draw[thick,darkgreen](5,-25)--(5,30) ; \node[below left=2pt] at (-0.1,-0.1,0) {\math{0}} ; \stopaxis \stoptikzpicture}}} \startitemize[n] \item On considère les droites \math{{\cal D}\,\colon x=5} et \math{{\cal D'}\,\colon y=3x+7}. \startitemize[a] \item Que vaut l'abscisse du point d'intersection de \math{{\cal D}} et \math{{\cal D'}} ? \item Calculer alors son ordonnée. \item Interpréter graphiquement le résultat sur le graphique. \stopitemize \item On considère les droites \math{\Delta \,\colon y=-4x+1} et \math{\Delta '\,\colon y=2x-5}. \startitemize[a] \item Résoudre l'équation \math{-4x+1=2x-5}. \item Donner une interprétation graphique de la solution obtenue. \item Donner les coordonnées du point d'intersection de \math{\Delta} et \math{\Delta '}. \item Interpréter graphiquement le résultat sur le graphique. \stopitemize \stopitemize \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 ___ -- - 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] TwoColumns in two different languages, with alternate text on even and odd page.
Hi Hans, Thank you very much Hans for your help. I'll soon try your code and I'll report sooner as possible. A sample of some work I've referred to, using two columns, a rich criticus apparatus in greek, latin and georgian, is : "Les Hymnes de la Résurrection. I. Hymnographie liturgique géorgienne, introduction, traduction et annotation des textes du Sinaï 18 (Sources liturgiques, 3), Paris, 2000" (see here : https://rbecs.org/2015/05/06/hr/#more-3249) Unfortunately, the book is not under my hand. JP - Mail original - De: "Hans Hagen" <pra...@wxs.nl> À: ntg-context@ntg.nl Envoyé: Mardi 22 Novembre 2016 20:14:45 Objet: Re: [NTG-context] TwoColumns in two different languages, with alternate text on even and odd page. On 11/18/2016 1:16 PM, Jean-Pierre Delange wrote: > I make a statement on a part of the Arthur's reply (" there are no real-life > examples of documents that use it") : in fact, there are rare examples of > such printing materials : scholar editing and printing of Ancient texts are > mainly (if I am right) such printing material (including Ancient Armenian or > Georgian liturgic hymns). > > An example of such a book : on the even page you read a 'twocolumns' text > (say : Greek text with its Latin translation) with there own page setting, > including Stephanus apparatus in the footer, and several levels of footnotes > within the same footer. Commentaries (in English, French, German, usw) and > the like are on the odd page. The average (or regular) situation seems to be > less complicated : Greek or Latin text on the even page and translation on > the odd page. With Pablo Rodriguez help (actually, this is mainly Pablo's > work) I have tried to figure such a goal. But before setting up the even/odd > page, there is an issue which one has to fix: the text on two columns is well > fitted on the first page, but not on the following pages. How to fix this > issue with Greek text on the left column and Latin Text on the right one ? > See the mismatch between texts on the second page in the sample below . > Thank you very much for your remarks and advices. Below is an example that should work with the latest beta. I introduced two new keys 'spacebefore' and 'spaceinbetween' for notes. These are needed when we have multiple note categories. In mixed columns this is supported. In single column mode only with luatex experimental (so patience is needed, but no one asked for this feature anyway). \setupnotes[spacebefore=4*line] \setupnotes[spaceinbetween=line] \starttext \setupnote [footnote][before=,after=] \definenote[toofnote][before=,after=] \dorecurse{100}{ test #1.a\footnote{note #1} test #1.b\toofnote{eton #1} \par} \page \setuplanguage[agr][patterns={agr,la}] \mainlanguage[agr] % Greek as main language \definefallbackfamily [mainface] [serif] [GFS Didot] [preset=range:greek] \definefontfamily [mainface] [serif] [TeX Gyre Pagella] \setupbodyfont[mainface] % ,7.8pt] \setuplayout[header=2cm,footer=2cm] \setupnotes[compress=yes] \setupnotations[alternative=serried] \definenote[aNote] \definenote[bNote] \definenote[cNote] \definenote[dNote] \setupnote[aNote][before=,after=] \setupnote[bNote][before=,after=] \setupnote[cNote][before=,after=] \setupnote[dNote][before=,after=] \def\ANote#1#2{#1\aNote{#1] #2}} \def\BNote#1#2{#1\bNote{#1] #2}} \def\CNote#1#2{#1\cNote{#1] #2}} \def\DNote#1#2{#1\dNote{#1] #2}} \setupalign[hz, hanging] \setuptolerance[strict] \setupnotes[spacebefore=4*line] \setupnotes[spaceinbetween=] % \setuplinenumbering[step=5, location=inright, distance=1ex,align=center, width=0.5em] \definemargindata[Stephanus][location=inner, distance=2ex,style=\em] % \setupbodyfont[mainface,7.8pt] \start\fr % some text in French Définir un `apparat critique' et le mettre en page avec un traitement de texte courant est un véritable casse-tête. LaTeX et ConTeXt offrent des outils d'automatisation encore assez mal connus dans la communauté des éditeurs, notamment dans l'édition savante, pour la collation et la comparaison de textes médiévaux. \stop \blank \start\en % some text in English {\em It is not very easy to define a `criticus apparatus' with some current tools (like Microsoft Office Word or LibreOffice). Maybe \ConTeXt offers some ways that seem easier, in order to improve clear and precise printing.} \stop \dorecurse{4}{ \startmixedcolumns[n=2, balance=yes] \Stephanus{1a} Ὁμώνυμα λέγεται ὧν ὄνομα μόνον κοινόν, ὁ δὲ κατὰ τοὔνομα λόγος τῆς οὐσίας ἕτερος, οἷον ζῷον ὅ τε ἄνθρωπος καὶ τὸ γεγραμμένον• τούτων γὰρ ὄνομα μόνον κοινόν, ὁ δὲ κατὰ τοὔνομα λ
Re: [NTG-context] TwoColumns in two different languages, with alternate text on even and odd page.
On 11/18/2016 1:16 PM, Jean-Pierre Delange wrote: I make a statement on a part of the Arthur's reply (" there are no real-life examples of documents that use it") : in fact, there are rare examples of such printing materials : scholar editing and printing of Ancient texts are mainly (if I am right) such printing material (including Ancient Armenian or Georgian liturgic hymns). An example of such a book : on the even page you read a 'twocolumns' text (say : Greek text with its Latin translation) with there own page setting, including Stephanus apparatus in the footer, and several levels of footnotes within the same footer. Commentaries (in English, French, German, usw) and the like are on the odd page. The average (or regular) situation seems to be less complicated : Greek or Latin text on the even page and translation on the odd page. With Pablo Rodriguez help (actually, this is mainly Pablo's work) I have tried to figure such a goal. But before setting up the even/odd page, there is an issue which one has to fix: the text on two columns is well fitted on the first page, but not on the following pages. How to fix this issue with Greek text on the left column and Latin Text on the right one ? See the mismatch between texts on the second page in the sample below . Thank you very much for your remarks and advices. Below is an example that should work with the latest beta. I introduced two new keys 'spacebefore' and 'spaceinbetween' for notes. These are needed when we have multiple note categories. In mixed columns this is supported. In single column mode only with luatex experimental (so patience is needed, but no one asked for this feature anyway). \setupnotes[spacebefore=4*line] \setupnotes[spaceinbetween=line] \starttext \setupnote [footnote][before=,after=] \definenote[toofnote][before=,after=] \dorecurse{100}{ test #1.a\footnote{note #1} test #1.b\toofnote{eton #1} \par} \page \setuplanguage[agr][patterns={agr,la}] \mainlanguage[agr] % Greek as main language \definefallbackfamily [mainface] [serif] [GFS Didot] [preset=range:greek] \definefontfamily [mainface] [serif] [TeX Gyre Pagella] \setupbodyfont[mainface] % ,7.8pt] \setuplayout[header=2cm,footer=2cm] \setupnotes[compress=yes] \setupnotations[alternative=serried] \definenote[aNote] \definenote[bNote] \definenote[cNote] \definenote[dNote] \setupnote[aNote][before=,after=] \setupnote[bNote][before=,after=] \setupnote[cNote][before=,after=] \setupnote[dNote][before=,after=] \def\ANote#1#2{#1\aNote{#1] #2}} \def\BNote#1#2{#1\bNote{#1] #2}} \def\CNote#1#2{#1\cNote{#1] #2}} \def\DNote#1#2{#1\dNote{#1] #2}} \setupalign[hz, hanging] \setuptolerance[strict] \setupnotes[spacebefore=4*line] \setupnotes[spaceinbetween=] % \setuplinenumbering[step=5, location=inright, distance=1ex,align=center, width=0.5em] \definemargindata[Stephanus][location=inner, distance=2ex,style=\em] % \setupbodyfont[mainface,7.8pt] \start\fr % some text in French Définir un `apparat critique' et le mettre en page avec un traitement de texte courant est un véritable casse-tête. LaTeX et ConTeXt offrent des outils d'automatisation encore assez mal connus dans la communauté des éditeurs, notamment dans l'édition savante, pour la collation et la comparaison de textes médiévaux. \stop \blank \start\en % some text in English {\em It is not very easy to define a `criticus apparatus' with some current tools (like Microsoft Office Word or LibreOffice). Maybe \ConTeXt offers some ways that seem easier, in order to improve clear and precise printing.} \stop \dorecurse{4}{ \startmixedcolumns[n=2, balance=yes] \Stephanus{1a} Ὁμώνυμα λέγεται ὧν ὄνομα μόνον κοινόν, ὁ δὲ κατὰ τοὔνομα λόγος τῆς οὐσίας ἕτερος, οἷον ζῷον ὅ τε ἄνθρωπος καὶ τὸ γεγραμμένον• τούτων γὰρ ὄνομα μόνον κοινόν, ὁ δὲ κατὰ τοὔνομα λόγος τῆς οὐσίας ἕτερος• ἐὰν γὰρ ἀποδιδῷ τις τί ἐστιν αὐτῶν ἑκατέρῳ τὸ ζῴῳ εἶναι, ἴδιον ἑκατέρου λόγον ἀποδώσει. συνώνυμα δὲ λέγεται ὧν τό τε ὄνομα κοινὸν καὶ ὁ κατὰ τοὔνομα λόγος τῆς οὐσίας ὁ αὐτός, οἷον ζῷον ὅ τε ἄνθρωπος καὶ ὁ βοῦς• τούτων γὰρ ἑκάτερον κοινῷ ὀνόματι προσαγορεύεται ζῷον, καὶ ὁ λόγος δὲ τῆς οὐσίας ὁ αὐτός• ἐὰν γὰρ ἀποδιδῷ τις τὸν ἑκατέρου λόγον τί ἐστιν αὐτῶν ἑκατέρῳ τὸ ζῴῳ εἶναι, τὸν αὐτὸν λόγον ἀποδώσει. \column \startlinenumbering[continue] Aequivoca dicuntur quorum \CNote{nomen}{first note} solum commune est, secundum nomen vero \ANote{substantiae}{second note} \ANote{ratio}{second note} diversa, ut animal \DNote{homo}{third note} et quod pingitur. Horum enim solum nomen commune est, secundum
[NTG-context] TwoColumns in two different languages, with alternate text on even and odd page.
Hi Arthur and Hans, I make a statement on a part of the Arthur's reply (" there are no real-life examples of documents that use it") : in fact, there are rare examples of such printing materials : scholar editing and printing of Ancient texts are mainly (if I am right) such printing material (including Ancient Armenian or Georgian liturgic hymns). An example of such a book : on the even page you read a 'twocolumns' text (say : Greek text with its Latin translation) with there own page setting, including Stephanus apparatus in the footer, and several levels of footnotes within the same footer. Commentaries (in English, French, German, usw) and the like are on the odd page. The average (or regular) situation seems to be less complicated : Greek or Latin text on the even page and translation on the odd page. With Pablo Rodriguez help (actually, this is mainly Pablo's work) I have tried to figure such a goal. But before setting up the even/odd page, there is an issue which one has to fix: the text on two columns is well fitted on the first page, but not on the following pages. How to fix this issue with Greek text on the left column and Latin Text on the right one ? See the mismatch between texts on the second page in the sample below . Thank you very much for your remarks and advices. JP \setuplanguage[agr][patterns={agr,la}] \mainlanguage[agr] % Greek as main language \definefallbackfamily [mainface] [serif] [GFS Didot] [preset=range:greek] \definefontfamily [mainface] [serif] [TeX Gyre Pagella] \setuplayout[header=2cm, footer=2cm] \setupnotes[compress=yes] \setupnotations[alternative=serried] \definelinenote[aNote] \definelinenote[bNote][n=2] \definelinenote[cNote][n=3] \definelinenote[dNote][paragraph=yes] \def\ANote#1#2{#1\aNote{#1] #2}} \def\BNote#1#2{#1\bNote{#1] #2}} \def\CNote#1#2{#1\cNote{#1] #2}} \def\DNote#1#2{#1\dNote{#1] #2}} \setupalign[hz, hanging] \setuptolerance[strict] \setuplinenumbering[step=5, location=inright, distance=1ex, align=center, width=0.5em] \definemargindata[Stephanus][location=inner, distance=2ex, style=\em] \setupbodyfont[mainface, 7.8pt] % \definecolumnset[example][n=2, balance=yes] \starttext \start\fr % some text in French Définir un `apparat critique' et le mettre en page avec un traitement de texte courant est un véritable casse-tête. LaTeX et ConTeXt offrent des outils d'automatisation encore assez mal connus dans la communauté des éditeurs, notamment dans l'édition savante, pour la collation et la comparaison de textes médiévaux.\par \stop \blank \start\en % some text in English {\em It is not very easy to define a `criticus apparatus' with some current tools (like Microsoft Office Word or LibreOffice). Maybe \ConTeXt offers some ways that seem easier, in order to improve clear and precise printing.} \stop \dorecurse{4}{\startcolumns[n=2, balance=yes] \Stephanus{1a} Ὁμώνυμα λέγεται ὧν ὄνομα μόνον κοινόν, ὁ δὲ κατὰ τοὔνομα λόγος τῆς οὐσίας ἕτερος, οἷον ζῷον ὅ τε ἄνθρωπος καὶ τὸ γεγραμμένον• τούτων γὰρ ὄνομα μόνον κοινόν, ὁ δὲ κατὰ τοὔνομα λόγος τῆς οὐσίας ἕτερος• ἐὰν γὰρ ἀποδιδῷ τις τί ἐστιν αὐτῶν ἑκατέρῳ τὸ ζῴῳ εἶναι, ἴδιον ἑκατέρου λόγον ἀποδώσει. συνώνυμα δὲ λέγεται ὧν τό τε ὄνομα κοινὸν καὶ ὁ κατὰ τοὔνομα λόγος τῆς οὐσίας ὁ αὐτός, οἷον ζῷον ὅ τε ἄνθρωπος καὶ ὁ βοῦς• τούτων γὰρ ἑκάτερον κοινῷ ὀνόματι προσαγορεύεται ζῷον, καὶ ὁ λόγος δὲ τῆς οὐσίας ὁ αὐτός• ἐὰν γὰρ ἀποδιδῷ τις τὸν ἑκατέρου λόγον τί ἐστιν αὐτῶν ἑκατέρῳ τὸ ζῴῳ εἶναι, τὸν αὐτὸν λόγον ἀποδώσει. \column \startlinenumbering[continue] Aequivoca dicuntur quorum \CNote{nomen}{first note} solum commune est, secundum nomen vero \ANote{substantiae}{second note} \ANote{ratio}{second note} diversa, ut animal \DNote{homo}{third note} et quod pingitur. Horum enim solum nomen commune est, secundum nomen vero substantiae ratio diversa; si enim quis assignet quid est utrique eorum quo sint animalia, propriam assignabit utriusque rationem. Univoca vero dicuntur quorum et nomen commune est et secundum nomen eadem substantiae ratio, ut animal homo atque bos. \stoplinenumbering \stopcolumns} \stoptext - Mail original - De: "Arthur Reutenauer" <arthur.reutena...@normalesup.org> À: "Mailing list for ConTeXt users" <ntg-context@ntg.nl> Envoyé: Mardi 15 Novembre 2016 17:39:40 Objet: Re: [NTG-context] Wrtiting in two languages > 2) Second situation : you want to print a translation on the same page (say > the even page) as the original Greek text, with the commentary (or whatever) > on the odd page. I fear there is no way to do this at the time (that was > impossible with CTX early in 2016). I didn't retry these former weeks... Actually, there has been, for quite a long time, a mechanism called streams in ConTeXt that aimed at doing exa
Re: [NTG-context] Wrtiting in two languages
High Peter, There is somehow a problem with a dorecurse command setting up on '1000' ! If I remember well, Ursula was in a want of a trick which allow to print Greek/German parallel text only time to time, inside of a regular page. To doing so, I've scrutinized the solution I gave, and I don't see the error you have mentionned. Would you please explain how this sample may work : https://mailman.ntg.nl/pipermail/ntg-context/2012/068387.html ? IMHO it is not as simple that it could be. See below the same sample I gave with a dorecurse command : % Set the main language and Greek \setuplanguage[de][patterns={de,agr}] \mainlanguage[de] % Set the Greek font (use your usual Greek font) \definefallbackfamily[mainface][serif][Theano Didot][preset=range:greek, it={Old Standard Italic}, force=yes] \definefontfamily [mainface] [sans] [FreeSans] [rscale=0.8] \setupbodyfont[mainface] % You have to set protrusion parameters and the text width - Attention ! There is no heritage from paragraph to another paragraph \setupalign[hz,hanging] % If the tolerance setting is 'verystrict', then you can get some issue in the Greek printing \setuptolerance[strict] % Here you set 2 columns and thei alignment. You can play with points (pt). Here the Column 1 is in 250pt, regular et and left aligned. \defineparagraphs[TwoColumns][n=2, align={hz,hanging}] \setupparagraphs[TwoColumns][1][width=250pt, style=regular, align=right] \starttext \dorecurse{10}{I. Qua vos ratione, o viri Athenienses, affecerint accusatores mei, nescio: me certe sic affecerunt, ut mei ipsius paene oblitus fuerim, usque eo ad persuadendum accommodate dicebant. How you, O Athenians, have been affected by my accusers, I cannot tell; but I know that they almost made me forget who I was—so persuasively did they speak; nd yet they have hardly uttered a word of truth. \startTwoColumns Ὅτι μὲν ὑμεῖς, ὦ ἄνδρες Ἀθηναῖοι, πεπόνθατε ὑπὸ τῶν ἐμῶν κατηγόρων, οὐκ οἶδα· ἐγὼ δ' οὖν καὶ αὐτὸς ὑπ' αὐτῶν ὀλίγου ἐμαυτοῦ ἐπελαθόμην, οὕτω πιθανῶς ἔλεγον;καίτοι ἀληθές γε, ὡς ἔπος εἰπεῖν, οὐδὲν εἰρήκασιν. \TwoColumns Was wohl euch, ihr Athener, meine Ankläger angetan haben, weiß ich nicht: ich meinesteils aber hätte ja selbst beinahe über sie meiner selbst vergessen; so überredend haben sie gesprochen. Wiewohl - Wahres, dass ich das Wort heraussage, haben sie gar nichts gesagt. \stopTwoColumns Je ne sais, Athéniens, quelle impression mes accusateurs ont faite sur vous. Pour moi, en les entendant, peu s’en est fallu que je ne me méconnusse moi-même, tant ils ont parlé d’une manière persuasive ; et cependant, à parler franchement, ils n’ont pas dit un mot qui soit véritable.} \stoptext - Mail original - De: "Peter Münster" <pmli...@free.fr> À: ntg-context@ntg.nl Envoyé: Mardi 15 Novembre 2016 19:53:02 Objet: Re: [NTG-context] Wrtiting in two languages On Tue, Nov 15 2016, Jean-Pierre Delange wrote: > The best way is to use the TwoColumns command When the text spans several pages, there is a problem: \defineparagraphs[TwoColumns][n=2] \setupparagraphs[TwoColumns][1][width=250pt, style=italic, align=left] \starttext \startTwoColumns \dorecurse{1000}{left } \TwoColumns \dorecurse{1000}{right } \stopTwoColumns \stoptext This works: https://mailman.ntg.nl/pipermail/ntg-context/2012/068387.html -- Peter ___ 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 ___ ___ 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] Wrtiting in two languages
Hi Ursula, There is many ways to do this. 1) First case : you have some greek text on a column and its translation on the second columns after some text in German on a single column (plain page). The best way is to use the TwoColumns command and a preamble where German, Ancient greek, fonts, paragraphs, usw, are defined. You may have to set the width of each paragraph. Note that if Germain is the main language, you have to use a 'fallback' command to get some Greek text, and you have to set a font which allow to print Greek text. You may try this : % Setup the main language and Greek \setuplanguage[de][patterns={de,agr}] \mainlanguage[de] % Set the Greek font (use your usual Greek font) \definefallbackfamily[mainface][serif][Theano Didot][preset=range:greek, it={Old Standard Italic}, force=yes] \definefontfamily [mainface] [sans] [FreeSans] [rscale=0.8] \setupbodyfont[mainface] % You have to set protrusion parameters and the text width - Attention ! There is no heritage from paragraph to another paragraph \setupalign[hz,hanging] % If the tolerance setting is 'verystrict', then you can get some issue in the Greek printing \setuptolerance[strict] % Here you set 2 columns and their alignment. You can play with points (pt). Here the Column 1 is in 250pt, italics et and left aligned. \defineparagraphs[TwoColumns][n=2, align={hz,hanging}] \setupparagraphs[TwoColumns][1][width=250pt, style=italic, align=left] \starttext \startTwoColumns Ὅτι μὲν ὑμεῖς, ὦ ἄνδρες Ἀθηναῖοι, πεπόνθατε ὑπὸ τῶν ἐμῶν κατηγόρων, οὐκ οἶδα· ἐγὼ δ' οὖν καὶ αὐτὸς ὑπ' αὐτῶν ὀλίγου ἐμαυτοῦ ἐπελαθόμην, οὕτω πιθανῶς ἔλεγον \TwoColumns Was wohl euch, ihr Athener, meine Ankläger angetan haben, weiß ich nicht: ich meinesteils aber hätte ja selbst beinahe über sie meiner selbst vergessen; so überredend haben sie gesprochen. \stopTwoColumns \stoptext 2) Second situation : you want to print a translation on the same page (say the even page) as the original Greek text, with the commentary (or whatever) on the odd page. I fear there is no way to do this at the time (that was impossible with CTX early in 2016). I didn't retry these former weeks... I hope this helps, as Pablo says ! JP - Mail original - De: "Ursula Hermann" <ursula.herm...@univie.ac.at> À: "mailing list for ConTeXt users" <ntg-context@ntg.nl> Envoyé: Lundi 14 Novembre 2016 11:13:53 Objet: [NTG-context] Wrtiting in two languages Hy evreybody! If i write a text in acient greek and in german side by side, how can I do this? The mainlanguage should be german . But is that the right way if i wright: \starttext Hier bin ich and then i write side by side \startgreek and\stopgreek \stoptext ? Thanks for helping Uschi ___ 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 ___ ___ 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] Interlining in a TwoColumns set
Dear List, In order to help somebody who wants to improve a kind presentation of his own, I have set the sample below. I am confronting to 2 issues : 1. In the second column it would be fine if one could play with the interlining. But where to put this command : \setupinterlinespace[line=2.8ex]}] which allow to define interlines inside the 2nd column ? 2. The Logo.svg picture (in /Images/Logo.svg within context repertory) doesn't print : 'state: unknown'; is it an issue caused by a layer definition ? Thanks for your advices. JP % Select language \mainlanguage[fr] \language[fr] % Setup PDF metadata \setupinteraction [state=start, color=colour_link, click=yes, contrastcolor=colour_link, focus=standard, % Clicking an inter-document hyperlink by default switches to "fit page" mode. Override. openaction={FitWidth,ToggleViewer}, title={Anciens et Modernes}, style=normal, subtitle={Anciens et Modernes}, author=Adeimantos <adeiman...@free.fr>, keyword={philosophy, history, political philosophy}] % Turn off page numbering \setuppagenumbering[location=] % Normal A4 size paper \setuppapersize[A4][A4] % Setup margins \setuplayout[ backspace=10mm, width=190mm, topspace=5mm, header=0mm, footer=5mm, footerdistance=0mm, bottomdistance=10mm, height=280mm] %\showframe % For coloured output \setupcolors[state=start] % Font setup % Font to use \definefontfamily [main_font] [rm] [titillium] [features={default,quality}] \definefontfamily [main_font] [mm] [TeX Gyre Pagella] \setupbodyfont[main_font] % URL macros and setups % Usage: \href{http://www.someurl.com}{Text} \def\href#1#2{\useURL[#2][{#2}][][{#1}]\goto{\url[#2]}[url(#1)]} \def\ahref#1{\href{#1}{<#1>}} \def\fullahref#1{\href{#1}{#1}} \def\mailto#1{\useURL[#1][mailto:#1][][#1]\from[{#1}]} \def\MailTo#1#2{\useURL[#1][mailto:#1][][#2]\from[{#1}]} % Style \setupurl [color=none, style=normal] % Setup two columns \defineparagraphs[TwoColumns][n=2, align={hz,hanging}] \setupparagraphs[TwoColumns][1][width=200pt] % Setup stretching tolerance... \setuptolerance[verytolerant,stretch] \setupcolors[state=start] % The elements of the letterhead are defined as layers. This first layer % contains the logo; you'll have to supply an image file yourself. \definelayer[logo_layer] \setlayer[logo_layer][preset=lefttop,y=.01\paperheight,x=.82\paperwidth] {\externalfigure[Images/Logo.svg][][height=0.2\textwidth]} % Activate all layers for this page... \setupbackgrounds[page][background={logo_layer}] % Start document body... \starttext % Header... {\switchtobodyfont[40pt] Anciens et Modernes \crlf} \blackrule[height=0.6mm,width=0.83\textwidth] % Dateline... {\bf Présentation}\crlf \currentdate[dd,{~},m,{~},year] % Headline... \blank \framed[align=middle,width=200mm,height=13mm,frame=off] { \bf \switchtobodyfont[15pt] {\bf Philosophie politique.} } \startTwoColumns \startlines {\bf Contact Information} Adeimantos Le Manoir F - 18190 Chavannes adeiman...@free.fr {\bf Édition} Livres, articles {\bf Dévelopement} Prototype {\bf Année de création} 2012 {\bf Financements privés} \$0 \stoplines \TwoColumns \input tufte \stopTwoColumns \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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] LaTeX reledmac: what about ConTeXt ?
Hi Pablo and greek-latin readers (and printers), I've given a look further into the documentation about the modules 'newcolumnset', in order to understand this issue, where ConTeXt put the latin paragraph in the continuity of greek paragraph, when one tries to get 2 paragraphs in 2 face to face columns in 2 different languages (with the goal to print a 'criticus apparatus' in a few different level of footnotes). Wolfgang Schuster stimulated me about the new documentation ! Then, I have found, in the doc produced by : context --extra=setups --overview i-columns.xml, this intersting information (cf. last line) : quotation : "This manual introduces column sets, one of the output routines of ConTEXt. Although column sets are mainly meant for typesetting journals in a semi--automated way, you can also use them for books. We assume that the user is familiar with ConTEXt and only discuss the commands that are related to column sets. This mechanism performs okay but it needs to be used with care: an occasional manual intervention is needed to get optimal results. After all, we’re operating in the area where normally click and point desktop publishing is used. For the moment you need to load the new code with: \usemodule[newcolumnsets]". Allright ! Then, I have listening this advice and there is the new code (on the basis of Pablo's work); I've only added declarations lines as \usemodule[newcolumnsets], and \definecolumnset[example][n=2, balance=yes]. The result is almost satisfying, because 'criticus apparatus' is well printed in footnotes, the numbering lines okay and the first 2 texts (greek and latin paragraphs) quite well printed in two face to face columns. BUT, I don't understand why after a good print, all is messed up. Is it because the closing bracket after \dorecurse{4}{ is only here : \stopcolumns} ? I want to test this file without the dorecurse command, with a long aristotelian text and its latin translation within more than a recto/verso set (or both pages and an only /odd/even set). But I want to know, before doing such a test, why this configuration with a sample doesn't work. As attached file see the PDF of the *.tex source below. Thanks to all ! JP \setuplanguage[agr][patterns={agr, la}] \mainlanguage[agr] % Greek as main language \definefallbackfamily [mainface] [serif] [GFS Didot] [preset=range:greek] \definefontfamily [mainface] [serif] [TeX Gyre Pagella] \setuplayout[header=2cm, footer=2cm] \usemodule[newcolumnsets] \setupnotes[compress=yes] \setupnotations[alternative=serried] \definelinenote[aNote] \definelinenote[bNote][n=2] \definelinenote[cNote][n=3] \definelinenote[dNote][paragraph=yes] \def\ANote#1#2{#1\aNote{#1] #2}} \def\BNote#1#2{#1\bNote{#1] #2}} \def\CNote#1#2{#1\cNote{#1] #2}} \def\DNote#1#2{#1\dNote{#1] #2}} \setupalign[hz, hanging] \setuptolerance[strict] \setuplinenumbering[step=5, location=inright, distance=1ex, align=center, width=0.5em] \definemargindata[Stephanus][location=inner, distance=2ex, style=\em] \setupbodyfont[mainface, 7.8pt] \definecolumnset[example][n=2, balance=yes] \starttext \start\fr % some text in French Définir un apparat critique et le mettre en page avec un traitement de texte courant est un véritable casse-tête. LaTeX et ConTeXt offrent des outils d'automatisation encore assez mal connus dans la communauté des éditeurs, notamment dans l'édition savante, pour la collation et la comparaison de textes médiévaux.\par \stop \startcolumns[example] \dorecurse{4}{ \Stephanus{1a} Ὁμώνυμα λέγεται ὧν ὄνομα μόνον κοινόν, ὁ δὲ κατὰ τοὔνομα λόγος τῆς οὐσίας ἕτερος, οἷον ζῷον ὅ τε ἄνθρωπος καὶ τὸ γεγραμμένον· τούτων γὰρ ὄνομα μόνον κοινόν, ὁ δὲ κατὰ τοὔνομα λόγος τῆς οὐσίας ἕτερος· ἐὰν γὰρ ἀποδιδῷ τις τί ἐστιν αὐτῶν ἑκατέρῳ τὸ ζῴῳ εἶναι, ἴδιον ἑκατέρου λόγον ἀποδώσει. \column \startlinenumbering[continue] Aequivoca dicuntur quorum \CNote{nomen}{première note} solum commune est, secundum nomen vero \ANote{substantiae}{seconde note} \ANote{ratio}{seconde note} diversa, ut animal \DNote{homo}{troisième note} et quod pingitur. Horum enim solum nomen commune est, secundum nomen vero substantiae ratio diversa; si enim quis assignet quid est utrique eorum quo sint animalia, propriam assignabit utriusque rationem. \stoplinenumbering \stopcolumns} \stoptext - Mail original - De: "Pablo Rodriguez" <oi...@gmx.es> À: "mailing list for ConTeXt users" <ntg-context@ntg.nl> Envoyé: Lundi 16 Mai 2016 20:19:51 Objet: Re: [NTG-context] LaTeX reledmac: what about ConTeXt ? On 05/16/2016 06:25 PM, Jean-Pierre Delange wrote: >>> [...] >>> \dorecurse only avoids copying the same text again and again. > > I dont know how to manage Hans proposal : I've tried to deal wi
Re: [NTG-context] LaTeX reledmac: what about ConTeXt ?
Hi Pablo, 1. Here is my current version on Linux : ConTeXt ver: 2016.05.15 20:46 MKIV beta fmt: 2016.5.16 (and the same on Windows). 2. I've tried to install GFS Didot on Windows, but I did'nt find TTF... And when I copy files in c:/windows/fonts, ce system complains. How do you do that ? 3. We use both the same source file. 4. I was dummy : I was not aware of the mean of \definelinenote ! 5. Note that here, the \dorecurse{50} command seems to produce an unexpected effect : the latin text takes place of the greek one with its lines numbers (I really don't know if the \dorecurse commande is (Something out of the topic : under Linux, when I load GFS Didot, after reloading fonts (with mtxrun --script fonts --reload), I don't see the GFS fonts, with the command mtxrun --script fonts --list --pattern=didot* --all. Strange, isn't it ?) As attached files, the TeX source, the log file and the PDF print. Many thanks for your help ! JP À: "mailing list for ConTeXt users" <ntg-context@ntg.nl> Envoyé: Lundi 16 Mai 2016 11:42:35 Objet: Re: [NTG-context] LaTeX reledmac: what about ConTeXt ? On 05/16/2016 10:58 AM, Jean-Pierre Delange wrote: > Hi Pablo, > I have first running your code here below and it is working fine, > generally speaking. But there are some problems I need to clarify: Hi Jean-Pierre, I assume you are running the same version as the one included in https://mailman.ntg.nl/pipermail/ntg-context/2016/085521.html (only recursion may be set to a higher number), aren’t you? I include at the end of the message to be sure we share the same sources. > a. Beside the fact that I am running today on Windows and there is > not GFS Didot typeface on the sytem (therefore I use TeX Gyre), there > is a lack of Greek diacritic signs in the Greek print. Isn’t it possible that you install GFS Didot on that Windows system? > b. I don't see the footnotes references (but only the footnotes). I’m not sure I get your point. These are linenotes, not footnotes. References are to the line number, not to a footnote number. Is that what you meant? > c. the log file gives something weird about {\startcolumns[n=2, balance=yes] It seems to have problems to balance the columns. But the file below doesn’t gave me that message. I hope it helps, Pablo \setuplanguage[agr][patterns={agr, la}] \mainlanguage[agr] % Greek as main language \definefallbackfamily [mainface] [serif] [GFS Didot] [preset=range:greek] \definefontfamily [mainface] [serif] [TeX Gyre Pagella] \setuplayout[header=2cm, footer=2cm] \setupnotes[compress=yes] \setupnotations[alternative=serried] \definelinenote[aNote] \definelinenote[bNote][n=2] \definelinenote[cNote][n=3] \definelinenote[dNote][paragraph=yes] \def\ANote#1#2{#1\aNote{#1] #2}} \def\BNote#1#2{#1\bNote{#1] #2}} \def\CNote#1#2{#1\cNote{#1] #2}} \def\DNote#1#2{#1\dNote{#1] #2}} \setupalign[hz, hanging] \setuptolerance[strict] \setuplinenumbering[step=5, location=inright, distance=1ex, align=center, width=0.5em] \definemargindata[Stephanus][location=inner, distance=2ex, style=\em] \setupbodyfont[mainface, 7.8pt] \starttext \start\fr % some text in French Définir un apparat critique et le mettre en page avec un traitement de texte courant est un véritable casse-tête. LaTeX et ConTeXt offrent des outils d'automatisation encore assez mal connus dans la communauté des éditeurs, notamment dans l'édition savante, pour la collation et la comparaison de textes médiévaux.\par \stop \dorecurse{50}{\startcolumns[n=2, balance=yes] \Stephanus{1a} Ὁμώνυμα λέγεται ὧν ὄνομα μόνον κοινόν, ὁ δὲ κατὰ τοὔνομα λόγος τῆς οὐσίας ἕτερος, οἷον ζῷον ὅ τε ἄνθρωπος καὶ τὸ γεγραμμένον· τούτων γὰρ ὄνομα μόνον κοινόν, ὁ δὲ κατὰ τοὔνομα λόγος τῆς οὐσίας ἕτερος· ἐὰν γὰρ ἀποδιδῷ τις τί ἐστιν αὐτῶν ἑκατέρῳ τὸ ζῴῳ εἶναι, ἴδιον ἑκατέρου λόγον ἀποδώσει. \column \startlinenumbering[continue] Aequivoca dicuntur quorum \CNote{nomen}{première note} solum commune est, secundum nomen vero \ANote{substantiae}{seconde note} \ANote{ratio}{seconde note} diversa, ut animal \DNote{homo}{troisième note} et quod pingitur. Horum enim solum nomen commune est, secundum nomen vero substantiae ratio diversa; si enim quis assignet quid est utrique eorum quo sint animalia, propriam assignabit utriusque rationem. \stoplinenumbering \stopcolumns} \stoptext -- http://www.ousia.tk ___ 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/context
Re: [NTG-context] LaTeX reledmac: what about ConTeXt ?
On 05/16/2016 10:58 AM, Jean-Pierre Delange wrote: > Hi Pablo, > I have first running your code here below and it is working fine, > generally speaking. But there are some problems I need to clarify: Hi Jean-Pierre, I assume you are running the same version as the one included in https://mailman.ntg.nl/pipermail/ntg-context/2016/085521.html (only recursion may be set to a higher number), aren’t you? I include at the end of the message to be sure we share the same sources. > a. Beside the fact that I am running today on Windows and there is > not GFS Didot typeface on the sytem (therefore I use TeX Gyre), there > is a lack of Greek diacritic signs in the Greek print. Isn’t it possible that you install GFS Didot on that Windows system? > b. I don't see the footnotes references (but only the footnotes). I’m not sure I get your point. These are linenotes, not footnotes. References are to the line number, not to a footnote number. Is that what you meant? > c. the log file gives something weird about {\startcolumns[n=2, balance=yes] It seems to have problems to balance the columns. But the file below doesn’t gave me that message. I hope it helps, Pablo \setuplanguage[agr][patterns={agr, la}] \mainlanguage[agr] % Greek as main language \definefallbackfamily [mainface] [serif] [GFS Didot] [preset=range:greek] \definefontfamily [mainface] [serif] [TeX Gyre Pagella] \setuplayout[header=2cm, footer=2cm] \setupnotes[compress=yes] \setupnotations[alternative=serried] \definelinenote[aNote] \definelinenote[bNote][n=2] \definelinenote[cNote][n=3] \definelinenote[dNote][paragraph=yes] \def\ANote#1#2{#1\aNote{#1] #2}} \def\BNote#1#2{#1\bNote{#1] #2}} \def\CNote#1#2{#1\cNote{#1] #2}} \def\DNote#1#2{#1\dNote{#1] #2}} \setupalign[hz, hanging] \setuptolerance[strict] \setuplinenumbering[step=5, location=inright, distance=1ex, align=center, width=0.5em] \definemargindata[Stephanus][location=inner, distance=2ex, style=\em] \setupbodyfont[mainface, 7.8pt] \starttext \start\fr % some text in French Définir un apparat critique et le mettre en page avec un traitement de texte courant est un véritable casse-tête. LaTeX et ConTeXt offrent des outils d'automatisation encore assez mal connus dans la communauté des éditeurs, notamment dans l'édition savante, pour la collation et la comparaison de textes médiévaux.\par \stop \dorecurse{50}{\startcolumns[n=2, balance=yes] \Stephanus{1a} Ὁμώνυμα λέγεται ὧν ὄνομα μόνον κοινόν, ὁ δὲ κατὰ τοὔνομα λόγος τῆς οὐσίας ἕτερος, οἷον ζῷον ὅ τε ἄνθρωπος καὶ τὸ γεγραμμένον· τούτων γὰρ ὄνομα μόνον κοινόν, ὁ δὲ κατὰ τοὔνομα λόγος τῆς οὐσίας ἕτερος· ἐὰν γὰρ ἀποδιδῷ τις τί ἐστιν αὐτῶν ἑκατέρῳ τὸ ζῴῳ εἶναι, ἴδιον ἑκατέρου λόγον ἀποδώσει. \column \startlinenumbering[continue] Aequivoca dicuntur quorum \CNote{nomen}{première note} solum commune est, secundum nomen vero \ANote{substantiae}{seconde note} \ANote{ratio}{seconde note} diversa, ut animal \DNote{homo}{troisième note} et quod pingitur. Horum enim solum nomen commune est, secundum nomen vero substantiae ratio diversa; si enim quis assignet quid est utrique eorum quo sint animalia, propriam assignabit utriusque rationem. \stoplinenumbering \stopcolumns} \stoptext -- http://www.ousia.tk ___ 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 ___
Re: [NTG-context] LaTeX reledmac: what about ConTeXt ?
'dummy--0' columns > balancing aborted after 100 steps columns > balancing aborted after 100 steps columns > balancing aborted after 100 steps columns > balancing aborted after 100 steps backend > xmp > using file 'C:/Users/Adeimantos/Documents/context/tex/texmf-context/tex/context/base/mkiv/lpdf-pdx.xml' pages > flushing realpage 1, userpage 1 close source> 2 > 3 > - Mail original - De: "Pablo Rodriguez" <oi...@gmx.es> À: "mailing list for ConTeXt users" <ntg-context@ntg.nl> Envoyé: Dimanche 15 Mai 2016 20:36:47 Objet: Re: [NTG-context] LaTeX reledmac: what about ConTeXt ? On 05/15/2016 06:46 PM, Jean-Pierre Delange wrote: > Hi Pablo and other ConTeXt wizards ! > > I've tried to find a solution to my previous question. Thanks to > Pablo Rodriguez, the script is working very well. But when I try to > take his solution with a 2 columns scheme (a Greek tex on left and a > Latin one on right), the footnotes are not printed. I did something > which is not thebest : to gather some declarations and see if they work ! > Then, the script below is more or less working (it does work : no > error in the log !), but because it doesn't print footnotes, I > wonder that it succeeds to print the 2 columns (greek and latin) ! To > summarize what it doesn't work here : > 1) lines numbering > 2) footnotes Hi Jean-Pierre, some remarks about your code: 1. The simplefonts module isn’t needed anymore. The code has been added to the ConTeXt core. 2. The language code for ancient Greek is agr. 3. In this particular case, you may load the Latin patterns with the Greek language. 4. You define a mainface using the Palatino typeface, but then you load palatino. It only works when you load the mainface. 5. It is better when you use typefaces distributed with ConTeXt. Well, my code doesn’t work well. Line numbers and notes are only allowed on one column. I know Hans will hate me ;-), but the fun comes when the recursion exceeds the first page. BTW, I guess this approach (as flawed as it is) should work, but I should be missing something with columns. It is beyond my understanding why the last Greek paragraph fits on the first page and the lat Latin paragraph doesn’t fit. Here is the code: \setuplanguage[agr][patterns={agr, la}] \mainlanguage[agr] % Greek as main language \definefallbackfamily [mainface] [serif] [GFS Didot] [preset=range:greek] \definefontfamily [mainface] [serif] [TeX Gyre Pagella] \setuplayout[header=2cm, footer=2cm] \setupnotes[compress=yes] \setupnotations[alternative=serried] \definelinenote[aNote] \definelinenote[bNote][n=2] \definelinenote[cNote][n=3] \definelinenote[dNote][paragraph=yes] \def\ANote#1#2{#1\aNote{#1] #2}} \def\BNote#1#2{#1\bNote{#1] #2}} \def\CNote#1#2{#1\cNote{#1] #2}} \def\DNote#1#2{#1\dNote{#1] #2}} \setupalign[hz, hanging] \setuptolerance[strict] \setuplinenumbering[step=5, location=inright, distance=1ex, align=center, width=0.5em] \definemargindata[Stephanus][location=inner, distance=2ex, style=\em] \setupbodyfont[mainface, 7.8pt] \starttext \start\fr % some text in French Définir un apparat critique et le mettre en page avec un traitement de texte courant est un véritable casse-tête. LaTeX et ConTeXt offrent des outils d'automatisation encore assez mal connus dans la communauté des éditeurs, notamment dans l'édition savante, pour la collation et la comparaison de textes médiévaux.\par \stop \dorecurse{5}{\startcolumns[n=2, balance=yes] \Stephanus{1a} Ὁμώνυμα λέγεται ὧν ὄνομα μόνον κοινόν, ὁ δὲ κατὰ τοὔνομα λόγος τῆς οὐσίας ἕτερος, οἷον ζῷον ὅ τε ἄνθρωπος καὶ τὸ γεγραμμένον· τούτων γὰρ ὄνομα μόνον κοινόν, ὁ δὲ κατὰ τοὔνομα λόγος τῆς οὐσίας ἕτερος· ἐὰν γὰρ ἀποδιδῷ τις τί ἐστιν αὐτῶν ἑκατέρῳ τὸ ζῴῳ εἶναι, ἴδιον ἑκατέρου λόγον ἀποδώσει. \column \startlinenumbering[continue] Aequivoca dicuntur quorum \CNote{nomen}{première note} solum commune est, secundum nomen vero \ANote{substantiae}{seconde note} \ANote{ratio}{seconde note} diversa, ut animal \DNote{homo}{troisième note} et quod pingitur. Horum enim solum nomen commune est, secundum nomen vero substantiae ratio diversa; si enim quis assignet quid est utrique eorum quo sint animalia, propriam assignabit utriusque rationem. \stoplinenumbering \stopcolumns} \stoptext Just in case it might help, Pablo -- http://www.ousia.tk ___ 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 : htt
Re: [NTG-context] LaTeX reledmac: what about ConTeXt ?
Hi Pablo, 1. My code is a raw one, with some old pieces; I know simplefonts module is in the core since 2013, but it's a kind of pavlovian attitude... 2. Many thanks for 'agr' which I'm looking for through CTX doc and never found. 3. I understand why I have to load either 'agr' ith 'la' pattern. 4. I've to improve my understanding of \setmainfont, \definefontfamily and \definefallbackfamily and their declaration order. In this particulary case, why don't use something like this declaration : \setmainfontfallback[DejaVu Serif][range={greekandcoptic, greekextended},force=yes, rscale=auto] ? 5. Is it possible to find information about CTXt fonts apart of the system ones with a mtxrun command ? Thank you for your code, which I am studying and testing right now. JP - Mail original - De: "Pablo Rodriguez" <oi...@gmx.es> À: "mailing list for ConTeXt users" <ntg-context@ntg.nl> Envoyé: Dimanche 15 Mai 2016 20:36:47 Objet: Re: [NTG-context] LaTeX reledmac: what about ConTeXt ? On 05/15/2016 06:46 PM, Jean-Pierre Delange wrote: > Hi Pablo and other ConTeXt wizards ! > > I've tried to find a solution to my previous question. Thanks to > Pablo Rodriguez, the script is working very well. But when I try to > take his solution with a 2 columns scheme (a Greek tex on left and a > Latin one on right), the footnotes are not printed. I did something > which is not thebest : to gather some declarations and see if they work ! > Then, the script below is more or less working (it does work : no > error in the log !), but because it doesn't print footnotes, I > wonder that it succeeds to print the 2 columns (greek and latin) ! To > summarize what it doesn't work here : > 1) lines numbering > 2) footnotes Hi Jean-Pierre, some remarks about your code: 1. The simplefonts module isn’t needed anymore. The code has been added to the ConTeXt core. 2. The language code for ancient Greek is agr. 3. In this particular case, you may load the Latin patterns with the Greek language. 4. You define a mainface using the Palatino typeface, but then you load palatino. It only works when you load the mainface. 5. It is better when you use typefaces distributed with ConTeXt. Well, my code doesn’t work well. Line numbers and notes are only allowed on one column. I know Hans will hate me ;-), but the fun comes when the recursion exceeds the first page. BTW, I guess this approach (as flawed as it is) should work, but I should be missing something with columns. It is beyond my understanding why the last Greek paragraph fits on the first page and the lat Latin paragraph doesn’t fit. Here is the code: \setuplanguage[agr][patterns={agr, la}] \mainlanguage[agr] % Greek as main language \definefallbackfamily [mainface] [serif] [GFS Didot] [preset=range:greek] \definefontfamily [mainface] [serif] [TeX Gyre Pagella] \setuplayout[header=2cm, footer=2cm] \setupnotes[compress=yes] \setupnotations[alternative=serried] \definelinenote[aNote] \definelinenote[bNote][n=2] \definelinenote[cNote][n=3] \definelinenote[dNote][paragraph=yes] \def\ANote#1#2{#1\aNote{#1] #2}} \def\BNote#1#2{#1\bNote{#1] #2}} \def\CNote#1#2{#1\cNote{#1] #2}} \def\DNote#1#2{#1\dNote{#1] #2}} \setupalign[hz, hanging] \setuptolerance[strict] \setuplinenumbering[step=5, location=inright, distance=1ex, align=center, width=0.5em] \definemargindata[Stephanus][location=inner, distance=2ex, style=\em] \setupbodyfont[mainface, 7.8pt] \starttext \start\fr % some text in French Définir un apparat critique et le mettre en page avec un traitement de texte courant est un véritable casse-tête. LaTeX et ConTeXt offrent des outils d'automatisation encore assez mal connus dans la communauté des éditeurs, notamment dans l'édition savante, pour la collation et la comparaison de textes médiévaux.\par \stop \dorecurse{5}{\startcolumns[n=2, balance=yes] \Stephanus{1a} Ὁμώνυμα λέγεται ὧν ὄνομα μόνον κοινόν, ὁ δὲ κατὰ τοὔνομα λόγος τῆς οὐσίας ἕτερος, οἷον ζῷον ὅ τε ἄνθρωπος καὶ τὸ γεγραμμένον· τούτων γὰρ ὄνομα μόνον κοινόν, ὁ δὲ κατὰ τοὔνομα λόγος τῆς οὐσίας ἕτερος· ἐὰν γὰρ ἀποδιδῷ τις τί ἐστιν αὐτῶν ἑκατέρῳ τὸ ζῴῳ εἶναι, ἴδιον ἑκατέρου λόγον ἀποδώσει. \column \startlinenumbering[continue] Aequivoca dicuntur quorum \CNote{nomen}{première note} solum commune est, secundum nomen vero \ANote{substantiae}{seconde note} \ANote{ratio}{seconde note} diversa, ut animal \DNote{homo}{troisième note} et quod pingitur. Horum enim solum nomen commune est, secundum nomen vero substantiae ratio diversa; si enim quis assignet quid est utrique eorum quo sint animalia, propriam assignabit utriusque rationem. \stoplinenumbering \stopcolumns}
Re: [NTG-context] LaTeX reledmac: what about ConTeXt ?
On 05/15/2016 06:46 PM, Jean-Pierre Delange wrote: > Hi Pablo and other ConTeXt wizards ! > > I've tried to find a solution to my previous question. Thanks to > Pablo Rodriguez, the script is working very well. But when I try to > take his solution with a 2 columns scheme (a Greek tex on left and a > Latin one on right), the footnotes are not printed. I did something > which is not thebest : to gather some declarations and see if they work ! > Then, the script below is more or less working (it does work : no > error in the log !), but because it doesn't print footnotes, I > wonder that it succeeds to print the 2 columns (greek and latin) ! To > summarize what it doesn't work here : > 1) lines numbering > 2) footnotes Hi Jean-Pierre, some remarks about your code: 1. The simplefonts module isn’t needed anymore. The code has been added to the ConTeXt core. 2. The language code for ancient Greek is agr. 3. In this particular case, you may load the Latin patterns with the Greek language. 4. You define a mainface using the Palatino typeface, but then you load palatino. It only works when you load the mainface. 5. It is better when you use typefaces distributed with ConTeXt. Well, my code doesn’t work well. Line numbers and notes are only allowed on one column. I know Hans will hate me ;-), but the fun comes when the recursion exceeds the first page. BTW, I guess this approach (as flawed as it is) should work, but I should be missing something with columns. It is beyond my understanding why the last Greek paragraph fits on the first page and the lat Latin paragraph doesn’t fit. Here is the code: \setuplanguage[agr][patterns={agr, la}] \mainlanguage[agr] % Greek as main language \definefallbackfamily [mainface] [serif] [GFS Didot] [preset=range:greek] \definefontfamily [mainface] [serif] [TeX Gyre Pagella] \setuplayout[header=2cm, footer=2cm] \setupnotes[compress=yes] \setupnotations[alternative=serried] \definelinenote[aNote] \definelinenote[bNote][n=2] \definelinenote[cNote][n=3] \definelinenote[dNote][paragraph=yes] \def\ANote#1#2{#1\aNote{#1] #2}} \def\BNote#1#2{#1\bNote{#1] #2}} \def\CNote#1#2{#1\cNote{#1] #2}} \def\DNote#1#2{#1\dNote{#1] #2}} \setupalign[hz, hanging] \setuptolerance[strict] \setuplinenumbering[step=5, location=inright, distance=1ex, align=center, width=0.5em] \definemargindata[Stephanus][location=inner, distance=2ex, style=\em] \setupbodyfont[mainface, 7.8pt] \starttext \start\fr % some text in French Définir un apparat critique et le mettre en page avec un traitement de texte courant est un véritable casse-tête. LaTeX et ConTeXt offrent des outils d'automatisation encore assez mal connus dans la communauté des éditeurs, notamment dans l'édition savante, pour la collation et la comparaison de textes médiévaux.\par \stop \dorecurse{5}{\startcolumns[n=2, balance=yes] \Stephanus{1a} Ὁμώνυμα λέγεται ὧν ὄνομα μόνον κοινόν, ὁ δὲ κατὰ τοὔνομα λόγος τῆς οὐσίας ἕτερος, οἷον ζῷον ὅ τε ἄνθρωπος καὶ τὸ γεγραμμένον· τούτων γὰρ ὄνομα μόνον κοινόν, ὁ δὲ κατὰ τοὔνομα λόγος τῆς οὐσίας ἕτερος· ἐὰν γὰρ ἀποδιδῷ τις τί ἐστιν αὐτῶν ἑκατέρῳ τὸ ζῴῳ εἶναι, ἴδιον ἑκατέρου λόγον ἀποδώσει. \column \startlinenumbering[continue] Aequivoca dicuntur quorum \CNote{nomen}{première note} solum commune est, secundum nomen vero \ANote{substantiae}{seconde note} \ANote{ratio}{seconde note} diversa, ut animal \DNote{homo}{troisième note} et quod pingitur. Horum enim solum nomen commune est, secundum nomen vero substantiae ratio diversa; si enim quis assignet quid est utrique eorum quo sint animalia, propriam assignabit utriusque rationem. \stoplinenumbering \stopcolumns} \stoptext Just in case it might help, Pablo -- http://www.ousia.tk ___ 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 ___
Re: [NTG-context] LaTeX reledmac: what about ConTeXt ?
Hi Pablo and other ConTeXt wizards ! I've tried to find a solution to my previous question. Thanks to Pablo Rodriguez, the script is working very well. But when I try to take his solution with a 2 columns scheme (a Greek tex on left and a latin one on right), the footnotes are not printed. I did something which is not the best : to gather some declarations and see if they work ! Then, the script below is more or less working (it does work : no error in the log !), but because it doesn't print footnotes, I wonder that it succeeds to print the 2 columns (greek and latin) ! To summarize what it doesn't work here : 1) lines numbering 2) footnotes Here is the script, which need to be clarified. % \usemodule[simplefonts] \definefontfamily [mainface] [serif] [Palatino] \mainlanguage[gr] % Greek as main language \setuplayout[header=2cm, footer=2cm] \setupnotations[alternative=serried] \definelinenote[aNote] \definelinenote[bNote][n=2] \definelinenote[cNote][n=3] \definelinenote[dNote][paragraph=yes] \def\ANote#1#2{#1\aNote{#1] #2}} \def\BNote#1#2{#1\bNote{#1] #2}} \def\CNote#1#2{#1\cNote{#1] #2}} \def\DNote#1#2{#1\dNote{#1] #2}} \setupalign[hz, hanging] \setuptolerance[strict] \defineparagraphs[TwoColumns][n=2, align={hz, hanging}] \setupparagraphs[TwoColumns][1][width=200pt, style=regular, align=left] \setuplinenumbering[step=5] \setupbodyfont[palatino, 7.8pt] \starttext \start\fr % some text in French Définir un apparat critique et le mettre en page avec un traitement de texte courant est un véritable casse-tête. LaTeX et ConTeXt offrent des outils d'automatisation encore assez mal connus dans la communauté des éditeurs, notamment dans l'édition savante, pour la collation et la comparaison de textes médiévaux.\par \startlinenumbering \startTwoColumns \dorecurse{4}{[1a] Ὁμώνυμα λέγεται ὧν ὄνομα μόνον κοινόν, ὁ δὲ κατὰ τοὔνομα λόγος τῆς οὐσίας ἕτερος, οἷον ζῷον ὅ τε ἄνθρωπος καὶ τὸ γεγραμμένον· τούτων γὰρ ὄνομα μόνον κοινόν, ὁ δὲ κατὰ τοὔνομα λόγος τῆς οὐσίας ἕτερος· ἐὰν γὰρ ἀποδιδῷ τις τί ἐστιν αὐτῶν ἑκατέρῳ τὸ ζῴῳ εἶναι, ἴδιον ἑκατέρου λόγον ἀποδώσει.\par}\TwoColumns \dorecurse{4}{Aequivoca dicuntur quorum nomen\CNote{nomen}{première note} solum commune est, secundum nomen vero substantiae\ANote{substantiae}{seconde note} ratio\ANote{ratio}{seconde note} diversa, ut animal homo\DNote{homo}{troisième note} et quod pingitur. Horum enim solum nomen commune est, secundum nomen vero substantiae ratio diversa; si enim quis assignet quid est utrique eorum quo sint animalia, propriam assignabit utriusque rationem.\par} \stopTwoColumns \stoplinenumbering \stoptext - Mail original - De: "Pablo Rodriguez" <oi...@gmx.es> À: "mailing list for ConTeXt users" <ntg-context@ntg.nl> Envoyé: Dimanche 15 Mai 2016 17:07:06 Objet: Re: [NTG-context] LaTeX reledmac: what about ConTeXt ? On 05/15/2016 04:35 PM, Jean-Pierre Delange wrote: > Hi Pablo ! > > Now, with the same scheme you generously gave us, I try to print (as > a sample) some Ancient Greek text on a column located at left, with > its Latin translation located on the right of the page and 'criticus > apparatus' in French the footnotes, as previously asked. > Then, we have Greek, Latin and French languages... Hi Jean-Pierre, I’m afraid that parallel texts is something it has to be improved in ConTeXt, when Hans finds the time, the motivation... and a more or less unified proposal. So, you will have to wait until it is implemented (or simply improved). Pablo > A sample of Aristotle Greek: > [1a] Ὁμώνυμα λέγεται ὧν ὄνομα μόνον κοινόν, ὁ δὲ κατὰ τοὔνομα λόγος > τῆς οὐσίας ἕτερος, οἷον ζῷον ὅ τε ἄνθρωπος καὶ τὸ γεγραμμένον· τούτων > γὰρ ὄνομα μόνον κοινόν, ὁ δὲ κατὰ τοὔνομα λόγος τῆς οὐσίας ἕτερος· ἐὰν > γὰρ ἀποδιδῷ τις τί ἐστιν αὐτῶν ἑκατέρῳ τὸ ζῴῳ εἶναι, ἴδιον ἑκατέρου > λόγον ἀποδώσει. > > Latin translation: > Aequivoca dicuntur quorum nomen solum commune est, secundum nomen > vero substantiae ratio diversa, ut animal homo et quod pingitur. > Horum enim solum nomen commune est, secundum nomen vero substantiae > ratio diversa; si enim quis assignet quid est utrique eorum quo sint > animalia, propriam assignabit utriusque rationem. -- http://www.ousia.tk ___ 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 ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl
[NTG-context] some difficulties with btxlist
Hi all (in particular Hans and Alan...), I'm finishing a book project where I'm using the new bibliographic system. Everything is working as it should, but I have two problems with line breaks: 1. Page numbers in ranges are separated by an n-dash (as in: 234–567). It looks as though ConTeXt doesn't break lines at this n-dash. I'm sure there must be an easy way to tell TeX that this is a legitimate breakpoint (short of inserting some \penalty manually after every n-dash), but I can't figure it out myself. 2. For the bibliographic list, there remain some bad line breaks that cannot be avoided; for these cases, I have added \setuptolerance[verytolerant,stretch] and expected to see no lines extending into the margin (at the cost of some ugliness). But there are still some overfull lines. Does the list have its own tolerance setting somewhere? Thanks, and best Thomas ___ 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 ___
Re: [NTG-context] A document composed only of TEXpages
On 3/3/2016 7:49 PM, Chicho Pep wrote: Hello everybody, I would like to have a document composed of TEXpages only, where each TEXpage contains one whole subsection or section. I have achieved that indeed, but I don't get to understand how the numbering of pages works in this case. I've tried to use \setcounter[userpage][\pagenumber+1]. TEXpage etc is probably not the best mechanism to use for that as it is just a vbox in the test suite there is a file experiment-001.tex that shows you a trick (maybe that should be module) Here is my document: *** \setupinteraction[state=start] \startsetups[myTEXpagesetup] \setupwhitespace[line] \setuptolerance[space] \stopsetups \setupfittingpage[TEXpage] [command=\texsetup{myTEXpagesetup}, height=fit, width=210mm, offset=10mm] \starttext \startTEXpage \startsection[title={My Section}] \placecontent \stopTEXpage \setcounter[userpage][\pagenumber+1] \startTEXpage \startsubsection[title={My First Subsection}] Contents \stopsubsection \stopTEXpage \setcounter[userpage][\pagenumber+1] \startTEXpage \startsubsection[title={My Second Subsection}] Contents \stopsubsection \stopTEXpage \setcounter[userpage][\pagenumber+1] \startTEXpage \startsubsection[title={My Third Subsection}] Contents \stopsubsection \stopTEXpage \stopsection \stoptext *** The PDF browser numbers the pages correctly, and in this case they get numbers 1 to 4. But the generated list of contents in page 1 says that section "My Third Subsection" is in page 3 instead of 4, though the link correctly jumps to page 4. The (sub)section in the last TEXpage of the document gets always numbered as if it would be in the next to last TEXpage. To make the list of contents look good, I may add one last empty TEXpage at the end of the document. But I'd still like to ask how, or if, it would be possible to make this use case work without that trick. There's a pair more things: When the document is composed of only one single TEXpage, then that page gets number 0 in the PDF browser, instead of number 1. When I don't use \setcounter[userpage][\pagenumber+1] in between the TEXpages, they get numbers 1,1,1,2 in the PDF browser, while the list of contents says my subsections are in pages 1,1,0 (but the links jump always to the correct page). Thank you for your help Pep p.s. As PDF browsers, I use Evince, Okular and Firefox's built-in PDF Viewer p.p.s. I love ConTeXt :) ___ 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 ___ -- - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.com | 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] A document composed only of TEXpages
Hello everybody, I would like to have a document composed of TEXpages only, where each TEXpage contains one whole subsection or section. I have achieved that indeed, but I don't get to understand how the numbering of pages works in this case. I've tried to use \setcounter[userpage][\pagenumber+1]. Here is my document: *** \setupinteraction[state=start] \startsetups[myTEXpagesetup] \setupwhitespace[line] \setuptolerance[space] \stopsetups \setupfittingpage[TEXpage] [command=\texsetup{myTEXpagesetup}, height=fit, width=210mm, offset=10mm] \starttext \startTEXpage \startsection[title={My Section}] \placecontent \stopTEXpage \setcounter[userpage][\pagenumber+1] \startTEXpage \startsubsection[title={My First Subsection}] Contents \stopsubsection \stopTEXpage \setcounter[userpage][\pagenumber+1] \startTEXpage \startsubsection[title={My Second Subsection}] Contents \stopsubsection \stopTEXpage \setcounter[userpage][\pagenumber+1] \startTEXpage \startsubsection[title={My Third Subsection}] Contents \stopsubsection \stopTEXpage \stopsection \stoptext *** The PDF browser numbers the pages correctly, and in this case they get numbers 1 to 4. But the generated list of contents in page 1 says that section "My Third Subsection" is in page 3 instead of 4, though the link correctly jumps to page 4. The (sub)section in the last TEXpage of the document gets always numbered as if it would be in the next to last TEXpage. To make the list of contents look good, I may add one last empty TEXpage at the end of the document. But I'd still like to ask how, or if, it would be possible to make this use case work without that trick. There's a pair more things: When the document is composed of only one single TEXpage, then that page gets number 0 in the PDF browser, instead of number 1. When I don't use \setcounter[userpage][\pagenumber+1] in between the TEXpages, they get numbers 1,1,1,2 in the PDF browser, while the list of contents says my subsections are in pages 1,1,0 (but the links jump always to the correct page). Thank you for your help Pep p.s. As PDF browsers, I use Evince, Okular and Firefox's built-in PDF Viewer p.p.s. I love ConTeXt :) ___ 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 ___
[NTG-context] Floating split TABLE misaligned
Hi, I presume I found a bug in TABLE placement. The attached examples shows, that the split TABLE is not centered on the first page, bug centered on the second. I would expect it to be centered in both cases. Best regards, Andreas\setupTABLE[split=repeat, textwidth=.9\textwidth] \setupTABLE[column][last][width=broad] \setupTABLE[row][first][style=bold] \setupTABLE[offset=.2em] \setupwhitespace[medium] \setuptolerance[verytolerant] \starttext \dorecurse{2}{\input knuth\par} \placetable[here,split][]{Test}{ \bTABLE \bTABLEhead \bTR \bTD Col1 \eTD \bTD Col2 \eTD \eTR \eTABLEhead \bTABLEbody \dorecurse{20}{\bTR \bTD Test \eTD \bTD Test \eTD \eTR} \eTABLEbody \eTABLE } \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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Overfull boxes using m-cweb
Hans Hagen wxs.nl> writes: > it may be a result of many unbreakable (key)words, so in that case try: > > \setuptolerance[verytolerant,stretch] > > Hans > Thanks Hans, I was having some issue with overfull boxe in one paragraph, i applied your command and it solved the issue. ___ 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 ___
Re: [NTG-context] Troubles with presentations
Hi Tomas, The rawstep module is to be used with mkii, and the spurious « yes » you see appears only when you typeset with mkiv. On the other hand, it is true that \SetupSteps is not defined or recognized, and \StartSteps does not honor the optional arguments, when given. I have been using an old version of rawsteps for some time and do not remember these optional arguments nor having used \SetupSteps. Here is a file which you can use and change whatever does not suit you. If you want to use it as an \input file, please uncomment the line 420, containing %\doifnotmode{demo}{\endinput} Best regards: OK t-rsteps-ok-new.tex Description: Binary data > On 06 Oct 2015, at 17:24, Tomas Hala <tomas.h...@mendelu.cz> wrote: > > Hello all, > > I would like to ask for a piece of help with presentations. > > I decided to use the way described at > http://wiki.contextgarden.net/Presentations > and http://wiki.contextgarden.net/RawSteps. (I use TL 2015.) > > Problems I came across are: > 1. On the first slide, a line with the word "yes" has been generated. > (Sometimes more than once, in dependence of number of modules.) > 2. Command SetupSteps is undefined. > 3. Command StartSteps is defined but not applied. > > What I am doing wrong? > Is somewhere any more detail documentation? > > Thanks, > > Tomas > > > Almost minimal example: > > > \usemodule[pre-original] > \usemodule[rsteps] > \usemodule[pre-60] > > \setuppapersize[S6][S6] > \setuppagenumbering[state=stop] > \setuptolerance[verytolerant,stretch] > \setupinteractionscreen[option=max] > \setupinteraction[state=start,color=middlered] > \useURL [garden][http://contextgarden.net][][Context garden] > > %\SetupSteps[defaultsection=Subject,reserve=no] > > \starttext% > > \TitlePage {pre-funny\\Title Page} > The \from[garden] site is useful. > > \page > The \from[garden] site is useful. > > \page > \StartSteps[Topic][Topic Title] > This is a topic slide. > \NextStep > Another step. > \StopSteps > > \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://tex.aanhet.net > archive : http://foundry.supelec.fr/projects/contextrev/ > wiki : http://contextgarden.net > ___ ___ 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 ___
[NTG-context] Troubles with presentations
Hello all, I would like to ask for a piece of help with presentations. I decided to use the way described at http://wiki.contextgarden.net/Presentations and http://wiki.contextgarden.net/RawSteps. (I use TL 2015.) Problems I came across are: 1. On the first slide, a line with the word "yes" has been generated. (Sometimes more than once, in dependence of number of modules.) 2. Command SetupSteps is undefined. 3. Command StartSteps is defined but not applied. What I am doing wrong? Is somewhere any more detail documentation? Thanks, Tomas Almost minimal example: \usemodule[pre-original] \usemodule[rsteps] \usemodule[pre-60] \setuppapersize[S6][S6] \setuppagenumbering[state=stop] \setuptolerance[verytolerant,stretch] \setupinteractionscreen[option=max] \setupinteraction[state=start,color=middlered] \useURL [garden][http://contextgarden.net][][Context garden] %\SetupSteps[defaultsection=Subject,reserve=no] \starttext% \TitlePage {pre-funny\\Title Page} The \from[garden] site is useful. \page The \from[garden] site is useful. \page \StartSteps[Topic][Topic Title] This is a topic slide. \NextStep Another step. \StopSteps \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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Small problems with my columns
Fabrice Couvreur mailto:fabrice1.couvr...@gmail.com 30. Juli 2015 19:37 Hi, In the code below, how to make the line hyphenation is in the first column and not in the second. You can add \setuptolerance[verytolerant] to give ConTeXt more freedom where it breaks the lines. 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Line wrapping inconsistency with tolerance, alignment and framed
On 6/18/2015 4:25 PM, Christoph Reller wrote: Hi, I have an (admittedly carefully crafted) example, see below. My question: Why is the line wrapping different for this case within a framed and outside of a framed? How can I control the amount of space left on a line before breaking the line within and without a framed consistently? Any insight is welcome. alignment settings are local in a framed (and similar cases) \defineframed[myframe][align={flushleft,horizontal,stretch,verytolerant},frame=off,offset=overlay] Christoph MWE: \setuptolerance[horizontal,stretch,verytolerant] \defineframed[myframe][align=flushleft,frame=off,offset=0pt] \starttext \def\super{supercalifragilisticexpialidoc} \startalignment[flushleft] \unhyphenated{\super\ + \super\ + \super\ + \super} \stopalignment \myframe{\unhyphenated{\super\ + \super\ + \super\ + \super}} \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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___ -- - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Line wrapping inconsistency with tolerance, alignment and framed
Hi, I have an (admittedly carefully crafted) example, see below. My question: Why is the line wrapping different for this case within a framed and outside of a framed? How can I control the amount of space left on a line before breaking the line within and without a framed consistently? Any insight is welcome. Christoph MWE: \setuptolerance[horizontal,stretch,verytolerant] \defineframed[myframe][align=flushleft,frame=off,offset=0pt] \starttext \def\super{supercalifragilisticexpialidoc} \startalignment[flushleft] \unhyphenated{\super\ + \super\ + \super\ + \super} \stopalignment \myframe{\unhyphenated{\super\ + \super\ + \super\ + \super}} \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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Line wrapping inconsistency with tolerance, alignment and framed
Christoph Reller mailto:christoph.rel...@gmail.com 18. Juni 2015 16:25 Hi, I have an (admittedly carefully crafted) example, see below. My question: Why is the line wrapping different for this case within a framed and outside of a framed? How can I control the amount of space left on a line before breaking the line within and without a framed consistently? Any insight is welcome. Christoph MWE: \setuptolerance[horizontal,stretch,verytolerant] \defineframed[myframe][align=flushleft,frame=off,offset=0pt] \starttext \def\super{supercalifragilisticexpialidoc} \startalignment[flushleft] \unhyphenated{\super\ + \super\ + \super\ + \super} \stopalignment \myframe{\unhyphenated{\super\ + \super\ + \super\ + \super}} \stoptext The frame resets the tolerance settings and you have to set the values again for it. \defineframed[myframe][align={flushleft,stretch,verytolerant},offset=0pt] BTW: You can also disable hyphentation with the “nothyphenated” keyword for \setupalign (and the align key). \starttext \startalignment[flushleft,stretch,verytolerant,nothyphenated] supercalifragilisticexpialidoc + supercalifragilisticexpialidoc + supercalifragilisticexpialidoc + supercalifragilisticexpialidoc \stopalignment \startframed[align={flushleft,stretch,verytolerant,nothyphenated}] supercalifragilisticexpialidoc + supercalifragilisticexpialidoc + supercalifragilisticexpialidoc + supercalifragilisticexpialidoc \stopframed \stoptext 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] mkiv versus mkii: whitespace issues
} --- --- ---}} % \setuptolerance[horizontal=strict] \setupcolors[state=start] \setupcolor[rgb] % \setupquote[style=small] % \usetypescript[serif,sans,mono] [hanging] [normal] % Bypassing type-gtamacfonts.tex \starttypescript [sans,serif] [optima] [texnansi,ec] \definefontsynonym [Optima-Regular] [\typescriptthree-OptimaRegular] [encoding=\typescriptthree] \definefontsynonym [Optima-Italic] [\typescriptthree-OptimaItalic] [encoding=\typescriptthree] \definefontsynonym [Optima-Bold] [\typescriptthree-OptimaBold] [encoding=\typescriptthree] \definefontsynonym [Optima-BoldItalic] [\typescriptthree-OptimaBoldItalic] [encoding=\typescriptthree] \definefontsynonym [Optima-ExtraBlack] [\typescriptthree-OptimaExtraBlack] [encoding=\typescriptthree] \stoptypescript \starttypescript [sans,serif] [optima] [name] \setups[font:fallback:\typescriptone] \definefontsynonym [\typescriptprefix\typescriptone] [Optima-Regular] \definefontsynonym [\typescriptprefix\typescriptone Italic] [Optima-Italic] \definefontsynonym [\typescriptprefix\typescriptone Bold] [Optima-Bold] \definefontsynonym [\typescriptprefix\typescriptone BoldItalic] [Optima-BoldItalic] \definefontsynonym [\typescriptprefix\typescriptone Black] [Optima-ExtraBlack] \stoptypescript \definetypeface[allsans][rm][serif][optima][default][encoding=texnansi] \definetypeface[allsans][ss][sans][optima][default][encoding=texnansi] %\definetypeface[allsans][rm][serif][optima][default][encoding=ec] %\definetypeface[allsans][ss][sans][optima][default][encoding=ec] \loadmapfile [gtamacfonts.map] \setupbodyfont[allsans,10pt] \setupalign[hanging] \setupfootnotes[conversion=set 2,way=bypage,align=flushleft] % %\def\doalignline#1#2% \\ == newline % {\ifhmode\hfil\break\fi % \begingroup % \setlocalhsize % new % \def\\{\egroup\par\doalignline{#1}{#2}\bgroup}% % \dowithnextbox %{\noindent % \hbox to \localhsize % {\ifcase\alignstrutmode\or\strut\fi % #1\unhbox\nextbox#2}\endgroup} %\hbox} \def\startBookQuote {\par\bgroup \setupnarrower[before=]\startnarrower\indenting[never]\tfx} \def\stopBookQuote{\stopnarrower\egroup} % \startmode[standalone] \setupfootertexts[pagenumber][{\jobname-\filename{\currentcomponent}}] \def\maybeendnotes {\subsubject{Notes} \placenotes[endnote] \subsubject{Bibliography} \switchtobodyfont[9pt] \placepublications[criterium=all]} \appendtoks \maybeendnotes \to \everystoptext \stopmode % \setupcaption[figure][style=small] \setupinteraction[state=start] \definemeasure[CAindent][12pt] \setupindenting[yes,\measure{CAindent}] \setupnarrower [ left=\measure{CAindent}, right=\measure{CAindent}, middle=\measure{CAindent}] \setupitemize[each][margin=\measure{CAindent},width=\measure{CAindent}] \defineenumeration[Step][headstyle=slanted, location=hanging,width=fit,stopper=:,margin=\measure{CAindent},] \defineenumeration[Phase][headstyle=slanted, location=hanging,width=fit,stopper=:,margin=\measure{CAindent},] \definedescription[Member][headstyle=bold, location=hanging,indenting={yes},margin=\measure{CAindent},width=fit] \setupnotedefinition[footnote][indenting={yes,medium}] \setupnotedefinition[endnote][indenting={yes,medium},style={\switchtobodyfont[10pt]}] \setupbibtex[database=gwierda,sort=author] \setuppublications[numbering=short,sorttype=bbl,refcommand=short,autohang=yes] \setupcite[short] \useURL[masteringarchimateblog][http://masteringarchimate.com] \useURL[masteringarchimatebook][http://masteringarchimate.com/mastering-archimate-edition-ii/] \setupinteraction [style=, color=, contrastcolor=] %\setupbackend[export=yes,xhtml=yes] \definelist[chaptertext] \setuplist[chaptertext][margin=1.3em,pagecommand=\gobbleoneargument] \define[1]\ChapterAbstract{\writetolist[chaptertext]{}{\start\itx#1\stop}} \stopenvironment = test.tex mkii \showgrid \startcomponent c_loosely \product prd_book \project project_cataoia \starttext \startbuffer [chapter:quote] In software, the chain isn't as strong as its weakest link; it's as weak as all the weak links multiplied together\crlf {\tf Steve McConnell --- Code Complete}\crlf\crlf Nothing is as dangerous in architecture as dealing with separated problems\crlf {\tf Alvar Aalto} \stopbuffer \chapter[h:loosely]{Prologue:\\Loosely Coupled Spaghetti} \ChapterAbstract{Starting with an example of how things can go wrong in a current Business-IT landscape, we notice that these kinds of problems have existed almost for as long as IT has existed, and that no proposed `silver bullet' has ever solved them. The goal of the book is introduced.} \lettrine{S}{\kap{\bf uppose we}} have a system for the approval of loans. The business logic has been put into a Business Rule Engine (BRE) system\footnote{If you are not technical and terms like `application server', `caught exceptions', or `web proxy' in the fragment that follows, do not immediately get you
Re: [NTG-context] automatic generation of em dash at the beginning of a line
How about Most newspapers ||and all that follow AP style|| insert a space before and after the em dash. Might I suggest that this could/should be set|-|up in Polish to repeat the (second) emdash if it is followed by a line break? Alan On Mon, 2 Mar 2015 10:02:53 +0100 Hans Hagen pra...@wxs.nl wrote: On 3/1/2015 8:34 PM, Piotr Kopszak wrote: Many Thanks Hans! But that's not exactly what I need, sorry for being imprecise, I do not need to repeat hyphens, but only em dashes (or en dashes, which ever are used in the document) in situations like this. Most newspapers — and all that follow AP style — insert a space before and after the em dash. It should look like this: Most newspapers — and all that follow AP style — — insert a space before and after the em dash. \starttext \def\LEFT {\space\emdash\nbsp} \def\RIGHT{\nbsp\discretionary{\emdash}{\emdash}{\emdash}\nbsp} \setuplayout[width=21mm] \setuplayout[width=24mm] \setuptolerance[verytolerant] \showframe test test \LEFT a test and some more test\RIGHT\ test test \stoptext All Best Piotr 2015-03-01 17:58 GMT+01:00 Hans Hagen pra...@wxs.nl: On 3/1/2015 5:41 PM, Piotr Kopszak wrote: Hello list, This is probably a Polish idiosyncrasy, but we have to live with it. According to punctuation rules when an em dash is at the end of a line, it should be repeated at the beginning of the next one (true, it is often disregarded due to lack of support for it in typesetting programs). Is there any way to deal with it in ConTeX? \starttext \setuplanguage[pl][lefthyphenchar=45,righthyphenchar=45] \pl \input tufte \stoptext -- Alan Braslau CEA DSM-IRAMIS-SPEC CNRS URA 2464 Orme des Merisiers 91191 Gif-sur-Yvette cedex FRANCE tel: +33 1 69 08 73 15 fax: +33 1 69 08 87 86 mailto:alan.bras...@cea.fr ___ 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 ___
Re: [NTG-context] automatic generation of em dash at the beginning of a line
On 3/1/2015 8:34 PM, Piotr Kopszak wrote: Many Thanks Hans! But that's not exactly what I need, sorry for being imprecise, I do not need to repeat hyphens, but only em dashes (or en dashes, which ever are used in the document) in situations like this. Most newspapers — and all that follow AP style — insert a space before and after the em dash. It should look like this: Most newspapers — and all that follow AP style — — insert a space before and after the em dash. \starttext \def\LEFT {\space\emdash\nbsp} \def\RIGHT{\nbsp\discretionary{\emdash}{\emdash}{\emdash}\nbsp} \setuplayout[width=21mm] \setuplayout[width=24mm] \setuptolerance[verytolerant] \showframe test test \LEFT a test and some more test\RIGHT\ test test \stoptext All Best Piotr 2015-03-01 17:58 GMT+01:00 Hans Hagen pra...@wxs.nl: On 3/1/2015 5:41 PM, Piotr Kopszak wrote: Hello list, This is probably a Polish idiosyncrasy, but we have to live with it. According to punctuation rules when an em dash is at the end of a line, it should be repeated at the beginning of the next one (true, it is often disregarded due to lack of support for it in typesetting programs). Is there any way to deal with it in ConTeX? \starttext \setuplanguage[pl][lefthyphenchar=45,righthyphenchar=45] \pl \input tufte \stoptext - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___ -- - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Why is my output body text in 15pt?
I am typesetting a small pocketbook. I’m using mkii and the standard products/environment/chapters structure. I am trying to create a small paperbook size book with 11pt Optima font (using the converted font on my Mac). Everything works, except the body text is in 15pt in the PDF. Now, I did all this font setup stuff years and years ago (I think the whole GTAMacFonts doesn’t work/exist anymore, I just keep it running on my system) and of course I suspect something not quite right in that part, but when I completely leave out the Optima stuff, I get CMR in 15pt, so that is probably not it. When in CRM, I see log entries like [7.5] Overfull \hbox (4.50882pt too wide) in paragraph at lines 36--46 \*12ptrmtfrm*: rat-ings in-sti-tute are ca-pa-ble of han-dling this amount \hbox(8.26648+2.1)x258.10477, glue set - 1.0 .\*12ptrmtfrm*: r .\*12ptrmtfrm*: a .\*12ptrmtfrm*: t .\discretionary ..\*12ptrmtfrm*: - .\*12ptrmtfrm*: i .etc. Which seems to indicate that the font is 12pt. But why is the document in 15pt text? My environment contains (amongst other things): \definepapersize[smallpaperback][width=5in,height=8in] \setuppapersize[smallpaperback][smallpaperback] \setuplayout[location=doublesided] \setuppagenumbering[alternative=doublesided] \setupsectionblock[frontpart][page=no] \setupsectionblock[bodypart][page=no] \setupsectionblock[appendix][page=no] \setupsectionblock[backpart][page=no] % Every chapter body text starts with lettrine: \usemodule[lettrine] \setuplettrine[Lines=3, Hang=.5, Oversize=0, Raise=0, Findent=0pt, Nindent=0em, Slope=0em, Ante=, FontHook=, TextFont=\sc, Image=no] % Every chapter starts with a quote on the LHS page: \setuphead [chapter] [page=, before={\setups[chapter:before]}, after={\setups[chapter:after]}] \startsetups chapter:before \page[left] \noheaderandfooterlines \startalignment[left,nothyphenated] \startnarrower[4*left] \em \getbuffer[chapter:quote] \stopnarrower \stopalignment \resetsetups[quote:text] \page[right] \noheaderandfooterlines \blank[force,2*big] \stopsetups \startsetups chapter:after \blank[3*big] \stopsetups \setuptolerance[horizontal=strict] \setupcolors[state=start] \setupcolor[rgb] % \setupquote[style=small] \setupnarrower[left=1cm,right=0.5cm] % \usetypescript[serif,sans,mono] [hanging] [normal] % Bypassing type-gtamacfonts.tex \starttypescript [sans,serif] [optima] [texnansi,ec] \definefontsynonym [Optima-Regular] [\typescriptthree-OptimaRegular] [encoding=\typescriptthree] \definefontsynonym [Optima-Italic] [\typescriptthree-OptimaItalic] [encoding=\typescriptthree] \definefontsynonym [Optima-Bold] [\typescriptthree-OptimaBold] [encoding=\typescriptthree] \definefontsynonym [Optima-BoldItalic] [\typescriptthree-OptimaBoldItalic] [encoding=\typescriptthree] \definefontsynonym [Optima-ExtraBlack] [\typescriptthree-OptimaExtraBlack] [encoding=\typescriptthree] \stoptypescript \starttypescript [sans,serif] [optima] [name] \setups[font:fallback:\typescriptone] \definefontsynonym [\typescriptprefix\typescriptone] [Optima-Regular] \definefontsynonym [\typescriptprefix\typescriptone Italic] [Optima-Italic] \definefontsynonym [\typescriptprefix\typescriptone Bold] [Optima-Bold] \definefontsynonym [\typescriptprefix\typescriptone BoldItalic] [Optima-BoldItalic] \definefontsynonym [\typescriptprefix\typescriptone Black] [Optima-ExtraBlack] \stoptypescript \definetypeface[allsans][rm][serif][optima][default][encoding=texnansi] \definetypeface[allsans][ss][sans][optima][default][encoding=texnansi] \loadmapfile [gtamacfonts.map] \setupbodyfont[allsans,11pt]___ 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 ___
Re: [NTG-context] example of better linebreak with 2014.05.17 compared to 2014.07.07
On 7/10/2014 5:06 AM, Sanjoy Mahajan wrote: Hans Hagen pra...@wxs.nl writes: it can happen if patterns or fonts changed ...so, best make two small test files and we can look into it with tracing There's just one test file for both (see below). I think I verified that the texgyrepagella font is the same in both context minimals. But maybe the hyphenation patterns did change. how does the tex file look I made the following minimal example (same for both versions): \setupbodyfont[palatino] \showframe \setuplayout[width=5.4286in] \starttext Let's see whether this estimate is reasonable. According to the plane's technical documentation, the 747-400's four engines together can provide roughly 1~meganewton of thrust. \stoptext fyi: \setupbackend[space=yes] can help you around the wrong threshold for spaces in your viewer. \setuptolerance[tolerant] makes the paragraph look better ... i'm not sure what makes the difference in file BT /F1 11.955168 Tf 1 0 0 1 263.3079 760.2084 Tm [0053]TJ 1 0 0 1 70.867 702.3845 Tm [00480033006A02150063-404006300330033-405007300400033006A-15004000330061-405006A-15004000430063-4050033006314006A0043004C001D006A0033-40300430063-40500610033001D00630052004E001D0024004900330059-798001C34002C002C005200611500300043004E003C-404006A90052-404006A-1500400033-40400550049001D004E003302150063]TJ 1 0 0 1 70.867 687.3545 Tm [006A0033002C0040004E0043002C001D0049-30200300052002C006E004C0033004E006A001D006A00430052004E002E-315006A-1500400033-3020065003A00650041003A007A007A02150063-3020038140052006E0061-3020033004E003C0043004E00330063-302006A90052003C200033006A-14004000330061-302002C001D004E-302005500610052240071004300300033]TJ 1 0 0 1 70.867 672.3244 Tm [00610052006E003C00400049250077-2500053-250004C0033003C15001D004E0033100073006A100052004E-25000520038-250006A-1500400061-10006E006315006A0059]TJ ET BT /F1 11.955168 Tf 1 0 0 1 263.3079 760.2084 Tm [0053]TJ 1 0 0 1 70.867 702.3845 Tm [00480033006A0215250063-201006300330033-201007300400033006A-15004000330061-26A-15004000430063-2010033006314006A0043004C001D006A0033-2430063-20100610033001D00630052004E001D0024004900330059-317001C34002C002C005200611500300043004E003C-26A90052-26A-1500400033-20100550049001D004E00330215240063-26A0033002C00400041]TJ 1 0 0 1 70.867 687.3545 Tm [004E0043002C001D0049-16600300052002C006E004C0033004E006A001D006A00430052004E002E-184006A-1500400033-1660065003A00650041003A007A007A0215240063-1660038140052006E0061-1660033004E003C0043004E00330063-166006A90052003C200033006A-14004000330061-167002C001D004E-167005500610052250071004300300033-16600610052006E003C00400049240077]TJ 1 0 0 1 70.867 672.3244 Tm [0053-250004C0033003C15001D004E0033100073006A100052004E-25000520038-250006A-1500400061-10006E006315006A0059]TJ ET looks like a difference in font (kerning) Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Protrusion with compound word hyphenation (||)
I notice that with compound words broken across lines protrusion does not get applied. This looks pretty rough when there are normal hyphenated words in the same paragraph. WE (exaggerated, but demonstrates the point): \setuppapersize[monarch] \definefontfeature [default] [protrusion=quality] \setupalign[hanging] \setuptolerance[horizontal,strict] \setuphyphenmark [sign=small] \showframe [text] [text] \starttext \dorecurse{21}{Multisyllabic||words||separated||by||hyphens. } \stoptext Is this expected behavior? Can it be changed? -- Rik Kabel ___ 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 ___
Re: [NTG-context] Protrusion with compound word hyphenation (||)
Am 02.07.2014 um 03:16 schrieb Rik Kabel cont...@rik.users.panix.com: I notice that with compound words broken across lines protrusion does not get applied. This looks pretty rough when there are normal hyphenated words in the same paragraph. WE (exaggerated, but demonstrates the point): \setuppapersize[monarch] \definefontfeature [default] [protrusion=quality] \setupalign[hanging] \setuptolerance[horizontal,strict] \setuphyphenmark [sign=small] \showframe [text] [text] \starttext \dorecurse{21}{Multisyllabic||words||separated||by||hyphens. } \stoptext Is this expected behavior? Can it be changed? Use a normal hyphen and the \setbreakpoints command. \setuppapersize[monarch] \definefontfeature [default] [default] [protrusion=quality] \setupalign[hanging] \setuptolerance[horizontal,strict] \setbreakpoints[compound] \showframe [text] [text] \starttext \dorecurse{21}{Multisyllabic-words-separated-by-hyphens. } \stoptext 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Problem with pdf output for FeedARead.com
Colleagues A friend of mine asked me to produce a small book of three of her short stories for FeedARead.com from a word document. On looking at the site I suggested I do a conversion to pdf since it would look much better and FeedARead recommend uploading pdf over word as well. So I set about using Context to produce a simple pdf for upload using the structure below: \definepapersize[leela][width=5in, height=8in] \setuppapersize[leela][leela] \setuplayout[backspace=0.75in,cutspace=0.5in,width=fit] \setupindenting[yes,medium,next] \setuppagenumbering[state=stop] \setupexternalfigures[location={local,default}] \setupalign[nonhyphenated] \setuphead[section-3][number=no,align=middle][alternative=doublesided,location=footer] \setuptolerance[vertical,verystrict] \setuptolerance[horizontal,verytolerant] \starttext \midaligned{\tfd{Title Page}} \page FeedAReed blurb and copyright notice goes here. \setupcombinedlist[content][list={chapter,section,subsection}] \completecontent \page[empty] \setuppagenumbering[state=start,alternative=doublesided,location=footer] \startsection[title={Knuth}] \input knuth\par \stopsection \page \startsection[title={Zapf}] \input zapf\par \stopsection \page \startsection[title={Tufte}] \input tufte\par \stopsection \stoptext As you can see it's nothing fancy but is produces nice copy. However, when my friend uploaded to FeedARead she received back this comment: /Please note that you have uploaded TWO pages of your book per one 5 inch wide x 8 inch high page e.g. on your file there would be two book pages of print per page and not one per page as required./ I did notice that when viewed in Adobe Reader, V11.0.6, it displays two pages on the screen at a time but on checking the documents properties it shows the correct page size so I thought it was OK. I've had a look on the wiki but haven't found anything obviously wrong in what I've done above. Is their something I'm missing in \definepapersize or \setuppapersize? I really don't want to have to tell her to upload the word doc. Thanks and Best Wishes Keith ___ 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 ___
[NTG-context] Regression in register processing in last beta
Dear All, I have to admit I use quite cumbersome code to get desired output, but while it was working in previous betas, now emergency stop is reported: 'Extra }, or forgotten \endgroup' Here is MWE: \setupalign[hz, hanging] \setupindenting[medium, yes] \setupnotation[footnote][align={hz, hanging}] \starttext Hello One \start \setuptolerance[strict] \startregister[index][two]{two} Hello Two This is \footnote{ \parfillskip 14pt plus 1 fill Footnote \index{content}content. }\par\stop % this brace is reported as unexpected character here \stopregister[index][two] \page \placeindex \stoptext Briefly, when footnotes appear in \startregister ... \stopregister block, processing is somehow confused and ends prematurely. ConTeXt-2014.03.16 LuaTeX 0.79 Win7-64bit Any suggestion how to update my code to get it working again? Thanks, Jan ___ 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 ___
Re: [NTG-context] Regression in register processing in last beta
On 3/16/2014 7:25 PM, Jan Tosovsky wrote: Dear All, I have to admit I use quite cumbersome code to get desired output, but while it was working in previous betas, now emergency stop is reported: 'Extra }, or forgotten \endgroup' Here is MWE: \setupalign[hz, hanging] \setupindenting[medium, yes] \setupnotation[footnote][align={hz, hanging}] \starttext Hello One \start \setuptolerance[strict] \startregister[index][two]{two} Hello Two This is \footnote{ \parfillskip 14pt plus 1 fill Footnote \index{content}content. }\par\stop % this brace is reported as unexpected character here \stopregister[index][two] \page \placeindex \stoptext Briefly, when footnotes appear in \startregister ... \stopregister block, processing is somehow confused and ends prematurely. ConTeXt-2014.03.16 LuaTeX 0.79 Win7-64bit Any suggestion how to update my code to get it working again? ah, i have to swap some definition order ... but anyway, your start-stop is somewhat messed up (in fact, the start-stop names for registers are not really properly nested ones so maybe i should use other names anyway new beta coming Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Regression in register processing in last beta
On 2014-03-16 Jan Tosovsky wrote: Dear All, I have to admit I use quite cumbersome code to get desired output, but while it was working in previous betas, now emergency stop is reported: 'Extra }, or forgotten \endgroup' Here is MWE: \setupalign[hz, hanging] \setupindenting[medium, yes] \setupnotation[footnote][align={hz, hanging}] \starttext Hello One \start \setuptolerance[strict] \startregister[index][two]{two} Hello Two This is \footnote{ \parfillskip 14pt plus 1 fill Footnote \index{content}content. }\par\stop % this brace is reported as unexpected character here \stopregister[index][two] \page \placeindex \stoptext Briefly, when footnotes appear in \startregister ... \stopregister block, processing is somehow confused and ends prematurely. ConTeXt-2014.03.16 LuaTeX 0.79 Win7-64bit Any suggestion how to update my code to get it working again? There was mistake in my code: \startregister has to be before \start command to be correctly paired. Maybe parsing is now stricter, which I rather appreciate :-) Sorry for the noise, Jan ___ 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 ___
Re: [NTG-context] Regression in register processing in last beta
On 2014-03-16 Hans Hagen wrote: On 3/16/2014 7:25 PM, Jan Tosovsky wrote: Dear All, I have to admit I use quite cumbersome code to get desired output, but while it was working in previous betas, now emergency stop is reported: 'Extra }, or forgotten \endgroup' Here is MWE: \setupalign[hz, hanging] \setupindenting[medium, yes] \setupnotation[footnote][align={hz, hanging}] \starttext Hello One \start \setuptolerance[strict] \startregister[index][two]{two} Hello Two This is \footnote{ \parfillskip 14pt plus 1 fill Footnote \index{content}content. }\par\stop % this brace is reported as unexpected character here \stopregister[index][two] \page \placeindex \stoptext Briefly, when footnotes appear in \startregister ... \stopregister block, processing is somehow confused and ends prematurely. ConTeXt-2014.03.16 LuaTeX 0.79 Win7-64bit Any suggestion how to update my code to get it working again? ah, i have to swap some definition order new beta coming :-) Awesome! Thanks for quick fix! Now it works even without source changes! Jan ___ 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 ___
[NTG-context] Various setuptolerance settings within a single document
Dear All, I'd like to apply 'verystrict' tolerance as a default value, which would be overridden by less strict values in several specific paragraphs with tricky word combinations causing problems when hyphenating. But when \setuptolerance command is used multiple times, the last one seems to be active only from that place on. When settings is wrapped by \start \stop commands, it seems to be ignored: \start \setuptolerance[tolerant] %text \stop Is there any way how to achieve this or do I have to use the lowest required value for the whole document? Thanks, Jan ___ 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 ___
Re: [NTG-context] Various setuptolerance settings within a single document
Am 19.02.2014 um 21:00 schrieb Jan Tosovsky j.tosov...@email.cz: Dear All, I'd like to apply 'verystrict' tolerance as a default value, which would be overridden by less strict values in several specific paragraphs with tricky word combinations causing problems when hyphenating. But when \setuptolerance command is used multiple times, the last one seems to be active only from that place on. When settings is wrapped by \start \stop commands, it seems to be ignored: \start \setuptolerance[tolerant] %text \stop Is there any way how to achieve this or do I have to use the lowest required value for the whole document? Can you try to end the paragraph before the \stop with a empty line or the \par command. 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Various setuptolerance settings within a single document
On 2014-02-19 Wolfgang Schuster wrote: Am 19.02.2014 um 21:00 schrieb Jan Tosovsky j.tosov...@email.cz: I'd like to apply 'verystrict' tolerance as a default value, which would be overridden by less strict values When settings is wrapped by \start \stop commands, it seems to be ignored: \start \setuptolerance[tolerant] %text \stop Can you try to end the paragraph before the \stop with a empty line or the \par command. Wow! Ending that block with \par\stop does the job! Thanks a lot for this hint! Jan ___ 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 ___
[NTG-context] \completecontent affects text height
Hi, First question: 1. Save http://pastebin.com/raw.php?i=8DQNCcvC as setup.tex 2. Save http://pastebin.com/raw.php?i=KgcxCxGB as garlic.tex 3. Run: context garlic.tex 4. View page 3 of the PDF ( http://i.imgur.com/VLwssnl.png ) 5. Edit garlic.tex. 6. Remove \completecontent 7. Run: context garlic.tex 8. View page 3 of the PDF ( http://i.imgur.com/HVAoavQ.png ) The Table of Contents affects the column height in the body. The available height for the text body should be independent of \completecontent. The total height should be as shown in the second example, with or without the ToC. How can this be resolved? Second question: How would you remove the white space above each subsection title so that the title is aligned to the top of its column? Third question: How would you prevent widowing of subsection titles from their content? I tried ntop=2 and \setuptolerance[tolerant], but neither affected the result. Thank you! ___ 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 ___
Re: [NTG-context] Centering the last line in combination subcaptions
On 2013-12-27 Jan Tosovsky wrote: I try to fill the entire page with two images with their captions. The final page should be floating, keeping both images together and not containing any other text. I found this solution. It work fine for short captions / wide images. \starttext test \startplacefigure[location=page, number=no, title={}] %\setupcombinations[align={hz, hanging}] %\setuptolerance[strict] {\startcombination[1*2] {\externalfigure[cow]} {\input{ward}} {\externalfigure[cow]} {\input{ward}} \stopcombination} \stopplacefigure \stoptext ... If captions are long and the image narrow, they are typeset on multiple lines. Default centering produces the ragged column - both not very nice and difficult to read. When the alignment is set to hanging, it looks better except the last line which is not centered. Is there any settings for centering the last line? I've found it is a general problem with the centering the last line when hanging alignment is set. Here is the similar thread, but with no response: https://www.mail-archive.com/ntg-context@ntg.nl/msg32884.html This is quite old thread. Are there any new possibilities in the Context from that era? Thanks, Jan ___ 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 ___
[NTG-context] Centering the last line in combination subcaptions
Hello Everyone, I try to fill the entire page with two images with their captions. The final page should be floating, keeping both images together and not containing any other text. I found this solution. It work fine for short captions / wide images. \starttext test \startplacefigure[location=page, number=no, title={}] %\setupcombinations[align={hz, hanging}] %\setuptolerance[strict] {\startcombination[1*2] {\externalfigure[cow]} {\input{ward}} {\externalfigure[cow]} {\input{ward}} \stopcombination} \stopplacefigure \stoptext If captions are long and the image narrow, they are typeset on multiple lines. Default centering produces the ragged column - both not very nice and difficult to read. When the alignment is set to hanging, it looks better except the last line which is not centered. Is there any settings for centering the last line? Can the 'column' width be somehow extended to e.g. 80% of text width? If not via the 'combination', are there any better alternatives for my use case? Any hint is appreciated. Thanks, Jan ___ 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 ___
Re: [NTG-context] a way to implement \testcolumn in mixedcolumns
On 11/28/2013 1:34 PM, Hans Hagen wrote: That macro was never meant for mixed columns. I made a variant that works ok in mixed columns which will be in the next beta. \setuptolerance[verytolerant] \starttext \startmixedcolumns \dorecurse{4}{\input ward \par} \testcolumn[10][-1pt] % 10 lines - 1pt slack \dorecurse{2}{\input ward \par} \stopmixedcolumns \stoptext Ok. It looks like the second parameter to \testcolumn is now required (it didn't used to be). What does this slack value do? Does it mean that the minimum amount of space left in the column is 10 lines minus 1pt? Also, in the Dec. 2 beta (current version: 2013.12.02 15:22), the \column command now causes an error when we come to the \stopmixedcolumns. I don't know if it's connected with the above change, or something else. MWE: change the \testcolumn command above to \column. I get the following error output: ! LuaTeX error C:/context/tex/texmf-context/tex/context/base/page-mix.lua:474 : attempt to compare number with nil stack traceback: C:/context/tex/texmf-context/tex/context/base/page-mix.lua :474: in function 'process_penalty' C:/context/tex/texmf-context/tex/context/base/page-mix.lua :572: in function 'setsplit' C:/context/tex/texmf-context/tex/context/base/page-mix.lua :687: in function 'setsplit' C:/context/tex/texmf-context/tex/context/base/page-mix.lua :819: in function 'mixsetsplit' [string \directlua ]:1: in main chunk. system tex error on line 14 in file C:/Users/Huttar/Documents/work/tex/test-beta-testcolumn.tex: LuaTeX error ... 4 5 \startmixedcolumns 6 7 \dorecurse{4}{\input ward \par} 8 9 %\testcolumn[10][-1pt] % 10 lines - 1pt slack 10 \column 11 12 \dorecurse{2}{\input ward \par} 13 14 \stopmixedcolumns 15 16 \stoptext 17 \ctxcommand #1 -\directlua {commands.#1} \page_mix_routine_construct ...\else false\fi , }} \deadcycles \zerocount \page_mix_routine_continue ...ine_construct \v!no \page_mix_routine_package ... \page_otr_command_routine ...mix_routine_continue \or \page_mix_routine_bala... \page_otr_triggered_output_routine ...and_routine \fi output ...eforeoutput \page_otr_triggered_output_routine \relax \the \everyafterout... ... l.14 \stopmixedcolumns ? X Thanks again for your work on this. We're continually reevaluating whether we can use the beta or need to stick with the stable version. At the moment, it looks like we'll be sticking with the stable version. But we'd like to use the beta, if the problems can be ironed out. Lars ___ 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 ___
Re: [NTG-context] a way to implement \testcolumn in mixedcolumns
On 12/3/2013 3:10 PM, Lars Huttar wrote: On 11/28/2013 1:34 PM, Hans Hagen wrote: That macro was never meant for mixed columns. I made a variant that works ok in mixed columns which will be in the next beta. \setuptolerance[verytolerant] \starttext \startmixedcolumns \dorecurse{4}{\input ward \par} \testcolumn[10][-1pt] % 10 lines - 1pt slack \dorecurse{2}{\input ward \par} \stopmixedcolumns \stoptext Ok. It looks like the second parameter to \testcolumn is now required (it didn't used to be). i'll fix that What does this slack value do? Does it mean that the minimum amount of space left in the column is 10 lines minus 1pt? indeed Also, in the Dec. 2 beta (current version: 2013.12.02 15:22), the \column command now causes an error when we come to the \stopmixedcolumns. I don't know if it's connected with the above change, or something else. no, more to making section breaks working better in columns (i forgot to rename a variable) MWE: change the \testcolumn command above to \column. I get the following error output: ! LuaTeX error C:/context/tex/texmf-context/tex/context/base/page-mix.lua:474 : attempt to compare number with nil stack traceback: C:/context/tex/texmf-context/tex/context/base/page-mix.lua :474: in function 'process_penalty' C:/context/tex/texmf-context/tex/context/base/page-mix.lua :572: in function 'setsplit' C:/context/tex/texmf-context/tex/context/base/page-mix.lua :687: in function 'setsplit' C:/context/tex/texmf-context/tex/context/base/page-mix.lua :819: in function 'mixsetsplit' [string \directlua ]:1: in main chunk. system tex error on line 14 in file C:/Users/Huttar/Documents/work/tex/test-beta-testcolumn.tex: LuaTeX error ... 4 5 \startmixedcolumns 6 7 \dorecurse{4}{\input ward \par} 8 9 %\testcolumn[10][-1pt] % 10 lines - 1pt slack 10 \column 11 12 \dorecurse{2}{\input ward \par} 13 14 \stopmixedcolumns 15 16 \stoptext 17 \ctxcommand #1 -\directlua {commands.#1} \page_mix_routine_construct ...\else false\fi , }} \deadcycles \zerocount \page_mix_routine_continue ...ine_construct \v!no \page_mix_routine_package ... \page_otr_command_routine ...mix_routine_continue \or \page_mix_routine_bala... \page_otr_triggered_output_routine ...and_routine \fi output ...eforeoutput \page_otr_triggered_output_routine \relax \the \everyafterout... l.14 \stopmixedcolumns ? X Thanks again for your work on this. We're continually reevaluating whether we can use the beta or need to stick with the stable version. At the moment, it looks like we'll be sticking with the stable version. But we'd like to use the beta, if the problems can be ironed out. fyi: i'll not patch the stable version new beta Lars ___ 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 ___ -- - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] a way to implement \testcolumn in mixedcolumns
On 11/20/2013 10:47 PM, Lars Huttar wrote: Hello, On this list I've been advised that mixedcolumns is the latest and greatest implementation of columns; the one to use. We have switched over from columnsets to mixedcolumns, and have been very pleased with the column balancing (for some reason we couldn't get column balancing to work in columnsets). However one thing we do miss from columnsets is the control over widows orphans in two ways: \testcolumn, and \setupcolumnsetlines. \testcolumn[n] allowed us to do a conditional column break, so when we were about to start a new subsection heading, we could prevent it being an orphan at the bottom of the column; and when starting a paragraph with a hangaround graphic framed flushright and bottom, we could similarly use \testcolumn to prevent the graphic from hanging down into the footer (which is what sometimes happened otherwise). So I'm wondering, is there some way to achieve the equivalent of \testcolumn in mixedcolumns? Is it theoretically impossible to implement this in mixedcolumns because the required information (how many lines are left in the current column) is not yet known? Or could that information be gleaned from somewhere? I see in page-brk.mkiv the following definition for \testcolumn: \def\testcolumn {\dodoubleempty\page_tests_columns_test} \def\page_tests_columns_test[#1][#2]% {\endgraf \ifdim\pagegoal\maxdimen \ifdim\pagetotal\pagegoal \d_page_tests_test\dimexpr \pagegoal -\pagetotal \ifdim\lastskip\parskip+\parskip\fi \ifsecondargument+#2\fi \relax \getrawnoflines\d_page_tests_test % (raw) \ifnum#1\noflines \column \fi \else \penalty-\plustenthousand % (untested) \fi \fi} I'm not a low-level TeX programmer, and I don't understand a lot of this, but it looks like \getrawnoflines\d_page_tests_test puts the number of remaining lines into \noflines Any suggestions are appreciated. (And I should have a MWE soon.) That macro was never meant for mixed columns. I made a variant that works ok in mixed columns which will be in the next beta. \setuptolerance[verytolerant] \starttext \startmixedcolumns \dorecurse{4}{\input ward \par} \testcolumn[10][-1pt] % 10 lines - 1pt slack \dorecurse{2}{\input ward \par} \stopmixedcolumns \stoptext - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Paragraph - the last line handling
On 11/22/2013 11:07 PM, Jan Tosovsky wrote: Hello Everyone, in my document there are lot of cases when the last line in the paragraph has a very narrow gap on the right (case 1 below). I understand it is sometimes difficult to squeeze characters to the desired lenght (case 2) without any impact to the final quality, but this looks very unnatural now (besides all other lines, which are nicely typeset keeping the optical edge on the right). Is it possible to somehow define that under a certain limit the line will be expanded to the end (case 3)? (1) xx x (2) xx (3) xx xx I use the following setup now: \setupalign[hz, hanging] \setuptolerance[verystrict] % even 'strict' doesn't help here \setupindenting[medium, yes] Any idea? \hsize 15.4cm \input tufte \parfillskip30pt plus 1 fill \input tufte - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Paragraph - the last line handling
Hello Everyone, in my document there are lot of cases when the last line in the paragraph has a very narrow gap on the right (case 1 below). I understand it is sometimes difficult to squeeze characters to the desired lenght (case 2) without any impact to the final quality, but this looks very unnatural now (besides all other lines, which are nicely typeset keeping the optical edge on the right). Is it possible to somehow define that under a certain limit the line will be expanded to the end (case 3)? (1) xx x (2) xx (3) xx xx I use the following setup now: \setupalign[hz, hanging] \setuptolerance[verystrict] % even 'strict' doesn't help here \setupindenting[medium, yes] Any idea? Thanks, Jan ___ 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 ___
Re: [NTG-context] Find all words set into the margin
On Mon, 26 Nov 2012 13:52:52 +0100 H. Özoguz h.oezo...@mmnetz.de wrote: I use \definefontfeature[default][default][expansion=quality,protrusion=quality] \setupalign[hz,hanging] \usetypescript[times] \setupbodyfont[times,11pt] \setuptolerance[verystrict] Is there a command or a macro to find all occurences in a file (or projekt), where some word is printed into the margin? (Maybe because of bad hyphenation or something else.) - Would be perfect for manual check-up and corrections! Thanks. Huseyin You could try setting \overfullrule=5pt This is an original TeX primitive. Plain TeX sets it at 5pt. You can then scan pages looking for a black rectangle in the right margin. I cannot determine which code to search for in e.g., grep but perhaps you can. I just tested it and \overfillrule works with MKIV context if it is set for some value other than zero. -- John Culleton Wexford Press Free list of books for self-publishers: http://wexfordpress.net/shortlist.html PDF e-book: Create Book Covers with Scribus available at http://www.booklocker.com/books/4055.html ___ 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 ___
[NTG-context] tabulate and tolerance
Hi, It seems, that tabulate does not use the tolerance setting: --8---cut here---start-8--- \setbreakpoints[compound] \setuptolerance[stretch] \starttext \starttabulate[|p(1cm)|l|] \NC bla-blabla-bla \NC XXX \NC \NR \stoptabulate \hsize1cm bla-blabla-bla \stoptext --8---cut here---end---8--- For now, my workaround is \NC \setuptolerance[stretch] bla-blabla-bla \NC Is there anything better? TIA for any hints, -- Peter ___ 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 ___
Re: [NTG-context] tabulate and tolerance
Am 26.09.2013 um 21:33 schrieb Peter Münster pmli...@free.fr: Hi, It seems, that tabulate does not use the tolerance setting: --8---cut here---start-8--- \setbreakpoints[compound] \setuptolerance[stretch] \starttext \starttabulate[|p(1cm)|l|] \NC bla-blabla-bla \NC XXX \NC \NR \stoptabulate \hsize1cm bla-blabla-bla \stoptext --8---cut here---end---8--- For now, my workaround is \NC \setuptolerance[stretch] bla-blabla-bla \NC Is there anything better? You can use the “A” keyword in the table preamble to set values for the alignment, e.g. \starttabulate[|p(1cm)A{stretch}|] 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] question concerning \setupalign \setuptolerance
Dear list is there a way to \setupalign and \setuptolerance globaly? In tabulate- or frameenvironement for example they are reseted. MWE: \definefontfeature[default][default][expansion=quality,protrusion=quality] \usetypescript[palatino] \setupbodyfont[palatino,11pt] \setupbodyfontenvironment[default][em=italic] \setupalign[hz,hanging] \setuptolerance[horizontal,stretch] \starttext \subject{Normal Text} align working, tolerance working. \input knuth \subject{Table} Table resets align/tolerance: \starttabulate \NC aling/tolerance not working \NC \input knuth \NC\NR \NC align/tolerance working \NC \setupalign[hz,hanging] \setuptolerance[horizontal,stretch] \input knuth \NC\NR \stoptabulate \subject{Frame} Framedtext resets align/tolerance: \startframedtext[width=0.6\textwidth] aling/tolerance not working \input tufte \stopframedtext \startframedtext[width=0.6\textwidth] \setupalign[hz,hanging] \setuptolerance[horizontal,stretch] aling/tolerance working \input tufte \stopframedtext \stoptext Thanks! Christian ___ 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 ___
Re: [NTG-context] question concerning \setupalign \setuptolerance
Am 30.08.2013 um 14:23 schrieb Christian Prim christian.p...@gmx.ch: Dear list is there a way to \setupalign and \setuptolerance globaly? In tabulate- or frameenvironement for example they are reseted. Environments which have a align key use the settings of the key and ignore global values, to enable protrusion and font expansion for these environment you have to change their align values. \setupframedtext [align={normal,hanging,hz}] \setuptabulate [align={normal,hanging,hz}] 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] question concerning \setupalign \setuptolerance
Am 30.08.2013 um 17:55 schrieb Christian Prim christian.p...@gmx.ch: Thanks Wolfgang I have tested it (on new beta) but the alignment is still wrong in the tabulate-environment. It's correct in the framedtext-environment, but tolerance is still missing, so that a line is still too long. My new questions: - What about tolerance? Where must I add the keys? The \setupalign command does also accepts “tolerant”, “verytolerant” and “stretch” as keyword which means you don’t need the \setuptolerance command. This is important because the value of the align key is passed to the \setupalign command. - What about tabulate-environment? I’m sorry but I was wrong about the setting for the tabulate environment, the align value of \setuptabulate accepts only “left”, “middle”, “right” and “normal” as arguments. There is also no way to change the format of the default tabulation environment, only local changes are possible, e.g. \starttabulate[|l|pA{normal,hanging,hz,stretch}|] \NC align/tolerance not working \NC \input knuth \NC\NR \NC align/tolerance working \NC \input knuth \NC\NR \stoptabulate When you want a different default alignment you have to create your own tabulation environment with the \definetabulate command. 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___