[NTG-context] Re: placing \externalfigure
On 11/12/2023 5:30 PM, Marco Patzer wrote: On Sun, 12 Nov 2023 16:34:00 +0100 Hans van der Meer via ntg-context wrote: In placing \externalfigure[file] I observe the figure is placed with its bottom on the baseline, thus: [externalfigure] --- baseline I looked into the option list of setupexternalfigure but could not find one whereby the location with respect to the baseline is either top, bottom or center. Maybe this is what you're looking for: \useMPlibrary [dum] \setuplayout [grid=yes] \showgrid \starttext foo \externalfigure[][][location=high] bar \blank [5*line] foo \externalfigure[][][location=middle] bar \blank [5*line] foo \externalfigure[][][location=low]bar \stoptext This variant: \useMPlibrary [dum] \starttext foo \figuresymbol[] bar foo \figuresymbol[][height=1cm,depth=\strutdepth] bar foo \figuresymbol[][height=3ex,depth=2ex] bar \stoptext gives the lines proepr dimensions. Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://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: How can I use \naturalnumbers
Ursula Hermann schrieb am 12.11.2023 um 17:54: Dear List, I would like to use the \integers. I would like to use the commands in Text and also in Formulars. How to write in the right way? I have: \starttext \naturalnumbers {N} stoptext 1. You have to use math mode. 2. You need the \mathblackboard switch. \starttext \im{{\mathblackboard CINQRZ}} \stoptext Wolfgang ___ 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] How can I use \naturalnumbers
Dear List, I would like to use the \integers. I would like to use the commands in Text and also in Formulars. How to write in the right way? I have: \starttext \naturalnumbers {N} stoptext Many thanka Uschi ___ 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: placing \externalfigure
On Sun, 12 Nov 2023 16:34:00 +0100 Hans van der Meer via ntg-context wrote: > In placing \externalfigure[file] I observe the figure is placed with > its bottom on the baseline, thus: > > [externalfigure] > --- baseline > > I looked into the option list of setupexternalfigure but could not > find one whereby the location with respect to the baseline is either > top, bottom or center. Maybe this is what you're looking for: \useMPlibrary [dum] \setuplayout [grid=yes] \showgrid \starttext foo \externalfigure[][][location=high] bar \blank [5*line] foo \externalfigure[][][location=middle] bar \blank [5*line] foo \externalfigure[][][location=low]bar \stoptext Marco ___ 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] placing \externalfigure
In placing \externalfigure[file] I observe the figure is placed with its bottom on the baseline, thus: [externalfigure] --- baseline I looked into the option list of setupexternalfigure but could not find one whereby the location with respect to the baseline is either top, bottom or center. Such an option might not exist and then I must program around it. But I prefer to use something that is already there and fits my needs. yours sincerely dr. Hans van der Meer ___ 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: ConTeXt support for Nova text editor (MacOS)
On 11/11/2023 11:43 PM, Paul Mazaitis wrote: On 11 Nov 2023, at 14:52, Aditya Mahajan wrote: Last time I checked tree-sitter on neovim, there were no good tree-sitters for context. I'd be interested in testing this out. Happy to have feedback! Does the parser detect nested metapost and luatex environments? The parser recognizes chunks of metapost and latex code and marks them in the syntax tree, but does nothing else: I figured the best approach here was to let applications call out to various tree-sitter parsers as needed. I don't know of a tree-sitter parser for either metapost or latex. The next one I am going to try to build a parser for is metapost (following the reference material in the back of the manual) but I haven't sat down to that task yet. (Plus, that one's going to need a _lot_ of testing by people other than I; I only use metapost for very simple things, and my understanding is surface level at best.) i don't know what a tree sitter is (probably a bird) but wasn't vim using lua ... if so, context ships with parsers for whatever it needs that one can look at also, when context gets updated there are also updated lua files in: context\data\scite\context\lexers\data\* that can be used for highlighting categories of commands, enviromnents etc Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://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: context not producing synctex output that my synctex program can use
On 11/12/2023 10:26 AM, Henning Hraban Ramm wrote: Am 12.11.23 um 00:59 schrieb Jim: Hi, I've read the wiki, looked at workflows-synctex.tex, searched the web, and scratched my head, all to no avail. So here I am, cap in hand... When I run context, I get a .synctex file which has some information in it, but I can't find any invocation of synctex to return anything useful. Nor does the okular example in the wiki (https://wiki.contextgarden.net/SyncTeX) work for me. Ocular starts, but always on the first page, regardless of what line number I give it. On the other hand, pdftex creates a .synctex file which my copy of synctex find useful. I am using the synctex from the current version of texlive: This is SyncTeX command line utility, version 1.5 Can anyone either (a) enlighten me on what I am doing wrong; or (b) definitively confirm that context is not currently playing nicely with synctex (the wiki notwithstanding) and I should give up this quest for now. ConTeXt doesn’t work with the synctex binary, but with mtxrun --script synctex afaik there is no binary ... there is a library that has to be compiled into a pdf viewer that intercept some 'goto the text file' command and then launches an editor (afik the library has some heuristics build in wrt boxes and nesting and so); at the tex end there is also a library that kicks in addiional code for nodes and the backend (which is why enabling synctex will have an impact on runtime) wrt the synctex file, that one is generated by context (so we don't use the synctex code in luatex and as luametatex has no backend there it's even completely absent ... context generates the file itself which is also a bit more efficient) Unfortunately, it’s not a drop-in replacement, so it doesn’t work with most editors. (I was thinking about a translating wrapper script, but didn’t do anything yet.) AFAIK TeXshop (MacOS) is the only TeX editor that supports ConTeXt’s workflow. indeed texshop uses the approach that avoids the library and just calls mtxrun to figure out the file/line that relates to the position; this is more reliable because there is no need to recompile a viewer when synctex updates you can run mtxrun --script synctex on the synctex file and check what areas are there ConTeXt’s synctex format is much simpler than the “standard” LaTeX one and should be at least as good, but alas it needs support from the editors. simpler in the sense that we only output what is needed for the synchronization to work reliable; fwiw, my collegue already for many years uses context with synctex enabled with sumatra pdf in pretty complex setups: a mix of tex and xml files with deeply nested inputs and it works ok (so we also get to the right spot in an (included) xml file) for synctex to work one has to call context with --synctex or put a directive on the topline of the file. Otherwise you won't get the right jobname. Of course it then still depends on the pdf viewer + lib used if things work out as expected. there isn't much we can do about the viewer part unless tit is not locked into the binary but as flexible like the texshop viewer is Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://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: context not producing synctex output that my synctex program can use
Am 12.11.23 um 00:59 schrieb Jim: Hi, I've read the wiki, looked at workflows-synctex.tex, searched the web, and scratched my head, all to no avail. So here I am, cap in hand... When I run context, I get a .synctex file which has some information in it, but I can't find any invocation of synctex to return anything useful. Nor does the okular example in the wiki (https://wiki.contextgarden.net/SyncTeX) work for me. Ocular starts, but always on the first page, regardless of what line number I give it. On the other hand, pdftex creates a .synctex file which my copy of synctex find useful. I am using the synctex from the current version of texlive: This is SyncTeX command line utility, version 1.5 Can anyone either (a) enlighten me on what I am doing wrong; or (b) definitively confirm that context is not currently playing nicely with synctex (the wiki notwithstanding) and I should give up this quest for now. ConTeXt doesn’t work with the synctex binary, but with mtxrun --script synctex Unfortunately, it’s not a drop-in replacement, so it doesn’t work with most editors. (I was thinking about a translating wrapper script, but didn’t do anything yet.) AFAIK TeXshop (MacOS) is the only TeX editor that supports ConTeXt’s workflow. ConTeXt’s synctex format is much simpler than the “standard” LaTeX one and should be at least as good, but alas it needs support from the editors. Hraban ___ 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 ___