Re: [NTG-context] Non-standard font alternatives
On 12/14/2022 11:49 AM, Matthew McCabe wrote: For anyone else looking to do something similar, since the typescript is just a tex file it seems if one places it in one’s local directory it will be accessible when ConTeXt generates the pdf. I saved it as type-imp-roboto.tex in my local directory and used ‘\usebodyfont[roboto]’ and ‘\usebodyfont[roboto-light]’ to preload the fonts as recommended (\usetypescriptfile didn’t seem to be required). you can also put the definitions in the style (depends on how often you reuse it) Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] \autoinsertedspace fails
On 1/6/2023 3:05 AM, Rik Kabel via ntg-context wrote: On 2023-01-05 04:35, Hans Hagen via ntg-context wrote: On 1/5/2023 4:21 AM, Rik Kabel via ntg-context wrote: [ snipped by rik] Here is a more lmtx-ish variant: \starttexdefinition tolerant protected BD #=#*#= \removeunwantedspaces \space % insert a space ( \ifparameter#2\or #1|–|#2 \orelse\ifparameter#1\or #1– \else {\red I NEED A DATE OR DATES!} \fi ) \autoinsertedspace \stoptexdefinition Hans Thank you for that. This works for me with \optionalspace, but fails in some cases with \autoinsertedspace. I have now re-read lowlevel-macros.pdf and have a better understanding of what I read when first I approached it; I still have a way to go. /Tolerant/ removes the need for /dodoubleempty/ and friends and the two-step /macro/ and /doMacro/ dance. There was a small advantage to the two-step, however. I had two separate macros, BD and BDNP (no parens), as shown. The old code in full was: % Birth and death dates ---% % Ferdinand de Saussure\BD{1857}{1913} % Noam Chomsky \BD{1928} % % Perhaps this could be tied to an acronym-like database so that the % dates are printed only once per person. % \removeunwantedspaces allows this to directly follow, or follow % after whitespace, the associated name: Name\BD{1}{2} or % Name \BD{1}{2}. % Using the compound indication (|–|) allows hyphenation after the % endash. Omitting it and using a bare endash inhibits hyphenation % ‘twixt the endash and the paren. % By default, add parens around the dates. If none are needed due to % the context, use \BDNP. % \newif\ifBDParen \starttexdefinition unexpanded BD \BDParentrue \dodoublegroupempty \doBD \stoptexdefinition \starttexdefinition unexpanded BDNP \BDParenfalse \dodoublegroupempty \doBD \stoptexdefinition \starttexdefinition doBD #1#2 \removeunwantedspaces\ \ifBDParen(\fi \ifsecondargument #1|–|#2 \else\iffirstargument #1– \else {\red I NEED A DATE OR DATES!} \fi\fi \ifBDParen)\fi \autoinsertedspace \stoptexdefinition Both call the same doBD, but they set a flag (newif) to control insertion or not of the parens. While there is no performance benefit compared to having two fully separate macros, there is a maintenance benefit in having only one place, doBD, to make changes should they be required. Can you suggest a way to do this under the new one-step scheme, or am I over-thinking this? just remove the #* in the example i sent, \starttexdefinition tolerant protected BD #=#= Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] \autoinsertedspace fails
On 2023-01-05 04:35, Hans Hagen via ntg-context wrote: On 1/5/2023 4:21 AM, Rik Kabel via ntg-context wrote: [ snipped by rik] Here is a more lmtx-ish variant: \starttexdefinition tolerant protected BD #=#*#= \removeunwantedspaces \space % insert a space ( \ifparameter#2\or #1|–|#2 \orelse\ifparameter#1\or #1– \else {\red I NEED A DATE OR DATES!} \fi ) \autoinsertedspace \stoptexdefinition Hans Thank you for that. This works for me with \optionalspace, but fails in some cases with \autoinsertedspace. I have now re-read lowlevel-macros.pdf and have a better understanding of what I read when first I approached it; I still have a way to go. /Tolerant/ removes the need for /dodoubleempty/ and friends and the two-step /macro/ and /doMacro/ dance. There was a small advantage to the two-step, however. I had two separate macros, BD and BDNP (no parens), as shown. The old code in full was: % Birth and death dates ---% % Ferdinand de Saussure\BD{1857}{1913} % Noam Chomsky \BD{1928} % % Perhaps this could be tied to an acronym-like database so that the % dates are printed only once per person. % \removeunwantedspaces allows this to directly follow, or follow % after whitespace, the associated name: Name\BD{1}{2} or % Name \BD{1}{2}. % Using the compound indication (|–|) allows hyphenation after the % endash. Omitting it and using a bare endash inhibits hyphenation % ‘twixt the endash and the paren. % By default, add parens around the dates. If none are needed due to % the context, use \BDNP. % \newif\ifBDParen \starttexdefinition unexpanded BD \BDParentrue \dodoublegroupempty \doBD \stoptexdefinition \starttexdefinition unexpanded BDNP \BDParenfalse \dodoublegroupempty \doBD \stoptexdefinition \starttexdefinition doBD #1#2 \removeunwantedspaces\ \ifBDParen(\fi \ifsecondargument #1|–|#2 \else\iffirstargument #1– \else {\red I NEED A DATE OR DATES!} \fi\fi \ifBDParen)\fi \autoinsertedspace \stoptexdefinition Both call the same doBD, but they set a flag (newif) to control insertion or not of the parens. While there is no performance benefit compared to having two fully separate macros, there is a maintenance benefit in having only one place, doBD, to make changes should they be required. Can you suggest a way to do this under the new one-step scheme, or am I over-thinking this? Finally, is there any reason to go back to previously written and properly functioning macros and convert them to the LMTX-only syntax? It does imply committing to LMTX-only (or -- Rik ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Cron /var/www/aanhet.net/context/bin/cron/context-mirror
receiving incremental file list ./ ctan.lsr document-2.htm download-1.htm download-2.htm logo-ade.png logo-cts.png logo-pod.png rss.xml show-fil.pdf context/latest/ context/latest/cont-mpd.zip context/latest/cont-ppc.zip context/latest/cont-sci.zip context/latest/cont-tmf.zip context/latest/cont-tst.7z context/latest/cont-tst.tar.xz context/latest/cont-tst.zip sent 101,528 bytes received 20,923,385 bytes 2,002,372.67 bytes/sec total size is 449,294,327 speedup is 21.37 Running archiver: New dir: /var/www/aanhet.net/context//htdocs/archives/context-2023-01-05.20 172300175 /var/www/aanhet.net/context//htdocs/archives/context-2023-01-05.20/latest 126745317 /var/www/aanhet.net/context//htdocs/archives/context-2023-01-05.20/current 18956262 /var/www/aanhet.net/context//htdocs/archives/context-2023-01-05.20/alpha 126707516 /var/www/aanhet.net/context//htdocs/archives/context-2023-01-05.20/beta 444713366 /var/www/aanhet.net/context//htdocs/archives/context-2023-01-05.20 444713366 total ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] TUG 2023
On 1/4/2023 5:50 PM, Thomas A. Schmitz via ntg-context wrote: > Since I'm a simple user and no Ha, you're not a simple user; you use all bits and pieces in advanced scenarios. and no developer, I'm a bit hesitant though: is any of the developers going (Hans?)? Since the public will be 99 % LaTeX-centric: I had the The only meeting in my agende is the ctx meeting later that year, so no plans. (Not knowing what to talk about at that meeting there would be little change of interference; we would likely end up sitting in your office discussing some pending inerestign and challenging mechanisms anyway -) Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] Problem with latest version ?
On 1/5/2023 11:40 AM, Gavin via ntg-context wrote: Hi Hans, On Jan 5, 2023, at 12:39 AM, Hans Hagen via ntg-context wrote: On 1/5/2023 2:40 AM, Gavin via ntg-context wrote: Hi List, I could not figure out the right spot for the files m-tikz-pgfplots.tex and m-tikz-pgfplotstable.tex. I don’t currently have files with those names anywhere, and files with similar names and contents appear in a couple different places. I had to put off sorting it out until I had some more time. I was able to find the right place for m-tikz.mkxl, and it prevented an error at \usemodule[pgfplots], but I’d still get an error if I tried to use any command from the pgfplots. indeed they go alongside the m-tikz file ... did you run mtxrun --generate? Now I put the files alongside and ran mtxrun —generate. It did not work. The test file and resulting error are below. I used ConTeXt ver: 2022.12.29 14:32 LMTX fmt: 2022.12.29 int: english/english. I can try with the latest LMTX later today. The test file works with TeXLive 2022 Gavin TEST FILE: \usemodule[tikz] \usemodule[pgfplots]% PGFPlots module for graphs \starttext \starttikzpicture \draw (0, 0) circle (3cm); \stoptikzpicture \starttikzpicture \startaxis \addplot+[domain=0:360] {sin(x)}; \stopaxis \stoptikzpicture \stoptext fixed in next upload (later today) - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] Problem with latest version ?
Hi Hans, > On Jan 5, 2023, at 12:39 AM, Hans Hagen via ntg-context > wrote: > > On 1/5/2023 2:40 AM, Gavin via ntg-context wrote: >> Hi List, >> I could not figure out the right spot for the files m-tikz-pgfplots.tex and >> m-tikz-pgfplotstable.tex. I don’t currently have files with those names >> anywhere, and files with similar names and contents appear in a couple >> different places. I had to put off sorting it out until I had some more time. >> I was able to find the right place for m-tikz.mkxl, and it prevented an >> error at \usemodule[pgfplots], but I’d still get an error if I tried to use >> any command from the pgfplots. > indeed they go alongside the m-tikz file ... did you run mtxrun --generate? Now I put the files alongside and ran mtxrun —generate. It did not work. The test file and resulting error are below. I used ConTeXt ver: 2022.12.29 14:32 LMTX fmt: 2022.12.29 int: english/english. I can try with the latest LMTX later today. The test file works with TeXLive 2022 Gavin TEST FILE: \usemodule[tikz] \usemodule[pgfplots]% PGFPlots module for graphs \starttext \starttikzpicture \draw (0, 0) circle (3cm); \stoptikzpicture \starttikzpicture \startaxis \addplot+[domain=0:360] {sin(x)}; \stopaxis \stoptikzpicture \stoptext ERROR: tex error > tex error on line 15 in file ./TikZTest.tex: Illegal unit of measure (pt inserted) \relax \pgfpl@@ #1->\advance \count 0 by-1\relax \ifnum \count 0=-1\relax \global \def \pgfplotslistselect@tmp {\def \pgfplotsretval {#1}}\fi \pgfpl@@ \pgfpl@@ {blue,every mark/.append style={fill=blue!80!black},mark=*} \pgfpl@@ {red,every mark/.append style={fill=red!80!black},mark=square*}\pgfpl@@ {brown!60!black,every mark/.append style={fill=brown!80!black},mark=otimes*}\pgfpl@@ {black,mark=star \pgfplotslistselect@ #1\of #2\to #3->\begingroup \count 0=#1\relax \long \def \pgfpl@@ ##1{\advance \count 0 by-1\relax \ifnum \count 0=-1\relax \global \def \pgfplotslistselect@tmp {\def #3{##1}}\fi }#2 \endgroup \pgfplotslistselect@tmp \pgfplots@getautoplotspec@ #1#2#3->\ifnum #2=0 \let \pgfplotsretval =\pgfutil@empty \else \pgfplotsmathmodint {#3}{#2}\pgfplotslistselect \pgfmathresult \of #1\to \pgfplotsretval \fi \pgfplots@getautoplotspec ...ternal error: expected 'L' or 'M', not '\pgfplots@cycle@multi@list@sequence '}\fi \fi \else \pgfplotslistsize \autoplotspeclist \to \c@pgf@countd \pgfplots@getautoplotspec@ {\autoplotspeclist }{\c@pgf@countd }{\pgfplots@listindex } \let #1=\pgfp ... ... \addplot+ [domain=0:360] 5 \usemodule[pgfplots] % PGFPlots module for graphs 6 7 \starttext 8 9 \starttikzpicture 10 \draw (0, 0) circle (3cm); 11 \stoptikzpicture 12 13 \starttikzpicture 14 \startaxis 15 >> \addplot+[domain=0:360] 16 {sin(x)}; 17 \stopaxis 18 \stoptikzpicture 19 20 \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] \autoinsertedspace fails
On 1/5/2023 4:21 AM, Rik Kabel via ntg-context wrote: On 2023-01-04 18:45, Hans Hagen wrote: On 1/4/2023 11:10 PM, Rik Kabel via ntg-context wrote: No change with the latest (2023.01.04). Is this a problem with what I am doing, or a bug? well, it's new and not thtat tested ... we need to specify it This\optionalspace fails unexpectedly with autoinsertedspace.\par This\optionalspace \emph{fails unexpectedly} with autoinsertedspace.\par there can be more variants, like do we want to remove preceding spaces? we already have: This\optionalspace, fails unexpectedly with autoinsertedspace.\par This\optionalspace, \emph{fails unexpectedly} with autoinsertedspace.\par This\optionalspace fails unexpectedly with autoinsertedspace.\par This\optionalspace \emph{fails unexpectedly} with autoinsertedspace.\par \optionalspace works correctly (that is, as I want it to) for all of my use cases under both MkIV and LMTX. Is there any reason that this should not be used in user documents? I do wonder what characters are considered "punctuation" for the purpose of suppressing the next space. The standard six sentence termination characters (?!.:;,) are honored, and so are many others (quotation marks, including guillemot, square and curly braces, and parens). But sentence opening characters (¿¡) are as well. Vertical bars (|¦) and basic mathematical characters (+-=*) are not treated as punctuation. Where (in the source or manuals) are these to be found? As far as removing leading spaces, I do not see that it is necessary, but it may help create more readable sources. Thank you for the fix. Here is a more lmtx-ish variant: \starttexdefinition tolerant protected BD #=#*#= \removeunwantedspaces \space % insert a space ( \ifparameter#2\or #1|–|#2 \orelse\ifparameter#1\or #1– \else {\red I NEED A DATE OR DATES!} \fi ) \autoinsertedspace \stoptexdefinition Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___