Re: [NTG-context] Couple of questions
Am Montag, 31. Juli 2017, 08:01:49 CEST schrieb Jan Willem Flamma: > Dear Gerion, > > Add > > \setuphead[subsubsection] > [incrementnumber=no] This works :). Thank you very much! Gerion > > On 30 Jul 2017, at 22:51, Gerion Entrup <gerion.entrup-c...@flump.de> wrote: > > > > Am Samstag, 29. Juli 2017, 11:13:21 CEST schrieb Pablo Rodriguez: > >> On 07/29/2017 04:45 AM, Gerion Entrup wrote: > >>> Was not that simple, but I found the problem, that causes it: > >>> subsubsections without numbers. > >>> [...] > >>> Is there a way to fix this? > >> > >> I would say this may be a bug. > > Does someone know a way to workaround? > > > > This only way I see is to simply simulate a subsubsection (with some blanks > > and a big font). > > > > Gerion > > > > > >> I don’t know how it is implemented, but prefixsegments (or prefixes) for > >> captions only work when number is enabled. > >> > >> This makes sense if the section is part of the prefixsegments, but not > >> if it isn’t. > >> > >> Another sample that shows the problem: > >> > >>\mainlanguage[de] > >>\setupexternalfigures[location=default] > >>\setuphead[subsection][number=no] > >>\setupcaptions[prefixsegments=chapter] > >>\setuphead[subsubsection][number=yes] > >> > >>\starttext > >> > >>\chapter[title=Kapitel] > >>\placefigure{Eine Kuh}{\externalfigure[cow.pdf][scale=250]} > >> > >>\section[title=Abschnitt] > >>\placefigure{Eine Kuh}{\externalfigure[cow.pdf][scale=250]} > >> > >>\subsection[title=Hier gibt’s ein Problem] > >>\placefigure{Eine Kuh}{\externalfigure[cow.pdf][scale=250]} > >> > >>\subsection[title=Und hier gibt’s ein Problem auch] > >>\placefigure{Eine Kuh}{\externalfigure[cow.pdf][scale=250]} > >> > >>\subsubsection[title=Aber hier gibt’s kein Problem] > >>\placefigure{Eine Kuh}{\externalfigure[cow.pdf][scale=250]} > >>\stoptext > >> > >> If this isn’t a bug, the code to avoid the problem is too tricky for me > >> (and simply far beyond my knowledge). > >> > >> Excuse my ignorance, > >> > >> Pablo > >> > > > > > > ___ > > 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 > ___ ___ 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] Bibliography in MKIV, custom rendering
Am Montag, 31. Juli 2017, 04:23:16 CEST schrieb Gerion Entrup: > Hi, > > I need your help again. I've a bibliography and some entries references to > websites. Unfortunately the URL is not always rendered and the name ist > always > parsed as name of a person, not from an organisation etc. > > What I want to achieve is to use the standard aps style, but with > additionally > the following two rules: > 1. The name is always rendered without abbrevations (I guess, this is > authorconversion=normal). > 2. If an URL is given, it is always rendered. > > My input is a bib-file. Here is a minimal example: > > input.bib > ``` > @misc{objective-c, > author = "Apple Inc.", > note = "Online; accessed at 31-July-2017", > title = "About Objective-C", > url = > "https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/Introduction/Introduction.html;, > year = "2014" > } > ``` > > test.tex > ``` > \usebtxdataset[default][input.bib] > \usebtxdefinitions[aps] > \setupbtx[default:cite][alternative=num] > \setupbtx[default:list][authorconversion=normal] > > \starttext > According to Apple Inc., Objective-C is the main programming language, when > writing software for MacOS~\cite[objective-c]. > > \placelistofpublications > \stoptext > ``` > > I've tried to understand the manual, yout can see some of my attempts in the > minimal example. But I don't get really far. > > Can you give me a hint? I have "fixed" this with directly modifying the publ-imp-aps.mkvi. I guess, this is the worst way to achive this thing, but I don't know a better one. Here is the patch, if someone is interested. Gerion --- publ-imp-aps.mkvi.original 2017-07-31 21:23:14.736856430 +0200 +++ publ-imp-aps.mkvi 2017-07-31 21:24:46.860462851 +0200 @@ -58,7 +58,7 @@ \definebtx [aps:\s!list] [aps] - [\c!authorconversion=normalshort] + [\c!authorconversion=normal] \definebtx [aps:\s!list:author] @@ -1117,6 +1117,12 @@ \startsetups btx:aps:list:misc \fastsetup{btx:aps:list:electronic} +\btxdoif {url} { +\btxspace +\btxleftparenthesis +\goto{\hyphenatedurl{\btxflush{url}}}[url(\btxflush{url})] +\btxrightparenthesis +} % Note that organization is an "ignored" field. \stopsetups ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] t-vim module: math in "normal" code and background color
Hi, I have two questions with the vim module. 1. I want to use the math mode inside the code. I've seen the escape option, e.g. here [1], but this seems to work only with comments. Is there a possibility to use it directly in the code, too? Minimal example: ``` \usemodule[vim] \definevimtyping[python][syntax=python, escape=on] \starttext \startpython # Returns \m{\sum_{i=1}^{n}i} def sum_upto(\m{n \in \mathbb{N}}) r = range(1, \m{n} + 1) return sum(r) \stoppython \stoptext ``` 2. It would be cool, if I can define some background color for the code. Unfortunately I'm very new to context and haven't seen a direct option. I assume this is possible with some kind of extra environment around the code? (I've subscribed the list, so you don't have to CC me.) Thank you in advance, Gerion ___ 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] t-vim module: math in "normal" code and background color
Am Dienstag, 18. Juli 2017, 04:04:51 CEST schrieb Aditya Mahajan: > On Mon, 17 Jul 2017, Gerion Entrup wrote: > > > Hi, > > > > I have two questions with the vim module. > > > > 1. I want to use the math mode inside the code. I've seen the escape > > option, > > e.g. here [1], but this seems to work only with comments. Is there a > > possibility to use it directly in the code, too? > > Short answer. No. > > Long answer. t-vim relies on vim to syntax highlight the code. Since the > code is not valid python, the default python syntax highlighting will not > work. In principle, it is possible to write a vim syntax highlighting > script for a derivative of python where math terms are allowed, but that > requires a lot of work for each language. The whole point of t-vim module > was that I am lazy and don't want to write the parser for each language > :-) I've invested some time and rewrote parts of the vimscript file of t-vim. Now one or more escapechars can be defined, that helps vim to not interpret the text: ``` \usemodule[vim] \definevimtyping[python][syntax=python] \definevimtyping[cpp][syntax=cpp] \starttext \startpython # Returns range(°\m{\sum_{i=1}^{n}i \in F \int_i f}° def sum_upto(°\m{n \in \mathbb{N} \sum_{i=1}}°) r = range(1, °\m{n}° + °\m{\sum_{i=1} 1}°) return sum(r) \stoppython \startcpp foobar(°\m{q_0}°); \stopcpp \stoptext ``` I'm not familiar enough with TeX or ConTeXt to get the TeX part to work, so the escapechar '°' is hardcoded at the moment. If you like the patch, this has to be fixed. Another problem, as you see in the above example, is, that vim interprets the second ')' in the startcpp section as color code "Error", so the whole part is colorized. This can be circumventented with the escapechars '°"', but I have no idea how to teach tex/lua to not interpret the '"'. Simply writing -c "let escapechar='°\"'" % etc. in the t-vim.tex does not work. Another point I saw is, that highlight together with TeX-code is not really usable: ``` \usemodule[vim] \definevimtyping[python][syntax=python, escape=on] \starttext \startpython[highlight=1] # Returns \m{\sum_{i=1}^{n}i \in F \int_i f} \stoppython \stoptext ``` > > Minimal example: > > ``` > > \usemodule[vim] > > \definevimtyping[python][syntax=python, escape=on] > > > > \starttext > > \startpython > > # Returns \m{\sum_{i=1}^{n}i} > > def sum_upto(\m{n \in \mathbb{N}}) > >r = range(1, \m{n} + 1) > >return sum(r) > > \stoppython > > \stoptext > > ``` > > Another option will be to use the algorithmic module: > https://bitbucket.org/wolfs/algorithmic/src/ > > > 2. It would be cool, if I can define some background color for the code. > > Unfortunately I'm very new to context and haven't seen a direct option. I > > assume this is possible with some kind of extra environment around the code? > > You can add > > \setupbackground[background=color, backgroundcolor=gray] > > \setupvimtyping[python] > [ >before={\startbackground}, >after={\stopbackground}, > ] > > or, instead of modifying the default background, define a new background > and use that. OK, thank you. Gerion From 994de513a23210f1f4d50d24270f8f988abdd21c Mon Sep 17 00:00:00 2001 From: Gerion Entrup <gerion.ent...@flump.de> Date: Wed, 19 Jul 2017 00:13:52 +0200 Subject: [PATCH] t-vim: extended escape mode With this change it is possible to define one or more escapechars, that are used by vim to recognize parts that should not be interpreted. --- 2context.vim | 50 +- t-vim.tex| 12 ++-- 2 files changed, 35 insertions(+), 27 deletions(-) diff --git a/2context.vim b/2context.vim index 9c72ba1..b208e65 100644 --- a/2context.vim +++ b/2context.vim @@ -8,6 +8,11 @@ " output buffer. The script parses content line-by-line from the first buffer " and pastes the modified result on the second buffer. +" Compare a char of at with some Unicode +function UnicodeCompare(string, bytepos, ochar) +return strpart(a:string, a:bytepos, max([strlen(a:ochar), 1])) ==# a:ochar +endfunction + " Split screen and go to the second buffer, ensure modifiable is set, and the " buffer is empty. sblast @@ -38,9 +43,9 @@ if !exists("highlight") let highlight=[] endif -" Set escapecomments -if !exists("escapecomments") - let escapecomments=0 +" Set escapechar +if !exists("escapechar") + let escapechar='' endif let s:strip = strlen( matchstr( getline(s:lstart), '^\s*' ) ) @@ -71,37 +76,48 @@ let s:lines = [] let s:buffer_lnum = 1 let s:lnum = s:lstart +let s:lenesc = strlen(escapechar) + while s:lnum <= s:lstop
[NTG-context] Get number of chapter and section
Hi, I've another question. Currently I'm experimenting with the header and can retrieve the chapter name with \getmarkin[chapter]. How can I get the current number of the chapter (\getnumber[chapter] does not work) and the section? Regards, Gerion ___ 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] Couple of questions
Hi, this is a rather long mail, but I'll add the answers to the wiki. For the future: Should I write one mail per question or all in one? :) 1. Color of references and table of content: How can I define/change the colors of references and the table of content? And why are some references red and others green? 2. Own title format I've set an own title format for chapters, like described in the wiki. Unfortunately this applies to the table of contents and bibliography as well. Below a minimal example, that reproduces it: ``` \setupinteraction[state=start] \define[2]\MyChapter{\framed[frame=off,bottomframe=on,topframe=on] {\vbox{\headtext{chapter} #1\blank#2}}} \setuphead[chapter][command=\MyChapter, style={\switchtobodyfont[24pt,ss]}, header=empty, page=mychapterpagebreak] \setupheadtext[chapter=Chapter, content=Table of Contents] \starttext \completecontent \page[yes] \startchapter[title=foo] \stoptext ``` How can I prevent the printing of "Chapter" in the table of contents and bibliography? 3. Text size in t-vim I've defined a smaller text size in t-vim, but this seems to affect \inline... as well. Is there a way to circumvent this? Minimal example: ``` \setupinteraction[state=start] \usemodule[t-vim] \definevimtyping[python][syntax=python, style={\switchtobodyfont[8pt,tt]},] \starttext \startpython for line in foo: print(line) \stoppython This is keyword \inlinepython{in} Python. \stoptext ``` 4. Captions of combinations The wiki shows, how to completely autolabel figures in a combination with mkiv. Is there a way to simply prefix the label with a), b), c),...? Another related question: Is there a way to define the width and align of the labels of a combination? 5. Numbering of floats I want a numbering for my figures in this format: way=bychapter, prefixsegments=chapter I guess, this is the default, but I've explicitly set it. In some captions the prefix is ignored. For example there are 5 figures in chapter 2, then the captions of the figures (the text is in German) are: Abbildung 2.1 foo Abbildung 2.2 bar Abbildung 3foobar Abbildung 4otherfoo Abbildung 5lastfoo Is there anything, I can do, to prevent this? 6. Multiple references I want to create the same footnote on multiple locations in the text. Therefore I used: ``` \setupinteraction[state=start] \starttext This\footnote[letter-s]{"s" is a letter.} is\note[letter-s] a nons\note[letter-s]ens\note[letter-s]e text. \stoptext ``` But this uses different fonts for the number in the text. Is there a way to fix this or do it better? ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] t-vim module: math in "normal" code and background color
Am Mittwoch, 19. Juli 2017, 21:07:09 CEST schrieb Aditya Mahajan: > On Wed, 19 Jul 2017, Gerion Entrup wrote: > > > Am Dienstag, 18. Juli 2017, 04:04:51 CEST schrieb Aditya Mahajan: > >> On Mon, 17 Jul 2017, Gerion Entrup wrote: > >> > >>> Hi, > >>> > >>> I have two questions with the vim module. > >>> > >>> 1. I want to use the math mode inside the code. I've seen the escape > >>> option, > >>> e.g. here [1], but this seems to work only with comments. Is there a > >>> possibility to use it directly in the code, too? > >> > >> Short answer. No. > >> > >> Long answer. t-vim relies on vim to syntax highlight the code. Since the > >> code is not valid python, the default python syntax highlighting will not > >> work. In principle, it is possible to write a vim syntax highlighting > >> script for a derivative of python where math terms are allowed, but that > >> requires a lot of work for each language. The whole point of t-vim module > >> was that I am lazy and don't want to write the parser for each language > >> :-) > > > > I've invested some time and rewrote parts of the vimscript file of t-vim. > > Now one or more escapechars can be defined, that helps vim to not interpret > > the text: > > I'll look at this later > > > Another point I saw is, that highlight together with TeX-code is not really > > usable: > > ``` > > \usemodule[vim] > > \definevimtyping[python][syntax=python, escape=on] > > > > \starttext > > \startpython[highlight=1] > > # Returns \m{\sum_{i=1}^{n}i \in F \int_i f} > > \stoppython > > \stoptext > > ``` > > By default, the highlighting is done using the bars mechanism. It works > for simple cases but fails with math mode (the spaces are not covered). > One option is to highlight using the textbackground mechanism: > > \definetextbackground[texthighlight] > [ >background=color, >backgroundcolor=gray, >frame=off, > ] > > \define[1]\texthighlight{\starttexthighlight#1\stoptexthighlight} > > \usemodule[vim] > \definevimtyping[python][syntax=python, escape=on, > highlightcommand=\texthighlight] > > \starttext > > \startpython[highlight=3] > for x in 1:n >print(x) > # Returns \m{\sum_{i=1}^{n}i \in F \int_i f} > for x in 1:n >print(x) > \stoppython > \stoptext Thank you, this works much better (critic on high level: the sum symbol is higher than the highlight box, relevant on fractions). > The spacing in math mode is bad. What is happening is the following. To > make sure that spaces are obeyed in the code listing, I set (a modified > version of) \activatespacehandler{on}, so the output that you get is the > following: > > {\obeyspaces > \def\obeyedspace{\hskip\interwordspace\relax} > \m{\sum_{i=1}^{n}i \in F \int_i f}} > > The simplest way to fix this is to define a new command: > > \define[1]\MATH{\bgroup\activatespacehandler{off}\m{\rescan{#1}}\egroup} > > and use \MATH{} instead of \m{}. > > I'll test this is a bit, and if the solution is robust, then I will map > \m{...} to something equivalent to the above in the t-vim environments. I saw the strange spacing. Thank you very much to provide a solution. Gerion ___ 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] Couple of questions
Am Freitag, 28. Juli 2017, 16:34:01 CEST schrieb Pablo Rodriguez: > On 07/28/2017 02:22 AM, Gerion Entrup wrote: > > [...] > > 6. Multiple references > > I want to create the same footnote on multiple locations in the text. > > Therefore I used: > > ``` > > \setupinteraction[state=start] > > > > \starttext > > This\footnote[letter-s]{"s" is a letter.} is\note[letter-s] a > > nons\note[letter-s]ens\note[letter-s]e text. > > \stoptext > > > > ``` > > But this uses different fonts for the number in the text. Is there a way to > > fix > > this or do it better? > > Hi Gerion, > > the easiest way is to disable bold in links: > > \setupinteraction[state=start, style=] > > Or I guess you would have to enable bold in the footnote reference numbers. Ah ok, then both types of references are treated different. Your solution works, thank you. Gerion ___ 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] Couple of questions
Am Samstag, 29. Juli 2017, 11:13:21 CEST schrieb Pablo Rodriguez: > On 07/29/2017 04:45 AM, Gerion Entrup wrote: > > Was not that simple, but I found the problem, that causes it: > > subsubsections without numbers. > > [...] > > Is there a way to fix this? > > I would say this may be a bug. Does someone know a way to workaround? This only way I see is to simply simulate a subsubsection (with some blanks and a big font). Gerion > I don’t know how it is implemented, but prefixsegments (or prefixes) for > captions only work when number is enabled. > > This makes sense if the section is part of the prefixsegments, but not > if it isn’t. > > Another sample that shows the problem: > > \mainlanguage[de] > \setupexternalfigures[location=default] > \setuphead[subsection][number=no] > \setupcaptions[prefixsegments=chapter] > \setuphead[subsubsection][number=yes] > > \starttext > > \chapter[title=Kapitel] > \placefigure{Eine Kuh}{\externalfigure[cow.pdf][scale=250]} > > \section[title=Abschnitt] > \placefigure{Eine Kuh}{\externalfigure[cow.pdf][scale=250]} > > \subsection[title=Hier gibt’s ein Problem] > \placefigure{Eine Kuh}{\externalfigure[cow.pdf][scale=250]} > > \subsection[title=Und hier gibt’s ein Problem auch] > \placefigure{Eine Kuh}{\externalfigure[cow.pdf][scale=250]} > > \subsubsection[title=Aber hier gibt’s kein Problem] > \placefigure{Eine Kuh}{\externalfigure[cow.pdf][scale=250]} > \stoptext > > If this isn’t a bug, the code to avoid the problem is too tricky for me > (and simply far beyond my knowledge). > > Excuse my ignorance, > > Pablo > ___ 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] Bibliography in MKIV, custom rendering
Hi, I need your help again. I've a bibliography and some entries references to websites. Unfortunately the URL is not always rendered and the name ist always parsed as name of a person, not from an organisation etc. What I want to achieve is to use the standard aps style, but with additionally the following two rules: 1. The name is always rendered without abbrevations (I guess, this is authorconversion=normal). 2. If an URL is given, it is always rendered. My input is a bib-file. Here is a minimal example: input.bib ``` @misc{objective-c, author = "Apple Inc.", note = "Online; accessed at 31-July-2017", title = "About Objective-C", url = "https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/Introduction/Introduction.html;, year = "2014" } ``` test.tex ``` \usebtxdataset[default][input.bib] \usebtxdefinitions[aps] \setupbtx[default:cite][alternative=num] \setupbtx[default:list][authorconversion=normal] \starttext According to Apple Inc., Objective-C is the main programming language, when writing software for MacOS~\cite[objective-c]. \placelistofpublications \stoptext ``` I've tried to understand the manual, yout can see some of my attempts in the minimal example. But I don't get really far. Can you give me a hint? Gerion ___ 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] Couple of questions
Am Freitag, 28. Juli 2017, 17:05:59 CEST schrieb Pablo Rodriguez: > On 07/28/2017 02:22 AM, Gerion Entrup wrote: > > 2. Own title format > > I've set an own title format for chapters, like described in the wiki. > > Unfortunately this applies to the table of contents and bibliography as > > well. > > Below a minimal example, that reproduces it: > > ``` > > \setupinteraction[state=start] > > > > \define[2]\MyChapter{\framed[frame=off,bottomframe=on,topframe=on] > > {\vbox{\headtext{chapter} #1\blank#2}}} > > > > \setuphead[chapter][command=\MyChapter, style={\switchtobodyfont[24pt,ss]}, > > header=empty, page=mychapterpagebreak] > > \setupheadtext[chapter=Chapter, content=Table of Contents] > > > > \starttext > > \completecontent > > \page[yes] > > > > \startchapter[title=foo] > > > > \stoptext > > ``` > > How can I prevent the printing of "Chapter" in the table of contents and > > bibliography? > > Hi Gerion, > > play with the sample, in order to see what fits you best: > > \setupinteraction[state=start] > > \define[2]\MyChapter{\framed[frame=off,bottomframe=on,topframe=on] > {\vbox{\headtext{chapter} #1\blank[small]#2}}} > > \setuphead[chapter][command=\MyChapter, > style={\switchtobodyfont[24pt,ss]}, header=empty, page=mychapterpagebreak] > > \startsectionblockenvironment[bodypart] > \setupheadtext[chapter=Chapter] > \stopsectionblockenvironment > > \startsectionblockenvironment[appendix] > \setupheadtext[chapter=Appendix] > \stopsectionblockenvironment > > \starttext > \startfrontmatter > \chapter{Table of Contents}\placecontent > \stopfrontmatter > > \startbodymatter > \startchapter[title=foo] > \stopbodymatter > > \startappendices > \chapter{Bibliography} > \stopappendices > > \startbackmatter > \chapter{Bibliography} > \stopbackmatter > > \stoptext Thank you, that works for me. > > 5. Numbering of floats > > I want a numbering for my figures in this format: > > way=bychapter, prefixsegments=chapter > > > > I guess, this is the default, but I've explicitly set it. > > In some captions the prefix is ignored. For example there are 5 figures in > > chapter 2, then the captions of the figures (the text is in German) are: > > Abbildung 2.1 foo > > Abbildung 2.2 bar > > Abbildung 3foobar > > Abbildung 4otherfoo > > Abbildung 5lastfoo > > > > Is there anything, I can do, to prevent this? > > I cannot reproduce the problem you mention: > > \mainlanguage[de] > \starttext > \dorecurse{5}{\chapter{Kapitel} > \placefigure{Eine Kuh}{\externalfigure[cow.pdf]}} > \chapter{Kapitel} > \dorecurse{5}{\placefigure{Eine andere Kuh} > {\externalfigure[cow.pdf]}} > \dorecurse{5}{\chapter{Kapitel} > \placefigure{Noch eine andere Kuh}{\externalfigure[cow.pdf]}} > \stoptext > > In general, please provide minimal samples of code that show your problem. Was not that simple, but I found the problem, that causes it: subsubsections without numbers. Here is a minimal example: ``` \mainlanguage[de] \setuphead[subsubsection][number=off] \setupcaptions[way=bychapter, prefixsegments=chapter] \starttext \startchapter[title=Kapitel] \placefigure{Eine Kuh}{\externalfigure[cow.pdf]} \startsection[title=Abschnitt] \startsubsection[title=Unterabschnitt] \placefigure{Eine Kuh}{\externalfigure[cow.pdf]} \startsubsubsection[title=Und hier gibts ein Problem] \placefigure{Eine Kuh}{\externalfigure[cow.pdf]} \stopsubsubsection \startsubsubsection[title=Und hier gibts ein Problem] \stopsubsubsection \stopsubsection \stopsection \stopchapter \stoptext ``` Is there a way to fix this? Gerion ___ 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] TikZ module not found (TeX Live problem?)
Good day, I'm very new to ConTeXt, so maybe this is a fairly simple question. I want to use TikZ in the document. The specific part of the document is: snip \usemodule[tikz] \usetikzlibrary[positioning] /snip - The problem seems to be that ConTeXt does not find the TikZ module. I use mkiv. The relevant output: snip - % context test-document.tex mtx-context | run 1: luatex --fmt="/home/gerion/.texlive/texmf-var/luatex-cache/context/0399a8df3aef8d154781d0a9c2b8e28d/formats/luatex/cont-en" --jobname="test-document" --lua="/home/gerion/.texlive/texmf-var/luatex-cache/context/0399a8df3aef8d154781d0a9c2b8e28d/formats/luatex/cont-en.lui" --no-parse-first-line --c:currentrun=1 --c:fulljobname="./test-document.tex" --c:input="./test-document.tex" --c:kindofrun=1 --c:maxnofruns=9 "cont-yes.mkiv" This is LuaTeX, Version 1.0.4 (TeX Live 2017) system commands enabled. open source > 1 > 1 > /usr/share/texmf-dist/tex/context/base/mkiv/cont-yes.mkiv ConTeXt ver: 2016.05.17 19:20 MKIV current fmt: 2017.6.11 int: english/english system > 'cont-new.mkiv' loaded open source > 2 > 2 > /usr/share/texmf-dist/tex/context/base/mkiv/cont-new.mkiv close source> 2 > 2 > /usr/share/texmf-dist/tex/context/base/mkiv/cont-new.mkiv system > files > jobname 'test-document', input './test-document', result 'test-document' fonts > latin modern fonts are not preloaded languages > language 'en' is active open source > 2 > 3 > /home/gerion/sourcecode/grisu/test-document/test-document.tex colors > 'rgb' color space is supported colors > 'cmyk' color space is supported resolvers > modules > 'tikz' is not found tex error > tex error on line 6 in file /home/gerion/sourcecode/test-document/test-document.tex: ! Undefined control sequence \usetikzlibrary l.6 \usetikzlibrary [positioning] 1 \mainlanguage[de] 2 3 \setupcolors[state=start] 4 5 \usemodule[tikz] 6 >> \usetikzlibrary[positioning] 7 - /snip - Using TikZ within LaTeX is no problem in this distribution. Is this a problem of TeX Live (or the distribution packaging)? I've looked in the installed files of texlive-context and other modules are installed, even modules that require TikZ (eg. gantt). Thanks in advance, Gerion ___ 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] TikZ module not found (TeX Live problem?)
Am Dienstag, 20. Juni 2017, 11:45:19 CEST schrieb Henri Menke: > On Mon, 2017-06-19 at 02:34 +0200, Gerion Entrup wrote: > > Good day, > > > > I'm very new to ConTeXt, so maybe this is a fairly simple question. > > > > I want to use TikZ in the document. The specific part of the document is: > > snip > > \usemodule[tikz] > > \usetikzlibrary[positioning] > > /snip - > > > > The problem seems to be that ConTeXt does not find the TikZ module. I use > > mkiv. The relevant > > output: > > snip - > > % context test-document.tex > > > > mtx-context | run 1: luatex > > --fmt="/home/gerion/.texlive/texmf-var/luatex- > > cache/context/0399a8df3aef8d154781d0a9c2b8e28d/formats/luatex/cont-en" > > --jobname="test-document" > > --lua="/home/gerion/.texlive/texmf-var/luatex- > > cache/context/0399a8df3aef8d154781d0a9c2b8e28d/formats/luatex/cont-en.lui" > > --no-parse-first-line > > --c:currentrun=1 --c:fulljobname="./test-document.tex" > > --c:input="./test-document.tex" -- > > c:kindofrun=1 --c:maxnofruns=9 "cont-yes.mkiv" > > This is LuaTeX, Version 1.0.4 (TeX Live 2017) > > system commands enabled. > > open source > 1 > 1 > > > /usr/share/texmf-dist/tex/context/base/mkiv/cont-yes.mkiv > > > > ConTeXt ver: 2016.05.17 19:20 MKIV current fmt: 2017.6.11 int: > > english/english > > > > system > 'cont-new.mkiv' loaded > > open source > 2 > 2 > > > /usr/share/texmf-dist/tex/context/base/mkiv/cont-new.mkiv > > close source> 2 > 2 > > > /usr/share/texmf-dist/tex/context/base/mkiv/cont-new.mkiv > > system > files > jobname 'test-document', input './test-document', > > result 'test-document' > > fonts > latin modern fonts are not preloaded > > languages > language 'en' is active > > open source > 2 > 3 > > > /home/gerion/sourcecode/grisu/test-document/test-document.tex > > colors > 'rgb' color space is supported > > colors > 'cmyk' color space is supported > > resolvers > modules > 'tikz' is not found > > > > tex error > tex error on line 6 in file > > /home/gerion/sourcecode/test-document/test- > > document.tex: ! Undefined control sequence > > > > \usetikzlibrary > > > > l.6 \usetikzlibrary > > [positioning] > > > > 1 \mainlanguage[de] > > 2 > > 3 \setupcolors[state=start] > > 4 > > 5 \usemodule[tikz] > > 6 >> \usetikzlibrary[positioning] > > 7 > > - /snip - > > > > Using TikZ within LaTeX is no problem in this distribution. Is this a > > problem of TeX Live (or the > > distribution packaging)? > > I've looked in the installed files of texlive-context and other modules are > > installed, even > > modules that require TikZ (eg. gantt). > > With TL 2017 the following example works as without problems. Post a minimal > example to reproduce > your problem, otherwise we can't help you. Also, your problem suggests a > faulty TL installation. > > \usemodule[tikz] > \usetikzlibrary[positioning] > > \starttext > > \tikz\node{Hello World!}; > > \stoptext Thanks so far. This exact example leads to the same error: --- snip -- % context test.tex mtx-context | run 1: luatex --fmt="/home/gerion/.texlive/texmf-var/luatex-cache/context/0399a8df3aef8d154781d0a9c2b8e28d/formats/luatex/cont-en" --jobname="test" --lua="/home/gerion/.texlive/texmf-var/luatex-cache/context/0399a8df3aef8d154781d0a9c2b8e28d/formats/luatex/cont-en.lui" --no-parse-first-line --c:currentrun=1 --c:fulljobname="./test.tex" --c:input="./test.tex" --c:kindofrun=1 --c:maxnofruns=9 "cont-yes.mkiv" This is LuaTeX, Version 1.0.4 (TeX Live 2017) system commands enabled. open source > 1 > 1 > /usr/share/texmf-dist/tex/context/base/mkiv/cont-yes.mkiv ConTeXt ver: 2016.05.17 19:20 MKIV current fmt: 2017.6.11 int: english/english system > 'cont-new.mkiv' loaded open source > 2 > 2 > /usr/share/texmf-dist/tex/context/base/mkiv/cont-new.mkiv close source> 2 > 2 > /usr/share/texmf-dist/tex/context/base/mkiv/cont-new.mkiv system > files > jobname 'test', input './test', result 'test' fonts > latin modern fonts are not preloaded languages > language 'en' is active
Re: [NTG-context] TikZ module not found (TeX Live problem?)
Am Dienstag, 20. Juni 2017, 13:25:42 CEST schrieb Gerion Entrup: > Am Dienstag, 20. Juni 2017, 11:45:19 CEST schrieb Henri Menke: > > On Mon, 2017-06-19 at 02:34 +0200, Gerion Entrup wrote: > > > Good day, > > > > > > I'm very new to ConTeXt, so maybe this is a fairly simple question. > > > > > > I want to use TikZ in the document. The specific part of the document is: > > > snip > > > \usemodule[tikz] > > > \usetikzlibrary[positioning] > > > /snip - > > > > > > The problem seems to be that ConTeXt does not find the TikZ module. I use > > > mkiv. The relevant > > > output: > > > snip - > > > % context test-document.tex > > > > > > mtx-context | run 1: luatex > > > --fmt="/home/gerion/.texlive/texmf-var/luatex- > > > cache/context/0399a8df3aef8d154781d0a9c2b8e28d/formats/luatex/cont-en" > > > --jobname="test-document" > > > --lua="/home/gerion/.texlive/texmf-var/luatex- > > > cache/context/0399a8df3aef8d154781d0a9c2b8e28d/formats/luatex/cont-en.lui" > > > --no-parse-first-line > > > --c:currentrun=1 --c:fulljobname="./test-document.tex" > > > --c:input="./test-document.tex" -- > > > c:kindofrun=1 --c:maxnofruns=9 "cont-yes.mkiv" > > > This is LuaTeX, Version 1.0.4 (TeX Live 2017) > > > system commands enabled. > > > open source > 1 > 1 > > > > /usr/share/texmf-dist/tex/context/base/mkiv/cont-yes.mkiv > > > > > > ConTeXt ver: 2016.05.17 19:20 MKIV current fmt: 2017.6.11 int: > > > english/english > > > > > > system > 'cont-new.mkiv' loaded > > > open source > 2 > 2 > > > > /usr/share/texmf-dist/tex/context/base/mkiv/cont-new.mkiv > > > close source> 2 > 2 > > > > /usr/share/texmf-dist/tex/context/base/mkiv/cont-new.mkiv > > > system > files > jobname 'test-document', input > > > './test-document', result 'test-document' > > > fonts > latin modern fonts are not preloaded > > > languages > language 'en' is active > > > open source > 2 > 3 > > > > /home/gerion/sourcecode/grisu/test-document/test-document.tex > > > colors > 'rgb' color space is supported > > > colors > 'cmyk' color space is supported > > > resolvers > modules > 'tikz' is not found > > > > > > tex error > tex error on line 6 in file > > > /home/gerion/sourcecode/test-document/test- > > > document.tex: ! Undefined control sequence > > > > > > \usetikzlibrary > > > > > > l.6 \usetikzlibrary > > > [positioning] > > > > > > 1 \mainlanguage[de] > > > 2 > > > 3 \setupcolors[state=start] > > > 4 > > > 5 \usemodule[tikz] > > > 6 >> \usetikzlibrary[positioning] > > > 7 > > > - /snip - > > > > > > Using TikZ within LaTeX is no problem in this distribution. Is this a > > > problem of TeX Live (or the > > > distribution packaging)? > > > I've looked in the installed files of texlive-context and other modules > > > are installed, even > > > modules that require TikZ (eg. gantt). > > > > With TL 2017 the following example works as without problems. Post a > > minimal example to reproduce > > your problem, otherwise we can't help you. Also, your problem suggests a > > faulty TL installation. > > > > \usemodule[tikz] > > \usetikzlibrary[positioning] > > > > \starttext > > > > \tikz\node{Hello World!}; > > > > \stoptext > Thanks so far. This exact example leads to the same error: > --- snip -- > % context test.tex > > mtx-context | run 1: luatex > --fmt="/home/gerion/.texlive/texmf-var/luatex-cache/context/0399a8df3aef8d154781d0a9c2b8e28d/formats/luatex/cont-en" > --jobname="test" > --lua="/home/gerion/.texlive/texmf-var/luatex-cache/context/0399a8df3aef8d154781d0a9c2b8e28d/formats/luatex/cont-en.lui" > --no-parse-first-line --c:currentrun=1 --c:fulljobname="./test.tex" > --c:input="./test.tex" --c:kindofrun=1 --c:maxnofruns=9 "cont-yes.mkiv" > This is LuaTeX, Version 1.0.4 (TeX Live 2017) > system commands enabled. > open source > 1
Re: [NTG-context] TikZ module not found (TeX Live problem?)
Am Dienstag, 20. Juni 2017, 16:15:59 CEST schrieb Gerion Entrup: > Am Dienstag, 20. Juni 2017, 13:25:42 CEST schrieb Gerion Entrup: > > Am Dienstag, 20. Juni 2017, 11:45:19 CEST schrieb Henri Menke: > > > On Mon, 2017-06-19 at 02:34 +0200, Gerion Entrup wrote: > > > > Good day, > > > > > > > > I'm very new to ConTeXt, so maybe this is a fairly simple question. > > > > > > > > I want to use TikZ in the document. The specific part of the document > > > > is: > > > > snip > > > > \usemodule[tikz] > > > > \usetikzlibrary[positioning] > > > > /snip - > > > > > > > > The problem seems to be that ConTeXt does not find the TikZ module. I > > > > use mkiv. The relevant > > > > output: > > > > snip - > > > > % context test-document.tex > > > > > > > > mtx-context | run 1: luatex > > > > --fmt="/home/gerion/.texlive/texmf-var/luatex- > > > > cache/context/0399a8df3aef8d154781d0a9c2b8e28d/formats/luatex/cont-en" > > > > --jobname="test-document" > > > > --lua="/home/gerion/.texlive/texmf-var/luatex- > > > > cache/context/0399a8df3aef8d154781d0a9c2b8e28d/formats/luatex/cont-en.lui" > > > > --no-parse-first-line > > > > --c:currentrun=1 --c:fulljobname="./test-document.tex" > > > > --c:input="./test-document.tex" -- > > > > c:kindofrun=1 --c:maxnofruns=9 "cont-yes.mkiv" > > > > This is LuaTeX, Version 1.0.4 (TeX Live 2017) > > > > system commands enabled. > > > > open source > 1 > 1 > > > > > /usr/share/texmf-dist/tex/context/base/mkiv/cont-yes.mkiv > > > > > > > > ConTeXt ver: 2016.05.17 19:20 MKIV current fmt: 2017.6.11 int: > > > > english/english > > > > > > > > system > 'cont-new.mkiv' loaded > > > > open source > 2 > 2 > > > > > /usr/share/texmf-dist/tex/context/base/mkiv/cont-new.mkiv > > > > close source> 2 > 2 > > > > > /usr/share/texmf-dist/tex/context/base/mkiv/cont-new.mkiv > > > > system > files > jobname 'test-document', input > > > > './test-document', result 'test-document' > > > > fonts > latin modern fonts are not preloaded > > > > languages > language 'en' is active > > > > open source > 2 > 3 > > > > > /home/gerion/sourcecode/grisu/test-document/test-document.tex > > > > colors > 'rgb' color space is supported > > > > colors > 'cmyk' color space is supported > > > > resolvers > modules > 'tikz' is not found > > > > > > > > tex error > tex error on line 6 in file > > > > /home/gerion/sourcecode/test-document/test- > > > > document.tex: ! Undefined control sequence > > > > > > > > \usetikzlibrary > > > > > > > > l.6 \usetikzlibrary > > > > [positioning] > > > > > > > > 1 \mainlanguage[de] > > > > 2 > > > > 3 \setupcolors[state=start] > > > > 4 > > > > 5 \usemodule[tikz] > > > > 6 >> \usetikzlibrary[positioning] > > > > 7 > > > > - /snip - > > > > > > > > Using TikZ within LaTeX is no problem in this distribution. Is this a > > > > problem of TeX Live (or the > > > > distribution packaging)? > > > > I've looked in the installed files of texlive-context and other modules > > > > are installed, even > > > > modules that require TikZ (eg. gantt). > > > > > > With TL 2017 the following example works as without problems. Post a > > > minimal example to reproduce > > > your problem, otherwise we can't help you. Also, your problem suggests a > > > faulty TL installation. > > > > > > \usemodule[tikz] > > > \usetikzlibrary[positioning] > > > > > > \starttext > > > > > > \tikz\node{Hello World!}; > > > > > > \stoptext > > Thanks so far. This exact example leads to the same error: > > --- snip -- > > % context test.tex > > > > mtx-context | run 1: luatex > > --fmt="/home/gerion/.tex
[NTG-context] Fwd: Re: x mark symbol and general symbol guide
Hans already answered my question. Thank you! Gerion -- Forwarded Message -- Subject: Re: [NTG-context] x mark symbol and general symbol guide Date: Freitag, 13. Oktober 2023, 18:13:42 CEST From: Hans Hagen To: Gerion Entrup On 10/13/2023 2:33 PM, Gerion Entrup wrote: > Hi, > > I recently tried to typeset a table with checkmarks and x marks. > \checkmark exists but is there a predefined x mark symbol (\xmark does > not work)? > > In general: For LaTeX there exists the very helpful comprehensive LaTeX > symbol list [1]. > Is there a similar documentation for ConTeXt somewhere? \usesymbols[fontawesome] \startTEXpage[offset=1ts] \symbol[fontawesome-solid][times]\quad \symbol[fontawesome-solid][check] \stopTEXpage you can run symb-imp-fontawesome and get a list 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 - - symbols.pdf Description: Adobe PDF document signature.asc Description: This is a digitally signed message part. ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] x mark symbol and general symbol guide
Hi, I recently tried to typeset a table with checkmarks and x marks. \checkmark exists but is there a predefined x mark symbol (\xmark does not work)? In general: For LaTeX there exists the very helpful comprehensive LaTeX symbol list [1]. Is there a similar documentation for ConTeXt somewhere? Best, Gerion [1] https://www.ctan.org/pkg/comprehensive signature.asc Description: This is a digitally signed message part. ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Nested aligns in formulasjj
Hi, I try to typeset a nested align in a formula. However, the results looks really wrong. Here is a MWE: ``` \starttext \startformula \startalign \NC a = \NC (b, c) \quad \text{with}\NR \NC \NC \startalign \NC b \NC = something \NR \NC c \NC = someother \NR \stopalign \NR \NC somelong = \NC bla \NR \stopalign \stopformula \stoptext ``` Am I doing something wrong or are nested aligns not possible? Best, Gerion test.pdf Description: Adobe PDF document signature.asc Description: This is a digitally signed message part. ___ 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] Link from a PDF to a reference of an embedded PDF
Hi, I found the "interaction" parameter in the documentation for setupexternalfigure/externalfigure [1]. I, however do not quite understand it. When embedding another PDF with this command, it seems to be possible to include the references of the underlying PDF. It is possible to link to them within the main context document? In [2], I found something maybe related but it requires a tuc file. Example: inner.tex: ``` \starttext \startsection[title=References, reference=sec:ref] Some text \placeformula[eq:foo] \startformula 1 + 2 = 3 \stopformula or: \startitemize[n] \item[item:bla] bla \item[item:blub] blub \stopitemize Find all references \in[sec:ref], \in[eq:foo], \in[item:bla], \in[item:blub]. \stoptext ``` outer.tex: ``` \starttext \externalfigure[inner.pdf][width=10cm, interactive=reference] Find all references \in[sec:ref], \in[eq:foo], \in[item:bla], \in[item:blub]. \stoptext ``` Can I somehow access the references of inner.tex from outer.tex? For me, it is not that relevant, that the correct number is set, but the interaction within the outer PDF should work, so clicking on the reference should scroll to the correct content. Background of my question: I normally do graphics in a separate PDFs. Some graphics consists of source code together with a graphical representation and I want to be able to link to single source code lines. Gerion [1] https://wiki.contextgarden.net/Command/setupexternalfigure [2] https://wiki.contextgarden.net/References#References_to_an_external_file signature.asc Description: This is a digitally signed message part. ___ 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] Re: floatcombinations seem to not work correctly after lmtx update
Am Montag, 19. Juni 2023, 13:53:02 CEST schrieb Gerion Entrup via ntg-context: > In this minimal example everything works. However, in my real document > the subfigures have enormous space between them so just two pictures are > visible (see the attached png). I finally found the cause. I had these lines in my header: ``` \setupcaptions[minwidth=0.95\textwidth, way=bychapter, prefixsegments=chapter] ``` In the new context, this seem to apply to all captions, while in the old context, it seems to apply only to those captions that are not specified otherwise. Best Gerion signature.asc Description: This is a digitally signed message part. ___ 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] Re: Link from a PDF to a reference of an embedded PDF
Hi Pablo, > not sure I’m getting your point right. Thank you for the detailed answer. But I fear, I have not expressed myself precise enough. The solution that you described does not directly fit to my setting. I'll try to rephrase. Maybe it gets more clear then. I think, named destinations could be a important part in the solution. I'm do not know the structure of PDFs exactly, therefore some of my terms might be wrong. I'll name the two things from now on the following way: - a destination: This is a defined position within a PDF document; so some position that a PDF viewer is able to jump to. In ConTeXt, you can set such a position most of the time with the "reference" keyword. In LaTeX, you use \label. - a reference: This is a link that you can click on and cause the PDF viewer to jump/scroll to the linked destination. In ConTeXt, you can use \in to create a reference. In LaTeX, you use \ref. The situation is that I have a PDF-document (inner.pdf) that defines several destinations and I want to embed that document with \externalfigure into another PDF-document (outer.pdf). My question is: Is it possible to create references within the source code of outer.pdf that correctly set a link to a destination that is defined in inner.pdf? Asked in another way: Is is possible that \externalfigure can extract the (maybe named) destinations of inner.pdf and translate them in such a way, that I can use \in within the outer document to link to them. Gerion signature.asc Description: This is a digitally signed message part. ___ 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] Re: Nested aligns in formulasjj
Am Montag, 14. August 2023, 13:44:44 CEST schrieb Mikael Sundqvist: > Hi, > > I do not understand what you want to have, so here is just something > weird, but probably you look for simplealign. > > \definemathsimplealign > [whatever] > > \starttext > \startformula > \startalign > \NC a = \NC (b, c) \quad \mtext{with}\NR > \NC \NC \startwhatever > \NC b \NC = something \NR > \NC c \NC = someother \NR > \stopwhatever \NR > \NC somelong = \NC bla \NR > \stopalign > \stopformula > \stoptext Thanks, this looks exactly like that what I want. However, this does not really nest aligns, but defines a new alignment group/environment (if I interpret it correctly). But after all, it is a viable workaround. Gerion signature.asc Description: This is a digitally signed message part. ___ 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] Re: Nested aligns in formulasjj
Am Montag, 14. August 2023, 13:33:33 CEST schrieb Hans Hagen: > On 8/14/2023 1:16 PM, Gerion Entrup wrote: > > Hi, > > > > I try to typeset a nested align in a formula. However, the results looks > > really wrong. Here is a MWE: > > > > ``` > > \starttext > > \startformula > > \startalign > > \NC a = \NC (b, c) \quad \text{with}\NR > > \NC \NC \startalign > > \NC b \NC = something \NR > > \NC c \NC = someother \NR > > \stopalign \NR > > \NC somelong = \NC bla \NR > > \stopalign > > \stopformula > > \stoptext > > ``` > > Am I doing something wrong or are nested aligns not possible? > it will work if you configure the inner align to be tight (i delegate > that answer) > > \startformula > a = \alignhere (b, c) \quad \text{with} >\breakhere b = \text{something} >\breakhere c = \text{someother} >\breakhere > \text{somelong} = \alignhere bla > \stopformula > > might be okay for your purpose Thanks, but unfortunately not. I guess, I simplified the MWE too much. This does not align the b and c. It should become clear here: ``` \startformula a = \alignhere (b, thisislonger) \quad \text{with} \breakhere b = \text{something} \breakhere thisislonger = \text{someother} \breakhere \text{somelong} = \alignhere bla \stopformula ``` Gerion signature.asc Description: This is a digitally signed message part. ___ 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] Re: LMTX: Command handling, Interface between TeX and Lua
Am Mittwoch, 13. Dezember 2023, 21:57:35 CET schrieb Bruce Horrocks: > > > On 13 Dec 2023, at 17:13, Gerion Entrup wrote: > > > > Is there a simple way to define a new command/environment and handle > > the keyword arguments in Lua? For example defining a frontend command > > like this: > > I don't have the answer to your other questions but I do have an example for > this one. > It's not mine - I'm fairly sure it came from this list but I can't find who > that was any more. > > \startluacode > userdata = userdata or { } > > function userdata.mycommand(keywords, keyvals, str) > keyword_options = utilities.parsers.settings_to_array(keywords) > named_values = utilities.parsers.settings_to_hash(keyvals) > > context('First option = ' .. keyword_options[1]) > context('\\par') > context('Color chosen = ' .. named_values['color']) > context('\\par') > context('Curly braces = ' .. str) > context('\\par') > end > \stopluacode > > \def\mycommand[#1][#2]#3{\ctxlua{ > userdata.mycommand('#1', '#2', [==[#3]==])}} > > \starttext > \mycommand[top, inmargin, now][color=green, roof=gabled]{Anne of Green > Gables?} > \stoptext Thank you. That helps a lot already! Gerion signature.asc Description: This is a digitally signed message part. ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] LMTX: Command handling, Interface between TeX and Lua
Hi, I'd like to understand more of the inner workings of LMTX. When I understand it right, most of the code is now processed in Lua but I was not able to find it. For example, I tried to find out how setupitemgroup is handled (just as an example of a more complex command). The wiki has a (kind of) autogenerated description: https://wiki.contextgarden.net/Command/setupitemgroup I found the data for this (at least this is my guess) here: tex/texmf-context/tex/context/interface/mkiv/i-itemgroup.xml Are these xml files created by hand or somehow generated? Now, when I use `\setupitemgroup[itemize:1][symbol=3,itemalign=middle]`: How are the arguments handled and is this a generic process or specific to each command? Is there a simple way to define a new command/environment and handle the keyword arguments in Lua? For example defining a frontend command like this: \startsomething[firstword={Some},secondword={Text}] Body \stopsomething which I can handle in some lua code like this: function something(firstword, secondword, body) tex.print(firstword) tex.print(secondword) tex.print(body) end Are there any resources beside the context code itself where I can learn that? Gerion signature.asc Description: This is a digitally signed message part. ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Suggestions and problems of the manuals
ollected, 0 deltas, 0 shared partials, 0 partial entries mkiv lua stats > used platform: linux-64, type: unix, binary subtree: texmf-linux-64 mkiv lua stats > used engine: luametatex version: 2.10.11, functionality level: 20231231, format id: 698, compiler: gcc mkiv lua stats > tex properties: 807097 hash slots used of 2097152, 50666 control sequences, approximate memory usage: 49 MB mkiv lua stats > lua properties: engine: lua 5.4, used memory: 84 MB, ctx: 80 MB, max: 80 MB, symbol mask: utf (τεχ) mkiv lua stats > runtime: 0.528 seconds, 1 processed pages, 1 shipped pages, 1.895 pages/second mtx-context | purged files: math-mkiv-t-b-ce3b35636ef01ee62897a2beb76049e0.log, math-mkiv-t-b-ce3b35636ef01ee62897a2beb76049e0.tmp, math-mkiv-t-b-ce3b35636ef01ee62897a2beb76049e0.tuc system | total runtime: 1.044 seconds of 1.071 seconds buffers > typeset > no changes in 'demo-4', processing skipped floatblocks > '3' limited floatblocks > 3 saved pages > flushing realpage 14, userpage 12, subpage 14 floatblocks > 1 moved floatblocks > 2 moved floatblocks > 3 moved pages > flushing realpage 15, userpage 13, subpage 15 pages > flushing realpage 16, userpage 14, subpage 16 pages > flushing realpage 17, userpage 15, subpage 17 pages > flushing realpage 18, userpage 16, subpage 18 pages > flushing realpage 19, userpage 17, subpage 19 structure > sectioning > section @ level 3 : 0.3.1 -> Scripts tex error > tex error on line 370 in file /home/gerion/src/context/doc/context/sources/general/manuals/math/math-spacing.tex: Math error: parameter 'subshiftdown' with id 49 in style 2 is not set \math_m_nop #1->\relax \ifmmode #1\else \normalstartimath \usemathstyleparameter \mathematicsparameter \c!mathstyle \expand \everyinsidemathematics \relax \begingroup #1\endgroup \normalstopimath \fi {\switchtobodyfont [cambria]\math{F_j = \int\nolimits _a^b} } {Cambria} 360 font can be very detailed in where italic correction is to be applied and how 361 advanced stepwise kerns are used, but not many fonts have extensive information. 362 Here are some differences in rendering. In \OPENTYPE\ the super- and subscript of 363 an integral are moved right and left half of the italic correction. 364 365 \startlinecorrection 366 \startcombination[6*1] 367 {\switchtobodyfont [modern]\math{F_j = \int\nolimits _a^b}} {Latin Modern} 368 {\switchtobodyfont [pagella]\math{F_j = \int\nolimits _a^b}} {Pagella} 369 {\switchtobodyfont [dejavu]\math{F_j = \int\nolimits _a^b}} {Dejavu} 370 >> {\switchtobodyfont [cambria]\math{F_j = \int\nolimits _a^b}} {Cambria} 371 {\switchtobodyfont[lucidaot]\math{F_j = \int\nolimits _a^b}} {Lucida OT} 372 {\switchtobodyfont[xits]\math{F_j = \int\nolimits _a^b}} {Xits} 373 \stopcombination 374 \stoplinecorrection 375 376 \stopsection 377 378 \startsection[title=Bad fonts] 379 380 There might be fonts out there where the italic correction is supposed to be Sorry, but I can't typeset math unless various parameters have been set. This is normally done by loading special math fonts into the math family slots. Your font set is lacking at least the parameter mentioned earlier. mtx-context | fatal error: return code: 1 - I tried to find a prebuild version and found https://mirror.contextgarden.net/general/manuals/math-mkiv.pdf. However, this document seems to be from 2021 and has a kind of wobbly rendering in Okular/Poppler (I remember the same phenomena with early LMTX). See the screenshot attached (math-mkiv-online.png). Is there a newer version somewhere? Maybe it is meaningful to delete the old version. Best Gerion From 187f2bf0901d414bf55869054d29ee2c4bec1a64 Mon Sep 17 00:00:00 2001 From: Gerion Entrup Date: Tue, 16 Jan 2024 23:40:40 +0100 Subject: [PATCH] units-mkiv: improve - typos - remove getbuffer without context - demonstrate usage of pm and to --- doc/context/sources/general/manuals/units/units-mkiv.tex | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/doc/context/sources/general/manuals/units/units-mkiv.tex b/doc/context/sources/general/manuals/units/units-mkiv.tex index d70c7221f..a1631aadb 100644 --- a/doc/context/sources/general/manuals/units/units-mkiv.tex +++ b/doc/context/sources/general/manu
[NTG-context] Re: Fwd: Re: x mark symbol and general symbol guide
Am Donnerstag, 11. Januar 2024, 15:56:32 CET schrieb Gerion Entrup: > Am Dienstag, 9. Januar 2024, 21:17:57 CET schrieb Hans Hagen: > > On 1/9/2024 8:31 PM, Gerion Entrup wrote: > > > > > My system awesome font is version 6 but isn't the one bundled with > > > ConTeXt version 5 (FontAwesome.otf)? This one: > > > tex/texmf/fonts/data/fonticons/fontawesome/FontAwesome.otf: OpenType font > > > data > > > > > > I would assume that ConTeXt is using the bundled file by default. > > It's not our hobby to keep up with font versions and changing names so > > we depend on users to signal that. Also, with fonts you never know what > > updated fonts will break. > > > > In a next upload we'll define a list of names [5-9] so that we're more > > future proof. > > Thanks. > > Sure, it was my interest to understand, if the error lays in my > installation or is due to the predefined files. Especially, since I did > not manage to display a single symbol of FontAwesome at all, not even > the one that seems to be explicitly defined. > > For me, it is not relevant at all, in which version the font is. > My main interest is to get an \xmark symbol. FontAwesome works with the new version 2024.01.18 (the times symbol is not present but an xmark symbol directly). Thank you! Gerion signature.asc Description: This is a digitally signed message part. ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: Fwd: Re: x mark symbol and general symbol guide
Hi, I have to come back to that topic, since it seems not to work. The said source code produces just the text "times" and "check" for me (see 1.pdf). I also tried: ``` \usesymbols[fontawesome] \starttext \showsymbolset[fontawesome-solid] \stoptext ``` and get a list of symbols that do not belong to fontawesome (see 2.pdf). I also tried to find the symbol file directly in the context distribution and found: tex/texmf-context/tex/context/base/mkiv/symb-imp-fontawesome.mkiv However, most parts are commented out there, one of the few remaining symbols is wheelchair. However, when using that, I just got the string _378 (3.pdf). Source code: ``` \usesymbols[fontawesome] \startTEXpage[offset=1pt] \symbol[fontawesome][wheelchair] \stopTEXpage ``` Is there a problem with my installation? Additional output: ``` % mtxrun --script fonts --list --all --pattern='fontawesome' identifier familyname fontname filename subfont instances fontawesomefontawesome fontawesome FontAwesome.otf fontawesome6brands fontawesome6brands fontawesome6brandsregular /usr/share/fonts/fontawesome/Font Awesome 6 Brands-Regular-400.otf fontawesome6brandsnormal fontawesome6brands fontawesome6brandsregular /usr/share/fonts/fontawesome/Font Awesome 6 Brands-Regular-400.otf fontawesome6freenormal fontawesome6free fontawesome6freesolid /usr/share/fonts/fontawesome/Font Awesome 6 Free-Solid-900.otf fontawesomenormal fontawesome fontawesome FontAwesome.otf fontawesomeregular fontawesome fontawesome FontAwesome.otf ``` Best, Gerion Am Montag, 16. Oktober 2023, 15:36:34 CET schrieb Gerion Entrup: > Hans already answered my question. Thank you! > > Gerion > -- Forwarded Message -- > > Subject: Re: [NTG-context] x mark symbol and general symbol guide > Date: Freitag, 13. Oktober 2023, 18:13:42 CEST > From: Hans Hagen > To: Gerion Entrup > > On 10/13/2023 2:33 PM, Gerion Entrup wrote: > > Hi, > > > > I recently tried to typeset a table with checkmarks and x marks. > > \checkmark exists but is there a predefined x mark symbol (\xmark does > > not work)? > > > > In general: For LaTeX there exists the very helpful comprehensive LaTeX > > symbol list [1]. > > Is there a similar documentation for ConTeXt somewhere? > \usesymbols[fontawesome] > > \startTEXpage[offset=1ts] > \symbol[fontawesome-solid][times]\quad > \symbol[fontawesome-solid][check] > \stopTEXpage > > you can run symb-imp-fontawesome and get a list > > 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 > - > > - > 1.pdf Description: Adobe PDF document 2.pdf Description: Adobe PDF document 3.pdf Description: Adobe PDF document signature.asc Description: This is a digitally signed message part. ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: vim syntax highlighting bug?
Thanks for your effort! I have the same problem in Neovim and linked the pull request there: https://github.com/neovim/neovim/issues/26966 Best, Gerion Am Montag, 8. Januar 2024, 12:16:14 CET schrieb Vincent Hennebert: > I was in touch with the maintainer of the context.vim syntax file about > this. It turns out to be an issue with the lua.vim file that is included > in the context one. Lua.vim highlights trailing parentheses as errors, > but that’s done in a way that doesn’t work well when the file is > included by other syntax files. It somehow steals the syntax context and > makes Vim stay in Lua mode when it should go back to ConTeXt mode (I’m > not too savvy of the details). > > The maintainer came up with a workaround [1] to force returning to > ConTeXt mode, although the parenthesis remains highlighted as an error. > > That highlight bothers me, so my own workaround is to copy the lua.vim > file in my own .vim/syntax folder and comment out the ‘syn match > luaParenError ")"’ line (l.61 in my Vim version). > > Maybe playing with the ‘contained’ keyword (in lua.vim) could lead to a > proper solution, but I’m happy enough with my workaround that I haven’t > felt the need to investigate this issue any further. > > Hope that helps, > Vincent > > [1] https://github.com/vim/vim/pull/13778 > > On 06/01/2024 12:28, Damien Thiriet via ntg-context wrote: > > Hello, > > > > > > Happy New Year! > > > > I got into a bug in my Vim syntax highlighting version. > > Highlight stays in lua mode after ctxlua macro is closed. > > Here is a MWE, where «this should not be highlitghted as > > a comment indeed is. > > > > \starttext > > > > Hello! > > \ctxlua{context("does the parser work?")} > > > > -- this should not be highlighted as a comment > > > > \stoptext > > > > Do other Vim users come into this? > > Is my syntax file outdated? > > > > I am using this Vim version on OpenBSD 7.3 -stable: > > VIM - Vi IMproved 9.0 (2022 Jun 28, compiled Sep 6 2023 08:55:14) > > Included patches: 1-1876 > > > > Best regards, > > > > Damien Thiriet signature.asc Description: This is a digitally signed message part. ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: Fwd: Re: x mark symbol and general symbol guide
Am Dienstag, 9. Januar 2024, 18:31:10 CET schrieb Wolfgang Schuster: > Gerion Entrup schrieb am 09.01.2024 um 16:21: > > Hi, > > > > I have to come back to that topic, since it seems not to work. > > The said source code produces just the text "times" and "check" for me > > (see 1.pdf). I also tried: > > > > ``` > > \usesymbols[fontawesome] > > > > \starttext > > \showsymbolset[fontawesome-solid] > > \stoptext > > ``` > > and get a list of symbols that do not belong to fontawesome (see 2.pdf). > > > > I also tried to find the symbol file directly in the context > > distribution and found: > > tex/texmf-context/tex/context/base/mkiv/symb-imp-fontawesome.mkiv > > > > However, most parts are commented out there, one of the few remaining > > symbols is wheelchair. However, when using that, I just got the string > > _378 (3.pdf). Source code: > > > > ``` > > \usesymbols[fontawesome] > > > > \startTEXpage[offset=1pt] > > \symbol[fontawesome][wheelchair] > > \stopTEXpage > > ``` > > > > Is there a problem with my installation? > > Additional output: > > ``` > > % mtxrun --script fonts --list --all --pattern='fontawesome' > > identifier familyname fontname > > filename > > subfont instances > > > > fontawesomefontawesome fontawesome > > FontAwesome.otf > > fontawesome6brands fontawesome6brands fontawesome6brandsregular > > /usr/share/fonts/fontawesome/Font Awesome 6 Brands-Regular-400.otf > > fontawesome6brandsnormal fontawesome6brands fontawesome6brandsregular > > /usr/share/fonts/fontawesome/Font Awesome 6 Brands-Regular-400.otf > > fontawesome6freenormal fontawesome6free fontawesome6freesolid > > /usr/share/fonts/fontawesome/Font Awesome 6 Free-Solid-900.otf > > fontawesomenormal fontawesome fontawesome > > FontAwesome.otf > > fontawesomeregular fontawesome fontawesome > > FontAwesome.otf > > ``` > > The symbols expect version 5 of fontawesome but you have version 6. > > I guess it's time to switch to the new version of the fonts which can be > done by replacing 5 (file:fontawsome5...) with 6 (file:fontawsome6...) > in the following lines in symb-imp-fontawesome.mkiv > > \definefontsynonym [FontAwesomeBrands] > [file:fontawesome5brandsregular400.otf] > \definefontsynonym [FontAwesomeRegular] > [file:fontawesome5freeregular400.otf] > \definefontsynonym [FontAwesomeSolid] [file:fontawesome5freesolid900.otf] > > Wolfgang My system awesome font is version 6 but isn't the one bundled with ConTeXt version 5 (FontAwesome.otf)? This one: tex/texmf/fonts/data/fonticons/fontawesome/FontAwesome.otf: OpenType font data I would assume that ConTeXt is using the bundled file by default. Gerion signature.asc Description: This is a digitally signed message part. ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: Fwd: Re: x mark symbol and general symbol guide
Am Dienstag, 9. Januar 2024, 21:17:57 CET schrieb Hans Hagen: > On 1/9/2024 8:31 PM, Gerion Entrup wrote: > > > My system awesome font is version 6 but isn't the one bundled with > > ConTeXt version 5 (FontAwesome.otf)? This one: > > tex/texmf/fonts/data/fonticons/fontawesome/FontAwesome.otf: OpenType font > > data > > > > I would assume that ConTeXt is using the bundled file by default. > It's not our hobby to keep up with font versions and changing names so > we depend on users to signal that. Also, with fonts you never know what > updated fonts will break. > > In a next upload we'll define a list of names [5-9] so that we're more > future proof. Thanks. Sure, it was my interest to understand, if the error lays in my installation or is due to the predefined files. Especially, since I did not manage to display a single symbol of FontAwesome at all, not even the one that seems to be explicitly defined. For me, it is not relevant at all, in which version the font is. My main interest is to get an \xmark symbol. Gerion signature.asc Description: This is a digitally signed message part. ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Own command definition breaks with interaction: Use of \do_my_command doesn't match its definition
Hi, I want to make a proper definition of a new command to be able to process it in Lua. I found something on StackOverflow [1] but that breaks in enumeration _and_ when interaction is enabled and I do not understand why? Can you give me some help here? I want to make commands like \foo{bla} and \foo[b]{bla} possible at the same time. Here is a minimal example (also attached): ``` \startluacode function userdata.my_command(keywords, text) commands.writestatus("test", string.format("text: %s, config: %s", text, keywords)) local cfg = utilities.parsers.settings_to_hash(keywords) if cfg['emph'] ~= nil then context("\\emph{" .. text .. "}") elseif cfg['bold'] ~= nil then context("\\bold{" .. text .. "}") else context(text) end end \stopluacode % without that line there is no problem \setupinteraction[state=start] \defineenumeration[enu][text=Enu] \unprotect \def\mc{\dosingleempty\do_my_command} \def\do_my_command[#1]#2{% \iffirstargument{% \ctxlua{userdata.my_command('#1', [==[#2]==])}% }\else {% \ctxlua{userdata.my_command('', [==[#2]==])}% }\fi } \protect \starttext % all the following works \mc{foo} \mc[bold]{foo} \mc[emph]{foo} \startenu[title=Some] \stopenu % this breaks \startenu[title=Some \mc{foo}] \stopenu \stoptext ``` The compilation fails with: ``` tex error > tex error on line 41 in file ./test.tex: Use of \do_my_command doesn't match its definition ``` Best, Gerion [1] https://tex.stackexchange.com/a/55778 \startluacode function userdata.my_command(keywords, text) commands.writestatus("test", string.format("text: %s, config: %s", text, keywords)) local cfg = utilities.parsers.settings_to_hash(keywords) if cfg['emph'] ~= nil then context("\\emph{" .. text .. "}") elseif cfg['bold'] ~= nil then context("\\bold{" .. text .. "}") else context(text) end end \stopluacode % without that line there is no problem \setupinteraction[state=start] \defineenumeration[enu][text=Enu] \unprotect \def\mc{\dosingleempty\do_my_command} \def\do_my_command[#1]#2{% \iffirstargument{% \ctxlua{userdata.my_command('#1', [==[#2]==])}% }\else {% \ctxlua{userdata.my_command('', [==[#2]==])}% }\fi } \protect \starttext % all the following works \mc{foo} \mc[bold]{foo} \mc[emph]{foo} \startenu[title=Some] \stopenu % this breaks \startenu[title=Some \mc{foo}] \stopenu \stoptext signature.asc Description: This is a digitally signed message part. ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: Suggestions and problems of the manuals
Am Mittwoch, 17. Januar 2024, 13:44:51 CET schrieb Gerion Entrup: > Hi, > > I discovered the manuals in the context distribution. My general way to > built the manuals were these steps: > ``` > # execute one time > git clone https://github.com/contextgarden/context.git > cd context/doc/context/sources/general/manuals/ > > # for every manual > cd $MANUALFOLDER > context $MAIN_MANUAL_FILE.tex > ``` > Is there a way to speed this up, so to build all manuals with one > command (some make file or shell script for example)? > > I saw some problems within the manuals: > - In units/units-mkiv.tex the spacing seems not to work with current > LMTX. See the attached screenshot (units-mkiv.png) for my rendering. > In my understanding the spaces should differ. > - I changed some typos(?) and other stuff in that file. The patch is > attached (0001-units-mkiv-improve.patch). > - math/math-mkiv.tex seems not to compile. The last lines of the log: > system > > system > ConTeXt ver: 2024.01.08 11:23 LMTX fmt: 2024.1.16 > int: english/english > Sorry, but I can't typeset math unless various parameters have been > set. This is > normally done by loading special math fonts into the math family slots. > Your font > set is lacking at least the parameter mentioned earlier. > mtx-context | fatal error: return code: 1 > - I tried to find a prebuild version and found > https://mirror.contextgarden.net/general/manuals/math-mkiv.pdf. > However, this document seems to be from 2021 and has a kind of wobbly > rendering in Okular/Poppler (I remember the same phenomena with early > LMTX). See the screenshot attached (math-mkiv-online.png). Is there a > newer version somewhere? Maybe it is meaningful to delete the old > version. It also does not compile with the newest upload: ConTeXt ver: 2024.01.24 22:39 LMTX fmt: 2024.1.25 signature.asc Description: This is a digitally signed message part. ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Customize citation format of a bibliography (use the short form as reference format)
Hi, I'm trying to customize a cite format in a bibliography. Currently, I'm using the aps style which fits so far, except of the plain number as reference. In concrete, I want to change the following: - Use the first letter of the last name and the year as reference (this should be exactly the short form). It is more less also described here [1]. - Highlight publications of a certain author with an extra char (e.g. '>') Here is a minimal example (lets assume, every occurrence of Knuth should be highlighted): ``` \setupinteraction[state=start] \startbuffer[testdata] @Book{knuth1, author = {Donald E. Knuth}, title = {TEX and METAFONT. New directions in typesetting}, year = {1979}, publisher = {Addison-Wesley}, } @Article{someother, author = {Some Person and Some Otherperson}, title = {Another title}, year = {1900}, } \stopbuffer % enable tracing \enabletrackers[publications, publications.crossref, publications.details, publications.cite, publications.strings] \usebtxdataset[main][testdata.buffer] \usebtxdefinitions[aps] \setupbtx[dataset=main] \definebtxrendering[bibrendering][aps][dataset=main] % this seems to have no effect? \setupbtx[alternative=short] \starttext Knuth developed \TeX \cite[knuth1]. Several persons said something \cite[someother]. \placelistofpublications[bibrendering] \stoptext ``` It should be rendered as: ``` Knuth developed TeX [>Knu79]. Several persons said something [PO00]. [Knu79] D.E. Knuth, TEX and METAFONT. New directions in typesetting (Addison-Wesley, 1979). [PO00] S. Person and S. Otherperson, Another title, (1900). ``` How can I achieve that \cite[something] always renders in the short form by default? How can I customize that references to Knuth contain this extra '>'? How can I customize the APS style to also use the short form in the list of publications instead of numbers? Best Gerion [1] https://tex.stackexchange.com/questions/295444/citation-style-with-first-letters-of-authors-lastname signature.asc Description: This is a digitally signed message part. ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Re: Customize citation format of a bibliography (use the short form as reference format)
Hi, > The APS style is an example of a number-based citation system. As you > are looking for a tag-based citation, it might be better to start with > something like the APA style. I'm kind of satisfied with the publication-list layout of the APS style so I chose this as a base. If it is simpler to start with the APA style, I can do that. My hope is that it is possible to just change the "label" that is used for referencing and keep everything else as is. > Is there some specification for your short tag-based citation style? biblatex implements this with the "alphabetic" style. I'm not aware of a specification, though. Does the "short" form in ConTeXt exist for a specific reason? :) Gerion > On Tue, 16 Apr 2024 06:04:35 +0200 > Gerion Entrup wrote: > > > Hi, > > > > I'm trying to customize a cite format in a bibliography. Currently, > > I'm using the aps style which fits so far, except of the plain number > > as reference. In concrete, I want to change the following: > > - Use the first letter of the last name and the year as reference > > (this should be exactly the short form). It is more less also > > described here [1]. > > - Highlight publications of a certain author with an extra char (e.g. > > '>') > > > > Here is a minimal example (lets assume, every occurrence of Knuth > > should be highlighted): ``` > > \setupinteraction[state=start] > > > > \startbuffer[testdata] > > @Book{knuth1, > > author = {Donald E. Knuth}, > > title = {TEX and METAFONT. New directions in typesetting}, > > year = {1979}, > > publisher = {Addison-Wesley}, > > } > > @Article{someother, > > author = {Some Person and Some Otherperson}, > > title = {Another title}, > > year = {1900}, > > } > > \stopbuffer > > > > % enable tracing > > \enabletrackers[publications, publications.crossref, > > publications.details, publications.cite, publications.strings] > > > > \usebtxdataset[main][testdata.buffer] > > \usebtxdefinitions[aps] > > \setupbtx[dataset=main] > > \definebtxrendering[bibrendering][aps][dataset=main] > > > > % this seems to have no effect? > > \setupbtx[alternative=short] > > > > \starttext > > > > Knuth developed \TeX \cite[knuth1]. > > Several persons said something \cite[someother]. > > > > \placelistofpublications[bibrendering] > > > > \stoptext > > ``` > > > > It should be rendered as: > > ``` > > Knuth developed TeX [>Knu79]. > > Several persons said something [PO00]. > > > > [Knu79] D.E. Knuth, TEX and METAFONT. New directions in > > typesetting (Addison-Wesley, 1979). [PO00] S. Person and S. > > Otherperson, Another title, (1900). ``` > > > > How can I achieve that \cite[something] always renders in the short > > form by default? How can I customize that references to Knuth contain > > this extra '>'? How can I customize the APS style to also use the > > short form in the list of publications instead of numbers? > > > > Best > > Gerion > > > > [1] > > https://tex.stackexchange.com/questions/295444/citation-style-with-first-letters-of-authors-lastname signature.asc Description: This is a digitally signed message part. ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___
[NTG-context] Combine lua and btx setup, was: Re: Customize citation format of a bibliography (use the short form as reference format)
Here is a solution for the first part of my question. This is based on https://www.mail-archive.com/ntg-context@ntg.nl/msg101156.html and try and error based on publ-imp-aps.mkvi and publ-imp-apa.mkvi: It display now the citation _and_ numbering labels in the short form: ``` \setupinteraction[state=start] \startbuffer[testdata] @Book{knuth1, author = {Donald E. Knuth}, title = {TEX and METAFONT. New directions in typesetting}, year = {1979}, publisher = {Addison-Wesley}, } @Article{someother, author = {Some Person and Some Otherperson}, title = {Another title}, year = {1900}, } \stopbuffer % enable tracing \enabletrackers[publications, publications.crossref, publications.details, publications.cite, publications.strings] \usebtxdataset[main][testdata.buffer] \usebtxdefinitions[aps] \setupbtx[dataset=main] \definebtxrendering[bibrendering][aps][dataset=main, numbering=short] \setupbtxlist[aps][ alternative=b, distance=.5em, ] \setupbtx[aps:cite][alternative=short] \starttext Knuth developed \TeX \cite[knuth1] Several persons said something \cite[someother]. \placelistofpublications[bibrendering] \stoptext ``` The remaining part now is to mark publications of Knuth in a different way. I have tried this and failed. Here is my code so far: ``` \startluacode function render_cite(short, author) print(author) if author:lower():find("knuth") then context("[>" .. short .. "]") else context("[" .. short .. "]") end end \stopluacode \definebtx[aps:cite:special][aps:cite] \startsetups btx:aps:cite:special \btxcitereference \ctxlua{render_cite([==[\btxflush{year}]==], [==[\btxflush{author}]==])} \stopsetups % use it with \cite[special][knuth1] ``` This has several problems: - \btxflush{short} does not work as I expected that. How can I get the short form? - \btxflush to pass arguments to lua does not work as intended. On the lua side the variable "author" resolves to "\btxflushauthor{author}" and not to "D. E. Knuth". How can I pass the data? I use Lua only because I find it more convenient as a programming language. If a plain tex solution is simpler, I'm happy to use that. Another question that came up while studying the source code: What effect have \c!, \s!, and \v!? These commands exist a lot in the above cited files. Gerion Am Mittwoch, 17. April 2024, 15:44:12 MESZ schrieb Gerion Entrup: > Hi, > > > The APS style is an example of a number-based citation system. As you > > are looking for a tag-based citation, it might be better to start with > > something like the APA style. > > I'm kind of satisfied with the publication-list layout of the APS style so I > chose > this as a base. If it is simpler to start with the APA style, I can do that. > > My hope is that it is possible to just change the "label" that is used for > referencing and keep everything else as is. > > > Is there some specification for your short tag-based citation style? > > biblatex implements this with the "alphabetic" style. I'm not aware of > a specification, though. Does the "short" form in ConTeXt exist for a > specific reason? :) > > Gerion > > > On Tue, 16 Apr 2024 06:04:35 +0200 > > Gerion Entrup wrote: > > > > > Hi, > > > > > > I'm trying to customize a cite format in a bibliography. Currently, > > > I'm using the aps style which fits so far, except of the plain number > > > as reference. In concrete, I want to change the following: > > > - Use the first letter of the last name and the year as reference > > > (this should be exactly the short form). It is more less also > > > described here [1]. > > > - Highlight publications of a certain author with an extra char (e.g. > > > '>') > > > > > > Here is a minimal example (lets assume, every occurrence of Knuth > > > should be highlighted): ``` > > > \setupinteraction[state=start] > > > > > > \startbuffer[testdata] > > > @Book{knuth1, > > > author = {Donald E. Knuth}, > > > title = {TEX and METAFONT. New directions in typesetting}, > > > year = {1979}, > > > publisher = {Addison-Wesley}, > > > } > > > @Article{someother, > > > author = {Some Person and Some Otherperson}, > > > title = {Another title}, > > > year = {1900}, > > > } > > > \stopbuffer > > > > > > % enable tracing > > > \enabletrackers[publications, publications.crossref, > > > publications.details, publications.cite, publications.strings]
[NTG-context] Context path resolving, Problem with MkIV and TeXLive
Hi, I'm having a problem with TeXLive 2021 in conjunction with MkIV. Basically, executing context results in: % context mtxrun | unknown script 'context.lua' or 'mtx-context.lua I researched this and found that probably there is a path problem. LaTeX seems to be using kpathsea and /etc/texmf.cnf while context uses texmfcnf.lua. Looking into this file, it defines nearly all paths relative to "home:" or "selfautoparent:". Home is self explaining. I have no clue what selfautoparent is and also did not find an explanation in the internet. Anyway, selfautoparent seems not to be resolved correctly. I figured this by running `mtxrun --variables`. Here is a little excerpt: resolvers | lists | TEXMF resolvers | lists | env: {$TEXMFCONFIG,$TEXMFHOME,!!$TEXMFSYSCONFIG,!!$TEXMFSYSVAR,!!$TEXMFPROJECT,!!$TEXMFFONTS,!!$TEXMFLOCAL,!!$TEXMFDIST} resolvers | lists | var: TEXMF resolvers | lists | exp: {home:.texlive2020/texmf-config,home:texmf,!!selfautoparent:texmf-config,!!selfautoparent:texmf-var,!!selfautoparent:texmf-project,!!selfautoparent:texmf-fonts,!!.,!!selfautoparent:texmf-dist} resolvers | lists | res: {/home/gerion/.texlive2020/texmf-config,/home/gerion/texmf,!!./texmf-config,!!./texmf-var,!!./texmf-project,!!./texmf-fonts,!!.,!!./texmf-dist} ... resolvers | lists | TEXMFSYSVAR resolvers | lists | env: selfautoparent:texmf-var resolvers | lists | var: TEXMFSYSVAR resolvers | lists | exp: selfautoparent:texmf-var resolvers | lists | res: ./texmf-var resolvers | lists | TEXMFVAR resolvers | lists | env: unset resolvers | lists | var: TEXMFVAR resolvers | lists | exp: home:.texlive2020/texmf-var resolvers | lists | res: /home/gerion/.texlive2020/texmf-var "home:" seems to be resolved correctly to "/home/gerion". "selfautoparent" seems to be resolved to "." (the current directory?). My context (and TeXLive) installation is in /usr/share/texmf-dist. So running mtxrun --generate in exactly this directory and running context after that works: % mtxrun --generate resolvers | resolving | variable 'SELFAUTOLOC' set to '/usr/bin' resolvers | resolving | variable 'SELFAUTODIR' set to '/usr' resolvers | resolving | variable 'SELFAUTOPARENT' set to '.' resolvers | resolving | variable 'TEXMFCNF' set to '' resolvers | resolving | variable 'TEXMF' set to '' resolvers | resolving | variable 'TEXOS' set to 'usr' resolvers | resolving | resolvers | resolving | using configuration specification 'home:texmf/web2c;{selfautoloc:,selfautoloc:/share/texmf-local/web2c,selfautoloc:/share/texmf-dist/web2c,selfautoloc:/share/texmf/web2c,selfautoloc:/texmf-local/web2c,selfautoloc:/texmf-dist/web2c,selfautoloc:/texmf/web2c,selfautodir:,selfautodir:/share/texmf-local/web2c,selfautodir:/share/texmf-dist/web2c,selfautodir:/share/texmf/web2c,selfautodir:/texmf-local/web2c,selfautodir:/texmf-dist/web2c,selfautodir:/texmf/web2c,$SELFAUTOGRANDPARENT/texmf-local/web2c,selfautoparent:,selfautoparent:/share/texmf-local/web2c,selfautoparent:/share/texmf-dist/web2c,selfautoparent:/share/texmf/web2c,selfautoparent:/texmf-local/web2c,selfautoparent:/texmf-dist/web2c,selfautoparent:/texmf/web2c}' resolvers | resolving | resolvers | resolving | looking for regular 'texmfcnf.lua' on given path '/home/gerion/texmf/web2c' from specification 'home:texmf/web2c' resolvers | resolving | looking for regular 'texmfcnf.lua' on weird path '/usr/bin' from specification 'selfautoloc:' resolvers | resolving | looking for regular 'texmfcnf.lua' on given path '/usr/bin/share/texmf-local/web2c' from specification 'selfautoloc:/share/texmf-local/web2c' resolvers | resolving | looking for regular 'texmfcnf.lua' on given path '/usr/bin/share/texmf-dist/web2c' from specification 'selfautoloc:/share/texmf-dist/web2c' resolvers | resolving | looking for regular 'texmfcnf.lua' on given path '/usr/bin/share/texmf/web2c' from specification 'selfautoloc:/share/texmf/web2c' resolvers | resolving | looking for regular 'texmfcnf.lua' on given path '/usr/bin/texmf-local/web2c' from specification 'selfautoloc:/texmf-local/web2c' resolvers | resolving | looking for regular 'texmfcnf.lua' on given path '/usr/bin/texmf-dist/web2c' from specification 'selfautoloc:/texmf-dist/web2c' resolvers | resolving | looking for regular 'texmfcnf.lua' on given path '/usr/bin/texmf/web2c' from specification 'selfautoloc:/texmf/web2c' resolvers | resolving | looking for regular 'texmfcnf.lua' on weird path '/usr' from specification 'selfautodir:'
Re: [NTG-context] Help test a LMTX bug fix: tweaks in PDF generation
Am Sonntag, 9. Oktober 2022, 17:33:09 CEST schrieb Leah Neukirchen via ntg-context: > So please: Try to preview and then try to print the attached PDF; > and report back if either preview or printout does not look like > the attached reference PNG image (i.e. something is missing, > the fonts look different, or have wrong relative size.) Okular, MuPDF and pdf.js (Firefox) on Linux look fine. Gimp and Krita also look fine (but I think they are both using poppler). LibreOffice Draw does not (font sizes are wrong). However, this is not directly a PDF viewer, so I'm pretty sure it can be ignored. Best, Gerion ___ 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] Typeset multiple pictures not in a strict matrix (\startfloatcombination)
Hi, I'm trying to typeset several pictures as a floatcombination but not in the form of strict cells of a matrix. Here is some ASCII art to demonstrate the positions of the pictures: --- | | | | --- a) Some caption - | | | | | | | | | | | | - b) fooc) foo Figure 1.1: Foo Bar I tried to typeset it with this code (based on https://tex.stackexchange.com/a/502903): \useMPlibrary[dum] \setupcombinations[alternative=text] \definefloat[subfigure][local=yes] \setupcaption[subfigure][numberconversion=a] \setuplabeltext[subfigure=] \appendvalue{stopplacefigure}{\resetcounter[subfigure]} \starttext \startplacefigure[title=Test] \startfloatcombination[nx=1, ny=2] \startplacesubfigure[title=Test] \externalfigure[dummy][width=4cm,height=1cm] \stopplacesubfigure \startfloatcombination[nx=2, ny=1] \startplacesubfigure[title=Test] \externalfigure[dummy][width=4cm,height=1cm] \stopplacesubfigure \startplacesubfigure[title=Test] \externalfigure[dummy][width=4cm,height=1cm] \stopplacesubfigure \stopfloatcombination \stopfloatcombination \stopplacefigure \stoptext However, this does not work (the pictures are all in one row). Do you have some advice? Gerion signature.asc Description: This is a digitally signed message part. ___ 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] Visual highlighted text with title, mix of enumeration and framedtext
Hi, I want to typeset a "Good to know" section that is visually highlighted and can spawn across multiple pages. In LaTeX this would be possible with the mdframed package. See the attached screenshot for an example how it might look like (it is copied out of page 4: Definition: Inhomogeneous linear of the mdframed documentation: http://mirrors.ctan.org/macros/latex/contrib/mdframed/mdframed.pdf) I have searched in the wiki and found \defineenumeration: This is near of that what I need. However I explicitly does not need an enumeration (so no number or counter). Also I am not sure if I can set a background and so on. The other possibility is \defineframedtext. For example this goes much in the direction that I want: \definecolor[gbackground][s=0.98] \defineframedtext[gtk][frame=on, offset=5pt, background=color, width=0.95\textwidth, backgroundcolor=gbackground] However, there does not seem a possibility to define a title and it seems to not work on multiple pages. Is there a mix of an enumeration and framedtext that can produce something like in the attached picture? Best, Gerion signature.asc Description: This is a digitally signed message part. ___ 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] Description together with itemize, luametatex
Am Montag, 6. März 2023, 14:34:28 CET schrieb Aditya Mahajan via ntg-context: > On Mon, 6 Mar 2023, Gerion Entrup via ntg-context wrote: > > > Hi, > > > > I'm trying to use a description environment in conjunction with an > > itemize with the latest luametatex. Is this supposed to work? > > > > Here is an MWE: > > ``` > > \definedescription[desc][headstyle=bold] > > > > \starttext > > Foo > > > > \desc{Some title} Some text > > \startitemize > > \item Some item > > \stopitemize > > > > \stoptext > > Use \startdesc ... \stopdesc > > \definedescription[desc][headstyle=bold] > > \starttext > Foo > > \startdesc[title={Some title}] > Some text > \startitemize > \item Some item > \stopitemize > \stopdesc > > \stoptext That worked. Thank you! signature.asc Description: This is a digitally signed message part. ___ 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] Description together with itemize, luametatex
Hi, I'm trying to use a description environment in conjunction with an itemize with the latest luametatex. Is this supposed to work? Here is an MWE: ``` \definedescription[desc][headstyle=bold] \starttext Foo \desc{Some title} Some text \startitemize \item Some item \stopitemize \stoptext ``` This currently fails with: ``` resolvers | formats | executing runner 'run luametatex format': /home/gerion/context/tex/texmf-linux-64/bin/luametatex --jobname="./test.tex" --fmt=/home/gerion/context/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.fmt --lua=/home/gerion/context/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.lui --c:currentrun=1 --c:fulljobname="./test.tex" --c:input="./test.tex" --c:kindofrun=1 --c:maxnofruns=9 --c:texmfbinpath="/home/gerion/context/tex/texmf-linux-64/bin" system > system > ConTeXt ver: 2023.02.23 21:26 LMTX fmt: 2023.3.4 int: english/english system > system > 'cont-new.mkxl' loaded open source > level 1, order 1, name '/home/gerion/context/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl' system > beware: some patches loaded from cont-new.mkiv close source> level 1, order 1, name '/home/gerion/context/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl' system > files > jobname './test', input './test.tex', result './test' fonts > latin modern fonts are not preloaded languages > language 'en' is active open source > level 1, order 2, name './test.tex' fonts > preloading latin modern fonts (second stage) fonts > 'fallback modern rm 12pt' is loaded lua error > lua error on line 8 in file ./test.tex: registered function call [809]: ...ext/tex/texmf-context/tex/context/base/mkiv/strc-num.lua:448: attempt to index a nil value (local 'd') stack traceback: ...ext/tex/texmf-context/tex/context/base/mkiv/strc-num.lua:448: in function <...ext/tex/texmf-context/tex/context/base/mkiv/strc-num.lua:442> (...tail calls...) 1 \definedescription[desc][headstyle=bold] 2 3 \starttext 4 Foo 5 6 \desc{Some title} Some text 7 \startitemize 8 >> \item Some item 9 \stopitemize 10 11 \stoptext 12 mtx-context | fatal error: return code: 1 ``` Best, Gerion signature.asc Description: This is a digitally signed message part. ___ 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] floatcombinations seem to not work correctly after lmtx update
Hi, I recently updated my Context (lmtx). Unfortunately, I'm not aware of the previous version anymore. The current one is 2023.06.04 18:58. After the update one of my documents broke at floatcombinations. The relevant code is this one: ``` \useMPlibrary[dum] \setupcombinations[alternative=text] \definefloat[subfigure][local=yes] \setupcaption[subfigure][numberconversion=a, prefix=no, headseparator={)}] \setuplabeltext[subfigure=] \appendvalue{stopplacefigure}{\resetcounter[subfigure]} \starttext test sdlkf jlsdjf lksjdf \startplacefigure[title=Test] \startfloatcombination[nx=3] \startplacesubfigure[title=Test] \externalfigure[dummy][width=0.3\textwidth] \stopplacesubfigure \startplacesubfigure[title=Test] \externalfigure[dummy][width=0.3\textwidth] \stopplacesubfigure \startplacesubfigure[title=Test] \externalfigure[dummy][width=0.3\textwidth] \stopplacesubfigure \stopfloatcombination \stopplacefigure lskdjf lskjfd lksjdfljsdkjf \stoptext ``` In this minimal example everything works. However, in my real document the subfigures have enormous space between them so just two pictures are visible (see the attached png). Do you have a clue, why this happens? Otherwise, I would take the preamble of the real document and try to lower it down to have a reproducible example (but that takes a lot of time, so I wanted to ask beforehand). Best, Gerion signature.asc Description: This is a digitally signed message part. ___ 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 ___