Re: [NTG-context] Lmtx + pgfplots compilation error
Hi Aditya, Your solution seems to work even with the most complex files, it's a great idea! The only small disadvantage is that you have to place this file in each directory containing files using these modules. Thank you very much even if this solution is temporary. Fabrice Le lun. 13 avr. 2020 à 12:13, Aditya Mahajan a écrit : > On Mon, 13 Apr 2020, Fabrice Couvreur wrote: > > > Hi, > > Sorry to restart the discussion, but I have updated my entire system and > > the problem remains. I used the example of Aditya. > > Thank you. > > Fabrice > > > > \usemodule[pgfplots] > > \starttext > > \starttikzpicture > > \startaxis > > \addplot {x}; > > \stopaxis > > \stoptikzpicture > > \stoptext > > > > tex error > tex error on line 5 in file > pgfplotsbinary.data.code.tex: > > ! Undefined control sequence > > > > l.5 ...ode`\^0=11\expandafter\xdef\csname pgfp@bin@\the\counter > > \endcsname{^0 > > > >}\advance\counter by1 > > lua error: > > I have no clue what pgfplotsbinary.data.code.tex does, but simply > bypassing that works for the simple example above. > > Simply create an empty file with the name pgfplotsbinary.data.code.tex in > your current directory and compile your example. > > Note that if your code uses any of the features which are provided by this > file (and I am not sure what they are), then it will fail. But at least > this "fix" works for the simple example above. > > 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] Use a counter in a reference?
On 4/13/20 10:13 PM, Kevin Kenan wrote: I have a need to tag elements in a text in a way that they are sequentially numbered and can have references to refer to them. Something like: Here is some \tag[tagref]{\bf text} that is tagged. . . . Refer to tag \tagnumber[tagref] on page \at[tagref]. What is the best way to do this in ConTeXt? I’ve got a counter for tag number, but I’m not sure how to use \reference so that it uses my tag number. For instance: \definecounter[myTagCounter] . . . \reference[tagref]{\rawcountervalue[myTagCounter]} Doesn’t work. But perhaps I’m going about this incorrectly? Thanks in advance! Are you looking for this: https://wiki.contextgarden.net/Command/definelabel ? HTH Thomas ___ 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] Use a counter in a reference?
I have a need to tag elements in a text in a way that they are sequentially numbered and can have references to refer to them. Something like: Here is some \tag[tagref]{\bf text} that is tagged. . . . Refer to tag \tagnumber[tagref] on page \at[tagref]. What is the best way to do this in ConTeXt? I’ve got a counter for tag number, but I’m not sure how to use \reference so that it uses my tag number. For instance: \definecounter[myTagCounter] . . . \reference[tagref]{\rawcountervalue[myTagCounter]} Doesn’t work. But perhaps I’m going about this incorrectly? Thanks in advance! -kk ___ 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] fun with frames and tables
Henning Hraban Ramm schrieb am 13.04.2020 um 16:07: Am 13.04.2020 um 15:37 schrieb Wolfgang Schuster : Henning Hraban Ramm schrieb am 13.04.2020 um 14:07: I’m trying to get those tables side by side, but the size of the wrapping box is somehow miscalculated – if I set the width, the left table disappeares to the left, if I don’t, the box exceeds the paper width. Maybe it’s completely unrelated to the tables. In the full document, there’s also space before or after one of the tables, so that they don’t align. There are actually not just two tables, but a short wide one and a combination of 3*2 small ones on the left side (that’s why I seem to need that \vbox) and a big table on the right side. But I’ll care about the other problems if I understand what’s going on with those boxes. Can you see where your left table is? Yes, thank you – but why? When you put horizontal material in a \vbox the width of the box uses the value of \hsize before you opened it. You can make now a local change of \hsize in the box or just use another \framed for the table (or put the two smaller tables in a larger one). \starttext \startframed[offset=overlay,width=max] \startframed[frame=off,strut=no,offset=0pt,width=fit] \bTABLE[width=2cm] \dorecurse{10}{\bTR\bTD x \eTD\bTD y \eTD\eTR} \eTABLE \stopframed \hskip1cm \startframed[frame=off,strut=no,offset=0pt,width=fit] \bTABLE[width=2cm] \dorecurse{10}{\bTR\bTD x \eTD\bTD y \eTD\bTD z \eTD\eTR} \eTABLE \stopframed \stopframed \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] offset for background overlay
mf schrieb am 13.04.2020 um 17:21: Thanks also for the explanation of backgroundoffset: it's an offset relative only to the background, and it moves in the opposite direction of the content offset of \framed. Looks like \framed[...,offset=VALUE,backgroundoffset=frame,...] is equivalent to \framed[...,offset=VALUE,backgroundoffset=-VALUE,...]. I tried to add something to the WIKI to show how it works, but the previews I got were not consistent with what I'm obtaining on my PC (with LMTX and "context --luatex"), so I gave up. When you use "backgroundoffset=frame" you have to change the value for "frameoffset" to get a result because "backgroundoffset" uses now the "frameoffset" value. 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] offset for background overlay
Or maybe a method in MP to set the bounding box of the resulting overlay? setbounds in combination with leftenlarged, topenlarged etc. Thanks Wolfgang, this is the kind of solution I was looking for: \startuseMPgraphic{cell:triangle} path p ; p := unittriangle rotated 90 xscaled 2.5 OverlayWidth yscaled 2.5 OverlayHeight ; draw p withcolor red ; setbounds currentpicture to p topenlarged 6mm ; \stopuseMPgraphic \defineoverlay[triangle][{\uniqueMPgraphic{cell:triangle}}] \starttext \bTABLE[frame=off] \bTR \bTD[nx=2,align=middle,background=triangle] \dontleavehmode a\crlf text \eTD \eTR \bTR[toffset=1mm] \bTD left \eTD \bTD right \eTD \eTR \bTR \bTD another \eTD \bTD row \eTD \eTR \eTABLE \stoptext Thanks also for the explanation of backgroundoffset: it's an offset relative only to the background, and it moves in the opposite direction of the content offset of \framed. Looks like \framed[...,offset=VALUE,backgroundoffset=frame,...] is equivalent to \framed[...,offset=VALUE,backgroundoffset=-VALUE,...]. I tried to add something to the WIKI to show how it works, but the previews I got were not consistent with what I'm obtaining on my PC (with LMTX and "context --luatex"), so I gave up. Massi ___ 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] fun with frames and tables
> Am 13.04.2020 um 15:37 schrieb Wolfgang Schuster > : > > Henning Hraban Ramm schrieb am 13.04.2020 um 14:07: >> >> I’m trying to get those tables side by side, but the size of the wrapping >> box is somehow miscalculated – if I set the width, the left table >> disappeares to the left, if I don’t, the box exceeds the paper width. >> Maybe it’s completely unrelated to the tables. >> In the full document, there’s also space before or after one of the tables, >> so that they don’t align. >> There are actually not just two tables, but a short wide one and a >> combination of 3*2 small ones on the left side (that’s why I seem to need >> that \vbox) and a big table on the right side. But I’ll care about the other >> problems if I understand what’s going on with those boxes. > > Can you see where your left table is? Yes, thank you – but why? (I knew that it was shifted to the left, because in my actual project I tried several things.) 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 ___
Re: [NTG-context] fun with frames and tables
Henning Hraban Ramm schrieb am 13.04.2020 um 14:07: Hi, after I re-setup my computer (harddisk got tired...) I’m now trying to update my old Midgard RPG character sheet (https://github.com/fiee/ConTeXt/tree/master/midgard) and run into some problems that I don’t understand while trying to fill one page with several tables. Here’s a quite minimal example: \setupTABLE[c][each][width=2cm] \starttext \framed[offset=overlay,width=\textwidth]{% \vbox{\bTABLE \dorecurse{10}{\bTR\bTD x \eTD\bTD y \eTD\eTR} \eTABLE}% \hskip1cm% \vbox{\bTABLE \dorecurse{10}{\bTR\bTD x \eTD\bTD y \eTD\bTD z \eTD\eTR} \eTABLE}% } \stoptext I’m trying to get those tables side by side, but the size of the wrapping box is somehow miscalculated – if I set the width, the left table disappeares to the left, if I don’t, the box exceeds the paper width. Maybe it’s completely unrelated to the tables. In the full document, there’s also space before or after one of the tables, so that they don’t align. There are actually not just two tables, but a short wide one and a combination of 3*2 small ones on the left side (that’s why I seem to need that \vbox) and a big table on the right side. But I’ll care about the other problems if I understand what’s going on with those boxes. Can you see where your left table is? \setuppapersize[A4][A3,landscape] \setuplayout[location=middle] \showframe \starttext \startframed[offset=overlay,width=max] \ruledvbox\bgroup \bTABLE[width=2cm] \dorecurse{10}{\bTR\bTD x \eTD\bTD y \eTD\eTR} \eTABLE \egroup \hskip1cm \ruledvbox\bgroup \bTABLE[width=2cm] \dorecurse{10}{\bTR\bTD x \eTD\bTD y \eTD\bTD z \eTD\eTR} \eTABLE \egroup \stopframed \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] font troubles in MkIV
Hi again, as I had to re-setup my computer, I installed all my TeX project fonts in subdirectories of texmf-fonts/fonts/. Most of them are found after one or two forced update runs, strangely not all of them, and ConTeXt won’t load them in the most cases. If I move the same font files to one of the directories in OSFONTDIR, e.g. ~/Library/Fonts, or into the project directory, it works. I don’t see a pattern which fonts are found and which not (except that the only Type 1 font family I tried didn’t work, i.e. only after I installed the TTF version in ~/Libraray/Fonts). I already deleted the luatex cache. Any hints for debugging? (Latest LuaTeX MkIV on macOS 10.14) 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 ___
[NTG-context] fun with frames and tables
Hi, after I re-setup my computer (harddisk got tired...) I’m now trying to update my old Midgard RPG character sheet (https://github.com/fiee/ConTeXt/tree/master/midgard) and run into some problems that I don’t understand while trying to fill one page with several tables. Here’s a quite minimal example: \setupTABLE[c][each][width=2cm] \starttext \framed[offset=overlay,width=\textwidth]{% \vbox{\bTABLE \dorecurse{10}{\bTR\bTD x \eTD\bTD y \eTD\eTR} \eTABLE}% \hskip1cm% \vbox{\bTABLE \dorecurse{10}{\bTR\bTD x \eTD\bTD y \eTD\bTD z \eTD\eTR} \eTABLE}% } \stoptext I’m trying to get those tables side by side, but the size of the wrapping box is somehow miscalculated – if I set the width, the left table disappeares to the left, if I don’t, the box exceeds the paper width. Maybe it’s completely unrelated to the tables. In the full document, there’s also space before or after one of the tables, so that they don’t align. There are actually not just two tables, but a short wide one and a combination of 3*2 small ones on the left side (that’s why I seem to need that \vbox) and a big table on the right side. But I’ll care about the other problems if I understand what’s going on with those boxes. Happy Easter & best regards, 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 ___
Re: [NTG-context] Lmtx + pgfplots compilation error
On Mon, 13 Apr 2020, Fabrice Couvreur wrote: Hi, Sorry to restart the discussion, but I have updated my entire system and the problem remains. I used the example of Aditya. Thank you. Fabrice \usemodule[pgfplots] \starttext \starttikzpicture \startaxis \addplot {x}; \stopaxis \stoptikzpicture \stoptext tex error > tex error on line 5 in file pgfplotsbinary.data.code.tex: ! Undefined control sequence l.5 ...ode`\^0=11\expandafter\xdef\csname pgfp@bin@\the\counter \endcsname{^0 }\advance\counter by1 lua error: I have no clue what pgfplotsbinary.data.code.tex does, but simply bypassing that works for the simple example above. Simply create an empty file with the name pgfplotsbinary.data.code.tex in your current directory and compile your example. Note that if your code uses any of the features which are provided by this file (and I am not sure what they are), then it will fail. But at least this "fix" works for the simple example above. 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] Lmtx + pgfplots compilation error
Hi, Sorry to restart the discussion, but I have updated my entire system and the problem remains. I used the example of Aditya. Thank you. Fabrice \usemodule[pgfplots] \starttext \starttikzpicture \startaxis \addplot {x}; \stopaxis \stoptikzpicture \stoptext tex error > tex error on line 5 in file pgfplotsbinary.data.code.tex: ! Undefined control sequence l.5 ...ode`\^0=11\expandafter\xdef\csname pgfp@bin@\the\counter \endcsname{^0 }\advance\counter by1 lua error: ? Le jeu. 9 avr. 2020 à 00:07, Aditya Mahajan a écrit : > On Wed, 8 Apr 2020, Aditya Mahajan wrote: > > > Simpler example: > > Sorry, pasted the wrong thing: > > \usemodule[pgfplots] > > \starttext > \starttikzpicture >\startaxis > \addplot {x}; >\stopaxis > \stoptikzpicture > \stoptext > > > Works with LMTX 2019.12.31 but fails with the most recent LMTX (same > error as > > below) using the same pgfplots module. > > > > Aditya > > > > On Wed, 8 Apr 2020, Fabrice Couvreur wrote: > > > >> Hi Henri, > >> Sorry ! > >> > >> \usemodule[pgfplots] > >> \pgfplotsset{compat=newest} > >> \starttext > >> \starttikzpicture > >> \startaxis > >>[ > >> xlabel=$x$, > >> ylabel={$f(x) = x^2 - x +4$} > >>] > >>\addplot {x^2 - x +4}; > >> \stopaxis > >> \stoptikzpicture > >> \stoptext > >> > >> > >> tex error > tex error on line 5 in file > pgfplotsbinary.data.code.tex: > >> ! Undefined control sequence > >> > >> l.5 ...ode`\^0=11\expandafter\xdef\csname pgfp@bin@\the\counter > >> \endcsname{^0 > >> > >>}\advance\counter by1 > >> lua error: > >> > >> ? > >> > >> > >> Le mer. 8 avr. 2020 à 12:40, Henri Menke a > écrit : > >> > >>> MINIMAL working example... > >>> > >>> Cheers, Henri > >>> > >>> On 08/04/20, 11:52, Fabrice Couvreur wrote: > Hi Henri, > This file works well with context but does not work with lmtx. > > \usemodule[pgfplots] > \usemodule[pgfpltstable] > \pgfplotsset{compat=newest} > \starttext > \starttikzpicture > \startaxis[ > title={\bf Relevé de notes chronologique}, > ymajorgrids=true, > grid style={cyan!30}, > ymin=0, > ymax=22, > xmin=0, > xmax=14, > x=1cm, > y=0.3cm, > axis x line =bottom, > axis y line =left, > axis on top=true, > axis line style =very thick, > tick align=outside, > tickwidth=0.12cm, > tick style=very thick, > xtick={\empty}, > ytick={0,2,...,18,20}, > extra x ticks={2,5,7,9,11,13}, > extra x tick labels={octobre,novembre,janvier,mars,avril, juin}, > extra x tick style={tick label style={rotate=45}}, > extra tick style={tick style={draw=none}}, > xlabel={Date},ylabel={Note}, > xlabel={Date},ylabel={Effectif}, > every axis x label/.style={ > at={(ticklabel* cs:1.01)}, > anchor=west, > }, > every axis y label/.style={ > at={(ticklabel* cs:1.01)}, > anchor=south, > }, > samples=1000, > >=stealth, > ] > \addplot [color=green,only marks] coordinates { > (1,5) > (2,7) > (3,5) > (4,10) > (5,5) > (6,8) > (7,10) > (8,8) > (9,10) > (10,14) > (11,18) > (12,14) > (13,11) > }; > \stopaxis > \stoptikzpicture > \stoptext > > > open source > level 7, order 88, name > 'pgfplotsbinary.data.code.tex' > > tex error > tex error on line 5 in file > >>> pgfplotsbinary.data.code.tex: > ! Undefined control sequence > > l.5 ...ode`\^0=11\expandafter\xdef\csname pgfp@bin@\the\counter > \endcsname{^0 > > }\advance\counter by1 > lua error: > > ? > > > > > > > The control sequence at the end of the top line of your error message > was > never > \def'ed. You can just continue as I'll forget about whatever was > >>> undefined. > > > mtx-context | fatal error: return code: 256 > > TeX Output exited abnormally with code 1 at Wed Apr 8 11:49:56 > > > Le mer. 8 avr. 2020 à 11:21, Henri Menke a > écrit > >>> : > > > Hi Fabrice, > > > > Could you provide a MWE, or maybe even open an issue on the > bugtracker? > > https://github.com/pgf-tikz/pgfplots/issues > > > > Cheers, Henri > > > > On 07/04/20, 14:22, Fabrice Couvreur wrote: > >> Hi Henri, > >> Thank you for answering me. We're entering an area that I don't > >>> really > > know. I > >> replaced all ^^ by ^ but I'm not sure I understood. I now have the > >> following message : > >> Thank you > >> Fabrice > >> > >> tex error > tex error on line 5 in file > > pgfplotsbinary.data.code.tex: > >> ! Undefined control sequence > >> > >>
Re: [NTG-context] Project Gutenberg Projects
Am 12.04.20 um 20:23 schrieb Thangalin: > Hi list! > > Another blog post for you all, tangentially related to ConTeXt: > > https://dave.autonoma.ca/blog/2020/04/11/project-gutenberg-projects > > In particular, the conversion from XHTML to Markdown so that pandoc > can convert Markdown to ConTeXt may be of interest: > > https://dave.autonoma.ca/blog/2020/04/11/project-gutenberg-projects/#xhtml-to-markdown > > This is in preparation for part 8 of the typesetting Markdown series, > which discusses how ConTeXt can be used to typeset annotations in > pandoc's extended Markdown. If there's anything else you'd like to > see, let me know. Thanks a lot for this blog post. I tried to typeset texts from the German text archive and played a little bit with the ability of ConTeXt to directly typeset XML. Because of my very limited insights the results were poor, but I think someone with more skills could do it much better. At least the markup of the German Text Archive seems to be quite consistent. https://github.com/juh2/tei-style-dta-context http://www.deutsches-textarchiv.de/ In fact I also used the archive to make epubs with Pandoc. Happy Easter! juh ___ 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] Using command line values in a TeX document; writing a script?
Currently, I process a file like this: mtxrun --autogenerate --script context test12.tex and in the file test12.tex one sees something like this: \input archimate-mp \ctxlua{moduledata.archimate(“myarchimatefile.xml")} The latter parses the xml file and produces a PDF using generated MP code. What I would like to do is not have to edit the .tex file when I want to process another .xml file but just pass the name of the xml file on the command line. And I would like to pass on a second filename with some local overrides settings fr my code. All of this needs to be data that I can use in my programming. E.g. something like: mtxrun --autogenerate --script myscriptname “ myarchimatefile.xml” “myhelper.xml" It is OK that this would produce a fixed name output file (e.g. myparsedxml.pdf), so it is OK to have some generic myparsedxml.tex (instead of test12.tex as per my example) file that produces a .pdf and more in the current working directory but resides somewhere in a generic place. But preferably, this would produce myarchimatefile.pdf I’ve read the manual on mtxrun scripts to see if I can make my own, but I’m utterly failing to understand what is written in a way that let me write my own. 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 ___