[NTG-context] Re: \em issue in MkXL (2024.03.05 11:26)
On 3/8/24 19:09, Wolfgang Schuster wrote: > Pablo Rodriguez via ntg-context schrieb am 08.03.2024 um 18:50: >> [...] >> LMTX gets b, c and d in slanted form. >> >> LuaTeX gets only b and c in slanted form. > [...] > I get b and d in italic which is the expected output. Sorry, my LuaTeX is getting slanted b and d ("c" was my typo). But I see what was causing my issue (line from ~/texmf/texmf-local/cont-loc.mkxl): \enableexperiments[fonts.compact] Which seeems weird to me. Or at least, I thought I read that Hans enabled it by default in LMTX. Then my question is whether this was caused by simply enabling compact fonts or by doing it twice. Many thanks for your help, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: \em issue in MkXL (2024.03.05 11:26)
Am 08.03.24 um 18:50 schrieb Pablo Rodriguez via ntg-context: Dear list, the following latest gets differents results when compiled with MkXL and MkIV (in current latest from 2024.03.05 11:26): \definefontfamily[mainface][rm][TeX Gyre Termes] [features={default, quality}, it={style: regular, features:{default, quality, slanted}}, sl={style: regular, features:{default, quality, slanted}}] \setupbodyfontenvironment [default] [em=italic] \setupbodyfont[mainface] \starttext \startTEXpage[offset=1em] a\\ \em b\\ \em c\\ \em d\\ \stopTEXpage \stoptext LMTX gets b, c and d in slanted form. LuaTeX gets only b and c in slanted form. With latest LMTX (2024.03.05), b and d are slanted, as I would expect. This might be just a test case, but I’d avoid switches like \em without grouping. 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: \em issue in MkXL (2024.03.05 11:26)
Pablo Rodriguez via ntg-context schrieb am 08.03.2024 um 18:50: Dear list, the following latest gets differents results when compiled with MkXL and MkIV (in current latest from 2024.03.05 11:26): \definefontfamily[mainface][rm][TeX Gyre Termes] [features={default, quality}, it={style: regular, features:{default, quality, slanted}}, sl={style: regular, features:{default, quality, slanted}}] \setupbodyfontenvironment [default] [em=italic] \setupbodyfont[mainface] \starttext \startTEXpage[offset=1em] a\\ \em b\\ \em c\\ \em d\\ \stopTEXpage \stoptext LMTX gets b, c and d in slanted form. LuaTeX gets only b and c in slanted form. I think LMTX may have an issue here. Could anyone be so kind to confirm this? I get b and d in italic which is the expected output. 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] \em issue in MkXL (2024.03.05 11:26)
Dear list, the following latest gets differents results when compiled with MkXL and MkIV (in current latest from 2024.03.05 11:26): \definefontfamily[mainface][rm][TeX Gyre Termes] [features={default, quality}, it={style: regular, features:{default, quality, slanted}}, sl={style: regular, features:{default, quality, slanted}}] \setupbodyfontenvironment [default] [em=italic] \setupbodyfont[mainface] \starttext \startTEXpage[offset=1em] a\\ \em b\\ \em c\\ \em d\\ \stopTEXpage \stoptext LMTX gets b, c and d in slanted form. LuaTeX gets only b and c in slanted form. I think LMTX may have an issue here. Could anyone be so kind to confirm this? Many thanks for your help, Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: How can I do this?
Am 08.03.24 um 17:56 schrieb Otared Kavian: Hi Ursula, The reason for which you did not get the expected result is that you have « } » missing in your file, that is the closing brace after your italic command « {\it » at the end of your document. Moreover you did not have a \stoptext in your file, and a math command « \m » was not written correctly. Talking of math, I personnaly prefer to enclose in-line math between dollar signs $, that is writing « $\exists x \in H$ » instead of « \m{\exists x \in H} ». Well, better stay with the modern ConTeXt approach of \m{}. Also, you can use mtxrun --script check yourfile.tex to look for missing braces, stops etc. 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: additional font faces
Am 08.03.24 um 18:02 schrieb Hans Hagen: On 3/8/2024 5:55 PM, Henning Hraban Ramm wrote: Hi, if I need an additional pair of upright and italic font faces, e.g. a Medium or Light version, would it make sense to define them like this: I'd just define a new typeface / bodyfont, using fo rinstance \starttypescript [sans] [AlegreyaMedium] and then use \switchtobodyfont[AlegreyaMedium]\sl or \AlegreyaMedium\sl which is also more efficient than adding more variants Ok, thank you – that’s what I was usually doing. So I won’t change 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: additional font faces
On 3/8/2024 5:55 PM, Henning Hraban Ramm wrote: Hi, if I need an additional pair of upright and italic font faces, e.g. a Medium or Light version, would it make sense to define them like this: I'd just define a new typeface / bodyfont, using fo rinstance \starttypescript [sans] [AlegreyaMedium] and then use \switchtobodyfont[AlegreyaMedium]\sl or \AlegreyaMedium\sl which is also more efficient than adding more variants Hans % adapted from font-pre.mkxl \definefontalternative[md] \definefontalternative[mi] \definefontalternative[ms] \definealternativestyle [medium] [\md] [] \definealternativestyle [mediumitalic,italicmedium] [\mi] [] \definealternativestyle [mediumslanted,slantedmedium][\ms] [] \definealternativestyle [sansmedium] [\ss\md] [] \definealternativestyle [serifmedium] [\rm\md] [] \definealternativestyle [monomedium] [\tt\md] [] %\definealternativestyle [mediumface] [\mediumface] [] \unexpanded\def\normalmd{\let\fontalternative\md\font_helpers_synchronize_font} \unexpanded\def\normalmi{\let\fontalternative\mi\font_helpers_synchronize_font} \unexpanded\def\normalms{\let\fontalternative\ms\font_helpers_synchronize_font} \let\md\normalmd \let\mi\normalmi \let\ms\normalms \definehighlight[medium ] [command=no,style=medium] \definehighlight[mediumitalic ] [command=no,style=mediumitalic] \definehighlight[mediumslanted] [command=no,style=mediumslanted] Is that necessary? And is it enough? \starttypescript [sans] [alegreya] \definefontsynonym[AlegreyaSans-Regular][name:AlegreyaSans-Regular] \definefontsynonym[AlegreyaSans-Italic][name:AlegreyaSans-Italic] \definefontsynonym[AlegreyaSans-Caps][name:AlegreyaSansSC-Regular] \definefontsynonym[AlegreyaSans-ItalicCaps][name:AlegreyaSansSC-Italic] \definefontsynonym[AlegreyaSans-Medium][name:AlegreyaSans-Medium] \definefontsynonym[AlegreyaSans-MediumItalic][name:AlegreyaSans-MediumItalic] \definefontsynonym[AlegreyaSans-MediumCaps][name:AlegreyaSansSC-Medium] \definefontsynonym[AlegreyaSans-MediumItalicCaps][name:AlegreyaSansSC-MediumItalic] \definefontsynonym[AlegreyaSans-Bold][name:AlegreyaSans-Bold] \definefontsynonym[AlegreyaSans-BoldItalic][name:AlegreyaSans-BoldItalic] \definefontsynonym[AlegreyaSans-BoldCaps][name:AlegreyaSansSC-Bold] \definefontsynonym[AlegreyaSans-BoldItalicCaps][name:AlegreyaSansSC-BoldItalic] \stoptypescript \starttypescript [sans] [alegreya] [name] \definefontsynonym [Sans] [AlegreyaSans-Regular] [] \definefontsynonym [SansItalic] [AlegreyaSans-Italic] [] \definefontsynonym [SansSlanted] [AlegreyaSans-Italic] [] \definefontsynonym [SansMedium] [AlegreyaSans-Medium] [] \definefontsynonym [SansMediumItalic] [AlegreyaSans-MediumItalic][] \definefontsynonym [SansMediumSlanted][AlegreyaSans-MediumItalic][] \definefontsynonym [SansBold] [AlegreyaSans-Bold] [] \definefontsynonym [SansBoldItalic] [AlegreyaSans-BoldItalic] [] \definefontsynonym [SansBoldSlanted][AlegreyaSans-BoldItalic] [] \definefontsynonym [SansCaps] [AlegreyaSans-Caps] \stoptypescript ___ 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 ___ -- - 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: How can I do this?
Hi Ursula, The reason for which you did not get the expected result is that you have « } » missing in your file, that is the closing brace after your italic command « {\it » at the end of your document. Moreover you did not have a \stoptext in your file, and a math command « \m » was not written correctly. Talking of math, I personnaly prefer to enclose in-line math between dollar signs $, that is writing « $\exists x \in H$ » instead of « \m{\exists x \in H} ». Also the way you write your text is somewhat « incorrect » (or as Mikael Sundqvist would put it, « interesting »…), since in principle all the setups and definitions must be before the body of your document which begns with \starttext. Another point i sthat instead of using \par you can leave a blank line, which makes the document more readable. And you don’t need to break the lines by « hand », since ConTeXt does it in a better way. Finally instead of \blackrule[color=black, height=0.10ex, width=13.50cm] you can use just \hairline, and the thickness and color of such a \hairline can be adjusted by \setupthinrules[rulethickness=4pt,color=darkgreen] (for instance), which should be put before \starttext. Best regards: Otared % begin textbackground-Ursula.tex \definetextbackground[myBG][ location=paragraph, background=color, backgroundcolor=lightgray, leftoffset=.8\bodyfontsize, rightoffset=.8\bodyfontsize, topoffset=.5\bodyfontsize, bottomoffset=.5\bodyfontsize, frame=off] \setupnarrower[left=0.80cm, right=0.80cm] \definehspace[oneem][0.5em] \setupinteraction [state=start, color=blue] \usecolors[svg] \setupinteraction [state=start, contrastcolor=cornflowerblue] \starttext \margintext {1.1.1} {\bf Beispiel 3.2.17 (Vertauschung von All- und Existenzquantor).} {\it Sei M die Menge aller Männer und F die Menge aller Frauen. Die Aussage h(m, f) sei ”m ist verliebt in f“. Unter diesen Voraussetzungen machen Sie sich die Bedeutung der beiden Aussagen klar.} \startitemize[n,packed,broad] \item \m{\forall m ∈ M : ∃f ∈ F : h(m, f)} \item $∃f ∈ F : ∀m ∈ M : h(m, f)$. \stopitemize \startmyBG Mitunter ist es aus der Formulierung nur schwer zu erkennen, dass ein $∃\forall∀ $ oder ein $\forall∀\m∃$ versteckt ist. Dann ist es besonders wichtig, die Formulierung sehr lange zu prüfen und eventuell auch formalisiert noch einmal aufzuschreiben.” \blank \startnarrower[left, right] 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]) \blank \stopnarrower \stopmyBG \blank \blackrule[color=black, height=0.10ex, width=13.50cm] \reference[Regel:1]{3.1} {\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] {\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 \reference[Abschnitt:1]{3.2.1.1} {\it Hinweis: Beachten Sie die Konvention aus Abschnitt \goto{3.2.1.1}[Abschnitt:1] die Formulierung \quotation {entweder ... oder} entspricht dem ausschließenden Oder und die Formulierung \quotation{oder} dem (mathematischen) einschließenden Oder.} \blackrule[color=black, height=0.10ex, width=13.50cm] \stoptext % end textbackground-Ursula.tex > On 6 Mar 2024, at 13:52, Ursula Hermann wrote: > > 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, >
[NTG-context] additional font faces
Hi, if I need an additional pair of upright and italic font faces, e.g. a Medium or Light version, would it make sense to define them like this: % adapted from font-pre.mkxl \definefontalternative[md] \definefontalternative[mi] \definefontalternative[ms] \definealternativestyle [medium] [\md] [] \definealternativestyle [mediumitalic,italicmedium] [\mi] [] \definealternativestyle [mediumslanted,slantedmedium][\ms] [] \definealternativestyle [sansmedium] [\ss\md] [] \definealternativestyle [serifmedium] [\rm\md] [] \definealternativestyle [monomedium] [\tt\md] [] %\definealternativestyle [mediumface][\mediumface][] \unexpanded\def\normalmd{\let\fontalternative\md\font_helpers_synchronize_font} \unexpanded\def\normalmi{\let\fontalternative\mi\font_helpers_synchronize_font} \unexpanded\def\normalms{\let\fontalternative\ms\font_helpers_synchronize_font} \let\md\normalmd \let\mi\normalmi \let\ms\normalms \definehighlight[medium ] [command=no,style=medium] \definehighlight[mediumitalic ] [command=no,style=mediumitalic] \definehighlight[mediumslanted] [command=no,style=mediumslanted] Is that necessary? And is it enough? \starttypescript [sans] [alegreya] \definefontsynonym[AlegreyaSans-Regular][name:AlegreyaSans-Regular] \definefontsynonym[AlegreyaSans-Italic][name:AlegreyaSans-Italic] \definefontsynonym[AlegreyaSans-Caps][name:AlegreyaSansSC-Regular] \definefontsynonym[AlegreyaSans-ItalicCaps][name:AlegreyaSansSC-Italic] \definefontsynonym[AlegreyaSans-Medium][name:AlegreyaSans-Medium] \definefontsynonym[AlegreyaSans-MediumItalic][name:AlegreyaSans-MediumItalic] \definefontsynonym[AlegreyaSans-MediumCaps][name:AlegreyaSansSC-Medium] \definefontsynonym[AlegreyaSans-MediumItalicCaps][name:AlegreyaSansSC-MediumItalic] \definefontsynonym[AlegreyaSans-Bold][name:AlegreyaSans-Bold] \definefontsynonym[AlegreyaSans-BoldItalic][name:AlegreyaSans-BoldItalic] \definefontsynonym[AlegreyaSans-BoldCaps][name:AlegreyaSansSC-Bold] \definefontsynonym[AlegreyaSans-BoldItalicCaps][name:AlegreyaSansSC-BoldItalic] \stoptypescript \starttypescript [sans] [alegreya] [name] \definefontsynonym [Sans] [AlegreyaSans-Regular] [] \definefontsynonym [SansItalic] [AlegreyaSans-Italic] [] \definefontsynonym [SansSlanted][AlegreyaSans-Italic] [] \definefontsynonym [SansMedium] [AlegreyaSans-Medium] [] \definefontsynonym [SansMediumItalic] [AlegreyaSans-MediumItalic][] \definefontsynonym [SansMediumSlanted][AlegreyaSans-MediumItalic][] \definefontsynonym [SansBold] [AlegreyaSans-Bold][] \definefontsynonym [SansBoldItalic] [AlegreyaSans-BoldItalic] [] \definefontsynonym [SansBoldSlanted][AlegreyaSans-BoldItalic] [] \definefontsynonym [SansCaps] [AlegreyaSans-Caps] \stoptypescript ___ 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: Log entries about confusing level change
On 3/8/2024 3:38 AM, Rik Kabel wrote: Hello all, The following example produces two log entries that seem a bit odd. The log entries are: backend > bookmarks > confusing level change at level 3 around '1 body1' backend > bookmarks > confusing level change at level 3 around 'back1' and they refer to the first chapter of the bodymatter and the first chapter of the backmatter, respectively. The example: \setupinteraction [state=start] \placebookmarks [chapter] \starttext \startfrontmatter \startchapter [title=front1] \samplefile {knuth-gpt} \stopchapter \stopfrontmatter \startbodymatter \startchapter [title=body1] \samplefile {knuth-gpt} \stopchapter \stopbodymatter \startbackmatter \startchapter [title=back1] \samplefile {knuth-gpt} \stopchapter \stopbackmatter \stoptext Does the level change message suggest that something is missing in the document? normally harmless so i can add an extra check but bookmarks can be a pain when less structure is used (somewhat weird low level pdf stuff) 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 ___