Re: [NTG-context] Reconciling unicode-math with LaTeX2e mathematics
Hans Hagen wrote: > you need to be more explicit about the problems you encounter (minimal examples for instance) To be more precise (please see the enclosed P.D.F. file), I would like the same font possibilities in ConTeXt math mode as shown in the following table from Will Robertson's talk at 41 min 40 s for LaTeX unicode-math package: https://youtu.be/FW9Cwh9sj5w?t=2500 In both LaTeX and ConTeXt, we have two kinds of fonts: — a text font: multi-letter words; — a math font: single letter words. In math mode, using LaTeX, text fonts can use both — text spacing: $\textit{abc ffi}$ gives abc ffi; — math spacing: $\mathit{abc ffi}$ gives abcffi. In math mode, using LaTeX, math fonts can use only math spacing: $abc ffi$ gives abcffi. ($abc ffi$ is equivalent to $\symit{abc ffi}$—\symxx commands were introduced in the 2015 update of the unicode-math package by Will Robertson, allowing upright, slanted, bold, etc. math fonts with \symup, \symsl \symbf, etc., respectively.) However, in math mode, using ConTeXt, text fonts can use only TEXT spacing (no MATH spacing commands): $\text{\it abc ffi}$ gives abc ffi. So this is the FEATURE that needs to be added. I suggest that you implement a new set of commands called \textxx for this (text fonts with MATH spacing in math mode—please see the enclosed P.D.F. file). As far as math fonts are concerned using ConTeXt in math mode, it's okay: $\it{abc ffi}$ gives abcffi. But you should note that in the source of ConTeXt you (Hans) introduced \mathit (and \mathup & \mathtf, \mathsl, \mathbf, etc.) as an equivalent of \it (\tf, \sl, \bf, etc., respectively) for "A.M.S. LaTeX compatibility", though in A.M.S. LaTeX the \mathxx commands are not MATH fonts but TEXT fonts with math spacing (as pointed out by Will Robertson in the very first seconds from 41 min 40 s of his talk in the link above) so it not compatible (but that's fine since the name \mathxx in A.M.S. LaTeX was not very well chosen in the first place but thereafter kept for backward compatibility, so that in ConTeXt we can keep it used for MATH fonts instead and introduce \textxx for TEXT fonts with math spacing, as suggested in the previous paragraph). Please see the enclosed P.D.F. file that sums everything up to understand visually what I mean with the missing feature I request (adding new \textxx commands for text fonts with MATH spacing in math mode), and let me know what you think. Maggyero math_mode_fonts.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 / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Reconciling unicode-math with LaTeX2e mathematics
Hans Hagen wrote: > you need to be more explicit about the problems you encounter (minimal examples for instance) To be more precise (please see the enclosed P.D.F. file), I would like the same font possibilities in ConTeXt math mode as shown in the following table from Will Robertson's talk at 41 min 40 s for LaTeX unicode-math package: https://youtu.be/FW9Cwh9sj5w?t=2500 In both LaTeX and ConTeXt, we have two kinds of fonts: — a text font: multi-letter words; — a math font: single letter words. In math mode, using LaTeX, text fonts can use both — text spacing: $\textit{abc ffi}$ gives abc ffi; — math spacing: $\mathit{abc ffi}$ gives abcffi. In math mode, using LaTeX, math fonts can use only math spacing: $abc ffi$ gives abcffi. ($abc ffi$ is equivalent to $\symit{abc ffi}$—\symxx commands were introduced in the 2015 update of the unicode-math package by Will Robertson, allowing upright, slanted, bold, etc. math fonts with \symup, \symsl \symbf, etc., respectively.) However, in math mode, using ConTeXt, text fonts can use only TEXT spacing (no MATH spacing commands): $\text{\it abc ffi}$ gives abc ffi. So this is the FEATURE that needs to be added. I suggest that you implement a new set of commands called \textxx for this (text fonts with MATH spacing in math mode—please see the enclosed P.D.F. file). As far as math fonts are concerned using ConTeXt in math mode, it's okay: $\it{abc ffi}$ gives abcffi. But you should note that in the source of ConTeXt you (Hans) introduced \mathit (and \mathup & \mathtf, \mathsl, \mathbf, etc.) as an equivalent of \it (\tf, \sl, \bf, etc., respectively) for "A.M.S. LaTeX compatibility", though in A.M.S. LaTeX the \mathxx commands are not MATH fonts but TEXT fonts with math spacing (as pointed out by Will Robertson in the very first seconds from 41 min 40 s of his talk in the link above) so it not compatible (but that's fine since the name \mathxx in A.M.S. LaTeX was not very well chosen in the first place but thereafter kept for backward compatibility, so that in ConTeXt we can keep it used for MATH fonts instead and introduce \textxx for TEXT fonts with math spacing, as suggested in the previous paragraph). Please see the enclosed P.D.F. file that sums everything up to understand visually what I mean with the missing feature I request (adding new \textxx commands for text fonts with MATH spacing in math mode), and let me know what you think. Maggyero math_mode_fonts.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 / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Reconciling unicode-math with LaTeX2e mathematics
Is there a plan to have in ConTeXt the same kind of math behavior that Will Robertson implemented in the last version of his unicode-math LaTeX package (\mathrm, \mathit, \mathbf, \symrm, \symit, \symbf, etc.)? Because ConTeXt currently has the same math/text spacing issues in math mode that the old unicode-math package had. Will Roberston's talk (20 July 2015): https://www.youtube.com/watch?v=FW9Cwh9sj5w ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Changing font for math function
> Aditya Mahajan: > By default, in all three formats the font for \log is mathupright rather > than textrm. There needs to be a rationale for ConTeXt default to be > different from other formats. Do you have any reference to a math book or > journal that uses text fonts for \log-like operators? Thanks for the examples. I had forgotten that math fonts can differ from text fonts. Now I understand why you use \mathupright (which, according to the source code is identical in math mode to \mathrm and \rm). And I know that math fonts have different kerning and ligatures than text fonts. But how is that in LaTeX, kerning and ligatures in math mode inside \mathrm are the same as those of the TEXT font (while in ConTeXt \mathrm still uses the kerning and ligatures of the math font, which seems logical)? Compare the following: LaTeX: \documentclass{article} \begin{document} affinity\par $\mathrm{affinity}$\par % kerning and ligatures of TEXT mode with math font \end{document} ConTeXt: \starttext affinity\par $\mathrm affinity$\par % kerning and ligatures of MATH mode with math font \stoptext Maggyero ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Changing font for math function
> Aditya Mahajan: > The default should be \mathupright (as is the case in amstex and latex, and probably also plaintex). > Hans Hagen: > next beta: when one of the stylealternatives text mode else mathmode > (default nothing == math upright) > Hans Hagen: >> Because like in \mtext, the \text command is ESSENTIAL (for the function names to have the mathcodes, kerning and ligatures of the text mode instead of the ones of the math mode). >that is not needed because if you use a style known as text style a text font is used Alright, but why not ALWAYS use your text style (or my \text), why talking about \mathupright then? \mathupright should never be used to display a name in text style in my opinion. I don't get it, is there something that I missed with that \mathupright? (And I'm not managing to download the new beta of yesterday so I don't have access to the new code yet). Appart from that story of \text or not \text, what do you think about the suggestion that I gave in the conclusion of my previous post? Do you plan to still use version 1 or to implement version 2 after the freeze for TeXLive 2015? My conclusion was: CONCLUSION. — It all comes down to the choice of the best user interface for math functions and math texts (usually used as subscripts of variables). Their styles and colors is handled with \setupmathematics. There are two choices of user interface: 1. $\normalmathop{\mfunction{Arsinh}}\nolimits x\ \text{and}\ n_{\mtext{air}}$. 2. $\mfunction{Arsinh} x\ \text{and}\ n_{\mtext{air}}$. First, the default functionstyle and textstyle in \setupmathematics should be \rm\tf (the text mode equivalent of \mathupright, as we are always in text mode thanks to the \text hardcoded in \mfunction and \mtext). Then, in the 1st solution \normalmathop is used instead of \mathop because the latter is modified by ConTeXt to convert \rm to \mf, which makes \setupmathematics[functionstyle=\rm] without effect. The 2nd solution is obviously way cleaner, that is why I think it should be preferred. The implementation is given in my '2nd DEFINITION of \mfunction' for replacing the existing definition in math-ini.mkiv: ——— \unexpanded\def\mfunction{\dosingleempty\domfunction} \def\domfunction[#1]#2% {\iffirstargument \doifelse{#1}{op}{\normalmathop{\text{\usemathematicsstyleandcolor\c!functionstyle\c!functioncolor#2}}}{\doifelse{#1}{limop}{\normalmathop{\text{\usemathematicsstyleandcolor\c!functionstyle\c!functioncolor#2}}}{\normalmathop{\text{\usemathematicsstyleandcolor\c!functionstyle\c!functioncolor#2}}\nolimits}} \else \normalmathop{\text{\usemathematicsstyleandcolor\c!functionstyle\c!functioncolor#2}}\nolimits \fi} ——— We also saw that \mfunctionlabeltext is inconsistent with ConTeXt \labeltext because the former has a style attached to it, so \mfunctionlabeltext should be removed from math-ini.mkiv and \mfunction{\mathlabeltext } should be used instead when needed. To go even further in userfriendlyness, we the new macro \definemathcommand should be added in math-ini.mkiv: ——— \unexpanded\def\definemathfunction{\dodoubleempty\dodefinemathfunction} \def\dodefinemathfunction[#1][#2]#3% {\ifsecondargument \definemathcommand[#1]{\mfunction[#2]{#3}} \else \definemathcommand[#1]{\mfunction{#3}} \fi} ——— Finally, with this new \mfunction definition and the removal of the misleading \mfunctionlabeltext, the functions defined in math-def.mkiv should be rewrite as: ——— \definemathcommand[cos]{\mfunction{\mathlabeltext{cos}}} % Or \definemathcommand[cos]{\mfunction[nolop]{\mathlabeltext{cos}}}, it is the same. \definemathcommand[det]{\mfunction[limop]{\mathlabeltext{det}}} \definemathcommand[diff]{\normalmathop{\text{\mathfunctionstyle d}}\mathopen{}} %etc. ——— or ——— \definemathfunction[cos]{\mathlabeltext{cos}} % Or \definemathfunction[cos][nolop]{\mathlabeltext{cos}}, it is the same. \definemathfunction[det][limop]{\mathlabeltext{det}} \definemathcommand[diff]{\normalmathop{\text{\mathfunctionstyle d}}\mathopen{}} % It is a special function so it should still be treated with the more general \definemathcommand. %etc. ——— ConTeXt users are now provided, if Hans agrees to implement the code given in this conclusion, with three extremely useful macros: — \mtext (that should be used for all math texts such as subscripts of variables): $n_{\mtext{air}}$; — \mfunction (the equivalent of LaTeX \operatorname macro of the amsopn package): $\mfunction{Arsinh} x$ $\mfunction[op]{Arsinh} x$ or equivalently $\mfunction[limop]{Arsinh} x$; — \definemathfunction (the equivalent of LaTeX \DeclareMathOperator macro of the amsopn package): \definemathfunction[arsinh]{Arsinh} $\arsinh x$ \definemathfunction[arsinh][op]{Arsinh} $\arsinh x$ or equivalently \definemathfun
[NTG-context] 2 issues in phys-dim.mkiv
I've tried the unit interface today, and I've noticed two issues with the following example: \setupunits[alternative=text] \starttext $\unit{-4.6e-3 km s^-1}$ \stoptext 1. Minus superscripts for UNITS (so 's^-1' here—not 'e-3', which is fine) are converted to hyphens with the 'text' unit alternative (with the default 'mathematics' unit alternative everything is fine): 2. The times symbol between the number and the 10^-3 (e-3) is incorrectly spaced (as an ordinary math atom instead of a binary math atom) so doesn't look good. Maybe Hans could change \def\digitstimessymbol{\times} to \def\digitstimessymbol{\ifmmode\times\else${}\times{}$\fi} in phys-dim.mkiv? ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Changing font for math function
to it, so \mfunctionlabeltext should be removed from math-ini.mkiv and \mfunction{\mathlabeltext } should be used instead when needed. To go even further in userfriendlyness, we the new macro \definemathcommand should be added in math-ini.mkiv: ——— \unexpanded\def\definemathfunction{\dodoubleempty\dodefinemathfunction} \def\dodefinemathfunction[#1][#2]#3% {\ifsecondargument \definemathcommand[#1]{\mfunction[#2]{#3}} \else \definemathcommand[#1]{\mfunction{#3}} \fi} ——— Finally, with this new \mfunction definition and the removal of the misleading \mfunctionlabeltext, the functions defined in math-def.mkiv should be rewrite as: ——— \definemathcommand[cos]{\mfunction{\mathlabeltext{cos}}} % Or \definemathcommand[cos]{\mfunction[nolop]{\mathlabeltext{cos}}}, it is the same. \definemathcommand[det]{\mfunction[limop]{\mathlabeltext{det}}} \definemathcommand[diff]{\normalmathop{\text{\mathfunctionstyle d}}\mathopen{}} %etc. ——— or ——— \definemathfunction[cos]{\mathlabeltext{cos}} % Or \definemathfunction[cos][nolop]{\mathlabeltext{cos}}, it is the same. \definemathfunction[det][limop]{\mathlabeltext{det}} \definemathcommand[diff]{\normalmathop{\text{\mathfunctionstyle d}}\mathopen{}} % It is a special function so it should still be treated with the more general \definemathcommand. %etc. ——— ConTeXt users are now provided, if Hans agrees to implement the code given in this conclusion, with three extremely useful macros: — \mtext (that should be used for all math texts such as subscripts of variables): $n_{\mtext{air}}$; — \mfunction (the equivalent of LaTeX \operatorname macro of the amsopn package): $\mfunction{Arsinh} x$ $\mfunction[op]{Arsinh} x$ or equivalently $\mfunction[limop]{Arsinh} x$; — \definemathfunction (the equivalent of LaTeX \DeclareMathOperator macro of the amsopn package): \definemathfunction[arsinh]{Arsinh} $\arsinh x$ \definemathfunction[arsinh][op]{Arsinh} $\arsinh x$ or equivalently \definemathfunction[arsinh][limop]{Arsinh} $\arsinh x$. Maggyero ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Changing font for math function
Sorry, I did 3 typos in my previous post. — First typo: > 3. Using only \mathlabeltext with \setuplabeltext is also more consistent with the current \labeltext that works with \setuplabeltext. 3. Using only \mathlabeltext with \setupmathlabeltext is also more consistent with the current \labeltext that works with \setuplabeltext. — Second typo: > \define\function{\dosingleempty\dofunction} > \def\dofunction[#1]#2{% >\iffirstargument > \doifelse{#1}{limop}{\mathop{\mathlabel{#2}}}{\mathop{\mathlabel{#2}}\nolimits} >\else > \mathop{\mathlabel{#2}}\nolimits >\fi} \define\function{\dosingleempty\dofunction} \def\dofunction[#1]#2{% \iffirstargument \doifelse{#1}{op}{\mathop{\mathlabel{#2}}}{\doifelse{#1}{limop}{\mathop{\mathlabel{#2}}}{\mathop{\mathlabel{#2}}\nolimits}} \else \mathop{\mathlabel{#2}}\nolimits \fi} Plus these 2 definitions were not supposed to be in this post (I forgot to remove them during my tests). Nevertheless Hans could had them as well in math-ini.mkiv if he thinks the user should have access to this \function command, which is the ConTeXt version of the well known \operatorname and \operatorname* command in LaTeX. It provides: \starttext \startformula \function{lim}_{x\to a} f(x)\quad \function[op]{lim}_{x\to a} f(x)\quad \function[limop]{lim}_{x\to a} f(x) \stopformula \stoptext — Third typo: > \definemathcommand[arsinh][op]{\mathlabel{arsinh}} \definemathcommand[arsinh][nolop]{\mathlabel{arsinh}} Maggyero ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Changing font for math function
(\rm, \ss and \tt) BUT not adaptative to the surrounding TEXT ALTERNATIVE or MATH ALTERNATIVE (\it, \bi, \sl, \bs) and stay in the normal alternative \tf (upright). So for your case it becomes simply \mathop{\text{\tf sin}} or equivalently but better: \mathop{\mathlabel{sin}} with \setupmathematics[mathlabelstyle=\tf]. About \mathupright: it is just a wrapper for \rm\tf. Better use \text{\rm\tf} or equivalently \mathop{\mathlabel{}} with \setupmathematics[mathlabelstyle=\rm\tf]. Here is a little example showing the behaviour of the new command \mathlabel defined above: \define\mathlabelstyle{\tf} % I don't have access to the last beta yet so let's assume that the key 'mathlabelstyle' (called by Hans 'functionstyle' so far) of \setupmathematics is implemented this way, with the default value \tf (Aditya prefers \rm\tf as the default value so it is just a matter of taste). \define[1]\mathlabel{\text{\mathlabelstyle #1}} \define\function{\dosingleempty\dofunction} \def\dofunction[#1]#2{% \iffirstargument \doifelse{#1}{limop}{\mathlimop{\mathlabel{#2}}}{\mathop{\mathlabel{#2}}} \else \mathop{\mathlabel{#2}} \fi} \definemathcommand[arsinh][op]{\mathlabel{arsinh}} \startbuffer $\arsinh x\ \text{and}\ n_{\mathlabel{red}}$ \stopbuffer \starttext \defineparagraphs[myparagraphs][n=5, rule=on] \setupparagraphs[myparagraphs][1][width=\dimexpr 0.3\textwidth\relax] \setupparagraphs[myparagraphs][2][width=\dimexpr 0.3\textwidth\relax] \setupparagraphs[myparagraphs][3][width=\dimexpr 0.3\textwidth\relax] \section{{\tt \backslash setupmathematics[mathlabelstyle=\backslash tf]} (default)} \startmyparagraphs \switchtobodyfont[rm] {\tt \backslash switchtobodyfont[rm]}\crlf {\tt \backslash tf}: {\tf \getbuffer}\par {\tt \backslash bf}: {\bf \getbuffer}\par {\tt \backslash it}: {\it \getbuffer}\par {\tt \backslash bi}: {\bi \getbuffer}\par {\tt \backslash sl}: {\sl \getbuffer}\par {\tt \backslash bs}: {\bs \getbuffer}\par \nextmyparagraphs \switchtobodyfont[ss] {\tt \backslash switchtobodyfont[ss]}\crlf {\tt \backslash tf}: {\tf \getbuffer}\par {\tt \backslash bf}: {\bf \getbuffer}\par {\tt \backslash it}: {\it \getbuffer}\par {\tt \backslash bi}: {\bi \getbuffer}\par {\tt \backslash sl}: {\sl \getbuffer}\par {\tt \backslash bs}: {\bs \getbuffer}\par \nextmyparagraphs \switchtobodyfont[tt] {\tt \backslash switchtobodyfont[tt]}\crlf {\tt \backslash tf}: {\tf \getbuffer}\par {\tt \backslash bf}: {\bf \getbuffer}\par {\tt \backslash it}: {\it \getbuffer}\par {\tt \backslash bi}: {\bi \getbuffer}\par {\tt \backslash sl}: {\sl \getbuffer}\par {\tt \backslash bs}: {\bs \getbuffer}\par \stopmyparagraphs \section{{\tt \backslash setupmathematics[mathlabelstyle=\backslash rm\backslash tf]} (Aditya's setup)} \define\mathlabelstyle{\rm\tf} \startmyparagraphs \switchtobodyfont[rm] {\tt \backslash switchtobodyfont[rm]}\crlf {\tt \backslash tf}: {\tf \getbuffer}\par {\tt \backslash bf}: {\bf \getbuffer}\par {\tt \backslash it}: {\it \getbuffer}\par {\tt \backslash bi}: {\bi \getbuffer}\par {\tt \backslash sl}: {\sl \getbuffer}\par {\tt \backslash bs}: {\bs \getbuffer}\par \nextmyparagraphs \switchtobodyfont[ss] {\tt \backslash switchtobodyfont[ss]}\crlf {\tt \backslash tf}: {\tf \getbuffer}\par {\tt \backslash bf}: {\bf \getbuffer}\par {\tt \backslash it}: {\it \getbuffer}\par {\tt \backslash bi}: {\bi \getbuffer}\par {\tt \backslash sl}: {\sl \getbuffer}\par {\tt \backslash bs}: {\bs \getbuffer}\par \nextmyparagraphs \switchtobodyfont[tt] {\tt \backslash switchtobodyfont[tt]}\crlf {\tt \backslash tf}: {\tf \getbuffer}\par {\tt \backslash bf}: {\bf \getbuffer}\par {\tt \backslash it}: {\it \getbuffer}\par {\tt \backslash bi}: {\bi \getbuffer}\par {\tt \backslash sl}: {\sl \getbuffer}\par {\tt \backslash bs}: {\bs \getbuffer}\par \stopmyparagraphs \section{{\tt \backslash setupmathematics[mathlabelstyle=\backslash bf]}} \define\mathlabelstyle{\bf} \startmyparagraphs \switchtobodyfont[rm] {\tt \backslash switchtobodyfont[rm]}\crlf {\tt \backslash tf}: {\tf \getbuffer}\par {\tt \backslash bf}: {\bf \getbuffer}\par {\tt \backslash it}: {\it \getbuffer}\par {\tt \backslash bi}: {\bi \getbuffer}\par {\tt \backslash sl}: {\sl \getbuffer}\par {\tt \backslash bs}: {\bs \getbuffer}\par \nextmyparagraphs \switchtobodyfont[ss] {\tt \backslash switchtobodyfont[ss]}\crlf {\tt \backslash tf}: {\tf \getbuffer}\par {\tt \backslash bf}: {\bf \getbuffer}\par {\tt \backslash it}: {\it \getbuffer}\par {\tt \backslash bi}: {\bi \getbuffer}\par {\tt \backslash sl}: {\sl \getbuffer}\par {\tt \backslash bs}: {\bs \getbuffer}\par \nextmyparagraphs \switchtobodyfont[tt] {\tt \backslash switchtobodyfont[tt]}\crlf {\tt \backslash tf}: {\tf \getbuffer}\par {\tt \backslash bf}: {\bf \getbuffer}\par {\tt \backslash it}: {\it \getbuffer}\par {\tt \backslash bi}: {\bi \getbuffer}\par {\tt \backslash sl}: {\sl \getbuffer}\par {\tt \backslash bs}: {\bs \getbuffer}\par \stopmyparagraphs \stoptext
[NTG-context] Invisible floor and ceil math delimiters
Dear members, Why the floor and ceil math delimiters don't display? Code: \starttext \startformula \Bigl\lfloor \frac{x}{y}\Bigr\rfloor \stopformula \startformula \Bigl\lceil \frac{x}{y}\Bigr\rceil \stopformula \stoptext Thank you in advance. Maggyero ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Compilation error with \ifnum
Dear list members, Why the following code gives me the following error? Code: \begingroup \catcode`\"=12 \gdef\newmcodes@{\mathcode`\'39\mathcode`\*42\mathcode`\."613A% \ifnum\mathcode`\-=45 \else \mathchardef\std@minus\mathcode`\-\relax \fi \mathcode`\-45\mathcode`\/47\mathcode`\:"603A\relax} \endgroup \definemathcommand[xyz][nolop]{\newmcodes@ \kern\zeropoint\mfunction{fancy-function-name'*.:}} \starttext $\xyz$ \stoptext Error: tex error > error on line 13 in file /Users/maggyero/Desktop/test.tex: ! Extended mathchar used as mathchar (4203026) = \newmcodes ...thcode `\."613A\ifnum \mathcode `\-= 45 \else \mathchardef \std... \newmcodes @ \kern \zeropoint \mfunction {fancy-function-name'*.:} \486>nolop #1->\mathop {#1 }\nolimits l.13 $\xyz $ Thank you in advance. Maggyero ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] \lfloor, \rfloor, \lceil, \rceil vanish with \big, \Big, \bigg, \Bigg and their left and right variants
Mr Hagen, is it the expected behaviour? \starttext The delimiters are correctly displayed: \startformula \left\lfloor \frac{x}{y}\right\rfloor \stopformula The delimiters vanish: \startformula \Bigl\lfloor \frac{x}{y}\Bigr\rfloor \stopformula \stoptext Maggyero ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] ConTeXt equivalent of \newmcodes@
> \definemathcommand[xyz][nolop]{\text{fancy-function-name'*.:}} The problem with this solution is that the font of the operator becomes the normal text font whereas I want to use the standard math upright font (so \mfunction + \kern\zeropoint + \newmathcodes is the way to go). For instance with \setupbodyfont[sansserif] the operator name becomes sans serif, which I don't want. I only need to make this code compile: \begingroup \catcode`\"=12 \gdef\newmcodes@{\mathcode`\'39\mathcode`\*42\mathcode`\."613A% \ifnum\mathcode`\-=45 \else \mathchardef\std at minus\mathcode`\-\relax \fi \mathcode`\-45\mathcode`\/47\mathcode`\:"603A\relax} \endgroup \definemathcommand[xyz][nolop]{\newmcodes@ \kern\zeropoint\mfunction{fancy-function-name'*.:}} \starttext \xyz \stoptext How can I do that? The compilation fails at the \ifnum condition. Isn't \ifnum a ConTeXt macro? Maggyero ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] ConTeXt equivalent of \newmcodes@
> Does \definemathcommand [xyz] [nolop] {xyz} do what you want? Not really if, instead of xyz, I want a name with hyphens, quotes, stars or colons. Compare the output of \definemathcommand[xyz][nolop]{fancy-function-name'*.:} in ConTeXt with the output of \DeclareMathOperator{\xyz}{fancy-function-name'*.:} in LaTeX. What I can do is \definemathcommand[xyz][nolop]{\kern\zeropoint\mfunction{fancy-function-name'*.:}} which gives the same result as \DeclareMathOperator, except for the hyphens and the star are converted into binary operators and the colon which is preceded by a space, since I didn't use \newmcodes@, that is why I asked how to implement the macro \newmcodes@ in ConTeXt, which is defined in LaTeX as \begingroup \catcode`\"=12 \gdef\newmcodes@{\mathcode`\'39\mathcode`\*42\mathcode`\."613A% \ifnum\mathcode`\-=45 \else \mathchardef\std at minus\mathcode`\-\relax \fi \mathcode`\-45\mathcode`\/47\mathcode`\:"603A\relax} \endgroup so that the following code can compile in ConTeXt: \definemathcommand[xyz][nolop]{\newmcodes@ \kern\zeropoint\mfunction{fancy-function-name'*.:}} Maggyero ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] ConTeXt equivalent of \newmcodes@
> do you have an example of usage Yes, I am trying to create the command \operatorname in ConTeXt. I know that in LaTeX \operatorname{xyz} is equivalent to \mathop{\newmcodes@\kern\z@\operator@font xyz}\csname nolimits@\endcsname} according to the AMSopn package ( http://www.bakoma-tex.com/doc/latex/amsmath/amsopn.pdf), and I am trying to translates that in ConTeXt: \mathop{\newmcodes@\kern\zeropoint\mfunction{xyz}}\nolimits but \newmcodes@ produces an error. In LaTeX, \newmcodes@ is defined as \begingroup \catcode`\"=12 \gdef\newmcodes@{\mathcode`\'39\mathcode`\*42\mathcode`\."613A% \ifnum\mathcode`\-=45 \else \mathchardef\std@minus\mathcode`\-\relax \fi \mathcode`\-45\mathcode`\/47\mathcode`\:"603A\relax} \endgroup according to the AMSopn package, so I have copied the code in my document (I only removed the @ so that I don't have to convert its catcode) but the if condition gives an error (however it compiles fine without the if condition). I also know that there is the ConTeXt command \definemathcommand[nolop]{xyz} which I thought stands as an equivalent to the \operatorname wrapper \DeclareMathOperator, but apparently not since it doe not use the 3 commands 1. \newmcodes@ 2. \kern\z@ 3. \operator@font in it, so I wonder the point of such a wrapper since all it seems it does is translates to \mathop{xyz}\nolimits To sum up, I would like to have a \DeclareMathOperator in ConTeXt, so here are my 2 questions: 1. What is the ConTeXt equivalent of \newmcodes@? 2. What is the point of \definemathcommand? Maggyero ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] ConTeXt equivalent of \newmcodes@
Dear list members, What is the ConTeXt equivalent of the LaTeX function \newmcodes@ defined in the AMSopn package (this function is used inside \DeclareMathOperator and \operatorname and has the effect of resetting text-mode punctuation characters such as *, -, /, :, and ’ in operator names)? Thank you in advance. ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] \lfloor, \rfloor, \lceil, \rceil vanish with \big, \Big, \bigg, \Bigg and their left and right variants
MWE: \starttext The delimiters are correctly displayed: \startformula \left\lfloor \frac{x}{y}\right\rfloor \stopformula The delimiters vanish: \startformula \Bigl\lfloor \frac{x}{y}\Bigr\rfloor \stopformula \stoptext Maggyero ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] \lfloor, \rfloor, \lceil, \rceil vanish with \big, \Big, \bigg, \Bigg and their left and right variants
Dear NTG-ConTeXt members, The math delimiters for floor and ceiling functions (\lfloor, \rfloor, \lceil, \rceil) work with the automatic scaling commands (\left and \right) but vanish with the manual scaling commands (\big, \Big, \bigg, \Bigg, \bigl, \Bigl, \biggl, \Biggl, \bigr, \Bigr, \biggr, \Biggr). Do I use the right commands? Or could the developers fix that? Thank you in advance. Maggyero ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Flushed right formula numbers in cases environment
I want to have the formula numbers of cases environment flushed on the right like for regular formulas (not the default numberdistance=2.5\emwidth). How can I do that? \starttext \startplaceformula \startformula \startcases \NC x = 1 \NR[+] \NC y = 1 \NR[+] \stopcases \stopformula \stopplaceformula \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Two issues with character alignment
I have found two issues with character alignment (see the following minimal example): one when \\ is used in a cell instead of \crlf, another one when \high or \low are used in a cell. Is it a bug? \starttext \setupTABLE[% aligncharacter=yes, alignmentcharacter=., align=middle] \subject{Reference} \startTABLE \NC Foo\crlf bar\NC \NR \NC 1.1 \NC \NR \NC 11.1\NC \NR \stopTABLE \subject{Double backslash issue} \startTABLE \NC Foo\\bar\NC \NR \NC 1.1 \NC \NR \NC 11.1\NC \NR \stopTABLE \subject{Sub/superscript issue} \startTABLE \NC Foo\high{bar} \NC \NR \NC 1.1 \NC \NR \NC 11.1\NC \NR \stopTABLE \startTABLE \NC Foo\low{bar}\NC \NR \NC 1.1 \NC \NR \NC 11.1\NC \NR \stopTABLE \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Subformula numbering problem
> No. > > Wolfgang This used to work, how is it possible that it does not work anymore? \starttext \startsubformulas[eq:equation] \placeformula[eq:first] \startformula c^2 = a^2 + b^2 \stopformula \placeformula[eq:second] \startformula c^2 = a^2 + b^2 \stopformula \stopsubformulas \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Subformula numbering problem
Is there a solution to the problem? ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Subformula numbering problem
The second formula has NO NUMBER (example taken from the ConTeXt Garden's Math/Display page): \starttext \startsubformulas[eq:1] \placeformula[eq:first] \startformula c^2 = a^2 + b^2 \stopformula \placeformula[eq:second] \startformula c^2 = a^2 + b^2 \stopformula \stopsubformulas Formula (\in[eq:1]) states the Pythagora's Theorem twice, once in (\in[eq:first]) and again in (\in[eq:second]). \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Height fitting with row spanning in a table
I have finally found a not perfect solution: setting manually the height of the bar cell shrinks the foo cell (setting height=fit for the foo cell does not work). \starttext \startTABLE \NC foo \NC[nr=2] \input knuth \NC \NR \NC[height=28ex] bar\NC \NR \stopTABLE \stoptext I have chosen 28ex for the height since linespace in ConTeXt equals to 2.8ex and I need the height of 10 lines in this example to fit the knuth paragraph (if I could find a way to get automatically the number of lines required to fit the knuth paragraph it would be better). ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Height fitting with row spanning in a table
How can I stretch the height of the foo cell to fit its content? \starttext \startTABLE \NC foo \NC[nr=2]\input knuth \NC \NR \NC bar \NC \NR \stopTABLE \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Height fitting cell contents while using row spanning in other columns of a table
How can I stretch the height of the x cell (in my example) to fit the x cell content? I have tried with extreme tables and natural tables but without success. \starttext With extreme tables (y cell content fitted by default):\crlf \startxtable \startxrow \startxcell[nr=2]\input knuth \stopxcell \startxcell x \stopxcell \stopxrow \startxrow \startxcell y \stopxcell \stopxrow \stopxtable With natural tables (no fit):\crlf \startTABLE \NC[nr=2]\input knuth \NC x \NC \NR \NC y \NC \NR \stopTABLE \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Character alignment in math mode
> \let\Test\fontstylesuffix > a bit different output Thank you Hans. > The command \mathgreekitalic can only be used in math mode, when you want a italic alpha in text mode you need a font which has greek characters (e.g. Gentium). Okay Wolfgang, I thought Latin Modern also had greek characters, but apparently not. So in math mode which font is used by default if it is not Latin Modern greek? ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Character alignment in math mode
> You can access the current font alternative with the \fontalternative command Thanks Wolfgang, that was exactly the command I was looking for! A last question: how can one get italic greek in TEXT MODE? The following code displays upright greek. \starttext \mathgreekitalic \alpha \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Character alignment in math mode
> why use math here? It was to avoid oldstyle figures that I use by default. But finally it's better to use oldstyle figures even in tables. Another question about fonts. Is there a way to define a conditional mathcommand based on the current alternative style? For instance, in the following example I would like to keep the bold effect but with adaptation to the local alternative style (in text mode, when the local alternative style is \tf I would like the mathcommand to be \bf, when it is \it I would like \bi, when it is \bf I would like \bf and when it is \bi I would like still \bi): \starttext \definemathcommand[cool]{{\bfmath cool}} text mode normal: \cool\crlf text mode italic: {\it \cool}\crlf text mode bold: {\bf \cool}\crlf text mode bolditalic: {\bi \cool}\crlf \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Character alignment in math mode
How can one use character alignment in math mode? (I am using the last stable ConTeXt version — 2014.05.21.) \starttext \setupTABLE[column][first][alignmentcharacter={,}, aligncharacter=yes, align=middle] Figures in text mode get aligned: \startTABLE \NC 0,0 \NC \NR \NC 0,00\NC \NR \NC 0,000 \NC \NR \stopTABLE But figures in math mode do not get aligned: \startTABLE \NC $0,0$ \NC \NR \NC $0,00$ \NC \NR \NC $0,000$ \NC \NR \stopTABLE \stoptext Best regards. ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Two levels of itemization with the 'intext' option
Aditya finally gave me a great solution on Stack Exchange: > One way to achieve this is to explicitly set the width of each symbol, and align the symbol to > the right. Visually, this is give the output that you want. For example: > \definesymbol[emdash][---] > \setupitemize[1][packed, intext][symbol=emdash, width=2em, itemalign=left, distance=0.5ex] > \setupitemize[2][packed, intext][symbol=emdash, width=3em, itemalign=left, distance=0.5ex] So the complete solution is: \definesymbol[emdash][---] \setupitemize[each][packed, intext][% itemalign=left, symbol=emdash, distance=\spaceamount] \setupitemize[1][width=2em] \setupitemize[2][width=\dimexpr 3em + \spaceamount \relax] \setupitemize[3][width=\dimexpr 4em + 2\spaceamount \relax] \setupitemize[4][width=\dimexpr 5em + 3\spaceamount \relax] \starttext \startitemize \item Sed ut perspiciatis, unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam eaque ipsa, quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt, explicabo. \item Sed ut perspiciatis, unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam eaque ipsa, quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt, explicabo. \startitemize \item Sed ut perspiciatis, unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam eaque ipsa, quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt, explicabo. \item Sed ut perspiciatis, unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam eaque ipsa, quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt, explicabo. \startitemize \item Sed ut perspiciatis, unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam eaque ipsa, quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt, explicabo. \item Sed ut perspiciatis, unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam eaque ipsa, quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt, explicabo. \startitemize \item Sed ut perspiciatis, unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam eaque ipsa, quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt, explicabo. \item Sed ut perspiciatis, unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam eaque ipsa, quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt, explicabo. \stopitemize \stopitemize \stopitemize \stopitemize \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Two levels of itemization with the 'intext' option
Hello, How can I get the output given by the following code with the itemize environment? \starttext \quad---~Sed ut perspiciatis, unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam eaque ipsa, quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt, explicabo.\par \quad---~Sed ut perspiciatis, unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam eaque ipsa, quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt, explicabo.\par \quad\quad~---~Sed ut perspiciatis, unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam eaque ipsa, quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt, explicabo.\par \quad\quad~---~Sed ut perspiciatis, unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam eaque ipsa, quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt, explicabo.\par \quad---~Sed ut perspiciatis, unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam eaque ipsa, quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt, explicabo. \stoptext I have tried this, but without success (it works only when there is one level of itemization): \definesymbol[emdashone][\quad---~] \definesymbol[emdashtwo][\quad\quad~---~] \setupitemize[1][packed, fit, intext][symbol=emdashone] \setupitemize[2][packed, fit, intext][symbol=emdashtwo] \starttext \startitemize \item Sed ut perspiciatis, unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam eaque ipsa, quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt, explicabo. \item Sed ut perspiciatis, unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam eaque ipsa, quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt, explicabo. \startitemize \item Sed ut perspiciatis, unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam eaque ipsa, quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt, explicabo. \item Sed ut perspiciatis, unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam eaque ipsa, quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt, explicabo. \stopitemize \item Sed ut perspiciatis, unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam eaque ipsa, quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt, explicabo. \stopitemize \stoptext Best regards. ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Italic small capitals with Latin Modern font
How can I use Latin Modern italic small capitals? I have seen on a previous thread that small caps are separated in an other file for Latin Modern font and that one should load it to use them in italic, but there was no example given to achieve that. Minimal example: \starttext \it \sc \input knuth \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Setting the style and conversion of the reference numbers for the \in command
Thank you Wolfgang, your hack is perfect. Hans, what do you think about adding a style and color key in \setupreferencestructureprefix to avoid having to use this defineprocessor hack? And by the way, the name \setupreferencestructureprefix does not sound really natural to me because we are talking about a reference NUMBER and there is not always a prefix. What about changing it to something like \setupreference or \setupreferencenumber (like \setuppagenumber)? ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Setting the style and conversion of the reference numbers for the \in command
I have found how to get the conversion of numbers in references (the 'prefixconversion' key in '\setupreferencestructureprefix' command), but I still do not know how to change their style. I have tried the 'style' key and 'prefixstyle' key but without success. After checking in ConTeXt source, I have realised that there is no such 'style' key for the '\setupreferencestructureprefix' command. Is there another command to change the style? If not, it would be great if Hans could add that feature. Minimal example: \setupreferencestructureprefix[section][default][% prefixconversion=Romannumerals, prefixstyle=\bf] \starttext \input knuth (Cf. \in{section}[mysection].) \section[mysection]{My section} \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Setting the style and conversion of the reference numbers for the \in command
I would like to change the style and conversion of reference numbers for the \in{myprefix}{mysuffix}[mylabel] command. Is there a \setupreference[numberstyle=, numberconversion=] command to do that? ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Bug in s-pre-60.mkiv module
I have to use this hack to make section titles appear when I use section blocks (Hans, could you have a look at this bug of your s-pre-60.mkiv module when you have time please?): \usemodule[pre-60] \setupinteraction[state=start] \starttext \startfrontmatter \StartSteps % <-- Hack \StopSteps % <-- Hack \startsection[title=My frontmatter section] % <-- Title displayed (the hack is not needed for this first section block, but I also use it here for symmetry with the next section blocks) \StartSteps \startitemize \item my item\FlushStep \item my item\FlushStep \item my item\FlushStep \stopitemize \StopSteps \stopsection \stopfrontmatter \startbodymatter \StartSteps % <-- Hack \StopSteps % <-- Hack \startsection[title=My bodymatter section] % <-- Title displayed thanks to the hack \StartSteps \startitemize \item my item\FlushStep \item my item\FlushStep \item my item\FlushStep \stopitemize \StopSteps \stopsection \stopbodymatter \startbackmatter \StartSteps % <-- Hack \StopSteps % <-- Hack \startsection[title=My backmatter section] % <-- Title displayed thanks to the hack \StartSteps \startitemize \item my item\FlushStep \item my item\FlushStep \item my item\FlushStep \stopitemize \StopSteps \stopsection \stopbackmatter \startappendices \StartSteps % <-- Hack \StopSteps % <-- Hack \startsection[title=My backmatter section] % <-- Title displayed thanks to the hack \StartSteps \startitemize \item my item\FlushStep \item my item\FlushStep \item my item\FlushStep \stopitemize \StopSteps \stopsection \stopappendices \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Two coexisting number conversions (in headers and in texts)
> Try this: > \setupheadertexts[{\convertnumber{Romannumerals}{\namedheadnumber{chapter}}\quad\getmarking[chapter]}] Thanks Wolfgang! ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Two coexisting number conversions (in headers and in texts)
Hello, How can I achieve this chapter numbering? — page 1: I My chapter (header) - First My chapter (text) — page 2: II My chapter (header) -- II My chapter (text) That is to say having every chapter number in roman numeral except the first one but only in the text (not in the header). For the moment I can achieve only the chapter numbering for the text but not for the header: \define[1]{\myconversion}{\ifcase #1\relax \or First\else \convertnumber{Romannumerals}{#1}\fi} \defineconversion[myconversion][\myconversion] \setuphead[chapter][conversion=myconversion] \setupheadertexts[{\getmarking[chapternumber]\quad\getmarking[chapter]}] \starttext \startchapter[title=My chapter] \stopchapter \startchapter[title=My chapter] \stopchapter \stoptext Best regards. ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Empty heads after leading whitespace
> after={\blank[0em]\blank[disable]}] Yes it also works, thank you Thangalin. So here is the final solution (I have added the 'nowhite' keyword in the second blank to kill whitespaces when they are active) to get real empty heads (sections here) in the document: \setupwhitespace[line] \setuphead [section] [placehead=empty, page=yes, after={\blank[none]\blank[nowhite, disable]}] \setuphead [subsection] [placehead=yes, before={\blank[line]}, after={\blank[line]}] \setupheadertexts[section] \showframe \starttext \completecontent \dorecurse{2} {\section{My section} \dorecurse{2} {\subsection{My subsection} \input knuth}} \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Head titles and section blocks bug in s-pre-60.tex module
Hans, I think there is a bug in your s-pre-60.tex module regarding the step mechanism interacting with section blocks: the head titles disappear each time ConTeXt starts a new section block. I have found a way to solve this problem by putting \StartSteps\StopSteps (empty pair, and it works also with \StartStep\StopStep empty pair) right after the start of each section block, like this for instance: \startbodymatter\StartSteps\Stopsteps blablabla \stopbodymatter. Could you correct this? Here is a minimal example illustrating the problem: \usemodule[pre-60] \setupinteraction[state=start] \starttext \startfrontmatter \startsection[title=My frontmatter section] % <-- Title displayed: fine. \StartSteps \startitemize \item my item\FlushStep \item my item\FlushStep \item my item\FlushStep \stopitemize \StopSteps \stopsection \stopfrontmatter \startbodymatter \startsection[title=My bodymatter section] % <-- Title NOT displayed: bug? \StartSteps \startitemize \item my item\FlushStep \item my item\FlushStep \item my item\FlushStep \stopitemize \StopSteps \stopsection \stopbodymatter \startbackmatter \startsection[title=My backmatter section] % <-- Title NOT displayed: bug? \StartSteps \startitemize \item my item\FlushStep \item my item\FlushStep \item my item\FlushStep \stopitemize \StopSteps \stopsection \stopbackmatter \startappendices \startsection[title=My backmatter section] % <-- Title NOT displayed: bug? \StartSteps \startitemize \item my item\FlushStep \item my item\FlushStep \item my item\FlushStep \stopitemize \StopSteps \stopsection \stopappendices \stoptext Regards. ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Empty heads after leading whitespace
> Avoid vskip. Do you have a better solution? ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Empty heads after leading whitespace
For those who are interested, I've finally solved my problem (the vertical space before a subsection which was not automatically swallowed at the top of a page when the page started with an empty section) by using the pair 'after={\vskip 0em\blank[disable]}' for sections: \setuphead [section] [placehead=empty, page=yes, after={\vskip 0em\blank[disable]}] \setuphead [subsection] [placehead=yes, before={\blank[line]}, after={\blank[line]}] \setupheadertexts[section] \showframe \starttext \completecontent \dorecurse{2} {\section{My section} \dorecurse{2} {\subsection{My subsection} \input knuth}} \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Empty heads after leading whitespace
Thanks Wolfgang. I could even have sections in the TOC with '\setuptexttexts[{\placerawheaddata[section]}]'. However, how can I start a new page at each new section? The 'page=yes' pair does no longer work with your solution 'placehead=hidden' (since the head is not placed I guess). I also tried 'before=\page' or 'after=\page' without more success. Here is a minimal example showing the absence of page breaks though I specified 'page=yes' (the section numbers are also mismatched but if one puts manual page breaks they match again, so it's not really a problem for me): \setupheadertexts[\namedstructurevariable{section}{title}][] \setuphead [section] [placehead=hidden, page=yes] % <-- This key does NOT work. \setuphead [subsection] [placehead=yes, before={\blank[line]}, after={\blank[line]}] \setuptexttexts[{\placerawheaddata[section]}] \showframe \starttext \completecontent \dorecurse{2} {\section{My section} \dorecurse{2} {\subsection{My subsection} \input knuth}} \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Empty heads after leading whitespace
A more explicit minimal example of the problem: \setupheadertexts[section] \setuphead[section][% placehead=empty, before=, after=] \setuphead[subsection][% placehead=yes, before={\blank[line]}, after={\blank[line]}] \starttext \showframe \section{My section} \subsection{My subsection (whitespace before: problem)} \input knuth \subsection{My subsection (whitespace before: fine)} \input knuth \page \subsection{My subsection (NO whitespace before: fine)} \input knuth \subsection{My subsection (whitespace before: fine)} \input knuth \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Empty heads after leading whitespace
> before=\empty, \empty is not even required. The problem with your solution (setting 'before=' i.e. empty) is that there is also no whitespace before a subsection which doesn't start on a new page. Any better ideas? ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Empty heads after leading whitespace
Hello, Here after is my problem: \setuphead[section][% placehead=empty, before=, after=] \setuphead[subsection][% placehead=yes, before={\blank[line]}, after={\blank[line]}] \setupheadertexts[section] \starttext \showframe \section{My section} \subsection{My subsection (whitespace before: )} % Here is my problem. \page \subsection{My subsection (NO whitespace before)} \stoptext The mechanism that automatically removes the leading whitespace at the top of a page doesn't work if there is an EMPTY head followed by another head (of a different level). How can I remove that whitespace? Best regards. ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Paragraph itemizes
> Use the “intext” keyword. This is exactly what I was looking for, thanks again Wolfgang! ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Paragraph itemizes
Hello, How do you setup your itemize environment to get a formatting in paragraph fashion, that is to say without margins at the second, third, etc. lines of each item, like this: 1. one one one one one one one one one one one one one one one one one one one one 2. two two two two two two two two two two two two two two two two two two two two 3. three three three three three three three three three three three three three three three three three three three three I get this instead (notice the margins represented with underscores): 1. one one one one one one one one one one __one one one one one one one one one one 2. two two two two two two two two two two __two two two two two two two two two two 3. three three three three three three three three three three __three three three three three three three three three three with: \setupitemgroup[itemize][each][packed] \startitemize[n] \item \dorecurse{20}{one} \item \dorecurse{20}{two} \item \dorecurse{20}{three} \stopitemize Best regards. ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Markings do not appear inside section block environments
> \startbodymatter > \marking[M]{Cool} > Hello world! > \stopbodymatter > > marks become nodes and these are bound to lines Thank you Hans. ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Markings do not appear inside section block environments
Is there a solution? \definemarking[M] \marking[M]{Cool} \setupheadertexts[{Marking: \getmarking[M]}][{Marking: \getmarking[M]}] \starttext \startbodymatter Hello world! \stopbodymatter \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Markings do not appear inside section block environments
Hello, The following lines do display the markings: \definemarking[M] \marking[M]{Cool} \setupheadertexts[{Marking: \getmarking[M]}][{Marking: \getmarking[M]}] \starttext Hello world! \stoptext but if I use a section block environment they do not: \definemarking[M] \marking[M]{Cool} \setupheadertexts[{Marking: \getmarking[M]}][{Marking: \getmarking[M]}] \starttext \startbodymatter Hello world! \stopbodymatter \stoptext How can I get markings working inside section block environments? ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Getting the current chapter number in the TOC
Thank you Wolfgang, it works. ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Getting the current chapter number in the TOC
Hello, How can I get the following table of contents? Contents Chapter first MyTitle Chapter II MyTitle Chapter III MyTitle I have tried: \MyNumber{\doifelse{\currentsectioncountervalue}{1}{first}{#1}} setuplist[chapter][numbercommand=\MyNumber] but it does not work. Actually because \currentsectioncountervalue always returns 0 in the table of contents. So I need another command which gives me the current number for testing if it is equal to one (first chapter). Thank you in advance. ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Two stopper bugs (tables of contents and head titles)
Hi, I've noticed two bugs (I think) with stoppers: 1) Stoppers in table of contents When you set stopper=~ in \setuplist the stopper also appears for unnumbered heads of the table of contents (chapters, sections etc. that are in frontmatter and backmatter). 2) Stoppers in head titles When you set stopper=~ in \setuphead it has no effect. Apparently all spaces (\,| |~|\ |\quad|\qquad) are ignored here, because when you set stopper=abc it works. Will Hans fix these two bugs in next betas? ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Controlling the space between the number and the title in heads
Hi, How to control the space between the number and the title in heads? By default it seems there is a space of about 1 em. I want to change that space and set a normal space instead (a word space), since I've put a dot stopper after the numbers (\setupheads[stopper=.]). Example: 1. Title (what I get) 1. Title (what I want) ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Stoppers in captions also appear in references
Hi, There is a problem with the references to figures (command \in[...]) when you put a stopper for the captions: the stopper also appears in the references. Here is a minimal example: \starttext \setupcaptions[numberstopper=\quad\emdash] \placefigure[][cow]{A cow}{\externalfigure[cow]} This is the figure \in[cow]. \stoptext How to avoid that? ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___