[NTG-context] long caption in 2-page spread
The following excellent solution (see below) to a 2-page spread of an image was given me by Hans (I had been completely unaware of the command \startspread. It appears to be recent and undocumented, but it certainly simplifies matters). But in my case the title is a lengthy sentence, rather than the 4-word 'This is a cow'. And even though I have been able to split the line, e.g. title={this is my very, very, very,\\ very etc. etc. long title}, what happens is that part of the caption still appears on the right-hand page of the spread. Is there a way that I can limit the appearance of the caption to just one (the left-hand) page? In other words, so the figure is spread but not the caption? Or alternatively, have the caption neatly split across the two pages with appropriate space inbetween? I tried various combinations, including an \hfill halfway through the title, but to no avail. Perhaps this is asking too much, but there may be a workaround. Julian \startpostponing \setuppagenumbering[state=stop] \startspread \startplacefigure[location=here,title={This is a cow!}] \externalfigure[cow.pdf][height=\textheight]% \stopplacefigure \stopspread \setuppagenumbering[state=start] \stoppostponing ___ 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] Vertical lines in matrices
Hi Aditya, Ideally I would like to be able to typeset blocks in block matrices visually separated, as for instance is done in https://tex.stackexchange.com/questions/23853/specific-blockmatrices/23857 My current solution for just vertical lines below has the drawback that it uses the standard delimiter \vert for the vertical line(s), which is too thick for my taste. Thanks, Matthias \definemathmatrix [bvmatrix] [left={\left(\,},right={\ \right|}] \definemathmatrix [rbmatrix] [left={\left.\,},right={\,\right)}] \starttext \startformula \startbvmatrix \NC 0 \NC 0\NC 0 \NR \NC 1 \NC 0\NC 1 \NR \HL \NC 1 \NC 0\NC 1 \NR \stopbvmatrix \startrbmatrix \NC 0 \NR \NC 1 \NR \HL \NC 1 \NR \stoprbmatrix \stopformula \stoptext > On May 4, 2020, at 13:00, Aditya Mahajan wrote: > > On Mon, 4 May 2020, Weber, Matthias wrote: > >> I was aware of this. While there is no solution that adds vertical lines >> into matrices, > > It should not be too difficult to support "proper" vertical and horizontal > lines. It should be possible to just add solid lines relatively easily. With > dashed and other forms of lines, it is more a question of finding the right > user-interface than anything else. > > Can you give more details of the features and visual output that you are > looking for? > > 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 > ___ ___ 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 do I add cyrillic to my typescript/document?
On 5/4/20 6:38 PM, Gerben Wierda wrote: > [...] > The above works (including using macOS Helvetica as the font for > cyrillic). Thank you. Hi Gerben, glad to read it worked. > I have no idea why (earlier I got the typescript suggestion for my > fonts management, but this uses another approach). Is it the case that > the ‘family’ and ’typescript’ approaches don’t really mix? The above is > a lot simpler than that what I had and it works fine. I don’t know how to use typescripts and the approach I suggested is the only one I know to deal with fonts in ConTeXt. \definefontfamily (and \definefallbackfamily) were created to avoid using typescripts in the vast majority of cases. > Any reason to leave these commented? And does uncommenting is plan > TeX-uncommenting, so only the % goes away? Makes me wonder what ‘~’ means. > >> %~ tf=style:light, They are just an option. The tilde (~) is added after the percent sign (%), because “Geany” (the text editor I use) adds it after the comment sign in different programming languages. It has no special meaning. > What I try to do is to have english as the default (and fallback) > language and Optima as the default font, but there may be snippets in > other languages which should be typeset in a font that can handle > cyrillic. Helvetica is an option. So is dejavu. Now I get it: a fallback typeface for Russian and the main typeface as Optima. This might read the following way: \setuplanguage[en][patterns={en, ru}] \definefallbackfamily [mainface] [rm] [Helvetica] [preset=range:cyrillic, force=yes, rscale=0.9] \definefontfamily [mainface] [rm] [Optima] \setupbodyfont[mainface] The first command loads both English and Russian hyphenation patterns in English, so that you don’t have to bother to mark the texts that use the Cyrillic alphabet (although all hyphenation of Cyrillic will be according the Russian rules). The second command defines the fallback family. It has four option groups. 1. The first group sets up the name to be used in ConTeXt (mainly in \setupbodyfont and \switchtobodyfont). 2. The second group specifies which kind of typeface is: serif, sans-serif, typewriter, math and others. Of course, this isn’t a declaration of what kind of font the selected one is, but how ConTeXt will handle it. So, if your document is sans-serif only, it is safe to use "[rm]" with sans-serif fonts as above. 3. The third group specifies the font name as specified in your OS. This selects it. 4. The fourth group specifies different options. Here for the fallback font, I specify: a. Range: for which Unicode blocks (alphabets) will the font be used. You can use "range=cyrillic", but it is safer to use "preset=range:cyrillic" (this avoids specifying "range={cyrillicextendeda, cyrillicextendedb, cyrillicsupplement}"). b. Force: it is important to set it up to "yes", since otherwise if the main font (Optima in this case) has any glyph for the Cyrillic block, it would use that glyph in Optima, mixing it with the other ones from the fallback font. In my personal experience, this looks crappy. c. Relative scale to the main font: increase or decrease the fallback font to match similar x-height with the main font. In this case, Helvetica has a higher x-height that Optima, so I decreased it. All the previous options where related to \definefallbackfamily. \definefontfamily has also three option groups, which are the same that the ones explained for \definefallbackfamily. The values for the first and second groups should be the same, values for the third group should differ. Otherwise, glyph substition won’t take place (either the font family or typeface won’t match, or the fallback font won’t be actually a different one). > I still am totally in the dark how this works and what made the > earlier setup find Optima but not find Helvetica. I hope it is clear now: the fallback mechanism for your setup should read different than the one I provided. I think it could be better for you to use \definefallbackfamily and \definefontfamily. It is way simpler. > And I’m curious why this adaptation doesn’t work: > > \definefallbackfamily >[abc] >[ss] >[dejavu] As explained above, the third option group should contain the font name (as your OS would display it, not as ConTeXt names it [probably, in a typescript]). So, the value should read "[DejaVu Sans]". > Anyway, I can go on, not wiser but helped further. Thanks again. Please, ask what you don’t understand. And if you need help with your font code, post it on the list and we may help you. Sorry if the message contains errors (it’s too late for me to write on these topics). 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 /
Re: [NTG-context] Changing the font size in an environment changes the behavior of a macro
Hi Aditya, Thank you for your help ; this also works with pgfplots but the body of the text must be with the same font. I always use the pagella font but it doesn't allow you to use \mathscript{} that's why I use this macro. Are there other free fonts that allow you to do this ? Fabrice \usemodule[pgfplots] \pgfplotsset{compat=newest} \usebodyfont[xitsbidi] \define[1]\cscript{\start\m{{\mathscript{#1}}}\stop} \startmidaligned \define[1]\cscript{\start\m{{\mathscript{#1}}}\stop} \starttikzpicture \startaxis \addplot {x}; \node[above left] at (2,2) {\cscript{C}}; \stopaxis \stoptikzpicture \stopmidaligned \blank \startmidaligned \switchtobodyfont[9pt] \starttikzpicture \startaxis \addplot {x}; \node[above left] at (2,2) {\cscript{C}}; \stopaxis \stoptikzpicture \stopmidaligned \stoptext Le lun. 4 mai 2020 à 19:18, Aditya Mahajan a écrit : > On Mon, 4 May 2020, Fabrice Couvreur wrote: > > > Hi, > > Sorry to insist but I cannot fix this problem. > > Thanks for any help. > > I don't know the answer, but here is a simpler example without pgfplot > which fails (different calligraphic C's): > > > > \define[1]\cscript{\start\switchtobodyfont[xitsbidi]\m{{\mathscript{#1}}}\stop} > > \starttext > \startTEXpage[offset=2mm] > \cscript{C} > \start >\switchtobodyfont[9pt] >\cscript{C} > \stop > \stopTEXpage > \stoptext > > And here is a version with a minor change that works (same calligraphic > C's)! > > \usebodyfont[xitsbidi] > > \define[1]\cscript{\start\m{{\mathscript{#1}}}\stop} > > \starttext > \startTEXpage[offset=2mm] > \cscript{C} > \start >\switchtobodyfont[9pt] >\cscript{C} > \stop > \stopTEXpage > \stoptext > > 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 > > ___ > ___ 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] Three-deep itemize fails on LMTX
On 5/4/2020 17:13, Wolfgang Schuster wrote: Rik Kabel schrieb am 04.05.2020 um 23:07: List, The following example works with MkIV latest, but fails with LMTX latest (Win10 x64). The complaint is ! Missing math style, treated as \displaystyle. \starttext \startitemize \item Level 1 first \startitemize \item Level 2 first \startitemize \item Level 3 first \stopitemize \stopitemize \stopitemize \stoptext The culprit is the third level of itemize -- without that it is clean on both engines. I would appreciate knowing if other folks have the same problem, and if so, if there is a workaround until a fix can be posted. It's a math problem. \starttext \m{} \stoptext Wolfgang Better MWE, still the same problem. Thank you for the confirmation. -- 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] Three-deep itemize fails on LMTX
Rik Kabel schrieb am 04.05.2020 um 23:07: List, The following example works with MkIV latest, but fails with LMTX latest (Win10 x64). The complaint is ! Missing math style, treated as \displaystyle. \starttext \startitemize \item Level 1 first \startitemize \item Level 2 first \startitemize \item Level 3 first \stopitemize \stopitemize \stopitemize \stoptext The culprit is the third level of itemize -- without that it is clean on both engines. I would appreciate knowing if other folks have the same problem, and if so, if there is a workaround until a fix can be posted. It's a math problem. \starttext \m{} \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] Three-deep itemize fails on LMTX
List, The following example works with MkIV latest, but fails with LMTX latest (Win10 x64). The complaint is ! Missing math style, treated as \displaystyle. \starttext \startitemize \item Level 1 first \startitemize \item Level 2 first \startitemize \item Level 3 first \stopitemize \stopitemize \stopitemize \stoptext The culprit is the third level of itemize -- without that it is clean on both engines. I would appreciate knowing if other folks have the same problem, and if so, if there is a workaround until a fix can be posted. -- 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] Blank page added after pagecolumns
After continuing to look into this a bit, I noticed that a similar issue involving the insertion of a blank page after a columnset environment has been discussed on the mailing list in the thread "Blank page inserted when text reaches column's end" (dated 08 Dec 2019). In that thread, a proposed solution was to redefine the \page_grd_stop macro found in page-cst.mkiv as follows: ``` \unprotect \def\page_grd_stop{% \endgraf % needed, else wrong vsize in one par case \vfill % otherwise weird \placenotes[endnotes] \page_grd_command_set_vsize % needed \penalty\c_page_otr_eject_penalty %\page_grd_command_flush_page \page_otr_fill_and_eject_page \page_grd_command_set_vsize % why here \egroup \page_otr_command_set_vsize \page_otr_command_set_hsize } \protect ``` Unfortunately, this approach was found to have potential issues in that thread, and it does not fix the problem with pagecolumns in my MWE. Are pagecolumns commands aliased to pagegrid commands like columnset commands are, or are they defined somewhere else? I checked page-col.mkiv, but it seems to be too short to be the file that defines pagecolumns behavior. Joey On Sat, May 2, 2020 at 11:46 AM Joey McCollum wrote: > I recently found the pagecolumns manual ( > http://www.pragma-ade.com/general/manuals/pagecolumns.pdf), and in > several of the examples (including those for side floats and footnotes), > the addition of a blank page after the end of the pagecolumns environment > also seems to occur. So when the manual says, "We always start at a new > page and end on a new one," does it mean that this is a feature of > pagecolumns? And if so, is there any way to disable it? I have no problem > with a page break after the end of the pagecolumns environment, but an > empty page added after the break seems unnecessary. I checked for a wiki > page on the \definepagecolumns command to get more information on its > accepted inputs, but there doesn't appear to be a page for this command. > > Joey > > On Tue, Apr 28, 2020 at 1:40 PM Joey McCollum > wrote: > >> I am typesetting a document using pagecolumns to ensure that my footnotes >> are set ragged-bottom in columns. I have observed some unexpected behavior >> whenever the last column on a page is left incomplete: a blank page is >> added at the end of the document. A minimal working example follows: >> >> ``` >> >> \starttext >> >> \startpagecolumns[n=2] >> >> \dorecurse{3}{\par\input zapf} >> >> \stoppagecolumns >> >> \stoptext >> ``` >> >> I typeset this using ConTeXt version 2020.03.10, as released with TeXLive >> 2020. Notably, if \dorecurse{3} is changed to \dorecurse{2} or >> \dorecurse{6} (so that the text ends in the first column of a page), then >> there is no problem. I have tried to fix this by specifying page=no in the >> \startpagecolumns arguments, but it did not change anything. Is there >> something else I am missing? >> >> Thank you, >> >> Joey >> > ___ 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] Shift tabulate into margin and center
Hi all, I’ve a page layout with a broad left margin. I’d like to create frames in the text which utilize the margin and the typearea with centered contents. I managed to do this with the following code, but I wonder if there is an easier and more elegant way to do this in ConTeXt, especially the centering of the tabulation. Cheers, Tim \startproduct test-tabulate \setuppapersize[B5] \setuplayout [backspace=13pc, leftmargin=8pc, leftmargindistance=1pc, width=24.5pc, rightmargin=0pc, %% topspace=4pc, header=0pc, height=49pc, footer=0pc, bottomdistance=2.5pc, bottom=1pc, location=middle] \define\fullwidth{\dimexpr(\leftmargindistance+\leftmarginwidth+\textwidth)} \section{First} \subsection{First first} \input tufte \setupnarrower[left=-9pc] \startnarrower[left] \startframedtext[frame=off,topframe=on,bottomframe=on,align=middle,width=\fullwidth] The whole frame should be shifted to the left. As the text, this table should centered in the box. \placefigure[none,force]{} \starttabulate[|l|r|] \NC 0 \NC 1 \NR \NC 2 \NC 3 \NR \NC 4 \NC 5 \NR \NC 6 \NC 7 \NR \NC 8 \NC 9 \NR \stoptabulate \startformula E=mc^2 \stopformula \stopframedtext \stopnarrower \input tufte \stopproduct test-tabulate.pdf Description: Binary data ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / 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] Changing the font size in an environment changes the behavior of a macro
On Mon, 4 May 2020, Fabrice Couvreur wrote: Hi, Sorry to insist but I cannot fix this problem. Thanks for any help. I don't know the answer, but here is a simpler example without pgfplot which fails (different calligraphic C's): \define[1]\cscript{\start\switchtobodyfont[xitsbidi]\m{{\mathscript{#1}}}\stop} \starttext \startTEXpage[offset=2mm] \cscript{C} \start \switchtobodyfont[9pt] \cscript{C} \stop \stopTEXpage \stoptext And here is a version with a minor change that works (same calligraphic C's)! \usebodyfont[xitsbidi] \define[1]\cscript{\start\m{{\mathscript{#1}}}\stop} \starttext \startTEXpage[offset=2mm] \cscript{C} \start \switchtobodyfont[9pt] \cscript{C} \stop \stopTEXpage \stoptext 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] Placing number in \sqrt
On Mon, 4 May 2020, cont...@vivaldi.net wrote: Hello Aditya, On 2020-05-04 10:42, Aditya Mahajan wrote: On Mon, 4 May 2020, Hans Hagen wrote: On 5/4/2020 8:47 AM, cont...@vivaldi.net wrote: Hello, compare placing "3" in the following examples: \starttext $\sqrt[3]{5}$ % (1) \par $\sqrt[3~]{5}$ % (2) \stoptext In the first case, the "3" is placed naturally by ConTeXt and placed more in the centre of "V" part of the square sign. In the second example, the "3" is shifted manually by adding "~" and the final placement seems to me a bit better. What is your opinion - is the case (1) OK/intended and user should avoid any manual shifting? Or manual shifting is OK? Or is there a way to affect this placement globally in ConTeXt, e.g. setting an internal variable? If we can come up with a proper name for a parameter we can make it a setting. One of these things that Aditya and I will to discuss when we have time and are in math mood. (There is much more in math we could control if needed, but often in the end that control is not that much needed at all.) As an example, see this question about customized square root signed which was asked on TeX.SE a few years ago: https://tex.stackexchange.com/a/406680/323 I tried the code from the link above, but: - I had change some macro names: \mpvar -> \MPvar, \startuniquempgraphic -> \startuniqueMPgraphic and some others, - there is still an error I'm not able to fix (see attachements). I'll look into that.. Maybe your code is intented for Ctx LMTX, whilst I'm still working with Ctx MkIV (which uses Lua 5.3; AFAIK, Lua 5.4 exists just in RC versions). No. This feature works with MkIV as well. I posted that code in 2017, much before LTMX was released. The feature is much older than 2017, IIRC. Similar interfaces exist for delimiters, accents, and other artifact. 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] Vertical lines in matrices
On Mon, 4 May 2020, Weber, Matthias wrote: I was aware of this. While there is no solution that adds vertical lines into matrices, It should not be too difficult to support "proper" vertical and horizontal lines. It should be possible to just add solid lines relatively easily. With dashed and other forms of lines, it is more a question of finding the right user-interface than anything else. Can you give more details of the features and visual output that you are looking for? 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] Changing the font size in an environment changes the behavior of a macro
Hi, Sorry to insist but I cannot fix this problem. Thanks for any help. Fabrice Le sam. 25 avr. 2020 à 00:13, Fabrice Couvreur a écrit : > Hi, > This macro was written by Otared and it works well unless I change the > size of the font (see the second graph). > How to correct this problem ? > Thanks for your help. > Fabrice > > begin example > > \usemodule[pgfplots] > \pgfplotsset{compat=newest} > > \define[2]\cscript{\start\switchtobodyfont[xitsbidi]\m{{\mathscript{#1}}_{#2}}\stop} > > \starttext > > \startmidaligned > \starttikzpicture > \startaxis >\addplot {x}; >\node[above left] at (2,2) {\cscript{C}{f}}; >\stopaxis > \stoptikzpicture > \stopmidaligned > \blank > \startmidaligned > \switchtobodyfont[9pt] > \starttikzpicture > \startaxis >\addplot {x}; >\node[above left] at (2,2) {\cscript{C}{f}}; >\stopaxis > \stoptikzpicture > \stopmidaligned > > \stoptext > > end example > ___ 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 do I add cyrillic to my typescript/document?
On 4 May 2020, at 12:13, Pablo Rodriguez wrote: > > On 5/4/20 12:36 AM, Gerben Wierda wrote: >> [...] >> It could help if I would understand ConTeXt better. The link gives me a >> grammar for a command, but doesn’t tell me what to put in. >> >> I tried many, many different permutations, I tried everything I could >> find on ConTeXtgarden (but then, that also finds me stuff from 15 years >> ago that isn’t valid anymore), but no luck so far. > > Sorry for not explaining it better, Gerben. > > Let me know if the following sample works for you: > > \setuplanguage[en][patterns={en, ru}] > > \definefallbackfamily >[abc] >[ss] >[Helvetica] >[preset=range:cyrillic, > %~ tf=style:light, > %~ it=style:lightoblique, > %~ bf=style:regular, > %~ bi=style:oblique, > force=yes, > rscale=0.9] > > \definefontfamily [abc] [ss] [Optima] > > \setupbodyfont[abc] > > \starttext > \startTEXpage[offset=1em] > \doloopoverlist{\tf, \it, \bf, \bi}{ > \recursestring\hyphenatedword{Николаевич typography}\par} > \stopTEXpage > \stoptext > > It should hyphenate both English and Russian in all four fonts (regular, > italic, bold and bold italic). The above works (including using macOS Helvetica as the font for cyrillic). Thank you. I have no idea why (earlier I got the typescript suggestion for my fonts management, but this uses another approach). Is it the case that the ‘family’ and ’typescript’ approaches don’t really mix? The above is a lot simpler than that what I had and it works fine. Any reason to leave these commented? And does uncommenting is plan TeX-uncommenting, so only the % goes away? Makes me wonder what ‘~’ means. > %~ tf=style:light, > %~ it=style:lightoblique, > %~ bf=style:regular, > %~ bi=style:oblique, What I try to do is to have english as the default (and fallback) language and Optima as the default font, but there may be snippets in other languages which should be typeset in a font that can handle cyrillic. Helvetica is an option. So is dejavu. I still am totally in the dark how this works and what made the earlier setup find Optima but not find Helvetica. And I’m curious why this adaptation doesn’t work: \definefallbackfamily [abc] [ss] [dejavu] [preset=range:cyrillic, %~ tf=style:light, %~ it=style:lightoblique, %~ bf=style:regular, %~ bi=style:oblique, force=yes, rscale=0.9] Anyway, I can go on, not wiser but helped further. Thanks again. G > >> Which is weird because Optima.ttc is in the same directory and it is found. > > Aren’t Optima.ttc and Helvetica.ttc installed as typefaces on your macOS? > > This is relevant, since ConTeXt may have problems finding them when not > installed on the system (especially with the system I use). > > If the sample above doesn’t work, please provide the output of "locate > Helvetica.ttc". > >> But anyway, even if I could understand it, I can’t find anything useful >> (that is: something that works or makes me try something that works) >> about font fallbacks. Spending hours of looking (losing a lot of sleep) >> and then having to bother the list again is very frustrating. Why isn’t >> this straightforward? I am sorry, everybody is very helpful, but the >> frustration mounts again. > > If the sample above works, I think font management for your documents > may be easier to handle (or at least, the font code will be simpler). > > Don’t loose sleep when code is not working, ask here instead. I must > admit that not having access to a macOS computer (I needed the help of a > friend to test) makes everything a bit harder. But it isn’t impossible. > > BTW, I use "preset=range:cyrillic" instead of "range=cyrillic", since it > includes cyrillic, cyrillicextendeda, cyrillicextendedb and > cyrillicsupplement. > > I hope the sample above helps now, > > 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] --silent and so on
On 5/4/2020 3:19 PM, Taco Hoekwater wrote: On 4 May 2020, at 13:35, Thierry Horsin wrote: Hi everybody I am a current context user since now many years and in particular I use it with automatic compilation with a bash script detecting any modifications of the .tex file. In order for this to work I used with previous versions the --nonstopmode --batchmode --silent --noconsole options Now with the last version appears a single page pdf file with ERROR written on it. Is there a way to have something similar as before ? I am also eager to find a way to get rid of that ERROR page. i'll add a --nodummy switch to the context script (but keep in mind that when a file is open in a viewer that can confuse a viewer when there is an error) 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] Placing number in \sqrt
Hello Aditya, On 2020-05-04 10:42, Aditya Mahajan wrote: On Mon, 4 May 2020, Hans Hagen wrote: On 5/4/2020 8:47 AM, cont...@vivaldi.net wrote: Hello, compare placing "3" in the following examples: \starttext $\sqrt[3]{5}$ % (1) \par $\sqrt[3~]{5}$ % (2) \stoptext In the first case, the "3" is placed naturally by ConTeXt and placed more in the centre of "V" part of the square sign. In the second example, the "3" is shifted manually by adding "~" and the final placement seems to me a bit better. What is your opinion - is the case (1) OK/intended and user should avoid any manual shifting? Or manual shifting is OK? Or is there a way to affect this placement globally in ConTeXt, e.g. setting an internal variable? If we can come up with a proper name for a parameter we can make it a setting. One of these things that Aditya and I will to discuss when we have time and are in math mood. (There is much more in math we could control if needed, but often in the end that control is not that much needed at all.) As an example, see this question about customized square root signed which was asked on TeX.SE a few years ago: https://tex.stackexchange.com/a/406680/323 I tried the code from the link above, but: - I had change some macro names: \mpvar -> \MPvar, \startuniquempgraphic -> \startuniqueMPgraphic and some others, - there is still an error I'm not able to fix (see attachements). Maybe your code is intented for Ctx LMTX, whilst I'm still working with Ctx MkIV (which uses Lua 5.3; AFAIK, Lua 5.4 exists just in RC versions). But thank you anyway. Best regards, Lukas 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] Placing number in \sqrt
Hello Hans, On 2020-05-04 09:31, Hans Hagen wrote: On 5/4/2020 8:47 AM, cont...@vivaldi.net wrote: Hello, compare placing "3" in the following examples: \starttext $\sqrt[3]{5}$ % (1) \par $\sqrt[3~]{5}$ % (2) \stoptext In the first case, the "3" is placed naturally by ConTeXt and placed more in the centre of "V" part of the square sign. In the second example, the "3" is shifted manually by adding "~" and the final placement seems to me a bit better. What is your opinion - is the case (1) OK/intended and user should avoid any manual shifting? Or manual shifting is OK? Or is there a way to affect this placement globally in ConTeXt, e.g. setting an internal variable? The placement is driven by the font so kind of part of the design. There is a whole bunch of parameters that drives placement and there is one that deals with the spacing after the degree. Here are some examples. \starttext \def\R {\Umathradicaldegreeafter\textstyle0pt} \def\RR{\Umathradicaldegreeafter\textstyle\dimexpr \Umathradicaldegreeafter\textstyle+.1em\relax} \def\RRR{\frozen\Umathradicaldegreeafter\textstyle\dimexpr \Umathradicaldegreeafter\textstyle+.2em\relax} $\sqrt[3]{5} \RR\sqrt[3]{5} \sqrt[3]{5} $\par $\sqrt[3]{5} {\RRR\sqrt[3]{5}} \sqrt[3]{5} $\par $ \RR\sqrt[3]{5} {\RRR\sqrt[3]{5}} \sqrt[3]{5} $\par {\R $\sqrt[3]{5} \sqrt[3]{5} \sqrt[3]{5} $\par {\RR $\sqrt[3]{5} \sqrt[3]{5} \sqrt[3]{5} $\par {\RRR$\sqrt[3]{5} \sqrt[3]{5} \sqrt[3]{5} $\par \stoptext Changing these parameters inside math is kind of pseudo global: the value at the end of the first pass is used for the whole formula. However, in lmtx you can cheat by using the \frozen prefix to make it behave local. If we can come up with a proper name for a parameter we can make it a setting. One of these things that Aditya and I will to discuss when we have time and are in math mood. (There is much more in math we could control if needed, but often in the end that control is not that much needed at all.) this helps me, thank you. Best regards, Lukas 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] --silent and so on
> On 4 May 2020, at 13:35, Thierry Horsin wrote: > > Hi everybody > > I am a current context user since now many years and in particular I use it > with automatic compilation with a bash script detecting any modifications of > the .tex file. In order for this to work I used with previous versions > > the --nonstopmode --batchmode --silent --noconsole options > > Now with the last version appears a single page pdf file with ERROR written > on it. Is there a way to have something similar as before ? I am also eager to find a way to get rid of that ERROR page. Taco ___ 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] Vertical lines in matrices
Dear Weber Mattias, Please see page 10 of “mathalign.pdf” made by Aditya. He showed the way of writing aligned math including matrices. For example, \startformula \startmatrix[left={\left(\,},right={\,\right)}] \NC 1 \NC 0 \NC 0 \NR \NC 0 \NC 1 \NC 0 \NR \NC 0 \NC 0 \NC 1 \NR \stopmatrix \stopformula There are many other examples that you can use. Best regards, Dalyoung > Message: 2 > Date: Sun, 3 May 2020 17:47:24 + > From: "Weber, Matthias" > To: mailing list for ConTeXt users > Subject: [NTG-context] Vertical lines in matrices > Message-ID: > Content-Type: text/plain; charset="utf-8" > > Dear List, > > I am trying to get vertical (separating) lines into matrices, as is possible > in tables: > > \starttext > \startformula > \left( > \starttable[|c|c|c|] > \NC 0 \NC 0\VL 0 \FR > \NC 1 \NC 0\VL 1 \FR > \stoptable > \right) > \stopformula > \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] --silent and so on
Hi everybody I am a current context user since now many years and in particular I use it with automatic compilation with a bash script detecting any modifications of the .tex file. In order for this to work I used with previous versions the --nonstopmode --batchmode --silent --noconsole options With these options when an error occured the previous pdf produced was not changed. Now with the last version appears a single page pdf file with ERROR written on it. Is there a way to have something similar as before ? Any ideas. Thanks ___ 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] Vertical lines in matrices
Thanks Jeong, I was aware of this. While there is no solution that adds vertical lines into matrices, one can juxtapose two (or more) of them with properly chosen delimiters, like so: \definemathmatrix [bvmatrix] [left={\left(\,},right={\ \right\vert}] \definemathmatrix [rbmatrix] [left={\left.\,},right={\,\right)}] \starttext \startformula \startbvmatrix \NC 0 \NC 0\NC 0 \NR \NC 1 \NC 0\NC 1 \NR \stopbvmatrix \startrbmatrix \NC 0 \NR \NC 1 \NR \stoprbmatrix \stopformula \stoptext > On May 4, 2020, at 04:25, Jeong Dal wrote: > > Dear Weber Mattias, > > Please see page 10 of “mathalign.pdf” made by Aditya. > He showed the way of writing aligned math including matrices. > For example, > > \startformula > > \startmatrix[left={\left(\,},right={\,\right)}] > > \NC 1 \NC 0 \NC 0 \NR > \NC 0 \NC 1 \NC 0 \NR > \NC 0 \NC 0 \NC 1 \NR > > \stopmatrix > \stopformula > There are many other examples that you can use. > > Best regards, > Dalyoung > >> Message: 2 >> Date: Sun, 3 May 2020 17:47:24 + >> From: "Weber, Matthias" >> To: mailing list for ConTeXt users >> Subject: [NTG-context] Vertical lines in matrices >> Message-ID: >> Content-Type: text/plain; charset="utf-8" >> >> Dear List, >> >> I am trying to get vertical (separating) lines into matrices, as is possible >> in tables: >> >> \starttext >> \startformula >> \left( >> \starttable[|c|c|c|] >> \NC 0 \NC 0\VL 0 \FR >> \NC 1 \NC 0\VL 1 \FR >> \stoptable >> \right) >> \stopformula >> \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] Placing number in \sqrt
Hello, compare placing "3" in the following examples: \starttext $\sqrt[3]{5}$ % (1) \par $\sqrt[3~]{5}$ % (2) \stoptext In the first case, the "3" is placed naturally by ConTeXt and placed more in the centre of "V" part of the square sign. In the second example, the "3" is shifted manually by adding "~" and the final placement seems to me a bit better. What is your opinion - is the case (1) OK/intended and user should avoid any manual shifting? Or manual shifting is OK? Or is there a way to affect this placement globally in ConTeXt, e.g. setting an internal variable? Best regards, Lukas \starttext $\sqrt[3]{5}$ \par $\sqrt[3~]{5}$ \stoptext Sqrt.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] Strangely placed dot
Hi, I realized that at work I did not have this problem, so there must have been some problem with my installation on the laptop. Perhaps it will go away when erasing the cache. /Mikael On Sun, May 3, 2020 at 7:48 AM Mikael P. Sundqvist wrote: > Hi, > > what is going on with the placement of the dot in this example, and how > can I avoid it? > > \starttext > \startTEXpage[offset=3bp] > $E_tE_s=E_{\min(t,s)}$. > > \switchtobodyfont[stixtwo]$E_tE_s=E_{\min(t,s)}$. > > \switchtobodyfont[lucidaot]$E_tE_s=E_{\min(t,s)}$. > \stopTEXpage > \stoptext > > Output attached. > > /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] How do I add cyrillic to my typescript/document?
On 5/4/20 12:36 AM, Gerben Wierda wrote: > [...] > It could help if I would understand ConTeXt better. The link gives me a > grammar for a command, but doesn’t tell me what to put in. > > I tried many, many different permutations, I tried everything I could > find on ConTeXtgarden (but then, that also finds me stuff from 15 years > ago that isn’t valid anymore), but no luck so far. Sorry for not explaining it better, Gerben. Let me know if the following sample works for you: \setuplanguage[en][patterns={en, ru}] \definefallbackfamily [abc] [ss] [Helvetica] [preset=range:cyrillic, %~ tf=style:light, %~ it=style:lightoblique, %~ bf=style:regular, %~ bi=style:oblique, force=yes, rscale=0.9] \definefontfamily [abc] [ss] [Optima] \setupbodyfont[abc] \starttext \startTEXpage[offset=1em] \doloopoverlist{\tf, \it, \bf, \bi}{ \recursestring\hyphenatedword{Николаевич typography}\par} \stopTEXpage \stoptext It should hyphenate both English and Russian in all four fonts (regular, italic, bold and bold italic). > Which is weird because Optima.ttc is in the same directory and it is found. Aren’t Optima.ttc and Helvetica.ttc installed as typefaces on your macOS? This is relevant, since ConTeXt may have problems finding them when not installed on the system (especially with the system I use). If the sample above doesn’t work, please provide the output of "locate Helvetica.ttc". > But anyway, even if I could understand it, I can’t find anything useful > (that is: something that works or makes me try something that works) > about font fallbacks. Spending hours of looking (losing a lot of sleep) > and then having to bother the list again is very frustrating. Why isn’t > this straightforward? I am sorry, everybody is very helpful, but the > frustration mounts again. If the sample above works, I think font management for your documents may be easier to handle (or at least, the font code will be simpler). Don’t loose sleep when code is not working, ask here instead. I must admit that not having access to a macOS computer (I needed the help of a friend to test) makes everything a bit harder. But it isn’t impossible. BTW, I use "preset=range:cyrillic" instead of "range=cyrillic", since it includes cyrillic, cyrillicextendeda, cyrillicextendedb and cyrillicsupplement. I hope the sample above helps now, 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] lmt_followtext crashes while standard followtext itself works
> we can patch this > >if ad <> origin : rotated(angle(ad)) fi > > in mp-blob.mpiv but I expect you to test if all still works then Applied and tested, it works fine. And it also provided me with an insight about if:else:fi that was slow in coming but now that I see it, I think “Duh, you should have realised that much sooner”. Thanks, G ___ 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] Placing number in \sqrt
On Mon, 4 May 2020, Hans Hagen wrote: On 5/4/2020 8:47 AM, cont...@vivaldi.net wrote: Hello, compare placing "3" in the following examples: \starttext $\sqrt[3]{5}$ % (1) \par $\sqrt[3~]{5}$ % (2) \stoptext In the first case, the "3" is placed naturally by ConTeXt and placed more in the centre of "V" part of the square sign. In the second example, the "3" is shifted manually by adding "~" and the final placement seems to me a bit better. What is your opinion - is the case (1) OK/intended and user should avoid any manual shifting? Or manual shifting is OK? Or is there a way to affect this placement globally in ConTeXt, e.g. setting an internal variable? If we can come up with a proper name for a parameter we can make it a setting. One of these things that Aditya and I will to discuss when we have time and are in math mood. (There is much more in math we could control if needed, but often in the end that control is not that much needed at all.) As an example, see this question about customized square root signed which was asked on TeX.SE a few years ago: https://tex.stackexchange.com/a/406680/323 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] lmt_followtext crashes while standard followtext itself works
On 5/3/2020 11:47 PM, Gerben Wierda wrote: The following example has been extracted from my automatically generated MP code. \starttext \startMPpage string texstring; texstring := "{\colored [r=0.00, g=0.00, b=0.00]{\definebodyfont [9.0pt][rm][default=Regular at 9.0pt]\switchtobodyfont [9.0pt]\setupinterlinespace [9.9pt]\tf E.g. publish/ subscribe}}"; path parpath; parpath := (238,-167.00010681152344)..controls (238,-167.00010681152344) and (238,-167.00010681152344) ..(238,-167.00010681152344)..controls (238,-166.60010673470143) and (238,-166.20010665787942) ..(238,-165.80010658105741)..controls (238,-165.40010643392299) and (238,-165.00010628678857) ..(238,-164.60010613965414)..controls (238,-164.2001060472048) and (238,-163.80010595475545) ..(238,-163.40010586230611)..controls (238,-155.56353466513065) and (231.9683162849897,-149) ..(224.2552179837387,-149)..controls (223.85521783436539,-149) and (223.45521768499208,-149) ..(223.05521753561877,-149)..controls (222.65521740514737,-149) and (222.255217274676,-149) ..(221.8552171442046,-149)..controls (221.45521705001735,-149) and (221.0552169558301,-149) ..(220.65521686164286,-149)..controls (220.25521665589685,-149) and (219.85521645015083,-149) ..(219.45521624440482,-149)..controls (219.05521631807508,-149) and (218.65521639174534,-149) ..(218.2552164654156,-149)..controls (217.85521724037432,-149) and (217.45521801533303,-149) ..(217.05521879029175,-149)..controls (216.6552203077878,-149) and (216.25522182528385,-149) ..(215.85522334277991,-149)..controls (215.45522405083273,-149) and (215.05522475888554,-149) ..(214.65522546693836,-149)..controls (214.25522550518758,-149) and (213.8552255434368,-149) ..(213.45522558168602,-149)..controls (213.0552253720042,-149) and (212.65522516232238,-149) ..(212.25522495264056,-149)..controls (211.8552248680295,-149) and (211.45522478341843,-149) ..(211.05522469880736,-149)..controls (210.65522456100436,-149) and (210.25522442320135,-149) ..(209.85522428539835,-149)..controls (209.45522414149036,-149) and (209.05522399758237,-149) ..(208.65522385367439,-149)..controls (200.95716230583835,-149) and (195,-155.63452868682958) ..(195,-163.48966401016395)..controls (195,-163.88966411101083) and (195,-164.28966421185771) ..(195,-164.68966431270459)..controls (195,-165.08966445890775) and (195,-165.4896646051109) ..(195,-165.88966475131406)..controls (195,-166.25981210471718) and (195,-166.62995945812031) ..(195,-167.00010681152344); picture pic; pic := lmt_followtext [ text = texstring, path = parpath, spread = false, ]; \stopMPpage \stoptext lmt_followtext crashes on this code with: metapost log > ! angle(0,0) is taken as zero. metapost log > ...0)]shifted(-wid/2,0)rotated(angle(ad)) metapost log > shifted.ap;draw.pic[(EXPR0... metapost log > ...caled0.5pt.withcolor.green;fi;endfor metapost log > ;if((autoscaleupfollowtext... metapost log > metapost log > image->...ture;currentpicture:=nullpicture;(TEXT3) metapost log > ;currentpicture.if.str(SUF... metapost log > metapost log > followtext->...b_n;setbounds.currentpicture.to.b;) metapost log > endgroup metapost log > ...parameter"path"),getparameter"text") metapost log > ;popparameters; metapost log > image->...ture;currentpicture:=nullpicture;(TEXT3) metapost log > ;currentpicture.if.str(SUF... metapost log > metapost log > lmt_do_followtext->...meter"text");popparameters;) metapost log > endgroup metapost log > lmt_do_followtext metapost log > metapost log > <*> ...exstring, path = parpath, spread = false, ] metapost log > ; ; When I adapt the parameters that create parpath in my code, other uses of lmt_followtext crash. The same combinations of text and path so far haven’t crashed basic followtext(). I’ve run into comparable situations in my own code where I had to add code to handle the existence of a (0,0) direction (e.g. when I had two identical points on a path, but that is not the case here). The above minimal example triggers the failure. we can patch this if ad <> origin : rotated(angle(ad)) fi in mp-blob.mpiv but I expect you to test if all still works then 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
Re: [NTG-context] Placing number in \sqrt
On 5/4/2020 8:47 AM, cont...@vivaldi.net wrote: Hello, compare placing "3" in the following examples: \starttext $\sqrt[3]{5}$ % (1) \par $\sqrt[3~]{5}$ % (2) \stoptext In the first case, the "3" is placed naturally by ConTeXt and placed more in the centre of "V" part of the square sign. In the second example, the "3" is shifted manually by adding "~" and the final placement seems to me a bit better. What is your opinion - is the case (1) OK/intended and user should avoid any manual shifting? Or manual shifting is OK? Or is there a way to affect this placement globally in ConTeXt, e.g. setting an internal variable? The placement is driven by the font so kind of part of the design. There is a whole bunch of parameters that drives placement and there is one that deals with the spacing after the degree. Here are some examples. \starttext \def\R {\Umathradicaldegreeafter\textstyle0pt} \def\RR{\Umathradicaldegreeafter\textstyle\dimexpr \Umathradicaldegreeafter\textstyle+.1em\relax} \def\RRR{\frozen\Umathradicaldegreeafter\textstyle\dimexpr \Umathradicaldegreeafter\textstyle+.2em\relax} $\sqrt[3]{5} \RR\sqrt[3]{5} \sqrt[3]{5} $\par $\sqrt[3]{5} {\RRR\sqrt[3]{5}} \sqrt[3]{5} $\par $ \RR\sqrt[3]{5} {\RRR\sqrt[3]{5}} \sqrt[3]{5} $\par {\R $\sqrt[3]{5} \sqrt[3]{5} \sqrt[3]{5} $\par {\RR $\sqrt[3]{5} \sqrt[3]{5} \sqrt[3]{5} $\par {\RRR$\sqrt[3]{5} \sqrt[3]{5} \sqrt[3]{5} $\par \stoptext Changing these parameters inside math is kind of pseudo global: the value at the end of the first pass is used for the whole formula. However, in lmtx you can cheat by using the \frozen prefix to make it behave local. If we can come up with a proper name for a parameter we can make it a setting. One of these things that Aditya and I will to discuss when we have time and are in math mood. (There is much more in math we could control if needed, but often in the end that control is not that much needed at all.) 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] How do I add cyrillic to my typescript/document?
> Am 04.05.2020 um 00:36 schrieb Gerben Wierda : > > > \starttypescript [sans] [optima] >\setups[font:fallback:sans] >\definefontsynonym [Sans] [file:Optima.ttc(Optima Regular)] > [features=default] >\definefontsynonym [SansBold] [file:Optima.ttc(Optima Bold)] > [features=default] >\definefontsynonym [SansItalic] [file:Optima.ttc(Optima Italic)] > [features=default] >\definefontsynonym [SansBoldItalic] [file:Optima.ttc(Optima Bold Italic)] > [features=default] > \stoptypescript > > \definetypeface [optima] [ss] [sans] [optima] [default] > \definetypeface [optima] [rm] [serif] [optima] [default] > \definetypeface [optima] [tt] [mono] [modern] [default] > \definetypeface [optima] [mm] [math] [pagella] [default] > > \definefallbackfamily > [optima] > [ss] > [file:Helvetica.ttc] > [preset=range:cyrillic, > force=yes] > > \setupbodyfont [optima] > > The error is: > > fonts > typescripts > unknown library 'optima' This is about \definetypeface [optima] [rm] [serif] [optima] [default], because you only defined [sans][optima]. > open source > level 3, order 6, name > '/usr/local/context-osx-64/tex/texmf-context/tex/context/fonts/mkiv/type-imp-texgyre.mkiv' > close source> level 3, order 6, name > '/usr/local/context-osx-64/tex/texmf-context/tex/context/fonts/mkiv/type-imp-texgyre.mkiv' > selectfont > the requested fallback font 'file:Helvetica.ttc' for > typeface 'optima' style 'ss' was ignored because no files where found. The fallback font for cyrillic, Helvetica.ttc, is not found. No problem with Optima reported. Best, Hraban ___ 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 ___