[NTG-context] Re: imposition: getting to the last page of a booklet
Pablo Rodriguez via ntg-context schrieb am 04.03.2024 um 20:00: 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 \ifcase command is the TeX version of a switch statement from other programming languages. The first case in \ifcase checks against zero which is shorter than writing "\ifnum ... = 0". The semicolon is also mysterious to me, I don’t know what it does there in plain language. The semicolon is a undocumented extension (I noticed it in the definition of \page[quadruple]) of \numexpr in Luametatex for the modulus operator. 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? 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. Sorry for asking that. I’m afraid this would be the only way I could get what \ifcase is doing there. As was mentioned above I used it as a check when the remainder was 0. begin example \startluacode --~ interfaces.implement { --~ name = "beforequadruplenumber", --~ arguments = "integer", --~ actions = function(n) --~ if n % 4 == 0 then --~ context(n + 3) --~ elseif n % 4 == 1 then --~ context(n + 2) --~ elseif n % 4 == 2 then --~ context(n + 1) --~ elseif n % 4 == 3 then --~ context(n + 4) --~ end --~ end --~ } --~ interfaces.implement { --~ name = "beforequadruplenumber", --~ arguments = "integer", --~ actions = function(n) --~ if (n + 1) % 4 == 0 then --~ context(n + 4) --~ else --~ context(n + 3 - n % 4) --~ end --~ end --~ } interfaces.implement { name = "beforequadruplenumber", arguments = "integer", actions = function(n) context(n + (((n + 1) % 4 == 0) and 4 or (3 - n % 4))) end } --~ interfaces.implement { --~ name = "afterquadruplenumber", --~ arguments = "integer", --~ actions = function(n) --~ if n % 4 == 0 then --~ context(n + 1) --~ elseif n % 4 == 1 then --~ context(n + 4) --~ elseif n % 4 == 2 then --~ context(n + 3) --~ elseif n % 4 == 3 then --~ context(n + 2) --~ end --~ end --~ } --~ interfaces.implement { --~ name = "afterquadruplenumber", --~ arguments = "integer", --~ actions = function(n) --~ if n % 4 == 0 then --~ context(n + 1) --~ else --~ context(n + 5 - n % 4) --~ end --~ end --~ } interfaces.implement { name = "afterquadruplenumber", arguments = "integer", actions = function(n) context(n + ((n % 4 == 0) and 1 or (5 - n % 4))) end } \stopluacode \unprotect \def\beforequadruplenumber#1{\clf_beforequadruplenumber\numexpr#1\relax} \def\afterquadruplenumber #1{\clf_afterquadruplenumber \numexpr#1\relax} \protect \starttext \dorecurse{20}{\recurselevel\space = \beforequadruplenumber{\recurselevel}\par}\page \dorecurse{20}{\recurselevel\space = \afterquadruplenumber {\recurselevel}\par} \stoptext end example Wolfgang ___ 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] How can I do this?
Dear List, I need a tip how to do this: In the command \definepapersize[Mybook] the height should be not 24 cm, but a little bit longer. My Problem is, as you can see on the PDF, that there are troubles with the Gray Background. The Gray Background should begin with : Mitunter. . I think it should be the topoffset, and the bottomoffset, but how many .\bodyfontsize should I try? Many thanks Uschi \mainlanguage[de] \definepapersize[MyBook][width=19cm,height=24cm] \setuppapersize[MyBook][MyBook] % Prints on paper the size of MyBook %\setuppapersize[MyBook][A4] %Would print MyBook-size pages on A4 paper \setupbodyfont[Times New Roman,12.55pt] \definemargindata [MyInMargin][inright] \definemarginframed[MyInMargin][topframe=on,bottomframe=on,rulethickness=1pt,width=1.90cm] \defineenumeration [theorem] [ text=Theorem, title=yes, width=fit, distance=0.2em, alternative=serried, ] \definetextbackground[GrayBackground][ location=paragraph, background=color, backgroundcolor=lightgray, leftoffset=.8\bodyfontsize, rightoffset=.8\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] \starttext \margintext {1.1.1} {\bf Beispiel 3.2.17 (Vertauschung von All- und Existenzquantor).} \par {\it Sei M die Menge aller Männer und F die Menge aller Frauen. Die Aus-\par sage h(m, f) sei ”m ist verliebt in f“. Unter diesen Voraussetzungen machen Sie sich die Bedeutung der beiden Aussagen klar.} \par \startitemize[n,packed,broad] \item \m{\forall m ∈ M : ∃f ∈ F : h(m, f)} \item ∃f ∈ F : ∀m ∈ M : h(m, f). \stopitemize \startGrayBackground \tf Mitunter ist es aus der Formulierung nur schwer zu erkennen, dass ein \m ∃\forall∀ oder ein \m \forall∀\m∃ versteckt ist. Dann ist es besonders wichtig, die Formulierung sehr lange zu prüfen und eventuell auch formalisiert noch einmal aufzuschreiben.” \blank \setupnarrower [left=0.80cm, right=0.80cm] \startnarrower[left, right] \definehspace[oneem][0.5em] Der\hspace[oneem] Wert\hspace[oneem] von\hspace[oneem] \m{y = f(x)} ist unabhängig von der Wahl\\ von \m{x\doubleprime} ist gleichbedeutend mit \m{∃y : ∀x : f(x) = y} \\ (Beutelspacher [10, S.54])\par \blank \stopnarrower \stopGrayBackground \blank \blackrule[color=black, height=0.10ex, width=13.50cm] \setupinteraction [state=start, color=blue] \reference[Regel:1]{3.1}\par {\bf Aufgabe 3.2.18} Formulieren Sie gemäß der Regel (\goto{3.1}[Regel:1]) äquivalent \startitemize[n,packed,broad] \item \m{\forall n \in \naturalnumbers\mtp{:} n^2 > n \implies n > 1},\item \m{\forall n \in \naturalnumbers\mtp{:} 3\divides n \implies 4 \divides n},\item \m{\forall n \in \naturalnumbers\mtp{:} n^3 \mtext{ ungerade }\nospace \implies n \mtext{ ungerade}}. \stopitemize \blackrule[color=black, height=0.10ex, width=13.50cm]\par {\bf Aufgabe 3.2.19} Bilden Sie die Verneinung der folgenden Aussagen: \startitemize[n,packed,broad] \item Alle Rosen sind verwelkt oder teuer. \item Alle rosen sind entweder verwelkt oder teuer. \stopitemize \par \usecolors[svg] \setupinteraction [state=start, contrastcolor=cornflowerblue] \reference[Abschnitt:1]{3.2.1.1} {\it Hinweis: Beachten Sie die Konvention aus Abschnitt \goto {3.2.1.1}[Abschnitt:1]die For-\par mulierung \quotation {entweder ... oder} entspricht dem ausschließenden Oder\par und die Formulierung \quotation{oder} dem (mathematischen) einschließenden\par Oder.\par \blackrule[color=black, height=0.10ex, width=13.50cm] Bruce.pdf Description: Bruce.pdf ___ 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: \showsymbolset is noop
Am 05.03.24 um 23:11 schrieb Wolfgang Schuster: Henning Hraban Ramm schrieb am 04.03.2024 um 21:24: The \showsymbolset has no output any more, apparently already for some time. I checked on COW (ConTeXt ver: 2022.12.22 22:17 LMTX fmt: 2022.12.23) and my local installation (ConTeXt ver: 2024.02.22 18:31 LMTX fmt: 2024.2.22). Can someone try on MkIV? """ \usesymbols[nav] \starttext \showsymbolset[nav] \stoptext """ You pass the wrong name to \showsymbolset. \usesymbols[nav] \starttext \showsymbolset[navigation 1]\page \showsymbolset[navigation 2]\page \showsymbolset[navigation 3]\page \stoptext Wolfgang Ah, thank you! I’ll fix the wiki. Apparently this used to work differently. To know which sets are included I must look into the sources, or is there another command? Hraban ___ 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: \showsymbolset is noop
Henning Hraban Ramm schrieb am 04.03.2024 um 21:24: The \showsymbolset has no output any more, apparently already for some time. I checked on COW (ConTeXt ver: 2022.12.22 22:17 LMTX fmt: 2022.12.23) and my local installation (ConTeXt ver: 2024.02.22 18:31 LMTX fmt: 2024.2.22). Can someone try on MkIV? """ \usesymbols[nav] \starttext \showsymbolset[nav] \stoptext """ You pass the wrong name to \showsymbolset. \usesymbols[nav] \starttext \showsymbolset[navigation 1]\page \showsymbolset[navigation 2]\page \showsymbolset[navigation 3]\page \stoptext Wolfgang ___ 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] \showsymbolset is noop
The \showsymbolset has no output any more, apparently already for some time. I checked on COW (ConTeXt ver: 2022.12.22 22:17 LMTX fmt: 2022.12.23) and my local installation (ConTeXt ver: 2024.02.22 18:31 LMTX fmt: 2024.2.22). Can someone try on MkIV? """ \usesymbols[nav] \starttext \showsymbolset[nav] \stoptext """ Hraban ___ 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] enhancing documentation: initials
Hi, I tried to figure out what the "method" parameter of \setupinitial does – it changes the handling of quotation marks at the beginning of the text. It’s defined in context/base/mkiv/typo-drp.lua But I found no difference between first, last, and none; just "auto" includes the mark in the initial, and it works only with a few languages, e.g. English and French, but not e.g. German or Dutch: """ \mainlanguage[de] \setuppapersize[A6] \setupinitial[n=2,color=orange,] \starttext \start \setupinitial[method=first] \placeinitial \quotation{Keine andere Kunst hat mehr Berechtigung, ihren Blick auf die zukünftigen Jahrhunderte zu richten als die Typographie.}\wordright{Giambattista Bodoni} \stop \start \setupinitial[method=last] \placeinitial \quotation{Nationalökonomie ist, wenn die Leute sich wundern, warum sie kein Geld haben.}\wordright{Kurt Tucholsky} \stop \start \setupinitial[method=auto] \placeinitial \quotation{Der Mensch wird auf natürlichem Wege hergestellt, doch empfindet er dies als unnatürlich und spricht nicht gern davon.}\wordright{Kurt Tucholsky} \stop \start \setupinitial[method=none] \placeinitial \quotation{Keine andere Kunst hat mehr Berechtigung, ihren Blick auf die zukünftigen Jahrhunderte zu richten als die Typographie.}\wordright{Giambattista Bodoni} \stop \stoptext """ ___ 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/3/2024 11:54 AM, Pablo Rodriguez via ntg-context wrote: 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? accumulating these effects is dependent on how the features that you use are defined 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: \definefontfeature[wide] [extend=2] \definefontfeature[wideslant][extend=2,slant=.2] \definefontfeature[widebold] [extend=2,weight=.1] \definefontfeature[wideboldslant][extend=2,weight=.1,slant=.2] \definefontfamily[mainface][rm][TeX Gyre Pagella] [tf={style:regular,features:{default,quality,wide}}, it={style:regular,features:{default,quality,wideslant}}, bf={style:regular,features:{default,quality,widebold}}, bi={style:regular,features:{default,quality,wideboldslant}}] \setupbodyfont [mainface,30pt] \starttext \startTEXpage[offset=1ex] a {\it a} {\bf a} {\bi a} \stopTEXpage \stoptext - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://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: Local alternative to \input
Hi, Aren’t environments used for setups (and not for textual content). Maybe a buffer may be what you want ? https://wiki.contextgarden.net/Command/startbuffer Best, Denis Von: Jeroen Gesendet: Montag, 4. März 2024 06:15 An: mailing list for ConTeXt users Betreff: [NTG-context] Re: Local alternative to \input With a single environment it seems to work, though when I expand it to multiple, it does not seem to work anymore \starttext SomeText \\ \environment aaa \\ SomeText \\ \environment bbb \\ SomeText \\ \startenvironment aaa \samplefile{lorem} \stopenvironment \startenvironment bbb \samplefile{tufte} \stopenvironment \stoptext Op do 4 jan 2024 om 20:14 schreef Henning Hraban Ramm mailto:te...@fiee.net> >: Am 04.01.24 um 18:00 schrieb Jeroen: > I just would like to have a lot of mark-up for combined figures and > tables etc moved out of the way, similar to this. I am loosing the > general documetn flow because of all this markup. Would there be a > construction similar to this: > > \starttext > > \environment foo > \environment bar > > \startenvironment foo > this is a lot of text > \stopenvironment > > \startenvironment bar > and this is another piece of text > \stopenvironment > > \stoptext An environment is a separate file. \environment is like \input with a few more checks, e.g. it loads the file only once. e.g. -- file "env_foo.tex" -- \startenvironment env_foo % settings \stopenvironment -- -- file document.tex -- \environment env_foo \starttext % whatever \stoptext -- Instead of the call within your document, you can also call context --environment=env_foo.tex document (Usually that makes only sense in XML workflows.) Hraban ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl <mailto: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 ___ ___ 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/2024 1:46 PM, Pablo Rodriguez via ntg-context wrote: 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? You're missing the fact that the font has an issue. I can add a workaround, assuming that (as often) issues become features. Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://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: Local alternative to \input
With a single environment it seems to work, though when I expand it to multiple, it does not seem to work anymore \starttext SomeText \\ \environment aaa \\ SomeText \\ \environment bbb \\ SomeText \\ \startenvironment aaa \samplefile{lorem} \stopenvironment \startenvironment bbb \samplefile{tufte} \stopenvironment \stoptext Op do 4 jan 2024 om 20:14 schreef Henning Hraban Ramm : > Am 04.01.24 um 18:00 schrieb Jeroen: > > I just would like to have a lot of mark-up for combined figures and > > tables etc moved out of the way, similar to this. I am loosing the > > general documetn flow because of all this markup. Would there be a > > construction similar to this: > > > > \starttext > > > > \environment foo > > \environment bar > > > > \startenvironment foo > > this is a lot of text > > \stopenvironment > > > > \startenvironment bar > > and this is another piece of text > > \stopenvironment > > > > \stoptext > > An environment is a separate file. > \environment is like \input with a few more checks, e.g. it loads the > file only once. > > e.g. > > -- file "env_foo.tex" -- > \startenvironment env_foo > % settings > \stopenvironment > -- > > > -- file document.tex -- > \environment env_foo > > \starttext > % whatever > \stoptext > -- > > Instead of the call within your document, you can also call > > context --environment=env_foo.tex document > > (Usually that makes only sense in XML workflows.) > > Hraban > > ___ > 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 > > ___ > ___ 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: Japanese
Emanuel Han schrieb am 01.03.2024 um 16:23: Dear Wolfgang, thank you for your valuable remarks. I integrated them, see corrected attached example. Yes, correct layout examples exist. They're all showing vertical writing, but the rules and principles are exactly the same for horizontal writing. * position of the headers and footers: https://www.w3.org/TR/jlreq/#fig1_30 See my attached gongitsune.tex example how you can squeeze text in a very narrow header/footer. * aligning lines to the text box: https://www.w3.org/TR/jlreq/#fig1_3 You can use the lines key for \setuplayout to let ConTeXt calculate the necessary value for the text height. * protrusion of ruby: https://www.w3.org/TR/jlreq/#fig_ad1_6 You're getting this for free because ruby text doesn't take up vertical space, in case vertical text is working it would now stick into the margins as expected. \starttext \ruledhbox{a \ruby{x}{y} b} \stoptext In my previous mail, I wrote wrong amounts of lines. They should be 46 lines on one page, while the actual example doesn't show the 46th line. It would be important to identify the reason why only 24 characters are used to create a line when 25 could be used. Then we can develop a method to turn that mechanism off or circumvent it. Quotation from https://www.w3.org/TR/jlreq: /In principle, when composing a line with //ideographic (cl-19) <https://www.w3.org/TR/jlreq/#cl-19>//, //hiragana (cl-15) <https://www.w3.org/TR/jlreq/#cl-15>// and //katakana (cl-16) <https://www.w3.org/TR/jlreq/#cl-16>// characters, no extra spacing appears between their //character frame <https://www.w3.org/TR/jlreq/#term.character-frame>//. This is called solid setting (see //Figure 5 <https://www.w3.org/TR/jlreq/#fig1_8>//)./ 1. ConTeXt has a mechanism to typeset Japanese texts. 2. There are flaws in the output it produces but this nothing which can't be fixed. 3. To fix the problems someone has to be passionate to fix them and we're willing to help here. As you can see in my second example file japanese.tex there is a font feature to create half sized parentheses etc. which isn't supported yet by ConTeXt's mechanism for japanese and in case your willing to improve it this should be taken care of as well. Wolfgang \definefontfeature [halt] [halt=yes] \starttext \setscript[nihongo] \begingroup \showmakeup[glyph,fontkern] % \startfont[file:notosanscjkjpregular*default]「うわアぬすと狐め」と、どなりたてました。\stopfont % % \startfont[file:notosanscjkjpregular*default]「「うわアぬすと狐め」と、「どなりたてました」。\stopfont % % \startfont[file:notosanscjkjpregular*default,halt]「うわアぬすと狐め」と、どなりたてました。\stopfont % % \startfont[file:notosanscjkjpregular*default,halt]「「うわアぬすと狐め」と、「どなりたてました」。\stopfont \startfont[name:notosansjpregular*default]「うわアぬすと狐め」と、どなりたてました。\stopfont \startfont[name:notosansjpregular*default]「「うわアぬすと狐め」と、「どなりたてました」。\stopfont \startfont[name:notosansjpregular*default,halt]「うわアぬすと狐め」と、どなりたてました。\stopfont \startfont[name:notosansjpregular*default,halt]「「うわアぬすと狐め」と、「どなりたてました」。\stopfont \endgroup \stoptext % \definefontfeature [fixeddimensions] [dimensions={1,1.8,0}] % % \definefontfamily [noto_japanese] [rm] [Noto Serif CJK JP] [features={default,fullprotrusion,fixeddimensions}] % \definefontfamily [noto_japanese] [ss] [Noto Sans CJK JP] [features={default,fullprotrusion,fixeddimensions}] % \definefontfamily [noto_japanese] [rm] [Noto Serif CJK JP] [features={default,fullprotrusion}] % \definefontfamily [noto_japanese] [ss] [Noto Sans CJK JP] [features={default,fullprotrusion}] \definefontfamily [noto_japanese] [rm] [Noto Serif JP] [features={default,fullprotrusion}] \definefontfamily [noto_japanese] [ss] [Noto Sans JP] [features={default,fullprotrusion}] \setupbodyfont [noto_japanese] \setscript [nihongo] \setupalign [hanging] \setupindenting [yes,1em] \setupinterlinespace [line=2\bodyfontsize, height=0.9, depth=0.1] \setupruby [style={\switchtobodyfont[6pt]}] \setuppagenumbering [alternative=doublesided, location=none] \setuphead [title,subject] [align=middle] \startsetups [header:rightpage] \startframed [ frame=off, strut=no, height=\headerheight, offset=none, align=low, roffset=1em, ] \getmarking[subject] \stopframed \stopsetups \startsetups [header:leftpage] \startframed [ frame=off, strut=no, height=\headerheight, offset=none, align=low, loffset=1em, ] \getmarking[title] \stopframed \stopsetups \startsetups [footer:rightpage] \startframed [ frame=off, strut=no, height=\headerheight, offset=none, align=low, roffset=1em, ] \prefixedpagenumber \stopframed \stopsetups \startsetups [footer:leftpage] \startframed [ frame=off, strut=no, height=\headerheight, offset=none, ali
[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] Wiki page : Mixed languages sample (French, Ancient Greek, Arabic, Chinese)
Dear List, Several years ago I tried to write documents, mainly lectures, but also essays, in which I tried to make several languages (Romance and non-Romance) coexist. Here below is an example of an attempt to compose an acceptable document, in the form of an exercise in which Arabic and Chinese are introduced into a document written in French. With footnotes and a few framed lines. I submit this example for your perusal and ask you whether it could possibly appear on a wiki page devoted to the combination of non-European languages in the same text. In English translation, of course. %We are giving below an example of a text written in a Latin language, in which we want to print here and there some text in ancient Greek, Arabic and Chinese. \setuplanguage[fr][patterns={fr,agr}] \mainlanguage[fr] \setuplayout [backspace=40mm] \setuppagenumbering[alternative=doublesided, location={header, inmargin}] \setupmargindata[inmargin][location=inner, style={\ssx\setupinterlinespace[line=2.8ex]}] \setupmarginframed[inmargin][align=right] \setupbodyfontenvironment[default][em=italic] % Use Theano Didot as Ancient Greek font \definefallbackfamily[mainface][serif][Theano Didot][preset=range:greek, it={Old Standard Italic}, force=yes] % Choose between Ipaexmincho font and NotoSansTC (Traditional Chinese) %\definefallbackfamily [mainface] [rm] [ipaexmincho] [range=cjkunifiedideographs] \definefallbackfamily [mainface] [rm] [notosanstc] [range=cjkunifiedideographs] % Choose between two Arabic fonts %\definefallbackfamily[mainface] [serif] [nafeesnastaleeq] [range=arabic] \definefallbackfamily[mainface] [serif] [hussaininastaleeq] [range=arabic] \definefontfamily [mainface] [serif] [GaramondNo8][sc=NewG8 Regular SC] \definefontfamily [mainface] [sans] [FreeSans] [rscale=0.7] \definefontfamily[mainface] [serif] [GFS Didot] \setupbodyfont[mainface] \setupindenting[1.5em] \setupindenting[yes] \setupcolors[state=start] \defineframedtext [MyFrame] [before={\blank}, after={\blank}, frame=off, background=MyFrame, %width=\textwidth, width=max, height=fit, style=italic] \definelabel [Définition] [headstyle=\bf\smallcaps] \startuseMPgraphic{MyFrame} path b; picture p; %p := textext.rt("\white\Définition"); p := textext.rt("\white\framedtextparameter{Title}"); %p := textext.rt("\white\getvariable{text}{text1}"); p := p shifted (2BodyFontSize,OverlayHeight-ypart center p+.25ExHeight); b := boundingbox p leftenlarged .5EmWidth rightenlarged .5EmWidth; fill OverlayBox withcolor lightgray; %\MPcolor{ fill b withcolor darkred; draw bottomboundary OverlayBox withpen pencircle scaled 1pt withcolor darkred; draw topboundary OverlayBox withpen pencircle scaled 1pt withcolor darkred; draw p; setbounds currentpicture to boundingbox currentpicture enlarged 2mm; \stopuseMPgraphic \defineoverlay [MyFrame] [\useMPgraphic{MyFrame}] \setupwhitespace[medium] \setupinterlinespace[line=3.2ex] \setupitemize[each][margin=yes] \setuphead[title][header=empty] \setupheader[style={\sc}] \setupfooter[style={\itxx}] \setupheadertexts[Utilisation de plusieurs langues dans un même texte avec \ConTeXt][][][{\getmarking[section]}] \setupfootertexts[][][][© J.-P. Delange, 2016 — La reproduction de ce texte est soumise à autorisation.] \defineparagraphs[TwoColumns][n=2, align={hz, hanging}] \setupparagraphs[TwoColumns][1][width=210pt, style=rm, align=left] \starttext \title{\ConTeXt, ou comment imprimer des langues non-romanes} \section {\sc Préambule} Lorsqu'il s'agit de proposer un document dans une langue nationale (le français), tout va bien. Lorsqu'il s'agit de rédiger en français un document un peu complexe, avec des citations — ou des références — dans une autre langue, qui en particulier n'a pas les mêmes exigences que le français, ni les mêmes {\em signes diacritiques} on se heurte à quelques difficultés. Les suites logicielles comme Microsoft Office ou LibreOffice ne manquent pas de puissance, mais à vrai dire, dès que nous entrons dans les exigences de l'édition professionnelle, qui consistent à présenter un texte lisible et enrichi (en notes, etc.), la situation devient vite techniquement assez pénible. La situation la plus courante que nous rencontrons dans les Lettres, en Philosophie, en Histoire, et plus généralement dans les Humanités, est celle d'un texte dans lequel il y a des citations d'auteurs grecs ou latin, avec des références en notes de bas de page, qui contiennent du grec. Cela pourrait être quelque chose comme ceci : \blank\startnarrower[1*left,1*right]\tfx\setupinterlinespace \noindent \quotation{Ἔφη γάρ οἱ Σωκράτη ἐντυχεῖν λελουμένον τε καὶ τὰς βλαύτας ὑποδεδεμένον, ἃ ἐκεῖνος ὀλιγάκις ἐποίει· καὶ ἐρέσθαι αὐτὸν ὅποι ἴοι οὕτω καλὸς γεγενημένος. καὶ τὸν εἰπεῖν ὅτι· Ἐπὶ δεῖπνον εἰς Ἀγάθωνος. χθὲς γὰρ αὐτὸν διέφυγον τοῖς ἐπινικίοις, φοβηθεὶς τὸν ὄχ
[NTG-context] Re: A new problem with space in third itemize
Dear Mikael, Many Thanks, works perfect. Many Regards Uschi Von: Mikael Sundqvist Gesendet: Donnerstag, 29. Februar 2024 16:45:03 An: mailing list for ConTeXt users Betreff: [NTG-context] Re: A new problem with space in third itemize Hi Uschi, Your coding style is interesting. I do not understand the purpose of the \it for example. I did put something together that you can try, but I don't know if this is what you are looking for. \starttext \startitemize[n] \startitem \m{\forall n \in \naturalnumbers\mtp{:} n^2 > n \implies n > 1}, \stopitem \startitem \m{\forall n \in \naturalnumbers\mtp{:} 3\divides n \implies 4 \divides n}, \stopitem \startitem \m{\forall n \in \naturalnumbers\mtp{:} n^3 \mtext{ ungerade } \implies n \mtext{ ungerade}}. \stopitem \stopitemize \stoptext To quote Pablo, I hope it helps. /Mikael On Thu, Feb 29, 2024 at 4:10 PM Ursula Hermann wrote: > > Dear List, > > > This is my little example: the problem is, that everything was fine, in > itemize 1 and 2. In the third itemize i have a problem, because after n^3 > and after \Rightarrow there should be a spaace , if I want to write : > \Rightarrow n ungerade, but it says nungerade, what I dont want,. > > > \startitemize[n] > {\it \item \m{\forall n ∈ \naturalnumbers:n^2 >n\Rightarrow>1,\par}\nospace > \par \item \m{\forall n ∈ \naturalnumbers:3\mid n\Rightarrow 4 \mid n,\par} > \nospace > \par \item \m{\forall n ∈ \naturalnumbers:n^3 ungerade \Rightarrow n > ungerade \par} > > Uschi > > ___ > 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 > ___ ___ 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 ___ ___ 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: A new problem with space in third itemize
Hi Uschi, Your coding style is interesting. I do not understand the purpose of the \it for example. I did put something together that you can try, but I don't know if this is what you are looking for. \starttext \startitemize[n] \startitem \m{\forall n \in \naturalnumbers\mtp{:} n^2 > n \implies n > 1}, \stopitem \startitem \m{\forall n \in \naturalnumbers\mtp{:} 3\divides n \implies 4 \divides n}, \stopitem \startitem \m{\forall n \in \naturalnumbers\mtp{:} n^3 \mtext{ ungerade } \implies n \mtext{ ungerade}}. \stopitem \stopitemize \stoptext To quote Pablo, I hope it helps. /Mikael On Thu, Feb 29, 2024 at 4:10 PM Ursula Hermann wrote: > > Dear List, > > > This is my little example: the problem is, that everything was fine, in > itemize 1 and 2. In the third itemize i have a problem, because after n^3 > and after \Rightarrow there should be a spaace , if I want to write : > \Rightarrow n ungerade, but it says nungerade, what I dont want,. > > > \startitemize[n] > {\it \item \m{\forall n ∈ \naturalnumbers:n^2 >n\Rightarrow>1,\par}\nospace > \par \item \m{\forall n ∈ \naturalnumbers:3\mid n\Rightarrow 4 \mid n,\par} > \nospace > \par \item \m{\forall n ∈ \naturalnumbers:n^3 ungerade \Rightarrow n > ungerade \par} > > Uschi > > ___ > 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 > ___ ___ 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: Japanese
e standard line gap which is provided by ConTeXt, which is > equivalent to \setupwhitespace[0pt]. Even when using ruby, it works well. I > found the best voffset for ruby to be -1.7ex. > > The line adjustment provided by ConTeXt by default is not meeting the needs > for Japanese (and Chinese) text, which follow a grid pattern. Especially the > last line of a paragraph is squeezed, which is "hurting the eye". > > When characters need to jump to the next line due to previously discussed > line breaking rules, ConTeXt seems to apply "Line adjustment by > inter-character spacing expansion", which is a valid method according to > https://www.w3.org/TR/jlreq/#line_adjustment , although "Line adjustment by > inter-character spacing reduction" is preferred. > > The last point which ConTeXt is missing, when talking about Japanese > typesetting, is vertical writing. > > I know, this is a lot of work. Hopefully we can achieve with joint efforts to > make ConTeXt Japanese ready. > > If I happen to have made false statements, please accept my apology. I tried > to be of help as far as I could. I grew up in Japan and know more or less how > typeset text should look like. > > Emanuel > > On Feb. 28 2024, at 7:44 pm, Jean-Pierre Delange wrote: > Hi Hraban ! > > I also used to write this, if the main language is European : > > \definefallbackfamily [mainface] [rm] [ipamincho] > [range=cjkunifiedideographs] > > Hope this is useful anymore, > > JP > > Le 28/02/2024 à 18:34, Henning Hraban Ramm a écrit : > > Am 28.02.24 um 08:34 schrieb Otared Kavian: > >> Dear Dalyoung, > >> > >> Thank you very much for your insight. I downloaded the Noto Serif JP > >> fonts and set up a fontfamily as you indicated, by adding > >> \setscript[nihongo] > >> which solves a problem I had with line breakings. And everything > >> works smoothly! > >> > >> So, for the mail archive, here is what I have and what works fine: > >> > >> %%% Noto Fonts > >> > >> \definefontfamily[JapaneseFont][rm][Noto Serif JP] > >>[ it={style:regular,features:{*,slanted}}, > >>sl={style:regular,features:{*,slanted}}, > >>bi={style:bold,features:{*,slanted}},force=yes] > >> > >> \definefontfamily[JapaneseFont][ss][Noto Serif JP] > >>[ it={style:regular,features:{*,slanted}}, > >>sl={style:regular,features:{*,slanted}}, > >>bi={style:bold,features:{*,slanted}},force=yes] > >> > >> \definefontfamily[JapaneseFont][tt][Noto Serif JP] > >>[ it={style:regular,features:{*,slanted}}, > >>sl={style:regular,features:{*,slanted}}, > >>bi={style:bold,features:{*,slanted}},force=yes] > >> > >> \definefontfamily[JapaneseFont][math][Tex Gyre Termes Math] > >> %\definefontfamily[JapaneseFont][math][Tex Gyre Pagella Math] > >> %\definefontfamily[JapaneseFont][math][Tex Gyre Aventor] > >> > >> > >> > >> \setupbodyfont[JapaneseFont,12pt] > >> \setupruby[location=top,voffset=-2ex] > >> \setupwhitespace[big] > >> \setscript[nihongo] > >> > >> \starttext > >> \ruby{早}{はや}く。 > >> いきましょう。 > >> \stoptext > >> > >> Best regards: Otared > > > > Thanks all contributors, I added this to > > https://wiki.contextgarden.net/Chinese_Japanese_and_Korean > > > > I guess you also should set \mainlanguage[ja], I added it, also > > \mainlanguage[kr] for Korean. > > > > I don’t know if the setups for Chinese and Korean are still valid, I > > just removed \setencoding. > > > > Hraban > > ___ > > > > 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 > > ___ > > > ___ > 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 : ht
[NTG-context] Re: Structuring a magazine or booklet
Thank you very much Pablo ! I have to play with this canvas. Many thanks. JP Le 28/02/2024 à 19:10, Pablo Rodriguez via ntg-context a écrit : 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 ___ ___ 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
Dear List, So I changed my sentence a little bit, now it works perfect, as I wanted it. \setupinteraction[state=start] \starttext \reference[Rule:1]{Rule (3.1)} Formulate equivalents according to rule (\goto {3.1} [Rule:1]). \stoptext Uschi Von: Ursula Hermann Gesendet: Mittwoch, 28. Februar 2024 13:05:25 An: mailing list for ConTeXt users Betreff: [NTG-context] \in, \at, and labletext Dear List, In the Documentation IntroCTX_eng_s.pdf at page 170 , I found the two examples with \in and \at, and also the lable. 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): Sorry, I have no example. Uschi ___ 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: Japanese
ng, > >> > >> Thank you very much for your insight. I downloaded the Noto Serif JP > >> fonts and set up a fontfamily as you indicated, by adding > >> \setscript[nihongo] > >> which solves a problem I had with line breakings. And everything > >> works smoothly! > >> > >> So, for the mail archive, here is what I have and what works fine: > >> > >> %%% Noto Fonts > >> > >> \definefontfamily[JapaneseFont][rm][Noto Serif JP] > >> [ it={style:regular,features:{*,slanted}}, > >> sl={style:regular,features:{*,slanted}}, > >> bi={style:bold,features:{*,slanted}},force=yes] > >> > >> \definefontfamily[JapaneseFont][ss][Noto Serif JP] > >> [ it={style:regular,features:{*,slanted}}, > >> sl={style:regular,features:{*,slanted}}, > >> bi={style:bold,features:{*,slanted}},force=yes] > >> > >> \definefontfamily[JapaneseFont][tt][Noto Serif JP] > >> [ it={style:regular,features:{*,slanted}}, > >> sl={style:regular,features:{*,slanted}}, > >> bi={style:bold,features:{*,slanted}},force=yes] > >> > >> \definefontfamily[JapaneseFont][math][Tex Gyre Termes Math] > >> %\definefontfamily[JapaneseFont][math][Tex Gyre Pagella Math] > >> %\definefontfamily[JapaneseFont][math][Tex Gyre Aventor] > >> > >> > >> > >> \setupbodyfont[JapaneseFont,12pt] > >> \setupruby[location=top,voffset=-2ex] > >> \setupwhitespace[big] > >> \setscript[nihongo] > >> > >> \starttext > >> \ruby{早}{はや}く。 > >> いきましょう。 > >> \stoptext > >> > >> Best regards: Otared > > > > Thanks all contributors, I added this to > > https://wiki.contextgarden.net/Chinese_Japanese_and_Korean > > > > I guess you also should set \mainlanguage[ja], I added it, also > > \mainlanguage[kr] for Korean. > > > > I don’t know if the setups for Chinese and Korean are still valid, I > > just removed \setencoding. > > > > Hraban > > ___ > > > > 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 > > ___ > > > ___ > 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 > ___ > ___ 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: Japanese
Hi Hraban ! I also used to write this, if the main language is European : \definefallbackfamily [mainface] [rm] [ipamincho] [range=cjkunifiedideographs] Hope this is useful anymore, JP Le 28/02/2024 à 18:34, Henning Hraban Ramm a écrit : Am 28.02.24 um 08:34 schrieb Otared Kavian: Dear Dalyoung, Thank you very much for your insight. I downloaded the Noto Serif JP fonts and set up a fontfamily as you indicated, by adding \setscript[nihongo] which solves a problem I had with line breakings. And everything works smoothly! So, for the mail archive, here is what I have and what works fine: %%% Noto Fonts \definefontfamily[JapaneseFont][rm][Noto Serif JP] [ it={style:regular,features:{*,slanted}}, sl={style:regular,features:{*,slanted}}, bi={style:bold,features:{*,slanted}},force=yes] \definefontfamily[JapaneseFont][ss][Noto Serif JP] [ it={style:regular,features:{*,slanted}}, sl={style:regular,features:{*,slanted}}, bi={style:bold,features:{*,slanted}},force=yes] \definefontfamily[JapaneseFont][tt][Noto Serif JP] [ it={style:regular,features:{*,slanted}}, sl={style:regular,features:{*,slanted}}, bi={style:bold,features:{*,slanted}},force=yes] \definefontfamily[JapaneseFont][math][Tex Gyre Termes Math] %\definefontfamily[JapaneseFont][math][Tex Gyre Pagella Math] %\definefontfamily[JapaneseFont][math][Tex Gyre Aventor] \setupbodyfont[JapaneseFont,12pt] \setupruby[location=top,voffset=-2ex] \setupwhitespace[big] \setscript[nihongo] \starttext \ruby{早}{はや}く。 いきましょう。 \stoptext Best regards: Otared Thanks all contributors, I added this to https://wiki.contextgarden.net/Chinese_Japanese_and_Korean I guess you also should set \mainlanguage[ja], I added it, also \mainlanguage[kr] for Korean. I don’t know if the setups for Chinese and Korean are still valid, I just removed \setencoding. Hraban ___ 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 ___ ___ 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
Pablo Rodriguez via ntg-context schrieb am 28.02.2024 um 19:02: 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\beforequadruplenumber#1% {\ifcase\numexpr#1+1;4\relax \number\numexpr#1+4\relax \else \number\numexpr#1+3-#1;4\relax \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} \def\afterquadruplenumber#1% {\ifcase\numexpr#1;4\relax \number\numexpr#1+1\relax \else \number\numexpr#1+5-#1;4\relax \fi} Wolfgang ___ 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: Japanese
Am 28.02.24 um 08:34 schrieb Otared Kavian: Dear Dalyoung, Thank you very much for your insight. I downloaded the Noto Serif JP fonts and set up a fontfamily as you indicated, by adding \setscript[nihongo] which solves a problem I had with line breakings. And everything works smoothly! So, for the mail archive, here is what I have and what works fine: %%% Noto Fonts \definefontfamily[JapaneseFont][rm][Noto Serif JP] [ it={style:regular,features:{*,slanted}}, sl={style:regular,features:{*,slanted}}, bi={style:bold,features:{*,slanted}},force=yes] \definefontfamily[JapaneseFont][ss][Noto Serif JP] [ it={style:regular,features:{*,slanted}}, sl={style:regular,features:{*,slanted}}, bi={style:bold,features:{*,slanted}},force=yes] \definefontfamily[JapaneseFont][tt][Noto Serif JP] [ it={style:regular,features:{*,slanted}}, sl={style:regular,features:{*,slanted}}, bi={style:bold,features:{*,slanted}},force=yes] \definefontfamily[JapaneseFont][math][Tex Gyre Termes Math] %\definefontfamily[JapaneseFont][math][Tex Gyre Pagella Math] %\definefontfamily[JapaneseFont][math][Tex Gyre Aventor] \setupbodyfont[JapaneseFont,12pt] \setupruby[location=top,voffset=-2ex] \setupwhitespace[big] \setscript[nihongo] \starttext \ruby{早}{はや}く。 いきましょう。 \stoptext Best regards: Otared Thanks all contributors, I added this to https://wiki.contextgarden.net/Chinese_Japanese_and_Korean I guess you also should set \mainlanguage[ja], I added it, also \mainlanguage[kr] for Korean. I don’t know if the setups for Chinese and Korean are still valid, I just removed \setencoding. Hraban ___ 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: 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] Re: imposition: getting to the last page of a booklet
> On 27 Feb 2024, at 10:13, Pablo Rodriguez via ntg-context > wrote: > > I’m afraid I cannot make your sample work: 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. Switching to singlesided seems to confuse it - issuing only two sides in total so maybe that was part of the problem since both are specified in your original example? — Bruce Horrocks Hampshire, UK ___ 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: \mfunction does not work with the latest upload
Thank you for your prompt reply, Mikael. I like this new way of defining math functions. Mikael Sundqvist 於 2024年2月28日 週三 下午2:46寫道: > Hi, > > \definemathfunction [lcd] > > You can also add > [mathlimits=yes] > [mathlimits=no] > [mathlimits=auto] > > if you want the limits to go always below, never below or below in > display, respectively. > > /Mikael > > On Wed, Feb 28, 2024 at 1:26 AM fv leung wrote: > > > > > > \starttext > > % copy from wiki > > \definemathcommand[lcd][nolop]{\mfunction{lcd}} > > > > With \contextversion, the math command \tex{lcd} gives \m{\lcd} > (nothing)! > > > > \stoptext > > > ___ > > 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 > > > ___ > > ___ > 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 > > ___ > ___ 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: Japanese
Dear Dalyoung, Thank you very much for your insight. I downloaded the Noto Serif JP fonts and set up a fontfamily as you indicated, by adding \setscript[nihongo] which solves a problem I had with line breakings. And everything works smoothly! So, for the mail archive, here is what I have and what works fine: %%% Noto Fonts \definefontfamily[JapaneseFont][rm][Noto Serif JP] [ it={style:regular,features:{*,slanted}}, sl={style:regular,features:{*,slanted}}, bi={style:bold,features:{*,slanted}},force=yes] \definefontfamily[JapaneseFont][ss][Noto Serif JP] [ it={style:regular,features:{*,slanted}}, sl={style:regular,features:{*,slanted}}, bi={style:bold,features:{*,slanted}},force=yes] \definefontfamily[JapaneseFont][tt][Noto Serif JP] [ it={style:regular,features:{*,slanted}}, sl={style:regular,features:{*,slanted}}, bi={style:bold,features:{*,slanted}},force=yes] \definefontfamily[JapaneseFont][math][Tex Gyre Termes Math] %\definefontfamily[JapaneseFont][math][Tex Gyre Pagella Math] %\definefontfamily[JapaneseFont][math][Tex Gyre Aventor] \setupbodyfont[JapaneseFont,12pt] \setupruby[location=top,voffset=-2ex] \setupwhitespace[big] \setscript[nihongo] \starttext \ruby{早}{はや}く。 いきましょう。 \stoptext Best regards: Otared > On 27 Feb 2024, at 13:55, Jeong Dal via ntg-context > wrote: > > Dear Otared, > > I am using Korean as main language. > I used use typescript file, but recently I use \definefontfamily. > Since using Japanese font is similar to use Korean font, I show my example > of using Noto fonts. It was made by the help of expert of this list long time > ago. > > You may change "Noto Serif CJK KR” to Japanese font. > > I also use "\setscript[hangul]” when I use Korean as mainlanaguage. > > I hope that you may enhance the following code. > > Best regards, > > Dalyoung > > > %%% Noto Fonts > > \definefontfamily[notoFont][rm][Noto Serif CJK KR] > [ it={style:regular,features:{*,slanted}}, > sl={style:regular,features:{*,slanted}}, > bi={style:bold,features:{*,slanted}},force=yes] > > \definefontfamily[notoFont][ss][Noto Sans CJK KR] > [ it={style:regular,features:{*,slanted}}, > sl={style:regular,features:{*,slanted}}, > bi={style:bold,features:{*,slanted}},force=yes] > > \definefontfamily[notoFont][tt][Noto Sans Mono CJK KR] > [ it={style:regular,features:{*,slanted}}, > sl={style:regular,features:{*,slanted}}, > bi={style:bold,features:{*,slanted}},force=yes] > > \definefontfamily[notoFont][math][Tex Gyre Termes Math] > %\definefontfamily[notoFonts][math][Tex Gyre Pagella Math] > %\definefontfamily[notoCJK][math][Tex Gyre Aventor] > > >> 2024. 2. 27. 오전 6:49, Otared Kavian > <mailto:ota...@gmail.com>> 작성: >> >> Hi Hraban, >> >> Your are right indeed ! I didn’t imagine that it was so easy to set up a >> document to write in Japanese… >> Actually I followed the example by Emanuel Han which is essentially what you >> suggest (although he gave me also the hint to add the furagana). >> >> Best regards: Otared >> >>> On 26 Feb 2024, at 21:16, Henning Hraban Ramm >> <mailto:te...@fiee.net>> wrote: >>> >>> Am 26.02.24 um 21:08 schrieb Otared Kavian: >>>> Does anyone have a simple setup of fonts to write a small Japanese >>>> document (possibly with furagana) ? I am using MacOS and I have several >>>> Japanese fonts on the system. >>>> I have some old examples which do not typeset correctly now, maybe because >>>> they use the old module simplefonts and commands such as \setcjkmainfont >>>> and friends. >>> >>> Try to replace the simplefonts calls with something like >>> >>> \definefontfamily[myfonts][rm][SomeFont] >>> \definefontfamily[myfonts][ss][SomeOtherFont] >>> >>> \setupbodyfont[myfonts,rm,12pt] >>> >>> With Latin fonts, it usually works. >>> >>> Hraban >>> ___ >>> If your question is of interest to others as well, please add an entry to >>> the Wiki! >>> >>> maillist : ntg-context@ntg.nl <mailto:ntg-context@ntg.nl> / >>> https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl >>> <https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl> >>> webpage : https://www.pragma-ade.nl <https://www.pragma-ade.nl/> / >>> https://context.aanhet.net <https://context.aanhet.net/> (mirror) >>> archive : https://github.com/contextgarden/context &
[NTG-context] Re: \mfunction does not work with the latest upload
Hi, \definemathfunction [lcd] You can also add [mathlimits=yes] [mathlimits=no] [mathlimits=auto] if you want the limits to go always below, never below or below in display, respectively. /Mikael On Wed, Feb 28, 2024 at 1:26 AM fv leung wrote: > > > \starttext > % copy from wiki > \definemathcommand[lcd][nolop]{\mfunction{lcd}} > > With \contextversion, the math command \tex{lcd} gives \m{\lcd} (nothing)! > > \stoptext > ___ > 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 > ___ ___ 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] \mfunction does not work with the latest upload
\starttext % copy from wiki \definemathcommand[lcd][nolop]{\mfunction{lcd}} With \contextversion, the math command \tex{lcd} gives \m{\lcd} (nothing)! \stoptext ___ 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: 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] Works now! At Work, and a question to paragraphs in an Theorem
Dear List, At Work everything works fine now. Many thanks for those, who have written me. I have a question to my paragraphs: \definetextbackground[Paragaph][ location=paragraph, background=color, backgroundcolor=lightgray, leftoffset=.5\bodyfontsize, rightoffset=.5\bodyfontsize, topoffset=.5\bodyfontsize, bottomoffset=.5\bodyfontsize, frame=off,] \startparagraph \starttext Mitunter ist es aus der Formulierung nur schwer zu erkennen, dass ein \m{∃\forall} oder ein \m{\forall\m∃} versteckt ist. Dann ist es besonders wichtig, die Formulierung sehr lange zu prüfen und eventuell auch formalisiert noch einmal aufzuschreiben.” \blank Der Wert von \m{y = f(x)} ist unabhängig von der Wahl\par von \m{x\doubleprime} ist gleichbedeutend mit \m{∃y : ∀x : f(x) = y} \par (Beutelspacher [10, S.54]). \stopparagraph \stoptext 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? Many thanks Uschi ___ 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: Japanese
Hi Emanuel, Thanks for the example. In fact I don’t need vertical typesetting for my Japanese text, so your example works fine for me. Actually I had to change the name of the font to Hiragino Mincho ProN W3 in order to get your example work. Also I think with the recent versions of ConTeXt there is no need to add \enableregime[utf] because ConTeXt is working with Unicode any way. I added also a line to define a math font, since I have read here on the mailing list that a math font should be set… Maybe someone among the experts can tell us if I am right, or if one has to set other fonts as well. So your example which works fine for me is now: % begin simple-japanese.tex \definefontfamily [JapaneseFont] [rm] [Hiragino Mincho ProN W3] \definefontfamily [JapaneseFont] [ss] [Hiragino Mincho ProN W3] \definefontfamily [JapaneseFont] [mm] [math] [lucidaot] [default] \setupbodyfont[JapaneseFont,14pt] \setupruby[location=top,voffset=-1.6ex] \setupwhitespace[big] \starttext \ruby{僕}{ぼく}はもう\ruby{寝}{ね}る。 お\ruby{休}{やす}みなさい^_^ \stoptext %end simple-japanese.tex Best regards: Otared > On 26 Feb 2024, at 21:32, Emanuel Han via ntg-context > wrote: > > Unfortunately vertical typesetting is not supported by ConTeXt. That's a big > pity. > > If horizontal typesetting is fine, this little working example with furigana > might give you some hints. Hiragino Mincho Pro should be installed by Default > on MacOS. > > \enableregime[utf] % enable unicoded input > \definefontfamily [JapaneseFont] [rm] [hiraginominchopro] > > \setupruby[location=top,voffset=-1.6ex, ] > > \starttext \JapaneseFont > > \ruby{僕}{ぼく}はもう\ruby{寝}{ね}る。 > > お\ruby{休}{やす}みなさい^_^ > > \stoptext > > > > On Feb. 26 2024, at 9:08 pm, Otared Kavian wrote: > Hi all, > > Does anyone have a simple setup of fonts to write a small Japanese document > (possibly with furagana) ? I am using MacOS and I have several Japanese fonts > on the system. > I have some old examples which do not typeset correctly now, maybe because > they use the old module simplefonts and commands such as \setcjkmainfont and > friends. > > Many thanks in advance: Otared > > ___ > 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 > ___ > ___ > 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 > ___ Otared Kavian e-mail: ota...@gmail.com Phone: +33 6 88 26 70 95 ___ 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: Japanese
Unfortunately vertical typesetting is not supported by ConTeXt. That's a big pity. If horizontal typesetting is fine, this little working example with furigana might give you some hints. Hiragino Mincho Pro should be installed by Default on MacOS. \enableregime[utf] % enable unicoded input \definefontfamily [JapaneseFont] [rm] [hiraginominchopro] \setupruby[location=top,voffset=-1.6ex, ] \starttext \JapaneseFont \ruby{僕}{ぼく}はもう\ruby{寝}{ね}る。 お\ruby{休}{やす}みなさい^_^ \stoptext On Feb. 26 2024, at 9:08 pm, Otared Kavian wrote: > Hi all, > > Does anyone have a simple setup of fonts to write a small Japanese document > (possibly with furagana) ? I am using MacOS and I have several Japanese fonts > on the system. > I have some old examples which do not typeset correctly now, maybe because > they use the old module simplefonts and commands such as \setcjkmainfont and > friends. > > Many thanks in advance: Otared > ___ > 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 > ___ > ___ 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] Hyperlinks cease working after page selection
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. Any suggestions on how to correct or work around this would be greatly appreciated. \setupinteraction[state=start, color=darkblue] \setupwhitespace [big] \starttext Consult the \goto{\ConTeXt\ wiki}[url(https://wiki.contextgarden.net/)] .\par \dorecurse{5}{\samplefile{lorem}\par} \stoptext Processed as follows: context mwe.tex context --extra=select --selection=1 --result=foobar.pdf mwe.pdf -- With kind regards, Michael Guravage ___ 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 italics
Thanks to Thomas and Denis, That's it: use GFS Didot for the French text and Theano Didot for the Greek. In my working text I have this preamble (and other things): \setuplanguage[fr][patterns={fr,agr}] \mainlanguage[fr] \setcharacterspacing[frenchpunctuation]] \setuplayout [backspace=40mm] \setuppagenumbering[alternative=doublesided, location={header, inmargin}] \setupmargindata[inmargin][location=inner, style={setupinterlinespace[line=2.8ex]}] \setupmarginframed[inmargin][align=right] \setupbodyfontenvironment[default][em=italic] \definefallbackfamily[mainface][rm][Theano Didot][preset=range:greek,force=yes] \definefontfamily[mainface][rm][GFS Didot] \setupbodyfont[mainface, 11pt] I'm currently working on MS Windows 11 for the moment (as a test beside Linux). I didn't try to compile this text under Linux, but I don't think there is an issue with the OS. As far as GFS Didot is concerned, I have installed the most recent version. But what amazes me the most is that by only keeping a font like EBGaramond without writing : \definefallbackfamily [mainface] [rm] [Theano Didot] [preset=range:greek,force=yes] So, using EBGaramond only, I have the French text (with italics), as well as the Greek text... Try this : \setuplanguage \mainlanguage[fr,agr] \definefontfamily [mainface] [rm] [EBGaramond] \setupbodyfont[mainface, 12pt] \setupbodyfontenvironment[default][em=italic] \starttext Socrate est descendu au Pirée et affirme sa satisfaction du culte rendu à cette nouvelle déesse par les Thraces; néanmoins, {\em il ne nous dit rien des prières} qu'il a lui-même rendues à la déesse avec les autres participants, dont il fait pourtant état. Sur le chemin du retour, il est arrêté par Polémarque qui leur apprend qu'une retraite aux flambeaux à cheval est prévue par les Thraces, ainsi qu'une fête de nuit \quote{qui vaut la peine d'être vue} (ἣν ἄξιον θεάσασθαι; {\em èn axion théasasthai} - 328a). \blank Κάθε άνθρωπος δικαιούται να επικαλείται όλα τα δικαιώματα και όλες τις ελευθερίες που προκηρύσσει η παρούσα Διακήρυξη, χωρίς καμία απολύτως διάκριση, ειδικότερα ως προς τη φυλή, το χρώμα, το φύλο, τη γλώσσα, τις θρησκείες, τις πολιτικές ή οποιεσδήποτε άλλες πεποιθήσεις, την εθνική ή κοινωνική καταγωγή, την περιουσία, τη γέννηση ή οποιαδήποτε άλλη κατάσταση. Δεν θα μπορεί ακόμα να γίνεται καμία διάκριση εξαιτίας του πολιτικού, νομικού ή διεθνούς καθεστώτος της χώρας από την οποία προέρχεται κανείς, είτε πρόκειται για χώρα ή εδαφική περιοχή ανεξάρτητη, υπό κηδεμονία ή υπεξουσία, ή που βρίσκεται υπό οποιονδήποτε άλλον περιορισμό κυριαρχίας. \stoptext I've found a solution, with Segoeui (Windows font) as the main font and Theano Didot for the Greek text. But I don't understand why setting the fonts to GFS Didot and Theano Didot prevents italics from being displayed ... Best//JP Le 26/02/2024 à 15:02, Thomas A. Schmitz a écrit : I just tried your example with the latest version of GFSDidot (the older version I had on my system did not show some diacritics; this problem disappeared when I installed the latest), and the italics are there, I don’t see any problem in the pdf. If you want the Greek displayed in Theano, you will have to add “force=yes” to your definition of the fallback family: \definefallbackfamily [mainface] [rm] [Theano Didot] [preset=range:greek,force=yes] Your text cannot have two main languages, so \mainlanguage[fr] If you want hyphenation for your Greek passages, you can add \setuplanguage [fr] [patterns={fr,agr}] The line where you have polytonic Greek does not use precomposed characters, but combinations of greek characters and diacritics; this will probably not work in recent context versions that expect actual unicode input. I hope I have really understood what you want: GFSDIdot for the French text and Theano for Greek? HTH Thomas On 26. Feb 2024, at 13:32, Jean-Pierre Delange wrote: Dear list, When handling the preamble to a document in which I would like to treat the text in French, with sometimes italics text and phrases in ancient Greek, I encounter the following difficulty: if I use TeX Gyre Pagella as the main font, everything works fine, except for the Ancient Greek text, which I don't like the look of. But the Greek text is displayed, as are the French italics. On the other hand, if I use GFS Didot as the main font and Theano Didot for the Greek, the italics disappear and the Greek text looks better. The CTX version I use is: mtx-context | current version: 2024.01.24 22:39. Herewith are two MWE attachments (*.tex + *.pdf) with different fonts. What am I missing ? Thanks for your answers. JP ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist :ntg-context@ntg.nl /https://mailman.n
[NTG-context] Issue with italics
Dear list, When handling the preamble to a document in which I would like to treat the text in French, with sometimes italics text and phrases in ancient Greek, I encounter the following difficulty: if I use TeX Gyre Pagella as the main font, everything works fine, except for the Ancient Greek text, which I don't like the look of. But the Greek text is displayed, as are the French italics. On the other hand, if I use GFS Didot as the main font and Theano Didot for the Greek, the italics disappear and the Greek text looks better. The CTX version I use is: mtx-context | current version: 2024.01.24 22:39. Herewith are two MWE attachments (*.tex + *.pdf) with different fonts. What am I missing ? Thanks for your answers. JP \mainlanguage[fr,agr] \definefallbackfamily [mainface] [rm] [Theano Didot] [preset=range:greek] \definefontfamily [mainface] [rm] [TeX Gyre Pagella] \setupbodyfont[mainface, 11pt] \setupbodyfontenvironment[default][em=italic] \starttext Socrate est descendu au Pirée et affirme sa satisfaction du culte rendu à cette nouvelle déesse par les Thraces; néanmoins, {\em il ne nous dit rien des prières} qu'il a lui-même rendues à la déesse avec les autres participants, dont il fait pourtant état. Sur le chemin du retour, il est arrêté par Polémarque qui leur apprend qu'une retraite aux flambeaux à cheval est prévue par les Thraces, ainsi qu'une fête de nuit \quote{qui vaut la peine d'être vue} (ηÌÌν αÌÌξιον θεαÌÏαÏθαι; {\em èn axion théasasthai} - 328a). \blank Îάθε άνθÏÏÏÎ¿Ï Î´Î¹ÎºÎ±Î¹Î¿ÏÏαι να εÏικαλείÏαι Ïλα Ïα δικαιÏμαÏα και ÏÎ»ÎµÏ ÏÎ¹Ï ÎµÎ»ÎµÏ Î¸ÎµÏÎ¯ÎµÏ ÏÎ¿Ï ÏÏοκηÏÏÏÏει η ÏαÏοÏÏα ÎιακήÏÏ Î¾Î·, ÏÏÏÎ¯Ï ÎºÎ±Î¼Î¯Î± αÏολÏÏÏÏ Î´Î¹Î¬ÎºÏιÏη, ειδικÏÏεÏα ÏÏ ÏÏÎ¿Ï Ïη ÏÏ Î»Î®, Ïο ÏÏÏμα, Ïο ÏÏλο, Ïη γλÏÏÏα, ÏÎ¹Ï Î¸ÏηÏκείεÏ, ÏÎ¹Ï ÏολιÏικÎÏ Î® οÏοιεÏδήÏοÏε Î¬Î»Î»ÎµÏ ÏεÏοιθήÏειÏ, Ïην εθνική ή κοινÏνική καÏαγÏγή, Ïην ÏεÏÎ¹Î¿Ï Ïία, Ïη γÎννηÏη ή οÏοιαδήÏοÏε άλλη καÏάÏÏαÏη. Îεν θα μÏοÏεί ακÏμα να γίνεÏαι καμία διάκÏιÏη εξαιÏÎ¯Î±Ï ÏÎ¿Ï ÏολιÏικοÏ, Î½Î¿Î¼Î¹ÎºÎ¿Ï Î® διεθνοÏÏ ÎºÎ±Î¸ÎµÏÏÏÏÎ¿Ï ÏÎ·Ï ÏÏÏÎ±Ï Î±ÏÏ Ïην οÏοία ÏÏοÎÏÏεÏαι κανείÏ, είÏε ÏÏÏκειÏαι για ÏÏÏα ή εδαÏική ÏεÏιοÏή ανεξάÏÏηÏη, Ï ÏÏ ÎºÎ·Î´ÎµÎ¼Î¿Î½Î¯Î± ή Ï ÏÎµÎ¾Î¿Ï Ïία, ή ÏÎ¿Ï Î²ÏίÏκεÏαι Ï ÏÏ Î¿ÏοιονδήÏοÏε άλλον ÏεÏιοÏιÏÎ¼Ï ÎºÏ ÏιαÏÏίαÏ. \stoptext \mainlanguage[fr,agr] \definefallbackfamily [mainface] [rm] [Theano Didot] [preset=range:greek] \definefontfamily [mainface] [rm] [GFS Didot] \setupbodyfont[mainface, 11pt] \setupbodyfontenvironment[default][em=italic] \starttext Socrate est descendu au Pirée et affirme sa satisfaction du culte rendu à cette nouvelle déesse par les Thraces; néanmoins, {\em il ne nous dit rien des prières} qu'il a lui-même rendues à la déesse avec les autres participants, dont il fait pourtant état. Sur le chemin du retour, il est arrêté par Polémarque qui leur apprend qu'une retraite aux flambeaux à cheval est prévue par les Thraces, ainsi qu'une fête de nuit \quote{qui vaut la peine d'être vue} (ηÌÌν αÌÌξιον θεαÌÏαÏθαι; {\em èn axion théasasthai} - 328a). \blank Îάθε άνθÏÏÏÎ¿Ï Î´Î¹ÎºÎ±Î¹Î¿ÏÏαι να εÏικαλείÏαι Ïλα Ïα δικαιÏμαÏα και ÏÎ»ÎµÏ ÏÎ¹Ï ÎµÎ»ÎµÏ Î¸ÎµÏÎ¯ÎµÏ ÏÎ¿Ï ÏÏοκηÏÏÏÏει η ÏαÏοÏÏα ÎιακήÏÏ Î¾Î·, ÏÏÏÎ¯Ï ÎºÎ±Î¼Î¯Î± αÏολÏÏÏÏ Î´Î¹Î¬ÎºÏιÏη, ειδικÏÏεÏα ÏÏ ÏÏÎ¿Ï Ïη ÏÏ Î»Î®, Ïο ÏÏÏμα, Ïο ÏÏλο, Ïη γλÏÏÏα, ÏÎ¹Ï Î¸ÏηÏκείεÏ, ÏÎ¹Ï ÏολιÏικÎÏ Î® οÏοιεÏδήÏοÏε Î¬Î»Î»ÎµÏ ÏεÏοιθήÏειÏ, Ïην εθνική ή κοινÏνική καÏαγÏγή, Ïην ÏεÏÎ¹Î¿Ï Ïία, Ïη γÎννηÏη ή οÏοιαδήÏοÏε άλλη καÏάÏÏαÏη. Îεν θα μÏοÏεί ακÏμα να γίνεÏαι καμία διάκÏιÏη εξαιÏÎ¯Î±Ï ÏÎ¿Ï ÏολιÏικοÏ, Î½Î¿Î¼Î¹ÎºÎ¿Ï Î® διεθνοÏÏ ÎºÎ±Î¸ÎµÏÏÏÏÎ¿Ï ÏÎ·Ï ÏÏÏÎ±Ï Î±ÏÏ Ïην οÏοία ÏÏοÎÏÏεÏαι κανείÏ, είÏε ÏÏÏκειÏαι για ÏÏÏα ή εδαÏική ÏεÏιοÏή ανεξάÏÏηÏη, Ï ÏÏ ÎºÎ·Î´ÎµÎ¼Î¿Î½Î¯Î± ή Ï ÏÎµÎ¾Î¿Ï Ïία, ή ÏÎ¿Ï Î²ÏίÏκεÏαι Ï ÏÏ Î¿ÏοιονδήÏοÏε άλλον ÏεÏιοÏιÏÎ¼Ï ÎºÏ ÏιαÏÏίαÏ. \stoptext___ If your question is of interest to oth
[NTG-context] Re: typing with scite module and escape
Am 24.02.24 um 13:53 schrieb Henning Hraban Ramm: Hi, I’m trying to use escaping in a typing environment. It works until I load the scite module. I need that only for btx highlighting, but I can’t limit it to that. What should I do? \usemodule[scite] \define[1]\SAY{\hfill{\rm #1}} \setuptyping[TEX][ option=tex,% scite sets cld escape=yes, ] \starttext \startTEX \starttext/BTEX\SAY{Text starts here}/ETEX \input tufte \stoptext/BTEX\SAY{Text ends here}/ETEX \stopTEX \stoptext I tried to load the module only in the section where I need it, that lead to strange errors in later sections, apparently there’s no encapsulation. If I comment line 289 in m-scite.mkiv that reads --visualizers.register("tex", visualizer) it works for me. Would it be possible to unregister a visualizer, or is the call maybe unnecessary anyway? Hraban ___ 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
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. \setuppagenumbering[alternative={singlesided,doublesided}] \starttext \samplefile{lorem} \page[quadruple] \samplefile{lorem} \stoptext Wolfgang ___ 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] typing with scite module and escape
Hi, I’m trying to use escaping in a typing environment. It works until I load the scite module. I need that only for btx highlighting, but I can’t limit it to that. What should I do? \usemodule[scite] \define[1]\SAY{\hfill{\rm #1}} \setuptyping[TEX][ option=tex,% scite sets cld escape=yes, ] \starttext \startTEX \starttext/BTEX\SAY{Text starts here}/ETEX \input tufte \stoptext/BTEX\SAY{Text ends here}/ETEX \stopTEX \stoptext ___ 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 23 Feb 2024, at 13:32, Pablo Rodriguez via ntg-context > wrote: > > 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, 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 Jobname.tex is your main file and generates jobname.pdf as its output, while add_sha.tex contains the rename logic: \starttext \startluacode local pdf_file_name = "jobname.pdf" local sha_pdf = utilities.sha2.hash256(io.loaddata(pdf_file_name)) os.rename(pdf_file_name, ("%s-%s.pdf"):format(pdf_file_name, sha_pdf)) \stopluacode Done \stoptext — Bruce Horrocks Hampshire, UK ___ 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
Il 23/02/24 14:32, Pablo Rodriguez via ntg-context ha scritto: 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 ___ Hello Pablo, you can keep the log, tuc and pdf file of every run with the --keeplog, --keeptuc and --keeppdf options (type "context --help --expert" to know about the file naming). A new run is started unless: - the maxruns number of runs has been reached - the tuc file is identical to the one of the previous run Massi ___ 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: MetaPost lines in tables?
On 2/21/2024 7:47 PM, Henning Hraban Ramm wrote: Am 21.02.24 um 19:43 schrieb Wolfgang Schuster: … but it would be visible on a colored background. I’m sure you can show me a better way… \startuseMPgraphic{dottedborder} draw bottomboundary OverlayBox withpen pencircle scaled 2 dashed withdots withcolor "red"; setbounds currentpicture to OverlayBox; \stopuseMPgraphic Thank you! (I’m sure I already used that somewhere… Must document…) ok, new feature dedicated to Hraban ... who then of courese has to document it. \starttext \starttabulate \FL[1,2] % linefactor (old) dashfactor (new) \NC test \NC test and test and test and done \NC \NR \ML[1,1] \NC test \NC test and test and test and done \NC \NR \NC test \NC test and test and test and done \NC \NR \NC test \NC test and test and test and done \NC \NR \LL[1,10] \stoptabulate \framed [align=middle,topframe=dash,frame=off] {\samplefile{tufte}} \framed [align=middle, frame=dash, dashstep=.01hs, rulethickness=1pt] {\samplefile{tufte}} \framed [align=middle, frame=dash, dashstep=10pt, rulethickness=2pt, background=color, backgroundcolor=gray] {\samplefile{tufte}} \stoptext - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://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: MetaPost lines in tables?
Henning Hraban Ramm schrieb am 21.02.2024 um 19:04: Am 19.02.24 um 23:15 schrieb Wolfgang Schuster: Henning Hraban Ramm schrieb am 19.02.2024 um 22:39: I guess I asked this a while ago, but I can’t find an answer: Is it possible to replace the lines of a TABLE with my own MetaPost graphics? ATM I’m trying to place my MP lines behind a frame-less TABLE; it will probably work, but it’s a crutch… The example below draws a custom border for the whole cell but you're free to draw only certain sides (leftboundary etc. helps) but don't forget to set the boundary box for the graphic (OverlayBox is the size of the cell). begin example \startuseMPgraphic{dottedborder} draw OverlayBox withpen pencircle scaled 2 dashed withdots withcolor "red"; \stopuseMPgraphic \defineoverlay[dottedborder][\useMPgraphic{dottedborder}] \starttext \bTABLE[frame=off,background=dottedborder] Thank you! Since I needed only horizontal lines, I forced the height with an “invisible“ line: \startuseMPgraphic{dottedborder} draw (0,0)--(0,OverlayHeight) withpen pencircle scaled 0.001 withcolor white; draw (0,0)--(OverlayWidth,0) withpen pencircle scaled 2 dashed withdots withcolor "red"; \stopuseMPgraphic … but it would be visible on a colored background. I’m sure you can show me a better way… \startuseMPgraphic{dottedborder} draw bottomboundary OverlayBox withpen pencircle scaled 2 dashed withdots withcolor "red"; setbounds currentpicture to OverlayBox; \stopuseMPgraphic Wolfgang ___ 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: MetaPost lines in tables?
Am 19.02.24 um 23:15 schrieb Wolfgang Schuster: Henning Hraban Ramm schrieb am 19.02.2024 um 22:39: I guess I asked this a while ago, but I can’t find an answer: Is it possible to replace the lines of a TABLE with my own MetaPost graphics? ATM I’m trying to place my MP lines behind a frame-less TABLE; it will probably work, but it’s a crutch… The example below draws a custom border for the whole cell but you're free to draw only certain sides (leftboundary etc. helps) but don't forget to set the boundary box for the graphic (OverlayBox is the size of the cell). begin example \startuseMPgraphic{dottedborder} draw OverlayBox withpen pencircle scaled 2 dashed withdots withcolor "red"; \stopuseMPgraphic \defineoverlay[dottedborder][\useMPgraphic{dottedborder}] \starttext \bTABLE[frame=off,background=dottedborder] Thank you! Since I needed only horizontal lines, I forced the height with an “invisible“ line: \startuseMPgraphic{dottedborder} draw (0,0)--(0,OverlayHeight) withpen pencircle scaled 0.001 withcolor white; draw (0,0)--(OverlayWidth,0) withpen pencircle scaled 2 dashed withdots withcolor "red"; \stopuseMPgraphic … but it would be visible on a colored background. I’m sure you can show me a better way… My real life example (p.2 in https://yemaya.fiee.net/s/DEEHs5m49yftiqW) involves sketchy lines, and there it’s a bit annoying that the row is not its own frame that could get a continuous background… Well, it’s good enough, I’ll settle for it. Hraban ___ 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: using an end of line as parameter
> On 21 Feb 2024, at 08:17, madiazm.eo...@gmail.com wrote: > > Thanks a lot Bruce, that did the trick! definitely I will have to learn a bit > lua in summer. > I just got an error on \qquad and found searching in internet that it was > because escape character conflicts between tex and lua. For the time i > removed it and since I will create itemizes I hope I dont get that error if I > use \item instead of \qquad. > Thanks again, I spent hours of trial and error, error, error... on this > matter. Yes, the \'s need to be escaped in Lua. And it's made me realise that the process of identifying the four lines of the question is separate from the typesetting of the question later. The amended version below uses your \tareaABC macro to format the question so you can more easily change the layout without having to understand ConTeXT Lua Documents in detail. \startluacode userdata = userdata or {} function userdata.formatTestQuestions() local the_buffer = buffers.getlines("TestQuestions") local tracker = 0 local the_question = {} -- Go through the buffer of questions one line at a time for i = 1,#the_buffer do -- Skip blank lines but 'collect' non-blank lines until we have four -- (which is assumed to be a whole question) if string.strip(the_buffer[i]) == "" then tracker = 0 the_question = {} else tracker = tracker + 1 the_question[tracker] = the_buffer[i] end -- If tracker has got to 4 then we've read four lines if tracker == 4 then context.tareaAbc( the_question[1], the_question[2], the_question[3], the_question[4]) -- Reset for the next question (in case no blank line) tracker = 0 the_question = {} end end end \stopluacode \def\startTestQuestions {\dostartbuffer[TestQuestions][startTestQuestions][stopTestQuestions]} \def\stopTestQuestions {\ctxlua{userdata.formatTestQuestions()}} \define[4]\tareaAbc{\item #1 \startitemgroup[itemize][a] \item #2 \item #3 \item #4 \stopitemgroup} \starttext Here are some questions: \startTestQuestions In den Büchereien gibt es auch … … Kuchen. … Theater. … Workshops. In den Büchereien gibt es auch … … Kuchen. … Theater. … Workshops. In den Büchereien gibt es auch … … Kuchen. … Theater. … Workshops. \stopTestQuestions \stoptext — Bruce Horrocks Hampshire, UK tt2.tex Description: Binary data ___ 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: using an end of line as parameter
> On 20 Feb 2024, at 12:59, madiazm.eo...@gmail.com wrote: > > no, I just want to split at the end of each sentence to get the four > arguments: now I pass this four lines to my macro \tareaAbc (with the dirty > trick of ñ) > > In den Büchereien gibt es auch …ñ > … Kuchen.ñ > … Theater.ñ > … Workshops.ñ > > and I wish your context.foo(lines[i]) iteration would become a single > context.tareaAbc(the four arguments somehow separated so that I can manage > each line with the corresponding context formatting) > > As you see my definition is: \def\tareaAbc #1ñ#2ñ#3ñ#4ñ{...context formating > for each #)}; Its the clue to pass each sentence as an independent argument > that I don't get to work. > thanks again > A variation on Hans original suggestion is to use a buffer instead of a separate text file, combined with Lua. \startluacode userdata = userdata or {} function userdata.formatTestQuestions() local the_buffer = buffers.getlines("TestQuestions") local tracker = 0 local the_question = {} local letters = {"-", "a", "b", "c"} -- Go through the buffer of questions one line at a time for i = 1,#the_buffer do -- Skip blank lines but 'collect' non-blank lines until we have four -- (which is assumed to be a whole question) if string.strip(the_buffer[i]) == "" then tracker = 0 the_question = {} else tracker = tracker + 1 the_question[tracker] = the_buffer[i] end -- If tracker has got to 4 then we've read four lines if tracker == 4 then context.startlines() context("{\\bf Beispiel:} %s", the_question[1]) context(true) for answer = 2,4 do context("\\qquad %s) %s", letters[answer], the_question[answer]) context(true) end context.stoplines() -- Reset for the next question (in case no blank line) tracker = 0 the_question = {} end end end \stopluacode \def\startTestQuestions {\dostartbuffer[TestQuestions][startTestQuestions][stopTestQuestions]} \def\stopTestQuestions {\ctxlua{userdata.formatTestQuestions()}} \starttext Here are some questions: \startTestQuestions In den Büchereien gibt es auch … … Kuchen. … Theater. … Workshops. In den Büchereien gibt es auch … … Kuchen. … Theater. … Workshops. In den Büchereien gibt es auch … … Kuchen. … Theater. … Workshops. \stopTestQuestions How do you think you did on that test? Here's another one. \startTestQuestions In den Büchereien gibt es auch … … Kuchen. … Theater. … Workshops. \stopTestQuestions \stoptext — Bruce Horrocks Hampshire, UK tt.tex Description: Binary data ___ 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
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 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 Uschi -Ursprüngliche Nachricht- Von: Ursula Hermann Gesendet: Montag, 19. Februar 2024 14:42 An: mailing list for ConTeXt users Betreff: [NTG-context] Re: Sorry for once more asking, i am at Work Dear Pablo, I shell try it. Many thanks. Uschi -Ursprüngliche Nachricht- Von: Pablo Rodriguez via ntg-context Gesendet: Montag, 19. Februar 2024 14:31 An: ntg-context@ntg.nl Cc: Pablo Rodriguez Betreff: [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 ___ ___ 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 ___ ___ 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: using an end of line as parameter
On 2/20/2024 12:26 PM, madiazm.eo...@gmail.com wrote: Thanks Hans, I supposed that lua would be more suitable, but unfortunately I still did not learn it (I hope in summer I have time to read the manual) The problem arises from the fact that for each line i will perform a different action and for \def\foo I need four arguments so that I can correctly format the lines. How can i get the result of string.splitlines (s) separated into four arguments to pass to the macro? then \foo would be \def\foo#1SEPARATOR#2SEPARATOR#3SEPARATOR#4 I now use: \starttext %now I use the dirty trick of writing an ñ at the end of line so that the macro detects each argument; but for each question I have to manually add it, which is tedious; therefore I look for a solution to detect lines automatically %the definition \def\tareaAbc #1ñ#2ñ#3ñ#4ñ{\item #1 \startitemgroup[lista1a] \item #2 \item #3 \item #4 \stopitemgroup} %in the document /startitemgropu[lista1a] %I manually open the first level of the list so the first argument -the question- gets numbered \tareaAbc In den Büchereien gibt es auch …ñ %the question; an item of first level … Kuchen.ñ %option a gets a new list of second level opened and argument 2 is the first item … Theater.ñ %option b another item … Workshops.ñ %option c last item and closes the second level list %some more macros with more questions and options /stopitemgroup %I manually close the first level list You have to provide more details about these lines. For instance, do you want to split on spaces? Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://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: using an end of line as parameter
Thanks Hans, I supposed that lua would be more suitable, but unfortunately I still did not learn it (I hope in summer I have time to read the manual) The problem arises from the fact that for each line i will perform a different action and for \def\foo I need four arguments so that I can correctly format the lines. How can i get the result of string.splitlines (s) separated into four arguments to pass to the macro? then \foo would be \def\foo#1SEPARATOR#2SEPARATOR#3SEPARATOR#4 I now use: \starttext %now I use the dirty trick of writing an ñ at the end of line so that the macro detects each argument; but for each question I have to manually add it, which is tedious; therefore I look for a solution to detect lines automatically %the definition \def\tareaAbc #1ñ#2ñ#3ñ#4ñ{\item #1 \startitemgroup[lista1a] \item #2 \item #3 \item #4 \stopitemgroup} %in the document /startitemgropu[lista1a] %I manually open the first level of the list so the first argument -the question- gets numbered \tareaAbc In den Büchereien gibt es auch …ñ %the question; an item of first level … Kuchen.ñ %option a gets a new list of second level opened and argument 2 is the first item … Theater.ñ %option b another item … Workshops.ñ %option c last item and closes the second level list %some more macros with more questions and options /stopitemgroup %I manually close the first level list \stoptext ___ 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: using an end of line as parameter
On 2/19/2024 1:49 PM, Miguel Diaz wrote: Dear list, I want to format some language tests that different people are preparing. Each one uses different software and there are always problems in format that i want to solve. for a a/b/c questions I receive text that I will format to a list (comments are mine) In den Büchereien gibt es auch … %the question … Kuchen. %option a … Theater. %option b … Workshops. %option c I need to detect \par or whatever sign marks the newline character as an argument delimiter so that I dont have to paste hundreds of times braces for each argument. For the example, I use this macro definition (which does no work!) \long\def\prueba #1\par#2\par#3\par#4ñ{\framed[frame=off,width=0.8\textwidth,corner=round,offset=1em,align=flushleft]% {{\bf Beispiel}: #1\\ \qquad a) #2\\ \qquad b) {\bf #3}\\ \qquad c) #4 } I get: tex error on line 493 in file ./prueba.tex: The file ended when scanning an argument. the macro seems to read to the end of file not detecting \par; I know its the \par that causes the problem; I used ^^M also which I read is a sinonym for return but it also does not work. Help would be appreciated (my computer keyboard would appreciate it too...) better start thinking something: \starttext \def\foo#1{<<<#1>>>>\par} \startluacode local s = [[ line 1 line 2 line 3 line 4 ]] -- local s - io.loaddata("yourfile.txt") local lines = string.splitlines(s) for i=1,#lines do if lines[i] ~= "" then context.foo(lines[i]) end end \stopluacode \stoptext - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://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: MetaPost lines in tables?
Henning Hraban Ramm schrieb am 19.02.2024 um 22:39: I guess I asked this a while ago, but I can’t find an answer: Is it possible to replace the lines of a TABLE with my own MetaPost graphics? ATM I’m trying to place my MP lines behind a frame-less TABLE; it will probably work, but it’s a crutch… The example below draws a custom border for the whole cell but you're free to draw only certain sides (leftboundary etc. helps) but don't forget to set the boundary box for the graphic (OverlayBox is the size of the cell). begin example \startuseMPgraphic{dottedborder} draw OverlayBox withpen pencircle scaled 2 dashed withdots withcolor "red"; \stopuseMPgraphic \defineoverlay[dottedborder][\useMPgraphic{dottedborder}] \starttext \bTABLE[frame=off,background=dottedborder] \bTR \bTD Hello Table! \eTD \eTR \eTABLE \stoptext end example Wolfgang ___ 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: Text in Margin
Jeroen schrieb am 19.02.2024 um 14:14: In a textbook I am looking to place a large left margin at every page of each chapter. At left printed pages a left margin and at right printed pages a right margin, so like a double sided construction. In this margin I would like to place: You can use a custom layout with a narrow text block and a wide rightmargin area. 1. Keywords and small descriptions to emphasize some text from the textflow Use the \inright etc. commands or create your own commands based on \inright, look at the margindata mechanism for more information. 2. Figures You can change the default location of figures from the text block to the margin area. 3. An expansion of a table that is placed in the main textflow but that needs to cover a wider range then the text area so it expands into the margin In the example below I added a check to the table float to either center the small tables or align wide tables on the inner margin which extend into the margin area. While this method works in a simple example for a real document I suggest to create a clone of the table float (e.g. widetable) because the method in the example can lead to problems/limitations. What is the the easiest way to achieve this? begin example \setuppagenumbering [alternative=doublesided] \setuplayout [width=10cm, rightmargin=6cm] \showframe \def\FloatTableALignment {\dowithnextbox {\ifdim\nextboxwd>\textwidth \doalignedline{inner}{\flushnextbox}% \else \flushnextbox \fi} \hbox} \setupfloat[table][command=\FloatTableALignment] \setupfloat[figure][default=rightmargin] \starttext \inright{Lorem ipsum \unknown}\samplefile{lorem} \startplacefigure \externalfigure[dummy][width=\rightmarginwidth] \stopplacefigure \samplefile{lorem} \startplacetable \bTABLE \bTR \bTD one \eTD \bTD two \eTD \bTD three \eTD \eTR \eTABLE \stopplacetable \samplefile{lorem} \startplacetable \bTABLE[textwidth=\dimexpr\textwidth+\rightmarginwidth+\rightmargindistance\relax,option=stretch] \bTR \bTD one \eTD \bTD two \eTD \bTD three \eTD \eTR \eTABLE \stopplacetable \samplefile{lorem} \stoptext %%% end example Wolfgang ___ 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: Fwd: Re: Working with layer sets with Metapost
ot;Parola 3", z3); > > > > ); > > > > > > > > picture layerC; > > > > layerC:=image( > > > > label("Wort 4", z3+z1); > > > > ); > > > > > > > > picture layerY; > > > > layerY:=image( > > > > label("Nummer 5", z2+z3); > > > > ); > > > > > > > > picture layerU; > > > > layerU:=image( > > > > label("number 6", z2+z1); > > > > ); > > > > > > > > After that, I would define layer sets and layer subsets. This will be > > > > done manually for each layer set and each layer subset. > > > > I don't know the proper syntax to do that. Let's assume we could use a > > > > variable type called "myset". > > > > > > > > myset layersubsetGamma; > > > > layersubsetGamma:={layerU,layerM}; > > > > > > > > In my logic, the layers will be drawn in the order of their appearance > > > > within the {}. In the example, drawn content of layerM might cover > > > > drawn content of layerU. > > > > > > > > Contrary to a layer subset, each layer set will result in a PDF page, > > > > and thus the layer sets are related to each other by an inner order. > > > > That's why I would use an array variable here with []. > > > > > > > > I don't know how to append a set. In the following example, I assumed > > > > there would be a function myappend(, > > > initial set should be appended with>) > > > > > > > > myset layerset[]; > > > > layerset1 := {layerW,layerA}; > > > > layerset2 := myappend{layerset1, layerY}; > > > > layerset3 := myappend{layerset2, layersubsetGamma}; > > > > layerset4 := myappend{layerset2, layerU}; > > > > layerset5 := myappend{layerset4, layersubsetGamma}; > > > > > > > > Finally, I would need each layerset[k] typeset on its own pdf page. And > > > > of course on each page k, only the layers which appear in the > > > > definition of the layerset[k] should be drawn on top of each other in > > > > the order as they appear in that definition. > > > > > > > > I'm very curious to hear your suggestions. > > > > > > > > > > Not beautiful, perhaps, but maybe something like this could work? I > > > think there is no way out of doing some manual work to tell what you > > > want included on each page. > > > > > > \startuseMPgraphic{base} > > > z1 = origin ; > > > z2 = (10,50) ; > > > z3 = (40,30) ; > > > > > > picture layerA; > > > layerA:=image( > > > label("Word 1", z1); > > > ); > > > > > > picture layerW; > > > layerW:=image( > > > label("Mot 2", z2); > > > ); > > > > > > picture layerM; > > > layerM:=image( > > > label("Parola 3", z3); > > > ); > > > > > > picture layerC; > > > layerC:=image( > > > label("Wort 4", z3+z1); > > > ); > > > > > > picture layerY; > > > layerY:=image( > > > label("Nummer 5", z2+z3); > > > ); > > > > > > picture layerU; > > > layerU:=image( > > > label("number 6", z2+z1); > > > ); > > > \stopuseMPgraphic > > > > > > \startuseMPgraphic{Gamma} > > > draw layerU ; > > > draw layerM ; > > > \stopuseMPgraphic > > > > > > \startuseMPgraphic{layerset1} > > > \includeMPgraphic{base} > > > draw layerW ; > > > draw layerA ; > > > \stopuseMPgraphic > > > > > > \startuseMPgraphic{layerset2} > > > \includeMPgraphic{layerset1} ; > > > draw layerY ; > > > \stopuseMPgraphic > > > > > > \startuseMPgraphic{layerset3} > > > \includeMPgraphic{layerset2} ; > > > \includeMPgraphic{Gamma} ; > > > \stopuseMPgraphic > > > > > > > > > \startuseMPgraphic{layerset4} > > > \includeMPgraphic{layerset2} ; > > > draw layerU ; > > > \stopuseMPgraphic > > > > > > \startuseMPgraphic{layerset5} > > > \includeMPgraphic{layerset4} ; > > > \includeMPgraphic{Gamma} ; > > > \stopuseMPgraphic > > > > > > \starttext > > > > > > \
[NTG-context] Re: lmt_shade fails
Thanks for the reply Fabrice. Looks like something changed in the recent update. I'm sure Hans will pick it up. Best wishes Keith McKay On Mon, 19 Feb 2024, 13:21 Fabrice L, wrote: > Dear Keith, > > Le 18 févr. 2024 à 11:44, Keith McKay a écrit : > > Hi all > > I went to use the lmt_shade function and it fails with two error messages. > the first one is: > *metafun > log > error: Not a cycle* > followed by lots of trace messages, then: > *metafun > log > That contour should have ended with '.. cycle' or '& > cycle'. So I'll not change* > *anything just now.* > The MWE I used is as follows: > \starttext > \startMPpage > definecolor [ name = "MyColor3", r = uniformdeviate(1), g = > uniformdeviate(1), b = uniformdeviate(1) ] ; > definecolor [ name = "MyColor4", r = uniformdeviate(1), g = > uniformdeviate(1), b = uniformdeviate(1) ] ; > draw lmt_shade [ > path = fullsquare scaled 5cm, > direction = "up", > alternative = "linear", > colors = { "red", "green" }, > ]; > \stopMPpage > \stoptext > > I'm using: > > *system > ConTeXt ver: 2024.02.14 13:38 LMTX fmt: 2024.2.15 > int: english/english* > > on a mac mini M1. > > Any thougths? > > > On an Mac running ConTeXt ver: 2023.09.26 18:19 LMTX fmt: 2023.12.11 , > this works perfectly. > > Best wishes > > Keith McKay > > Fabrice. > > > ___ > 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 > > ___ > > > > ___ > 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 > > ___ > ___ 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
Dear Pablo, I shell try it. Many thanks. Uschi -Ursprüngliche Nachricht- Von: Pablo Rodriguez via ntg-context Gesendet: Montag, 19. Februar 2024 14:31 An: ntg-context@ntg.nl Cc: Pablo Rodriguez Betreff: [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 ___ ___ 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: Fwd: Re: Working with layer sets with Metapost
be drawn in the order of their appearance > > > within the {}. In the example, drawn content of layerM might cover drawn > > > content of layerU. > > > > > > Contrary to a layer subset, each layer set will result in a PDF page, and > > > thus the layer sets are related to each other by an inner order. That's > > > why I would use an array variable here with []. > > > > > > I don't know how to append a set. In the following example, I assumed > > > there would be a function myappend(, > > initial set should be appended with>) > > > > > > myset layerset[]; > > > layerset1 := {layerW,layerA}; > > > layerset2 := myappend{layerset1, layerY}; > > > layerset3 := myappend{layerset2, layersubsetGamma}; > > > layerset4 := myappend{layerset2, layerU}; > > > layerset5 := myappend{layerset4, layersubsetGamma}; > > > > > > Finally, I would need each layerset[k] typeset on its own pdf page. And > > > of course on each page k, only the layers which appear in the definition > > > of the layerset[k] should be drawn on top of each other in the order as > > > they appear in that definition. > > > > > > I'm very curious to hear your suggestions. > > > > > > > Not beautiful, perhaps, but maybe something like this could work? I > > think there is no way out of doing some manual work to tell what you > > want included on each page. > > > > \startuseMPgraphic{base} > > z1 = origin ; > > z2 = (10,50) ; > > z3 = (40,30) ; > > > > picture layerA; > > layerA:=image( > > label("Word 1", z1); > > ); > > > > picture layerW; > > layerW:=image( > > label("Mot 2", z2); > > ); > > > > picture layerM; > > layerM:=image( > > label("Parola 3", z3); > > ); > > > > picture layerC; > > layerC:=image( > > label("Wort 4", z3+z1); > > ); > > > > picture layerY; > > layerY:=image( > > label("Nummer 5", z2+z3); > > ); > > > > picture layerU; > > layerU:=image( > > label("number 6", z2+z1); > > ); > > \stopuseMPgraphic > > > > \startuseMPgraphic{Gamma} > > draw layerU ; > > draw layerM ; > > \stopuseMPgraphic > > > > \startuseMPgraphic{layerset1} > > \includeMPgraphic{base} > > draw layerW ; > > draw layerA ; > > \stopuseMPgraphic > > > > \startuseMPgraphic{layerset2} > > \includeMPgraphic{layerset1} ; > > draw layerY ; > > \stopuseMPgraphic > > > > \startuseMPgraphic{layerset3} > > \includeMPgraphic{layerset2} ; > > \includeMPgraphic{Gamma} ; > > \stopuseMPgraphic > > > > > > \startuseMPgraphic{layerset4} > > \includeMPgraphic{layerset2} ; > > draw layerU ; > > \stopuseMPgraphic > > > > \startuseMPgraphic{layerset5} > > \includeMPgraphic{layerset4} ; > > \includeMPgraphic{Gamma} ; > > \stopuseMPgraphic > > > > \starttext > > > > \startTEXpage[offset=1DK] > > \useMPgraphic{layerset1} > > \stopTEXpage > > > > \startTEXpage[offset=1DK] > > \useMPgraphic{layerset2} > > \stopTEXpage > > > > \startTEXpage[offset=1DK] > > \useMPgraphic{layerset3} > > \stopTEXpage > > > > \startTEXpage[offset=1DK] > > \useMPgraphic{layerset4} > > \stopTEXpage > > > > \startTEXpage[offset=1DK] > > \useMPgraphic{layerset5} > > \stopTEXpage > > > > \stoptext > > > > /Mikael > > ___ > > 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 > > ___ > > > > ___ > > 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
[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] Fwd: Re: Working with layer sets with Metapost
hey appear in that definition.> >> > I'm very curious to hear your suggestions.> >>> Not beautiful, perhaps, but maybe something like this could work? I> think there is no way out of doing some manual work to tell what you> want included on each page.>> \startuseMPgraphic{base}> z1 = origin ;> z2 = (10,50) ;> z3 = (40,30) ;>> picture layerA;> layerA:=image(> label("Word 1", z1);> );>> picture layerW;> layerW:=image(> label("Mot 2", z2);> );>> picture layerM;> layerM:=image(> label("Parola 3", z3);> );>> picture layerC;> layerC:=image(> label("Wort 4", z3+z1);> );>> picture layerY;> layerY:=image(> label("Nummer 5", z2+z3);> );>> picture layerU;> layerU:=image(> label("number 6", z2+z1);> );> \stopuseMPgraphic>> \startuseMPgraphic{Gamma}> draw layerU ;> draw layerM ;> \stopuseMPgraphic>> \startuseMPgraphic{layerset1}> \includeMPgraphic{base}> draw layerW ;> draw layerA ;> \stopuseMPgraphic>> \startuseMPgraphic{layerset2}> \includeMPgraphic{layerset1} ;> draw layerY ;> \stopuseMPgraphic>> \startuseMPgraphic{layerset3}> \includeMPgraphic{layerset2} ;> \includeMPgraphic{Gamma} ;> \stopuseMPgraphic>>> \startuseMPgraphic{layerset4}> \includeMPgraphic{layerset2} ;> draw layerU ;> \stopuseMPgraphic>> \startuseMPgraphic{layerset5}> \includeMPgraphic{layerset4} ;> \includeMPgraphic{Gamma} ;> \stopuseMPgraphic>> \starttext>> \startTEXpage[offset=1DK]> \useMPgraphic{layerset1}> \stopTEXpage>> \startTEXpage[offset=1DK]> \useMPgraphic{layerset2}> \stopTEXpage>> \startTEXpage[offset=1DK]> \useMPgraphic{layerset3}> \stopTEXpage>> \startTEXpage[offset=1DK]> \useMPgraphic{layerset4}> \stopTEXpage>> \startTEXpage[offset=1DK]> \useMPgraphic{layerset5}> \stopTEXpage>> \stoptext>> /Mikael> ___> 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> ___>> ___> 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> ___>> ___> 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> ___>> ___> 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> __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.nlwebpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)archive : https://github.com/contextgarden/contextwiki : https://wiki.contextgarden.net__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.nlwebpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)archive : https://github.com/contextgarden/contextwiki : https://wiki.contextgarden.net___ multipage_metapost_mwe-very_simple.tex Description: Binary data layer_sets.tex Description: Binary data ___ 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
Hi Uschi, The log file is certainly helpful. It tells me two things. First, you have TeX Live 2023 installed. TeX Live 2023 has a good version of ConTeXt. Unless you need specific, newer ConTeXt features, you can use the ConTeXt version in TeX Live that you already have. Second, when you tried to typeset your file, context-test.tex, your computer attempted to use pdftex rather than ConTeXt. To figure out why it did that, we need to know how you are doing the typesetting. Do you use a command on the command line? Are use using an editor that has a “typeset” button? Something in that part of the process needs to be changed so the typesetting uses ConTeXt rather than pdftex. Gavin > On Feb 19, 2024, at 5:06 AM, 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 Folder: > C:\Users\Hermann\Downloads\context-mswin\tex\texmf-context\tex\context\test\mkiv > startup error : no format file given, quitting > I wrote on Wednesday last week. I also did an download of cont- lmt and cont- > tmf. Don’t know if there is a mistake which is my fault? > I don’t know, maybe important: > The log file says: > 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 > entering extended mode > restricted \write18 enabled. > %&-line parsing enabled. > **context-test.tex > (./context-test.tex > LaTeX2e <2023-11-01> patch level 1 > L3 programming layer <2024-01-22> > ! Undefined control sequence. > l.1 \starttext > ? ! Emergency stop. > l.1 >End of file on the terminal! > Here is how much of TeX's memory you used: > 16 strings out of 474221 > 403 string characters out of 5750189 > 1922978 words of memory out of 500 > 22371 multiletter control sequences out of 15000+60 > 558069 words of font info for 36 fonts, out of 800 for 9000 > 1141 hyphenation exceptions out of 8191 > 12i,0n,13p,58b,8s stack positions out of 1i,1000n,2p,20b,20s > ! ==> Fatal error occurred, no output PDF file produced! > Uschi > Von: Ursula Hermann > Gesendet: Mittwoch, 14. Februar 2024 14:16 > An: 'mailing list for ConTeXt users' > Betreff: AW: Sorry for once more asking, i am at Work > Dear Hans, > This was before you wrote, that you did an new upload, but i saw it in the > installation. Because there were more files. > Uschi > Von: Ursula Hermann > Gesendet: Mittwoch, 14. Februar 2024 13:42 > An: 'mailing list for ConTeXt users' > Betreff: Sorry for once more asking, i am at Work > So after a new update on my Computer at Work, I did once more download the > installation. After compiling with context-mswin I got this file > Command Line: context.exe --synctex=-1 "context-test.tex" > Startup Folder: > C:\Users\Hermann\Downloads\context-mswin\tex\texmf-context\tex\context\test\mkiv > startup error : no format file given, quitting > > ConTeXt Compilation Report (Pages: 0) > Errors: 0 Warnings: 0 Bad Boxes: 0 > Did I something wrong? > Uschi > ___ > 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 > ___ ___ 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: lmt_shade fails
Dear Keith, > Le 18 févr. 2024 à 11:44, Keith McKay a écrit : > > Hi all > I went to use the lmt_shade function and it fails with two error messages. > the first one is: > > metafun > log > error: Not a cycle > > followed by lots of trace messages, then: > > metafun > log > That contour should have ended with '.. cycle' or '& > cycle'. So I'll not change > anything just now. > > The MWE I used is as follows: > > \starttext > \startMPpage > definecolor [ name = "MyColor3", r = uniformdeviate(1), g = > uniformdeviate(1), b = uniformdeviate(1) ] ; > definecolor [ name = "MyColor4", r = uniformdeviate(1), g = > uniformdeviate(1), b = uniformdeviate(1) ] ; > draw lmt_shade [ > path = fullsquare scaled 5cm, > direction = "up", > alternative = "linear", > colors = { "red", "green" }, > ]; > \stopMPpage > \stoptext > I'm using: > > system > ConTeXt ver: 2024.02.14 13:38 LMTX fmt: 2024.2.15 int: > english/english > > on a mac mini M1. > > Any thougths? > On an Mac running ConTeXt ver: 2023.09.26 18:19 LMTX fmt: 2023.12.11 , this works perfectly. > Best wishes > > Keith McKay > Fabrice. > ___ > 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 > ___ ___ 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
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 Folder: C:\Users\Hermann\Downloads\context-mswin\tex\texmf-context\tex\context\test\mkiv startup error : no format file given, quitting I wrote on Wednesday last week. I also did an download of cont- lmt and cont- tmf. Don't know if there is a mistake which is my fault? I don't know, maybe important: The log file says: 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 entering extended mode restricted \write18 enabled. %&-line parsing enabled. **context-test.tex (./context-test.tex LaTeX2e <2023-11-01> patch level 1 L3 programming layer <2024-01-22> ! Undefined control sequence. l.1 \starttext ? ! Emergency stop. l.1 End of file on the terminal! Here is how much of TeX's memory you used: 16 strings out of 474221 403 string characters out of 5750189 1922978 words of memory out of 500 22371 multiletter control sequences out of 15000+60 558069 words of font info for 36 fonts, out of 800 for 9000 1141 hyphenation exceptions out of 8191 12i,0n,13p,58b,8s stack positions out of 1i,1000n,2p,20b,20s ! ==> Fatal error occurred, no output PDF file produced! Uschi Von: Ursula Hermann Gesendet: Mittwoch, 14. Februar 2024 14:16 An: 'mailing list for ConTeXt users' Betreff: AW: Sorry for once more asking, i am at Work Dear Hans, This was before you wrote, that you did an new upload, but i saw it in the installation. Because there were more files. Uschi Von: Ursula Hermann Gesendet: Mittwoch, 14. Februar 2024 13:42 An: 'mailing list for ConTeXt users' mailto:ntg-context@ntg.nl>> Betreff: Sorry for once more asking, i am at Work So after a new update on my Computer at Work, I did once more download the installation. After compiling with context-mswin I got this file Command Line: context.exe --synctex=-1 "context-test.tex" Startup Folder: C:\Users\Hermann\Downloads\context-mswin\tex\texmf-context\tex\context\test\mkiv startup error : no format file given, quitting ConTeXt Compilation Report (Pages: 0) Errors: 0 Warnings: 0 Bad Boxes: 0 Did I something wrong? Uschi ___ 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: Best way to input UTF-8
On Mon, 19 Feb 2024 09:45:03 +0800 黄复雄 wrote: > I recommend you to always show missing font markers in PDF documents > with \replacemissingcharacters Or let context throw an error in case a font/char is missing: %% alternative: %% context --errors='*' \enabledirectives [logs.errors=*] %% missing font \definefontfamily [foo] [serif] [no font here really] \setupbodyfont [foo] \starttext %% missing characters 𝒜 \stoptext Marco ___ 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: Best way to input UTF-8
On Sun, 18 Feb 2024 22:12:25 +0530 Shiv Shankar Dayal wrote: > What is the best way to input UTF-8 in LuaMetaTex? “Best” is subjective. What might be a good way for me might not be your preferred way. LuaMetaTex doesn't care at all *how* you input the characters into your text editor. The characters end up in the tex file and that's what's processed by context. \starttext Ωµ±åö←§… \stoptext Methods: - custom keyboard layout (my preferred way) - compose key - symbol input tables (provided by your OS) - copy-pasting symbols from somewhere else - … > If I use the UTF-8 characters then do not come out in text with > Modern font. You need to select a font containing the characters you need. Or set up a fallback for a certain range: https://wiki.contextgarden.net/Command/definefallbackfamily Marco ___ 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] lmt_shade fails
Hi all I went to use the lmt_shade function and it fails with two error messages. the first one is: /metafun > log > error: Not a cycle/ followed by lots of trace messages, then: /metafun > log > That contour should have ended with '.. cycle' or '& cycle'. So I'll not change/ /anything just now./ // The MWE I used is as follows: \starttext \startMPpage definecolor [ name = "MyColor3", r = uniformdeviate(1), g = uniformdeviate(1), b = uniformdeviate(1) ] ; definecolor [ name = "MyColor4", r = uniformdeviate(1), g = uniformdeviate(1), b = uniformdeviate(1) ] ; draw lmt_shade [ path = fullsquare scaled 5cm, direction = "up", alternative = "linear", colors = { "red", "green" }, ]; \stopMPpage \stoptext I'm using: /system > ConTeXt ver: 2024.02.14 13:38 LMTX fmt: 2024.2.15 int: english/english/ on a mac mini M1. Any thougths? Best wishes Keith McKay ___ 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: Problem with wiki example
Never mind it was my idiocy. On Sun, Feb 18, 2024 at 3:29 AM Shiv Shankar Dayal < shivshankar.da...@gmail.com> wrote: > I found following on Wiki to produce PDF out of standalone type( > https://wiki.contextgarden.net/Sharing_graphics): > > \starttext > \startMPpage > draw fullcircle scaled 10cm ; > \stopMPPage > \stoptext > > It generates a PDF but when I open it with Evince, Evince complains that > no page was found > and does not show anything. Any help would be much appreciated. > > -- > Respect, > Shiv Shankar Dayal > -- Respect, Shiv Shankar Dayal ___ 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] Problem with wiki example
I found following on Wiki to produce PDF out of standalone type( https://wiki.contextgarden.net/Sharing_graphics): \starttext \startMPpage draw fullcircle scaled 10cm ; \stopMPPage \stoptext It generates a PDF but when I open it with Evince, Evince complains that no page was found and does not show anything. Any help would be much appreciated. -- Respect, Shiv Shankar Dayal ___ 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: Working with layer sets with Metapost
; > > > layerset3 := myappend{layerset2, layersubsetGamma}; > > > layerset4 := myappend{layerset2, layerU}; > > > layerset5 := myappend{layerset4, layersubsetGamma}; > > > > > > Finally, I would need each layerset[k] typeset on its own pdf page. And > > > of course on each page k, only the layers which appear in the definition > > > of the layerset[k] should be drawn on top of each other in the order as > > > they appear in that definition. > > > > > > I'm very curious to hear your suggestions. > > > > > > > Not beautiful, perhaps, but maybe something like this could work? I > > think there is no way out of doing some manual work to tell what you > > want included on each page. > > > > \startuseMPgraphic{base} > > z1 = origin ; > > z2 = (10,50) ; > > z3 = (40,30) ; > > > > picture layerA; > > layerA:=image( > > label("Word 1", z1); > > ); > > > > picture layerW; > > layerW:=image( > > label("Mot 2", z2); > > ); > > > > picture layerM; > > layerM:=image( > > label("Parola 3", z3); > > ); > > > > picture layerC; > > layerC:=image( > > label("Wort 4", z3+z1); > > ); > > > > picture layerY; > > layerY:=image( > > label("Nummer 5", z2+z3); > > ); > > > > picture layerU; > > layerU:=image( > > label("number 6", z2+z1); > > ); > > \stopuseMPgraphic > > > > \startuseMPgraphic{Gamma} > > draw layerU ; > > draw layerM ; > > \stopuseMPgraphic > > > > \startuseMPgraphic{layerset1} > > \includeMPgraphic{base} > > draw layerW ; > > draw layerA ; > > \stopuseMPgraphic > > > > \startuseMPgraphic{layerset2} > > \includeMPgraphic{layerset1} ; > > draw layerY ; > > \stopuseMPgraphic > > > > \startuseMPgraphic{layerset3} > > \includeMPgraphic{layerset2} ; > > \includeMPgraphic{Gamma} ; > > \stopuseMPgraphic > > > > > > \startuseMPgraphic{layerset4} > > \includeMPgraphic{layerset2} ; > > draw layerU ; > > \stopuseMPgraphic > > > > \startuseMPgraphic{layerset5} > > \includeMPgraphic{layerset4} ; > > \includeMPgraphic{Gamma} ; > > \stopuseMPgraphic > > > > \starttext > > > > \startTEXpage[offset=1DK] > > \useMPgraphic{layerset1} > > \stopTEXpage > > > > \startTEXpage[offset=1DK] > > \useMPgraphic{layerset2} > > \stopTEXpage > > > > \startTEXpage[offset=1DK] > > \useMPgraphic{layerset3} > > \stopTEXpage > > > > \startTEXpage[offset=1DK] > > \useMPgraphic{layerset4} > > \stopTEXpage > > > > \startTEXpage[offset=1DK] > > \useMPgraphic{layerset5} > > \stopTEXpage > > > > \stoptext > > > > /Mikael > > ___ > > 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 > > ___ > > > > ___ > > 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 > > ___ > > > > ___ > > 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 > > ___ > > > > ___ > > 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 > > ___ > ___ > 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 > ___ > layer_sets.md Description: Binary data layer_sets.pdf Description: Adobe PDF document layer_sets.tex Description: TeX document ___ 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] behaviour sy in externalfigure
The scaling in \externalfigure[][] with option sy=number seems to have a discrete change in behaviour between sy=1.0 and sy=(not 1.0).The MWE (see below, FIGURE REMOVED BECAUSE OTHERWISE MESSAGE TOO LARGE) shows that factor sy≠1.0 is applied to the original height of the figure, but for sy=1.0 the height is changed proportional to the reduction in width.Thus the series sy=0.999 sy=1.0 sy=1.001 has a discontinuity in the scaling of height.I would expect sy=1.0 to return the figure in the original height.Is this behaviour on purpose? With the current behaviour I must provide for sy=1.0 => sy=1.001 in order to get the original height. Although not to difficult with a jump to Lua code, I would prefer not.yours sincerelydr. Hans van der Meer\starttext\ConTeXt\space version \contextversion\blank\type{\externalfigure[testfile.jpg]} source figure\crlf\externalfigure[testfile.jpg]\crlf\type{\externalfigure[testfile.jpg][width=5cm]}\crlf\externalfigure[testfile.jpg][width=5cm]\crlfExplanation: height scaled proportional to the width reduction.\blank\type{\externalfigure[testfile.jpg][width=5cm,sy=0.999]}\crlf\externalfigure[testfile.jpg][width=5cm,sy=1.001]\crlfExplanation: sy different from 1.0 applies sy to original height.\blank\type{\externalfigure[testfile.jpg][width=5cm,sy=1.0]}\crlf\externalfigure[testfile.jpg][width=5cm,sy=1.0]\crlfExplanation: sy=1.0 exactly is ignored?\blank\type{\externalfigure[testfile.jpg][width=5cm,sy=1.001]}\crlf\externalfigure[testfile.jpg][width=5cm,sy=1.001]\crlfExplanation: sy different from 1.0 applies sy to original height.\blank\stoptext testsyscaling.pdf Description: Adobe PDF document met vriendelijke groet,dr. Hans van der MeerBurgemeester Rijnderslaan 244 ingang D1185 MC Amstelveentel. 020 6452701 / 06 53743629 ___ 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: Working with layer sets with Metapost
ge( > label("Word 1", z1); > ); > > picture layerW; > layerW:=image( > label("Mot 2", z2); > ); > > picture layerM; > layerM:=image( > label("Parola 3", z3); > ); > > picture layerC; > layerC:=image( > label("Wort 4", z3+z1); > ); > > picture layerY; > layerY:=image( > label("Nummer 5", z2+z3); > ); > > picture layerU; > layerU:=image( > label("number 6", z2+z1); > ); > \stopuseMPgraphic > > \startuseMPgraphic{Gamma} > draw layerU ; > draw layerM ; > \stopuseMPgraphic > > \startuseMPgraphic{layerset1} > \includeMPgraphic{base} > draw layerW ; > draw layerA ; > \stopuseMPgraphic > > \startuseMPgraphic{layerset2} > \includeMPgraphic{layerset1} ; > draw layerY ; > \stopuseMPgraphic > > \startuseMPgraphic{layerset3} > \includeMPgraphic{layerset2} ; > \includeMPgraphic{Gamma} ; > \stopuseMPgraphic > > > \startuseMPgraphic{layerset4} > \includeMPgraphic{layerset2} ; > draw layerU ; > \stopuseMPgraphic > > \startuseMPgraphic{layerset5} > \includeMPgraphic{layerset4} ; > \includeMPgraphic{Gamma} ; > \stopuseMPgraphic > > \starttext > > \startTEXpage[offset=1DK] > \useMPgraphic{layerset1} > \stopTEXpage > > \startTEXpage[offset=1DK] > \useMPgraphic{layerset2} > \stopTEXpage > > \startTEXpage[offset=1DK] > \useMPgraphic{layerset3} > \stopTEXpage > > \startTEXpage[offset=1DK] > \useMPgraphic{layerset4} > \stopTEXpage > > \startTEXpage[offset=1DK] > \useMPgraphic{layerset5} > \stopTEXpage > > \stoptext > > /Mikael > ___ > 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 > ___ > > ___ > 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 > ___ > > ___ > 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 > ___ > > ___ > 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 > ___ ___ 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: Working with layer sets with Metapost
; > the order as they appear in that definition. > > > > > > > > I'm very curious to hear your suggestions. > > > > > > > > > > Not beautiful, perhaps, but maybe something like this could work? I > > > think there is no way out of doing some manual work to tell what you > > > want included on each page. > > > > > > \startuseMPgraphic{base} > > > z1 = origin ; > > > z2 = (10,50) ; > > > z3 = (40,30) ; > > > > > > picture layerA; > > > layerA:=image( > > > label("Word 1", z1); > > > ); > > > > > > picture layerW; > > > layerW:=image( > > > label("Mot 2", z2); > > > ); > > > > > > picture layerM; > > > layerM:=image( > > > label("Parola 3", z3); > > > ); > > > > > > picture layerC; > > > layerC:=image( > > > label("Wort 4", z3+z1); > > > ); > > > > > > picture layerY; > > > layerY:=image( > > > label("Nummer 5", z2+z3); > > > ); > > > > > > picture layerU; > > > layerU:=image( > > > label("number 6", z2+z1); > > > ); > > > \stopuseMPgraphic > > > > > > \startuseMPgraphic{Gamma} > > > draw layerU ; > > > draw layerM ; > > > \stopuseMPgraphic > > > > > > \startuseMPgraphic{layerset1} > > > \includeMPgraphic{base} > > > draw layerW ; > > > draw layerA ; > > > \stopuseMPgraphic > > > > > > \startuseMPgraphic{layerset2} > > > \includeMPgraphic{layerset1} ; > > > draw layerY ; > > > \stopuseMPgraphic > > > > > > \startuseMPgraphic{layerset3} > > > \includeMPgraphic{layerset2} ; > > > \includeMPgraphic{Gamma} ; > > > \stopuseMPgraphic > > > > > > > > > \startuseMPgraphic{layerset4} > > > \includeMPgraphic{layerset2} ; > > > draw layerU ; > > > \stopuseMPgraphic > > > > > > \startuseMPgraphic{layerset5} > > > \includeMPgraphic{layerset4} ; > > > \includeMPgraphic{Gamma} ; > > > \stopuseMPgraphic > > > > > > \starttext > > > \startTEXpage[offset=1DK] > > > \useMPgraphic{layerset1} > > > \stopTEXpage > > > > > > \startTEXpage[offset=1DK] > > > \useMPgraphic{layerset2} > > > \stopTEXpage > > > > > > \startTEXpage[offset=1DK] > > > \useMPgraphic{layerset3} > > > \stopTEXpage > > > > > > \startTEXpage[offset=1DK] > > > \useMPgraphic{layerset4} > > > \stopTEXpage > > > > > > \startTEXpage[offset=1DK] > > > \useMPgraphic{layerset5} > > > \stopTEXpage > > > > > > \stoptext > > > /Mikael > > > ___ > > > 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 > > > ___ > > > > > > > ___ > > 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 > > ___ > > ___ > 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 > ___ ___ 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: Working with layer sets with Metapost
Dear Mikael, I actually need to keep the \dorecurse mechanism of the mwe (from line 44 on), because I need the "setbounds currentpicture to TheFrame" and also because I need page numbering inside the MPpage, as done with draw textext(decimal(currentime)). So, how can I use the \useMPgraphic{layerset1} etc. inside the \dorecurse, assuming I name my layersets "layerset1", "layerset2", "layerset3" etc.? Emanuel On Feb. 15 2024, at 10:07 pm, Emanuel Han via ntg-context wrote: > Dear Mikael, > thanks a lot! > this seems to be the solution! And it looks beatiful enough to me 😄 > I'll try to port all my layers to this new method and see if I run into new > problems again 😅 > > Emanuel > > On Feb. 15 2024, at 8:19 am, Mikael Sundqvist wrote: > > Hi > > > > On Thu, Feb 15, 2024 at 1:03 AM Emanuel Han via ntg-context > > wrote: > > > > > > Dear list, > > > > > > the attached .tex file is the minimal working example we discussed today > > > in the online meeting. > > > > > > I realized that the approach of looping through k of p[k] is not fitting > > > my needs, because it's not flexible enough. > > > > > > I need another approach, one which works with layer sets. > > > > > > I would stop using p as an array, because with the layer sets approach we > > > don't have a fixed order of the layers. > > > > > > So the definition of the layers would be something like > > > > > > picture layerA; > > > layerA:=image( > > > label("Word 1", z1); > > > ); > > > > > > picture layerW; > > > layerW:=image( > > > label("Mot 2", z2); > > > ); > > > > > > picture layerM; > > > layerM:=image( > > > label("Parola 3", z3); > > > ); > > > > > > picture layerC; > > > layerC:=image( > > > label("Wort 4", z3+z1); > > > ); > > > > > > picture layerY; > > > layerY:=image( > > > label("Nummer 5", z2+z3); > > > ); > > > > > > picture layerU; > > > layerU:=image( > > > label("number 6", z2+z1); > > > ); > > > > > > After that, I would define layer sets and layer subsets. This will be > > > done manually for each layer set and each layer subset. > > > I don't know the proper syntax to do that. Let's assume we could use a > > > variable type called "myset". > > > > > > myset layersubsetGamma; > > > layersubsetGamma:={layerU,layerM}; > > > > > > In my logic, the layers will be drawn in the order of their appearance > > > within the {}. In the example, drawn content of layerM might cover drawn > > > content of layerU. > > > > > > Contrary to a layer subset, each layer set will result in a PDF page, and > > > thus the layer sets are related to each other by an inner order. That's > > > why I would use an array variable here with []. > > > > > > I don't know how to append a set. In the following example, I assumed > > > there would be a function myappend(, > > initial set should be appended with>) > > > > > > myset layerset[]; > > > layerset1 := {layerW,layerA}; > > > layerset2 := myappend{layerset1, layerY}; > > > layerset3 := myappend{layerset2, layersubsetGamma}; > > > layerset4 := myappend{layerset2, layerU}; > > > layerset5 := myappend{layerset4, layersubsetGamma}; > > > > > > Finally, I would need each layerset[k] typeset on its own pdf page. And > > > of course on each page k, only the layers which appear in the definition > > > of the layerset[k] should be drawn on top of each other in the order as > > > they appear in that definition. > > > > > > I'm very curious to hear your suggestions. > > > > > > > Not beautiful, perhaps, but maybe something like this could work? I > > think there is no way out of doing some manual work to tell what you > > want included on each page. > > > > \startuseMPgraphic{base} > > z1 = origin ; > > z2 = (10,50) ; > > z3 = (40,30) ; > > > > picture layerA; > > layerA:=image( > > label("Word 1", z1); > > ); > > > > picture layerW; > > layerW:=image( > > label("Mot 2", z2); > > ); > > > > picture layerM; > > layerM:=image( > > lab
[NTG-context] Re: Working with layer sets with Metapost
Dear Mikael, thanks a lot! this seems to be the solution! And it looks beatiful enough to me 😄 I'll try to port all my layers to this new method and see if I run into new problems again 😅 Emanuel On Feb. 15 2024, at 8:19 am, Mikael Sundqvist wrote: > Hi > > On Thu, Feb 15, 2024 at 1:03 AM Emanuel Han via ntg-context > wrote: > > > > Dear list, > > > > the attached .tex file is the minimal working example we discussed today in > > the online meeting. > > > > I realized that the approach of looping through k of p[k] is not fitting my > > needs, because it's not flexible enough. > > > > I need another approach, one which works with layer sets. > > > > I would stop using p as an array, because with the layer sets approach we > > don't have a fixed order of the layers. > > > > So the definition of the layers would be something like > > > > picture layerA; > > layerA:=image( > > label("Word 1", z1); > > ); > > > > picture layerW; > > layerW:=image( > > label("Mot 2", z2); > > ); > > > > picture layerM; > > layerM:=image( > > label("Parola 3", z3); > > ); > > > > picture layerC; > > layerC:=image( > > label("Wort 4", z3+z1); > > ); > > > > picture layerY; > > layerY:=image( > > label("Nummer 5", z2+z3); > > ); > > > > picture layerU; > > layerU:=image( > > label("number 6", z2+z1); > > ); > > > > After that, I would define layer sets and layer subsets. This will be done > > manually for each layer set and each layer subset. > > I don't know the proper syntax to do that. Let's assume we could use a > > variable type called "myset". > > > > myset layersubsetGamma; > > layersubsetGamma:={layerU,layerM}; > > > > In my logic, the layers will be drawn in the order of their appearance > > within the {}. In the example, drawn content of layerM might cover drawn > > content of layerU. > > > > Contrary to a layer subset, each layer set will result in a PDF page, and > > thus the layer sets are related to each other by an inner order. That's why > > I would use an array variable here with []. > > > > I don't know how to append a set. In the following example, I assumed there > > would be a function myappend(, > set should be appended with>) > > > > myset layerset[]; > > layerset1 := {layerW,layerA}; > > layerset2 := myappend{layerset1, layerY}; > > layerset3 := myappend{layerset2, layersubsetGamma}; > > layerset4 := myappend{layerset2, layerU}; > > layerset5 := myappend{layerset4, layersubsetGamma}; > > > > Finally, I would need each layerset[k] typeset on its own pdf page. And of > > course on each page k, only the layers which appear in the definition of > > the layerset[k] should be drawn on top of each other in the order as they > > appear in that definition. > > > > I'm very curious to hear your suggestions. > > > > Not beautiful, perhaps, but maybe something like this could work? I > think there is no way out of doing some manual work to tell what you > want included on each page. > > \startuseMPgraphic{base} > z1 = origin ; > z2 = (10,50) ; > z3 = (40,30) ; > > picture layerA; > layerA:=image( > label("Word 1", z1); > ); > > picture layerW; > layerW:=image( > label("Mot 2", z2); > ); > > picture layerM; > layerM:=image( > label("Parola 3", z3); > ); > > picture layerC; > layerC:=image( > label("Wort 4", z3+z1); > ); > > picture layerY; > layerY:=image( > label("Nummer 5", z2+z3); > ); > > picture layerU; > layerU:=image( > label("number 6", z2+z1); > ); > \stopuseMPgraphic > > \startuseMPgraphic{Gamma} > draw layerU ; > draw layerM ; > \stopuseMPgraphic > > \startuseMPgraphic{layerset1} > \includeMPgraphic{base} > draw layerW ; > draw layerA ; > \stopuseMPgraphic > > \startuseMPgraphic{layerset2} > \includeMPgraphic{layerset1} ; > draw layerY ; > \stopuseMPgraphic > > \startuseMPgraphic{layerset3} > \includeMPgraphic{layerset2} ; > \includeMPgraphic{Gamma} ; > \stopuseMPgraphic > > > \startuseMPgraphic{layerset4} > \includeMPgraphic{layerset2} ; > draw layerU ; > \stopuseMPgraphic > > \startuseMPgraphic{layerset5} > \includeMPgraphic{layerset4} ; > \include
[NTG-context] XML processing, unwanted indentation/alignment
Greetings, I'm typesetting an address book whose addresses are in XML. A typical entry has this structure: initials and birthday are required, first_name can be left blank and email, mobile and maiden_name are optional. I've written a macro (name) to compose the name, i.e. initials, first_name (maiden_name), and another macro (nameemaillink) to make the name a link associated with an email address. % Derive an individual's name \def\name#1% {\ifxmlattempty{#1}{first_name} {\xmlatt{#1}{initials}} \else {\xmlatt{#1}{initials}, \xmlatt{#1}{first_name}} \fi \ifxmlattempty{#1}{maiden_name} {} \else { \tfxx(\xmlatt{#1}{maiden_name})} \fi} % Create a mailto:link that associates a individual's name with their email address. \def\nameemaillink#1% {\ifxmlattempty{#1}{email} {\name{#1}} \else {\goto{\name{#1}} [url(mailto:\xmlatt{#1}{email})]} \fi} I thought I was done when I noticed that a composed name with an empty first name, with or without an email address, is slightly indented. In the mwe Moe and Curly, without first names, are indented; while Shemp and Michael aren't. That the undesired indentation/alignment is dependent on the presence of a first name is baffling. After this long description, if someone would look at the code and tell me where I've gone wrong I would be very grateful. The interesting bits begin on lines 8 and 12 in xml.tex. -- With kind regards, Michael % XML processing instructions % Turn a phone number into a tel:link - without spaces \def\phonelink#1% {\goto{#1} [url(tel:\cldcontext{string.nospaces("#1")})]} % Derive an individual's name \def\name#1% {\ifxmlattempty{#1}{first_name} {\xmlatt{#1}{initials}} \else {\xmlatt{#1}{initials}, \xmlatt{#1}{first_name}} \fi \ifxmlattempty{#1}{maiden_name} {} \else { \tfxx(\xmlatt{#1}{maiden_name})} \fi} % Create a mailto:link that associates a individual's name with their email address. \def\nameemaillink#1% {\ifxmlattempty{#1}{email} {\name{#1}} \else {\goto{\name{#1}} [url(mailto:\xmlatt{#1}{email})]} \fi} % Make an individual's mobile phone number a tel:link. \def\mobilelink#1% {\ifxmlattempty{#1}{mobile} {} \else {\phonelink{\xmlatt{#1}{mobile}}} \fi} % Track these several elements. \startxmlsetups xml:list:base \xmlsetsetup{#1}{addressBook|family|address|members|member}{xml:list:*} \stopxmlsetups \xmlregisterdocumentsetup{list}{xml:list:base} % When we encounter the root element merely flush the rest. \startxmlsetups xml:list:addressBook \xmlflush{#1} \stopxmlsetups % Place each family in a frametext box \startxmlsetups xml:list:family \startframedtext[width=\textwidth] {\tfb \bf \xmlatt{#1}{surname}\ifxmlattempty{#1}{prefix}{}\else{, \xmlatt{#1}{prefix}}\fi}\blank \xmlflush{#1} \stopframedtext \blank[big] \stopxmlsetups % Enumerate the address information \startxmlsetups xml:list:address \xmlatt{#1}{street} \xmlatt{#1}{housenumber}\crlf \xmlatt{#1}{postcode} \xmlatt{#1}{city}\crlf \ifxmlattempty{#1}{telephone}{\vskip -1em}\else{\phonelink{\xmlatt{#1}{telephone}}}\fi %\vskip -1em \xmlflush{#1} \blank[big] \stopxmlsetups % The only purpose of the element is to make a table of members. \startxmlsetups xml:list:members \starttabulate[|l|l|l|] \xmlflush{#1} \stoptabulate \stopxmlsetups % Each gets his own table row. \startxmlsetups xml:list:member \NC \nameemaillink{#1} \NC \xmlatt{#1}{birthday} \NC \mobilelink{#1} \NC\NR \stopxmlsetups % finis \environment xml.tex % XML processing instructions \setupframedtext[frame=off, width=\textwidth, align={flushleft,broad,nothyphenated}] \setupinteraction[state=start, color=darkblue] \starttext \xmlprocessfile{list}{mwe.xml}{} \stoptext % finis mwe.pdf Description: Adobe PDF document ___ 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: Working with layer sets with Metapost
Hi On Thu, Feb 15, 2024 at 1:03 AM Emanuel Han via ntg-context wrote: > > Dear list, > > the attached .tex file is the minimal working example we discussed today in > the online meeting. > > I realized that the approach of looping through k of p[k] is not fitting my > needs, because it's not flexible enough. > > I need another approach, one which works with layer sets. > > I would stop using p as an array, because with the layer sets approach we > don't have a fixed order of the layers. > > So the definition of the layers would be something like > > picture layerA; > layerA:=image( > label("Word 1", z1); > ); > > picture layerW; > layerW:=image( > label("Mot 2", z2); > ); > > picture layerM; > layerM:=image( > label("Parola 3", z3); > ); > > picture layerC; > layerC:=image( > label("Wort 4", z3+z1); > ); > > picture layerY; > layerY:=image( > label("Nummer 5", z2+z3); > ); > > picture layerU; > layerU:=image( > label("number 6", z2+z1); > ); > > After that, I would define layer sets and layer subsets. This will be done > manually for each layer set and each layer subset. > I don't know the proper syntax to do that. Let's assume we could use a > variable type called "myset". > > myset layersubsetGamma; > layersubsetGamma:={layerU,layerM}; > > In my logic, the layers will be drawn in the order of their appearance within > the {}. In the example, drawn content of layerM might cover drawn content of > layerU. > > Contrary to a layer subset, each layer set will result in a PDF page, and > thus the layer sets are related to each other by an inner order. That's why I > would use an array variable here with []. > > I don't know how to append a set. In the following example, I assumed there > would be a function myappend(, should be appended with>) > > myset layerset[]; > layerset1 := {layerW,layerA}; > layerset2 := myappend{layerset1, layerY}; > layerset3 := myappend{layerset2, layersubsetGamma}; > layerset4 := myappend{layerset2, layerU}; > layerset5 := myappend{layerset4, layersubsetGamma}; > > Finally, I would need each layerset[k] typeset on its own pdf page. And of > course on each page k, only the layers which appear in the definition of the > layerset[k] should be drawn on top of each other in the order as they appear > in that definition. > > I'm very curious to hear your suggestions. > Not beautiful, perhaps, but maybe something like this could work? I think there is no way out of doing some manual work to tell what you want included on each page. \startuseMPgraphic{base} z1 = origin ; z2 = (10,50) ; z3 = (40,30) ; picture layerA; layerA:=image( label("Word 1", z1); ); picture layerW; layerW:=image( label("Mot 2", z2); ); picture layerM; layerM:=image( label("Parola 3", z3); ); picture layerC; layerC:=image( label("Wort 4", z3+z1); ); picture layerY; layerY:=image( label("Nummer 5", z2+z3); ); picture layerU; layerU:=image( label("number 6", z2+z1); ); \stopuseMPgraphic \startuseMPgraphic{Gamma} draw layerU ; draw layerM ; \stopuseMPgraphic \startuseMPgraphic{layerset1} \includeMPgraphic{base} draw layerW ; draw layerA ; \stopuseMPgraphic \startuseMPgraphic{layerset2} \includeMPgraphic{layerset1} ; draw layerY ; \stopuseMPgraphic \startuseMPgraphic{layerset3} \includeMPgraphic{layerset2} ; \includeMPgraphic{Gamma} ; \stopuseMPgraphic \startuseMPgraphic{layerset4} \includeMPgraphic{layerset2} ; draw layerU ; \stopuseMPgraphic \startuseMPgraphic{layerset5} \includeMPgraphic{layerset4} ; \includeMPgraphic{Gamma} ; \stopuseMPgraphic \starttext \startTEXpage[offset=1DK] \useMPgraphic{layerset1} \stopTEXpage \startTEXpage[offset=1DK] \useMPgraphic{layerset2} \stopTEXpage \startTEXpage[offset=1DK] \useMPgraphic{layerset3} \stopTEXpage \startTEXpage[offset=1DK] \useMPgraphic{layerset4} \stopTEXpage \startTEXpage[offset=1DK] \useMPgraphic{layerset5} \stopTEXpage \stoptext /Mikael ___ 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 numbering does not work
> Am 13.02.2024 um 16:54 schrieb Wolfgang Schuster > : > > Oliver Marugg schrieb am 13.02.2024 um 00:17: >> Hi >> Section numbering does not work until I remove \startbackmatter >> \stopbackmatter. I had a longer text file and I stripped it down until I >> found this? >> Greets Oliver >> Running freshly installed context ARM64 on m1 and updated it via sh >> install.sh on ARM64 macos 14.3.1: >> >> context --version >> mtx-context | ConTeXt Process Management 1.05 >> mtx-context | >> mtx-context | main context file: >> /Applications/ConTeXtStandalone/tex/texmf-context/tex/context/base/mkiv/context.mkiv >> mtx-context | current version: 2024.01.24 22:39 >> mtx-context | main context file: >> /Applications/ConTeXtStandalone/tex/texmf-context/tex/context/base/mkxl/context.mkxl >> mtx-context | current version: 2024.01.24 22:39 >> -- >> Stripped down MWE: >> \setuppapersize[A4] [A4] >> \starttext >> \completecontent[criterium=all] >> % ToC >> \page >> \chapter{CHAP 1} >> TEXT >> \startbackmatter >> \startchapter[title=Literature] >> \placelistofpublications >> \stopchapter >> \stopbackmatter >> \stoptext > > Besides enabling numbering for the backpart you can use the appendix block > which has numbering by default. > > %\defineconversionset[appendix:default][n] > > \starttext > > \startfrontmatter > \completecontent[criterium=all] > \stopfrontmatter > > \startbodymatter > \startchapter[title=CHAP 1] > TEXT > \stopchapter > \stopbodymatter > > \startappendices > \startchapter[title=Literature] > \placelistofpublications > \stopchapter > \stopappendices > > \stoptext > > Wolfgang Thanks Wolfgang for your practical hint. ___ 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 numbering does not work
Oliver Marugg schrieb am 13.02.2024 um 00:17: Hi Section numbering does not work until I remove \startbackmatter \stopbackmatter. I had a longer text file and I stripped it down until I found this? Greets Oliver Running freshly installed context ARM64 on m1 and updated it via sh install.sh on ARM64 macos 14.3.1: context --version mtx-context | ConTeXt Process Management 1.05 mtx-context | mtx-context | main context file: /Applications/ConTeXtStandalone/tex/texmf-context/tex/context/base/mkiv/context.mkiv mtx-context | current version: 2024.01.24 22:39 mtx-context | main context file: /Applications/ConTeXtStandalone/tex/texmf-context/tex/context/base/mkxl/context.mkxl mtx-context | current version: 2024.01.24 22:39 -- Stripped down MWE: \setuppapersize[A4] [A4] \starttext \completecontent[criterium=all] % ToC \page \chapter{CHAP 1} TEXT \startbackmatter \startchapter[title=Literature] \placelistofpublications \stopchapter \stopbackmatter \stoptext Besides enabling numbering for the backpart you can use the appendix block which has numbering by default. %\defineconversionset[appendix:default][n] \starttext \startfrontmatter \completecontent[criterium=all] \stopfrontmatter \startbodymatter \startchapter[title=CHAP 1] TEXT \stopchapter \stopbodymatter \startappendices \startchapter[title=Literature] \placelistofpublications \stopchapter \stopappendices \stoptext Wolfgang ___ 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: removing whitespace
Michael Guravage schrieb am 13.02.2024 um 14:01: While reading the documentation I spotted something similar from which I derived this solution: \setupinteraction[state=start] \def\squeeze#1% { \goto{#1} [url(tel:\ctxlua{context(string.gsub("#1", " ", ""))})] } ConTeXt has a Lua function to remove spaces. \starttext \cldcontext{string.nospaces("01234 56789")} \stoptext Wolfgang ___ 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 numbering does not work
Many thanks Taco, that works indeed;-) > Am 13.02.2024 um 09:29 schrieb Taco Hoekwater : > > > >> On 13 Feb 2024, at 00:17, Oliver Marugg wrote: >> >> Hi >> >> Section numbering does not work until I remove \startbackmatter >> \stopbackmatter. I had a longer text file and I stripped it down until I >> found this? > > IIRC : > > \setupsectionblock[backpart][number=yes] > > Best wishes, > Taco > >> Greets Oliver >> >> >> Running freshly installed context ARM64 on m1 and updated it via sh >> install.sh on ARM64 macos 14.3.1: >> >> context --version >> mtx-context | ConTeXt Process Management 1.05 >> mtx-context | >> mtx-context | main context file: >> /Applications/ConTeXtStandalone/tex/texmf-context/tex/context/base/mkiv/context.mkiv >> mtx-context | current version: 2024.01.24 22:39 >> mtx-context | main context file: >> /Applications/ConTeXtStandalone/tex/texmf-context/tex/context/base/mkxl/context.mkxl >> mtx-context | current version: 2024.01.24 22:39 >> -- >> >> Stripped down MWE: >> >> \setuppapersize[A4] [A4] >> \starttext >> \completecontent[criterium=all] >> % ToC >> \page >> \chapter{CHAP 1} >> TEXT >> \startbackmatter >> \startchapter[title=Literature] >> \placelistofpublications >> \stopchapter >> \stopbackmatter >> \stoptext >> ___ >> 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 >> ___ > > — > Taco Hoekwater E: t...@bittext.nl > genderfluid (all pronouns) > > > ___ > 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 > ___ ___ 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: removing whitespace
While reading the documentation I spotted something similar from which I derived this solution: \setupinteraction[state=start] \def\squeeze#1% { \goto{#1} [url(tel:\ctxlua{context(string.gsub("#1", " ", ""))})] } \starttext Call \squeeze{01234 56789} \stoptext With kind regards, Michael On Tue, Feb 13, 2024 at 2:54 AM Michael Guravage < gurav...@literatesolutions.com> wrote: > In the example below I pass the macro a string with a space, but the space > should not appear in the url. > > I've tried using \ctxlua to invoke string substitution, but without > success. What is the proper way to remove this space, and to perform string > manipulation more generally? > > \setupinteraction[state=start] > > \def\squeeze#1% > {\goto{#1}[url(tel:#1)]} > > \starttext > Call \squeeze{01234 56789} > \stoptext > > -- > With kind regards, > > Michael > > ___ > 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 > > ___ > ___ 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 numbering does not work
> On 13 Feb 2024, at 00:17, Oliver Marugg wrote: > > Hi > > Section numbering does not work until I remove \startbackmatter > \stopbackmatter. I had a longer text file and I stripped it down until I > found this? IIRC : \setupsectionblock[backpart][number=yes] Best wishes, Taco > Greets Oliver > > > Running freshly installed context ARM64 on m1 and updated it via sh > install.sh on ARM64 macos 14.3.1: > > context --version > mtx-context | ConTeXt Process Management 1.05 > mtx-context | > mtx-context | main context file: > /Applications/ConTeXtStandalone/tex/texmf-context/tex/context/base/mkiv/context.mkiv > mtx-context | current version: 2024.01.24 22:39 > mtx-context | main context file: > /Applications/ConTeXtStandalone/tex/texmf-context/tex/context/base/mkxl/context.mkxl > mtx-context | current version: 2024.01.24 22:39 > -- > > Stripped down MWE: > > \setuppapersize[A4] [A4] > \starttext > \completecontent[criterium=all] > % ToC > \page > \chapter{CHAP 1} > TEXT > \startbackmatter > \startchapter[title=Literature] > \placelistofpublications > \stopchapter > \stopbackmatter > \stoptext > ___ > 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 > ___ — Taco Hoekwater E: t...@bittext.nl genderfluid (all pronouns) ___ 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] removing whitespace
In the example below I pass the macro a string with a space, but the space should not appear in the url. I've tried using \ctxlua to invoke string substitution, but without success. What is the proper way to remove this space, and to perform string manipulation more generally? \setupinteraction[state=start] \def\squeeze#1% {\goto{#1}[url(tel:#1)]} \starttext Call \squeeze{01234 56789} \stoptext -- With kind regards, Michael ___ 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] Section numbering does not work
Hi Section numbering does not work until I remove \startbackmatter \stopbackmatter. I had a longer text file and I stripped it down until I found this? Greets Oliver Running freshly installed context ARM64 on m1 and updated it via sh install.sh on ARM64 macos 14.3.1: context --version mtx-context | ConTeXt Process Management 1.05 mtx-context | mtx-context | main context file: /Applications/ConTeXtStandalone/tex/texmf-context/tex/context/base/mkiv/context.mkiv mtx-context | current version: 2024.01.24 22:39 mtx-context | main context file: /Applications/ConTeXtStandalone/tex/texmf-context/tex/context/base/mkxl/context.mkxl mtx-context | current version: 2024.01.24 22:39 -- Stripped down MWE: \setuppapersize[A4] [A4] \starttext \completecontent[criterium=all] % ToC \page \chapter{CHAP 1} TEXT \startbackmatter \startchapter[title=Literature] \placelistofpublications \stopchapter \stopbackmatter \stoptext ___ 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
Pablo Rodriguez via ntg-context schrieb am 09.02.2024 um 20:07: 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). The \qed command works only in a description or enumeration environment. \definedescription [qedtest] [closesymbol=\symbol{qed}] \starttext \startqedtest \samplefile{lorem}\qed \stopqedtest \stoptext Wolfgang ___ 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] distance in \setupinitial
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): \setupinitial%[distance=0pt] \starttext \placeinitial \input knuth \stoptext Why? Greetings Thomas ___ 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
Dear Otared and Dear Hraban, So this is my little example: works perfect, after our correspondence. \starttext \startalignment[normal] \margintext {1.1.1} {\bf Beispiel 3.2.17 (Vertauschung von All- und Existenzquantor).} \par {\it Sei M die Menge aller Männer und F die Menge aller Frauen. Die Aus-\par sage h(m, f) sei ”m ist verliebt in f“. Unter diesen Voraussetzungen machen \par Sie sich die Bedeutung der beiden Aussagen klar.}\wordright{\square} \stopalignment \stoptext Many thanks Uschi Von: Ursula Hermann Gesendet: Freitag, 9. Februar 2024 08:39:10 An: mailing list for ConTeXt users Betreff: [NTG-context] Re: Square right aligned Dear Hraban, Dear Otared! Many Thanks, Hraban: Because of \wordright: I took a look at wordright at the wiki, works perfect. Otared, many thanks too. It also works perfect with your example Uschi Von: Otared Kavian Gesendet: Donnerstag, 8. Februar 2024 22:37:08 An: mailing list for ConTeXt users Betreff: [NTG-context] Re: Square right aligned 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. Best regards: Otared On 8 Feb 2024, at 12:23, Ursula Hermann mailto:ursula.herm...@univie.ac.at>> wrote: Dear List, I am at Home and have the following example.: \starttext \margintext {1.1.1} {\bf Beispiel 3.2.17 (Vertauschung von All- und Existenzquantor).} \par {\it Sei M die Menge aller Männer und F die Menge aller Frauen. Die Aus-\par sage h(m, f) sei ”m ist verliebt in f“. Unter diesen Voraussetzungen machen Sie sich die Bedeutung der beiden Aussagen klar.\startalignment[right]\square\stopalignment}\stoptext} There should be a sign like this □ at the end of the proof. Uschi ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl<mailto:ntg-context@ntg.nl> / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl<https://www.pragma-ade.nl/> / https://context.aanhet.net<https://context.aanhet.net/> (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net<https://wiki.contextgarden.net/> ___ Otared Kavian e-mail: ota...@gmail.com<mailto:ota...@gmail.com> Phone: +33 6 88 26 70 95 ___ 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
Dear Hraban, Dear Otared! Many Thanks, Hraban: Because of \wordright: I took a look at wordright at the wiki, works perfect. Otared, many thanks too. It also works perfect with your example Uschi Von: Otared Kavian Gesendet: Donnerstag, 8. Februar 2024 22:37:08 An: mailing list for ConTeXt users Betreff: [NTG-context] Re: Square right aligned 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. Best regards: Otared On 8 Feb 2024, at 12:23, Ursula Hermann mailto:ursula.herm...@univie.ac.at>> wrote: Dear List, I am at Home and have the following example.: \starttext \margintext {1.1.1} {\bf Beispiel 3.2.17 (Vertauschung von All- und Existenzquantor).} \par {\it Sei M die Menge aller Männer und F die Menge aller Frauen. Die Aus-\par sage h(m, f) sei ”m ist verliebt in f“. Unter diesen Voraussetzungen machen Sie sich die Bedeutung der beiden Aussagen klar.\startalignment[right]\square\stopalignment}\stoptext} There should be a sign like this □ at the end of the proof. Uschi ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl<mailto:ntg-context@ntg.nl> / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl<https://www.pragma-ade.nl/> / https://context.aanhet.net<https://context.aanhet.net/> (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net<https://wiki.contextgarden.net/> ___ Otared Kavian e-mail: ota...@gmail.com<mailto:ota...@gmail.com> Phone: +33 6 88 26 70 95 ___ 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: \startcolumns and \startcolumnset
Dear Dalyoung,Have you tried \startsimplecolumns\stopsimplecolumns instead of the columnset mechanism?In your example I put the above commands and I got the attached PDF: is this what you want to obtain?Best regards: Otared columns-figures.pdf Description: Adobe PDF document On 9 Feb 2024, at 02:22, Jeong Dal via ntg-context <ntg-context@ntg.nl> wrote:Dear all,I have a little problem to use “columns” in the following example.If I use “\startcolumnset”, then I have the following problems: 1. The figures is aligned left even though I use \startplacefigure[]. 2. In the second column, the first item located at the end of the page.However, \vfill works, so I managed the items evenly spaced vertically.If I use “\startcolumns”, then I have the following problems: 1. \vfill doesn’t works, but \blank[] works. So, it isn’t easy to locate the items evenly spaced vertically.Here are sample code and its outputs of two cases for comparison.Any suggestions are welcomed.Tomorrow is the New Years day in Lunar calendar.Happy new year, again.Best regards,Dalyoung%%%\startuseMPgraphic{mark}path p;p := unitsquare scaled 3cm;draw p;draw (point 0 of p)--(point 2 of p);draw (point 1 of p)--(point 3 of p);\stopuseMPgraphic\startuseMPgraphic{verticalrule3} draw rightboundary OverlayBox shifted (1mm,0); %if CurrentColumn = 1: shifted(-2mm,0) fi ; draw leftboundary OverlayBox shifted (-1mm,0); %if CurrentColumn = 2: shifted(2mm,0) fi ; draw bottomboundary OverlayBox leftenlarged 1mm rightenlarged 1mm; draw topboundary OverlayBox leftenlarged 1mm rightenlarged 1mm;\stopuseMPgraphic\defineoverlay [verticalrule] [\useMPgraphic{verticalrule3}]\setuppagenumbering[state=stop]\setupexternalfigures[location={local,defalut}]\definecolumnset [quiz] [n=2,background=verticalrule]\setupbodyfont[bonum, rm, 11pt]\starttext %\startcolumns[n=2,background="">\startcolumnset[quiz]\startitemize[n] \item Solve the following linear equations. \startitemize[r]\item equation%\blank[3.5cm]\vfill\item equation%\blank[3.5cm]\vfill\item equation\blank[3.5cm]\item equation\blank[3.5cm]\item equation\blank[3.5cm] \stopitemize \hrule\column \item Draw the graph of the following linear function.\startitemize[r]\item $2x +3y = 6$\startplacefigure[location={here,none},]\useMPgraphic{mark}\stopplacefigure \item $y = 2x - 1$ \startplacefigure[location={here,none}]\useMPgraphic{mark}\stopplacefigure\stopitemize \item Find the formula of the line 1: \vfill \item Find the formula of the line 2: \vfill\stopitemize\stopcolumnset\stoptext%%___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.nlwebpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)archive : https://github.com/contextgarden/contextwiki : https://wiki.contextgarden.net___ Otared Kaviane-mail: ota...@gmail.comPhone: +33 6 88 26 70 95 ___ 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] \startcolumns and \startcolumnset
Dear all,I have a little problem to use “columns” in the following example.If I use “\startcolumnset”, then I have the following problems: 1. The figures is aligned left even though I use \startplacefigure[]. 2. In the second column, the first item located at the end of the page.However, \vfill works, so I managed the items evenly spaced vertically.If I use “\startcolumns”, then I have the following problems: 1. \vfill doesn’t works, but \blank[] works. So, it isn’t easy to locate the items evenly spaced vertically.Here are sample code and its outputs of two cases for comparison.Any suggestions are welcomed.Tomorrow is the New Years day in Lunar calendar.Happy new year, again.Best regards,Dalyoung%%%\startuseMPgraphic{mark}path p;p := unitsquare scaled 3cm;draw p;draw (point 0 of p)--(point 2 of p);draw (point 1 of p)--(point 3 of p);\stopuseMPgraphic\startuseMPgraphic{verticalrule3} draw rightboundary OverlayBox shifted (1mm,0); %if CurrentColumn = 1: shifted(-2mm,0) fi ; draw leftboundary OverlayBox shifted (-1mm,0); %if CurrentColumn = 2: shifted(2mm,0) fi ; draw bottomboundary OverlayBox leftenlarged 1mm rightenlarged 1mm; draw topboundary OverlayBox leftenlarged 1mm rightenlarged 1mm;\stopuseMPgraphic\defineoverlay [verticalrule] [\useMPgraphic{verticalrule3}]\setuppagenumbering[state=stop]\setupexternalfigures[location={local,defalut}]\definecolumnset [quiz] [n=2,background=verticalrule]\setupbodyfont[bonum, rm, 11pt]\starttext %\startcolumns[n=2,background="">\startcolumnset[quiz]\startitemize[n] \item Solve the following linear equations. \startitemize[r]\item equation%\blank[3.5cm]\vfill\item equation%\blank[3.5cm]\vfill\item equation\blank[3.5cm]\item equation\blank[3.5cm]\item equation\blank[3.5cm] \stopitemize \hrule\column \item Draw the graph of the following linear function.\startitemize[r]\item $2x +3y = 6$\startplacefigure[location={here,none},]\useMPgraphic{mark}\stopplacefigure \item $y = 2x - 1$ \startplacefigure[location={here,none}]\useMPgraphic{mark}\stopplacefigure\stopitemize \item Find the formula of the line 1: \vfill \item Find the formula of the line 2: \vfill\stopitemize\stopcolumnset\stoptext%% testColumns.pdf Description: Adobe PDF document testColumnset.pdf Description: Adobe PDF document ___ 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
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. Best regards: Otared > On 8 Feb 2024, at 12:23, Ursula Hermann wrote: > > Dear List, > > I am at Home and have the following example.: > > \starttext > \margintext {1.1.1} > {\bf Beispiel 3.2.17 (Vertauschung von All- und Existenzquantor).} > \par > {\it Sei M die Menge aller Männer und F die Menge aller Frauen. Die > Aus-\par > sage h(m, f) sei ”m ist verliebt in f“. Unter diesen Voraussetzungen > machen Sie sich die Bedeutung der beiden Aussagen > klar.\startalignment[right]\square\stopalignment}\stoptext} > > There should be a sign like this □ at the end of the proof. > > Uschi > ___ > If your question is of interest to others as well, please add an entry to the > Wiki! > > maillist : ntg-context@ntg.nl <mailto:ntg-context@ntg.nl> / > https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl > <https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl> > webpage : https://www.pragma-ade.nl <https://www.pragma-ade.nl/> / > https://context.aanhet.net <https://context.aanhet.net/> (mirror) > archive : https://github.com/contextgarden/context > <https://github.com/contextgarden/context> > wiki : https://wiki.contextgarden.net <https://wiki.contextgarden.net/> > ___ Otared Kavian e-mail: ota...@gmail.com Phone: +33 6 88 26 70 95 ___ 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] Square right aligned
Dear List, I am at Home and have the following example.: \starttext \margintext {1.1.1} {\bf Beispiel 3.2.17 (Vertauschung von All- und Existenzquantor).} \par {\it Sei M die Menge aller Männer und F die Menge aller Frauen. Die Aus-\par sage h(m, f) sei ”m ist verliebt in f“. Unter diesen Voraussetzungen machen Sie sich die Bedeutung der beiden Aussagen klar.\startalignment[right]\square\stopalignment}\stoptext} There should be a sign like this □ at the end of the proof. Uschi ___ 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] How to print the book title and section title where \reference is located?
I have an extensive multi-book project. Each book has a nickname, like TB for "Textbook", "WB 1" for the "Workbook, Vol. 1": TB -- 01_textbook.texWB 1 -- 03_workbook.texWB 2 -- 04_workbook.texWB 3 -- 05_workbook.tex WB 4 -- 06_workbook.tex TG -- 08_teachersguide.tex I have to prove to a government agency that the content meets several requirements, so I'm giving them a simple file that says something like "Requirement A is met in TB, "Cats", p. 11" basically letting the reader know its in the textbook, section called "Cats", on p. 11. To mark the pages, I'm simply dropping in macros called "\requirementA" "\requirementB" on whichever page of whichever book demonstrates it meets the requirement, then the file will aquatically list the book, section, and page number by searching for that macro. \define\requirementA{ \reference[markerA]{This is a comment.} } \define\requirementB{ \reference[markerB]{This is a comment.} } \define\requirementC{ \reference[markerC]{This is a comment.} } \starttext \section{Cats} \requirementA \input knuth \requirementC \requirementB \pagebreak \section{Fish} \input knuth \input knuth \input knuth \input knuth \requirementC \requirementB \pagebreak \section{Frogs} \input knuth \requirementB \pagebreak \section{Markers} \startitemize \item Requirement A is met \at{page}[markerA]. \item Requirement B is met \at{page}[markerB]. \item Requirement C is met \at{page}[markerC]. \stopitemize \stoptext I have this sample code, but it only works for a single document, and only displays page number. I tried looking at the \about and other related command, but that requires giving a reference name and referring to the titles, not my dropped macro. How can I modify this to display a message like below, plus also scans the other files. *It only needs to reference the first found occurrence.* Here is a sample message what the output should give: "Requirement A is met in WB 3, "Bears", p. 33." --Joel ___ 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 ___