Re: [NTG-context] math symbol for "is an element of"
Thank you, Hans! The links you gave me provide me with another useful tool in my toolbox (which I had not been aware of before). In this particular case, as Wolfgang pointed out, \in actually does work to get the desired symbol in math mode. But it is good to know how to use text substitutions too. Thanks, Sciurus -Original Message- From: ntg-context On Behalf Of Hans Åberg Sent: Thursday, November 5, 2020 12:44 PM To: mailing list for ConTeXt users Subject: Re: [NTG-context] math symbol for "is an element of" > On 5 Nov 2020, at 21:22, t...@projectivespace.com wrote: > > Other than typing it directly (or cutting and pasting it), how does one get > the character ∈ (in case this gets garbled in emailing, this is supposed to > be the mathematical symbol that looks more or less like an epsilon, and > which is the mathematical symbol for "is an element of" a set). … > This is a very common character in mathematics, so I wanted to ask: what is > the recommended way to type this character? (I'm hoping to avoid having to > cut and paste the character into the document every time I want to use it. > And I don't have a utf enabled keyboard that would allow me to type this > symbol readily from the keyboard.) There is no recommended way. One can have it in the input sources. The quickest way to both design and use I have found is text substitutions [1]. For the mathematical styles, TeX and Unicode do it differently, and ConTeXt follows the former unless one uses a command, see [2]. 1. https://mailman.ntg.nl/pipermail/ntg-context/2020/099278.html 2. https://mailman.ntg.nl/pipermail/ntg-context/2020/099880.html ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] math symbol for "is an element of"
My sincere apologies. I tried to do my homework to avoid wasting everybody else's time with a silly question, but apparently I did not do so adequately. You're quite right -- it works with no problem. It was something else nearby that was causing my minimal example (apparently not minimal enough) to fail. That being said, the link to "\in" on the Math Basics page does point to the wrong place (the "\in" command used for references). I'll go correct that as my penance for asking such a ridiculous question. Thanks, and again my apologies, Sciurus -Original Message- From: Wolfgang Schuster Sent: Thursday, November 5, 2020 12:36 PM To: mailing list for ConTeXt users Cc: t...@projectivespace.com Subject: Re: [NTG-context] math symbol for "is an element of" t...@projectivespace.com schrieb am 05.11.2020 um 21:22: > A quick question for the ConTeXt mailing list: > > Other than typing it directly (or cutting and pasting it), how does one get > the character ∈ (in case this gets garbled in emailing, this is supposed to > be the mathematical symbol that looks more or less like an epsilon, and > which is the mathematical symbol for "is an element of" a set). > > \showmathfontcharacters gives the following information about it: > > U+02208: ∈ ∈ element of > width: 524262, height: 426798, depth: 33798, italic: 0 > mathclass: relation, mathname: in > > I'm not completely sure how to read this information, but if I read it > correctly, perhaps this character should be gotten with \in. Also, the Basic > Math page of the Wiki (https://wiki.contextgarden.net/Math/basic) states > that you should be able to type this character with "\in". But that doesn't > work (even inside a formula), since \in is used for references in ConTeXt. > And in fact the link on the Basic Math page for \in takes you to the > explanation of \in as used for ConTeXt references. > > This is a very common character in mathematics, so I wanted to ask: what is > the recommended way to type this character? (I'm hoping to avoid having to > cut and paste the character into the document every time I want to use it. > And I don't have a utf enabled keyboard that would allow me to type this > symbol readily from the keyboard.) Do you have a example where \in fails? \starttext \m {A \in B} \startformula A \in B \stopformula \stoptext Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] math symbol for "is an element of"
> On 5 Nov 2020, at 21:22, t...@projectivespace.com wrote: > > Other than typing it directly (or cutting and pasting it), how does one get > the character ∈ (in case this gets garbled in emailing, this is supposed to > be the mathematical symbol that looks more or less like an epsilon, and > which is the mathematical symbol for "is an element of" a set). … > This is a very common character in mathematics, so I wanted to ask: what is > the recommended way to type this character? (I'm hoping to avoid having to > cut and paste the character into the document every time I want to use it. > And I don't have a utf enabled keyboard that would allow me to type this > symbol readily from the keyboard.) There is no recommended way. One can have it in the input sources. The quickest way to both design and use I have found is text substitutions [1]. For the mathematical styles, TeX and Unicode do it differently, and ConTeXt follows the former unless one uses a command, see [2]. 1. https://mailman.ntg.nl/pipermail/ntg-context/2020/099278.html 2. https://mailman.ntg.nl/pipermail/ntg-context/2020/099880.html ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] math symbol for "is an element of"
t...@projectivespace.com schrieb am 05.11.2020 um 21:22: A quick question for the ConTeXt mailing list: Other than typing it directly (or cutting and pasting it), how does one get the character ∈ (in case this gets garbled in emailing, this is supposed to be the mathematical symbol that looks more or less like an epsilon, and which is the mathematical symbol for "is an element of" a set). \showmathfontcharacters gives the following information about it: U+02208: ∈ ∈ element of width: 524262, height: 426798, depth: 33798, italic: 0 mathclass: relation, mathname: in I'm not completely sure how to read this information, but if I read it correctly, perhaps this character should be gotten with \in. Also, the Basic Math page of the Wiki (https://wiki.contextgarden.net/Math/basic) states that you should be able to type this character with "\in". But that doesn't work (even inside a formula), since \in is used for references in ConTeXt. And in fact the link on the Basic Math page for \in takes you to the explanation of \in as used for ConTeXt references. This is a very common character in mathematics, so I wanted to ask: what is the recommended way to type this character? (I'm hoping to avoid having to cut and paste the character into the document every time I want to use it. And I don't have a utf enabled keyboard that would allow me to type this symbol readily from the keyboard.) Do you have a example where \in fails? \starttext \m {A \in B} \startformula A \in B \stopformula \stoptext Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] math symbol for "is an element of"
A quick question for the ConTeXt mailing list: Other than typing it directly (or cutting and pasting it), how does one get the character ∈ (in case this gets garbled in emailing, this is supposed to be the mathematical symbol that looks more or less like an epsilon, and which is the mathematical symbol for "is an element of" a set). \showmathfontcharacters gives the following information about it: U+02208: ∈ ∈ element of width: 524262, height: 426798, depth: 33798, italic: 0 mathclass: relation, mathname: in I'm not completely sure how to read this information, but if I read it correctly, perhaps this character should be gotten with \in. Also, the Basic Math page of the Wiki (https://wiki.contextgarden.net/Math/basic) states that you should be able to type this character with "\in". But that doesn't work (even inside a formula), since \in is used for references in ConTeXt. And in fact the link on the Basic Math page for \in takes you to the explanation of \in as used for ConTeXt references. This is a very common character in mathematics, so I wanted to ask: what is the recommended way to type this character? (I'm hoping to avoid having to cut and paste the character into the document every time I want to use it. And I don't have a utf enabled keyboard that would allow me to type this symbol readily from the keyboard.) Thanks in advance, Sciurus ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] defining font family for several options
Thanks Otared. That clears up that little item :-) BTW I know how to reduce font size in the headers (chapter titles) that appear on the recto pages, which I can do with something like \setupheader [style={\ss\switchtobodyfont[10pt]}], but it doesn't seem to affect the header (title of the book) on the verso pages, which is drawn from the simple statement: \startdocument [metadata:title={Book title}] Shouldn't \setupheader affect both headers? Or is it possible I have left something out of my \setupheader declaration? Julian On 4/9/20 5:30 am, Otared Kavian wrote: Hi Julian, The tilde ~ in {\bf\ss #1.~#2} is only there to have an unbreakable fixed space between the dot and the first character of the chapter title. Also in this way one can see that one has put a space there… :-) Best tegards: Otared On 2 Sep 2020, at 23:29, jbf wrote: Thanks Otared, Still off list. You are very patient but also very thorough, and this is making a huge difference to what is in fact a considerable challenge for me, but one I am coming to grips with. I believe this aspect of things is now clear to me. No hurry, but when you have a moment can you explain the significance of the ~ in the {\bf\ss #1.~#2}}part of the definition, before the 2nd element? After this I'll go back on list! I still have a couple of other queries (not font related) about things that are not functioning as they ought at the moment, which means I'll need either some understanding or some tweaking, but as always there are people on the list like yourself who are prompt with their assistance. Kind regards, Julian On 3/9/20 12:34 am, Otared Kavian wrote: Hi Julian, First of all, your definition of mychapterfont is incomplete: a font family should contain also math fonts, because even if you don't have mathematics in your text where you use that font, ConTeXt may pick some characters from math fonts. So in my opinion you should define a whole font family named mychapterfont, where in particular the sans serif comes from what you are indicating. The second point is that you should not setup bodyfont twice: when you say twice \setupbodyfont, ConTeXt will take the last one for the rest of your document… So you say only once \setupbodyfont[mainface] and then only where you want to change the font you say \start \switchtobodyfont[mychapterfont] \ss My special text. \stop By the way, as we said earlier, you can also use braces instead of \start\stop, and even better you can say \start \switchtobodyfont[mychapterfont,sans] My special text. \stop A third point is that if you are using mychapterfont only to set the titles of chapters, in my opinion it would be better to define a command which takes care of all the formatting you are wishing, and then use it in the chapter header. Something like \define[2]\MyChapterCommand{\switchtobodyfont[mychapterfont,12pt] {\bf\ss #1.~#2}} \setuphead[chapter][command=\MyChapterCommand] In this way you can just say \startchapter[title={This is my first chapter}] \input ward.tex \stopchapter without the hassles of formatting each title. If only some chapters have the special font, then you can define a new family of chapters which may share the same counter as the rest of your chapters. Best regards: Otared On 2 Sep 2020, at 03:30, jbf wrote: Otared, I thought I had it right - and it is partly right, but that newly declared font now applies to everything, not just the chapter title. So I haven't got it quite right! Maybe I shouldn't bother the list with these extra bits so am writing off list. Here is what my font definitions now look like (new one highlighted): \definefontfamily [mainface] [rm] [alegreya] [sc=file:alegreyasc-bold] \definefontfamily [mainface] [ss] [dax][tf=file:dax-regular,bf=file:dax-medium] \definefontfamily [mainface] [mm] [alegreya] \definefontfamily [mychapterfont] [ss] [itcavantgardepromd] [ss=file:itcavantgardepro-md] \setupbodyfont[mainface] \setupbodyfont[mychapterfont] I presumed I would have to \setupbodyfont[mychapterfont], but is this where I have gone wrong?. Then in the first chapter, I wrote as follows: \chapter{{\switchtobodyfont[mychapterfont] \ss Introduction to the BDACE Online Project}} and I am getting my AvanteGardePro-MD font alright, but it now applies to the whole document! I tried following title with \start switchtobodyfont[mainface] \rm and then my body text (followed by \stop obviously, at the end of the chapter). But this did not work. I then thought that I could use this [mychapterfont] and include it somehow in my \setuphead[chapter] so it would work for all chapter titles, along the lines of: \setuphead [chapter] [header=empty, {\switchtobodyfont[mychapterfont] \ss}] but that hasn't worked either - my body text throughout is still in the sans serif, not the usual [mainface] [rm] I think the problem is that if I define two or more
[NTG-context] Defining \qed (was: Bug with \wordright...)
Hi Wolfgang, Thanks for your explanations and the correct definition of the close symbol in an enumeration. Following up the discussions with Hans, in order to put a close sympbol at the end of a formula, I have the following for the definition of \qed: %% begin example-qed.tex \showframe \definesymbol[Fin][\mathematics{\square}] \def\qed{% \ifmmode \inrightmargin{\hskip-7.5mm\symbol[Fin]} % --> attention here \else \dontleavehmode\wordright{\symbol[Fin]} \fi} \setupformulas[location=left] \starttext One sees that \placeformula \startformula a^2 + b^2 = c^2 \stopformula which is the Pythagoras theorem. \qed Another proof of Pythagors theorem is based on the figure below in which one sees that: \placeformula \startformula (a+b)^2 = c^2 + 2ab \quad \imply \quad a^2 + b^2 = c^2. \qed \stopformula \stoptext %% end example-qed.tex Now how can I replace « \hskip-7.5mm » (which was found by trial and error…) in a robust manner so that the close symbols in the formulas are vertically aligned with the close symbols in the text? In other terms can one compute automatically the amount of negative \hskip so that the definition is correct when one changes the font size and the layout? Thanks in advance: Otared > On 5 Aug 2020, at 21:15, Wolfgang Schuster > wrote: > […] > > Below is a cleaner version to put a symbol at the end of each proof. The > \blank setting in the \PlaceProofSymbol definition moves the symbol back in > the math formula to avoid the vertical space between them, you can remove it > but I would at leas use \blank[back] to get rid of the empty line between the > formula and the symbol. > > \define[1]\PlaceProofSymbol > {\blank[back,overlay]% > \dontleavehmode\wordright{#1}} > > \defineenumeration > [proof] > [ closesymbol={\symbol[square]}, > closecommand=\PlaceProofSymbol] > > \starttext > > \startproof > \startformula >a^2 + b^2 = c^2 > \stopformula > \stopproof > > \stoptext > > Wolfgang > ___ > If your question is of interest to others as well, please add an entry to the > Wiki! > > maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : http://contextgarden.net > ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Bug with \wordright in LMTX version 2020-08-03 14:25
Fabrice Couvreur schrieb am 05.08.2020 um 19:33: Hello, I also use a square to complete a demonstration. I tried this without success Thank you Fabrice \definesymbol[Fin][\mathematics{\square}] \def\qed{\strut\wordright{\symbol[Fin]}} \defineenumeration [proof] [..., closesymbol={\symbol[\qed]}] 1. \symbol is meant to access pre defined symbols, as fallback method when the requested symbol doesn't exist ConTeXt outputs the argument. This fallback is in my opinion problematic because it's easy to miss it. \starttext \symbol[square] \symbol[quadrat] \stoptext 2. When you use the closesymbol for a enumeration ConTeXt uses also the argument of the closecommand to apply something to the symbol, by default the argument to the closecommand key is \wordright. This means you're putting \wordright (which itself is flushed as symbol) within \wordright which has to fail at some point. Below is a cleaner version to put a symbol at the end of each proof. The \blank setting in the \PlaceProofSymbol definition moves the symbol back in the math formula to avoid the vertical space between them, you can remove it but I would at leas use \blank[back] to get rid of the empty line between the formula and the symbol. \define[1]\PlaceProofSymbol {\blank[back,overlay]% \dontleavehmode\wordright{#1}} \defineenumeration [proof] [ closesymbol={\symbol[square]}, closecommand=\PlaceProofSymbol] \starttext \startproof \startformula a^2 + b^2 = c^2 \stopformula \stopproof \stoptext Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Bug with \wordright in LMTX version 2020-08-03 14:25
Hello, I also use a square to complete a demonstration. I tried this without success Thank you Fabrice \definesymbol[Fin][\mathematics{\square}] \def\qed{\strut\wordright{\symbol[Fin]}} \defineenumeration [proof] [text=Démonstration, alternative=serried, distance=\zeropoint, number=no, headstyle=boldslanted, width=broad, closesymbol={\symbol[\qed]}] \starttext \startproof \startformula a^2 + b^2 = c^2 \stopformula \stopproof \stoptext Le mar. 4 août 2020 à 14:02, Otared Kavian a écrit : > Hi Hans, > > Thanks for the hint which consists in adding an \ifmmode to the definition > of \qed. > However, as you suggest, one needs some other mechanism in math mode, > since with your new definition of \qed the alignment of the formula changes > when one adds this close symbol: > > begin-example-qed.tex > \definesymbol[Fin][\mathematics{\square}] > \def\qed{\ifmmode\quad\symbol[Fin]\else\strut\wordright{\symbol[Fin]}\fi} > \starttext > \startformula > a^2 + b^2 = c^2. > \stopformula > \startformula > a^2 + b^2 = c^2. \qed > \stopformula > One sees that\type{\qed} in the formula changes the alignment of the > formula. \qed > \stoptext > end-example-qed.tex > > Thanks a lot for everything: Otared > > > On 4 Aug 2020, at 13:24, Hans Hagen wrote: > > > > On 8/4/2020 11:17 AM, Otared Kavian wrote: > >> Thanks Hans for your explanations. > >> The problem I encountered is that, the command \qed is used dozens of > time in my text without any issue because it was preceded by something on > th eline, but the only place where it was alone after a formula resulted in > the error and it was not easy for me to isolate the issue… > >> By the way, in mkii it was possible to add \qed on the last line of a > math formula, but that does not work anymore: > >> \definesymbol[Fin][\mathematics{\square}] > >> \def\qed{\strut\wordright{\symbol[Fin]}} > >> \starttext > >> \startformula > >> a^2 + b^2 = c^2. \qed > >> \stopformula > >> The above formula does not show the close symbol.\qed > >> \stoptext > >> Is there a way to have something like \qed work in math formulas? > > because that's now hwpo wordright works ... > > > > \def\qed{\ifmmode\quad\symbol[Fin]\else\strut\wordright{\symbol[Fin]}\fi} > > > > but we probably need something different, something that hooks into > display math > > > > Hans > > > > > > - > > Hans Hagen | PRAGMA ADE > > Ridderstraat 27 | 8061 GH Hasselt | The Netherlands > > tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl > > - > > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : http://contextgarden.net > > ___ > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Bug with \wordright in LMTX version 2020-08-03 14:25
Hi Hans, Thanks for the hint which consists in adding an \ifmmode to the definition of \qed. However, as you suggest, one needs some other mechanism in math mode, since with your new definition of \qed the alignment of the formula changes when one adds this close symbol: begin-example-qed.tex \definesymbol[Fin][\mathematics{\square}] \def\qed{\ifmmode\quad\symbol[Fin]\else\strut\wordright{\symbol[Fin]}\fi} \starttext \startformula a^2 + b^2 = c^2. \stopformula \startformula a^2 + b^2 = c^2. \qed \stopformula One sees that\type{\qed} in the formula changes the alignment of the formula. \qed \stoptext end-example-qed.tex Thanks a lot for everything: Otared > On 4 Aug 2020, at 13:24, Hans Hagen wrote: > > On 8/4/2020 11:17 AM, Otared Kavian wrote: >> Thanks Hans for your explanations. >> The problem I encountered is that, the command \qed is used dozens of time >> in my text without any issue because it was preceded by something on th >> eline, but the only place where it was alone after a formula resulted in the >> error and it was not easy for me to isolate the issue… >> By the way, in mkii it was possible to add \qed on the last line of a math >> formula, but that does not work anymore: >> \definesymbol[Fin][\mathematics{\square}] >> \def\qed{\strut\wordright{\symbol[Fin]}} >> \starttext >> \startformula >> a^2 + b^2 = c^2. \qed >> \stopformula >> The above formula does not show the close symbol.\qed >> \stoptext >> Is there a way to have something like \qed work in math formulas? > because that's now hwpo wordright works ... > > \def\qed{\ifmmode\quad\symbol[Fin]\else\strut\wordright{\symbol[Fin]}\fi} > > but we probably need something different, something that hooks into display > math > > Hans > > > - > Hans Hagen | PRAGMA ADE > Ridderstraat 27 | 8061 GH Hasselt | The Netherlands > tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl > - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Bug with \wordright in LMTX version 2020-08-03 14:25
On 8/3/2020 10:10 PM, Otared Kavian wrote: Hi Hans, A file which used to be typeset correctly with the previous versions of lmtx, now produces an error. Despite the error message being extremely cryptic: Error ! Missing number, treated as zero I could guess the origin of the bug, which seems to be \wordright, but although the following minimal example shows a bug it does not produce the same ERROR output page: the square ''end of proof'' \definesymbol[Fin][\mathematics{\square}] \def\qed{\wordright{\symbol[Fin]}} \starttext \startformula a^2 + b^2 = c^2 \stopformula \qed % the problem is here \stoptext In the above example if one adds something before \qed, then the square end-of-proof appears. However in my real file ConTeXt ouputs an error page and says: Error ! Missing number, treated as zero. One can debate if the old behavior was ok ... wordright is meant for adding something at the end of a paragraph and you have none here. You can add a \strut in your definition to force a line. The lmtx implementation actually permit this: \definesymbol[Fin][\mathematics{\square}] \def\qed{\strut\wordright{\symbol[Fin1]}\wordright{\symbol[Fin2]}\wordright{\symbol[Fin3]}} \starttext \startformula a^2 + b^2 = c^2 \stopformula \qed % the problem is here \stoptext i'm still exploring this but it has to do with collecting stuff, as in: \wordright{before} test \par test \wordright{before} \par (i'll look at the number issue which indeed looks a like a bug) - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Bug with \wordright in LMTX version 2020-08-03 14:25
Hi Hans, A file which used to be typeset correctly with the previous versions of lmtx, now produces an error. Despite the error message being extremely cryptic: Error ! Missing number, treated as zero I could guess the origin of the bug, which seems to be \wordright, but although the following minimal example shows a bug it does not produce the same ERROR output page: the square ''end of proof'' \definesymbol[Fin][\mathematics{\square}] \def\qed{\wordright{\symbol[Fin]}} \starttext \startformula a^2 + b^2 = c^2 \stopformula \qed % the problem is here \stoptext In the above example if one adds something before \qed, then the square end-of-proof appears. However in my real file ConTeXt ouputs an error page and says: Error ! Missing number, treated as zero. Best regards: Otared ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Notation of the first derivative in mathematical mode (lmtx)
Hello, I replaced the context engine with the lmtx engine but I find that the derivative symbol is too high regardless of the font used. I mainly use modern and pagella because I type many texts using mathematics: can we correct this problem, Thanks for your help. Fabrice \starttext \startitemize[n] \startitem \math{f'(x)=x²+4x+4} \stopitem \startitem \math{f''(x)=2x+4} \stopitem \stopitemize \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] french translation of ConTeXt interface - progress (v3)
Hi, a "early-alpha-version" of updated setup-fr.pdf https://wiki.contextgarden.net/File:setup-fr.pdf with the associated mult-def.lua. https://wiki.contextgarden.net/File:20_output_mult-def_garulfo.zip Any feedback will be welcome. To developers : what priorities, in terms of categories, would you advise for the translation ? %- Progress: TYPE TOTALDONE commands 3962 94324% constants 841 70884% elements26 26 100% setupstrings 135 5742% = 100% other are { ( |... variables 1329 63248% 6293236638% CATEGORYTOTALDONE alignment 1639256% attribute23 2 9% background 1587145% bibliography1482014% buffer 301653% catcode 22 418% characters 59 0% colors 1083230% conditional 59 0% counter 3117223% float 1 0% fonts 453 22449% graphics2478836% language2237333% layout 1737946% lua 42 1 2% mathematics 3694211% nan 650 57288% None 1269 118 9% pdf 2289943% references 804253% rules854553% structure 892 56764% symbols 1101917% system3 0% tables 1033231% verbatim 221777% whitespace 1073028% xml 155 9 6% 6293 236638% ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Store images and text in the right margin
Hello everyone and in particular to Wolfgang who has already provided me with the solution below. I will have to write a Mathematics book for my students and the remarks and graphics should be in the right margin. I got the code written by Wolfgang and tried to include the graphics in it. The result is not as expected because the graphic overflows on the text. The course will be written in A4 format with an 11 pts font. Thanks for your help. Fabrice \useMPlibrary[dum] \setuppapersize[A4] \setuplayout [width=12cm, rightmargin=5cm] \definemargindata[marginfigure][inright] \setupmargindata [marginfigure][command=\vbox,align=middle] \defineuserdata [margintext] [alternative=margintext] \defineuserdataalternative [margintext] [renderingsetup=userdata:margintext] \startsetups [userdata:margintext] \margindata [inright] [%style=\smallbodyfont, style={\switchtobodyfont[9pt]}, width=\rightmarginwidth, align={flushleft,broad}] {{\bf Remarque — }\getinlineuserdata} \stopsetups \showframe \starttext \startuserdata[margintext] \input ward \stopuserdata \marginfigure{\externalfigure[dummy][width=\rightmarginwidth]} \startchapter[title=First chapter] \dorecurse{2}{\input knuth} \stopchapter \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Converting from LaTeX for PDF accessibility tagging?
Thank you very much - I think the problem was with a LaTeX "align" environment which pandoc translated into a setting which ConTeXt didn't recognize. These equations were monsters, so I'll try with simpler equations to give you an idea. But in fact what you say makes perfect sense, and I'll go back and read through the mathematics document again, and more closely this time! (For matrices and arrays I still prefer the neat LaTeX implementation, but maybe that's simply my general unfamiliarity with ConTeXt.) Thanks again! Alasdair On Mon, Jun 29, 2020 at 2:27 AM Aditya Mahajan wrote: > On Sun, 28 Jun 2020, Alasdair McAndrew wrote: > > > I tried ConTeXt a few years ago, then gave up on it because of its > > wordiness and verbosity. The 2006 article on creating AMSTeX output in > > ConTeXt at https://www.ntg.nl/maps/34/06.pdf shows exactly what I mean: > the > > LaTeX commands are small and neat; the ConTeXt commands are not. > > As explained in the last paragraph, there are pre-built shortcuts for the > main alignments and you can define your own to match amsmath style, if you > wish. > > If you are worried about typing, look into tab completion for your editor > of choice. For example, in vim, I can do `for` which expands to > `\startformula ... \stopformula` and `fora` expands to `\startformula > \startalign ... \stopalign \stopformula`. > > > However, I need now to use ConTeXt for accessibility tagging, so I'm > > prepared to give it another try. And this means converting some LaTeX > > documents into ConTeXt. Is there a better way than using pandoc? I ran > a > > LaTeX document through pandoc, but the result is certainly not fully > > "ConTeXt compliant", and generates errors instead of compiling. > > AFAIK, pandoc is not aware of context math. When I convert latex to > context, I find it simpler to do it some hand written regex which translate > commands according to my writing style. > > > I can get easily lost on the ConTeXt site: the documentation is there in > > plenty, but seems hard to search. The main problem for me is mathematics > > and alignment: not just for equations, but for matrices and arrays. What > > I'd love - if it exists - is a document showing how to rewrite LaTeX into > > ConTeXt. Something like the above document, which is now 14 years old. > > The user-interface is still the same. > > > Anyway, as I say, my main issues are converting LaTeX into ConTeXt. and > > dealing with mathematics. Any pointers would be gratefully received! > > Can you post an example of LaTeX math that you are having difficulty in > converting? It is hard to answer this in the abstract. > > Aditya > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : http://contextgarden.net > > ___ > -- https://numbersandshapes.net ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Converting from LaTeX for PDF accessibility tagging?
On Sun, 28 Jun 2020, Alasdair McAndrew wrote: I tried ConTeXt a few years ago, then gave up on it because of its wordiness and verbosity. The 2006 article on creating AMSTeX output in ConTeXt at https://www.ntg.nl/maps/34/06.pdf shows exactly what I mean: the LaTeX commands are small and neat; the ConTeXt commands are not. As explained in the last paragraph, there are pre-built shortcuts for the main alignments and you can define your own to match amsmath style, if you wish. If you are worried about typing, look into tab completion for your editor of choice. For example, in vim, I can do `for` which expands to `\startformula ... \stopformula` and `fora` expands to `\startformula \startalign ... \stopalign \stopformula`. However, I need now to use ConTeXt for accessibility tagging, so I'm prepared to give it another try. And this means converting some LaTeX documents into ConTeXt. Is there a better way than using pandoc? I ran a LaTeX document through pandoc, but the result is certainly not fully "ConTeXt compliant", and generates errors instead of compiling. AFAIK, pandoc is not aware of context math. When I convert latex to context, I find it simpler to do it some hand written regex which translate commands according to my writing style. I can get easily lost on the ConTeXt site: the documentation is there in plenty, but seems hard to search. The main problem for me is mathematics and alignment: not just for equations, but for matrices and arrays. What I'd love - if it exists - is a document showing how to rewrite LaTeX into ConTeXt. Something like the above document, which is now 14 years old. The user-interface is still the same. Anyway, as I say, my main issues are converting LaTeX into ConTeXt. and dealing with mathematics. Any pointers would be gratefully received! Can you post an example of LaTeX math that you are having difficulty in converting? It is hard to answer this in the abstract. Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Converting from LaTeX for PDF accessibility tagging?
Hello, I tried ConTeXt a few years ago, then gave up on it because of its wordiness and verbosity. The 2006 article on creating AMSTeX output in ConTeXt at https://www.ntg.nl/maps/34/06.pdf shows exactly what I mean: the LaTeX commands are small and neat; the ConTeXt commands are not. However, I need now to use ConTeXt for accessibility tagging, so I'm prepared to give it another try. And this means converting some LaTeX documents into ConTeXt. Is there a better way than using pandoc? I ran a LaTeX document through pandoc, but the result is certainly not fully "ConTeXt compliant", and generates errors instead of compiling. I can get easily lost on the ConTeXt site: the documentation is there in plenty, but seems hard to search. The main problem for me is mathematics and alignment: not just for equations, but for matrices and arrays. What I'd love - if it exists - is a document showing how to rewrite LaTeX into ConTeXt. Something like the above document, which is now 14 years old. I also notice that much of the contextgarden wiki is outdated. For example, on the use of ConTeXt in MikTeX, we read "As of end of June 2011 MikTeX is still (or again) non-functional." I'm aware that all of this is the work of dedicated and unpaid volunteers, so this is not a complaint! Just an observation. Anyway, as I say, my main issues are converting LaTeX into ConTeXt. and dealing with mathematics. Any pointers would be gratefully received! Thanks, Alasdair -- https://numbersandshapes.net ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Unexpected symbol with Enumeration
Hi Aditya,Thanks for your hint: I didn't know that subtelty about Lucida OT (and I don't know how to set it up when using Lucida OT).That being said, actually what I would like to use is the kind of script font which is the attached document (those script fonts were widely used in higher mathematics textbooks in France). So when I use mkiv the result is the one I like and is attached to this message (test-scriptfonts-mkiv.pdf). However, thanks to your message I went to check, and noticed that lmtx does not give the same math script fonts, and I don't know what has changed between mkiv and lmtx regarding Asana Math, or the way in which fallback fonts are managed (please see the attached file test-scriptfonts-lmtx.pdf).Thanks for your help: OtaredPS: this the the file test-scriptfonts.tex: Some Font Definitions\definefallbackfamily[myfont][math][Asana Math] [range={uppercasescript,lowercasescript}]% lucida font\definefontfamily[myfont][serif][Lucida Bright OT]\definefontfamily[myfont][math][LucidaBrightMathOT]\definefontfamily[myfont][sans][LucidaSansOT]\definefontfamily[myfont][mono][LucidaSansTypewriterOT]%\setupbodyfont[myfont,10pt]%% End of Font Definitions%%\starttext\startbuffer[test]Testing script fonts in maths\startformulax^2 + y^2 = z^2, \quad \sin(a)^2 + \cos(b)^2 = 1.\stopformula\startformula\cal{A}, \quad \cal{B}, \quad \cal{C}, \quad \cal{D},\quad \cal{E},\quad \cal{F},\quad \cal{G},\quad \cal{H},\quad \cal{K},\quad \cal{L},\quad \cal{M},\quad \cal{P},\quad \cal{S},\quad \cal{T}\stopformula\hairline\stopbuffer\switchtobodyfont[lucidaot]{\bf Lucida OT: }\getbuffer[test]\switchtobodyfont[myfont]{\bf Lucida OT with Asana Math: }\getbuffer[test]\stoptext test-scriptfonts-mkiv.pdf Description: Adobe PDF document test-scriptfonts-lmtx.pdf Description: Adobe PDF document On 17 Oct 2019, at 08:00, Aditya Mahajan <adit...@umich.edu> wrote:On Wed, 16 Oct 2019, Otared Kavian wrote:I use Lucida OT fonts for all my documents, but since I prefer the script fonts from another font I have the following setups for my font:OT: Do you use this to get a less cursive script font?Lucida (like many opentype math fonts) comes with two stylistic variants for script letters. The default is the cursive variant, but you can get the less cursive variant using ss04 stylistic set. See page 8 ofhttps://tug.org/store/lucida/lucidaot.pdfAditya___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-contextwebpage : http://www.pragma-ade.nl / http://context.aanhet.netarchive : https://bitbucket.org/phg/context-mirror/commits/wiki : http://contextgarden.net__ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] mathring circle above a letter
Hi all, The \mathring command puts a small circle above a letter, but in some fonts (namely Lucida OT) that circle is too small. So thanks to a hint by Hans and Wolfgang some years ago I use the following definition which works fine when used alone. But in maths, one needs sometimes to use it with the command \overline (or \overbar) and the result is not nice. Can someone tell me please whether it is possible to modify the \mathring command so that th ecircle is a little bit larger, or the one I define below as \interior in order to have a correct result (more clearly said: I would like the small circle to be put above the bar which is itself above the A in $\interior{\overline{A}}$). Thanks for any help: OK %%% begin mathring-interior.tex \setuppapersize[A5][A5] \definemathstackers[MySymbol] [voffset=-1.2\mathexheight, hoffset=\zeropoint, mathclass=ord, topoffset=.3\mathemwidth, % poor man's italic correction middlecommand=\mathematics] %\define[1]\interior{\mathover[MySymbol]{"2218}{#1}} %2218 U+00B0 \define[1]\interior{\mathover[MySymbol]{176}{#1}} %2218 U+00B0 \starttext The interior of a set $A$ is denoted by $\interior{A}$. The interior of a set $A$ is denoted by $\mathring{A}$. The closure of the interior is $\overline{\interior{A}}$. Beware $\overline{\interior{A}} \neq \interior{\overline{A}}$. (This is not nice\dots). Beware $\overline{\mathring{A}} \neq \mathring{\overline{A}}$ \stoptext %%% end mathring-interior.tex mathring-interior.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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Typesetting Markdown – Part 7: Mathematics
https://dave.autonoma.ca/blog/2019/08/06/typesetting-markdown-part-7/ This installment tackles a cost-benefit analysis problem comparing electric to gasoline-powered vehicles, calls into R for amortization, typesets math and a repayment schedule, continues to explore the separation of content from presentation, and expands on the shell scripts from previous parts. Feedback is welcome, especially about the ConTeXt-related items (see Style and Math near the bottom). Thanks for reading! ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Typesetting Markdown
On 5/24/19 5:37 AM, Thangalin wrote: > Hi Gour, > > I added an abstract, an overview section with the plan, and an RSS feed: > > https://dave.autonoma.ca/blog/2019/05/22/typesetting-markdown-part-1/ > > One of the reasons I chose Pandoc's Markdown is for its support of > classes and annotations. I looked into the pandoc-xhtml link and it > looked both incomplete and lacking support for typesetting mathematics. Hi Dave, pandoc-xhtml is only a poor example about handling XML as input source. I only use Markdown and pandoc, because they provide a limited way of XML code easily. The real thing is that you can feed ConTeXt with XML sources to typeset what you want. My use of XML typesetting is basic when compared to that of Hans, Taco, Thomas Schmitz and Hans van der Meer. Of course, other approaches are perfectly fine. My comment was only about not focusing on pandoc-xhtml (which I should rewrite from scratch when I find time for that), but on what makes it thick. Just in case it helps, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Typesetting Markdown
Thangalin writes: > I added an abstract, an overview section with the plan, and an RSS > feed: Thanks a lot - now it's much better seeing what is ahead of us. ;) > One of the reasons I chose Pandoc's Markdown is for its support of > classes and annotations. I was not using Pandoc's markdown, so will have to check the docs in regard. > I looked into the pandoc-xhtml link and it looked both incomplete and > lacking support for typesetting mathematics. For Markdown --> ConTeXt usage, math is not my primary concern, but wonder what do you think about the Pandoc's "cons" as stated on pandoc-xhtml site, iow: * Main document language information. * Markup for language in text portions. * Any or elements markup. > Have a read and let me know what you think! See above. ;) Sincerely, Gour -- You have a right to perform your prescribed duty, but you are not entitled to the fruits of action. Never consider yourself the cause of the results of your activities, and never be attached to not doing your duty. ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Typesetting Markdown
Hi Gour, I added an abstract, an overview section with the plan, and an RSS feed: https://dave.autonoma.ca/blog/2019/05/22/typesetting-markdown-part-1/ One of the reasons I chose Pandoc's Markdown is for its support of classes and annotations. I looked into the pandoc-xhtml link and it looked both incomplete and lacking support for typesetting mathematics. Have a read and let me know what you think! Thank you for the feedback. ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Unicode mathematics in ConTeXt
On Sat, 04 May 2019 04:32:19 -0600, Wolfgang Schuster wrote: > Hi Idris, > > please read this: https://www.w3.org/TR/unicode-xml/#Superscripts Many thanks. The issue is clearer now, e.g., === When used in mathematical context (MathML) it is recommended to consistently use style markup for superscripts and subscripts. This is because mathematical layout allows not just individual symbols, but entire expressions to be superscripted or subscripted in a regular, nested manner. === Of course, consistent use of style markup means that we can't naively extract superscript text from the pdf, e.g., \CATCA becomes 𝓒nt. OTOH, issues 4.i and 4.ii below are still perplexing. Are there any workarounds? Thanks again. Best wishes Idris > Hamid,Idris schrieb am 03.05.2019 um 21:40: >> Dear gang, >> >> Ok, I've made some progress: >> >> 1. tex-gyre etc. *do* support Unicode mathematics, but the version of >> ConTeXt I was using had produced the wrong encoding in the pdf output. >> For >> example, U+1D4D2 (𝓒) in the input was being mapped to U+2D4D2 in the >> output. >> >> Updating to the latest beta appears to have fixed this issue. >> >> 2. tex-gyre etc. appears to be missing some superscript characters, >> e.g., >> ⁿ (U+207F). >> >> 3. New example: >> >> === >> \setupbodyfont >> [cambria,12pt] >> % [pagella,12pt] >> % [times,12pt] >> >> % \starttext >> \startTEXpage >> \def\ANTI{{^{\rm nt}}} >> \def\ANTIU{{^{\rm ⁿᵗ}}} >> >> \def\CATCA{$\cal \bf C\ANTI$} >> \def\CATCAU{$𝓒\ANTIU$} >> >> 𝓒 \CATCA \CATCAU >> \stopTEXpage >> % \stoptext >> === >> >> \CATCAU and \ANTIU use Unicode characters and superscripts directly, >> instead of the old TeX method. >> >> 4. Issues. In the pdf output of \CATCAU: >> i) Why does ConTeXt make the second superscript larger than the first? >> ii) If one copies the text of the pdf output to an editor - even this >> email client - the second superscript moves to a new line: >> >> 𝓒 ⁿ >> t >> >> Why does this happen? Is this a bug? >> >> 5. Here is what we want: 𝓒 ⁿᵗ >> >> What is the proper or best way to get a character-superscript >> combination >> in ConTeXt whose output can be copied and pasted to an editor and give >> the >> correct result? What am I missing? >> >> Thank you in advance. >> >> Best wishes >> Idris >> >> On Wed, 01 May 2019 14:58:06 -0600, Hamid,Idris >> wrote: >> >>> Dear gang, >>> >>> I need to convert a document from TeX-style to Unicode mathematics. For >>> example: >>> >>> \starttext >>> \def\ANTI{{^{\rm nt}}} >>> \def\CATCA{$\cal \bf C\ANTI$} >>> >>> \CATCA >>> \stoptext >>> >>> Issues: >>> >>> 1. I need calligraphic characters, but the relevant characters in >>> latinmodern-math.otf are not encoded in (standard) Unicode. The same >>> goes >>> for the tex-gyre-math fonts. >>> >>> 2. What comprehensive unicode-math fonts do you recommend as an >>> alternative? >>> >>> 3. In the above example, \cal is used. >>> >>> 4. Other issues may arise, e.g., getting subscripts and superscripts >>> correct. How might one rewrite the above with Unicode mathematics in >>> mind? >>> Is there a My Way or some other guide to Unicode mathematics in >>> ConTeXt? >>> >>> This writer has never had to think about this matter before so this is >>> all >>> new ground to learn. Thank you in advance for any guidance. >>> >>> Best wishes >>> Idris -- Idris Samawi Hamid, Professor Department of Philosophy Colorado State University Fort Collins, CO 80512 ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Unicode mathematics in ConTeXt
Hi Idris, please read this: https://www.w3.org/TR/unicode-xml/#Superscripts Wolfgang Hamid,Idris schrieb am 03.05.2019 um 21:40: Dear gang, Ok, I've made some progress: 1. tex-gyre etc. *do* support Unicode mathematics, but the version of ConTeXt I was using had produced the wrong encoding in the pdf output. For example, U+1D4D2 (𝓒) in the input was being mapped to U+2D4D2 in the output. Updating to the latest beta appears to have fixed this issue. 2. tex-gyre etc. appears to be missing some superscript characters, e.g., ⁿ (U+207F). 3. New example: === \setupbodyfont [cambria,12pt] % [pagella,12pt] % [times,12pt] % \starttext \startTEXpage \def\ANTI{{^{\rm nt}}} \def\ANTIU{{^{\rm ⁿᵗ}}} \def\CATCA{$\cal \bf C\ANTI$} \def\CATCAU{$𝓒\ANTIU$} 𝓒 \CATCA \CATCAU \stopTEXpage % \stoptext === \CATCAU and \ANTIU use Unicode characters and superscripts directly, instead of the old TeX method. 4. Issues. In the pdf output of \CATCAU: i) Why does ConTeXt make the second superscript larger than the first? ii) If one copies the text of the pdf output to an editor - even this email client - the second superscript moves to a new line: 𝓒 ⁿ t Why does this happen? Is this a bug? 5. Here is what we want: 𝓒 ⁿᵗ What is the proper or best way to get a character-superscript combination in ConTeXt whose output can be copied and pasted to an editor and give the correct result? What am I missing? Thank you in advance. Best wishes Idris On Wed, 01 May 2019 14:58:06 -0600, Hamid,Idris wrote: Dear gang, I need to convert a document from TeX-style to Unicode mathematics. For example: \starttext \def\ANTI{{^{\rm nt}}} \def\CATCA{$\cal \bf C\ANTI$} \CATCA \stoptext Issues: 1. I need calligraphic characters, but the relevant characters in latinmodern-math.otf are not encoded in (standard) Unicode. The same goes for the tex-gyre-math fonts. 2. What comprehensive unicode-math fonts do you recommend as an alternative? 3. In the above example, \cal is used. 4. Other issues may arise, e.g., getting subscripts and superscripts correct. How might one rewrite the above with Unicode mathematics in mind? Is there a My Way or some other guide to Unicode mathematics in ConTeXt? This writer has never had to think about this matter before so this is all new ground to learn. Thank you in advance for any guidance. Best wishes Idris ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Unicode mathematics in ConTeXt
Dear gang, Ok, I've made some progress: 1. tex-gyre etc. *do* support Unicode mathematics, but the version of ConTeXt I was using had produced the wrong encoding in the pdf output. For example, U+1D4D2 (𝓒) in the input was being mapped to U+2D4D2 in the output. Updating to the latest beta appears to have fixed this issue. 2. tex-gyre etc. appears to be missing some superscript characters, e.g., ⁿ (U+207F). 3. New example: === \setupbodyfont [cambria,12pt] % [pagella,12pt] % [times,12pt] % \starttext \startTEXpage \def\ANTI{{^{\rm nt}}} \def\ANTIU{{^{\rm ⁿᵗ}}} \def\CATCA{$\cal \bf C\ANTI$} \def\CATCAU{$𝓒\ANTIU$} 𝓒 \CATCA \CATCAU \stopTEXpage % \stoptext === \CATCAU and \ANTIU use Unicode characters and superscripts directly, instead of the old TeX method. 4. Issues. In the pdf output of \CATCAU: i) Why does ConTeXt make the second superscript larger than the first? ii) If one copies the text of the pdf output to an editor - even this email client - the second superscript moves to a new line: 𝓒 ⁿ t Why does this happen? Is this a bug? 5. Here is what we want: 𝓒 ⁿᵗ What is the proper or best way to get a character-superscript combination in ConTeXt whose output can be copied and pasted to an editor and give the correct result? What am I missing? Thank you in advance. Best wishes Idris On Wed, 01 May 2019 14:58:06 -0600, Hamid,Idris wrote: > Dear gang, > > I need to convert a document from TeX-style to Unicode mathematics. For > example: > > \starttext > \def\ANTI{{^{\rm nt}}} > \def\CATCA{$\cal \bf C\ANTI$} > > \CATCA > \stoptext > > Issues: > > 1. I need calligraphic characters, but the relevant characters in > latinmodern-math.otf are not encoded in (standard) Unicode. The same goes > for the tex-gyre-math fonts. > > 2. What comprehensive unicode-math fonts do you recommend as an > alternative? > > 3. In the above example, \cal is used. > > 4. Other issues may arise, e.g., getting subscripts and superscripts > correct. How might one rewrite the above with Unicode mathematics in > mind? > Is there a My Way or some other guide to Unicode mathematics in ConTeXt? > > This writer has never had to think about this matter before so this is > all > new ground to learn. Thank you in advance for any guidance. > > Best wishes > Idris -- Idris Samawi Hamid, Professor Department of Philosophy Colorado State University Fort Collins, CO 80512 scratch.pdf Description: scratch.pdf scratch.tex Description: scratch.tex ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Unicode mathematics in ConTeXt
Dear gang, I need to convert a document from TeX-style to Unicode mathematics. For example: \starttext \def\ANTI{{^{\rm nt}}} \def\CATCA{$\cal \bf C\ANTI$} \CATCA \stoptext Issues: 1. I need calligraphic characters, but the relevant characters in latinmodern-math.otf are not encoded in (standard) Unicode. The same goes for the tex-gyre-math fonts. 2. What comprehensive unicode-math fonts do you recommend as an alternative? 3. In the above example, \cal is used. 4. Other issues may arise, e.g., getting subscripts and superscripts correct. How might one rewrite the above with Unicode mathematics in mind? Is there a My Way or some other guide to Unicode mathematics in ConTeXt? This writer has never had to think about this matter before so this is all new ground to learn. Thank you in advance for any guidance. Best wishes Idris -- Idris Samawi Hamid, Professor Department of Philosophy Colorado State University Fort Collins, CO 80512 scratch.pdf Description: scratch.pdf scratch.tex Description: scratch.tex ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] \mathematics might be missing \everymathematics
On 2/25/2019 9:47 PM, Henri Menke wrote: Bump i'll catch it (no uploads today) On 19/02/19 10:02 PM, Henri Menke wrote: Dear Hans, In the following example I want to locally set lcgreek=normal but it is not picked up because the attribute is not propagated. When I enter \everymathematics manually it works fine. Is this by design or is this a bug? MWE below. Cheers, Henri --- \starttext The greek letter should be upright here \m[lcgreek=normal]{\varphi} \m[lcgreek=normal]{\the\everymathematics\varphi} \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___ -- - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] \mathematics might be missing \everymathematics
Bump On 19/02/19 10:02 PM, Henri Menke wrote: > Dear Hans, > > In the following example I want to locally set lcgreek=normal but it is > not picked up because the attribute is not propagated. When I enter > \everymathematics manually it works fine. Is this by design or is this > a bug? MWE below. > > Cheers, Henri > > --- > > \starttext > > The greek letter should be upright here > > \m[lcgreek=normal]{\varphi} > > \m[lcgreek=normal]{\the\everymathematics\varphi} > > \stoptext > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] \mathematics might be missing \everymathematics
Dear Hans, In the following example I want to locally set lcgreek=normal but it is not picked up because the attribute is not propagated. When I enter \everymathematics manually it works fine. Is this by design or is this a bug? MWE below. Cheers, Henri --- \starttext The greek letter should be upright here \m[lcgreek=normal]{\varphi} \m[lcgreek=normal]{\the\everymathematics\varphi} \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] two different outputs.
Jeong Dal schrieb am 01.01.19 um 23:28: Dear Wolfgang, Thank you for the solution at the new year’s day. Your sample works very well. It is what I want. I copied it into my file and run it, then I got a strange output. Everything is OK except outer effect text is written twice. I don’t know what makes it write twice. I can’t reproduce the effect with your included example. What I guess is that one of your setuos still contain the line \setuphead[title][textcommand=\TitlePage] and you apply the effect twice because when you take a closer look at the image you can see even the inner effect appears two times. I have two more questions. 1. I’d like to put a title only in a page using the following. How to put a title as center aligned? \setuphead[title][align=middle] % \page[yes] \dontleavehmode\blank[5cm] \title{Why, Math?} \blank[big] \midaligned{\fancy Why do we learn mathematics?} \vfill \midaligned{\tfb Institution} \blank[2cm] \page 2. Is there a way to remove a pagenumber from the title page? \startstandardmakeup[align=middle] \blank[5cm] \title{Why, Math?} \blank {\fancy Why do we learn mathematics?} \vfill {\tfb Institution} \blank[2cm] \stopstandardmakeup Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] two different outputs.
Dear Wolfgang, Thank you for the solution at the new year’s day. Your sample works very well. It is what I want. I copied it into my file and run it, then I got a strange output. Everything is OK except outer effect text is written twice. I don’t know what makes it write twice. I have two more questions. 1. I’d like to put a title only in a page using the following. How to put a title as center aligned? % \page[yes] \dontleavehmode\blank[5cm] \title{Why, Math?} \blank[big] \midaligned{\fancy Why do we learn mathematics?} \vfill \midaligned{\tfb Institution} \blank[2cm] \page 2. Is there a way to remove a pagenumber from the title page? Thank you again. Best regards, Dalyoung Here is the simplified code: %\startMPenvironment %\stopMPenvironment %\environment defCommon %\environment defBook %\usemodule[m-matrix] %\startluacode %mtx = moduledata.matrix %\stopluacode \setuplanguage[kr][patterns=us] \mainlanguage[kr] \setscript[hangul] %\usetypescriptfile[type-hcrlvt] %\usetypescript[HcrFont] % As set in your typescript file %\definefontfamily [Myface] [mm][Neo Euler] \definefont[fancy][Zapfino at 24pt] \definefont[GreekA][MinionPro-MediumIt Regular] \definefontfeature[kr][script=hang,language=kor,mode=node,analyze=yes] %\setupbodyfont[Myface, rm, 11pt] \setupbodyfont[pagella] %\setuppagenumbering[state=stop] \setupexternalfigures[directory={./figures, ./funmath/WhyMath/whyMathSlide,}] \setupindenting[medium, yes] \definefont [BigFontOne] [\classfont{notosanscjkkr}{Bold} sa 4] \definecolor [BigColorOne] [r=.86,g=.850,b=.54] \define[1]\TitlePage {\rlap{\offset[x=2pt,y=2pt]{\color[blue]{\effect[outer]{#1% \effect[inner]{#1}} \setuphead [title] [deeptextcommand=\TitlePage, color=BigColorOne, style=BigFontOne, incrementnumber=list] \startproduct Danggok \definestructureconversionset[frontpart:pagenumber][][romannumerals] \definestructureconversionset[bodypart:pagenumber][][numbers] \definestructureconversionset[backpart:pagenumber][][numbers] \startsectionblockenvironment[frontpart] \setupuserpagenumber[numberconversion=romannumerals] \setuppagenumber[alternative=singlesided,number=] \stopsectionblockenvironment \startsectionblockenvironment[bodypart] \setuppagenumber[number=2] \setuppagenumbering[alternative=singlesided] \stopsectionblockenvironment %\startsectionblockenvironment[backpart] %\setupuserpagenumber[numberconversion=romannumerals] %\setuppagenumbering[alternative=doublesided] %\setuppagenumber[number=1] %\stopsectionblockenvironment \setupcombinedlist[content][list={title,chapter}]%,section,subsection}] \setuplist[chapter, title][width=5mm, style=,textstyle={\ss\bf }]%,after={\blank[preference]}] \setuplist[section][width=10mm, style=,textstyle=\ss,after={\blank[preference]}] \setuplist[subsection][style=,textstyle={\ss}] % \startfrontmatter \title{Contents} \placelist[chapter,title] \stopfrontmatter \startbodymatter \title{First} \page \title{Second} \page % \component ./funmath/whyMath/whyMathH % \component ./Mathematics/TopicsInMath/Crypto/CryptoH % \component ./funmath/algorithm/algorithmH % \component ./funmath/Problems/squareH % \component ./funmath/Tiling/tilingH \stopbodymatter %\startbackmatter %\stopbackmatter \stopproduct > 2019. 1. 2. 오전 5:13, Wolfgang Schuster 작성: > > Jeong Dal schrieb am 01.01.19 um 01:33: >> Dear all, >> First, Happy new year! >> I tried to make a style of title as following. The first code creates the >> title as I wanted, but the second which uses “\title” creates the title >> strange. they are almost same code. >> To include it in the list of contents, I use “\title”. > > \setuphead [title] [incrementnumber=list] > >> Is there a way to make output as the first one and include it in the list of >> contents? > > You have to apply your command to the deeptextcommand key. > > begin example > > % \definefontfamily [mainface] [ss] [Noto Sans CJK KR] > % > % \setupbodyfont [mainface] > % > % \definefont [BigFontOne] [SansBold sa 4] > > \definefontfamily [notosanscjkkr] [ss] [Noto Sans CJK KR] > > %\definefont [BigFontOne] [file:notosanscjkkrbold*default sa 4] > \definefont [BigFontOne] [\classfont{notosanscjkkr}{Bold} sa 4] > > \setupbodyfont [pagella] > > \definecolor [BigColorOne] [r=.86,g=.850,b=.54] > > \define[1]\TitlePage > {\rlap{\offset[x=2pt,y=2pt]{\color[blue]{\effect[outer]{#1% > \effect[inner]{#1}} > > \setuphead > [title] > [deeptextcommand=\TitlePage, > color=BigColorOne, > style=BigFontOne, > incrementnumber=list] > > \starttext > > \title{Contents} > > \placelist[chapter,title] > > \title{Title} > > \title{타이틀} > > \stoptext > > end example > > Wolfgang >
Re: [NTG-context] Framed mathematics
Mathias Schickel schrieb am 07.12.18 um 12:09: Dear list, it seems that \mframed does not align properly. Compare the example fount at https://www.contextgarden.net/Framed#Location_parameter to the compiled example attached. What can I do to get a correctly aligned framed formula? \inmframed{...} Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Framed mathematics
Dear list,it seems that \mframed does not align properly. Compare the example fount at https://www.contextgarden.net/Framed#Location_parameter to the compiled example attached.What can I do to get a correctly aligned framed formula?Many thanks for you help,Mathias mframed.tex Description: TeX document mframed.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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] ConTeXt mathematics macros
The content of all mentioned modules has moved to the core years ago and there is no need to load another code although a few goodies like fancy arrow styles etc. (which use metapost graphics) have to loaded. To get a proper answer to your problems you should provide a example which shows what you try to achieve. Wolfgang Shuxian Wang schrieb am 14.10.18 um 04:16: Hello list, As a new user of ConTeXt, I have some trouble on trying out various mathematics modules. I tried to use the nath module by directly including `\usemodule[nath]` in my source file. It seems that the module is not loaded. I read through the wiki page and found that nath is not included in the TeX Live distribution, but I failed to find a way to install it. Also, when I hunted through the wiki articles, it stated that the newmat module is included by default, but I never find it in my TeX Live 2018. Am I missing something or is the wiki outdated? By the way, I am looking for a "battery included" math module, which provides predefined macros like the absolute value symbol, derivative, and partial derivative. Any recommendation or advice on this? Thanks! Shuxian Wang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] ConTeXt mathematics macros
Hello list, As a new user of ConTeXt, I have some trouble on trying out various mathematics modules. I tried to use the nath module by directly including `\usemodule[nath]` in my source file. It seems that the module is not loaded. I read through the wiki page and found that nath is not included in the TeX Live distribution, but I failed to find a way to install it. Also, when I hunted through the wiki articles, it stated that the newmat module is included by default, but I never find it in my TeX Live 2018. Am I missing something or is the wiki outdated? By the way, I am looking for a "battery included" math module, which provides predefined macros like the absolute value symbol, derivative, and partial derivative. Any recommendation or advice on this? Thanks! Shuxian Wang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] closesymbol on same line as displayed formula
Dear Aditya, Thank you for the reply. >> \startproof >> \startitemize[n] >> \item first line. >> \item second line > > Add: \placeclosesymbol here > >> \stopitemize >> \stopproof >> >> \stoptext > It works in many cases that item content ends with words. But it is not working if the item contents end with \stopformula. If I put \placeclosesymbol before \stopformula, then it is shown just after the last word. Anyway, it works in most cases. Thank you again. Best regards, Dalyoung % \defineenumeration[proof][text=Proof.] \setupenumeration[proof] [number=no, closesymbol=\mathematics{\square}, closecommand=\ifmmode\eqno\else\wordright\fi] \starttext \startproof This is a simple proof. \startformula 1+1=2. \stopformula \placeclosesymbol \stopproof \startproof This is another simple proof that ends with a formula \startformula 1+1=2. \placeclosesymbol \stopformula \stopproof \startproof \startitemize[n] \item first line. \item Here is an example. \startformula \cosh x + \sinh x = e^x,~~\cosh x - \sinh x = e^{-x} \stopformula The next formula is following: \startformula\startalign \NC\sinh (x + y) \NC= \frac{e^{x+y} - e^{-(x+y)}}{2} \NR \NC \NC = \frac{e^x e^y - e^{-x}e^{-y}}{2} \NR%$ \NC \NC = \frac{(\cosh x + \sinh x)(\cosh y + \sinh y) - (\cosh x - \sinh x)(\cosh y - \sinh y)}{2} \NR \NC \NC = \sinh x \cosh y + \cosh x \sinh y \NR \stopalign \stopformula \placeclosesymbol \stopitemize \stopproof \stoptext %%%___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] closesymbol on same line as displayed formula
On Mon, 27 Aug 2018, Jeong Dal wrote: Hi, The same thing happens after the itemization as in the following MWE. \defineenumeration[proof][text=Proof.] \setupenumeration[proof] [number=no, closesymbol=\mathematics{\square}, closecommand=\ifmmode\eqno\else\wordright\fi] \starttext \startproof This is a simple proof. \stopproof \startproof This is another simple proof that ends with a formula \startformula 1+1=2. \stopformula \stopproof \startproof \startitemize[n] \item first line. \item second line Add: \placeclosesymbol here \stopitemize \stopproof \stoptext For display equations, there is not easy solution. (What should happen if there is an equation number; what should happen if the display equation overflows hsize, etc.). The latex package `ntheorem` implements a two pass solution (measures where the equation number box gets placed, and then add the close symbol below it). I am not sure how easy it is to implement such an approach in ConTeXt. Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] closesymbol on same line as displayed formula
Hi, I am sorry to bring up old topic “Re: closesymbol on same line as displayed formula” again. (ntg-context Digest, Vol 153, Issue 40) Is there any progress after that? It seems to me that there is no more discussions about it. The same thing happens after the itemization as in the following MWE. Thank you for reading. Best regards, Dalyoung \defineenumeration[proof][text=Proof.] \setupenumeration[proof] [number=no, closesymbol=\mathematics{\square}, closecommand=\ifmmode\eqno\else\wordright\fi] \starttext \startproof This is a simple proof. \stopproof \startproof This is another simple proof that ends with a formula \startformula 1+1=2. \stopformula \stopproof \startproof \startitemize[n] \item first line. \item second line \stopitemize \stopproof \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] xrightarrow is not straight
Dear Alan, Thanks for the reply! Using \definemathstackers I can set the voffset to adjust the vertical spacing. This is exactly what I needed, thanks! However, I couldn't use the ahlength variable. I tried different values, but it doesn't seem to change anything (and the current arrowhead is tiny). (Using startMPcode and drawarrow gives a big arrowhead.) Also I noticed that the content of \rightarrow{...} was not in mathmode, so I tried using middlecommand=\mathermatics (I found this on the wiki and in the docs). But that doesn't change anything. Is this a bug? Example: \useMPlibrary[mat] \definemathstackers [mp] [alternative=mp, voffset=-.3\mathexheight, middlecommand=\mathematics] \definemathextensible [mp] [rightarrow] ["2192] \startMPinitializations ahlength := EmWidth ; % Does not work? ahangle := 30 ; ahvariant := 1 ; ahdimple := 4/5 ; \stopMPinitializations \setuppapersize[A7] \starttext $A \rightarrow{$\neq f$ and $\neq g$} B$ $A \rightarrow{\neq f \text{ and } \neq g} B$ % Is not typeset in mathmode \stoptext Thanks in advance, Kind regards, Joshua -Original Message- From: Alan Braslau Sent: 07 August 2018 17:01 To: Joshua Moerman Cc: mailing list for ConTeXt users Subject: Re: [NTG-context] xrightarrow is not straight On Tue, 7 Aug 2018 10:42:01 +0200 "Joshua Moerman" wrote: > Hi ConTeXt mailing list, > > I am using the extensible arrows and I am not really satisfied with > the looks of it. > > The most important issue I have is that the vertical spacing is too > much. You can see this in the attached picture: the left arrow is > using \xrightarrow{\neq a} and the right arrow is using \stackrel{\neq > a}{\longrightarrow}. I think the right one (with stackrel) looks more > natural. Is there a way to setup the vertical spacing? > > Another thing I noticed is that the line is not very consistent. This > might be a font issue (I am using Euler). Luckily, the inconsistent > overlap is barely visible when printed. > > Thanks again! > > Groetjes, > Joshua > Hello, You can also use MetaPost to render math stackers, rather than relying on TeX constructs and any particular font. For example: \useMPlibrary[mat] \definemathstackers [mp] [alternative=mp] \definemathextensible [mp] [leftarrow] ["2190] \definemathextensible [mp] [rightarrow] ["2192] \definemathextensible [mp] [leftrightarrow] ["2194] \definemathextensible [mp] [longleftrightarrow] ["27F7] \definemathextensible [mp] [rightoverleftarrow] ["21C4] \definemathextensible [mp] [underbrace] ["FE3DF] \setupbodyfont [dejavu-condensed,12pt] \starttext $\rightarrow{≠a}$ \stoptext Furthermore, the MP arrow can be tuned \startMPinitializations ahlength := .5EmWidth ; ahvariant := 1 ; % dimpled straight \stopMPinitializations as can line widths, etc. Alan ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] general suggestion for ConTeXt documentation
On Wed, 8 Aug 2018 17:54:34 +0200 Hans Hagen wrote: > On 8/8/2018 3:30 PM, Robert Zydenbos wrote: > > > profile = NAME > > empty = yes no > > … > > > > and similar questions arise: “what kind of profile?”, “what is empty or > > not?” etc. > > it's pretty safe to ignore keys like 'profile' (if you grep the > documentation tree it's just an example of a potential optimization > of the rendering which in practice no one will use because in the end it > makes no sense more fun feature i guess) The philosophy has been to use keys that are generally pretty self-explanatory, such as title=, color=, style=, etc. Secondly, the commands try to use existing key names if they are relevant rather than adding new keys, and this sometimes leads to key names that at first sight might seem slightly awkward (where a synonym or close synonym might be slightly better). Also, sometimes the context requires a new key, such as foregroundcolor= and backgroundcolor=, when color= for example would be ambiguous. Thirdly, many keys are inherited and passed-on to an included command. Finally, unknown or unused keys are simply ignored. This has the advantage that often, just trying the obvious simply works. To quote Poincaré: \startquotation Mathematics is the art of giving the same name to different things. It is enough that these things, though differing in matter, should be similar in form, to permit their being, so to speak, cast in the same mould. When the language has been carefully chosen, one is surprised to discover that all proofs developed for a given object, can be immediately applied to many new objects; there is nothing to be changed, not even the words, since all the names have become the same. \stopquotation Alan ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] about the defining itemized columns.
On 7/26/2018 9:06 AM, Jeong Dal wrote: Dear all, In mathematics, there are many occasions to make exercise problems in columns, and I did that using “tabulate” as following.Thanks Hans for this method! %%% \define\iTwo{\starttabulate[||w(.42\makeupwidth)||lw(.42\makeupwidth)|]} \define\iThree{\starttabulate[||lw(.28\makeupwidth)||lw(.28\makeupwidth)||lw(.28\makeupwidth)|]} \define\iFour{\starttabulate[||lw(.21\makeupwidth)||lw(.21\makeupwidth)||lw(.21\makeupwidth)||lw(.21\makeupwidth)|]} \starttext \startitemize[n] \iTwo \NC \itemtag \NC test1 \NC \itemtag \NC test2 \NC\NR \NC \itemtag \NC test3 \NC \itemtag \NC test4 \NC\NR \NC \itemtag \NC test5 \NC \itemtag \NC test6 \NC\NR \stoptabulate \stopitemize \stoptext %%% It works well. Since the numbers in the definitions are calculated by .84/2, .84/3, .84/4, I want to combine those definitions in one form. Is it possible to define a one definition which can be set by argument as following. \define[1]\iCol{\starttabulate[|*{#1}{|lw(.84/#1)\makeupwidth|}]} When I call it \iCol{2}, the first *{#1} is working, but the second #1 is a problem. I tried \ctxlua for division, but it didn’t work either. Is there a nice way to define them in one definition? It may be my greedy hope. \define[1]\iCol {\starttabulate[|*{#1}{|lw(\dimexpr.84\makeupwidth/#1\relax)|}]} - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] about the defining itemized columns.
Dear all, In mathematics, there are many occasions to make exercise problems in columns, and I did that using “tabulate” as following.Thanks Hans for this method! %%% \define\iTwo{\starttabulate[||w(.42\makeupwidth)||lw(.42\makeupwidth)|]} \define\iThree{\starttabulate[||lw(.28\makeupwidth)||lw(.28\makeupwidth)||lw(.28\makeupwidth)|]} \define\iFour{\starttabulate[||lw(.21\makeupwidth)||lw(.21\makeupwidth)||lw(.21\makeupwidth)||lw(.21\makeupwidth)|]} \starttext \startitemize[n] \iTwo \NC \itemtag \NC test1 \NC \itemtag \NC test2 \NC\NR \NC \itemtag \NC test3 \NC \itemtag \NC test4 \NC\NR \NC \itemtag \NC test5 \NC \itemtag \NC test6 \NC\NR \stoptabulate \stopitemize \stoptext %%% It works well. Since the numbers in the definitions are calculated by .84/2, .84/3, .84/4, I want to combine those definitions in one form. Is it possible to define a one definition which can be set by argument as following. \define[1]\iCol{\starttabulate[|*{#1}{|lw(.84/#1)\makeupwidth|}]} When I call it \iCol{2}, the first *{#1} is working, but the second #1 is a problem. I tried \ctxlua for division, but it didn’t work either. Is there a nice way to define them in one definition? It may be my greedy hope. Thanks for reading. Best regards, Dalyoung ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] text in mathematics
> On 9 Jul 2018, at 21:27, Hans Åberg wrote: > >> On 9 Jul 2018, at 17:48, Aditya Mahajan wrote: >> >> On Mon, 9 Jul 2018, Hans Åberg wrote: >> >>> On 8 Jul 2018, at 23:00, Otared Kavian wrote: The advantage being that if the above formula appears in an environment such as a Theorem (where the text is typeset in italic, or slanted) the text in the above \mbox will be also in italic or slanted. >>> >>> Math displayed formula text inheriting the style of the text appears in two >>> books from first published in 1966 and 1980 that I checked. >>> >>> So a math text command should probably support that style. >> >> IIRC, that is also the case for the \text command in amsmath. > > There might be two commands, one that inherits the text environment style, > and one that keeps it in normal. Also math and code (verbatim) might appear nested in Hoare logic and such. ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] text in mathematics
> On 9 Jul 2018, at 17:48, Aditya Mahajan wrote: > > On Mon, 9 Jul 2018, Hans Åberg wrote: > >> On 8 Jul 2018, at 23:00, Otared Kavian wrote: >>> The advantage being that if the above formula appears in an environment >>> such as a Theorem (where the text is typeset in italic, or slanted) the >>> text in the above \mbox will be also in italic or slanted. >> >> Math displayed formula text inheriting the style of the text appears in two >> books from first published in 1966 and 1980 that I checked. >> >> So a math text command should probably support that style. > > IIRC, that is also the case for the \text command in amsmath. There might be two commands, one that inherits the text environment style, and one that keeps it in normal. ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] text in mathematics
On Mon, 9 Jul 2018, Hans Åberg wrote: On 8 Jul 2018, at 23:00, Otared Kavian wrote: The advantage being that if the above formula appears in an environment such as a Theorem (where the text is typeset in italic, or slanted) the text in the above \mbox will be also in italic or slanted. Math displayed formula text inheriting the style of the text appears in two books from first published in 1966 and 1980 that I checked. So a math text command should probably support that style. IIRC, that is also the case for the \text command in amsmath. Aditya___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] text in mathematics
On 7/9/2018 11:39 AM, Wolfgang Schuster wrote: Hi Alan, you should at least limit the scope of the command to math mode \appendtoks \let\t\mathtext \let\w\mathword \to \everymathematics something \ifdefined\t \else \unexpanded\def\t{\mathortext\text\mathtext} \fi \ifdefined\w \else \unexpanded\def\w{\mathortext\word\mathword} \fi \appendtoks \let\t\mathtext \let\w\mathword \to \everymathematics because sometimes a \t or \w is part of an expansion so we need it to be defined then (for instance, Alan loves to put lots of complex math in textext) Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] text in mathematics
> On 8 Jul 2018, at 23:00, Otared Kavian wrote: > > The advantage being that if the above formula appears in an environment such > as a Theorem (where the text is typeset in italic, or slanted) the text in > the above \mbox will be also in italic or slanted. Math displayed formula text inheriting the style of the text appears in two books from first published in 1966 and 1980 that I checked. So a math text command should probably support that style. ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] text in mathematics
Hi Alan, you should at least limit the scope of the command to math mode \appendtoks \let\t\mathtext \let\w\mathword \to \everymathematics Wolfgang Alan Braslau <mailto:braslau.l...@comcast.net> 8. Juli 2018 um 23:11 In many "less-rigorous" uses of equations, there is an abundant need to include words (text) in mathematics, and using \mathtext{} or \mbox{} or whatever is unwieldy. Readable subscripts, self-explanatory variable names, etc. might be text and not symbols. These situations can be very common. This is why I asked (1) what is the right method, and (2) what do others think about the shorthand \t{}, similar to the shorthand \m{}? Alan On Sun, 8 Jul 2018 23:00:00 +0200 ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] text in mathematics
In many "less-rigorous" uses of equations, there is an abundant need to include words (text) in mathematics, and using \mathtext{} or \mbox{} or whatever is unwieldy. Readable subscripts, self-explanatory variable names, etc. might be text and not symbols. These situations can be very common. This is why I asked (1) what is the right method, and (2) what do others think about the shorthand \t{}, similar to the shorthand \m{}? Alan On Sun, 8 Jul 2018 23:00:00 +0200 Otared Kavian wrote: > Hi Alan, Wolfgang and Hans Åberg, > > As far as I am concerned, when I have to add a text to a math formula > I use \mbox, as in the example > > \startformula > A := \left\{f : {\Bbb R}^2 \longrightarrow {\Bbb R} \; ; \; f > \mbox{ is measurable and } \int_{{\Bbb R}^2}|f(x)|dx < \infty > \right\}. \stopformula > > The advantage being that if the above formula appears in an > environment such as a Theorem (where the text is typeset in italic, > or slanted) the text in the above \mbox will be also in italic or > slanted. > > I don't think it would be a good idea to add new commands to treat > text in a math formula: the existing possiblities are more than > satisfactory, and moreover situations where one has to add text to a > formula are not that common. So using a command like \mbox, or \text, > or \mathtext, or whatever, is not that time consuming. > > Best regards: OK > > > > On 8 Jul 2018, at 21:21, Wolfgang Schuster > > wrote: > > > > Hi Alan, > > > > 1. The correct way to use \mathrm is {\mathrm ...} because it is a > > switch like \rm for text mode. > > > > 2. \mathrm is the wrong method to write text in formulas because > > the command changes only the math alphabet. This means no > > ligatures, kerning or other characters like umlauts. > > > > 3. The correct way to write text in math mode is \mathtext (which > > has the synonym \text) or \mathword. To change the style of the > > text you can use \mathtext{\it …} or \mathtextit{…}. > > > > Wolfgang > >> Alan Braslau <mailto:braslau.l...@comcast.net> 7. Juli 2018 um > >> 16:04 Hello ConTeXt users, > >> > >> Does it drive you crazy to see TeX users write $t = time$? > >> (I see this all of the time by LaTeX users in Beamer > >> presentations.) > >> > >> One can do better writing $t = {\rm time}$ (maybe) > >> or in ConTeXt $t = \mathrm{time}$. > >> Sometimes, too, I might write $t = \text{time}$. > >> > >> We also have the commands \mathematics{} that can be used in place > >> of the TeX shorthand $...$, and this also has the shortcut \m{...}. > >> > >> I thought that it might be useful to have an equivalent escape, to > >> be used as $t = \t{time}$. What do other users think? > >> > >> OK, \m{t = \t{time}} might be a bit funky... > >> > >> > >> Alan > >> > >> > >> P.S. I proposed doing this via > >> \let\t\mathrm > >> but Hans tells me that this is not good, as \mathrm{} does not give > >> proper font processing, so implementation of \t{} would be > >> something different... > >> ___ > >> 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> / > >> http://www.ntg.nl/mailman/listinfo/ntg-context > >> <http://www.ntg.nl/mailman/listinfo/ntg-context> webpage : > >> http://www.pragma-ade.nl <http://www.pragma-ade.nl/> / > >> http://context.aanhet.net <http://context.aanhet.net/> archive : > >> https://bitbucket.org/phg/context-mirror/commits/ > >> <https://bitbucket.org/phg/context-mirror/commits/> wiki : > >> http://contextgarden.net <http://contextgarden.net/> > >> ___ > >> > > > > ___ > > If your question is of interest to others as well, please add an > > entry to the Wiki! > > > > maillist : ntg-context@ntg.nl / > > http://www.ntg.nl/mailman/listinfo/ntg-context webpage : > > http://www.pragma-ade.nl / http://context.aanhet.net archive : > > https://bitbucket.org/phg/context-mirror/commits/ wiki : > > http://contextgarden.net > > ___ > > > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] text in mathematics
Hi Alan, Wolfgang and Hans Åberg, As far as I am concerned, when I have to add a text to a math formula I use \mbox, as in the example \startformula A := \left\{f : {\Bbb R}^2 \longrightarrow {\Bbb R} \; ; \; f \mbox{ is measurable and } \int_{{\Bbb R}^2}|f(x)|dx < \infty \right\}. \stopformula The advantage being that if the above formula appears in an environment such as a Theorem (where the text is typeset in italic, or slanted) the text in the above \mbox will be also in italic or slanted. I don't think it would be a good idea to add new commands to treat text in a math formula: the existing possiblities are more than satisfactory, and moreover situations where one has to add text to a formula are not that common. So using a command like \mbox, or \text, or \mathtext, or whatever, is not that time consuming. Best regards: OK > On 8 Jul 2018, at 21:21, Wolfgang Schuster > wrote: > > Hi Alan, > > 1. The correct way to use \mathrm is {\mathrm ...} because it is a switch > like \rm for text mode. > > 2. \mathrm is the wrong method to write text in formulas because the command > changes only the math alphabet. This means no ligatures, kerning or other > characters like umlauts. > > 3. The correct way to write text in math mode is \mathtext (which has the > synonym \text) or \mathword. To change the style of the text you can use > \mathtext{\it …} or \mathtextit{…}. > > Wolfgang >> Alan Braslau <mailto:braslau.l...@comcast.net> 7. Juli 2018 um 16:04 >> Hello ConTeXt users, >> >> Does it drive you crazy to see TeX users write $t = time$? >> (I see this all of the time by LaTeX users in Beamer presentations.) >> >> One can do better writing $t = {\rm time}$ (maybe) >> or in ConTeXt $t = \mathrm{time}$. >> Sometimes, too, I might write $t = \text{time}$. >> >> We also have the commands \mathematics{} that can be used in place of >> the TeX shorthand $...$, and this also has the shortcut \m{...}. >> >> I thought that it might be useful to have an equivalent escape, to be >> used as $t = \t{time}$. What do other users think? >> >> OK, \m{t = \t{time}} might be a bit funky... >> >> >> Alan >> >> >> P.S. I proposed doing this via >> \let\t\mathrm >> but Hans tells me that this is not good, as \mathrm{} does not give >> proper font processing, so implementation of \t{} would be something >> different... >> ___ >> 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> / >> http://www.ntg.nl/mailman/listinfo/ntg-context >> <http://www.ntg.nl/mailman/listinfo/ntg-context> >> webpage : http://www.pragma-ade.nl <http://www.pragma-ade.nl/> / >> http://context.aanhet.net <http://context.aanhet.net/> >> archive : https://bitbucket.org/phg/context-mirror/commits/ >> <https://bitbucket.org/phg/context-mirror/commits/> >> wiki : http://contextgarden.net <http://contextgarden.net/> >> ___ > > ___ > If your question is of interest to others as well, please add an entry to the > Wiki! > > maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : http://contextgarden.net > ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] text in mathematics
Hi Alan, 1. The correct way to use \mathrm is {\mathrm ...} because it is a switch like \rm for text mode. 2. \mathrm is the wrong method to write text in formulas because the command changes only the math alphabet. This means no ligatures, kerning or other characters like umlauts. 3. The correct way to write text in math mode is \mathtext (which has the synonym \text) or \mathword. To change the style of the text you can use \mathtext{\it …} or \mathtextit{…}. Wolfgang Alan Braslau <mailto:braslau.l...@comcast.net> 7. Juli 2018 um 16:04 Hello ConTeXt users, Does it drive you crazy to see TeX users write $t = time$? (I see this all of the time by LaTeX users in Beamer presentations.) One can do better writing $t = {\rm time}$ (maybe) or in ConTeXt $t = \mathrm{time}$. Sometimes, too, I might write $t = \text{time}$. We also have the commands \mathematics{} that can be used in place of the TeX shorthand $...$, and this also has the shortcut \m{...}. I thought that it might be useful to have an equivalent escape, to be used as $t = \t{time}$. What do other users think? OK, \m{t = \t{time}} might be a bit funky... Alan P.S. I proposed doing this via \let\t\mathrm but Hans tells me that this is not good, as \mathrm{} does not give proper font processing, so implementation of \t{} would be something different... ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] text in mathematics
> On 7 Jul 2018, at 16:04, Alan Braslau wrote: > Does it drive you crazy to see TeX users write $t = time$? > (I see this all of the time by LaTeX users in Beamer presentations.) > > One can do better writing $t = {\rm time}$ (maybe) > or in ConTeXt $t = \mathrm{time}$. > Sometimes, too, I might write $t = \text{time}$. The last would be easiest to remember when using it less often. Strictly, it is different, because it could mean italics, as may be used in formulas. The upright letters are called normal here: https://en.wikipedia.org/wiki/Mathematical_Alphanumeric_Symbols > We also have the commands \mathematics{} that can be used in place of > the TeX shorthand $...$, and this also has the shortcut \m{...}. > > I thought that it might be useful to have an equivalent escape, to be > used as $t = \t{time}$. What do other users think? > > OK, \m{t = \t{time}} might be a bit funky... If one is using italics for text in math formulas, that would be logical. ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] text in mathematics
Hello ConTeXt users, Does it drive you crazy to see TeX users write $t = time$? (I see this all of the time by LaTeX users in Beamer presentations.) One can do better writing $t = {\rm time}$ (maybe) or in ConTeXt $t = \mathrm{time}$. Sometimes, too, I might write $t = \text{time}$. We also have the commands \mathematics{} that can be used in place of the TeX shorthand $...$, and this also has the shortcut \m{...}. I thought that it might be useful to have an equivalent escape, to be used as $t = \t{time}$. What do other users think? OK, \m{t = \t{time}} might be a bit funky... Alan P.S. I proposed doing this via \let\t\mathrm but Hans tells me that this is not good, as \mathrm{} does not give proper font processing, so implementation of \t{} would be something different... ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] latest beta and \seeindex
"Mathematics is the art of giving the same name to different things. It is enough that these things, though differing in matter, should be similar in form, to permit their being, so to speak, cast in the same mold. When the language has been carefully chosen, one is surprised to discover that all proofs developed for a given object, can be immediately applied to many new objects; there is nothing to be changed, not even the words, since all the names have become the same." (my translation) ;-) On Mon, 25 Jun 2018 07:21:43 -0400 Alan Bowen wrote: > I should add too that in this particular volume our contributors > sometimes mention different terms for the same thing as in “This is > called p or q”. Indexing both terms (p and q) separately and the > adding x-ref is one way to go but indexing the more commonly used > term and adding a mere x-ref for the other is more efficient. > > Alan > > On Sun, Jun 24, 2018 at 4:08 PM Henning Hraban Ramm > wrote: > > > Am 2018-06-24 um 21:57 schrieb Hans Hagen : > > > > > On 6/23/2018 5:10 PM, Alan Bowen wrote: > > >> The latest beta (ConTeXtver: 2018.06.23 12:12 MKIV betafmt: > > >> 2018.6.23) > > processes without a hitch but \seeindex is still not working as > > expected. > > >> In > > >> \starttext > > >> \index{sample} > > >> \index{fun+games}\index{fun+stuff} > > >> %\index{fun} > > >> \seeindex{fun}{sample}% now with heading (as it should be) > > >> \seeindex{fun}{blah}% not shown > > >> \seeindex{fun}{humbug}% not shown > > >> \seeindex{fun}{bug}% not shown > > >> \seeindex{fun+games}{entertainment}% not shown > > >> \placeindex[n=1] > > >> \stoptext > > >> When I generate the indices for my book, \seeindex{A}{B} works > > >> only if > > it is a unique x-ref and A is a heading. Multiple x-refs to the same > > heading fail as do x-refs to subheadings. > > > sure, > > > > > > \seeindex{fun}{blah}% not shown > > > \seeindex{fun}{humbug} % not shown > > > \seeindex{fun}{bug} % not shown > > > > > > as there is no index entry blah, humbug or bug ... so you would > > > be > > fooling your reader > > > > I understand the rationale, and it could be a nice feature, but we > > need to refer to entries in a different register, e.g. from an > > index of topics to an index of persons, e.g. > > \seeindex{Pragma}{Hagen, Hans} or to subentries like > > \seeindex{fun+games}{bah+humbug}. Since the latter doesn’t work (or > > does it now?), we use \seeindex{fun+games}{bah/humbug}. > > > > > > Greetlings, Hraban > > --- > > https://www.fiee.net > > http://wiki.contextgarden.net > > https://www.dreiviertelhaus.de > > GPG Key ID 1C9B22FD > > > > > > ___ > > If your question is of interest to others as well, please add an > > entry to the Wiki! > > > > maillist : ntg-context@ntg.nl / > > http://www.ntg.nl/mailman/listinfo/ntg-context > > webpage : http://www.pragma-ade.nl / http://context.aanhet.net > > archive : https://bitbucket.org/phg/context-mirror/commits/ > > wiki : http://contextgarden.net > > > > ___ > > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Fonts and equations
Henri, Thanks for the suggestion. I tried to add the additional fonts, but this did not seem to make a difference. The math equations render fine, but a search performed for terms in an equation still does not work when I specify the font. When I remove the font specification, it works fine. There must be some difference in the font that is used even if I don't specify a math font. Any other thoughts about why the math font changes or how to get a math font that is searchable, or get back to the default math font? -Lance -- > > Message: 4 > Date: Fri, 18 May 2018 18:55:14 +1200 > From: Henri Menke > To: ntg-context@ntg.nl > Subject: Re: [NTG-context] Fonts and equations > Message-ID: <12743277-ebd0-67c7-2393-fe33e97bf...@gmail.com> > Content-Type: text/plain; charset=utf-8; format=flowed > > > > On 17/05/18 23:19, Lance Larsen wrote: > > I have a context document with several equations. One really nice > > feature with equations is that by default you can search for variable > > names in equation in a PDF reader like acrobat. However, I needed to > > configure the document to use arial for the text. Once I do this, the > > equations are no longer searchable. I assume something happened to the > > mathematics font. How to I change the font for the document text, but > > keep the math equations searchable? Is there a way to change the > > document font, but not affect the math font? Here is a sample of how I > > configured the font. The equations are no longer searchable. > > > > % Load the Arial font values for regular, italics, bold, etc. > > \starttypescript [serif] [arial] > >\definefontsynonym [Serif] [name:arial] > >\definefontsynonym [SerifBold] [name:arialbold] > >\definefontsynonym [SerifItalic] [name:arialitalic] > >\definefontsynonym [SerifSlanted][name:arialitalic] > >\definefontsynonym [SerifBoldItalic] [name:arialbolditalic] > >\definefontsynonym [SerifBoldSlanted][name:arialbolditalic] > >\definefontsynonym [SerifCaps] [name:arial] > > \stoptypescript > > > > % Now we define the 'arial' font as an available option > > \definetypeface [arial][rm] [serif] [arial] > > The typeface "arial" you defined has no math font (and no sans and no > mono font). Add those and you should be fine: > > \definetypeface [arial] [rm] [serif] [arial] > \definetypeface [arial] [ss] [sans] [modern] > \definetypeface [arial] [tt] [mono] [modern] > \definetypeface [arial] [mm] [math] [modern] > > > > > % Set 'arial' 10pt as the default font for the document > > \setupbodyfont [arial,rm,10pt] > > > > \starttext > > > > $z_1 = x_1 + y_1$ > > > > $a = b + c$ > > > > \stoptext > > > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Fonts and equations
On 17/05/18 23:19, Lance Larsen wrote: I have a context document with several equations. One really nice feature with equations is that by default you can search for variable names in equation in a PDF reader like acrobat. However, I needed to configure the document to use arial for the text. Once I do this, the equations are no longer searchable. I assume something happened to the mathematics font. How to I change the font for the document text, but keep the math equations searchable? Is there a way to change the document font, but not affect the math font? Here is a sample of how I configured the font. The equations are no longer searchable. % Load the Arial font values for regular, italics, bold, etc. \starttypescript [serif] [arial] \definefontsynonym [Serif] [name:arial] \definefontsynonym [SerifBold] [name:arialbold] \definefontsynonym [SerifItalic] [name:arialitalic] \definefontsynonym [SerifSlanted] [name:arialitalic] \definefontsynonym [SerifBoldItalic] [name:arialbolditalic] \definefontsynonym [SerifBoldSlanted] [name:arialbolditalic] \definefontsynonym [SerifCaps] [name:arial] \stoptypescript % Now we define the 'arial' font as an available option \definetypeface [arial] [rm] [serif] [arial] The typeface "arial" you defined has no math font (and no sans and no mono font). Add those and you should be fine: \definetypeface [arial] [rm] [serif] [arial] \definetypeface [arial] [ss] [sans] [modern] \definetypeface [arial] [tt] [mono] [modern] \definetypeface [arial] [mm] [math] [modern] % Set 'arial' 10pt as the default font for the document \setupbodyfont [arial,rm,10pt] \starttext $z_1 = x_1 + y_1$ $a = b + c$ \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Fonts and equations
I have a context document with several equations. One really nice feature with equations is that by default you can search for variable names in equation in a PDF reader like acrobat. However, I needed to configure the document to use arial for the text. Once I do this, the equations are no longer searchable. I assume something happened to the mathematics font. How to I change the font for the document text, but keep the math equations searchable? Is there a way to change the document font, but not affect the math font? Here is a sample of how I configured the font. The equations are no longer searchable. % Load the Arial font values for regular, italics, bold, etc. \starttypescript [serif] [arial] \definefontsynonym [Serif] [name:arial] \definefontsynonym [SerifBold] [name:arialbold] \definefontsynonym [SerifItalic] [name:arialitalic] \definefontsynonym [SerifSlanted][name:arialitalic] \definefontsynonym [SerifBoldItalic] [name:arialbolditalic] \definefontsynonym [SerifBoldSlanted][name:arialbolditalic] \definefontsynonym [SerifCaps] [name:arial] \stoptypescript % Now we define the 'arial' font as an available option \definetypeface [arial][rm] [serif] [arial] % Set 'arial' 10pt as the default font for the document \setupbodyfont [arial,rm,10pt] \starttext $z_1 = x_1 + y_1$ $a = b + c$ \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] blank line at the beginning of the theorem or proof
Dear all, placing a figure at the right or left of the text using \placefigure[right][]{}{} insert at the begining of the paragraph under the enumerations while there is no blank line if we comment out \placefigure. See the below sample. Is there a way to make text begin from the same line of “Theorem 1” with the figure at the right? Thank you. Best regards, Dalyoung \defineenumeration[Theorem] [text={\translate[en=Theorem, kr=정리]}, style=, title=yes, prefix=yes, prefixsegments=chapter, way=bychapter, number=yes, before={\blank[big]}, after=\blank] \defineenumeration[Proof] [text={\translate[en=Proof, kr=증명]}, % headstyle=bold, alternative=hanging, titlestyle=, style=normal, number=no, closesymbol=\mathematics{\blacksquare},] \startbuffer[circleA] draw fullcircle scaled 2cm; \stopbuffer \starttext \startTheorem %\placefigure[right][]{}{\processMPbuffer[circleA]} This is a test for placing a figure in the theorem or in the proof. \tex{placefigure[right][]{}{\processMPbuffer[circleA]}} insert a blank line at the beginning of the paragraph while there is no blank line without a figure. %\placefigure[right][]{}{\processMPbuffer[circleA]} \stopTheorem \startProof %\placefigure[right][]{}{\processMPbuffer[circleA]} \input knuth \stopProof \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Space between lines with mathematical writings
Hello, When I write text with mathematics, I find that the space between two lines is not enough because the formulas overflow one over the other. How to correct this ? Thank you Fabrice \switchtobodyfont[asana,12pt] \definemixedcolumns [Mycolumns] [ n=2, separator=rule, rulecolor=, balance=, grid=strut, ] \setupalign[verytolerant,stretch,hanging] \starttext \startMycolumns \startitemize[n] \item Le taux d'évolution du prix du menu entre l'été 2012 et l'été 2015 est égal à \math{t_g=\frac{13,80-9,80}{9,80}\approx 0,4082}. On a alors \math{(1+t_m)^3=(1+t_g)}, soit \math{(1+t_m)^3 \approx 1,4082}. On en déduit que \math{1+t_m \approx 1,4082^{\frac{1}{3}}}. Finalement, \math{t_m\approx 1,4082^{\frac{1}{3}}-1\approx 0,1209}. Le taux d'évolution annuel moyen, arrondi à 0,01\,\%, du prix du menu entre l'été 2012 et l'été 2015 est 12,09\,\%. \item \math{13,80 \times 1,1209^2\approx 17,34}. Le prix en 2017 sera approximativement de 17,34 euros. \stopitemize \column \input knuth \stopMycolumns \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Fourier and utopia
On Sat, Mar 3, 2018 at 7:17 PM, Mikael P. Sundqvist wrote: > On Sat, Mar 3, 2018 at 3:46 PM, Mikael P. Sundqvist > wrote: > >> Dear Hans and dear list, >> >> I try to use the fourier/utopia combination in mkiv (I used that >> combination for my PhD thesis in mkii 10 years ago). >> >> First of all, I have downloaded the fourier fonts from ctan at >> https://ctan.org/tex-archive/fonts/fourier-GUT . The fonts are found by >> mtxrun. >> >> I have one folder containing type-fourier.mkiv, fourier-math.lfg and >> testfile.tex. Everything seems to be found by the system, so the problem is >> probably in my files somewhere. The resulting pdf after compiling >> testfile.text is attached. >> >> Any ideas of what I am missing? >> >> Additionally, the fourier fonts come with fourier-bb.tfm (probably with >> blackboard bold), fourier-mcl (probably so that one can use mathcal). Any >> ideas on how to use them in the fourier-math.lfg file? >> >> If more information is needed, then please tell me. >> >> /Mikael >> >> %%% >> type-fourier.mkiv: >> %%% >> \starttypescriptcollection[fourier] >> \starttypescript [serif] [fourier] >> \definefontsynonym [Utopia-Regular] [file:putr8a.afm] >> \definefontsynonym [Utopia-Italic] [file:putri8a.afm] >> \definefontsynonym [Utopia-Bold][file:putb8a.afm] >> \definefontsynonym [Utopia-BoldItalic] [file:putbi8a.afm] >> \stoptypescript >> >> \starttypescript [serif] [fourier] [name] >> \setups[font:fallback:serif] >> \definefontsynonym [Serif][Utopia-Regular] >> \definefontsynonym [SerifItalic] [Utopia-Italic] >> \definefontsynonym [SerifBold][Utopia-Bold] >> \definefontsynonym [SerifBoldItalic] [Utopia-BoldItalic] >> \stoptypescript >> >> \starttypescript [math] [fourier] [all] >> \loadfontgoodies[fourier-math] >> \definefontsynonym [MathRoman] [fourierrm@fourier-rm] >> \stoptypescript >> >> \starttypescript [fourier] >> \definetypeface [\typescriptone] [rm] [serif] [fourier] [default] >> \definetypeface [\typescriptone] [ss] [sans] [modern] [default] >> \definetypeface [\typescriptone] [tt] [mono] [modern] [default] >> \definetypeface [\typescriptone] [mm] [math] [fourier] [default] >> \quittypescriptscanning >> \stoptypescript >> \stoptypescriptcollection >> >> >> %%% >> fourier-math.lfg: >> %%% >> return { >> name = "fourier-math", >> version = "1.00", >> comment = "Math font Fourier for Utopia.", >> mathematics = { >> mapfiles = { >> "fourier.map", >> "mkiv-base.map", >> }, >> virtuals = { >> ["fourier-rm"] = { >> { name = "putr8a", features = "virtualmath", main = true >> }, >> { name = "fourier-ml.tfm", vector = "tex-mr", >> skewchar=0x7F }, >> { name = "fourier-mlit.tfm", vector = "tex-mi", >> skewchar=0x7F }, >> { name = "fourier-mlit.tfm", vector = "tex-it", >> skewchar=0x7F }, >> { name = "fourier-mlb.tfm", vector = "tex-bf", >> skewchar=0x7F }, >> { name = "fourier-mlitb.tfm", vector = "tex-bi", >> skewchar=0x7F }, >> { name = "fourier-ms.tfm", vector = "tex-sy", >> skewchar=0x30, parameters = true }, >> { name = "fourier-mex.tfm", vector = "tex-ex", extension >> = true }, >> msam, >> msbm, >> }, >> } >> } >> } >> >> %%% >> testfile.tex: >> %%% >> \loadtypescriptfile[type-fourier] >> \setupbodyfont[fourier,12pt] >> >> \starttext >> \startTEXpage[offset=3bp] >> Some math: $y''=(y')'$. >> A displayed formula: >> \startformula >> f(x) = f(0)+\int_0^x \bigl(f'(t)\bigr)\,dt. >> \stopformula >> \stopTEXpage >> \stoptext >> >> > A small step in the right direction: Blackboard letters and calligraphic > (script) letters seem to work when I add > > { name = "fourier-
Re: [NTG-context] Fourier and utopia
On Sat, Mar 3, 2018 at 3:46 PM, Mikael P. Sundqvist wrote: > Dear Hans and dear list, > > I try to use the fourier/utopia combination in mkiv (I used that > combination for my PhD thesis in mkii 10 years ago). > > First of all, I have downloaded the fourier fonts from ctan at > https://ctan.org/tex-archive/fonts/fourier-GUT . The fonts are found by > mtxrun. > > I have one folder containing type-fourier.mkiv, fourier-math.lfg and > testfile.tex. Everything seems to be found by the system, so the problem is > probably in my files somewhere. The resulting pdf after compiling > testfile.text is attached. > > Any ideas of what I am missing? > > Additionally, the fourier fonts come with fourier-bb.tfm (probably with > blackboard bold), fourier-mcl (probably so that one can use mathcal). Any > ideas on how to use them in the fourier-math.lfg file? > > If more information is needed, then please tell me. > > /Mikael > > %%% > type-fourier.mkiv: > %%% > \starttypescriptcollection[fourier] > \starttypescript [serif] [fourier] > \definefontsynonym [Utopia-Regular] [file:putr8a.afm] > \definefontsynonym [Utopia-Italic] [file:putri8a.afm] > \definefontsynonym [Utopia-Bold][file:putb8a.afm] > \definefontsynonym [Utopia-BoldItalic] [file:putbi8a.afm] > \stoptypescript > > \starttypescript [serif] [fourier] [name] > \setups[font:fallback:serif] > \definefontsynonym [Serif][Utopia-Regular] > \definefontsynonym [SerifItalic] [Utopia-Italic] > \definefontsynonym [SerifBold][Utopia-Bold] > \definefontsynonym [SerifBoldItalic] [Utopia-BoldItalic] > \stoptypescript > > \starttypescript [math] [fourier] [all] > \loadfontgoodies[fourier-math] > \definefontsynonym [MathRoman] [fourierrm@fourier-rm] > \stoptypescript > > \starttypescript [fourier] > \definetypeface [\typescriptone] [rm] [serif] [fourier] [default] > \definetypeface [\typescriptone] [ss] [sans] [modern] [default] > \definetypeface [\typescriptone] [tt] [mono] [modern] [default] > \definetypeface [\typescriptone] [mm] [math] [fourier] [default] > \quittypescriptscanning > \stoptypescript > \stoptypescriptcollection > > > %%% > fourier-math.lfg: > %%% > return { > name = "fourier-math", > version = "1.00", > comment = "Math font Fourier for Utopia.", > mathematics = { > mapfiles = { > "fourier.map", > "mkiv-base.map", > }, > virtuals = { > ["fourier-rm"] = { > { name = "putr8a", features = "virtualmath", main = true }, > { name = "fourier-ml.tfm", vector = "tex-mr", > skewchar=0x7F }, > { name = "fourier-mlit.tfm", vector = "tex-mi", > skewchar=0x7F }, > { name = "fourier-mlit.tfm", vector = "tex-it", > skewchar=0x7F }, > { name = "fourier-mlb.tfm", vector = "tex-bf", > skewchar=0x7F }, > { name = "fourier-mlitb.tfm", vector = "tex-bi", > skewchar=0x7F }, > { name = "fourier-ms.tfm", vector = "tex-sy", > skewchar=0x30, parameters = true }, > { name = "fourier-mex.tfm", vector = "tex-ex", extension > = true }, > msam, > msbm, > }, > } > } > } > > %%% > testfile.tex: > %%% > \loadtypescriptfile[type-fourier] > \setupbodyfont[fourier,12pt] > > \starttext > \startTEXpage[offset=3bp] > Some math: $y''=(y')'$. > A displayed formula: > \startformula > f(x) = f(0)+\int_0^x \bigl(f'(t)\bigr)\,dt. > \stopformula > \stopTEXpage > \stoptext > > A small step in the right direction: Blackboard letters and calligraphic (script) letters seem to work when I add { name = "fourier-bb.tfm", vector = "tex-mb", skewchar=0x7F }, { name = "fourier-mcl.tfm", vector = "tex-sy", skewchar=0x7F }, to fourier-math.lfg. /Mikael ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Fourier and utopia
Dear Hans and dear list, I try to use the fourier/utopia combination in mkiv (I used that combination for my PhD thesis in mkii 10 years ago). First of all, I have downloaded the fourier fonts from ctan at https://ctan.org/tex-archive/fonts/fourier-GUT . The fonts are found by mtxrun. I have one folder containing type-fourier.mkiv, fourier-math.lfg and testfile.tex. Everything seems to be found by the system, so the problem is probably in my files somewhere. The resulting pdf after compiling testfile.text is attached. Any ideas of what I am missing? Additionally, the fourier fonts come with fourier-bb.tfm (probably with blackboard bold), fourier-mcl (probably so that one can use mathcal). Any ideas on how to use them in the fourier-math.lfg file? If more information is needed, then please tell me. /Mikael %%% type-fourier.mkiv: %%% \starttypescriptcollection[fourier] \starttypescript [serif] [fourier] \definefontsynonym [Utopia-Regular] [file:putr8a.afm] \definefontsynonym [Utopia-Italic] [file:putri8a.afm] \definefontsynonym [Utopia-Bold][file:putb8a.afm] \definefontsynonym [Utopia-BoldItalic] [file:putbi8a.afm] \stoptypescript \starttypescript [serif] [fourier] [name] \setups[font:fallback:serif] \definefontsynonym [Serif][Utopia-Regular] \definefontsynonym [SerifItalic] [Utopia-Italic] \definefontsynonym [SerifBold][Utopia-Bold] \definefontsynonym [SerifBoldItalic] [Utopia-BoldItalic] \stoptypescript \starttypescript [math] [fourier] [all] \loadfontgoodies[fourier-math] \definefontsynonym [MathRoman] [fourierrm@fourier-rm] \stoptypescript \starttypescript [fourier] \definetypeface [\typescriptone] [rm] [serif] [fourier] [default] \definetypeface [\typescriptone] [ss] [sans] [modern] [default] \definetypeface [\typescriptone] [tt] [mono] [modern] [default] \definetypeface [\typescriptone] [mm] [math] [fourier] [default] \quittypescriptscanning \stoptypescript \stoptypescriptcollection %%% fourier-math.lfg: %%% return { name = "fourier-math", version = "1.00", comment = "Math font Fourier for Utopia.", mathematics = { mapfiles = { "fourier.map", "mkiv-base.map", }, virtuals = { ["fourier-rm"] = { { name = "putr8a", features = "virtualmath", main = true }, { name = "fourier-ml.tfm", vector = "tex-mr", skewchar=0x7F }, { name = "fourier-mlit.tfm", vector = "tex-mi", skewchar=0x7F }, { name = "fourier-mlit.tfm", vector = "tex-it", skewchar=0x7F }, { name = "fourier-mlb.tfm", vector = "tex-bf", skewchar=0x7F }, { name = "fourier-mlitb.tfm", vector = "tex-bi", skewchar=0x7F }, { name = "fourier-ms.tfm", vector = "tex-sy", skewchar=0x30, parameters = true }, { name = "fourier-mex.tfm", vector = "tex-ex", extension = true }, msam, msbm, }, } } } %%% testfile.tex: %%% \loadtypescriptfile[type-fourier] \setupbodyfont[fourier,12pt] \starttext \startTEXpage[offset=3bp] Some math: $y''=(y')'$. A displayed formula: \startformula f(x) = f(0)+\int_0^x \bigl(f'(t)\bigr)\,dt. \stopformula \stopTEXpage \stoptext testfile.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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Learning how to use \setupbtxrendering
Hi Alan, and all the Gurus on the list, Many thanks for your help and comments. I am sending again this message which, by mistake, was sent only to Alan, in order to get some help. The manual mkiv-publications.pdf contains indeed many explanations, but probably the informations there are too vast for the elementary use I am going to need. So many thanks to Alan and Hans for this extensive manual! Now, this being said, I am neither able, nor do I need, to use the full blown power of this environment. In particular I am not familiar with the style apa (or aps, which seems to exist too…) or other official specifications. That is why I would like to learn by examples, beginning with the one included on page 4 of the above mentioned manual and then modify things to see what can be done… However, when I use the modifications which Alan suggested (for the style apa, but I dropped the apa: prefix…) I do not get what is desired (please see below the code and the attached test.bib file). And if I give explicitely the specification apa, then many other things are not satisfactory for my needs… For now, what I get without changing many things in the first example given in the manual, is quite close to what I would like to obtain, except that the title of articles is in roman and the name of the journal is in italic, and the title of books are in italic (and the modifications suggest by Alan do not change this, at least when I am not using apa). So my first question is: how can one define one's own « specification », when modifying built-in specifications is not satisfactory for one's needs, or does not give the expected result? The second question is: how can one write a file containing only the references which are used in a document, so that that file can be in some way included into the main document (this is somewhat analogous to the .bbl file created by BibTeX, which allows to include a series of \bibitem into an article written with LaTeX: this is necessary to do when one submits a paper to a mathematical journal). Thanks again for your help: OK %% begin test-bibliography.tex \setupinteraction[state=start] \usebtxdataset[test.bib] %% these four setupbtx suggested by Alan have no effects \setupbtx[list:volume][style={bold}] \setupbtx[list:title] [style={\it}] %(the default for apa) \setupbtx [list:title:book] [style={\ss\it}] \setupbtx[list:volume][,style=bold] %(apa default is italic) %% this has the correct effect... \setupbtx[ interaction=start, specification=default, left={[}, right={]}, ] \starttext \startbodymatter See the book by K. Yosida \cite[YosidaK] and the article by I. Ekeland \cite{EkelandILemme}. \stopbodymatter \startbackmatter \startchapter[title=Bibliography] \placelistofpublications [method=dataset, sorttype=authoryear, numbering=yes, ] \stopchapter \stopbackmatter \stoptext %% end test-bibliography.tex %% begin content of the file text.bib @article{FabesEBStrook, Author = {E.B. Fabes and D.W. Strook}, Journal = {Archives for Rational Mechanics and Analysis}, Pages = {327--338}, Title = {A new proof of Moser's parabolic Harnack inequality via the old ideas of Nash}, Volume = {96}, Year = {1986} } @book{EvansLC, Address = {Providence, RI}, Author = {Lawrence C. Evans}, Publisher = {American Mathematical Society}, Series = {Conference Board of the Mathematical Sciences Regional Conference Series in Mathematics}, Title = {Weak convergence methods for nonlinear partial differential equations}, Volume = {74}, Year = {1990} } @book{EkelandITemam, Address = {Paris}, Author = {Ivar Ekeland and Roger Temam}, Publisher = {Dunod-Gauthiers-Villars}, Title = {Analyse Convexe et Problèmes Variationnels}, Year = {1974} } @article{EkelandILemme, Author = {Ivar Ekeland}, Journal = {Journal of Mathematical Analysis and Applications}, Pages = {324--353}, Title = {On the variational principle}, Volume = {47}, Year = {1974} } @book{DieudonneJ, Address = {Paris}, Author = {Jean Dieudonné}, Publisher = {Gauthiers-Villars}, Title = {Éléments d'Analyse}, Volume = {1}, Year = {1969} } @book{YosidaK, Address = {New York}, Author = {Kôsaku Yosida}, Publisher = {Springer-Verlag}, Series = {Die Grundlehren der Mathematischen Wissenschaften}, Title = {Functional Analysis}, Volume = {123}, Year = {1974} } %% end content of the file test.bib test.bib Description: Binary data > On 17 Feb 2018, at 20:29, Alan Braslau wrote: > > HANS: there is one specific comment for you, below. > > On Sat, 17 Feb 2018 15:27:03 +0100 >
Re: [NTG-context] Learning how to use \setupbtxrendering
On Sun, 18 Feb 2018 19:23:25 +0100 Hans Hagen wrote: > On 2/18/2018 7:07 PM, Rik Kabel wrote: > > On 2018-02-18 12:23, Thomas A. Schmitz wrote: > >> On 02/18/2018 06:07 PM, Alan Braslau wrote: > >>> title={The Cambridge Companion to {\em Ulysses}}, > >> > >> Alan, I think this was Rik Kabel's point: for some scenarios, you > >> cannot avoid to have some sort of context commands in your bibtex > >> file. For a while, I also used biblatex from time to time, so I > >> tried to have a bibtex file that would be as clean as possible and > >> work with both systems, but your example shows that this is not > >> always possible. Well, nothing that some well-written perl > >> couldn't get rid of... > >> > >> All best > >> > >> Thomas > > > > Indeed, that was my point. Even without the mathematics components > > that were cited, I cannot imagine how markup could be excluded from > > the BibTeX file, and for that matter, from any other > > bibliographical database I have seen, if we have to comply with > > arbitrary formatting standards. The statement that one should not > > put any such formatting into the file is perhaps aspirational, but > > not really useful. > If you code clean it's no problem as we can map commands > (\btxcommand) but most (large) bibtex databases we've seen so far are > quite inconsistent (not only in usage of commands, also in author > names). > > (And of course Thomas meant Lua and not Perl.) The message was meant to be "don't abuse" markup in data; Don't attempt bibtex/latex hackery. As Hans mentions, \btxcommand was introduced to handle some formatting in bibtex entries that might be inconsistent or in conflict with standard ConTeXt commands. When no \btxcommand definition is found, the system falls-back on standard ConTeXt (or luatex) syntax. Sloppy bibtex files should be cleaned up, but the aim is to allow files to be shared with bibtex/latex (minus any hackery, which could/should be fixed in the bibtex style files, but usually is not). Alan ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Learning how to use \setupbtxrendering
On 2/18/2018 7:07 PM, Rik Kabel wrote: On 2018-02-18 12:23, Thomas A. Schmitz wrote: On 02/18/2018 06:07 PM, Alan Braslau wrote: title={The Cambridge Companion to {\em Ulysses}}, Alan, I think this was Rik Kabel's point: for some scenarios, you cannot avoid to have some sort of context commands in your bibtex file. For a while, I also used biblatex from time to time, so I tried to have a bibtex file that would be as clean as possible and work with both systems, but your example shows that this is not always possible. Well, nothing that some well-written perl couldn't get rid of... All best Thomas Indeed, that was my point. Even without the mathematics components that were cited, I cannot imagine how markup could be excluded from the BibTeX file, and for that matter, from any other bibliographical database I have seen, if we have to comply with arbitrary formatting standards. The statement that one should not put any such formatting into the file is perhaps aspirational, but not really useful. If you code clean it's no problem as we can map commands (\btxcommand) but most (large) bibtex databases we've seen so far are quite inconsistent (not only in usage of commands, also in author names). (And of course Thomas meant Lua and not Perl.) Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Learning how to use \setupbtxrendering
On 2018-02-18 12:23, Thomas A. Schmitz wrote: On 02/18/2018 06:07 PM, Alan Braslau wrote: title={The Cambridge Companion to {\em Ulysses}}, Alan, I think this was Rik Kabel's point: for some scenarios, you cannot avoid to have some sort of context commands in your bibtex file. For a while, I also used biblatex from time to time, so I tried to have a bibtex file that would be as clean as possible and work with both systems, but your example shows that this is not always possible. Well, nothing that some well-written perl couldn't get rid of... All best Thomas Indeed, that was my point. Even without the mathematics components that were cited, I cannot imagine how markup could be excluded from the BibTeX file, and for that matter, from any other bibliographical database I have seen, if we have to comply with arbitrary formatting standards. The statement that one should not put any such formatting into the file is perhaps aspirational, but not really useful. -- Rik ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] \vec{} arrow length?
On Wed, 2017-12-27 at 15:44 -0700, Alan Braslau wrote: > On Wed, 27 Dec 2017 22:44:50 +0100 > Hans Hagen wrote: > > > > > On 12/27/2017 7:01 PM, Alan Braslau wrote: > > > > > > Why is the \vec{} arrow too short in some cases? > > > Compare $\vec{X}$ to $\vec{Y}$. > > > > > > The MWE below looks wrong in the default font > > > and is even uglier when pagella is used. > > > > > > Alan > > > > > > > > > %\setupbodyfont [pagella] > > > > > > \starttext > > > $\vec{X}$ vs. $\vec{Y}$ > > > \stoptext > > As this is has been the logic in tex font design for more than 3 > > decades, there's not much that we can do about it apart from patching > > the font (doable but somewhat nasty and boring as we then need to > > patch specific elements of (each) hvariant and it falls in the > > category "hard to motivate myself for"). > > > > \showglyphs > > > > \starttext > > \start > > \dorecurse{50}{$\vec{\blackrule[width=#1pt]}$\space}\unskip\par > > \stop > > \blank > > \start > > \switchtobodyfont [pagella] > > \dorecurse{50}{$\vec{\blackrule[width=#1pt]}$\space}\unskip\par > > \stop > > \blank > > \start > > \switchtobodyfont [cambria] > > \dorecurse{50}{$\vec{\blackrule[width=#1pt]}$\space}\unskip\par > > \stop > > \stoptext > > > > Shows that it's a font design issue: the extensible has a threshold > > related to the middle part and it should (1) have at least one more > > fixed size, or (2) have one fixed size and for the rest be extensible > > but that would be somewhat inefficient ion most cases, so (3) here we > > have a trade-off. > > > > Just blame the font ... cambria is (of course) ok. > > > > Hans > Even Computer Modern! > > Do you mean to tell me that the TeX Gyre fonts are all "broken"? > And that the *only* correctly working font is ... Cambria? > > So following up on the font discussion at the last ConTeXt meeting, > must we conclude that *all* of the fonts that we distribute with the > Standalone are to be avoided, and that one must pilfer the MicroSoft > font in order to typeset mathematics correctly? Lucida OpenType looks okay (if you have it). \setupbodyfont[lucidaot] \starttext $\vec{X}$ vs. $\vec{Y}$ \stoptext > > Alan > ___ > If your question is of interest to others as well, please add an entry to the > Wiki! > > maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : http://contextgarden.net > ___ test.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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] \vec{} arrow length?
On Wed, 27 Dec 2017 22:44:50 +0100 Hans Hagen wrote: > On 12/27/2017 7:01 PM, Alan Braslau wrote: > > Why is the \vec{} arrow too short in some cases? > > Compare $\vec{X}$ to $\vec{Y}$. > > > > The MWE below looks wrong in the default font > > and is even uglier when pagella is used. > > > > Alan > > > > > > %\setupbodyfont [pagella] > > > > \starttext > > $\vec{X}$ vs. $\vec{Y}$ > > \stoptext > As this is has been the logic in tex font design for more than 3 > decades, there's not much that we can do about it apart from patching > the font (doable but somewhat nasty and boring as we then need to > patch specific elements of (each) hvariant and it falls in the > category "hard to motivate myself for"). > > \showglyphs > > \starttext > \start > \dorecurse{50}{$\vec{\blackrule[width=#1pt]}$\space}\unskip\par > \stop > \blank > \start > \switchtobodyfont [pagella] > \dorecurse{50}{$\vec{\blackrule[width=#1pt]}$\space}\unskip\par > \stop > \blank > \start > \switchtobodyfont [cambria] > \dorecurse{50}{$\vec{\blackrule[width=#1pt]}$\space}\unskip\par > \stop > \stoptext > > Shows that it's a font design issue: the extensible has a threshold > related to the middle part and it should (1) have at least one more > fixed size, or (2) have one fixed size and for the rest be extensible > but that would be somewhat inefficient ion most cases, so (3) here we > have a trade-off. > > Just blame the font ... cambria is (of course) ok. > > Hans Even Computer Modern! Do you mean to tell me that the TeX Gyre fonts are all "broken"? And that the *only* correctly working font is ... Cambria? So following up on the font discussion at the last ConTeXt meeting, must we conclude that *all* of the fonts that we distribute with the Standalone are to be avoided, and that one must pilfer the MicroSoft font in order to typeset mathematics correctly? Alan ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Page printed upside down
Hi Pablo, Thank you for the links and for your help. I'm going to look at Metafun for the vertical line. Fabrice 2017-10-22 9:48 GMT+02:00 Pablo Rodriguez : > On 10/21/2017 11:45 PM, Fabrice Couvreur wrote: > > Hi Pablo, > > Sorry for the late response. I did some tests before answering to > > understand your explanations. > > Hi Fabrice, > > the basic idea is the paper orientation matches the printing option (if > any). > > > - With the command \setupinteractionscreen [option = landscape] and > > without selecting anything in Acrobat, I get a document in double-sided > > portrait mode but the back side is upside down > > \setupinteractionscreen[option=portrait] would be the right option here. > It is double-sided (duplex) printing for portrait orientation. > > Consider that ConTeXt has \setuppapersize[A4, portrait] as default. > > > - With the command \setuppapersize [A4, landscape] and without > > selecting anything in Acrobat, I get two documents in landscape mode in > > the same direction > > You got two printed sheets instead of one. To get only one, you need to > specify duplex printing (as explained above). Otherwise, your printer > would print as its default properties specify. > > There is even a \setupinteractionscreen[option=page] option, which > enables single-sided (or simplex) printing. This is required for > printers that are configured to print doublesided per default. > > > I think it's clear now, thank you. > > I hope it may be clearer after my explanation. > > > I did a try to get a booklet but the result is not correct because the > > text or formulas of mathematics are overflowing in the colums > > Sorry, but overflowing is normal here, the formula has too many data to > fit in that column width. > > I would discourage the use of columns to create the booklet. > > My advice would be to compose the standard text and then impose the pages: > > \starttext > \dorecurse{4}{\chapter{Chapter \Romannumerals{\recurselevel}} > \section{\TeX}\input knuth\par > \section{Zapf}\input zapf\par > \section{Math} > \startformula > \startmathalignment[n=2,align={left,left}] > \NC P_1 + P_2 + \dots + P_{12} \NC = 400 + 400\times 1,05 + > 400\times 1,05^2 + \dots + 400 \times 1,05^{11}\NR > \NC \NC = 400\times (1 + 1,05 + 1,05^2 + \dots + 1,05^{11})\NR > \NC \NC = 400\times \frac{1-1,05^{12}}{1-1,05}\approx 6\,367.\NR > \stopmathalignment > \stopformula} > \stoptext > > And then use the following code with the output PDF document from the > code above: > > \setuppapersize [A5][A4,landscape] > \setupexternalfigures[interaction=all] > \enabledirectives[references.border] > \setuparranging [2UP] > \setuplayout > [backspace=0pt, > topspace=0pt, >width=middle, > height=middle, > location=middle, > header=0pt, > footer=0pt] > \setupinteraction[state=start] > \setupinteractionscreen[option={landscape, fixed, paper}] > \starttext > \insertpages[document.pdf][width=0pt] > \stoptext > > You should get something similar to the attached booklet. > > Of course, you may have to increase font size in the original document. > But to know which increase in size the font needs, you have to check it > in the printed version of the final booklet. > > With an already released booklet, > https://github.com/ousia/from-pandoc-to-context/blob/master/ > doc/from-pandoc-to-context_A4.pdf > is the basis to be imposed in the final booklet > https://github.com/ousia/from-pandoc-to-context/blob/master/ > doc/from-pandoc-to-context_A4-booklet.pdf. > > The approach I’m suggesting is simpler and easier to implement. > > Just in case it helps, > > Pablo > -- > http://www.ousia.tk > > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/ > listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : http://contextgarden.net > > ___ > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Page printed upside down
On 10/21/2017 11:45 PM, Fabrice Couvreur wrote: > Hi Pablo, > Sorry for the late response. I did some tests before answering to > understand your explanations. Hi Fabrice, the basic idea is the paper orientation matches the printing option (if any). > - With the command \setupinteractionscreen [option = landscape] and > without selecting anything in Acrobat, I get a document in double-sided > portrait mode but the back side is upside down \setupinteractionscreen[option=portrait] would be the right option here. It is double-sided (duplex) printing for portrait orientation. Consider that ConTeXt has \setuppapersize[A4, portrait] as default. > - With the command \setuppapersize [A4, landscape] and without > selecting anything in Acrobat, I get two documents in landscape mode in > the same direction You got two printed sheets instead of one. To get only one, you need to specify duplex printing (as explained above). Otherwise, your printer would print as its default properties specify. There is even a \setupinteractionscreen[option=page] option, which enables single-sided (or simplex) printing. This is required for printers that are configured to print doublesided per default. > I think it's clear now, thank you. I hope it may be clearer after my explanation. > I did a try to get a booklet but the result is not correct because the > text or formulas of mathematics are overflowing in the colums Sorry, but overflowing is normal here, the formula has too many data to fit in that column width. I would discourage the use of columns to create the booklet. My advice would be to compose the standard text and then impose the pages: \starttext \dorecurse{4}{\chapter{Chapter \Romannumerals{\recurselevel}} \section{\TeX}\input knuth\par \section{Zapf}\input zapf\par \section{Math} \startformula \startmathalignment[n=2,align={left,left}] \NC P_1 + P_2 + \dots + P_{12} \NC = 400 + 400\times 1,05 + 400\times 1,05^2 + \dots + 400 \times 1,05^{11}\NR \NC \NC = 400\times (1 + 1,05 + 1,05^2 + \dots + 1,05^{11})\NR \NC \NC = 400\times \frac{1-1,05^{12}}{1-1,05}\approx 6\,367.\NR \stopmathalignment \stopformula} \stoptext And then use the following code with the output PDF document from the code above: \setuppapersize [A5][A4,landscape] \setupexternalfigures[interaction=all] \enabledirectives[references.border] \setuparranging [2UP] \setuplayout [backspace=0pt, topspace=0pt, width=middle, height=middle, location=middle, header=0pt, footer=0pt] \setupinteraction[state=start] \setupinteractionscreen[option={landscape, fixed, paper}] \starttext \insertpages[document.pdf][width=0pt] \stoptext You should get something similar to the attached booklet. Of course, you may have to increase font size in the original document. But to know which increase in size the font needs, you have to check it in the printed version of the final booklet. With an already released booklet, https://github.com/ousia/from-pandoc-to-context/blob/master/doc/from-pandoc-to-context_A4.pdf is the basis to be imposed in the final booklet https://github.com/ousia/from-pandoc-to-context/blob/master/doc/from-pandoc-to-context_A4-booklet.pdf. The approach I’m suggesting is simpler and easier to implement. Just in case it helps, Pablo -- http://www.ousia.tk A5-to-A4_landscape-booklet.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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Page printed upside down
Hi Pablo, Sorry for the late response. I did some tests before answering to understand your explanations. - With the commands \ setuppapersize [A4, landscape] and \ setupinteractionscreen [option = landscape] and without selecting anything in Acrobat, I get the desired double-sided document - With the command \ setupinteractionscreen [option = landscape] and without selecting anything in Acrobat, I get a document in double-sided portrait mode but the back side is upside down - With the command \ setuppapersize [A4, landscape] and without selecting anything in Acrobat, I get two documents in landscape mode in the same direction I think it's clear now, thank you. I did a try to get a booklet but the result is not correct because the text or formulas of mathematics are overflowing in the colums ### document.tex ### \definemixedcolumns [MyColumns] [ n=2, separator=rule, rulecolor=, balance=yes, ] \setupalign[verytolerant,stretch,hanging] \starttext \startMyColumns \dorecurse{6}{\input knuth} \startformula \startmathalignment[n=2,align={left,left}] \NC P_1 + P_2 + \dots + P_{12} \NC = 400 + 400\times 1,05 + 400\times 1,05^2 + \dots + 400 \times 1,05^{11}\NR \NC \NC = 400\times (1 + 1,05 + 1,05^2 + \dots + 1,05^{11})\NR \NC \NC = 400\times \frac{1-1,05^{12}}{1-1,05}\approx 6\,367.\NR \stopmathalignment \stopformula \stopMyColumns \stoptext Fabrice 2017-10-18 18:44 GMT+02:00 Pablo Rodriguez : > On 10/18/2017 06:00 PM, Fabrice Couvreur wrote: > > Hi, > > With this > > > > \setuppapersize[A4,landscape] > > \setupinteractionscreen[option=landscape] > > > > I get a double-sided page that I can read without having to return the > > page on the back. But I wish I could fold the sheet to have a booklet. > > > > Difficult to explain without showing. Is it possible ? > > Hi Fabrice, > > for a booklet I would recommend imposition. > > 1. Generate the document in the standard way (no landscape). > > 2. Impose it using the following code: > > \setuppapersize [A5][A4,landscape] > \setupexternalfigures[interaction=all] > \enabledirectives[references.border] > \setuparranging [2UP] > \setuplayout > [backspace=0pt, > topspace=0pt, >width=middle, > height=middle, > location=middle, > header=0pt, > footer=0pt] > \setupinteraction[state=start] > \setupinteractionscreen[option={landscape, fixed, paper}] > \starttext > \insertpages[document.pdf][width=0pt] > \stoptext > > A sample for document would be: > > \setupbodyfont[600pt] > \starttext > \dorecurse{4}{\startstandardmakeup[style={\bf\ss}, align=center] > \recurselevel > \stopstandardmakeup} > \stoptext > > Althought the paper size from the document is A4, imposition handles it > as A5, so it works fine. > > BTW, page order in the final booklet is different (you may see it > yourself :-)). > > I hope it helps, > > Pablo > -- > http://www.ousia.tk > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/ > listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : http://contextgarden.net > > ___ > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Font DejaVu with a font for Mathematics
Sorry for the noise ! It is true that \math{\cal N}, it is not very beautiful, so I will associate another font even if it should avoid, I believe, to write documents with different fonts Fabrice 2017-09-06 18:53 GMT+02:00 Herbert Voss : > > Fabrice Couvreur schrieb: > > > I use for the documents of my students the font DejaVu because I find > that > > it is very readable on paper. Unfortunately, this is not a font for > > writing > > Mathematics. I would like to use DejaVu font for text and a font to write > > mathematical formulas. What do you recommend ? > > DejaVu Math ... ;-) > https://ctan.org/tex-archive/fonts/tex-gyre-math > https://ctan.org/tex-archive/fonts/tex-gyre-math/opentype > > Herbert > > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/ > listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : http://contextgarden.net > > ___ > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Font DejaVu with a font for Mathematics
Fabrice Couvreur schrieb: > I use for the documents of my students the font DejaVu because I find that > it is very readable on paper. Unfortunately, this is not a font for > writing > Mathematics. I would like to use DejaVu font for text and a font to write > mathematical formulas. What do you recommend ? DejaVu Math ... ;-) https://ctan.org/tex-archive/fonts/tex-gyre-math https://ctan.org/tex-archive/fonts/tex-gyre-math/opentype Herbert ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Font DejaVu with a font for Mathematics
TeX Gyre DejaVu Math http://www.gust.org.pl/projects/e-foundry/tex-gyre-dejavu-math To quote the page above: "The TeX Gyre DejaVu Math font is a math companion to the fine and popular DejaVu text fonts." I seem to remember that I didn't like $\cal N$ when I used it. Best, Parchd. On Wed, Sep 06, 2017 at 06:27:40PM +0200, Fabrice Couvreur wrote: > Hello, > I use for the documents of my students the font DejaVu because I find that > it is very readable on paper. Unfortunately, this is not a font for writing > Mathematics. I would like to use DejaVu font for text and a font to write > mathematical formulas. What do you recommend ? > Thank you. > Fabrice > ___ > If your question is of interest to others as well, please add an entry to the > Wiki! > > maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : http://contextgarden.net > ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Font DejaVu with a font for Mathematics
Hello, I use for the documents of my students the font DejaVu because I find that it is very readable on paper. Unfortunately, this is not a font for writing Mathematics. I would like to use DejaVu font for text and a font to write mathematical formulas. What do you recommend ? Thank you. Fabrice ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] How to put a circle on top of a character
Hi Hans, Regarding what you have added on line 1327 of math-stc.mkvi, that line should be \definemathover[\v!symbol][interiorset]["2218] (instead of "2217). I added also a wiki page for mathstackers: http://wiki.contextgarden.net/mathstackers Best regards: OK > On 29 Aug 2017, at 23:28, Hans Hagen wrote: > > On 8/29/2017 9:56 PM, Otared Kavian wrote: >> Hi Hans, >> That’s wonderful! Indeed this is very handy and I’ll add it to the wiki. >> However, before doing so, I would like to ask how is it possible to get the >> command act entirely in math mode, that is respecting the distances and the >> math fonts. Please see the attached output. >> %%% begin interior-of-a-set.tex >> \definemathstackers[symbol][voffset=-.30\mathexheight,hoffset=\zeropoint] >> \definemathover[symbol][interiorset]["2218] >> \starttext >> Here is the new command \type{\interiorset{K}}: $\mathring{K} \neq >> \interiorset{K}$ >> \stoptext >> %%% end interior-of-a-set.tex > > I'll add an offset > > \definemathstackers > [\v!symbol] > [\c!voffset=-.3\mathexheight, > \c!hoffset=\zeropoint, > \c!mathclass=ord, > \c!topoffset=.4\mathemwidth, % poor man's italic correction > \c!middlecommand=\mathematics] > > but keep in mind, this is not really meant for accented math, more for > special cases > > Hans > > - > Hans Hagen | PRAGMA ADE > Ridderstraat 27 | 8061 GH Hasselt | The Netherlands > tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl > - > ___ > If your question is of interest to others as well, please add an entry to the > Wiki! > > maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : http://contextgarden.net > ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] How to put a circle on top of a character
Hi Hans, Thanks for your attention. Indeed I understand that the stackers structures are for putting things such as a circle or a star on top of another character or constructs. In fact, in terms of readability, the result of your new command \interiorset{K} is better than that of \mathring{K}, but the « K » coming out with \interiorset is set in Roman, while it should be math italic (or whatever font is used in math mode). Also the white space around it is not yet correct. I’ll test what you will have added in the next beta and then put an entry on the wiki about mathstackers. Thanks again: OK > On 29 Aug 2017, at 23:28, Hans Hagen wrote: > > On 8/29/2017 9:56 PM, Otared Kavian wrote: >> Hi Hans, >> That’s wonderful! Indeed this is very handy and I’ll add it to the wiki. >> However, before doing so, I would like to ask how is it possible to get the >> command act entirely in math mode, that is respecting the distances and the >> math fonts. Please see the attached output. >> %%% begin interior-of-a-set.tex >> \definemathstackers[symbol][voffset=-.30\mathexheight,hoffset=\zeropoint] >> \definemathover[symbol][interiorset]["2218] >> \starttext >> Here is the new command \type{\interiorset{K}}: $\mathring{K} \neq >> \interiorset{K}$ >> \stoptext >> %%% end interior-of-a-set.tex > > I'll add an offset > > \definemathstackers > [\v!symbol] > [\c!voffset=-.3\mathexheight, > \c!hoffset=\zeropoint, > \c!mathclass=ord, > \c!topoffset=.4\mathemwidth, % poor man's italic correction > \c!middlecommand=\mathematics] > > but keep in mind, this is not really meant for accented math, more for > special cases > > Hans > > - > Hans Hagen | PRAGMA ADE > Ridderstraat 27 | 8061 GH Hasselt | The Netherlands > tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl > - > ___ > If your question is of interest to others as well, please add an entry to the > Wiki! > > maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : http://contextgarden.net > ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] How to put a circle on top of a character
On 8/29/2017 9:56 PM, Otared Kavian wrote: Hi Hans, That’s wonderful! Indeed this is very handy and I’ll add it to the wiki. However, before doing so, I would like to ask how is it possible to get the command act entirely in math mode, that is respecting the distances and the math fonts. Please see the attached output. %%% begin interior-of-a-set.tex \definemathstackers[symbol][voffset=-.30\mathexheight,hoffset=\zeropoint] \definemathover[symbol][interiorset]["2218] \starttext Here is the new command \type{\interiorset{K}}: $\mathring{K} \neq \interiorset{K}$ \stoptext %%% end interior-of-a-set.tex I'll add an offset \definemathstackers [\v!symbol] [\c!voffset=-.3\mathexheight, \c!hoffset=\zeropoint, \c!mathclass=ord, \c!topoffset=.4\mathemwidth, % poor man's italic correction \c!middlecommand=\mathematics] but keep in mind, this is not really meant for accented math, more for special cases Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] STIX Two Text and Math
On Sun, Aug 13, 2017 at 12:08:06AM +0200, Fabrice Couvreur wrote: > Hi Hans, > I downloaded the fonts and it works perfectly. > What do you think are the finest fonts for writing a book with mathematics ? > Are Cambria fonts free ? If so where can they be downloaded ? > Thank you > Fabrice > I'm not Hans, so I won't offer my opinions about finest. But I can clarify re Cambria: Cambria is not free in the sense of 'libre'. The alternative is Caladea which has the same metrics but is not the same (e.g. higher curl from top of lowercase 'g'). I have a comparison using a short part of Lorem ipsum at http://zarniwhoop.uk/files/PDF-substitutes/cambria-substitutes.pdf If you want it, you can downlaod it from http://gsdview.appspot.com/chromeos-localmirror/distfiles/crosextrafonts-20130214.tar.gz Since I've pointed to my site, I'll mention that I have details, including PDFs of language coverage and the glyphs in a font, at http://zarniwhoop.uk/ttf-otf-notes.html . My interest is in maximising the languages I can render when I'm off following links on wikipedia, not in outputing maths. So no examples of italics, although the 'contents' PDFs attempt to show everything included in a font in its normal style - they will show maths glyphs if you know the unicode codepoint to look for. Of course, for plain text there are many other OTF/TTF fonts. My site has over 190, but not all of them cover English. Some are easy to read, others can look small at the same nominal size. The lipsum-serif-*.pdf files in http://zarniwhoop.uk/files/PDF-lipsum/ might be useful. ĸen -- I live in a city. I know sparrows from starlings. After that everything is a duck as far as I'm concerned. -- Monstrous Regiment ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] STIX Two Text and Math
On 8/13/2017 12:08 AM, Fabrice Couvreur wrote: Hi Hans, I downloaded the fonts and it works perfectly. What do you think are the finest fonts for writing a book with mathematics ? pagella or lucida Are Cambria fonts free ? If so where can they be downloaded ? on windows machines Thank you Fabrice 2017-08-12 13:01 GMT+02:00 Hans Hagen <mailto:pra...@wxs.nl>>: On 8/12/2017 11:49 AM, Fabrice Couvreur wrote: Has anyone ever used these fonts ? not me If so, do you need to write a script to use them ? no, you can say: \setupbodyfont[stixtwo] Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl <http://www.pragma-ade.nl> | www.pragma-pod.nl <http://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 <mailto:ntg-context@ntg.nl> / http://www.ntg.nl/mailman/listinfo/ntg-context <http://www.ntg.nl/mailman/listinfo/ntg-context> webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ <https://bitbucket.org/phg/context-mirror/commits/> wiki : http://contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___ -- - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] STIX Two Text and Math
Hi Hans, I downloaded the fonts and it works perfectly. What do you think are the finest fonts for writing a book with mathematics ? Are Cambria fonts free ? If so where can they be downloaded ? Thank you Fabrice 2017-08-12 13:01 GMT+02:00 Hans Hagen : > On 8/12/2017 11:49 AM, Fabrice Couvreur wrote: > > Has anyone ever used these fonts ? >> > > not me > > If so, do you need to write a script to use them ? >> > > no, you can say: > > \setupbodyfont[stixtwo] > > Hans > > - > Hans Hagen | PRAGMA ADE > Ridderstraat 27 | 8061 GH Hasselt | The Netherlands >tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl > - > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/list > info/ntg-context > webpage : http://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : http://contextgarden.net > > ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Kerning between primes and left parenthesis (again)
On Mon, Jul 31, 2017 at 9:15 PM, Hans Hagen wrote: > On 7/31/2017 8:02 PM, Mikael P. Sundqvist wrote: >> >> On Mon, Jul 31, 2017 at 5:37 PM, Hans Hagen wrote: >>> >>> On 7/31/2017 11:21 AM, Mikael P. Sundqvist wrote: >>>> >>>> >>>> On Thu, Jul 20, 2017 at 2:53 PM, Hans Hagen wrote: >>>>> >>>>> >>>>> On 7/20/2017 7:18 AM, Mikael P. Sundqvist wrote: >>>>> >>>>>> Den 12 juli 2017 10:17 fm skrev "Mikael P. Sundqvist" >>>>>> >>>>> <mailto:mic...@gmail.com>>: >>>>>> >>>>>> Dear Hans, >>>>>> >>>>>> now, in luatex 1.05, that the primes are "constructed" in new >>>>>> manner, >>>>>> I wonder if there is a way to specify in a goodie file the >>>>>> kerning >>>>>> between characters, in particular primes and the left >>>>>> parenthesis? >>>>>> >>>>>> I tried >>>>>> >>>>>>kernpairs = { >>>>>> [0x2032] = {[0x0028] = -1000, }, -- prime and ( >>>>>>}, >>>>>> >>>>>> but that does not seem to have any effect. >>>>>> >>>>>> The pre-1.05 modification >>>>>> >>>>>>dimensions = { >>>>>>default = { >>>>>>[0x2044] = { xoffset = 275, width = 600 }, >>>>>>[0x2032] = { xoffset = 50, width = 290 }, -- >>>>>> prime >>>>>>[0x2033] = { xoffset = 50, width = 690 }, -- >>>>>> double >>>>>> prime >>>>>>[0x2034] = { xoffset = 50, width = 1090}, -- >>>>>> triple >>>>>> prime >>>>>>[0x2057] = { xoffset = 50, width = 1490}, -- >>>>>> quadruple prime >>>>>>}, >>>>>>}, >>>>>> >>>>>> (which is a non-optimal way of solving this issue since it has >>>>>> side >>>>>> effects) does not change anything anymore. >>>>>> >>>>>> So, is there now a way to do this cleanly now that the mechanism >>>>>> is >>>>>> changed? >>>>>> >>>>>> /Mikael >>>>>> >>>>>> >>>>>> Hi, >>>>>> >>>>>> should I interpret the silence that this is currently not possible, or >>>>>> that you, Hans, is completely fed up with this subject? :-) >>>>> >>>>> >>>>> >>>>> you rule out the possibility that i have other things to do >>>>> >>>>> anyway, use >>>>> >>>>> 0xFE932 >>>>> >>>>> etc instead as primes get remapped >>>>> >>>>> - >>>>> Hans Hagen | PRAGMA ADE >>>>> Ridderstraat 27 | 8061 GH Hasselt | The Netherlands >>>>> tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl >>>>> - >>>>> >>>>> >>>>> ___ >>>>> If your question is of interest to others as well, please add an entry >>>>> to >>>>> the Wiki! >>>>> >>>>> maillist : ntg-context@ntg.nl / >>>>> http://www.ntg.nl/mailman/listinfo/ntg-context >>>>> webpage : http://www.pragma-ade.nl / http://context.aanhet.net >>>>> archive : https://bitbucket.org/phg/context-mirror/commits/ >>>>> wiki : http://contextgarden.net >>>>> >>>>> >>>>> ___ >>>> >>>> >>>> >>>> I'm sorry but I cannot get it to work. >>>> >>>> %%
Re: [NTG-context] Kerning between primes and left parenthesis (again)
On 7/31/2017 8:02 PM, Mikael P. Sundqvist wrote: On Mon, Jul 31, 2017 at 5:37 PM, Hans Hagen wrote: On 7/31/2017 11:21 AM, Mikael P. Sundqvist wrote: On Thu, Jul 20, 2017 at 2:53 PM, Hans Hagen wrote: On 7/20/2017 7:18 AM, Mikael P. Sundqvist wrote: Den 12 juli 2017 10:17 fm skrev "Mikael P. Sundqvist" mailto:mic...@gmail.com>>: Dear Hans, now, in luatex 1.05, that the primes are "constructed" in new manner, I wonder if there is a way to specify in a goodie file the kerning between characters, in particular primes and the left parenthesis? I tried kernpairs = { [0x2032] = {[0x0028] = -1000, }, -- prime and ( }, but that does not seem to have any effect. The pre-1.05 modification dimensions = { default = { [0x2044] = { xoffset = 275, width = 600 }, [0x2032] = { xoffset = 50, width = 290 }, -- prime [0x2033] = { xoffset = 50, width = 690 }, -- double prime [0x2034] = { xoffset = 50, width = 1090}, -- triple prime [0x2057] = { xoffset = 50, width = 1490}, -- quadruple prime }, }, (which is a non-optimal way of solving this issue since it has side effects) does not change anything anymore. So, is there now a way to do this cleanly now that the mechanism is changed? /Mikael Hi, should I interpret the silence that this is currently not possible, or that you, Hans, is completely fed up with this subject? :-) you rule out the possibility that i have other things to do anyway, use 0xFE932 etc instead as primes get remapped - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___ I'm sorry but I cannot get it to work. %%% my local lucida-opentype-math.lfg, located in the same directory as the tex file (and loaded) - kern_250 = { bottomright = { { kern = -250 } }, force = true } local function FixRadicalDisplayStyleVerticalGap(value,target,original) local o = original.mathparameters.RadicalVerticalGap -- 50 return 2 * o * target.parameters.factor end return { name = "lucida-opentype-math", version = "1.00", comment = "Goodies that complement lucida opentype.", author = "Hans Hagen", copyright = "ConTeXt development team", mathematics = { parameters = { RadicalDisplayStyleVerticalGap = FixRadicalDisplayStyleVerticalGap, }, kernpairs = { [0x1D44E] = {[0x1D44F] = 1000,}, -- 𝑎𝑏 demo [0xFE932] = {[0x0028] = 1000,} -- remapped prime and ( }, } } %%% %%% the tex file \setupbodyfont[lucidaot] \setupmathematics[kernpairs=yes] \starttext $f'(x)ab$ \stoptext %%% The result is attached. It works ok for the pair ab, but not for prime and (. Is the ( also remapped (while greping for it in the source, I could not find any clue). Maybe it is better to ping the maintainers of the font? just change the dimensions dimensions = { default = { -- experimental values [0x2044] = { xoffset = 275, width = 600 }, -- [0x2032] = { yoffset = -10 }, [0xFE932] = { width = 200 }, [0xFE933] = { width = 500 }, [0xFE934] = { width = 800 }, }, }, - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive :
Re: [NTG-context] Kerning between primes and left parenthesis (again)
On Mon, Jul 31, 2017 at 5:37 PM, Hans Hagen wrote: > On 7/31/2017 11:21 AM, Mikael P. Sundqvist wrote: >> >> On Thu, Jul 20, 2017 at 2:53 PM, Hans Hagen wrote: >>> >>> On 7/20/2017 7:18 AM, Mikael P. Sundqvist wrote: >>> >>>> Den 12 juli 2017 10:17 fm skrev "Mikael P. Sundqvist" >>> <mailto:mic...@gmail.com>>: >>>> >>>> Dear Hans, >>>> >>>> now, in luatex 1.05, that the primes are "constructed" in new >>>> manner, >>>> I wonder if there is a way to specify in a goodie file the kerning >>>> between characters, in particular primes and the left parenthesis? >>>> >>>> I tried >>>> >>>> kernpairs = { >>>> [0x2032] = {[0x0028] = -1000, }, -- prime and ( >>>> }, >>>> >>>> but that does not seem to have any effect. >>>> >>>> The pre-1.05 modification >>>> >>>> dimensions = { >>>> default = { >>>> [0x2044] = { xoffset = 275, width = 600 }, >>>> [0x2032] = { xoffset = 50, width = 290 }, -- prime >>>> [0x2033] = { xoffset = 50, width = 690 }, -- >>>> double >>>> prime >>>> [0x2034] = { xoffset = 50, width = 1090}, -- >>>> triple >>>> prime >>>> [0x2057] = { xoffset = 50, width = 1490}, -- >>>> quadruple prime >>>> }, >>>> }, >>>> >>>> (which is a non-optimal way of solving this issue since it has side >>>> effects) does not change anything anymore. >>>> >>>> So, is there now a way to do this cleanly now that the mechanism is >>>> changed? >>>> >>>> /Mikael >>>> >>>> >>>> Hi, >>>> >>>> should I interpret the silence that this is currently not possible, or >>>> that you, Hans, is completely fed up with this subject? :-) >>> >>> >>> you rule out the possibility that i have other things to do >>> >>> anyway, use >>> >>> 0xFE932 >>> >>> etc instead as primes get remapped >>> >>> - >>>Hans Hagen | PRAGMA ADE >>>Ridderstraat 27 | 8061 GH Hasselt | The Netherlands >>> tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl >>> - >>> >>> ___ >>> If your question is of interest to others as well, please add an entry to >>> the Wiki! >>> >>> maillist : ntg-context@ntg.nl / >>> http://www.ntg.nl/mailman/listinfo/ntg-context >>> webpage : http://www.pragma-ade.nl / http://context.aanhet.net >>> archive : https://bitbucket.org/phg/context-mirror/commits/ >>> wiki : http://contextgarden.net >>> >>> ___ >> >> >> I'm sorry but I cannot get it to work. >> >> %%% my local lucida-opentype-math.lfg, located in the same directory >> as the tex file (and loaded) >> - kern_250 = { bottomright = { { kern = -250 } }, force = true } >> >> local function FixRadicalDisplayStyleVerticalGap(value,target,original) >> local o = original.mathparameters.RadicalVerticalGap -- 50 >> return 2 * o * target.parameters.factor >> end >> >> return { >> name = "lucida-opentype-math", >> version = "1.00", >> comment = "Goodies that complement lucida opentype.", >> author = "Hans Hagen", >> copyright = "ConTeXt development team", >> mathematics = { >> parameters = { >> RadicalDisplayStyleVerticalGap = >> FixRadicalDisplayStyleVerticalGap, >> }, >> kernpairs = { >> [0x1D44E] = {[0x1D44F] = 1000,}, -- 𝑎𝑏 de
Re: [NTG-context] Kerning between primes and left parenthesis (again)
On 7/31/2017 11:21 AM, Mikael P. Sundqvist wrote: On Thu, Jul 20, 2017 at 2:53 PM, Hans Hagen wrote: On 7/20/2017 7:18 AM, Mikael P. Sundqvist wrote: Den 12 juli 2017 10:17 fm skrev "Mikael P. Sundqvist" mailto:mic...@gmail.com>>: Dear Hans, now, in luatex 1.05, that the primes are "constructed" in new manner, I wonder if there is a way to specify in a goodie file the kerning between characters, in particular primes and the left parenthesis? I tried kernpairs = { [0x2032] = {[0x0028] = -1000, }, -- prime and ( }, but that does not seem to have any effect. The pre-1.05 modification dimensions = { default = { [0x2044] = { xoffset = 275, width = 600 }, [0x2032] = { xoffset = 50, width = 290 }, -- prime [0x2033] = { xoffset = 50, width = 690 }, -- double prime [0x2034] = { xoffset = 50, width = 1090}, -- triple prime [0x2057] = { xoffset = 50, width = 1490}, -- quadruple prime }, }, (which is a non-optimal way of solving this issue since it has side effects) does not change anything anymore. So, is there now a way to do this cleanly now that the mechanism is changed? /Mikael Hi, should I interpret the silence that this is currently not possible, or that you, Hans, is completely fed up with this subject? :-) you rule out the possibility that i have other things to do anyway, use 0xFE932 etc instead as primes get remapped - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___ I'm sorry but I cannot get it to work. %%% my local lucida-opentype-math.lfg, located in the same directory as the tex file (and loaded) - kern_250 = { bottomright = { { kern = -250 } }, force = true } local function FixRadicalDisplayStyleVerticalGap(value,target,original) local o = original.mathparameters.RadicalVerticalGap -- 50 return 2 * o * target.parameters.factor end return { name = "lucida-opentype-math", version = "1.00", comment = "Goodies that complement lucida opentype.", author = "Hans Hagen", copyright = "ConTeXt development team", mathematics = { parameters = { RadicalDisplayStyleVerticalGap = FixRadicalDisplayStyleVerticalGap, }, kernpairs = { [0x1D44E] = {[0x1D44F] = 1000,}, -- 𝑎𝑏 demo [0xFE932] = {[0x0028] = 1000,} -- remapped prime and ( }, } } %%% %%% the tex file \setupbodyfont[lucidaot] \setupmathematics[kernpairs=yes] \starttext $f'(x)ab$ \stoptext %%% The result is attached. It works ok for the pair ab, but not for prime and (. Is the ( also remapped (while greping for it in the source, I could not find any clue). Maybe it is better to ping the maintainers of the font? just change the dimensions dimensions = { default = { -- experimental values [0x2044] = { xoffset = 275, width = 600 }, -- [0x2032] = { yoffset = -10 }, [0xFE932] = { width = 200 }, [0xFE933] = { width = 500 }, [0xFE934] = { width = 800 }, }, }, - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Kerning between primes and left parenthesis (again)
On Thu, Jul 20, 2017 at 2:53 PM, Hans Hagen wrote: > On 7/20/2017 7:18 AM, Mikael P. Sundqvist wrote: > >> Den 12 juli 2017 10:17 fm skrev "Mikael P. Sundqvist" > <mailto:mic...@gmail.com>>: >> >> Dear Hans, >> >> now, in luatex 1.05, that the primes are "constructed" in new manner, >> I wonder if there is a way to specify in a goodie file the kerning >> between characters, in particular primes and the left parenthesis? >> >> I tried >> >> kernpairs = { >> [0x2032] = {[0x0028] = -1000, }, -- prime and ( >> }, >> >> but that does not seem to have any effect. >> >> The pre-1.05 modification >> >> dimensions = { >> default = { >> [0x2044] = { xoffset = 275, width = 600 }, >> [0x2032] = { xoffset = 50, width = 290 }, -- prime >> [0x2033] = { xoffset = 50, width = 690 }, -- double >> prime >> [0x2034] = { xoffset = 50, width = 1090}, -- triple >> prime >> [0x2057] = { xoffset = 50, width = 1490}, -- >> quadruple prime >> }, >> }, >> >> (which is a non-optimal way of solving this issue since it has side >> effects) does not change anything anymore. >> >> So, is there now a way to do this cleanly now that the mechanism is >> changed? >> >> /Mikael >> >> >> Hi, >> >> should I interpret the silence that this is currently not possible, or >> that you, Hans, is completely fed up with this subject? :-) > > you rule out the possibility that i have other things to do > > anyway, use > > 0xFE932 > > etc instead as primes get remapped > > - > Hans Hagen | PRAGMA ADE > Ridderstraat 27 | 8061 GH Hasselt | The Netherlands >tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl > - > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : http://contextgarden.net > ___ I'm sorry but I cannot get it to work. %%% my local lucida-opentype-math.lfg, located in the same directory as the tex file (and loaded) - kern_250 = { bottomright = { { kern = -250 } }, force = true } local function FixRadicalDisplayStyleVerticalGap(value,target,original) local o = original.mathparameters.RadicalVerticalGap -- 50 return 2 * o * target.parameters.factor end return { name = "lucida-opentype-math", version = "1.00", comment = "Goodies that complement lucida opentype.", author = "Hans Hagen", copyright = "ConTeXt development team", mathematics = { parameters = { RadicalDisplayStyleVerticalGap = FixRadicalDisplayStyleVerticalGap, }, kernpairs = { [0x1D44E] = {[0x1D44F] = 1000,}, -- 𝑎𝑏 demo [0xFE932] = {[0x0028] = 1000,} -- remapped prime and ( }, } } %%% %%% the tex file \setupbodyfont[lucidaot] \setupmathematics[kernpairs=yes] \starttext $f'(x)ab$ \stoptext %%% The result is attached. It works ok for the pair ab, but not for prime and (. Is the ( also remapped (while greping for it in the source, I could not find any clue). Maybe it is better to ping the maintainers of the font? /Mikael ctx-listexample36.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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] t-bnf module with MKIV
Hi, I'm trying to typeset a BNF grammar. The module t-bnf appears to not work with mkiv. http://ctan.math.washington.edu/tex-archive/macros/context/contrib/context-bnf/doc/context/third/bnf/t-bnf.pdf tex error > tex error on line 157 in file /Users/acailliau/context/tex/texmf-modules/tex/context/third/bnf/t-bnf.tex: ! Undefined control sequence \c!terminalstart =\tttf \syst_helpers_process_comma_item #1,#2->\if ,#1 ,\expandafter \syst_helpers_p... \c!terminalstart =\tttf , \c!terminalstop =, \c!nonterminalstart =\mathematics \syst_helpers_get_parameters ...cess_comma_item #1 ,],\_e_o_p_ l.157\c!indentnext=\v!no] 147 \def\setupbnfgrammar% 148 {\dosingleargument\dosetupbnfgrammar} 149 150 \setupbnfgrammar 151 [\c!terminalstart=\tttf, 152\c!terminalstop=, 153\c!nonterminalstart=\mathematics{\langle}, 154\c!nonterminalstop=\mathematics{\rangle}, 155 \c!is={ \mathematics{\longrightarrow}}, 156\c!option=\mathematics{\vert}, 157 >> \c!indentnext=\v!no] 158 159 %D \macros 160 %D {BNF} 161 %D 162 %D We also define a useful abbreviation to be used for header texts and labels. 163 164 \logo[BNF]{bnf} 165 166 %D And we use it here: 167 Can anyone provides me clues on how to make it work ? Here is a minimal example: \usemodule[t-bnf] \starttext \startbnfgrammar[] : | "+" : "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" \stopbnfgrammar \stoptext Thanks in advance, Antoine ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Bug regarding placement and size of primes
the alternative is that i waste time again and again on getting something to work for all fonts and all combinations which leads to a mess that i then need to maintain without any gainAt first: Thank you very much for your work!so, i decided to follow a route that works for most fonts / cases and not some messy hybrid solution (and i don't want a different setup or bag of tricks for each font that is out there as that is a long term no-go)But I have to contradict you here: It has nothing to do with special or hybrid fonts. The problem persists at present (using the LuaTeX version that is shipped with the Garden version) in all fonts. The primes are not rendered as they should in any font I tried out.As Mikael told me, you optimised the code for LuaTeX 1.05 which seems to be terminated September this year. But until then the output of primes will be not correct. I have no possibility to switch back to the current (non-beta) version of ConTeXt, because this version contains the bugs with primes you have already resolved.This means that ConTeXt is not usable for me until LuaTeX 1.05 will be released or until I am able to compile the source of LuaTeX 1.05 on my own. Some of the latest betas (the version one or two weeks ago) did solve all problems regarding primes. The problem I am referring to rose up in the most recent betas. As Mikael told me, this is because you introduced new code to work with LuaTeX 1.05. This is very nice, but because this version is not yet released, this decision is questionable, since this makes ConTeXt unusable until this release (if you need primes).So I appreciate your hard work, but I would be nice to have a version that runs with the current LuaTeX version of the beta of ConTeXt (or alternatively it would be nice if instructions are provided to compile the source of LuaTeX for every OS that can be used simply).And (to repeat myself) the problem has nothing to do with special fonts of hybrid version or whatever. You get the problem using standard Latin Modern or any font else. Simply try%%%\starttext%$f’$, $f^{''}$.%\stoptext%%%and you will get something like attached.BestMathias Primes.pdf Description: Adobe PDF document Am 12.06.2017 um 16:35 schrieb Hans Hagen <pra...@wxs.nl>:On 6/12/2017 3:53 PM, Mathias Schickel wrote:Thank you very much for providing the instructions, Mikael! Unfortunately1) get the filessvn checkout --username anonsvn --password anonsvnhttps://serveur-svn.lri.fr/svn/modhel/luatex/branches/experimental/does not work on MacOS (which I am using). Can someone tell me which command I need to use at MacOS (current version)?Besides, Hans, I think it is a questionable decision to include the new mechanism for primes in the beta but not the required LuaTeX version for them to work correctly. I tried out the ConTeXt version „current“ (--context=current downloading the standalone) and there the old bugs persist. That means that I cannot use ConTeXt to typeset mathematics now, since no version works correctly when primes are required (until I can handle it to compile LuaTeX 1.05, but I think it would be much more comfortable the beta version of ConTeXt could run using the LuaTeX version it provides on it’s own).the alternative is that i waste time again and again on getting something to work for all fonts and all combinations which leads to a mess that i then need to maintain without any gainso, i decided to follow a route that works for most fonts / cases and not some messy hybrid solution (and i don't want a different setup or bag of tricks for each font that is out there as that is a long term no-go)(it already has costs me more time that i liked)Hans- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl-___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Bug regarding placement and size of primes
On 6/12/2017 3:53 PM, Mathias Schickel wrote: Thank you very much for providing the instructions, Mikael! Unfortunately 1) get the files svn checkout --username anonsvn --password anonsvn https://serveur-svn.lri.fr/svn/modhel/luatex/branches/experimental/ does not work on MacOS (which I am using). Can someone tell me which command I need to use at MacOS (current version)? Besides, Hans, I think it is a questionable decision to include the new mechanism for primes in the beta but not the required LuaTeX version for them to work correctly. I tried out the ConTeXt version „current“ (--context=current downloading the standalone) and there the old bugs persist. That means that I cannot use ConTeXt to typeset mathematics now, since no version works correctly when primes are required (until I can handle it to compile LuaTeX 1.05, but I think it would be much more comfortable the beta version of ConTeXt could run using the LuaTeX version it provides on it’s own). the alternative is that i waste time again and again on getting something to work for all fonts and all combinations which leads to a mess that i then need to maintain without any gain so, i decided to follow a route that works for most fonts / cases and not some messy hybrid solution (and i don't want a different setup or bag of tricks for each font that is out there as that is a long term no-go) (it already has costs me more time that i liked) Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Bug regarding placement and size of primes
Thank you very much for providing the instructions, Mikael! Unfortunately > 1) get the files > > svn checkout --username anonsvn --password anonsvn > https://serveur-svn.lri.fr/svn/modhel/luatex/branches/experimental/ > <https://serveur-svn.lri.fr/svn/modhel/luatex/branches/experimental/> does not work on MacOS (which I am using). Can someone tell me which command I need to use at MacOS (current version)? Besides, Hans, I think it is a questionable decision to include the new mechanism for primes in the beta but not the required LuaTeX version for them to work correctly. I tried out the ConTeXt version „current“ (--context=current downloading the standalone) and there the old bugs persist. That means that I cannot use ConTeXt to typeset mathematics now, since no version works correctly when primes are required (until I can handle it to compile LuaTeX 1.05, but I think it would be much more comfortable the beta version of ConTeXt could run using the LuaTeX version it provides on it’s own). Best /Mathias > Am 12.06.2017 um 13:46 schrieb Mikael P. Sundqvist : > > On Mon, Jun 12, 2017 at 1:30 PM, Mathias Schickel > wrote: >> Hi Mikael, >> >> when will LuaTeX 1.05 be released? And how can I get the source for >> compilation (and what exactly will I have to do to get everything to work)? >> Besides: Do you have a link to the thread you are referring to? >> >> Best >> /Mathias >> >> >>> Am 12.06.2017 um 12:57 schrieb Mikael P. Sundqvist : >>> >>> On Mon, Jun 12, 2017 at 12:32 PM, Mathias Schickel >>> wrote: >>>> Dear Hans, >>>> >>>> the newest beta (I have updated some hours ago) contains again some bugs >>>> regarding the size and placement of primes. You can verify that by using >>>> the following minimal example (created to show some older bugs being >>>> resolved meanwhile): >>>> >>>> %%% >>>> \starttext >>>> % >>>> Compare $f'$ to $(f')$ and to $f''$, $(f'')$, $f^{''}$ and $(f^{''})$. >>>> % >>>> \startformula >>>> % >>>> \int\nolimits_a^b \bigl(\|f(x)\|\bigr)\, {\mathrm d}x >>>> % >>>> \stopformula >>>> % >>>> \stoptext >>>> %%% >>>> >>>> The output is attached. The primes are obviously rendered too small. And >>>> while $f'$ seems to lead to a placement of the prime a little too low, >>>> $f^{'}$ seems to cause the prime being placed too high. >>>> >>>> Best >>>> Mathias >>>> >>>> >>>> >>>> ___ >>>> If your question is of interest to others as well, please add an entry to >>>> the Wiki! >>>> >>>> maillist : ntg-context@ntg.nl / >>>> http://www.ntg.nl/mailman/listinfo/ntg-context >>>> webpage : http://www.pragma-ade.nl / http://context.aanhet.net >>>> archive : https://bitbucket.org/phg/context-mirror/commits/ >>>> wiki : http://contextgarden.net >>>> ___ >>> >>> I think this is intended (see the other thread). Hans decided to do >>> the primes differently, which means that they will look strange until >>> luatex 1.05 is out. You can compile luatex 1.05 yourself, and you will >>> see that the primes look OK. I attach a pdf result of your file, >>> compiled with 1.05. >>> >>> /Mikael >>> ___ >>> If your question is of interest to others as well, please add an entry to >>> the Wiki! >>> >>> maillist : ntg-context@ntg.nl / >>> http://www.ntg.nl/mailman/listinfo/ntg-context >>> webpage : http://www.pragma-ade.nl / http://context.aanhet.net >>> archive : https://bitbucket.org/phg/context-mirror/commits/ >>> wiki : http://contextgarden.net >>> ___ >> >> ___ >> If your question is of interest to others as well, please add an entry to >> the Wiki! >> >> maillist : ntg-context@ntg.nl / >> http://www.ntg.nl/mailman/listinfo/ntg-context >> webpage : http://www.pragma-ade.nl /
Re: [NTG-context] mathradical defaults to "normal", should it perhaps be "default"?
On Wed, Jun 7, 2017 at 7:31 PM, Hans Hagen wrote: > On 6/7/2017 4:50 PM, Mikael P. Sundqvist wrote: >> >> On Mon, Jun 5, 2017 at 10:24 AM, Mikael P. Sundqvist >> wrote: >>> >>> Hi, >>> >>> this might be a matter of taste. >>> >>> look at the output of (attached). In my opinion the first square root >>> is to "high", while it looks better on the second line. From >>> setup-en.pdf it looks like the default of \setupmathradical is set to >>> normal (and not default). I don't understand what normal should mean, >>> but I think the alternative=default looks better. (The lucida fonts >>> are loaded in this example, since the effect is more clear for them). > > Ok, this is the story > > -- radicals (roots) are rather special and have some hard coded properties > (like always scriptscript in the degree) > > -- \over (and friends) that are used in \frac (which by the way can be > configured in many ways) has the danger of getting the wrong style as side > effect of parsing (math list construction) and processing > > -- in context we want to support color etc for noth in a consistent way as > well as style control (important in educational math) > > Normally it works out ok with the 'normal' setting but there is some catch > here. The size of the radical symbols is determine by > > -- RadicalVerticalGap = 50 > -- RadicalDisplayStyleVerticalGap = 175 > > (These are lucide values) and it happens that the second one if too large > which can give a bad threshold in our case. In cambria it's > > RadicalVerticalGap = 166 > RadicalDisplayStyleVerticalGap = 345 > > So a 1:2 ratio. If we use that for lucida it looks better, so > > lucida-opentype-math.lfg > > can become: > > local function FixRadicalDisplayStyleVerticalGap(value,target,original) > local o = original.mathparameters.RadicalVerticalGap -- 50 > return 2 * o * target.parameters.factor > end > > return { > name = "lucida-opentype-math", > version = "1.00", > comment = "Goodies that complement lucida opentype.", > author = "Hans Hagen", > copyright = "ConTeXt development team", > mathematics = { > parameters = { > RadicalDisplayStyleVerticalGap = > FixRadicalDisplayStyleVerticalGap, > }, > alternates = { > italic = { feature = 'ss01', value = 1, comment = > "Mathematical Alternative Lowercase Italic" }, > arrow= { feature = 'ss02', value = 1, comment = > "Mathematical Alternative Smaller Arrows" }, > operator = { feature = 'ss03', value = 1, comment = > "Mathematical Alternative Smaller Operators" }, > calligraphic = { feature = 'ss04', value = 1, comment = > "Mathematical Alternative Calligraphic Characters" }, > zero = { feature = 'ss05', value = 1, comment = > "Mathematical Alternative Zero" }, > partial = { feature = 'ss20', value = 1, comment = > "Mathematical Alternative Upright Partial Differential" }, > }, > }, > } > > It's sort of a font property: the more sizes the better and sometimes you're > simply hit by the threshold not suiting your case. > > > Hans > > - > Hans Hagen | PRAGMA ADE > Ridderstraat 27 | 8061 GH Hasselt | The Netherlands >tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl > - > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : http://contextgarden.net > ___ Hans, many thanks for your explanation, it is really appreciated when you take your time to do this! I updated my local lucida-opentype-math.lfg and indeed it works like charm. I think the uncramped version I get now looks better than what I forced with the temporary solution that I did not understand. /Mikael ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] mathradical defaults to "normal", should it perhaps be "default"?
On 6/7/2017 4:50 PM, Mikael P. Sundqvist wrote: On Mon, Jun 5, 2017 at 10:24 AM, Mikael P. Sundqvist wrote: Hi, this might be a matter of taste. look at the output of (attached). In my opinion the first square root is to "high", while it looks better on the second line. From setup-en.pdf it looks like the default of \setupmathradical is set to normal (and not default). I don't understand what normal should mean, but I think the alternative=default looks better. (The lucida fonts are loaded in this example, since the effect is more clear for them). Ok, this is the story -- radicals (roots) are rather special and have some hard coded properties (like always scriptscript in the degree) -- \over (and friends) that are used in \frac (which by the way can be configured in many ways) has the danger of getting the wrong style as side effect of parsing (math list construction) and processing -- in context we want to support color etc for noth in a consistent way as well as style control (important in educational math) Normally it works out ok with the 'normal' setting but there is some catch here. The size of the radical symbols is determine by -- RadicalVerticalGap = 50 -- RadicalDisplayStyleVerticalGap = 175 (These are lucide values) and it happens that the second one if too large which can give a bad threshold in our case. In cambria it's RadicalVerticalGap = 166 RadicalDisplayStyleVerticalGap = 345 So a 1:2 ratio. If we use that for lucida it looks better, so lucida-opentype-math.lfg can become: local function FixRadicalDisplayStyleVerticalGap(value,target,original) local o = original.mathparameters.RadicalVerticalGap -- 50 return 2 * o * target.parameters.factor end return { name = "lucida-opentype-math", version = "1.00", comment = "Goodies that complement lucida opentype.", author = "Hans Hagen", copyright = "ConTeXt development team", mathematics = { parameters = { RadicalDisplayStyleVerticalGap = FixRadicalDisplayStyleVerticalGap, }, alternates = { italic = { feature = 'ss01', value = 1, comment = "Mathematical Alternative Lowercase Italic" }, arrow= { feature = 'ss02', value = 1, comment = "Mathematical Alternative Smaller Arrows" }, operator = { feature = 'ss03', value = 1, comment = "Mathematical Alternative Smaller Operators" }, calligraphic = { feature = 'ss04', value = 1, comment = "Mathematical Alternative Calligraphic Characters" }, zero = { feature = 'ss05', value = 1, comment = "Mathematical Alternative Zero" }, partial = { feature = 'ss20', value = 1, comment = "Mathematical Alternative Upright Partial Differential" }, }, }, } It's sort of a font property: the more sizes the better and sometimes you're simply hit by the threshold not suiting your case. Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Change kerning between math characters (prime and left parenthesis)
On Fri, Jun 2, 2017 at 4:24 PM, Hans Hagen wrote: > On 6/2/2017 10:59 AM, Mikael P. Sundqvist wrote: >> >> Hi! >> >> Now that the bug with primes is fixed in ConTeXt, I wonder if there is >> a way to change the kerning between certain characters in mathematics >> (in case one is not happy with the output from the font)? After >> reading in fonts-mkiv.pdf this is what I came up with: > > > you can also play withj: > > return { > name = "cambria-math", > mathematics = { >kerns = { > [0x1D453] = { > force = true, > topright = { > { > kern = 1000, > }, > }, > bottomright = { > { > kern = 1000, > }, > }, > }, > }, > }, > } > > currently you need to enable this: > > \enabledirectives[fontgoodies.mathkerning] > > keep in mind that some cambria (not all) have such staircase kerns which is > why force is needed in order to overload > >> \startluacode >> fonts.handlers.otf.addfeature { >> name = "kerntest", >> type = "kern", >> data = { >> [0x61] = { [0x62] = -150 }, -- a and b in text >> [0x1d44e] = { [0x1d44f] = -150 }, -- mathematical italic small a and b >> [0x02032] = { [0x00028] = -150 }, -- prime and left parenthesis >> } >> } >> \stopluacode >> >> \definefontfeature[kerntest][kerntest=yes] >> >> \definefontfamily[lucidaopentype][rm][Lucida Bright OT] >> \definefontfamily[lucidaopentype][mm][Lucida Bright Math OT] >> >> \setupbodyfont[lucidaopentype,10pt] >> >> >> \startTEXpage[offset=3pt] >> abba $abba f'(x)$ >> >> \addff{kerntest} >> >> abba $abba f'(x)$ >> >> I prefer $f'\mkern-3mu(x)$ >> \stopTEXpage >> >> The output is attached as a png file. As you see the kerning works as >> expected in text mode, but not at all in math mode, even not for the a >> and b (which I hope I entered correctly). >> >> Something like the third line is what I'm after, but not having to use >> \mkern in all places. Is it possible? >> >> /Mikael >> >> PS: This is a cross post of the question >> https://tex.stackexchange.com/q/372857/52406, where I got the >> suggestion to ask on the list. >> >> >> >> >> ___ >> If your question is of interest to others as well, please add an entry to >> the Wiki! >> >> maillist : ntg-context@ntg.nl / >> http://www.ntg.nl/mailman/listinfo/ntg-context >> webpage : http://www.pragma-ade.nl / http://context.aanhet.net >> archive : https://bitbucket.org/phg/context-mirror/commits/ >> wiki : http://contextgarden.net >> >> ___ >> > > > -- > > - > Hans Hagen | PRAGMA ADE > Ridderstraat 27 | 8061 GH Hasselt | The Netherlands >tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl > - > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : http://contextgarden.net > ___ Thank you Hans, that works. Is there also a similar way to use the "kernpairs" instead of "kerns"? I get no effect, even after adding force = true and \enabledirectives[fontgoodies.mathkerning]. /Mikael ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Change kerning between math characters (prime and left parenthesis)
On 6/2/2017 10:59 AM, Mikael P. Sundqvist wrote: Hi! Now that the bug with primes is fixed in ConTeXt, I wonder if there is a way to change the kerning between certain characters in mathematics (in case one is not happy with the output from the font)? After reading in fonts-mkiv.pdf this is what I came up with: you can also play withj: return { name = "cambria-math", mathematics = { kerns = { [0x1D453] = { force = true, topright = { { kern = 1000, }, }, bottomright = { { kern = 1000, }, }, }, }, }, } currently you need to enable this: \enabledirectives[fontgoodies.mathkerning] keep in mind that some cambria (not all) have such staircase kerns which is why force is needed in order to overload \startluacode fonts.handlers.otf.addfeature { name = "kerntest", type = "kern", data = { [0x61] = { [0x62] = -150 }, -- a and b in text [0x1d44e] = { [0x1d44f] = -150 }, -- mathematical italic small a and b [0x02032] = { [0x00028] = -150 }, -- prime and left parenthesis } } \stopluacode \definefontfeature[kerntest][kerntest=yes] \definefontfamily[lucidaopentype][rm][Lucida Bright OT] \definefontfamily[lucidaopentype][mm][Lucida Bright Math OT] \setupbodyfont[lucidaopentype,10pt] \startTEXpage[offset=3pt] abba $abba f'(x)$ \addff{kerntest} abba $abba f'(x)$ I prefer $f'\mkern-3mu(x)$ \stopTEXpage The output is attached as a png file. As you see the kerning works as expected in text mode, but not at all in math mode, even not for the a and b (which I hope I entered correctly). Something like the third line is what I'm after, but not having to use \mkern in all places. Is it possible? /Mikael PS: This is a cross post of the question https://tex.stackexchange.com/q/372857/52406, where I got the suggestion to ask on the list. ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___ -- - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Change kerning between math characters (prime and left parenthesis)
On Fri, Jun 2, 2017 at 1:39 PM, Mikael P. Sundqvist wrote: > On Fri, Jun 2, 2017 at 11:39 AM, Mathias Schickel > wrote: >> Hi Mikael, >> >> math fonts are a bit different from text fonts. This means that you need >> special methods to influence them. Because I once had a similar concern like >> you I asked Hans to implement a way to influence kerning in math fonts >> between certain glyphs. I have attached an lfg-file that shows how to use it. >> >> To enable a goodie file like the one attached you have to define your >> typescript like >> >> \starttypescript [\s!math][cambriaown][\s!all] >> \loadfontgoodies[cambriaown-math] >> \definefontsynonym[\s!MathRoman][Cambria-Math] >> >> [\s!features={\s!math\mathsizesuffix},\s!designsize=\s!auto,\s!goodies=cambriaown-math] >> \stoptypescript >> >> I hope this helps! >> >> Best >> Mathias >> >> >> >> >> >>> Am 02.06.2017 um 10:59 schrieb Mikael P. Sundqvist : >>> >>> Hi! >>> >>> Now that the bug with primes is fixed in ConTeXt, I wonder if there is >>> a way to change the kerning between certain characters in mathematics >>> (in case one is not happy with the output from the font)? After >>> reading in fonts-mkiv.pdf this is what I came up with: >>> >>> \startluacode >>> fonts.handlers.otf.addfeature { >>> name = "kerntest", >>> type = "kern", >>> data = { >>> [0x61] = { [0x62] = -150 }, -- a and b in text >>> [0x1d44e] = { [0x1d44f] = -150 }, -- mathematical italic small a and b >>> [0x02032] = { [0x00028] = -150 }, -- prime and left parenthesis >>> } >>> } >>> \stopluacode >>> >>> \definefontfeature[kerntest][kerntest=yes] >>> >>> \definefontfamily[lucidaopentype][rm][Lucida Bright OT] >>> \definefontfamily[lucidaopentype][mm][Lucida Bright Math OT] >>> >>> \setupbodyfont[lucidaopentype,10pt] >>> >>> >>> \startTEXpage[offset=3pt] >>> abba $abba f'(x)$ >>> >>> \addff{kerntest} >>> >>> abba $abba f'(x)$ >>> >>> I prefer $f'\mkern-3mu(x)$ >>> \stopTEXpage >>> >>> The output is attached as a png file. As you see the kerning works as >>> expected in text mode, but not at all in math mode, even not for the a >>> and b (which I hope I entered correctly). >>> >>> Something like the third line is what I'm after, but not having to use >>> \mkern in all places. Is it possible? >>> >>> /Mikael >>> >>> PS: This is a cross post of the question >>> https://tex.stackexchange.com/q/372857/52406, where I got the >>> suggestion to ask on the list. >>> ___ >>> If your question is of interest to others as well, please add an entry to >>> the Wiki! >>> >>> maillist : ntg-context@ntg.nl / >>> http://www.ntg.nl/mailman/listinfo/ntg-context >>> webpage : http://www.pragma-ade.nl / http://context.aanhet.net >>> archive : https://bitbucket.org/phg/context-mirror/commits/ >>> wiki : http://contextgarden.net >>> ___ >> >> >> ___ >> If your question is of interest to others as well, please add an entry to >> the Wiki! >> >> maillist : ntg-context@ntg.nl / >> http://www.ntg.nl/mailman/listinfo/ntg-context >> webpage : http://www.pragma-ade.nl / http://context.aanhet.net >> archive : https://bitbucket.org/phg/context-mirror/commits/ >> wiki : http://contextgarden.net >> ___ > > Thank you very much for your reply, Mathias! > > I'm not sure I get it, though. I find that there is already a file > lucida-opentype-math.lfg in the distribution. > > Just experimenting, I added to this file an entry with kernpairs (see > below), to see if I could make a change with a and b (if I cannot > manage that, I don't see how I could get the prime and parenthesis > case to work). > > %%% start of my new lucida-opentype-math.lfg > - kern_250 = { bottomright = { { kern = -250 } }, force = true } > > return { > name = "lucida-opentype-math", >
Re: [NTG-context] Change kerning between math characters (prime and left parenthesis)
On Fri, Jun 2, 2017 at 11:39 AM, Mathias Schickel wrote: > Hi Mikael, > > math fonts are a bit different from text fonts. This means that you need > special methods to influence them. Because I once had a similar concern like > you I asked Hans to implement a way to influence kerning in math fonts > between certain glyphs. I have attached an lfg-file that shows how to use it. > > To enable a goodie file like the one attached you have to define your > typescript like > > \starttypescript [\s!math][cambriaown][\s!all] > \loadfontgoodies[cambriaown-math] > \definefontsynonym[\s!MathRoman][Cambria-Math] > > [\s!features={\s!math\mathsizesuffix},\s!designsize=\s!auto,\s!goodies=cambriaown-math] > \stoptypescript > > I hope this helps! > > Best > Mathias > > > > > >> Am 02.06.2017 um 10:59 schrieb Mikael P. Sundqvist : >> >> Hi! >> >> Now that the bug with primes is fixed in ConTeXt, I wonder if there is >> a way to change the kerning between certain characters in mathematics >> (in case one is not happy with the output from the font)? After >> reading in fonts-mkiv.pdf this is what I came up with: >> >> \startluacode >> fonts.handlers.otf.addfeature { >> name = "kerntest", >> type = "kern", >> data = { >> [0x61] = { [0x62] = -150 }, -- a and b in text >> [0x1d44e] = { [0x1d44f] = -150 }, -- mathematical italic small a and b >> [0x02032] = { [0x00028] = -150 }, -- prime and left parenthesis >> } >> } >> \stopluacode >> >> \definefontfeature[kerntest][kerntest=yes] >> >> \definefontfamily[lucidaopentype][rm][Lucida Bright OT] >> \definefontfamily[lucidaopentype][mm][Lucida Bright Math OT] >> >> \setupbodyfont[lucidaopentype,10pt] >> >> >> \startTEXpage[offset=3pt] >> abba $abba f'(x)$ >> >> \addff{kerntest} >> >> abba $abba f'(x)$ >> >> I prefer $f'\mkern-3mu(x)$ >> \stopTEXpage >> >> The output is attached as a png file. As you see the kerning works as >> expected in text mode, but not at all in math mode, even not for the a >> and b (which I hope I entered correctly). >> >> Something like the third line is what I'm after, but not having to use >> \mkern in all places. Is it possible? >> >> /Mikael >> >> PS: This is a cross post of the question >> https://tex.stackexchange.com/q/372857/52406, where I got the >> suggestion to ask on the list. >> ___ >> If your question is of interest to others as well, please add an entry to >> the Wiki! >> >> maillist : ntg-context@ntg.nl / >> http://www.ntg.nl/mailman/listinfo/ntg-context >> webpage : http://www.pragma-ade.nl / http://context.aanhet.net >> archive : https://bitbucket.org/phg/context-mirror/commits/ >> wiki : http://contextgarden.net >> ___ > > > ___ > If your question is of interest to others as well, please add an entry to the > Wiki! > > maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : http://contextgarden.net > ___ Thank you very much for your reply, Mathias! I'm not sure I get it, though. I find that there is already a file lucida-opentype-math.lfg in the distribution. Just experimenting, I added to this file an entry with kernpairs (see below), to see if I could make a change with a and b (if I cannot manage that, I don't see how I could get the prime and parenthesis case to work). %%% start of my new lucida-opentype-math.lfg - kern_250 = { bottomright = { { kern = -250 } }, force = true } return { name = "lucida-opentype-math", version = "1.00", comment = "Goodies that complement lucida opentype.", author = "Hans Hagen", copyright = "ConTeXt development team", mathematics = { alternates = { italic = { feature = 'ss01', value = 1, comment = "Mathematical Alternative Lowercase Italic" }, arrow= { feature = 'ss02', value = 1, comment = "Mathematical Alternative Smaller Arrows" }, operator = { feature = 'ss03
Re: [NTG-context] Change kerning between math characters (prime and left parenthesis)
Hi Mikael, math fonts are a bit different from text fonts. This means that you need special methods to influence them. Because I once had a similar concern like you I asked Hans to implement a way to influence kerning in math fonts between certain glyphs. I have attached an lfg-file that shows how to use it. To enable a goodie file like the one attached you have to define your typescript like \starttypescript [\s!math][cambriaown][\s!all] \loadfontgoodies[cambriaown-math] \definefontsynonym[\s!MathRoman][Cambria-Math] [\s!features={\s!math\mathsizesuffix},\s!designsize=\s!auto,\s!goodies=cambriaown-math] \stoptypescript I hope this helps! Best Mathias cambriaown-math.lfg Description: Binary data > Am 02.06.2017 um 10:59 schrieb Mikael P. Sundqvist : > > Hi! > > Now that the bug with primes is fixed in ConTeXt, I wonder if there is > a way to change the kerning between certain characters in mathematics > (in case one is not happy with the output from the font)? After > reading in fonts-mkiv.pdf this is what I came up with: > > \startluacode > fonts.handlers.otf.addfeature { > name = "kerntest", > type = "kern", > data = { > [0x61] = { [0x62] = -150 }, -- a and b in text > [0x1d44e] = { [0x1d44f] = -150 }, -- mathematical italic small a and b > [0x02032] = { [0x00028] = -150 }, -- prime and left parenthesis > } > } > \stopluacode > > \definefontfeature[kerntest][kerntest=yes] > > \definefontfamily[lucidaopentype][rm][Lucida Bright OT] > \definefontfamily[lucidaopentype][mm][Lucida Bright Math OT] > > \setupbodyfont[lucidaopentype,10pt] > > > \startTEXpage[offset=3pt] > abba $abba f'(x)$ > > \addff{kerntest} > > abba $abba f'(x)$ > > I prefer $f'\mkern-3mu(x)$ > \stopTEXpage > > The output is attached as a png file. As you see the kerning works as > expected in text mode, but not at all in math mode, even not for the a > and b (which I hope I entered correctly). > > Something like the third line is what I'm after, but not having to use > \mkern in all places. Is it possible? > > /Mikael > > PS: This is a cross post of the question > https://tex.stackexchange.com/q/372857/52406, where I got the > suggestion to ask on the list. > ___ > If your question is of interest to others as well, please add an entry to the > Wiki! > > maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : http://contextgarden.net > ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Change kerning between math characters (prime and left parenthesis)
Hi! Now that the bug with primes is fixed in ConTeXt, I wonder if there is a way to change the kerning between certain characters in mathematics (in case one is not happy with the output from the font)? After reading in fonts-mkiv.pdf this is what I came up with: \startluacode fonts.handlers.otf.addfeature { name = "kerntest", type = "kern", data = { [0x61] = { [0x62] = -150 }, -- a and b in text [0x1d44e] = { [0x1d44f] = -150 }, -- mathematical italic small a and b [0x02032] = { [0x00028] = -150 }, -- prime and left parenthesis } } \stopluacode \definefontfeature[kerntest][kerntest=yes] \definefontfamily[lucidaopentype][rm][Lucida Bright OT] \definefontfamily[lucidaopentype][mm][Lucida Bright Math OT] \setupbodyfont[lucidaopentype,10pt] \startTEXpage[offset=3pt] abba $abba f'(x)$ \addff{kerntest} abba $abba f'(x)$ I prefer $f'\mkern-3mu(x)$ \stopTEXpage The output is attached as a png file. As you see the kerning works as expected in text mode, but not at all in math mode, even not for the a and b (which I hope I entered correctly). Something like the third line is what I'm after, but not having to use \mkern in all places. Is it possible? /Mikael PS: This is a cross post of the question https://tex.stackexchange.com/q/372857/52406, where I got the suggestion to ask on the list. ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___