[NTG-context] Re: Why is only the first frame protruding into the margin?
On 5/17/24 20:46, madiazm.eo...@gmail.com wrote: > [...] > here is the last part of my script (the prior definitions are not > problematic, since they worked when only using "miFuente". It seems to > be something in "miCorm" that produces the protruding Just a comment about typescripts. At least in how I use ConTeXt, I live happily without having to use them. See the following sample: \definefontfamily[libertin][rm][Libertinus Serif] \definefontfamily[libertin][ss][Libertinus Sans] \definefontfamily[libertin][tt][Libertinus Mono] \definefontfamily[cormora][rm][Cormorant] \setupbodyfont[cormora] \starttext \input zapf\par \switchtobodyfont[libertin] \doloopoverlist{\rm,\ss,\tt} {\recursestring\input zapf\par} \stoptext You may define font families (which are actually typeface families). I think they may be easier to use than typefaces. Just in case it might help, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: Why is only the first frame protruding into the margin?
On 5/17/24 20:22, madiazm.eo...@gmail.com wrote: > thanks Pablo, but this is strange > [...] > The strange thing is that it is only the first section that > protrudes, the other sections are right (as seen in the link). > Therefore it must not be the code definition, since in that case all > sections should protrude... It might be a buggy code definition, but it may be only triggered by (yet unknown) special conditions. > Over the weekend I will slowly move my code to a new file with your > code adding a bit everytime to try to spot the moment when I get this > strange behaviour and then I will write again. I hope you have already solved the issue, but I’m afraid this is the way testing for new bugs introduced in code works. > ps. I included the link because there is no attach option here in the > online-mailing-list. Sorry if it not ok. Sorry, I no Google fan. But it is essential to provide problematic code (reduced to a minimal sample) in the messages to the list, not just the output. Having the sample code, others can confirm that they are able to reproduce your issue. It wouldn’t be the first time for issues only arising in only on a single installation, on a single computer or on a single OS. The mailing list (at least when sending from a real email address) allows attachments up to 100kb. This may be enough for most minimal samples. I hope it helps, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: Why is only the first frame protruding into the margin?
On 5/17/24 11:02, madiazm.eo...@gmail.com wrote: > thanks Wolfgang for your advice and sorry for being so verbose, but > since the margins are "included" in the problem I decided to put my > layout there too. > > I made your suggested changes and unfortunately it doesnt work, but > being a bit surprised by the margins I printed a copy of the page > and still worse... Hi Miguel, this should work (also in the sense of a minimal sample): \showframe\showgrid \defineframedtext[FunnyText] [frame=on, align=flushright,location=right] \def\FrameTitle#1% {\setMPtext{FunnyFrame} {\hbox spread 1em{\hss\strut \color[blue]{\tfx Apartado #1}\hss}}} \define[2]\firstHeadings{% \dontleavehmode \switchtobodyfont[miCorm]% \FrameTitle#1% \startFunnyText {\switchtobodyfont[miCorm,20.7pt] #2} \stopFunnyText} \setuphead [section] [command=\firstHeadings, indentnext=no] \starttext \startsection[title=a] b \stopsection \startsection[title=a] b \stopsection \startsection[title=a] b \stopsection \stoptext BTW, you inadvertely introduce the space here: \define[2]\firstHeadings{% \dontleavehmode \switchtobodyfont[miCorm]% \FrameTitle#1% Unless you comment the space after the right bracket, it will be included in your definition of first headings. As for external downloads, better avoid unless required. In any case, the minimal code should be part of your message. Just in case it helps, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] expansion question
Dear list, I have the following sample: \setupinteraction[state=start] \setupattachments[method=hidden] \protected\def\PDFfile[#1]% {\cldcontext{file.addsuffix("#1", "pdf")}} \starttext \doifelsefile{\PDFfile[xml-mkiv]} {yes}{no} \attachment[file={\PDFfile[xml-mkiv]}] \stoptext I need the \PDFfile definition to be \protected for only one case (that I cannot reproduce in my sample). Is there any way to define an unprotected command and invoke it as protected only for a particular case? Many thanks for your help, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: weird \inlinetypebuffer interaction
On 5/9/24 15:18, Pablo Rodriguez via ntg-context wrote: > [...] > Many thanks for your improvement, Wolfgang. > > It would be great to have it included in standard ConTeXt. Hans, many thanks for having added this to current latest (2024.05.13 19:19). Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: weird \inlinetypebuffer interaction
On 5/9/24 12:57, Wolfgang Schuster wrote: > Pablo Rodriguez via ntg-context schrieb am 08.05.2024 um 18:05: >> [...] >> Since \type doesn’t collapse hyphens, wouldn’t it be possible to add >> \nohyphencollapsing to \typeinlinebuffer just for the sake of output >> consistency? > > You can make \typeinlinebuffer behave like \type by adding a second > initializer which besides other things prevents hyphen collapsing. > > buff-ver.mkxl: > > \protected\def\buff_verbatim_type_buffer_indeed_inline#1#2% >{\cdef\currenttype{#1}% > \buff_verbatim_initialize_type_one > + \buff_verbatim_initialize_type_two Many thanks for your improvement, Wolfgang. It would be great to have it included in standard ConTeXt. Many thanks for your help, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: weird \inlinetypebuffer interaction
On 5/7/24 22:37, Wolfgang Schuster wrote: > [...] > \typebuffer disables automatic \endash and \emdash with the > \nohyphencollapsing command > but the command isn't used for \typeinlinebuffer. Many thanks for your explanation, Wolfgang. Since \type doesn’t collapse hyphens, wouldn’t it be possible to add \nohyphencollapsing to \typeinlinebuffer just for the sake of output consistency? Many thanks for your help, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: weird \inlinetypebuffer interaction
On 5/6/24 22:45, Wolfgang Schuster wrote: > Pablo Rodriguez via ntg-context schrieb am 06.05.2024 um 20:06: >> Dear list, >> >> I have the following sample: >> >>\definefontfamily[mainface][tt][TeX Gyre Termes] > > Apply the none feature when you set the monospace font, i.e. > > \definefontfamily[...][tt][...][features=none] Many thanks for your reply, Wolfgang. This solves the issue, but I have two questions. Why is this only required for \inlinetypebuffer and not for \typebuffer? Which is the exact font feature that does the hyphen ligatures? I’m interested in not disabling hz and hanging. Many thanks for your help, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] weird \inlinetypebuffer interaction
Dear list, I have the following sample: \definefontfamily[mainface][tt][TeX Gyre Termes] \setupbodyfont[mainface] \starttext \startbuffer context --purgeall \stopbuffer inline \typeinlinebuffer block: \typebuffer \stoptext As long as there is no defined font family for mono, \typeinlinebuffer doesn’t convert -- into an en-dash (the same way as \typebuffer behaves). But as in the sample above, when a font is defined for mono (at least with \definefontfamily), \typeinlinebuffer converts -- into en-dashes (different from \typebuffer). Sorry, but how could I fix this \typeinlinebuffer? This is important for me, since two hyphens is one of the most common ways to marks options when invoking programs (which I try to explain to others). BTW, \sciteinlinebuffer seems have the same problem (in the scite module). Many thanks for your help, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: unprotecting when defining in Lua
On 4/29/24 19:32, Wolfgang Schuster wrote: > Pablo Rodriguez via ntg-context schrieb am 29.04.2024 um 18:21: >> Is \protected the same as \unexpanded? > > Yes they are the same (\protected is the primitive and \unexpanded is a > copy) but this wasn't always the case. > > Original TeX didn't provide a mechanism to create protected commands > and creators of macro packages had to create their own mechanism for > this, the ConTeXt solution was \unexpanded. With the etex extensions > the \protected primitive was added and \unexpanded uses the new > primitive when you used a engine which supported it. Many thanks for your fast reply and your explanation, Wolfgang. Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: unprotecting when defining in Lua
On 4/29/24 18:04, Wolfgang Schuster wrote: > Pablo Rodriguez via ntg-context schrieb am 29.04.2024 um 17:22: >> [...] >> Which is the right way to use "interfaces.definecommand" to get a simple >> command as in standard TeX? >> >> I mean, no a non \permanent or non \protected command. > > You can't create unprotected command with interfaces.definecommand > but this not a problem because you can just use interfaces.implement > to create your command which is then unprotected by default. Using > implement instead of definecommand doesn't matter because > definecommand is just a wrapper for the implement function with the > option to create a environment. Many thanks for your fast reply, Wolfgang. I’m reading it now in cld-mkiv.pdf. Is \protected the same as \unexpanded? Many thanks for your help again, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] unprotecting when defining in Lua
Dear list, I have the following sample: \starttext \startluacode function document.test(str) context(str) end interfaces.definecommand { name = "testing", protected = false, macro = document.test, } \stopluacode \meaningfull\testing \def\test#1{#1} \meaningfull\test \stoptext Which is the right way to use "interfaces.definecommand" to get a simple command as in standard TeX? I mean, no a non \permanent or non \protected command. Many thanks for your help, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: \par and \startlines
On 4/26/24 19:52, Denis Maier via ntg-context wrote: >> Wolfgang Schuster hat am 26.04.2024 19:29 CEST geschrieben: >> The inbetween setting works because ConTeXt checks at the start of >> each line whether it's empty (in this case the value is used) or not. >> >> When you add a \par you just end the current line/paragraph and it >> doesn't matter how many \par's you use because TeX just ignores them. > > I see. But there's no command that could be used to simulate an empty line? Crappy code: \starttext a\dorecurse{25}{\par}b a\dorecurse{25}{\null\par}b \stoptext Just to show it could be achieved, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: wrong spacing after command with optional arguments
On 4/26/24 19:50, Wolfgang Schuster wrote: > Pablo Rodriguez via ntg-context schrieb am 26.04.2024 um 19:04: >> I tried this approach (I hope it isn’t wrong): >> >>\starttext >>\expanded\tolerant\def\MyCommand#_#,#_#,#_#,#_{% > > The \expanded modifier is wrong (I guess you meant \unexpanded) but > which check for the number of arguments you use doesn't matter in a > document. You are right, I meant \unexpanded. > The LMTX version of the \iffourthargument etc. checks is the > \ifarguments commands where you use \or to set a case for the number of > argument passed. Many thanks for explaining this too. >> But what are these "#_" (which don’t seem to come from TeX)? > > Hans added many additions to command parameters in Luametatex and #_ > means the argument to a commands has to be enclosed in braces while #1 > allows you to pass text without it. I get it now. > You can find a list with all new command parameters in lowlevel-macros.pdf. An interesting reading for the weekend. Many thanks for your help, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: wrong spacing after command with optional arguments
On 4/26/24 18:18, Wolfgang Schuster wrote: > Pablo Rodriguez via ntg-context schrieb am 26.04.2024 um 17:29: >> What is wrong in my definition above? > > There is nothing wrong, this is just a side effect of the scanner used > with the \do...groupempty commands. To have more control about this > behavior use the \tolerant modifier for \def to change it. Many thanks for your reply, Wolfgang. I tried this approach (I hope it isn’t wrong): \starttext \expanded\tolerant\def\MyCommand#_#,#_#,#_#,#_{% \doiftextelse{#4}% {#4} {\doiftextelse{#3} {#3} {#2}}} \MyCommand{}{second}{third}{fourth},\\ \MyCommand{}{second}{third}{fourth} e,\\ \MyCommand{}{second}{third},\\ \MyCommand{}{second}{third} e,\\ \MyCommand{}{second},\\ \MyCommand{}{second} e,\\ \stoptext BTW, this is the first time I see #_ instead of #1. There is no way to search for "#_" in the wiki. Grepping the source, "#_" seems to be used for optional arguments (mainly in syst-aux.mkxl). But what are these "#_" (which don’t seem to come from TeX)? Many thanks for your help, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] wrong spacing after command with optional arguments
Dear list, I have the following sample: \starttext \def\MyCommand{\doquadruplegroupempty\doMyCommand} \def\doMyCommand#1#2#3#4{% \iffourthargument #4% \orelse\ifthirdargument #3% \else #2% \fi} \MyCommand{}{second}{third}{fourth},\\ \MyCommand{}{second}{third}{fourth} e,\\ \MyCommand{}{second}{third},\\ \MyCommand{}{second}{third} e,\\ \MyCommand{}{second},\\ \MyCommand{}{second} e,\\ \stoptext I don‘t know why only the command gets the space after right only when the four arguments are provided. What is wrong in my definition above? Many thanks for your help, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: \par and \startlines
On 4/26/24 15:33, denis.ma...@unibe.ch wrote: > Hi, > > I’m trying to typeset a poem from XML, but I can’t figure out how to > make the inbetween key working here. > > As the source is XML, I cannot just add an empty line to start a new > group of lines inside \startlines…\stoplines. I guess, there must be a > command to do that, but \par seems to have no effect here. > > How can this be done? Hi Denis, I must confess I don’t get which is your actual question. \blank works here and you know that (since you included it in your code). MkIV with \par works in your sample and LMTX with \par doesn’t. I wonder whether this might be a bug in LMTX. Just in case it might help, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: Why don't footnotes appear in floats or figures?
On 4/24/24 02:15, Joel via ntg-context wrote: > [...] Any idea how I can get current footnote value? Hi Joel, current footnote value can be accessed with \rawcountervalue[footnote], such as in: \starttext \dorecurse{25} {\ \footnote{Footnote \recurselevel}: \rawcountervalue[footnote]\par} \stoptext Just in case it helps, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: Why are ConTeXt-SBL endnotes empty?
On 4/22/24 15:51, Joel via ntg-context wrote: > A few years back, I tried using endnotes with ConTeXt-SBL, and it failed > to compile. I'm forced to try again (due to some other issue with > footnotes), and instead of compiling to error, it compiles, but the > footnote's message ends up being empty. > > Why is it appearing empty? Is there a fix? Hi Joel, the bibliography part doesn’t work for me at all. But notes may be placed as their location is text (and you add a real footnote). This works fine: \setupnote[footnote][location=text] \starttext \input knuth \footnote{Footnote} \cite[clark1989] \placenotes[footnote] \startchapter[title=Bibliography] \placelistofpublications \stopchapter \stoptext I never used a bibliography in ConTeXt, so that part is left to you. I hope it helps, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: Why don't footnotes appear in floats or figures?
On 4/22/24 02:45, Joel via ntg-context wrote: > I'm three days out from sending my work to an editor, and found some > serious problem: many footnotes just aren't rendering. Joel, please provide a minimal sample, otherwise it is really hard to help. > I've seen some 2+ year old mailing list posts suggesting ConTeXt might > have issues with footnotes; they appear to be similar to my issue--is > that still a problem? Is there a fix or workaround? Old fixes I could > finding in the mailing list don't seem to work with current versions of > ConTeXt anymore. \postponenotes and \flushnotes might be an option. \setlocalfootnotes and \placelocalfootnotes might be another option. Just in case it might help, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: Weird (?) float placement for specific widths of image
On 4/19/24 17:48, Denis Maier via ntg-context wrote: > Hi again, > > just a quick follow up on this one. Can anyone reproduce this? Hi Denis, I can reproduce it. > Would be good to know how this can be fixed. I have this in a real > document, and as I’m typesetting a XML source I cannot just adjust > slightly adjust the dimensions to get rid of that. It seems that you can place the figures somehow (https://www.pragma-ade.nl/general/qrcs/setup-en.pdf#page=169): See the extreme example: \showframe\showgrid\showstruts \setupexternalfigures [location={local,global,default}] \starttext \placefigure{A Cow}{\externalfigure[cow][ height=.5\textheight, ]} \placefigure{A Cow}{\externalfigure[cow][ height=.3\textheight, %height=.4\textheight, ]} \placefigure{A Cow}{\externalfigure[cow][ width=3cm, %width=2cm, ]} \placefigure[inleft]{A Cow}{\externalfigure[cow][width=2cm]} \placefigure[inright]{A Cow}{\externalfigure[cow][width=2cm]} \stoptext Just in case it helps, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: minwidth not working ?
On 4/19/24 17:51, Denis Maier via ntg-context wrote: > Hi again, > > another follow up. Can anyone confirm this issue? Is there a way to set > the minimal width of graphics? Hi Denis, maximum widht or height work fine, but their minimum counterparts seem not to be working at all: \showframe \starttext \doloopoverlist{none, width, height, maxwidth, maxheight} {\externalfigure[cow.pdf][\recursestring=.125\textwidth]} \page \doloopoverlist{none, width, height, minwidth, minheight} {\externalfigure[cow.pdf][\recursestring=.33\textwidth]} \stoptext Just to confirm the issue, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: \luaescapestring in proper Lua
On 4/11/24 18:56, Hans Hagen via ntg-context wrote: > [...] >>> \protected\def\PrintTheThing{\ctxlua{document.print_the_thing()}} >> >> Sorry, but why \protected is required or recommended here? > > depends if you want it to be expandable I see now that "still.pdf" has a full chapter (#3, titled “Scanning Input”) and page 79 explains exactly this. Many thanks for your help, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: unknown script 'mtx-context.lua' or 'mtx-mtx-context.lua
On 4/11/24 18:56, Hans Hagen via ntg-context wrote: > [...] > it searches for mtxrun.lua and context.lua in the same path so you need: > > luametatex.exe > mtxrun.exe (can be link to luametatex.exe) > context.exe (can be link to luametatex.exe) > context.lua > mtxrun.lua > > all in the same (bib) path > > ... always has been so ... But now it seems that luatex has disappeared from our bin directories. Was this intended (because of the issues with the build farm)? Many thanks for your help, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: unknown script 'mtx-context.lua' or 'mtx-mtx-context.lua
On 4/11/24 17:39, Denis Maier via ntg-context wrote: > [...] > Ok. It wasn't there. I have now copied it from my Miktex installation, but > it still does not work. (Looks like some path issue. The luatex binary from > the miktex installation seems to take priority over the one now in the > ConTeXt installation. Looks like I'm getting somewhere...) I wonder whether the path order might give priority. But in any case, I wonder whether it is intended that current latest (from the ConTeXt distribution) is intended neither to have the latest LuaTeX nor to have any LuaTeX binary at all. Hans (or Luigi), are we (just humble users) missing something here? Many thanks for your help, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: unknown script 'mtx-context.lua' or 'mtx-mtx-context.lua
On 4/10/24 22:28, Denis Maier wrote: >> [...] >> context --luatex --generate > > Thanks, Pablo. > I've tried it, but it doesn't seem to work... I get the same result on Win64 when I move the luatex binary from the tex/texmf-win64/bin/ directory. This may sound stupid, but could you check whether the bin directory contain the required binary? Sorry, "luatex --version" and even "whereis luatex" should give the same result (but on Windows, it seems to be https://ss64.com/nt/where.html). I hope it may help, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: \luaescapestring in proper Lua
On 4/10/24 21:48, Hans Hagen via ntg-context wrote: > On 4/10/2024 7:49 PM, Pablo Rodriguez via ntg-context wrote: >> [...] >> I wonder whether there is a proper way in the Lua code to avoid >> [[\luaescapestring{}]] in \ctxlua. >> [...] > context(tokens.scanners.string()) Many thanks for your reply, Hans. > \protected\def\PrintTheThing{\ctxlua{document.print_the_thing()}} Sorry, but why \protected is required or recommended here? Many thanks for your help, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] \luaescapestring in proper Lua
Dear list, I have the following sample: \starttext \startluacode function document.print_the_thing(str) context(str) end \stopluacode \unexpanded\def\PrintTheThing#1{% \ctxlua{document.print_the_thing([[\luaescapestring{#1}]])}} \PrintTheThing{a \em b {c}} \stoptext I wonder whether there is a proper way in the Lua code to avoid [[\luaescapestring{}]] in \ctxlua. BTW, [[\luaescapestring{}]] in \ctxlua works better for me, since in my real world document, I’m using str:match() to check whether the string ends with interrogation or exclamation marks ("%?!$"). Many thanks for your help, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: unknown script 'mtx-context.lua' or 'mtx-mtx-context.lua
On 4/10/24 13:59, Denis Maier via ntg-context wrote: > Hi, > I wanted to test my earlier example (float placement) also with MKIV, but > context ---luatex … > give me this error message : > unknown script 'mtx-context.lua' or 'mtx-mtx-context.lua > How can I make it work? Hi Denis, as far as I know, this is required first: context --luatex --generate BTW, although LuaTeX 1.18 has been released, my Linux64 ConTeXt contains version 1.17.x. In fact, the LuaTeX binary was removed in an update some weeks (or months) ago. I had to copy it from a backup from a previous version. I hope it helps, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: incosistent output of --- dash
On 4/6/24 11:43, madiazm.eo...@gmail.com wrote: > Hi everyone, Hi Miguel, > […] > Am I missing something on the use of this ligature? I don’t think so. In some cases you may not get the ligature for a good reason: \starttyping program --option=value file.ext \stoptyping It would make no sense to get an en-dash there (but I guess you don’t mean that). But all OSes provide character maps to get single characters. And also Unicodia works fine in Windows (https://mercury13.github.io/unicodia/, just in case it might suit your needs). Having a single character (emoji, dashes or whatever) is way more readable than a character combination for a ligature or a TeX command. This single-character approach also makes easier to copy and paste text to other formats. > (the question is just out of curiosity, since I plan to create a > command that adds a hairspace after or before the dash, since I don't > like it to stick to some letters like "o"). Just consider that you should add an horizontal box (or pair both space and hyphen), otherwise you may get a line break between character and hyphen (instead of the hair space): \starttext \startTEXpage[offset=2st] \hsize\zeropoint this —\hairspace or so\hairspace— that this \hbox{—\hairspace}or so\hbox{\hairspace—} that \stopTEXpage \stoptext Just in case it might help, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: error with \sc
On 4/3/24 07:16, Peter Münster wrote: > On Tue, Apr 02 2024, Andres Conrado Montoya wrote: > >> You shouldn't run context as root in any case. > > I don’t run context as root. But I need to erase the cache in > /opt/context/tex/texmf-cache as root, because the user doesn’t have the > permission to do that. Sorry, Peter, but I have a suspicion from what you wrote. >> mtxrun --script cache --erase && mtxrun --generate > > Thanks. It did not work after doing it as root, but then I saw, that > there is also a cache in the user home-directory, so I’ve done it as the > user too, and now it works. In principle, cache is only written to tex/texmf-cache. But I guess, when that directory cannot be written by the user, cache is written to $HOME/texmf. This may be why you get two cache directories (instead of only tex/texmf-cache). Cheers, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: error with \sc
On 4/2/24 21:23, Mikael Sundqvist wrote: > On Tue, Apr 2, 2024 at 9:16 PM Peter Münster wrote: >> [...] >> TIA for any hints, > > Hans wrote in his email: > -- If you have troubles (crash) you need to wipe the cache due to a > change in lua bytecode storage (no easy way to catch it). > > Did you do that? (One way is to remove tex/texmf-cache/*) Another way is to run (since your test works fine on my laptop): mtxrun --script cache --erase && mtxrun --generate The format file will be generated in the next compilation, so it will take a bit longer. Just in case it might help, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: ConTeXt on RPI400
On 3/27/24 15:55, h...@hongfeng.ch wrote: > Hello Pablo, > > Tried, the problem still remains. Weird, if I remove the cache, I get a single line error message: mtxrun | unknown script 'mtx-context.lua' or 'mtx-mtx-context.lua' Could you run the "install.sh" script located at ~/WORKSPACE/TOOLS/ConTeXt/ on your computer and then "mtxrun --generate"? If you still get the error message above, could you give us the output from "whereis context"? I hope this may help, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: ConTeXt on RPI400
On 3/26/24 18:43, Andres Conrado Montoya wrote: > Can you try the following: Delete the `texmf-cache` folder > inside /home/hf/WORKSPACE/TOOLS/ConTeXt/tex/, and then run `mtxrun > --generate && context --make`? In principle, the two following commands should be enough: mtxrun --script cache --erase && mtxrun --generate The format file generation will be run automatically by the next compilation. Just in case it may help, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] (again) \xmlinlineprettyprinttext double hyphens
Dear list, I have the following sample: \startbuffer[demo] mtxrun --script check file \stopbuffer \startxmlsetups xml:initialize \xmlsetsetup{#1}{code}{xml:*} \stopxmlsetups \xmlregistersetup{xml:initialize} \startxmlsetups xml:code \xmlprettyprinttext{#1}{none} \xmlinlineprettyprinttext{#1}{none} \stopxmlsetups \definefontfamily[mainface][tt][TeX Gyre Cursor] [features={default}] \setupbodyfont[mainface] \starttext \xmlprocessbuffer{main}{demo}{} \stoptext Current LMTX (2024.03.11 09:34) is giving different results for double hyphens with \xmlprettyprinttext and \xmlinlineprettyprinttext. Since the output of \xmlinlineprettyprinttext is a wrong argument (in the sample), what am I missing here to get the right output with \xmlinlineprettyprinttext? Many thanks for your help, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: Use of marking
On 3/21/24 19:00, Thomas Meyer wrote: > Hi Pablo and Bruce, > > thank you very much for your two solutions. That helps me enormously now. Hi Thomas, literally, »nichts zu danken«, since it was Andrés and not me who provided a solution. Cheers, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: Struggling with the distance and right margin text
On 3/22/24 15:57, Ursula Hermann wrote: > Dear Pablo, > > Many thanks for your example. Sorry for writing so late. Dear Ursula, many thanks for your minimal sample. > At least I found out, how it works for me . This is the best way. > [...] > \inrightmargin{\blackrule\\{3.2.2}}\par \dontleavehmode \blackrule It is not clear to me why you need to remain in horizontal mode after a paragraph break. At least, with the following commands, I get the same results: \inoutermargin{\blackrule\\{3.2.2}} \blackrule Just in case it might help, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] issue with \xmlinlineprettyprinttext
Dear list, I have the following sample: \startbuffer[demo] a --b c a --b c \stopbuffer \startxmlsetups xml:initialize \xmlsetsetup{#1}{doc|code|inlinecode}{xml:*} \stopxmlsetups \xmlregistersetup{xml:initialize} \startxmlsetups xml:doc \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:code \xmlprettyprinttext{#1}{none} \stopxmlsetups \startxmlsetups xml:inlinecode \xmlinlineprettyprinttext{#1}{none} \stopxmlsetups \definefontfamily[mainface][tt][TeX Gyre Cursor] [features={default, quality}] \setupbodyfont[mainface] \starttext \xmlprocessbuffer{main}{demo}{} \type{a --b c} \stoptext Using current latest (from 2024.03.11 09:34), LMTX transforms "--" in "–" (en-dash) only with \xmlinlineprettyprinttext (LuaTeX writes the en-dash in the three cases). This issue has been driving me crazy, since it took me a while what was different here. Is there something I can do to get \xmlinlineprettyprinttext as \xmlprettyprinttext in this point? Many thanks for your help, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: issue with typing in footnotes
On 3/17/24 23:58, Wolfgang Schuster wrote: > Pablo Rodriguez via ntg-context schrieb am 17.03.2024 um 17:38: >> [...] >> As far as I know, this sample should be compiled without any issue. >> >> Could you be so kind to confirm the issue or explain me what am I missing? > > The footnote environment is just a fancy way for a command with a > argument and buffers don't like being part of arguments. > > You can put the code in buffer outside of the footnote and type the > content of the buffer in the footnote. Many thanks for your reply, Wolfgang. Everything is clear to me now. Many thanks for your help, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] issue with typing in footnotes
Dear list, I have the following sample (which was on the way of showing another issue): \starttext a \starttyping b \stoptyping c \startfootnote a \starttyping b \stoptyping c \stopfootnote \stoptext Current latest (from 2024.03.11 09:34) breaks compilation with both LMTX and LuaTeX. As far as I know, this sample should be compiled without any issue. Could you be so kind to confirm the issue or explain me what am I missing? Many thanks for your help, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: Struggling with the distance and right margin text
On 3/15/24 14:06, Ursula Hermann wrote: > Dear List, Dear Ursula, this might help you (it isn’t perfect, but you just seem to copy and paste fragments from your source files): %\showframe\showstruts \mainlanguage[de-at] \setuppagenumbering[alternative=doublesided] \definemargindata [MyInMargin][ininner] \definemarginframed[MyInMargin] [topframe=on,bottomframe=on,rulethickness=1pt,width=1.90cm] \defineframed[topruletitle] [width=max, frame=off, topframe=on, rulethickness=1pt, align={justify}, extras=\dontleavehmode] \starttext \topruletitle{\MyInMargin {1.1.1}\bf Beispiel 3.2.17. (Vertauschung von All- und Existenzquantor).} \par \input knuth\page \topruletitle{\MyInMargin{3.2.22}{\bf Theorem 3.2.22 (Rechenregeln für Quantoren)}. Seien \m P(\m x)und \input zapf b} \stoptext Sorry for saying that again, but please elaborate both your minimal samples and your descriptions of the issues you are experiencing. Some comments on the code fragments you sent. First of all, please include always code that can be compiled simply after being copied and pasted. This requires \starttext (most of the time) and \stoptext (mandatory to avoid stupid errors). > \definepapersize[MyBook][width=19cm,height=29.7cm] > \setuppapersize[MyBook][MyBook] % Prints on paper the size of MyBook > %\setuppapersize[MyBook][A4] %Would print MyBook-size pages on A4 paper > \setupbodyfont[modern, 12.50pt] If these lines are irrelevant for the issue you are experiencing, please don’t include them. > \definemargindata [MyInMargin][inleft] > \definemarginframed[MyInMargin][topframe=on,bottomframe=on,rulethickness=1pt,width=1.90cm] You define this margin framed, but your sample makes no use of it. Sorry, but I don’t get it. > \defineenumeration > [theorem] > [ > text=Theorem, > title=yes, > width=fit, > distance=0.2em, > alternative=serried, > ] > \definetextbackground[GrayBackground][ > location=paragraph, > background=color, > backgroundcolor=lightgray, > leftoffset=.5\bodyfontsize, > rightoffset=.5\bodyfontsize, > topoffset=.5\bodyfontsize, > bottomoffset=.5\bodyfontsize, > frame=off,] > \margintext{\blackrule[color=black, height=0.10ex, width=1cm]\\} > \blackrule[color=black, height=0.10ex, width=13.50cm] If your sample includes no theorem or text background, please remove these definitions when sending code. BTW, avoid include text content (such as margin and body rules [but not their definitions]) before \starttext. Also, use \clrf instead of \\ (since the mailing list displays the relevant line as ("\" instead of "\\"): > \margintext{\blackrule[color=black, height=0.10ex, width=1cm]\} Here starts your text: > \starttext > \margintext {1.1.1} > {\bf Beispiel 3.2.17. (Vertauschung von All- und Existenzquantor).} \par Your margin text is undefined. Your code has a defined margin text command, but it isn’t used. > So I have here an example from the second page: Sorry, but I’m having the impression you are using ConTeXt as a kind of command-based DTP software (which I think it isn’t at all). Or, do you define commands for each page? I think it is better to define a single margin text command and use a doublesided page setup. > \definemargindata[inrightmargin][right][margin=margin,width=.50em\rightmarginwidth,style=,color=] > \definemarginframed[MyInMargin][topframe=on,bottomframe=on,rulethickness=1pt, > width=.90cm] Again, margin text commands defined, but never used. > \blackrule[color=black, height=0.10ex, width=13.40cm] > {\blackrule[color=black, height=0.10ex, width=1cm, distance=.90cm]\par Here you open a brace that is not closed at all. At least, consider that this won’t be extremely readable for other people (this is only a sample). It also may be problematic for you, if you leave the source untouched for some weeks. > \defineenumeration > [theorem] > [ > text=Theorem, > title=yes, > width=fit, > distance=0.2em, > alternative=serried, > ] At least, it would be better not to include a definition inside content that seems to (or may) be grouped with braces. BTW, it is exactly the same definition as the one included before. It isn’t just to be removed in minimal samples, your final code doesn’t need the duplicated command definition. > \inright{3.2.22} > {\bf Theorem 3.2.22 (Rechenregeln für Quantoren)}. Seien \m P(\m x)und > > My problem here is that there is not the same distance between the the > text and the margintext . Please, always compile the minimal samples that you send to the list. This is simply to ensure other list subscribers will get the same results as you. After adding a final \stoptext command, I had to run: mtxrun --script check source-sample.tex This allowed me to spot the problem with the unclosed brace (mentioned before). > And now the margintext should be on the right side. I get the second margin text on the right side (after all,
[NTG-context] Re: update
On 3/11/24 18:48, Hans Hagen wrote: > Hi, > > Todays update has a fix for the compact mode slant interference (as > explained by Wolfgang a few days ago). Hopefully that works out well. Many thanks for that fix, Hans. Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: issue with module update
On 3/11/24 17:17, Taco Hoekwater wrote: >> On 11 Mar 2024, at 16:57, Pablo Rodriguez wrote: >> [...] >> Is there something I am missing here? > > One of your releases had “changed-name” as its release ‘number’. > > The modules site does not know how to deal with non-numeric release > names all that well; it made a mess of its symlinking stage. > > I fixed the symlink manually, it should be fine now. Really sorry for causing you problems when updating the modules, Taco. I had no idea that non-numeric releases were problematic with symbolic linking. I made that change to avoid having two releases with the same date (I think this also may give issues with symlinks). Well, I realize that if I make a wrong release, I have to number the new version with only numbers (and maybe points instead of hyphens). Sorry again for giving problems and many thanks for your work, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] issue with module update
Dear list, I have just updated a module named PresVoz. I get the standard directory (https://modules.contextgarden.net/dl/presvoz/) and (https://modules.contextgarden.net/dl/presvoz-{%version%}.zip), but no https://modules.contextgarden.net/dl/presvoz.zip (with current version). So when updating the module, I get it only uninstalled. The two most recent updates (this one and the one before) had this issue. Is there something I am missing here? Many thanks your your help, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: weird character normalization in the wiki
On 3/11/24 09:31, Taco Hoekwater wrote: >> On 9 Mar 2024, at 09:35, Pablo Rodriguez via ntg-context >> wrote: >> >> Sure, they may be a workaround to type codepoints instead of characters >> (such as with \utfchar{0x1fbb}, but wouln’t it be possible to disable >> that character normalization in the wiki? > > AFAIK, Wikimedia’s Unicode normalisation can not be turned off. Hi Taco, then I have to use the woraround. Many thanks for your help, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: \em issue in MkXL (2024.03.05 11:26)
On 3/10/24 10:46, Hans Hagen via ntg-context wrote: > [...] > using the low level commands > > \glyphscale > \glyphxscale > \glyphyscale > \glyphslant > \glyphweight > > directly can have side efects when at an outer level these are also set, > so you need to accumulate, like > [...] > which you will now wikify... Many thanks for your reply, Hans. I will wikify this, once I figure out where it can fit in the wiki (in due time, since ConTeXt is more and more complex for me lately and my free time is less and less these days). I only used \enableexperiments[fonts.compact] and then \em. I thought when I (mis)read your messages that compact fonts is the way to go in LMTX. This was the reason I enabled them (the sooner we test new features today, the less issues will be faced with them tomorrow). \glyphslant came into the conversation after experiencing an issue triggered by enabling compact fonts. Sorry for being explicitly verbose, but I intend to have the \em behavior also fixed in compact fonts. Many thanks for your help, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: \em issue in MkXL (2024.03.05 11:26)
On 3/9/24 16:04, Wolfgang Schuster wrote: > Pablo Rodriguez via ntg-context schrieb am 08.03.2024 um 19:39: >> [...] >>\enableexperiments[fonts.compact] >> >> Which seeems weird to me. Or at least, I thought I read that Hans >> enabled it by default in LMTX. > > AFAIR Hans uses the setting in his own documents. I have been using it for a while. I hope the issue with \glyphslant might be fixed to enable it again. >> Then my question is whether this was caused by simply enabling compact >> fonts or by doing it twice. > > The results happen when you use compact mode and is a result of > \glyphslant which keeps the value of the italic style even when you > switch back to the upright style. Many thanks for your explaination, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] weird character normalization in the wiki
Dear list, https://wiki.contextgarden.net/Greek#Monotonic_and_Acute_Accent includes two samples that should display the difference betweeen the monotonic accent and the polytonic acute accent (which generate two different characters for each such accented vowel). Excluding other implications, these are two different characters. In some fonts each pair of different characters for each accented letter lead to the same glyph, in other fonts those glyphs are different. This sample shows the difference (there should display two slightly different accents [unless there is some character normalization on the way]): \definefontfamily[mainface][rm][EBGaramond] \setupbodyfont[mainface, 500pt] \definecolor [tred] [r=1,t=.5,a=1] \definecolor [tblue] [b=1,t=.25,a=1] \starttext \startTEXpage[offset=1ex] \startoverlay {\color[tred]{Ά}} {\color[tblue]{Ά}} \stopoverlay \stopTEXpage \stoptext The problem that I have is tricky. Thanks to character normalization (at least in Firefox), searching for "á" will also find "a" (unless “Match diacritics” is enabled). I’m afraid the wiki is performing some character normalization, which renders samples in https://wiki.contextgarden.net/Greek#Monotonic_and_Acute_Accent useless. Searching for "Ά" in https://wiki.contextgarden.net/Greek should give not more than 4 matches (not case-sensitive and with “Match diacritics” [or similar filter for your browser] enabled). I‘m afraid I get none. While editing the article searching for "Ά" (case-insensitive and not normalizing characters), gave me 4 matches, but only in the source (no ocurrence was found in the preview). Once changes are saved, "Ά" occurrences dissapear (since they seem to be normalized). Sure, they may be a workaround to type codepoints instead of characters (such as with \utfchar{0x1fbb}, but wouln’t it be possible to disable that character normalization in the wiki? Many thanks for your help, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: \em issue in MkXL (2024.03.05 11:26)
On 3/8/24 19:09, Wolfgang Schuster wrote: > Pablo Rodriguez via ntg-context schrieb am 08.03.2024 um 18:50: >> [...] >> LMTX gets b, c and d in slanted form. >> >> LuaTeX gets only b and c in slanted form. > [...] > I get b and d in italic which is the expected output. Sorry, my LuaTeX is getting slanted b and d ("c" was my typo). But I see what was causing my issue (line from ~/texmf/texmf-local/cont-loc.mkxl): \enableexperiments[fonts.compact] Which seeems weird to me. Or at least, I thought I read that Hans enabled it by default in LMTX. Then my question is whether this was caused by simply enabling compact fonts or by doing it twice. Many thanks for your help, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] \em issue in MkXL (2024.03.05 11:26)
Dear list, the following latest gets differents results when compiled with MkXL and MkIV (in current latest from 2024.03.05 11:26): \definefontfamily[mainface][rm][TeX Gyre Termes] [features={default, quality}, it={style: regular, features:{default, quality, slanted}}, sl={style: regular, features:{default, quality, slanted}}] \setupbodyfontenvironment [default] [em=italic] \setupbodyfont[mainface] \starttext \startTEXpage[offset=1em] a\\ \em b\\ \em c\\ \em d\\ \stopTEXpage \stoptext LMTX gets b, c and d in slanted form. LuaTeX gets only b and c in slanted form. I think LMTX may have an issue here. Could anyone be so kind to confirm this? Many thanks for your help, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: imposition: getting to the last page of a booklet
On 3/6/24 19:50, Wolfgang Schuster wrote: >> [...] >> Could you write the first line in plain language? > > Look at the second example of the Lua code in the example below for each > command (the first example is your version), the third example is just a > condensed version of example 2. Many thanks for your extended explanation, Wolfgang. Now it is clearer to me (although I need some time to learn from it). Many thanks for your help, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: missing metadata in LMTX
On 3/6/24 17:35, Wolfgang Schuster wrote: > Pablo Rodriguez via ntg-context schrieb am 06.03.2024 um 16:52: >> [...] >> I wonder whether this requires a minimal sample to be fixed. > > Yes, a minimal example would help because \setupmetadata works in your > previous example. Many thanks for your reply, Wolfgang. Now I have the minimal sample: \startbuffer[demo] author text \stopbuffer \starttext \startxmlsetups xml:initialize \xmlsetsetup{#1}{doc}{xml:*} \xmlsetsetup{\xmldocument} {(div|section)[@id='header']} {xml:meta} \xmlsetsetup{\xmldocument} {(h2|p)[contains(@class,'author')]} {xml:title:author} \stopxmlsetups \xmlregistersetup{xml:initialize} \startxmlsetups xml:doc \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:text \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:meta %\aftergrouped{\setupinteraction% \setupmetadata [author={\xmlconcat{#1}{/h2[contains(@class,'author')]}{, }}] %} \stopxmlsetups \startxmlsetups xml:title:author \xmlflush{#1} \stopxmlsetups \setupinteraction[state=start] \xmlprocessbuffer{main}{demo}{} \stoptext With \setupmetadata it breaks compilation. I know it is not the most elegant code, but in my real environment xml:title:author outputs text. Many thanks for your help, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: missing metadata in LMTX
On 3/6/24 15:54, Hans Hagen wrote: > [...] >> \setupmetadata >>[title=FooBar] > > that's for those who go global Many thanks for the new command, Hans. I‘m afraid this new command breaks my compilation. The error message isn’t very helpful for me (see below). I wonder whether this requires a minimal sample to be fixed. Many thanks for your help, Pablo tex error > tex error on line 0 in file : Argument of \D9>:title has an extra } \par } \prerolltostring #1->\beginlocalcontrol \setbox \b_syst_boxes \hbox {\expand \everypreroll #1} \normalexpanded {\setbox \b_syst_boxes \emptybox \endlocalcontrol \boxtostring \b_syst_boxes } \scrn_identity_get #1->\setidentityvariable {#1}{\prerolltostring {\interactionparameter {#1}} } [[special cmd: end local call]] I've run across a '}' that doesn't seem to match anything. For example, '\def\a#1{...}' and '\a}' would produce this error. The '\par' that I've just inserted will cause me to report a runaway argument that might be the root of the problem. mtx-context | fatal error: return code: 1 > exit status: 256 ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: imposition: getting to the last page of a booklet
On 2/28/24 19:28, Wolfgang Schuster wrote: > [...] > \def\beforequadruplenumber#1% >{\ifcase\numexpr#1+1;4\relax > \number\numexpr#1+4\relax > \else > \number\numexpr#1+3-#1;4\relax > \fi} Sorry for not having answered before, Wolfgang. I’m afraid I don’t get how \ifcase is deployed with as conditional (being \ifcase used to give numbers for weekdays or months). The semicolon is also mysterious to me, I don’t know what it does there in plain language. Sorry, I know it has to be simple, but the syntax is too cryptic for me. Could you write the first line in plain language? Sorry for asking that. I’m afraid this would be the only way I could get what \ifcase is doing there. BTW, neither your command, nor mine work in my real world document. But this would be another issue. Many thanks for your help, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: issue mixing font features (LMTX & MkIV)
On 3/4/24 11:09, Hans Hagen via ntg-context wrote: > [...] > in luametatex we have a bit more advanced mechanism (also relates to > compact mode) because th eengine is a bit more clever > > just make sure that you don't add up features where one calcels the > other, so use for instance: Many thanks for the explanation and the fix, Hans. It seems that the engine is becoming too smart for me . Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: issues scaling glyphs of Twemoji Mozilla
On 3/4/24 09:08, Hans Hagen via ntg-context wrote: > On 3/2/2024 1:46 PM, Pablo Rodriguez via ntg-context wrote: >> [...] >> Using current latest from both MkIV and LMTX, I cannot scale the emoji flag. >> >> Latest font release can be directly download from >> https://github.com/mozilla/twemoji-colr/releases/latest/download/Twemoji.Mozilla.ttf. >> >> Am I missing something to scale the glyph properly? > You're missing the fact that the font has an issue. I can add a > workaround, assuming that (as often) issues become features. Many thanks for your fix, Hans. Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: missing metadata in LMTX
On 3/4/24 01:18, Wolfgang Schuster wrote: > Pablo Rodriguez via ntg-context schrieb am 03.03.2024 um 20:02: >> [...] >> With LuaTeX, I get PDF metadata. With LuaMetaTeX, I cannot get them. >> [...] > I can confirm the issue and it happens because Hans changed they way > how the values of the \setupinteraction commands are passed to Lua > side of ConTeXt to be written to the PDF file. Many thanks for your reply and your explanation, Wolfgang. > I can provide at the moment solutions which ensure the information > appear in the PDF but none of the is very elegant and I hope Hans > can help with a clean solution. The first one avoids the issue until Hans provides a final fix. Many thanks for your help, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] missing metadata in LMTX
Dear list, this issue has been bugging me for some time: \startbuffer[demo] author title text \stopbuffer \starttext \startxmlsetups xml:initialize \xmlsetsetup{#1}{code|meta|text}{xml:*} \stopxmlsetups \xmlregistersetup{xml:initialize} \startxmlsetups xml:doc \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:meta \setupinteraction [author={\xmltext{#1}{/author}}, title={\xmltext{#1}{/title}}] \stopxmlsetups \startxmlsetups xml:text \xmlflush{#1} \stopxmlsetups \setupinteraction[state=start] \xmlprocessbuffer{main}{demo}{} \stoptext With LuaTeX, I get PDF metadata. With LuaMetaTeX, I cannot get them. For both, I’m using current latest (from 2024.02.27 09:21). Could anyone confirm the issue or explain me what I am missing? Many thanks for your help, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] issue mixing font features (LMTX & MkIV)
Dear list, I have the following sample: \definefontfeature[wider][extend=2] \definefontfamily[mainface][rm][TeX Gyre Pagella] [features={default, quality, wider}, it={style: regular, features:{default, slanted, quality}}, bf={style: regular, features:{default, boldened-30}}, bi={style: regular, features:{default, boldened-30, slanted}}] \setupbodyfont [mainface, 30pt] \starttext \startTEXpage[offset=1ex] a {\it a}\\ {\bf a} {\bi a} \stopTEXpage \stoptext With current latest (2024.02.27 09:21), LuaTeX gets boldened and slanted for regular (but the other fonts cannot inherit the wider feature and wider will not mix with boldened-30 [even when specified]). For some reason, LMTX from current latest cannot get slanted and boldened-30 (but it mixes the inherited wider feature in all fonts). This began to behave differently in latest from 2024.01.08 11:23 (which is my next version after the one from 2023.09.26 18:19). Could anyone confirm the issue? Many thanks for your help, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: issues scaling glyphs of Twemoji Mozilla
On 3/2/24 14:41, vm via ntg-context wrote: > On 02/03/2024 13:46, Pablo Rodriguez via ntg-context wrote: >> Using current latest from both MkIV and LMTX, I cannot scale the emoji flag. > > same here Many thanks for your confirmation. Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] issues scaling glyphs of Twemoji Mozilla
Dear list, I have the following sample: \definefontfamily[mainface][rm][TeX Gyre Termes] \definefontfamily[mainface][cg][Twemoji Mozilla][features={color}] \setupbodyfont[mainface] \starttext \scale[width=30em]{a} \scale[width=30em]{\cg } \stoptext Using current latest from both MkIV and LMTX, I cannot scale the emoji flag. Latest font release can be directly download from https://github.com/mozilla/twemoji-colr/releases/latest/download/Twemoji.Mozilla.ttf. Am I missing something to scale the glyph properly? Many thanks for your help, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: Structuring a magazine or booklet
On 2/28/24 15:27, Jean-Pierre Delange wrote: > Sorry for the noise : I did'nt see the ConTeXt imposition schemas here : > > https://wiki.contextgarden.net/Imposition > > I'll read and test it. Hi Jean-Pierre, in its simplest form, a booklet may be: \setuppapersize[A4][A3, landscape] \setuparranging[2UP] \starttext \dorecurse{28}{\section{Section}\input zapf} \stoptext I think this seems to be what you may be aiming at. Just in case it might help, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: imposition: getting to the last page of a booklet
On 2/28/24 12:24, Pablo Rodriguez via ntg-context wrote: > [...] > This is why beforequadruple would make sense. I guess some Lua magic > could do that, computing x to the follwing page that "x % 4 = 3" (and > then \page[x]). > > I will try to find a trick for that, but not now. Replying to myself, this is a command to compute next numbers before and after quadruples (with application to \realpageno): \starttext \def\beforequadruplenumber#1% {\ifnum\modulonumber{4}{#1} = 1 \the\numexpr #1 + 2 \orelse\ifnum\modulonumber{4}{#1} = 2 \the\numexpr #1 + 1 \orelse\ifnum\modulonumber{4}{#1} = 3 \the\numexpr #1 + 4 \else \the\numexpr #1 + 3 \fi} \def\afterquadruplenumber#1% {\ifnum\modulonumber{4}{#1} = 1 \the\numexpr #1 + 4 \orelse\ifnum\modulonumber{4}{#1} = 2 \the\numexpr #1 + 3 \orelse\ifnum\modulonumber{4}{#1} = 3 \the\numexpr #1 + 2 \else \the\numexpr #1 +1 \fi} \dorecurse{25}{\recurselevel: \beforequadruplenumber{\recurselevel}\\} \dorecurse{25}{\recurselevel: \afterquadruplenumber{\recurselevel}\\} %\page[123] %\null \page[\beforequadruplenumber{\realpageno}] before quadruple \page[\afterquadruplenumber{\realpageno}] afterquadruple \stoptext Michael, if this fits your needs, please add it to the wiki. I hope it helps, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: \in, \at, and labletext
On 2/28/24 13:05, Ursula Hermann wrote: > Dear List, > > In the Documentation IntroCTX_eng_s.pdf at page 170 , I found the two > examples with \in and \at, and also the label. Dear Uschi, I guess you mean (a link may be simpler than attaching a single page): https://raw.githubusercontent.com/contextgarden/not-so-short-introduction-to-context/main/en/introCTX_eng_p.pdf#page=170 https://raw.githubusercontent.com/contextgarden/not-so-short-introduction-to-context/main/en/introCTX_eng_s.pdf#page=170 Sorry, but I don’t know which is the difference between both documents (hashes are different, but diffpdf is not able to distinguish between them [in appearance]). > The Problem is, that in the following sentence only the number (3.1) is > a placed formula in an example, should have a link. Without the > brackets. The sentence says: > > Task 1: Formulate equivalents according to rule (3.1): If the link is missing, you may have missed to enable interaction (see first line of sample below). If parentheses (brackets are []) is what you want to remove, please modify the sample below to display them (I simply don’t get them [sorry, but this is my first document with a theorem]). Other than that, I must confess I cannot imagine what is the issue you might be facing. But don’t hesitate to ask with a more verbose description. > Sorry, I have no example. Here you have one: \setupinteraction[state=start, focus=standard] \defineenumeration[theorem][text=Theorem, alternative=right] \starttext \starttheorem[was-noch] This theorem has one paragraph. \stoptheorem \theorem[whatever] This theorem has other paragraph. In \in{theorem}[whatever] on \at{page}[was-noch]. \stoptext I hope it might help, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: output filename with SHA256
On 2/23/24 16:01, mf wrote: > [...] > A new run is started unless: > [...] > - the tuc file is identical to the one of the previous run Hi Massi, many thanks for your reply. If ConTeXt relies on that condition to stop compilation, then it would be great to know how it is performed to invoke os.rename only on when the condition takes place. It would be as to write: if x or environment.currentrun >= environment.maxnofruns then os.rename(pdf_file, ("%s-%s.pdf"):format(tex.jobname, sha_pdf)) end "x" would be the condition where the .tua/.tuc files are identical. Do you know where that condition is written in the code, so ConTeXt doesn’t perform another run? Many thanks for your help, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: imposition: getting to the last page of a booklet
On 2/28/24 11:56, Bruce Horrocks wrote: > [...] > The sample works for me if you set plain A4 and doublesided, thus: > > \setuppagenumbering[alternative={doublesided}] > \starttext > \samplefile{lorem} > \page[quadruple] > page before the quadruple (must be 3, not 4) > \page[yes, quadruple] > page before the quadruple (must be 7, not 8) > \stoptext > > This puts the "page before quadruple" text on page 4 which is the > last side of the first four sides, if that makes sense. Many thanks for your reply, Bruce. \page[quadruple] works fine putting content on realpage numbers that can be divided by 4 (with modulo 0). As far as I get, Michael was looking to place content on realpage numbers get modulo 3 when divided by 4. At least, this is what would fit my needs to place the imprint on the (excuse the Latin adjective [before the last]) penultima page of a booklet. This is why beforequadruple would make sense. I guess some Lua magic could do that, computing x to the follwing page that "x % 4 = 3" (and then \page[x]). I will try to find a trick for that, but not now. Many thanks for your help, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] \getdocumentfilename or document.files
Dear list, I have the following sample (saved as "a.tex"): \starttext \getdocumentfilename{1} \cldcontext{document.files[1]} \getdocumentfilename{2} \cldcontext{document.files[2]} \getdocumentfilename{3} \cldcontext{document.files[3]} \stoptext I compile it with: context --purgeall a b c "b.tex" is a different file and "c.tex" is a symlink to "a.tex". I only get the first filename for "a.tex" and the last filename for "c.tex". Which is the right way to get the second and third filenames when in "a.pdf" (or the first two ones in "c.pdf")? Many thanks for your help, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: Works now! At Work, and a question to paragraphs in an Theorem
On 2/27/24 10:10, Ursula Hermann wrote: >[...] > I have a question to my paragraphs: > > \definetextbackground[Paragaph][ > [...] > \startparagraph Hi Uschi, if you define Paragaph, then you should use \startParagaph (and \stopParagaph). > \starttext Even if that works, it would be better to nest commands (\starttext before \startparagraph). > [...] > So this is the example. What I like to do: The first paragraph should be > normal written, but the second one should have more space between the > words. Because of Math: Is \hspace the right way? The right command? And > using \startnarrower, \stopnarrower? Narrower refers to margins. Extra space between words would be something different (at least, as far as I get it). That being said, I have no idea how to get different inter-word spacing. Just in case it might help, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: Hyperlinks cease working after page selection
On 2/26/24 21:25, Michael Guravage wrote: > Greetings, > > The document in question compiles correctly. Its hyperlinks are correct > and work as expected. However, if I apply a page selection, the > hyperlinks in the resulting document, while correctly coloured, no > longer work. > [...] > Processed as follows: > > context mwe.tex > context --extra=select --selection=1 --result=foobar.pdf mwe.pdf Hi Michael, add --interaction as an argument. Just in case it helps, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: imposition: getting to the last page of a booklet
On 2/24/24 14:30, Wolfgang Schuster wrote: > Michael Guravage schrieb am 23.02.2024 um 10:07: >> Greetings, >> >> I would like to use the nextquadruple and beforequadruple >> pagebreakhandlers described at the bottom of the wiki's imposition >> page. However, the examples complain of an error invoking the >> \installpagebreakhandler command. >> >> The wiki page was last updated nearly four years ago. Is anyone using >> updated versions of these? > > You can use quadruple out of the box. Hi Wolfgang, I’m also interested a solution for this. I’m afraid I cannot make your sample work: \setuppapersize[A5][A4, landscape] \setuparranging[2UP] \setuppagenumbering[alternative={singlesided,doublesided}] \starttext \samplefile{lorem} \page[quadruple] page before the quadruple (must be 3, not 4) \page[yes, quadruple] page before the quadruple (must be 7, not 8) \stoptext I haven’t tested what "\setuppagenumbering[alternative={singlesided,doublesided}]" would cause in my documents. In any case, I get real quadruple, not before the quadruple. What am I missing here? Many thanks for your help, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: output filename with SHA256
On 2/23/24 23:58, Bruce Horrocks wrote: >> On 23 Feb 2024, at 13:32, Pablo Rodriguez via ntg-context >> wrote: >> [...] >> Is there any way to check if compilation needs any other run? >> [...] > Rather than use the wrapup() hook can why not rename the file using > a second job on the command line? > > So your compile command might look like: > > $ context jobname.tex add_sha.tex Hi Bruce, this totally makes sense to me. But (shame on me!) this is the first time I will type context followed by two files. This is also the first time when I see that invoking ConTeXt with more than a file makes sense to me. Many thanks for your help, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] output filename with SHA256
Dear list, I have the following sample file: \starttext whatever \startluacode luatex.wrapup( function() local t = {} local pdf_file_name = tex.jobname..".pdf" local sha_pdf = utilities.sha2.hash256(io.loaddata(pdf_file_name)) local c_r = environment.currentrun t[c_r] = sha_pdf local exists_pdf = ("%s_%s-%s.pdf"):format(c_r-1, tex.jobname, t[c_r-1]) if io.exists(exists_pdf) then os.remove(exists_pdf) end os.rename(pdf_file_name, ("%s_%s-%s.pdf"):format(c_r, tex.jobname, sha_pdf)) end ) \stopluacode \stoptext In short, it adds its SHA256 to the final filename. Since renames the PDF document in each run, I would like to remove the output from the previous run. The table seems not to store the value from a previous run. I see now that I am creating it again with each run. Is there any way to check if compilation needs any other run? Many thanks for your help, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: Sorry for once more asking, i am at Work
On 2/20/24 19:03, Gavin via ntg-context wrote: > […] > I don’t know how you are calling PdfLaTeX to typeset your document, > context-test.tex, but that is what you are doing. Hi Uschi and Gavin, I will try to go the same way you propose, Gavin. Otherwise, Uschi may find it hard to follow totally independent suggestions. Uschi, if you are compiling your ConTeXt sources using WinEdt, your issue might be the wrong button (or the wrong keystroke combination). You might be invoking pdflatex directly, or maybe a button or keystroke combination is labelled ConTeXt and it may really be invoking pdflatex. In that case, you have to check WinEdt to see which command is run when you start the compilation process (which command you really invoke). Another way to see which ConTeXt binary you invoke would be to type in the command prompt "context --version" (with no path specified) and "where context". But this is independent from the issue that you get pdflatex when you intend context. I hope it helps now, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: Sorry for once more asking, i am at Work
On 2/20/24 14:45, Ursula Hermann wrote: > Dear Pablo, Dear List > > I have done all you told me yesterday. > > What I do not understand is that the Diagnosis in WinEdt 11 says, > that everything is ok. Also the PDF-Viewer. Sorry, but I can't copy > it, so I tell what I see. What I do not understand, because there is > no PDF Sorry, dear Uschi, but I’m afraid that I’m on Linux and WinEdt is totally unknown to me. That being said, if the messages from your computer are in German, there is no problem with the language (after all, https://www.deepl.com/ is an option too). Reading your log (which I simply ignored and Gavin took care to read it [totally my fault]), the first line you get is: This is pdfTeX, Version 3.141592653-2.6-1.40.25 (TeX Live 2023) (preloaded format=pdflatex 2024.2.6) 19 FEB 2024 12:41 The engine you are using is pdfTeX (from TeX Live 2023). In ConTeXt terms, this is almost ancient (»uralt«). ConTeXt MkII used pdfTeX as engine. In MkIV, the engine is LuaTeX. The latest engine is LuaMetaTeX for what is named either LMTX or MkXL. The format file is for pdfLaTeX, so ConTeXt cannot really do anything with it. It is consistent that ConTeXt complains about not finding the format file. > But now I tried to do what you have told me and the last line, Pablo > in cmd.exe says the same, what I get, if I compile: no format five > given, quitting. If you still happen to have the brand new installation on your desktop (and "test-doc.tex" [sorry, but redo if required]), open the command prompt and do the following: cd %USERPROFILE%\Desktop set PATH=%USERPROFILE%\Desktop\context\tex\texmf-mswin\bin For that window (or session), your system will be able to find only the path to the latest ConTeXt. This will prevent TeX Live 2023 messing with ConTeXt (well, if system-wide paths are not set for TeX Live [you might check that with "echo %PATH%" after setting the path as explained in the previous command]). After that, you may run: mtxrun --generate && context test-doc.tex If this works, the installation of TeX Live seems to set paths in a way that prevent ConTeXt to work. In that case, you would have to ask about that on the TeX Live list. I hope it helps now, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: Sorry for once more asking, i am at Work
On 2/19/24 13:06, Ursula Hermann wrote: > Dear List, > > I have done the new download at Work. After compiling is always the same: > > Command Line: context.exe --synctex=-1 "context-test.tex" > […] > startup error : no format file given, quitting Dear Uschi, it is really hard to know what is wrong with your installation (other than it ConTeXt is not able to find your format file). Sorry if this message is painfully verbose, but I will try not to take anything for granted (so I don’t overlook anything relevant). Could you save a new "test-doc.tex" file in your desktop directory (which would be named "%USERPROFILE%\Desktop\test-doc.tex" [including its full path])? "%USERPROFILE%\Desktop\test-doc.tex" should contain: \starttext \input zapf \stoptext Please, compile it by simply invoking ("cd %USEPROFILE%\Desktop\" might be required before): context test-doc If you get the same error message: > startup error : no format file given, quitting You might try (to make the format file): context --make --all Then, try compiling again (run "context test-doc"). If you get the same error message, let’s try a brand-new installation (not removing any existing one). Get http://lmtx.pragma-ade.nl/install-lmtx/context-mswin.zip (if you use Windows 32bt) or http://lmtx.pragma-ade.nl/install-lmtx/context-win64.zip (for Windows 64bit) into "%USERPROFILE%\Desktop\". Unzip the downloaded file to a newly created folder in your desktop ("%USERPROFILE%\Desktop\context"). Double-click on "install.bat" that you just uncompressed. You have to add the new path, so that Windows may find your executables. Open a new terminal (I guess it is called “command prompt” [or »Eingabeaufforderung«] in Windows-parlance) and paste (if you have ConTeXt for 32bit): set PATH=%PATH%;%USERPROFILE%\Desktop\context\tex\texmf-mswin\bin Or this (if you use ConTeXt for 64bit): set PATH=%PATH%;%USERPROFILE%\Desktop\context\tex\texmf-win64\bin Then, on the same window (since this only sets paths for the current session), run: mtxrun --generate && cd %USERPROFILE%\Desktop\ && context test-doc.tex Just in case you wonder, the first command is required for any brand-new install. The second command sets the desktop as your current directory (where you should have "test.doc.tex"). And the third command compiles that source document. If none of all my previous suggestions works, sorry but I cannot figure out what might be preventing ConTeXt from finding the format files. Just in case it might help, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] /AFRelationship for attachments
Dear list, the new lpdf-wid.lmt contains in lines 302 and 377: local relation = specification.relation or "Unspecified" AFRelationship = pdfconstant(relation), The following sample compiled with current latest: \setupinteraction[state=start] \starttext attachment\attachment[method=hidden, relation=Data, file=xml-mkiv.pdf] \stoptext Gives the following object: 2 0 obj << /AFRelationship /Unspecified /EF << /F 1 0 R >> /F (xml-mkiv.pdf) /Type /Filespec /UF >> endobj Sorry, but which is the right way to specify the /AFRelationship for embedded documents? Many thanks for your help, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: OT: interview with John Warnock
On 2/6/24 14:04, Henning Hraban Ramm wrote: > Hi, I came across this interview with John Warnock (founder of Adobe and > developer of PostScript): > > https://archive.computerhistory.org/resources/access/text/2023/08/102738759-05-01-acc.pdf Many thanks for the reference, Hraban. This is the first part of the interview, which has a second part in: https://archive.computerhistory.org/resources/access/text/2023/08/102738854-05-01-acc.pdf Videos for both (almost five hours in total) are available at https://invidio.us/fB6UvJLKkWI https://invidio.us/mNhzjz3PhK4; Many thanks again, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: Square right aligned
On 2/8/24 22:37, Otared Kavian wrote: > Hi Ursula, > > I think you mean the so-called end of the proof sign, or QED (Quod Erat > Demonstrandum). You can use this: > > \definesymbol[QED][\mathematics{\square}] > \def\qed{\wordright{\symbol[QED]}} > \starttext > This is the end of our proof. \qed > \stoptext > > In principle it is included in ConTeXt, but it seems that in the latest > version I have (2024.01.23), the command \qed is broken. Hi Otared, \qed seems to have been disabled (line 988 in strc-con.mklx). Functionality seems to have been enabled in \QED (line 45 in math-mis.mkxl). Just in case it might help, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: distance in \setupinitial
On 2/9/24 09:53, Thomas Meyer wrote: > Hi folks, > > if I understand it correct it is not necessary to set default parameters. > In my example it is a difference to set it or not (distance=0pt should > be default): Hi Thomas, the default (as per line 65 in typo-drp.mkxl) is .125\emwidth. This is the reason why your results differ with distance set to 0pt. Just in case it helps, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: \framed{\externalfigure} vs \externalfigure[frame=on]
On 1/27/24 17:44, Jim wrote: > The wiki page for \setupexternalfigure says > "Show frame around image. Most(?) options of \setupframed are usable!" Hi Jim, I’m afraid that this is a too generous statement. https://www.pragma-ade.com/general/qrcs/setup-en.pdf#page=218 shows which keys and values \setupexternalfigure allows. > I tried to put a frame around a picture (using \externalfigure with > frame=on) but I didn't get the frame to play nicely (see example below). I > can get the frame where I want it if instead I do > \framed[frame=on,...]{\externalfigure...} > but this leaves me wondering whether > (1) I am misinterpreting the wiki pages, > (2) The wiki pages are misleading/wrong, or I would say, that the offset and frameoffset don’t seem to be available in \setupexternalfigure. > (3) There is a bug in some code. > > If anyone would care to enlighten me, I would appreciate it. > > In particular, the offset=... option of \externalfigure does not seem to be > consistent with the offset=... option of \framed. I hope it is clear now. > Here is the example... one and all should be able to directly run it, but > the text above and below each picture may make the issues clear without > having to run the code. (The result I was looking for is the second figure > in this example.) To get offset in the frame of the image, you need a different frame from the external figure itself (or so it seems). I hope it helps, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: Section number in the margin and the section title followed by paragraph!
On 1/27/24 17:40, Ali Ali wrote: > Thanks, those seems close to what I wanted but not exactly. > > The ASCII graphic (better in typewriter font) may explain what I desired, > ``` > text width > |<>| > > ##. SECTION TITLE paragraph > ... > . > > |<-->| > margin > ``` > I wanted paragraph to begin on the same line the section title lies. Hi Ali, from what I understand, you need both alternative=inmargin (or margin) and alternative=text. I’m afraid they are mutually exclusive alternative modes. Just in case it might help, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: upload
On 1/20/24 09:38, Hans Hagen via ntg-context wrote: > On 1/19/2024 6:34 PM, Pablo Rodriguez via ntg-context wrote: >> [...] >> I get a 404 error for both https://www.pragma-ade.nl/install.htm and >> https://www.pragma-ade.com/install.htm. >> [...] > can you try again? Many thanks for the fast fix, Hans. Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: upload
On 1/18/24 20:43, Denis Maier via ntg-context wrote: >> *Von:*Alain Delmotte >> *Gesendet:* Donnerstag, 18. Januar 2024 20:04 >> *An:* ntg-context@ntg.nl >> *Betreff:* [NTG-context] Re: upload >> [...] >> When I go to https://www.pragma-ade.nl, I get an 404 Not Found >> message, so I can't download the new upload !! > > Works here. Hi Denis, I get a 404 error for both https://www.pragma-ade.nl/install.htm and https://www.pragma-ade.com/install.htm. I can update my existing installed version, but I wouldn’t be able to install a brand new distribution. Do you reach any of the urls included in my first paragraph? Many thanks for your help, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: Why LuaMetaTex is so slow?
On 1/18/24 18:24, Shiv Shankar Dayal wrote: > I can process TeXBook in almost an instant using PDFTeX which is about > 450+ pages but my math book takes around 30 seconds averaging ~40 > pages/second. Hi Shiv Shankar Dayal, I guess that “The TeXbook” (having been written by Knuth himself) may be optimized for speed. Your math book may use features (I’m guessing again) that require more resources than the features used by “The TeXbook”. > Why LuaMetaTeX is so slow? How can I speed it up? https://www.pragma-ade.com/general/manuals/musings.pdf#page=96 might explain why Lua(Meta)TeX is slower. Other chapters in that document from Hans might give you some insight on the reasons why LMTX has to pay a price for being more feature-rich. I got such impression when I read it. Just in case it might help, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] scaling tweaked fonts
Hi Hans, I have the following sample which behaves differently after latest from 2023.09.26 18:19: \definetweakedfont[wider][xscale=1075] \starttext \startTEXpage[align=center] \contextversion\\ \wider \contextversion \stopTEXpage \stoptext Up to that version, no scaling was 1000, after that one no scaling became 1. This should be the reason behind my previous issue about too large sizes in the first latest from 2024 (https://mailman.ntg.nl/archives/list/ntg-context@ntg.nl/thread/JVB7AWJE53NW4AAE3ODUQN6GB34IBO5X/). I just want to confirm that this change was intended. Many thanks for your help, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: issue with fonts in current latest (2024.01.08 11:23)
On 1/15/24 21:43, Mikael Sundqvist wrote: > Hi, > > Try this: > […] > \definebodyfontenvironment[16pt] > […] > Maybe some check will be added. (On the chat with Hans...) Many thanks for your help, Mikael. Your hint solved the issue and having a check that avoids the reported issue. BTW, I’m afraid I find too many issues with fonts in current latest, I need to investigate them further (in order to be able to report them). Many thanks for your help again, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] issue with fonts in current latest (2024.01.08 11:23)
Dear list, I have the following sample: \definefontfamily[mainface][rm][TeX Gyre Pagella] \definefontfamily[coverface][rm][TeX Gyre Termes] \setupbodyfont[mainface, 16pt] \starttext \startmakeup[standard][style=\bf] \switchtobodyfont[coverface] This is a cover. \stopmakeup This is text. \stoptext Compiling the sample with current latest (2024.01.08 11:23), LMTX puts Latin Modern Roman (no bold) and MkIV puts Termes (no bold). The results with previous latest (2023.09.26 18:19), cover is in Termes bold with LMTX and in Termes regular with MkIV. I guess there might be an issue here. Could anyone confirm this? Many thanks for your help, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] too large dimension in current latest
Hi Hans, after updating to current latest (2024.01.08 11:23), I get the following error. This is triggered when compiling XML sources (with extra environment files), so it is not easy to get a minimal sample file. I wonder whehter the message itself could reveal what may be wrong here. Many thanks for your help, Pablo tex error > tex error on line 36 in file : Dimension too large \emwidth \hyphenatedurl #1->\dontleavehmode \begingroup \expand \everyhyphenatedurl \normallanguage \zerocount \scratchskipone \zeropoint \s!plus \dimexpr \emwidth /12\s!minus \dimexpr \emwidth /24\relax \scratchskiptwo \zeropoint \s!plus \dimexpr \emwidth /48\s!minus \dime ...\strutdp \relax \setlocationattributes \setstrut \global \lastsavedreferenceattribute \lastreferenceattribute \c_attr_reference \lastreferenceattribute \dostarttagged \t!link \empty \urlstyle {\hyphenatedurl {\xmlflush {main::154}} }\dostoptagged \firstoftwoarguments #1#-->#1 \strc_references_goto ...rrentreferencehtdp \strutht \strutdp \relax \setlocationattributes \setstrut \global \lastsavedreferenceattribute \lastreferenceattribute \c_attr_reference \lastreferenceattribute \dostarttagged \t!link \empty #1\dostoptagged }{#1} \else #1\fi \ ... \mypersonalurl #1#2->\bgroup \goto {\urlstyle {\hyphenatedurl {#2}}}[url(#1)] \egroup {} ... I can't work with sizes bigger than about 19 feet (45 Theodores as of 2023), 575 centimeters, 2300 Toves, 230 Ediths or 16383 points. Continue and I'll use the largest value I can. mtx-context | fatal error: return code: 1 ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] issue with \setuptyping (and XML sources)
Dear list, the issue I’m experiencing comes from XML sources typeset with ConTeXt. I have tried, but I found no way to get a minimal sample. For code fragments in the XML source, I use: \bgroup\xmlprettyprinttext{#1}{none}\egroup To which I apply: \setuptyping [style={\tt\wider}, margin=yes, align={right, broad}, blank={3*halfline}, before={\blank[3*halfline]}, after={\blank[3*halfline]}] Could anyone be so kind to explain me why the first three options from \setuptyping work (style, margin and alignment), and the other three don’t work at all? Sorry, I think it has to be a stupid mistake of mine (but I don’t know which one it might be). Many thanks for your help, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] install-modules script and git URLs
Hi Hraban and Taco, the install-modules script doesn’t allow .tar.gz as compression format to install modules. .tar.gz seems to be the compression format offered for modules that are uploaded using a git URL. Hraban explained in August that thee server could be configured to get .zip compression for modules in git checkout. Sorry, I know that you are both very busy, but could it be this issue fixed? Using git to upload module versions is way more easy than uploading .zip files. Many thanks for your help to both, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: QR Code
On 12/18/23 20:34, Henning Hraban Ramm wrote: > [...] > Are you using MkIV (LuaTeX) or LMTX (LuaMetaTeX)? Many thanks for your reply, Hraban. I understood my issue with your reply (I known, your answer is intended to Uschi). It is also in the sent file: Creator: LuaMetaTeX 2.10.11 20230908 + ConTeXt LMTX 2023.09.26 18:19 PDF Producer: LuaMetaTeX-2.10.11 > I guess a missing EPS means you load the MkIV version of the module, > probably because "m-zint". > > I can’t help with Windows; since Hans developed it on Windows, it should > work (but don’t ask me how). I will try to explain what I understand from this (intended for Uschi). Given that there are two modules (m-zint and zint), there are two options: 1. Either you use the LMTX module (\usemodule[zint]) and you need the Zint library (as explained in https://wiki.contextgarden.net/Barcodes#Zint_module). 2. Or you use the MkIV module (\usemodule[m-zint]) and you need the Zint binary installed and CMD should be able to invoke it (already knowing its past). You may have the Zint binary installed, ConTeXt may be generating the required EPS files, but either Inkscape is not installed (or its path is unknown to the system), or ConTeXt cannot simply find where the converted PDF versions of the zint images are. If I have the following source in testing-barcodes.tex: \usemodule[m-zint] \starttext \startTEXpage[offset=1dk] \barcode[alternative=isbnx, text=9783865419026, width=4cm] \stopTEXpage \stoptext ConTeXt compiles it generating to extra files (when compared to the pure zint module for LMTX only): zint-isbnx-fe90eda0e93cf020312eps m_k_i_v_zint-isbnx-fe90eda0e93cf020312_eps_c60ccda70ef.pdf (Removed some characters in strings so file names fit in a single line.) The first file is generated by the Zint binary itself. The second one is the automatic conversion (through Inkscape) that ConTeXt needs to embed EPS (and SVG) files in the final PDF document. If m_k_i_v_zint-*.pdf files are missing, the problem might be that Inkscape isn’t installed (or its path is unknown to the system). If also zint-*.eps files are missing, you should find where Zint is generating them. Just in case it might help, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: QR Code
On 12/18/23 17:05, Ursula Hermann wrote: > […] > I got what you see in the pdf. Hi Uschi, I‘m on Linux64 using LuaMetaTEx. Contrary to the explanation from https://wiki.contextgarden.net/Barcodes#Zint_module, I need the zint package installed on Fedora. I have safely removed the whole contents of tex/texmf-linux64/bin/lib/luametatex/lib/zint (actually, I removed tex/texmf-linux64/bin/lib). But if Zint is not installed on my system, I get a compilation error, not a simply not found error. My error message reads: sh: line 1: zint: command not found zint --barcode=isbnx --output= […] At least on Linux64, it seems that barcode generation with Zint requires its binary. For Windows, your ConTeXt distribution might be missing the library (as described in the wiki link provided). Just in case it might help, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: (again) wrong destination types?
On 12/5/23 00:21, Bruce Horrocks wrote: >> On 3 Dec 2023, at 15:26, Pablo Rodriguez via ntg-context wrote: >> […] >> My issue is that I cannot avoid having "page=name" for links to external >> documents, but this breaks footnotes and other special operation links. > > What are you using for links to external documents? If just a single > command such as \goto then you might be able to get away with defining a > wrapper (e.g. \myGoto) that does > \setupinteraction[state=start,page=name,focus=standard] then the \goto > command then \setupinteraction[state=start,page=fit,focus=standard] > afterwards. Many thanks for your reply, Bruce. The following code seems to solve my issues: \def\MyGoTo#1[#2]{\setupinteraction[state=start, style=, display=new, color=, contrastcolor=, page={auto,name}, focus=standard]% \goto{#1}[#2]} \setupinteraction[state=start, style=, display=new, color=, contrastcolor=, page={no}, focus=standard] I didn’t thought this issue would be so easy to be solved. Many thanks for your help, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: externalfigure crashed
On 12/4/23 20:44, Hans Hagen via ntg-context wrote: > On 12/4/2023 5:38 PM, Pablo Rodriguez via ntg-context wrote: >>> […] >> Does the above mean that ConTeXt will be able to sign PDF documents with >> digital certificates? > Well, that's what singing is, right? The problem is actually less in the > signing than in the certificates themselves. > > Basically one can sign (with some certificate) and then validate. Many thanks for your explanation, Hans. These are great news. I wonder whehter it would be feasible to extend this to use smart cards (through Firefox). Many thanks the new implementations, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: externalfigure crashed
On 11/24/23 18:16, Hans Hagen via ntg-context wrote: > […] > will do for now ... i can't upload a new installer .. pending the built; > the advantage is that i can do some experiments that would otherwise > break the current version (making compact font mode very close to > normal, pdf signing […] Sorry, Hans, if I am missing the point. Does the above mean that ConTeXt will be able to sign PDF documents with digital certificates? Many thanks for your help, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: marginwidths
On 11/22/23 18:03, Wolfgang Schuster wrote: > Hans van der Meer via ntg-context schrieb am 22.11.2023 um 15:45: >> But changing the width of the section in the middle is not changing. dr. van der Meer, your sample works for me if you add width=fit, such as in: \setuplayout[width=fit, leftmargin=6cm,rightmargin=10cm] \showframe \starttext \ConTeXt\space\contextversion\blank before the \type{\starttext}:\crlf \type{\setuplayout[leftmargin=6cm,rightmargin=10cm]}\crlf make no difference in displayed frame \showlayout \stoptext I wonder whether I might be missing something, since this option is not mentioned by Wolfgang. Just in case it might help, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: unwanted blank page
On 11/22/23 09:57, madiazm.eo...@gmail.com wrote: > Thanks a lot Pablo for your comments, I think my bad English did not > let me be clear. Sorry (also for my delay in answering), but it was totally my fault (I totally missed your point).. Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: (again) wrong destination types?
On 11/22/23 00:06, Bruce Horrocks wrote: > [...] > I changed your example to the following: > \setupinteraction[state=start, page=name, focus=standard] > \starttext > \input knuth \par > a\footnote{b} \par > \dorecurse{7}{\input knuth \par} > \stoptext Many thanks for your fast reply, Bruce. I wanted to reply much sooner, but it was really impossible for me. >From your explanation, the first link (body to footnote, your point b) has destination to fit the whole page inside the viewer. The second link (footnote to body, your point c) has the destination to reach a position inside the page (where the destination lies). This is what "focus=standard" should achieve. In PDF terms (simplified), fit to page destinations are /Fit destinations and placed destinations are /XYZ destinations. This sample shows what might be the root issue here: \setupinteraction[state=start, page=name, focus=standard] \starttext \completecontent \chapter{Chapter} a\footnote{b} \stoptext ConTeXt handles internally links in categories. For some reason unknown to me, "page=name" triggers that special operation links contain /Fit instead /XYZ destinations. This is similar to the wrong link destinations (fit instead of standard) from TOC (but not in footnotes [which are right]) when compiled with MkIV: \setupinteraction[state=start, focus=standard] \starttext \completecontent \chapter{Chapter} a\footnote{b} \stoptext I hope it is clearer now. Let me know if it is not. My issue is that I cannot avoid having "page=name" for links to external documents, but this breaks footnotes and other special operation links. Many thanks for your help, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] (again) wrong destination types?
Dear list, sorry for insisting, but this is important for my documents. I have the following sample: \setupinteraction[state=start, page=name, focus=standard] \starttext a\footnote{b} \stoptext If page is set to anything different than no in \setupinteractionscreen, focus=standard will not work (it will be used as focus=fit). Could anyone confirm the issue or explain me what I’m doing wrong? Many thanks for your help Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: unwanted blank page
On 11/19/23 23:34, madiazm.eo...@gmail.com wrote: > sorry if i dont get your problem right understood, but i'm completely > new to context. Hi Miguel, I’m afraid it isn’t entirely clear whether you intend to ask something or not. > I use a hack not to get the number not printed in the title page > (though I define sectionblocks for keeping different numbering systems > for the table of contents and the document) Section blocks are intended for that. Just a comment, if your cover (or title) page involves a one and only single page, you may use makeups, such as in: \starttext \startmakeup[standard][pagestate=start] \dorecurse{25}{\input knuth} \stopmakeup \stoptext My sample explicitly displays that makeups are intended for a single page. Since actual content for that makeup would fit in six pages without the makeup, it looks weird inside it. > I use \setuppagenumbering[location=] for not getting the number > printed and then I reset the page numbering for the next sections. I > copy my code so that you know what I do. > Sorry if it doesnt help If you are showing your code to list members, fine. Sorry, but if there is a question here, I’m afraid you need to be more explicit asking your question. Just some comments: > %% > %%% LOS BLOQUES % > %%% In a minimal sample, comments as the previous one don’t provide any clue to understand your code or the issue you might be dealing with. It is wiser to keep the sample to its minimal form. > \startsectionblock[portada] > \setuppagenumbering[location=] > \input{03_portadaEval.tex}%this is my title page It is better to provide actual content than a file name. BTW, if its contents cannot be in more than a single page, the approach suggested above might be easier. > \startfrontmatter[] Empty brackets are not required here. > \start > \setuplayout[re > \setupinterlinespace[.8ex] I would say that this is extremely small even for an "x" to fit in. Again, just in case it might help, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___