[NTG-context] Re: Interline spacing in tabulate paragraphs
Kirill Davidov schrieb am 15.09.2024 um 20:01: Ah, that helps. Then, one more question. I assume line=2.8ex is equivalent to single line spacing, yes? Do I therefore naively multiply that by, say, 1.5 to get 1.5 line spacing? Thanks! Yes, the default value is 2.8ex and the medium, big and numeric values (e.g. \setupinterlinespace[2]) are multiples of it but you should be aware it is depends on the font which specifies the value of ex. An alternative to the default relative setting are absolute values, e.g. \setupinterlinespace[line=16pt]. When your try to reproduce the spacing of another system like MS Word how it specifies the meaning one and half or double spacing because there is no standardized method to set the value, below are a few examples (where I tried to reproduce the MS Word settings but I can be wrong here). begin example % \definefontfamily [aptos] [rm] [Aptos Serif] % \definefontfamily [aptos] [ss] [Aptos] % % \setupbodyfont[aptos,ss] \startdocument \bold{ConTeXt 1x:} \samplefile{dijkstra} \blank \setupinterlinespace[2]% relative value \bold{ConTeXt 2x:} \samplefile{dijkstra} \blank \setupinterlinespace[line=\dimexpr\bodyfontsize+8pt\relax] \bold{Word 1x:} \samplefile{dijkstra} \blank \setupinterlinespace[line=\dimexpr1.15\bodyfontsize+8pt\relax] \bold{Word 1.15x:} \samplefile{dijkstra} \blank \setupinterlinespace[line=\dimexpr2\bodyfontsize+8pt\relax] \bold{Word 2x:} \samplefile{dijkstra} \stopdocument end example 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] Re: Interline spacing in tabulate paragraphs
Hello, It's probably not the best solution, but it seems to work on my side if I replace `big` by `2em`; see code below. ``` \startdocument \setupinterlinespace[2em] \input dijkstra \starttabulate[|k0r|k0xp|][EQ={---}] \NC Word \EQ definition; \NC\AR \NC Important word \EQ \input dijkstra \NC\AR \NC Importanter word \EQ not much else here. \NC\AR \stoptabulate \stopdocument ``` Best regards, Florent Le dim. 15 sept. 2024 à 16:13, Kirill Davidov a écrit : > Greetings, > > Is there a way to set interline spacing in tabulate environments? The > table's paragraphs do not seem to obey \setupinterlinespace like the > rest of the text does. Code to toy with: > > \startdocument > > \setupinterlinespace[big] > > \input lorem > > \starttabulate[|k0r|k0xp|][EQ={---}] > > \NC Word \EQ definition; \NC\AR > \NC Important word \EQ \input dijkstra \NC\AR > \NC Importanter word \EQ not much else here. \NC\AR > > \stoptabulate > > \stopdocument > > > ___ > 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 > > ___ > ___ 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] Interline spacing in tabulate paragraphs
Greetings, Is there a way to set interline spacing in tabulate environments? The table's paragraphs do not seem to obey \setupinterlinespace like the rest of the text does. Code to toy with: \startdocument \setupinterlinespace[big] \input lorem \starttabulate[|k0r|k0xp|][EQ={---}] \NC Word \EQ definition; \NC\AR \NC Important word \EQ \input dijkstra \NC\AR \NC Importanter word \EQ not much else here. \NC\AR \stoptabulate \stopdocument ___ 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 LMTX 2024, monospace font) Why does monospaced text go out of the margin for me? is this supposed to happen?
Felix schrieb am 14.09.2024 um 06:40: https://pastebin.com/2ce1xSYf The code linked above has 3 paragraphs. One in TImes New Roman, the other in Aptos and the last in Aptos Mono. The paragraph with \tt seems to go over my margin of .5 inches for the left and right side of my doc., but the serif and sans serif text doesn't. I can't seem to figure out why exactly this is. Did I set up \setuplayout incorrectly? I wanted .5in margins but I kind of 'hacked' the way I got things. Is there a better way that I could have gotten .5 inch margins and a.5in header/footer? I can't seem to understand why the output is what it is. I would greatly appreciate any help! Feel free to switch out the fonts if you'd like You're trying to justify a text with a fixed width font which fails because the often have a fixed width space. When you have a space a fixed width TeX can stretch or shrink the space between the word to align them with the right margin. The best solution is to disable justification and use ragged text on the right side. An alternative is to allow bigger spaces between words but as you can see in the following example the gaps between words can be quite large. begin example \showframe \setupbodyfont[tt] \starttext \samplefile{zapf} \blank \start \setuptolerance[space] \samplefile{zapf} \par \stop \stoptext end example 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] Re: registers in footnotes as page glossaries
Pablo Rodriguez wrote: > Hans, > > I wonder whether MkXL may have page registers for footnotes. > > This would be great to have page glossaries, such as in > https://geoffreysteadman.com/wp-content/uploads/2017/08/lysiascrito-24aug17w... > (first apparatus). > > To be fair, I have asked that a while ago (with MkIV). > > It would be great to have these page glossaries as language aids. > > Right now, they need to be composed manually (using a word processor, no > TeX). > > Many thanks for your help, > > Pablo Perhaps a feaseble workaround: • place a section index after the content of the page The cons: • pagebreaking by sectioning manually the content of a page \setuppapersize[A5] \startbuffer[buf:dict:achilles] He was a hero. \stopbuffer \startbuffer[buf:dict:divine] Has something to do with gods and godesses. \stopbuffer \startbuffer[buf:dict:xxx] The same information used multiple times. \stopbuffer \defineprocessor[proc:achilles][right={ \ss \inlinebuffer[buf:dict:achilles]}] \defineprocessor[proc:divine][right={ \ss \inlinebuffer[buf:dict:divine]}] \defineprocessor[proc:xxx][right={ \it \inlinebuffer[buf:dict:xxx]}] \setupsection[section][placehead=hidden,aftersection=\pagebreak] \definelinenumbering[Poem][step=5,continue=yes] \defineregister[Dict][pagenumber=no,indicator=no,n=2,criterium=section,before=,textcommand=\bf] \starttext \startsection[title=pageA] \startlines \startlinenumbering[Poem] \Dict{proc:achilles->Achilles}Achilles sing, O \Dict{proc:xxx->Goddess}Goddess! Peleus’ son; His wrath pernicious, who ten thousand woes Caused to \Dict{proc:xxx->Achaia}Achaia’s host, sent many a soul Illustrious into Ades premature, And Heroes gave (so stood the will of Jove) To dogs and to all ravening fowls a prey, When fierce dispute had separated once The noble Chief \Dict{proc:achilles->Achilles}Achilles from the son Of Atreus, \Dict{proc:xxx->Agamemnon}Agamemnon, King of men. \stoplinenumbering \stoplines \hl[20] \placeregister[Dict] \stopsection \startsection[title=pageB] \startlines \startlinenumbering[Poem] Who them to strife impell’d? What power \Dict{proc:divine->divine}divine? Latona’s son and Jove’s. For he, incensed Against the \Dict{proc:xxx->King}King, a foul \Dict{proc:xxx->contagion}contagion raised In all the host, and multitudes destroy’d, For that the son of \Dict{proc:xxx->Atreus}Atreus had his priest Dishonored, \Dict{proc:xxx->Chryses}Chryses. To the fleet he came Bearing rich ransom glorious to redeem His daughter, and his hands charged with the wreath And golden sceptre of the God shaft-arm’d. \stoplinenumbering \stoplines \hl[20] \placeregister[Dict] \stopsection \stoptext ___ 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] registers in footnotes as page glossaries
Hans, I wonder whether MkXL may have page registers for footnotes. This would be great to have page glossaries, such as in https://geoffreysteadman.com/wp-content/uploads/2017/08/lysiascrito-24aug17w.pdf#page=16 (first apparatus). To be fair, I have asked that a while ago (with MkIV). It would be great to have these page glossaries as language aids. Right now, they need to be composed manually (using a word processor, no TeX). Many thanks for your help, Pablo ___ 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] BUG REPORT: Italic Correction in ConTeXt LMTX
Hello, I started using ConTeXt LMTX 2 days ago and after some initial testing I noticed an unexpected behavior regarding italic correction. In short, I cannot seem to produce italic correction like I could in plain TeX or even LaTeX. I've asked the question on TeX StackExchange and another user confirmed the suspicion in his answer. I would suggest you take a look at it because the formatting of the question and the answer is prettier than in this plain text email. Furthermore, a person who provided the answer already did some research. See the question here: https://tex.stackexchange.com/questions/724568/how-to-invoke-italic-correction-in-context-lmtx Here is what I observed: Compare the kerning produced in between 'r' and 'p' in the word "airport" when italic correction is applied in plain TeX (compiled with `pdftex`) and in ConTeXt LMTX (compiled with `luametatex`). Here are the minimal working examples. Plain TeX ``` airport (regular font) {\it air\/}port (italic correction applied) {\it air}port (no italic correction applied) \bye ``` ConTeXt LMTX ``` \starttext airport (regular font) {\it air\/}port (italic correction applied) {\it air}port (no italic correction applied) \stoptext ``` Please confirm if this, in fact, is the issue/bug or if I am not approaching this correctly. I am brand new to ConTeXt, so it could be me. Thank you in advance! Vladimir ___ 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] index entry with sorting and processor
Hi again, the page number of register entries from a glossary should have a different color: \defineprocessor[glossar][color=green] \define[1]\GlIndex{\index[glossar->]{#1}} This works, but I’d like to apply a macro to the text, and then I need to set the sort order: \define[1]\GlIndex{\index[glossar->#1]{\Word{#1}}} This also works, but I get separate index entries from \index{Something} and \GlIndex{something} Glossary entries may be lowercase, but in the index I’d like to normalize to uppercase initials. (The index command is part of a lemma setup.) How can I combine the entries? I also tried \setregisterentry but didn’t find out how to use a processor for the page number. In the wiki, the (generally working) processor option is undocumented, so if there’s another option, it’s also missing. In the source, I found processors for entry & page, but not how to address the latter. MWE: """ \defineprocessor[glossar][color=green] \define[1]\GlIndex{\index[glossar->#1]{\Word{#1}}} \starttext \samplefile{ward} \index{something} \index{anything} \page \samplefile{tufte} \GlIndex{something} \GlIndex{anything} \page \placeindex \stoptext """ 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 ___
[NTG-context] Re: Is there a short-cut to adding sub-categories for index entries?
Am 25.08.24 um 15:38 schrieb Joel via ntg-context: I have a document with thousands of index entries. Here’s a sample code: Some people lived in \index{cliff-dwelling}\index{dwellings+cliff-dwelling}cliff-dwellings, while others lived in \index{lean-to}\index{dwellings+lean-to}lean-tos. I’m wondering if there is a short-cut means to set this up, such that if I can tell the document that any time it sees “cliff-dwellings” in an index, it will also add its page numbers to under “dwellings+cliff-dwelling”? In other words, is there an easier way to add these categories, then to go through the entire document and mark them? I already have a list of all the words. For instance, in my above code, I must find every \index{cliff-dwelling} entry and add a \index{dwellings+cliff-dwelling} next to it...which would take hundreds of hours if I did that for every word. Is there a quicker way to tell it always also add it under "dwellings" too? If it’s just a few instances, define a macro: \define[1]\DwIndex{\index{#1}\index{dwellings+#1}#1} For a list of words, a lookup table and a Lua function make sense. With a comparable problem, normalizing location names, I used this: -- lookups.lua userdata = userdata or { } userdata.Mapping = { ["Albano"] = "Albano (Provinz Rom)", ["Altona"] = "Altona (Hamburg)", ["Aurich"] = "Aurich (Ostfriesland)", -- … } function userdata.Lookup(name) context(userdata.Mapping[name] or name) end %%% environment \loadluafile[lookups.lua] \defineregister[Location][] \define[1]\LocIndex{\expanded{\Location{% \ctxlua{userdata.Lookup("#1") 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 ___
[NTG-context] Is there a short-cut to adding sub-categories for index entries?
I have a document with thousands of index entries. Here’s a samplecode: \starttext Some people livedin \index{cliff-dwelling}cliff-dwellings, while others lived in\index{lean-to}lean-tos. \placeindex \stoptext This produces anindex like this: c cliff-dwelling 1 l lean-to 1 I’d like to createan index with much more sub-categories to find the same entries, forinstance, a category of “dwellings”: c cliff-dwelling 1 d dwellings cliff-dwelling 1 lean-to 1 l lean-to 1 As I’m aware, theway to code this is as follows: \starttext Some people livedin\index{cliff-dwelling}\index{dwellings+cliff-dwelling}cliff-dwellings,while others lived in\index{lean-to}\index{dwellings+lean-to}lean-tos. \placeindex \stoptext I’m wondering ifthere is a short-cut means to set this up, such that if I can tellthe document that any time it sees “cliff-dwellings” in an index,it will also add its page numbers to under “dwellings+cliff-dwelling”? In other words, is there an easierway to add these categories, then to go through the entire documentand mark them? I already have a list of all the words. For instance, in my above code, I must find every \index{cliff-dwelling} entry and add a \index{dwellings+cliff-dwelling} next to it...which would take hundreds of hours if I did that for every word. Is there a quicker way to tell it always also add it under "dwellings" too? --Joel ___ 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] Bug Regarding IIalic Correction in ConTeXt LMTX
Hello, I started using ConTeXt LMTX 2 days ago and after some initial testing I noticed an unexpected behavior regarding italic correction. In short, I cannot seem to produce italic correction like I could in plain TeX or even LaTeX. I've asked the question on TeX StackExchange and another user confirmed the suspicion in his answer. I would suggest you take a look at it because the formatting of the question and the answer is prettier than in this plain text email. Furthermore, a person who provided the answer already did some research. See the question here: https://tex.stackexchange.com/questions/724568/how-to-invoke-italic-correction-in-context-lmtx Here is what I observed: Compare the kerning produced in between 'r' and 'p' in the word "airport" when italic correction is applied in plain TeX (compiled with `pdftex`) and in ConTeXt LMTX (compiled with `luametatex`). Here are the minimal working examples. Plain TeX ``` airport (regular font) {\it air\/}port (italic correction applied) {\it air}port (no italic correction applied) \bye ``` ConTeXt LMTX ``` \starttext airport (regular font) {\it air\/}port (italic correction applied) {\it air}port (no italic correction applied) \stoptext ``` Please confirm if this, in fact, is the issue/bug or if I am not approaching this correctly. I am brand new to ConTeXt, so it could be me. Thank you in advance! Vladimir ___ 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: Complete novice, why does it seem that LuaLaTeX (Compiled via LaTeX Workshop with MikTeX and added packages on Windows) will generate a more compact result than ConTeXt?
On 8/13/2024 8:30 PM, Wolfgang Schuster wrote: Hans Hagen via ntg-context schrieb am 13.08.2024 um 17:40: On 8/13/2024 4:49 PM, fm117...@students.panola.edu wrote: Hello, ConTeXt mailing list! I have a question regarding a difference in the code that I have which uses the same paper size and margin settings, and also the same indentation rules and font size and font. It seems that ConTeXt (which I compiled via Windows Terminal, this *is* the proper way to compile ConTeXt docs, right?) seems to make text that is less... compact, and I am not sure if this is due to me not adding features that I **should** have turned on in ConTeXt when using Times New Roman that is installed by default on Windows. I also was not able to get a "proper (?)" single quote like when Word or LaTeX compiles "Don't", that ' is a straight quote in the compiled text. I also heard that ConTeXT would be much better for typography since it does have a more advanced typographical engine as the base (and this is a big reason as to why I want to switch to ConTeXt, pretty much everything is built in, I just can't understand documentation that well), and this may be because my code is very basic and I do not know how do properly do ConTeXt. Is it possible that ConTeXt also has a more "correct" way of formatting? Anyways, thank you for reading and taking the time to read this post. LuaLaTeX code: https://pastebin.com/p5aWxAyK ConTeXt code: https://pastebin.com/DsMnxMvY Can you explain what you mean with less compact? The default baseline distance of LaTeX is AFAIK 1.2 times the font size, adding \setupinterlinespace [line=1.2\bodyfontsize] to the document setup should produce similar results with ConTeXt. that interlinespace is kind of bad as it can lead to inconsistent line spacing [dp \the\strutdp] \dorecurse{"}{% \ifdim\fontchardp\font#1>\strutdp \char#1 \space \fi } [ht \the\strutht] \dorecurse{"}{% \ifdim\fontcharht\font#1>\strutht \char#1 \space \fi } So, if oen really wants to go that cramped, maybe try \setupinterlinespace [line=1.2\bodyfontsize,height=.75,depth=.25] 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: Complete novice, why does it seem that LuaLaTeX (Compiled via LaTeX Workshop with MikTeX and added packages on Windows) will generate a more compact result than ConTeXt?
Hans Hagen via ntg-context schrieb am 13.08.2024 um 17:40: On 8/13/2024 4:49 PM, fm117...@students.panola.edu wrote: Hello, ConTeXt mailing list! I have a question regarding a difference in the code that I have which uses the same paper size and margin settings, and also the same indentation rules and font size and font. It seems that ConTeXt (which I compiled via Windows Terminal, this *is* the proper way to compile ConTeXt docs, right?) seems to make text that is less... compact, and I am not sure if this is due to me not adding features that I **should** have turned on in ConTeXt when using Times New Roman that is installed by default on Windows. I also was not able to get a "proper (?)" single quote like when Word or LaTeX compiles "Don't", that ' is a straight quote in the compiled text. I also heard that ConTeXT would be much better for typography since it does have a more advanced typographical engine as the base (and this is a big reason as to why I want to switch to ConTeXt, pretty much everything is built in, I just can't understand documentation that well), and this may be because my code is very basic and I do not know how do properly do ConTeXt. Is it possible that ConTeXt also has a more "correct" way of formatting? Anyways, thank you for reading and taking the time to read this post. LuaLaTeX code: https://pastebin.com/p5aWxAyK ConTeXt code: https://pastebin.com/DsMnxMvY Can you explain what you mean with less compact? The default baseline distance of LaTeX is AFAIK 1.2 times the font size, adding \setupinterlinespace [line=1.2\bodyfontsize] to the document setup should produce similar results with ConTeXt. 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] Re: Complete novice, why does it seem that LuaLaTeX (Compiled via LaTeX Workshop with MikTeX and added packages on Windows) will generate a more compact result than ConTeXt?
Hans Hagen via ntg-context schrieb am 13.08.2024 um 17:40: On 8/13/2024 4:49 PM, fm117...@students.panola.edu wrote: Hello, ConTeXt mailing list! I have a question regarding a difference in the code that I have which uses the same paper size and margin settings, and also the same indentation rules and font size and font. It seems that ConTeXt (which I compiled via Windows Terminal, this *is* the proper way to compile ConTeXt docs, right?) seems to make text that is less... compact, and I am not sure if this is due to me not adding features that I **should** have turned on in ConTeXt when using Times New Roman that is installed by default on Windows. I also was not able to get a "proper (?)" single quote like when Word or LaTeX compiles "Don't", that ' is a straight quote in the compiled text. I also heard that ConTeXT would be much better for typography since it does have a more advanced typographical engine as the base (and this is a big reason as to why I want to switch to ConTeXt, pretty much everything is built in, I just can't understand documentation that well), and this may be because my code is very basic and I do not know how do properly do ConTeXt. Is it possible that ConTeXt also has a more "correct" way of formatting? Anyways, thank you for reading and taking the time to read this post. LuaLaTeX code: https://pastebin.com/p5aWxAyK ConTeXt code: https://pastebin.com/DsMnxMvY Can you explain what you mean with less compact? Can we assume that you are running the LMTX version? (luametatex engine) [...] \setupbodyfont[termes,12pt] To get Times New Roman as font replace the \setupbodyfont line from the example of Hans with the following settings. The \definefontfeature line replaces all ' in your text with a apostrophe. \definefontfeature [default] [default] [trep=yes] \definefontfamily [TimesNewRoman] [rm] [Times New Roman] \definetypeface [TimesNewRoman] [mm] [math] [termes] \setupbodyfont [TimesNewRoman,12pt] 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] Re: Complete novice, why does it seem that LuaLaTeX (Compiled via LaTeX Workshop with MikTeX and added packages on Windows) will generate a more compact result than ConTeXt?
On 8/13/2024 4:49 PM, fm117...@students.panola.edu wrote: Hello, ConTeXt mailing list! I have a question regarding a difference in the code that I have which uses the same paper size and margin settings, and also the same indentation rules and font size and font. It seems that ConTeXt (which I compiled via Windows Terminal, this *is* the proper way to compile ConTeXt docs, right?) seems to make text that is less... compact, and I am not sure if this is due to me not adding features that I **should** have turned on in ConTeXt when using Times New Roman that is installed by default on Windows. I also was not able to get a "proper (?)" single quote like when Word or LaTeX compiles "Don't", that ' is a straight quote in the compiled text. I also heard that ConTeXT would be much better for typography since it does have a more advanced typographical engine as the base (and this is a big reason as to why I want to switch to ConTeXt, pretty much everything is built in, I just can't understand documentation that well), and this may be because my code is very basic and I do not know how do properly do ConTeXt. Is it possible that ConTeXt also has a more "correct" way of formatting? Anyways, thank you for reading and taking the time to read this post. LuaLaTeX code: https://pastebin.com/p5aWxAyK ConTeXt code: https://pastebin.com/DsMnxMvY Can you explain what you mean with less compact? Can we assume that you are running the LMTX version? (luametatex engine) \showframe \setuppapersize [letter] [letter] \setuplayout[ backspace=0.5in, topspace=0.5in, header=0in, % No headers footer=0in, % Space for the footer width=middle, height=middle, ] \setupbodyfont[termes,12pt] \mainlanguage[en] \setupindenting[yes,0.5in] \startsetups document:start \centerline{\documentvariable{title}} \centerline{\documentvariable{author}} \centerline{\documentvariable{date}} \blank[line] \stopsetups \startdocument[title=Title,author=Author,date=Date] ... \stopdocument - 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] Complete novice, why does it seem that LuaLaTeX (Compiled via LaTeX Workshop with MikTeX and added packages on Windows) will generate a more compact result than ConTeXt?
Hello, ConTeXt mailing list! I have a question regarding a difference in the code that I have which uses the same paper size and margin settings, and also the same indentation rules and font size and font. It seems that ConTeXt (which I compiled via Windows Terminal, this *is* the proper way to compile ConTeXt docs, right?) seems to make text that is less... compact, and I am not sure if this is due to me not adding features that I **should** have turned on in ConTeXt when using Times New Roman that is installed by default on Windows. I also was not able to get a "proper (?)" single quote like when Word or LaTeX compiles "Don't", that ' is a straight quote in the compiled text. I also heard that ConTeXT would be much better for typography since it does have a more advanced typographical engine as the base (and this is a big reason as to why I want to switch to ConTeXt, pretty much everything is built in, I just can't understand documentation that well), and this may be because my code is very basic and I do not know how do properly do ConTeXt. Is it possible that ConTeXt also has a more "correct" way of formatting? Anyways, thank you for reading and taking the time to read this post. LuaLaTeX code: https://pastebin.com/p5aWxAyK ConTeXt code: https://pastebin.com/DsMnxMvY ConTeXT current version: 2024.07.31 19:43 ___ 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: Nāgarī for Academics
Jürgen Hanneder via ntg-context schrieb am 10.08.2024 um 11:10: Dear Richard, Are you after a Context version of something such as Xetex Devanagari? https://github.com/wujastyk/xetex-devanagari Indeed. In my XeTeX publications settling the font was quite straightforward: \usepackage{polyglossia,fontspec,xunicode} \setmainfont{Adobe Text Pro} \newfontfamily\sanskritfont[Script=Devanagari,Mapping=RomDev,Scale=1.4]{AdishilaSan} \setdefaultlanguage{english} \setotherlanguage{sanskrit} But coming back to ConTeXt: I am grateful to Pablo and Wolfgang for their suggestions, but it does not (yet) work as it should. Perhaps this has to do with the problem in the language command. Here is my test file that works up to the point, and then shows the problem. --- \setuppapersize[A4] \setuplayout[width=14cm, height=fit] \definefontfamily [roman] [rm] [minion] You set a font here for english text but never enable it. \definefontfamily [nagari] [rm] [Adishila] [features=devanagari-one] \setupbodyfont [nagari] This is where you set the font for the whole document. \usetransliteration[indic] \definetransliteration [MyDeva] [lang=sa,vector={iast to deva}] \startsetups [sanskrit] \settransliteration[MyDeva] \switchtobodyfont[nagari] \stopsetups \setuplanguage [sa] [setups=sanskrit] \starttext Example: आनन्द। अपिच % this comes out as it should, but since input is in Nagari there is no transliteration involved. test % the word "test" comes out in roman, i.e. switching back to roman works. \language[sa]{yoga} % the word "yoga" is typeset in Nagari as expected, test % but the word "test" is still typeset in Nagari \language[en]{test} % still no switching back to roman, it seems stuck with Nagari. \stoptext - \definefallbackfamily [Roman] [rm] [Adishila] [range=devanagari,features=devanagari-one] \definefontfamily [Roman] [rm] [Minion Pro] \setupbodyfont [Roman] \definefontfamily [nagari] [rm] [Adishila] [features=devanagari-one] \usetransliteration[indic] \definetransliteration [MyDeva] [lang=sa,vector={iast to deva}] \startsetups [sanskrit] \settransliteration[MyDeva] \switchtobodyfont[nagari] \stopsetups \setuplanguage [sa] [setups=sanskrit] \starttext Example: आनन्द। अपिच Example: \language[sa]{yoga} \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] Re: Nāgarī for Academics
Am 10.08.24 um 11:10 schrieb Jürgen Hanneder via ntg-context: \language[sa]{yoga} % the word "yoga" is typeset in Nagari as expected, test % but the word "test" is still typeset in Nagari Does it work if you say {\language[sa]yoga} test ? I know \language only as a switch, but Hans changed several macros so that they work both ways. And the next \language should still switch, but perhaps \setuplanguage[en][setups=latin] or similar is necessary. 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 ___
[NTG-context] Re: Nāgarī for Academics
Dear Richard, Are you after a Context version of something such as Xetex Devanagari? https://github.com/wujastyk/xetex-devanagari Indeed. In my XeTeX publications settling the font was quite straightforward: \usepackage{polyglossia,fontspec,xunicode} \setmainfont{Adobe Text Pro} \newfontfamily\sanskritfont[Script=Devanagari,Mapping=RomDev,Scale=1.4]{AdishilaSan} \setdefaultlanguage{english} \setotherlanguage{sanskrit} But coming back to ConTeXt: I am grateful to Pablo and Wolfgang for their suggestions, but it does not (yet) work as it should. Perhaps this has to do with the problem in the language command. Here is my test file that works up to the point, and then shows the problem. --- \setuppapersize[A4] \setuplayout[width=14cm, height=fit] \definefontfamily [roman] [rm] [minion] \definefontfamily [nagari] [rm] [Adishila] [features=devanagari-one] \setupbodyfont [nagari] \usetransliteration[indic] \definetransliteration [MyDeva] [lang=sa,vector={iast to deva}] \startsetups [sanskrit] \settransliteration[MyDeva] \switchtobodyfont[nagari] \stopsetups \setuplanguage [sa] [setups=sanskrit] \starttext Example: आनन्द। अपिच % this comes out as it should, but since input is in Nagari there is no transliteration involved. test % the word "test" comes out in roman, i.e. switching back to roman works. \language[sa]{yoga}% the word "yoga" is typeset in Nagari as expected, test % but the word "test" is still typeset in Nagari \language[en]{test}% still no switching back to roman, it seems stuck with Nagari. \stoptext - Jürgen --- Prof. Dr. Juergen Hanneder Philipps-Universitaet Marburg FG Indologie u. Tibetologie Deutschhausstr.12 35032 Marburg Germany Tel. 0049-6421-28-24930 hanne...@staff.uni-marburg.de ___ 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: Nāgarī for Academics
Jürgen Hanneder via ntg-context schrieb am 08.08.2024 um 13:07: The text below works, thanks for the help! But there is one more problem. I could not find an elegant method to set the language of the document to English without disabling Nagari. If one adds \setupbodyfont[minion] the Nagari parts disappear. The normal scenario would be a document in English with Sanskrit as a secondary language, to one switches with a command that changes font, language and activates the transliteration mechanism. You can put all settings (fonts, transliteration etc.) you need for your sanskrit texts in a setups blocks and apply the block to a language. When you use now the \language command (or environment) all settings are now applied to the content. Below is a untested example. \definefontfamily [nagari] [rm] [adishila] [features=devanagari-one] \usetransliteration[indic] \definetransliteration [MyDeva] [lang=sa, vector={iast to deva}] \startsetups [sanskrit] \settransliteration[MyDeva] \switchtobodyfont[nagari] \stopsetups \setuplanguage [sa] [setups=sanskrit] \starttext \subject{Some notes on Printing Sanskrit with lmtx} \language[sa]{योग} -- That is the word Yoga, input and, when you compile this document, printed in (Deva)Nagari script. \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] Re: Nāgarī for Academics
The text below works, thanks for the help! But there is one more problem. I could not find an elegant method to set the language of the document to English without disabling Nagari. If one adds \setupbodyfont[minion] the Nagari parts disappear. The normal scenario would be a document in English with Sanskrit as a secondary language, to one switches with a command that changes font, language and activates the transliteration mechanism. \starttransliteration[MyDeva] does not do this as soon as one sets the roman font. Thanks again! PS: I can write a few notes for Sanskritists for the wiki, I also wrote something on critical editions in ConteXt, which could perhaps be useful for others (in the MyWay format). - \setuppapersize[A4] \definefontfamily [nagari] [rm] [adishila] [features=devanagari-one] \setupbodyfont[nagari] \usetransliteration[indic] \definetransliteration [MyDeva] [lang=sa, vector={iast to deva}] \starttext \subject{Some notes on Printing Sanskrit with lmtx} योग -- That is the word Yoga, input and, when you compile this document, printed in (Deva)Nagari script. 1. In academic publishing we often type in the so-called IAST transliteration and also print in it with diacritics (Nāgarī, Himālaya, Kṛṣṇa etc.). For this we only need a font that has the required diacritics or (in some cases) tell the font to do in anyway with \definefontfeature[default][default][fakecombining=yes,compose=yes] 2. What is extremely practical is to have an input in transcription (yoga), but pdf output as योग. This is the task of the iast to deva option in the set of indic transliterations defined in the preamble. These are two ways to use this method: \starttransliteration[MyDeva] yoga \stoptransliteration \transliteration[MyDeva]{yoga} \stoptext --- --- Prof. Dr. Juergen Hanneder Philipps-Universitaet Marburg FG Indologie u. Tibetologie Deutschhausstr.12 35032 Marburg Germany Tel. 0049-6421-28-24930 hanne...@staff.uni-marburg.de ___ 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: Nāgarī for Academics
On 8/5/2024 11:31 AM, Jürgen Hanneder via ntg-context wrote: I have a few questions concerning the commands for setting up Indic Fonts, specifically for the use of Indologists and other academics dealing with Indian Languages. I have been using the following command in older versions: \definefontfamily [nagari] [rm] [Adishila] [features=devanagari-one] \setupbodyfont [nagari] Example: आनन्द This seems to be out of date and for most academics (especially outside of India) it is preferable to use Sanskrit in transcription (almost all databases use transcription) for input even if printing in Nāgarī. For this we now seem to have the transliteration IAST to Devanagari (?) What we need are thus three elements: switching the language to Sanskrit temporarily (the main language will be english), setting the font for Sanskrit (let us say AsishilaSan), and enabling input of sanskrit in transcription (input: ānanda -> output आनन्द). Just a background note: Transcription and Nāgarī are not as equivalent as one would want. In transcription some word divisions are indicated that are not indicated in a Nāgarī text, which makes reading transcription easier — for those used to it. For most Indian scholars transcription is understandably a nuissance, a bit like reading English in phonetic alphabets. If someone could tell me how to get all these things into a few commands, I would be most grateful. My own attempts, mostly trial and error, did not succeed. You can take a look at type-imp-indic.mkxl which has some about transliterations (there is a subsystem for that) 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: Nāgarī for Academics
Hello Jürgen, Are you after a Context version of something such as Xetex Devanagari? https://github.com/wujastyk/xetex-devanagari Best, Richard -- T +6433121699 M +64210640216 rmaho...@indica-et-buddhica.org https://indica-et-buddhica.com/ Indica et Buddhica Littledene Bay Road Oxford NZ NZBN: 9429041761809 -Original Message- From: Jürgen Hanneder via ntg-context Reply-To: mailing list for ConTeXt users To: mailing list for ConTeXt users Cc: hanne...@staff.uni-marburg.de Subject: [NTG-context] Nāgarī for Academics Date: 2024.08.05 21:31:16 Mailer: Horde Application Framework 5 X-Spam-Score: 0.0 I have a few questions concerning the commands for setting up Indic Fonts, specifically for the use of Indologists and other academics dealing with Indian Languages. I have been using the following command in older versions: \definefontfamily [nagari] [rm] [Adishila] [features=devanagari-one] \setupbodyfont [nagari] Example: आनन्द This seems to be out of date and for most academics (especially outside of India) it is preferable to use Sanskrit in transcription (almost all databases use transcription) for input even if printing in Nāgarī. For this we now seem to have the transliteration IAST to Devanagari (?) What we need are thus three elements: switching the language to Sanskrit temporarily (the main language will be english), setting the font for Sanskrit (let us say AsishilaSan), and enabling input of sanskrit in transcription (input: ānanda -> output आनन्द). Just a background note: Transcription and Nāgarī are not as equivalent as one would want. In transcription some word divisions are indicated that are not indicated in a Nāgarī text, which makes reading transcription easier — for those used to it. For most Indian scholars transcription is understandably a nuissance, a bit like reading English in phonetic alphabets. If someone could tell me how to get all these things into a few commands, I would be most grateful. My own attempts, mostly trial and error, did not succeed. Best Jürgen --- Prof. Dr. Juergen Hanneder Philipps-Universitaet Marburg FG Indologie u. Tibetologie Deutschhausstr.12 35032 Marburg Germany Tel. 0049-6421-28-24930 hanne...@staff.uni-marburg.de __ _ 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 __ _ ___ 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] Nāgarī for Academics
I have a few questions concerning the commands for setting up Indic Fonts, specifically for the use of Indologists and other academics dealing with Indian Languages. I have been using the following command in older versions: \definefontfamily [nagari] [rm] [Adishila] [features=devanagari-one] \setupbodyfont [nagari] Example: आनन्द This seems to be out of date and for most academics (especially outside of India) it is preferable to use Sanskrit in transcription (almost all databases use transcription) for input even if printing in Nāgarī. For this we now seem to have the transliteration IAST to Devanagari (?) What we need are thus three elements: switching the language to Sanskrit temporarily (the main language will be english), setting the font for Sanskrit (let us say AsishilaSan), and enabling input of sanskrit in transcription (input: ānanda -> output आनन्द). Just a background note: Transcription and Nāgarī are not as equivalent as one would want. In transcription some word divisions are indicated that are not indicated in a Nāgarī text, which makes reading transcription easier — for those used to it. For most Indian scholars transcription is understandably a nuissance, a bit like reading English in phonetic alphabets. If someone could tell me how to get all these things into a few commands, I would be most grateful. My own attempts, mostly trial and error, did not succeed. Best Jürgen --- Prof. Dr. Juergen Hanneder Philipps-Universitaet Marburg FG Indologie u. Tibetologie Deutschhausstr.12 35032 Marburg Germany Tel. 0049-6421-28-24930 hanne...@staff.uni-marburg.de ___ 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 to hide any content?
Okay, it took me a while, but I finally found what I believe is a minimum working example: \starttext \chapter{test}\starteffect[hidden]\footnote{here is footnote text}\stopeffect \input knuth \input knuth \stoptext In this case, something that should not be displayed (the footnote mark), is not displayed, but it still creates an extra vertical space. If you highlight the text, you can see there is a blank text space created there. Throwing % signs everywhere doesn't help at all: \starttext% % \chapter{test}\starteffect[hidden]\footnote{here is footnote text}\stopeffect% \input knuth % % \input knuth % \stoptext% On Thursday, July 25, 2024 at 02:57:29 AM MDT, Henning Hraban Ramm wrote: Am 25.07.24 um 10:41 schrieb Taco Hoekwater: > > >> On 25 Jul 2024, at 10:29, Joel via ntg-context wrote: >> >> I have a strange issue with some macros that are creating extra spaces >> between paragraphs. Note these macros shouldn’t create any content, as they >> define content that will be sent to registers and content that is used for >> page references. Its more like invisible data, perhaps the word is >> “metadata” and other parts of the document need to know it and refer to it, >> but nothing should be rendered there. > > You will have to post a true minimal example including the correct definition > of one of your macros. Besides that, try a % at the end of each line of your macro and a comma after each setting. 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 ___ ___ 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 to hide any content?
Am 25.07.24 um 10:41 schrieb Taco Hoekwater: On 25 Jul 2024, at 10:29, Joel via ntg-context wrote: I have a strange issue with some macros that are creating extra spaces between paragraphs. Note these macros shouldn’t create any content, as they define content that will be sent to registers and content that is used for page references. Its more like invisible data, perhaps the word is “metadata” and other parts of the document need to know it and refer to it, but nothing should be rendered there. You will have to post a true minimal example including the correct definition of one of your macros. Besides that, try a % at the end of each line of your macro and a comma after each setting. 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 ___
[NTG-context] Re: How to hide any content?
> On 25 Jul 2024, at 10:29, Joel via ntg-context wrote: > > I have a strange issue with some macros that are creating extra spaces > between paragraphs. Note these macros shouldn’t create any content, as they > define content that will be sent to registers and content that is used for > page references. Its more like invisible data, perhaps the word is “metadata” > and other parts of the document need to know it and refer to it, but nothing > should be rendered there. You will have to post a true minimal example including the correct definition of one of your macros. Best wishes, Taco — Taco Hoekwater E: t...@bittext.nl genderfluid (all pronouns) ___ 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 to hide any content?
I have a strange issue with some macros that are creating extraspaces between paragraphs. Note these macros shouldn’t create anycontent, as they define content that will be sent to registers andcontent that is used for page references. Its more like invisibledata, perhaps the word is “metadata” and other parts of thedocument need to know it and refer to it, but nothing should berendered there. As best as I canunderstand, when ConTeXt sees one of these macros, it creates avertical space after the paragraph, draws nothing, then createsanother vertical space after that, before drawing the next paragraph,so the result is something close to three lines of space. Whenappearing after a section title, its also as if there is an emptyline, then blank space, then the first paragraph of content appears. Sample of what the rendered document looks like: - Section Title .<--if the macro is placed here, a huge empty space after thesection title is there .<-- I’m using these dots to represent empty lines Loremipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmodtempor incididunt ut labore et dolore magna aliqua. Ut enim ad minimveniam, quis nostrud exercitation ullamco laboris nisi ut aliquip exea commodo consequat. Duis aute irure dolor in reprehenderit involuptate velit esse cillum dolore eu fugiat nulla pariatur.Excepteur sint occaecat cupidatat non proident, sunt in culpa quiofficia deserunt mollit anim id est laborum.\mymacro{}<--even ifthe macro is placed here, still in the paragraph, it creates a break . .<--the macro appears here, there is an empty space above and before . Loremipsum odor amet, consectetuer adipiscing elit. Imperdiet suspendisseporttitor tempus arcu turpis cras posuere varius. Volutpat posueresemper nunc metus fermentum egestas? Aenean diam nisl tortor fuscefacilisis hendrerit dolor penatibus. Lectus interdum platea rhoncusat leo; ut mi duis. Nisi vehicula morbi curabitur mus urna sodalessuspendisse sodales. Viverra inceptos sem aenean ultricies congueligula condimentum maecenas. Convallis in elementum risus nec tacitibibendum faucibus ac nascetur. Nulla ligula auctor placerat dignissiminceptos. Felis nulla quam viverra augue maximus hendrerit ipsum. . <--where the macro doesn’t appear, the spacing between paragraphs isfine (here, no macro, so one line of empty space, not three) Loremipsum odor amet, consectetuer adipiscing elit. Turpis himenaeosconubia neque fringilla neque class. Elementum per fermentum nostraullamcorper lacinia tortor pellentesque facilisis. Himenaeos sociosqutellus aptent rhoncus dignissim himenaeos aliquam? Nisi sagittiseuismod tincidunt penatibus eget tristique? Sed nam elit sapientellus mus libero. Consectetur nascetur nec metus pretium hacmolestie. Convallis lacinia quam efficitur convallis; metus purusaliquet. - I’ve analyzed themacros carefully, even rebuilt them. Yet, no matter my attempts torecreate and rewrite the code from scratch, they always create thisvertical space. They shouldn’t create any content, nor should anyevidence of their existence be visible to readers. I’ve tried formonths to find a way to hide these macros, rewriting the code itselfmany times, as I can’t see any reason why its creating anything atall, and also trying to find ways to hide the “blank” contentthat gets rendered: \starteffect[hidden]\mymacro{}\stopeffect \color[white]{\mymacro} \setbox\scratchbox=\vbox{\mymacro} \startnointerference\mymacro\stopnointerference \inmargin{\mymacro} Thesesolutions either entirely don’t remove the extra page break, orlead to the actual content within breaking: for instance, if there’san \index{} entry inside the macro, its page number won’t renderproperly in the end-of-document index. Or if there’s a \reference,other code attempting to display the page number just shows “page,??”. Isthere a way to completely hide content, such that nothing at all isrendered on the page and nothing occupies extra blank space, but thatdoesn’t brak indexes, cross-references, registers, etc.? --Joel ___ 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: (off-topic) hovering over links in Acrobat Reader
On 6/20/2024 5:33 PM, Pablo Rodriguez via ntg-context wrote: On 6/19/24 21:55, Henning Hraban Ramm wrote: Am 19.06.24 um 19:16 schrieb Pablo Rodriguez via ntg-context: Would you be so kind to test the attached document (and the one you may generate from the sample source) hovering over the link frames in Acrobat (ideally DC updated to latest)? At least, I would like to be sure what is going on here. Hovering over links is basic precaution before clicking them. To explain that to others, I’d rather know how Acrobat (Reader) behaves in these cases. Build 24.2.20857.0 on MacOS 10.15.7: 1: no hover 2: https://contextgarden.net 3: https://contextgarden.net Many thanks for your help, Hraban. Thanks to your confirmation, I investigated the issue further (since there had to be something different with my documents). \setuptagging[state=start] is the culprit. "link" is the word displayed when links are hovered over. It's not that hard to get something less generic displayed but the question is what and in what detail. A lot of this stuff is not consistent over viewers and it being part of the user interface might also change over time (some viewers also interpret the page stream for urls). Anyway, a next upload will have this: % \disabledirectives[backends.references.descriptions] % just link % \enabledirectives [backends.references.descriptions] % some detail (some todo) (default) % \enabledirectives [backends.references.descriptions=reference] % a bit less so that you can experiment a bit with it. We might at some point provide optional descriptions per link but the quesiton is how to cleanly interface this (easier if you use \define... instead of your own macros for urls). 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: (off-topic) hovering over links in Acrobat Reader
Am Thu, 20 Jun 2024 17:33:56 +0200 schrieb Pablo Rodriguez via ntg-context: > \setuptagging[state=start] is the culprit. "link" is the word displayed > when links are hovered over. well it would imho be better not to use that at all. Sorry but what context is doing here is cheating. It claims to add a structure (and probably manage to pass automated tests) but all StructElem with the exception of links are role mapped to NonStruct and so are non functional. Links miss the OBJR reference. Annotations only all have as /Content a generic text (link) (which creates your hover effect). When I let Adobe+NVDA read a PDF tagged with LaTeX it recognize and announces structures: headinglevel 2 A section text table with 2 rows and 2 columns row 1 column 1 header A column 2 header B row 2 header A column 1 data A header B column 2 data B out of table linkhttps://www.example.com I can navigate from one heading to the next and inside tables (and when I hover a link the pop up is correct as we are setting the right Contents value.) If you do the same with a document tagged with context you only get a large blob of text A section textHeader AHeader B data Adata B https://contextgarden.net and no navigation at all. All the tagging in the file is useless, it even actually harms because it makes user believe they get an accessible PDF. Tagged, accessible PDF has a lot of shortcomings, especially when it comes to complex documents and math, but for standard documents it can do much better then what context is making out of it. -- Ulrike Fischer http://www.troubleshooting-tex.de/ ___ 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: (off-topic) hovering over links in Acrobat Reader
On 6/19/24 22:10, Wolfgang Schuster wrote: > [...] > This should be \protected\def > > \protect\def\myhref#1#2% >{...} Sorry for the mess, Wolfang and Hraban. I wasn’t aware of the mistake, since the PDF document was neither deleted not showing the colorful error word. I created the document with other commands and I rewrote them (introducing this error). Pablo ___ 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: (off-topic) hovering over links in Acrobat Reader
On 6/19/24 21:55, Henning Hraban Ramm wrote: > Am 19.06.24 um 19:16 schrieb Pablo Rodriguez via ntg-context: >> Would you be so kind to test the attached document (and the one you may >> generate from the sample source) hovering over the link frames in >> Acrobat (ideally DC updated to latest)? >> >> At least, I would like to be sure what is going on here. >> >> Hovering over links is basic precaution before clicking them. >> >> To explain that to others, I’d rather know how Acrobat (Reader) behaves >> in these cases. > > Build 24.2.20857.0 on MacOS 10.15.7: > 1: no hover > 2: https://contextgarden.net > 3: https://contextgarden.net Many thanks for your help, Hraban. Thanks to your confirmation, I investigated the issue further (since there had to be something different with my documents). \setuptagging[state=start] is the culprit. "link" is the word displayed when links are hovered over. Many thanks for your help again, Pablo ___ 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] (off-topic) hovering over links in Acrobat Reader
Dear list, I have the following source: \setupbodyfont[dejavu, sans, 24pt] \setupinteraction[state=start, style=, color=, contrastcolor=, display=new] \enabledirectives[references.border=darkgreen] \def\myurl#1% {{\tt\goto{\hyphenatedurl{#1}}[url(#1)]}} \protect\def\myhref#1#2% {\goto{\hyphenatedurl{#1}}[url(#2)]} \starttext \startTEXpage[pagestate=start, offset=1em, align=center] {\bfa Hovering Over Links} \blank[1st] \attachment[method=hidden, file={signed-a.pdf}] \goto{An embedded PDF document}[signed-a::] \blank[.5st] \myurl{https://contextgarden.net} \blank[.5st] \myhref{A link to the Garden}{https://contextgarden.net} \stopTEXpage \stoptext I also attach my output, since the first link is a link to an embedded document and not the expected link to an external document (I modified ConTeXt to get that kind of link). The issue I’m experiencing with Acrobat Reader DC on Windows (automatically updated to latest version) is that when hovering over links, I get different results. The three links are (in order from top to bottom): 1. A link to the embedded document. 2. An external link with its address as text. 3. Another external link without its address as text. Some days (as today [sorry, I don’t have access to Windows now]), hovering over the three links displayed the word "link" (even with Acrobat set to Spanish). Other days, hovering over the first link displays nothing and hovering over the two other links show their actual destination address. This behavior seems so random to me that I‘m not sure I’m not missing anything. Would you be so kind to test the attached document (and the one you may generate from the sample source) hovering over the link frames in Acrobat (ideally DC updated to latest)? At least, I would like to be sure what is going on here. Hovering over links is basic precaution before clicking them. To explain that to others, I’d rather know how Acrobat (Reader) behaves in these cases. Sorry the off-topic issue and many thanks for your help in advance, Pablo hover.pdf Description: Adobe PDF document ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / 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: Draft vertical text in margins
you can try 'setuptext' and '\setuptexttexts' to put "draft" in margin.and use 'orientation' to change direction. \defineframed[marginframe] [width=max, height=max, style=\ss, corner=08, location=lohi,frame=off] \setuptext [style={\ss}] \setuptexttexts [margin] [] [\marginframe{\hbox orientation 1 {DRAFT}}] [\marginframe{\hbox orientation 1 {DRAFT}}] [] \starttext \chapter{C:Some Word} \dorecurse{5}{ \section{S:Some Word} \input knuth} \stoptext %%% ___ 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: BibTeX choking on comments in database
On Wed, 2024-05-29 at 06:49 -0600, Alan Braslau wrote: > 1) You appear to be using the long-frozen mkii bibliography code. I think you are right! I just realized that. I'm using in my Environment file... % \BIBTEX macro... \usemodule[abr-02] % Setup bibliography... % References database and other general settings... \setupbibtex[database={./References}, sort=author] % Global settings... \setuppublications[ alternative=apa, numbering=yes, monthconversion=month, autohang=yes, sorttype=cite] % Without this, no hyperlinks at all in the output... \setupinteraction[state=start] % This two-part helper creates a hyperlink for url fields... \unprotect \def\bibgotoURL#1#2% {\useURL[#1][#2][][#1]\from[#1]} \def\bibinsertbiburl#1#2#3% {\bibdoifelse{\@@pb@biburl} {#1\expanded{\bibgotoURL{\@@pb@title}{\@@pb@biburl}}#2}{#3}} \protect % Book reference layout... \setuppublicationlayout[book]{% \insertauthors{}{. }{\insertthekey{}{. }{}}% \inserttitle{\bgroup\it }{.\egroup\space }{}% \insertpubname{}{. }{}% \insertday{}{ }{}% \insertmonth{\Word }{. }{}% \insertpubyear{}{. }{}% \insertnote{}{.}{}% } % Adjusted version of 'misc' typesetting, using \insertbiburl % instead of \inserttitle (and \insertbiburl runs the % \bibinsertbiburl macro defined above) \setuppublicationlayout[misc]{% \insertauthors{}{. }{\insertthekey{}{. }{}}% \insertbiburl{\bgroup\it }{.\egroup\space }{}% \insertpubname{}{. }{}% \insertday{}{ }{}% \insertmonth{\Word }{. }{}% \insertpubyear{}{. }{}% \insertnote{}{.}{}% } % finally, this is a horrible hack needed due to bibtex inserting % line breaks in the middle of urls in the output bbl (!) % If you find this hack too ugly, consider editing the .bbl by % hand and forgetting about the .bib file altogether... \let\mydodostartpublication\dodostartpublication \def\dodostartpublication{\catcode`\%=14 \mydodostartpublication} % Macro to put the citations as footnotes... \unexpanded\def\footnotecite{\dodoubleempty\domycite} \def\domycite[#1][#2]% {\ifsecondargument \footnote{\cite[alternative=data,#1][#2]}% \else \footnote{\cite[data][#1]}% \fi} % Individial citation settings... % Enable clickable links... \setupcite[alternative=interaction=start, compress=no] % Publication list setups for end of the book list... % Settings for triggering et al... \setuppublicationlist[authoretallimit=3] \setuppublicationlist[authoretaltext={\it\ et al.}] \setuppublicationlist[authoretaldisplay=2] % List the author, editor, or article author's full name, inverted... \setuppublicationlist[% author=\invertedauthor,% artauthor=\invertedauthor,% editor=\invertedauthor,% title=References] % Setup footnotes... \setupnotation[footnote] [color=colour_footnote_text, backgroundcolor=colour_footnote_background, width=0.3cm, % Space between footnote number and footnote itself numbercommand=] % Remove elevated footnote notation at bottom of page \setupnote[footnote] [textseparator={\textcomma}, % Comma delineated before={\crlf\crlf}] % \setupfootnotes [rule=on, % Disable horizontal rule textstyle={\hskip.03em}] % Vertical space between footnotes and the text % To move footnotes inside of text boxes to the bottom of the page with % the rest of the footnotes. Disabled temporarily to fix issue of text % background frame borders vanishing... \kindofpagetextareas\plusone Whenever I wanted to use a citation I'd just write \footnotecite[something]. But I see now there is this page that describes a different process for using BibTeX: https://wiki.contextgarden.net/Bibliography I will take a look today and try to incorporate the new best practice for using the database and its citations. If you have any suggestions I will try and incorporate them. -- Kip Warner OpenPGP signed/encrypted mail preferred https://www.thevertigo.com 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-con
[NTG-context] Re: page number
Charles Doherty via ntg-context schrieb am 26.05.2024 um 11:27: Dear Wolfgang, I have a book in preparation with running heads. Pagenumber marking |marking Pagenumber The chapter title page has empty headings. The publisher would like the page number centered on the Chapter title page. I manage to put it there but I don’t want it to run on the following pages. I have made various attempts but can’t manage it. I have \setuplayout[location=doublesided] \setuppagenumbering[location=,alternative=doublesided] \setupheadertexts[chapter][][pagenumber] \setupheadertexts[{\getmarking[chapter]}][pagenumber] Please send a complete working example next time. Can anyone show me code to achieve this? 1. You use \setupheadertexts to set the header for all pages. 2. You use \definetext to create a custom header for the chapter page and apply it with the header-key in \setuphead. begin example \setuppagenumbering [location=, alternative=doublesided] \setupheadertexts [chapter] [pagenumber] [pagenumber] [chapter] \definetext [chapterheader] [header] [pagenumber] \setuphead [chapter] [header=chapterheader] \starttext \dorecurse{10} {\startchapter[title=Chapter \convertnumber{Word}{#1}] \dorecurse{10}{\samplefile{lorem}} \stopchapter} \stoptext end example 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] Re: Special charakter
Am 18.05.24 um 14:53 schrieb Thomas Meyer: Thanks to all of you for your hints and comments! I thought \l does work, why \L does not. To type \L is faster than changing the keyboard language when I write in German normally. try \def\L{\char"0141} but I have no real knowledge about ConTeXt ... Herbert Greetings Am 18.05.24 um 13:33 schrieb Bruce Horrocks: On 18 May 2024, at 11:54, Thomas Meyer wrote: I know I can copy and paste it, like here (copied from Wikipedia), but if I don't have a template in a hurry ... On the Mac, if you are using an 'English' keyboard, you can hold down any letter for half a second or so and see a popup selection of alternate accented versions of that letter. Not all text editors / word processors support it but TeXShop does. No need for cut & paste templates. — Bruce Horrocks Hampshire, UK ___ 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 ___ ___ 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 ___ ___ 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: Special charakter
Thanks to all of you for your hints and comments! I thought \l does work, why \L does not. To type \L is faster than changing the keyboard language when I write in German normally. Greetings Am 18.05.24 um 13:33 schrieb Bruce Horrocks: On 18 May 2024, at 11:54, Thomas Meyer wrote: I know I can copy and paste it, like here (copied from Wikipedia), but if I don't have a template in a hurry ... On the Mac, if you are using an 'English' keyboard, you can hold down any letter for half a second or so and see a popup selection of alternate accented versions of that letter. Not all text editors / word processors support it but TeXShop does. No need for cut & paste templates. — Bruce Horrocks Hampshire, UK ___ 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 ___ ___ 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: Special charakter
> On 18 May 2024, at 11:54, Thomas Meyer wrote: > > I know I can copy and paste it, like here (copied from Wikipedia), but if I > don't have a template in a hurry ... On the Mac, if you are using an 'English' keyboard, you can hold down any letter for half a second or so and see a popup selection of alternate accented versions of that letter. Not all text editors / word processors support it but TeXShop does. No need for cut & paste templates. — Bruce Horrocks Hampshire, UK ___ 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 commands in an rtl environment
I discovered what the problem was. Just in case someone else may also wonder how to do this, one way (not necessarily the best) is to insert: {ר}high\ where the letter in parentheses (resh) should be entered in a l2r context, not r2l. Alan On Sun, Apr 28, 2024 at 4:23 PM Alan Bowen wrote: > I am having trouble entering ConteXt commands in an rtl language, in this > case Hebrew. > > How does one make the last(left hand) letter of the Hebrew word > אשר > a superscript? > > My experiments with \high{...} have not been successful so far in part, I > think, because I have not got the brackets right. > > Any tips or pointers will be gratefully received. > > Alan > ___ 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] ConteXt commands in an rtl environment
I am having trouble entering ConteXt commands in an rtl language, in this case Hebrew. How does one make the last(left hand) letter of the Hebrew word אשר a superscript? My experiments with \high{...} have not been successful so far in part, I think, because I have not got the brackets right. Any tips or pointers will be gratefully received. Alan ___ 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: Why are ConTeXt-SBL endnotes empty?
Changing location=none to location=text still left me with the bullet points appearing in a big list at the end of my chapter, but without any messages in them. On Monday, April 22, 2024 at 07:54:39 AM MDT, Joel via ntg-context wrote: A few years back, I tried using endnotes with ConTeXt-SBL, and it failed to compile. I'm forced to try again (due to some other issue with footnotes), and instead of compiling to error, it compiles, but the footnote's message ends up being empty. Why is it appearing empty? Is there a fix? Here is a minimum working example: \usemodule[publ-imp-sbl] \startbuffer [bib] @Article{na2006, title={Volcanoes \word{of} New Mexico}, year={2006}, journal={New Mexico Earth Matters}, publisher={New Mexico Bureau \word{of} Geology \word{and} Mineral Resources}, volume={6}, number={1}, location={Socorro, New Mexico} } @Book{clark1989, author = {Clark, William}, title = {Railroads \word{and} railroad towns \word{in} New Mexico}, publisher = {New Mexico Magazine}, year = {1989}, address = {Albuquerque, New Mexico}, isbn = {9780937206126} } \stopbuffer \usebtxdataset[bib.buffer] \setupbtx[dataset=default] \usebtxdefinitions[sbl] \setupbtx[sbl] \setupnote[footnote][location=none] \starttext \input knuth \cite[clark1989] \placenotes[footnote] \startchapter[title=Bibliography] \placelistofpublications \stopchapter \stoptext --Joel ___ 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 ___ ___ 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] Why are ConTeXt-SBL endnotes empty?
A few years back, I tried using endnotes with ConTeXt-SBL, and it failed to compile. I'm forced to try again (due to some other issue with footnotes), and instead of compiling to error, it compiles, but the footnote's message ends up being empty. Why is it appearing empty? Is there a fix? Here is a minimum working example: \usemodule[publ-imp-sbl] \startbuffer [bib] @Article{na2006, title={Volcanoes \word{of} New Mexico}, year={2006}, journal={New Mexico Earth Matters}, publisher={New Mexico Bureau \word{of} Geology \word{and} Mineral Resources}, volume={6}, number={1}, location={Socorro, New Mexico} } @Book{clark1989, author = {Clark, William}, title = {Railroads \word{and} railroad towns \word{in} New Mexico}, publisher = {New Mexico Magazine}, year = {1989}, address = {Albuquerque, New Mexico}, isbn = {9780937206126} } \stopbuffer \usebtxdataset[bib.buffer] \setupbtx[dataset=default] \usebtxdefinitions[sbl] \setupbtx[sbl] \setupnote[footnote][location=none] \starttext \input knuth \cite[clark1989] \placenotes[footnote] \startchapter[title=Bibliography] \placelistofpublications \stopchapter \stoptext --Joel ___ 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: Very bizarre bug
On 4/7/2024 7:08 PM, Thomas A. Schmitz wrote: Hi everybody, this is bizarre, but hear me out: a file that I have has a mixture of xml, TeX and Lua. It compiles cleanly, no problem, on macos and linux. I also have a little raspberry pi on which I have installed lmtx. The file compiles, BUT: it has one additional page. The first page of the document is empty and has the word "on" in the upper left hand corner of the text area. I have checked several times, it always comes out like this. Everything else is exactly the same - context version, file and environment files (everything under git, so really identical). The "on" does not appear if I just make a "hello world" document on the raspi. So my question is: how can I begin to explore where this word creeps in? I suspect it's something in the linux-aarch64 tree or some test for this architecture that is the culprit, but what would be a good way to trace it? can you make a format with line 25 of context.mkxl uncommented to see if you get a message (not production, just a test) 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] Very bizarre bug
Hi everybody, this is bizarre, but hear me out: a file that I have has a mixture of xml, TeX and Lua. It compiles cleanly, no problem, on macos and linux. I also have a little raspberry pi on which I have installed lmtx. The file compiles, BUT: it has one additional page. The first page of the document is empty and has the word "on" in the upper left hand corner of the text area. I have checked several times, it always comes out like this. Everything else is exactly the same - context version, file and environment files (everything under git, so really identical). The "on" does not appear if I just make a "hello world" document on the raspi. So my question is: how can I begin to explore where this word creeps in? I suspect it's something in the linux-aarch64 tree or some test for this architecture that is the culprit, but what would be a good way to trace it? All best Thomas ___ 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] start/end pages in ToC
Our journal is currently in the process of moving to continuous publication of items in a given volume as they are ready. This entails re-jigging the ToC so that it now includes the start and end page numbers of each item. So far, I have everything pretty much in the right place, but for the page numbers I am getting only “??”. I am not sure why this is happening and would be grateful if someone could tell me why or point me to documentation that explains the problem and how to solve it. Many thanks in advance. My minimalish working example: \definehead[SourceTitle][chapter] \setuphead[SourceTitle][page=yes, footer={ItemData}] \definehead[StudyTitle][chapter] \setuphead[StudyTitle][page=yes, footer={ItemData}] \definetext[ItemData][footer][ {\at[\Reference]– \at[\namedstructureuservariable{}{authorInitials}endPage]} ] \setuplist[SourceTitle][ state=start, textcolor=black, alternative=startendpages, criterium=all, headnumber=no, interaction=page, numberalign=flushright, before={\blank[2.2ex, fixed]}, inbetween=\endgraf, ] \setuplist[StudyTitle][ state=start, textcolor=black, alternative=startendpages, criterium=all, headnumber=no, interaction=all, numberalign=flushright, before={\blank[2.2ex, fixed]}, inbetween=\endgraf, ] \define\ToCEntry{% \structurelistuservariable{author}\crlf \structurelistuservariable{title}\hfill% \at[\structurelistuservariable{reference}]–% \at[\structurelistuservariable{authorInitials}endPage] } \definelistalternative[startendpages] [renderingsetup=list:startendpages] \startsetups[list:startendpages] {\ToCEntry} \vglue1pc \stopsetups \starttext {\tfa\bf Contents} \blank[line, fixed] \WORD{Sources} \blank[halfline, fixed] \placelist[SourceTitle][criterium=all] \blank[line, fixed] \WORD{Studies} \blank[halfline, fixed] \placelist[StudyTitle][criterium=all] \page[makeup] \setnumber[userpage][1] \def\Reference{RefSo01} \startSourceTitle[reference={\Reference}, bookmark=Source01, title={}][ title=Source01, author=Author01, authorInitials=ABC, reference={\Reference}, ] \input knuth \page \dorecurse{25}{\input ward\par} \reference[ABCendPage]{} \stopSourceTitle \page[makeup] \setnumber[userpage][1] \def\Reference{RefSo02} \startSourceTitle[reference={\Reference}, bookmark=Source02, title={}][ author=Author02, title=Source02, authorInitials=PQR, reference={\Reference}, ] \input knuth \page \dorecurse{10}{\input ward\par} \reference[PQRendPage]{} \stopSourceTitle \page[makeup] \setnumber[userpage][1] \def\Reference{RefSt01} \startStudyTitle[reference={\Reference}, bookmark=Study01, title={}][ author=Author03, title=Study01, authorInitials=XYZ, reference={\Reference}, ] \input knuth \blank[big] \page \dorecurse{15}{\input ward\par} \reference[XYZendPage]{} \stopStudyTitle \page[makeup] \stoptext Alan ___ 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] Wiki page : Mixed languages sample (French, Ancient Greek, Arabic, Chinese)
λον· ὡμολόγησα δ᾽ εἰς τήμερον παρέσεσθαι. ταῦτα δὴ ἐκαλλωπισάμην, ἵνα καλὸς παρὰ καλὸν ἴω}. \noindent \quotation{Je rencontrai, dit-il, Socrate, sortant du bain et les pieds chaussés de sandales, ce qui n'est guère dans ses habitudes, et je lui demandai où il allait si beau. Il me répondit : «Je vais dîner chez Agathon. Je me suis dérobé hier à la fête qu'il a donnée en l'honneur de sa victoire, parce que je craignais la foule; mais je me suis engagé à venir le lendemain : voilà pourquoi je me suis paré; je voulais être beau pour venir chez un beau garçon}\inmargin{Platon, {\em Banquet}, 174a}. \stopnarrower On pourrait assurément faire mieux en matière d'édition. Par exemple, mettre le texte grec à gauche et sa traduction française à droite sur la même page, ce qui donnerait quelque chose comme ceci : \startnarrower[1*left,1*right]\tfx\setupinterlinespace \startTwoColumns \quotation{Ἔφη γάρ οἱ Σωκράτη ἐντυχεῖν λελουμένον τε καὶ τὰς βλαύτας ὑποδεδεμένον, ἃ ἐκεῖνος ὀλιγάκις ἐποίει· καὶ ἐρέσθαι αὐτὸν ὅποι ἴοι οὕτω καλὸς γεγενημένος. καὶ τὸν εἰπεῖν ὅτι· Ἐπὶ δεῖπνον εἰς Ἀγάθωνος. χθὲς γὰρ αὐτὸν διέφυγον τοῖς ἐπινικίοις, φοβηθεὶς τὸν ὄχλον· ὡμολόγησα δ᾽ εἰς τήμερον παρέσεσθαι. ταῦτα δὴ ἐκαλλωπισάμην, ἵνα καλὸς παρὰ καλὸν ἴω}.\TwoColumns \quotation{Je rencontrai, dit-il, Socrate, sortant du bain et les pieds chaussés de sandales, ce qui n'est guère dans ses habitudes, et je lui demandai où il allait si beau. Il me répondit : «Je vais dîner chez Agathon. Je me suis dérobé hier à la fête qu'il a donnée en l'honneur de sa victoire, parce que je craignais la foule ; mais je me suis engagé à venir le lendemain : voilà pourquoi je me suis paré ; je voulais être beau pour venir chez un beau garçon}. \stopTwoColumns \stopnarrower \section{Éditer avec \LaTeX : l'alternative \ConTeXt} Les lecteurs habitués ont reconnu dans les paragraphes précédents la marque et la technique du logiciel d'édition \LaTeX. Cependant, l'utilisation de ce logiciel repose sur un ensemble assez important de déclarations et il est nécessaire d'avoir une longue pratique pour arriver à jouer avec, sinon la puissance, du moins la finesse de \LaTeX. Les commandes sont très nombreuses et il faut recourir souvent à un Manuel pour se remémorer les subtilités qui ont permis d'atteindre tel rendu à l'impression. Bien entendu, il existe des logiciels commerciaux d'aide à l'édition professionnelle pour le secteur des Humanités. Mais d'une part ils sont payants et relativement coûteux pour une personne, sans parler du prix des licences pour les groupements professionnels d'enseignants et de chercheurs. Devant cet état de choses, on peut se tourner vers \ConTeXt, qui n'est pas une alternative à \LaTeX, mais une manière plus synthétique (voire plus élégante) d'utiliser \LaTeX. \ConTeXt, de même que \LaTeX, est une suite logicielle qui contient les macros de \LaTeX, les routines du langage {\em Perl}, ainsi que les macros de \LuaTeX. On peut donc définir à peu près tout ce qui est exigé au niveau de l'édition professionnelle, sans entrer dans la connaissance technique du langage \LaTeX. Bien entendu, on n'échappera pas à un certain nombre de questions techniques, si l'on veut travailler avec ce type d'outil : pour le mathématicien, rendre possible la présentation et l'édition parfaites d'équations complexes, mais aussi de schémas et de tableaux nécessite un apprentissage assez poussé. C'est vrai aussi pour les les utilisateurs qui viennent des Humanités, qui connaissent leur domaine, et qui veulent rédiger un document simple, un article de revue, voir des chapitres entiers d'un ouvrage. Très certainement, ce sont les éditeurs qui se chargent de la mise en page (sur la base d'une feuille de style Word) du document que l'on veut publier. Mais parfois, s'il s'agit d'un dossier de plusieurs articles, voire d'une édition avec une aide financière à la publication, on aimerait avoir la main sur la qualité du document imprimé. C'est une des raisons qui font que l'on pourrait désirer maîtriser la chaîne éditoriale, non seulement pour se passer éventuellement d'un éditeur, mais pour disposer d'un aperçu de son propre travail. \section{Faire coexister du Grec, du Chinois et de l'Arabe dans le même texte} Il n'est pas d'usage commun de lire dans le même document du texte courant en français, une référence en grec, par exemple, lorsque dans le {\em Timée}, Platon indique que le plus difficile est de commencer par un commencement qui soit naturel (κατὰ φύσιν ἀρχήν)\inmargin{Platon, {\em Timée}, 29b.}, une indication du nom du philosophe chinois {\em Tchouang Tseu} (en {\em pinyin}\footnote{Le {\em pinyin} (chinois classique 漢語拼音, littéralement “assembler les sons de la langue des Han”), est une
[NTG-context] Re: Works now! At Work, and a question to paragraphs in an Theorem
On 2/27/24 10:10, Ursula Hermann wrote: >[...] > I have a question to my paragraphs: > > \definetextbackground[Paragaph][ > [...] > \startparagraph Hi Uschi, if you define Paragaph, then you should use \startParagaph (and \stopParagaph). > \starttext Even if that works, it would be better to nest commands (\starttext before \startparagraph). > [...] > So this is the example. What I like to do: The first paragraph should be > normal written, but the second one should have more space between the > words. Because of Math: Is \hspace the right way? The right command? And > using \startnarrower, \stopnarrower? Narrower refers to margins. Extra space between words would be something different (at least, as far as I get it). That being said, I have no idea how to get different inter-word spacing. Just in case it might help, Pablo ___ 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: Working with layer sets with Metapost
Thanks Mikael. This helped indeed. I updated my example on the Metapost page in the wiki accordingly. The`pagestate=start` functionality is not documented in the wiki. It's not clear for which context commands it can or should be used. Who is willing to help out here? Best regards Emanuel On Feb. 19 2024, at 2:39 pm, Mikael Sundqvist wrote: > Hi, > > Try > \startTEXpage[pagestate=start] > /Mikael > On Mon, Feb 19, 2024 at 2:31 PM Emanuel Han via ntg-context > wrote: > > > > I just made a strange observation in the output pdf of the attached > > layer_set.tex, which is that when opening it with a pdf viewer like skim or > > macos preview and showing miniatures, all pages except the last one show > > page number 1 (the last showing page number 2). > > > > Which was not the case with the output pdf of the attached > > multipage_metapost_mwe-very_simple.tex. > > > > How can I change my code to have proper consecutive page numbering in a pdf > > viewer? > > > > On Feb. 17 2024, at 11:03 am, Emanuel Han via ntg-context > > wrote: > > > > I think I could solve all the problems. Attached the finalized working > > example. I created the > > https://wiki.contextgarden.net/MetaPost#Layer_sets_as_individual_pages > > entry with it. Feel free to modify. > > > > Cheers > > Emanuel > > > > On Feb. 16 2024, at 7:56 am, Mikael Sundqvist wrote: > > > > Hi, > > > > not sure I get what you are missing. But you can try > > > > setbounds currentpicture to (fullsquare scaled 200) ; > > > > in base. And then do > > > > \dorecurse{5}{ > > \startTEXpage[offset=1DK] > > \useMPgraphic{layerset#1} > > \stopTEXpage > > } > > > > if that is the looping you are after. > > > > /Mikael > > > > On Fri, Feb 16, 2024 at 6:54 AM Emanuel Han via ntg-context > > wrote: > > > > > > Resp. the solution should be such that each generated PDF page has the > > > same dimension, the same background colour and a page number and the > > > metapost content on each page has the same scaling factor. > > > > > > On Feb. 15 2024, at 11:10 pm, Emanuel Han via ntg-context > > > wrote: > > > > > > Dear Mikael, > > > > > > I actually need to keep the \dorecurse mechanism of the mwe (from line 44 > > > on), because I need the "setbounds currentpicture to TheFrame" and also > > > because I need page numbering inside the MPpage, as done with draw > > > textext(decimal(currentime)). > > > > > > So, how can I use the \useMPgraphic{layerset1} etc. inside the > > > \dorecurse, assuming I name my layersets "layerset1", "layerset2", > > > "layerset3" etc.? > > > > > > Emanuel > > > > > > On Feb. 15 2024, at 10:07 pm, Emanuel Han via ntg-context > > > wrote: > > > > > > Dear Mikael, > > > thanks a lot! > > > this seems to be the solution! And it looks beatiful enough to me 😄 > > > I'll try to port all my layers to this new method and see if I run into > > > new problems again 😅 > > > > > > Emanuel > > > > > > > > > On Feb. 15 2024, at 8:19 am, Mikael Sundqvist wrote: > > > > > > Hi > > > > > > On Thu, Feb 15, 2024 at 1:03 AM Emanuel Han via ntg-context > > > wrote: > > > > > > > > Dear list, > > > > > > > > the attached .tex file is the minimal working example we discussed > > > > today in the online meeting. > > > > > > > > I realized that the approach of looping through k of p[k] is not > > > > fitting my needs, because it's not flexible enough. > > > > > > > > I need another approach, one which works with layer sets. > > > > > > > > I would stop using p as an array, because with the layer sets approach > > > > we don't have a fixed order of the layers. > > > > > > > > So the definition of the layers would be something like > > > > > > > > picture layerA; > > > > layerA:=image( > > > > label("Word 1", z1); > > > > ); > > > > > > > > picture layerW; > > > > layerW:=image( > > > > label("Mot 2", z2); > > > > ); > > > > > > > > picture layerM; > > > > layerM:=image( > > > > label(&qu
[NTG-context] Re: Fwd: Re: Working with layer sets with Metapost
Hi, Try \startTEXpage[pagestate=start] /Mikael On Mon, Feb 19, 2024 at 2:31 PM Emanuel Han via ntg-context wrote: > > I just made a strange observation in the output pdf of the attached > layer_set.tex, which is that when opening it with a pdf viewer like skim or > macos preview and showing miniatures, all pages except the last one show page > number 1 (the last showing page number 2). > > Which was not the case with the output pdf of the attached > multipage_metapost_mwe-very_simple.tex. > > How can I change my code to have proper consecutive page numbering in a pdf > viewer? > > On Feb. 17 2024, at 11:03 am, Emanuel Han via ntg-context > wrote: > > I think I could solve all the problems. Attached the finalized working > example. I created the > https://wiki.contextgarden.net/MetaPost#Layer_sets_as_individual_pages entry > with it. Feel free to modify. > > Cheers > Emanuel > > On Feb. 16 2024, at 7:56 am, Mikael Sundqvist wrote: > > Hi, > > not sure I get what you are missing. But you can try > > setbounds currentpicture to (fullsquare scaled 200) ; > > in base. And then do > > \dorecurse{5}{ > \startTEXpage[offset=1DK] > \useMPgraphic{layerset#1} > \stopTEXpage > } > > if that is the looping you are after. > > /Mikael > > On Fri, Feb 16, 2024 at 6:54 AM Emanuel Han via ntg-context > wrote: > > > > Resp. the solution should be such that each generated PDF page has the same > > dimension, the same background colour and a page number and the metapost > > content on each page has the same scaling factor. > > > > On Feb. 15 2024, at 11:10 pm, Emanuel Han via ntg-context > > wrote: > > > > Dear Mikael, > > > > I actually need to keep the \dorecurse mechanism of the mwe (from line 44 > > on), because I need the "setbounds currentpicture to TheFrame" and also > > because I need page numbering inside the MPpage, as done with draw > > textext(decimal(currentime)). > > > > So, how can I use the \useMPgraphic{layerset1} etc. inside the \dorecurse, > > assuming I name my layersets "layerset1", "layerset2", "layerset3" etc.? > > > > Emanuel > > > > On Feb. 15 2024, at 10:07 pm, Emanuel Han via ntg-context > > wrote: > > > > Dear Mikael, > > thanks a lot! > > this seems to be the solution! And it looks beatiful enough to me 😄 > > I'll try to port all my layers to this new method and see if I run into new > > problems again 😅 > > > > Emanuel > > > > > > On Feb. 15 2024, at 8:19 am, Mikael Sundqvist wrote: > > > > Hi > > > > On Thu, Feb 15, 2024 at 1:03 AM Emanuel Han via ntg-context > > wrote: > > > > > > Dear list, > > > > > > the attached .tex file is the minimal working example we discussed today > > > in the online meeting. > > > > > > I realized that the approach of looping through k of p[k] is not fitting > > > my needs, because it's not flexible enough. > > > > > > I need another approach, one which works with layer sets. > > > > > > I would stop using p as an array, because with the layer sets approach we > > > don't have a fixed order of the layers. > > > > > > So the definition of the layers would be something like > > > > > > picture layerA; > > > layerA:=image( > > > label("Word 1", z1); > > > ); > > > > > > picture layerW; > > > layerW:=image( > > > label("Mot 2", z2); > > > ); > > > > > > picture layerM; > > > layerM:=image( > > > label("Parola 3", z3); > > > ); > > > > > > picture layerC; > > > layerC:=image( > > > label("Wort 4", z3+z1); > > > ); > > > > > > picture layerY; > > > layerY:=image( > > > label("Nummer 5", z2+z3); > > > ); > > > > > > picture layerU; > > > layerU:=image( > > > label("number 6", z2+z1); > > > ); > > > > > > After that, I would define layer sets and layer subsets. This will be > > > done manually for each layer set and each layer subset. > > > I don't know the proper syntax to do that. Let's assume we could use a > > > variable type called "myset". > > > > > > myset layersubsetGamma; > > > layersubsetGamma:={layerU,layerM}; > > > > > > In my logic, the layers will
[NTG-context] Fwd: Re: Working with layer sets with Metapost
I just made a strange observation in the output pdf of the attached layer_set.tex, which is that when opening it with a pdf viewer like skim or macos preview and showing miniatures, all pages except the last one show page number 1 (the last showing page number 2). Which was not the case with the output pdf of the attached multipage_metapost_mwe-very_simple.tex. How can I change my code to have proper consecutive page numbering in a pdf viewer?On Feb. 17 2024, at 11:03 am, Emanuel Han via ntg-context wrote:I think I could solve all the problems. Attached the finalized working example. I created the https://wiki.contextgarden.net/MetaPost#Layer_sets_as_individual_pages entry with it. Feel free to modify.CheersEmanuelOn Feb. 16 2024, at 7:56 am, Mikael Sundqvist wrote:Hi,not sure I get what you are missing. But you can trysetbounds currentpicture to (fullsquare scaled 200) ;in base. And then do\dorecurse{5}{\startTEXpage[offset=1DK]\useMPgraphic{layerset#1}\stopTEXpage}if that is the looping you are after./MikaelOn Fri, Feb 16, 2024 at 6:54 AM Emanuel Han via ntg-context wrote:>> Resp. the solution should be such that each generated PDF page has the same dimension, the same background colour and a page number and the metapost content on each page has the same scaling factor.>> On Feb. 15 2024, at 11:10 pm, Emanuel Han via ntg-context wrote:>> Dear Mikael,>> I actually need to keep the \dorecurse mechanism of the mwe (from line 44 on), because I need the "setbounds currentpicture to TheFrame" and also because I need page numbering inside the MPpage, as done with draw textext(decimal(currentime)).>> So, how can I use the \useMPgraphic{layerset1} etc. inside the \dorecurse, assuming I name my layersets "layerset1", "layerset2", "layerset3" etc.?>> Emanuel>> On Feb. 15 2024, at 10:07 pm, Emanuel Han via ntg-context wrote:>> Dear Mikael,> thanks a lot!> this seems to be the solution! And it looks beatiful enough to me 😄> I'll try to port all my layers to this new method and see if I run into new problems again 😅>> Emanuel>>> On Feb. 15 2024, at 8:19 am, Mikael Sundqvist wrote:>> Hi>> On Thu, Feb 15, 2024 at 1:03 AM Emanuel Han via ntg-context> wrote:> >> > Dear list,> >> > the attached .tex file is the minimal working example we discussed today in the online meeting.> >> > I realized that the approach of looping through k of p[k] is not fitting my needs, because it's not flexible enough.> >> > I need another approach, one which works with layer sets.> >> > I would stop using p as an array, because with the layer sets approach we don't have a fixed order of the layers.> >> > So the definition of the layers would be something like> >> > picture layerA;> > layerA:=image(> > label("Word 1", z1);> > );> >> > picture layerW;> > layerW:=image(> > label("Mot 2", z2);> > );> >> > picture layerM;> > layerM:=image(> > label("Parola 3", z3);> > );> >> > picture layerC;> > layerC:=image(> > label("Wort 4", z3+z1);> > );> >> > picture layerY;> > layerY:=image(> > label("Nummer 5", z2+z3);> > );> >> > picture layerU;> > layerU:=image(> > label("number 6", z2+z1);> > );> >> > After that, I would define layer sets and layer subsets. This will be done manually for each layer set and each layer subset.> > I don't know the proper syntax to do that. Let's assume we could use a variable type called "myset".> >> > myset layersubsetGamma;> > layersubsetGamma:={layerU,layerM};> >> > In my logic, the layers will be drawn in the order of their appearance within the {}. In the example, drawn content of layerM might cover drawn content of layerU.> >> > Contrary to a layer subset, each layer set will result in a PDF page, and thus the layer sets are related to each other by an inner order. That's why I would use an array variable here with [].> >> > I don't know how to append a set. In the following example, I assumed there would be a function myappend(, )> >> > myset layerset[];> > layerset1 := {layerW,layerA};> > layerset2 := myappend{layerset1, layerY};> > layerset3 := myappend{layerset2, layersubsetGamma};> > layerset4 := myappend{layerset2, layerU};> > layerset5 := myappend{layerset4, layersubsetGamma};> >> > Finally, I would need each layerset[k] typeset on its own pdf page. And of course on each page k, only the layers which appear in the definition of the layerset[k] should be drawn on top of each other in the order as t
[NTG-context] Re: manuals
Hello everyone! As an eternal newbie (with a memory like a goldfish), I started by building my own documentation from the web pages constructed by Bertrand Masson (prehistory archaeologist in Northern France) "les fiches à Bébert" (obsolete version here: http://bertrandmasson.free.fr/; new recommended version here: http://lesfichesabebert.fr/TeX/context/context-intro.html). As mentionned by Alain Delmotte. Bertrand Masson always keeps his site up to date, as he gives references to the documentation compiled by Garulfo (Joaquín Ataz López ), available in several languages, which I personally found well-done, useful and welcome. It's interesting to note with a rather positive smile that documentations, even if they're never really up to date in the details of ConTeXt's evolution, copy each other: that's what I did to write the beginning of a Wikibook in French (https://fr.wikibooks.org/wiki/ConTeXt/Qu%27est-ce_que_ConTeXt_%3F). I took things written by Bertrand Masson and was partially taken over by Garulfo and so on. Fortunately, the ConTeXT discussion list offers MWEs: all you have to do is to test them and save these examples on your system in the CTX-TESTS document folder. The next step is to classify these examples under the appropriate headings, then insert them into a coding system for a complex document that always calls for requests for explanations from discussion list participants. This question of documentation seems to me to be an age-old snake, not only on a technical subject which can be complex, as ConTeXt can be, but also concerning other types of documentation. For my part, although I haven't yet exhausted all the available documentation resources, whether internal to the distribution, or online like the ConTeXt Garden wiki, I think (but this has been better expressed here by others than me) that a real documentation refresh could be carried out collectively, with the great ambition of keeping obsolete documentation in an archive, while proposing a wiki with the date of update visible, in correlation with the PDF version. I have no idea how this documentation update could be achieved, but the fact is that it would be desirable to devote a section to the purely technical and basic aspects of CTX installation and font availability on Windows, Mac OS, Linux, BSD, etc., with MWEs and examples a little more detailed. Once this documentation has been passed as an introductory part (itself containing chapters explaining how this page of documentation was put together, with notes in the margins, etc.), this book could introduce MKIV, LuaTeX, MetaPost and so on, but with a clear distinction between the objectives sought: writing documentation with figures, writing a thesis in mathematics and physics, how to construct figures, or a bibliography. Not to mention the handling of photographs in an aesthetically demanding layout; all this with the possibility of showing complete or partial examples of work produced... In a nutshell: even if I give the impression that I'm asking you to reinvent the wheel, in reality it's a question of collating relevant existing information in a way that is intelligible and clear to the neophyte, but that also meets the demands of experienced users, who don't all use ConTeXt for the same reasons. Don't get me wrong: I'm not telling you what to do, I'm just giving you my opinion. Basically, I'm saying: documentation exists, but it has to be reliable, up to date, easy to find and enable you to make progress in difficult situations. As I said, I found Garulfo's work very welcome. It's not obsolete and doesn't need replacing. But perhaps it could be amended on certain points and completed and made available both in PDF and online in the ConTeXt Garden wiki pages? So, if by hypothesis the relevant documentation exists, here and there, but it's in the middle of pages that are in the past, it can be considered a daunting task to go looking for information that you realize is no longer up to date, because experience shows that it's no longer reliable. If confusion reigns, those seeking to apply what they've read risk turning away from ConTeXt, or asking the same questions over and over again. So there's plenty of food for thought to be had when it comes to methods for overhauling existing documentation. It's not a question of thinking long and hard about the availability of this documentation (on line or as a PDF?), but rather of knowing whether to build an encyclopedia, or a series of manuals, each of which is intended to circumscribe as closely as possible the problems encountered when attempting this or that form of page layout. I remember being astonished to discover, when I first started learning ConTeXt, all the vocabulary that existed around page layout (in French: Grand fond, petit fond,
[NTG-context] Re: Working with layer sets with Metapost
I think I could solve all the problems. Attached the finalized working example. I created the https://wiki.contextgarden.net/MetaPost#Layer_sets_as_individual_pages entry with it. Feel free to modify. Cheers Emanuel On Feb. 16 2024, at 7:56 am, Mikael Sundqvist wrote: > Hi, > > not sure I get what you are missing. But you can try > setbounds currentpicture to (fullsquare scaled 200) ; > in base. And then do > \dorecurse{5}{ > \startTEXpage[offset=1DK] > \useMPgraphic{layerset#1} > \stopTEXpage > } > > if that is the looping you are after. > /Mikael > On Fri, Feb 16, 2024 at 6:54 AM Emanuel Han via ntg-context > wrote: > > > > Resp. the solution should be such that each generated PDF page has the same > > dimension, the same background colour and a page number and the metapost > > content on each page has the same scaling factor. > > > > On Feb. 15 2024, at 11:10 pm, Emanuel Han via ntg-context > > wrote: > > > > Dear Mikael, > > > > I actually need to keep the \dorecurse mechanism of the mwe (from line 44 > > on), because I need the "setbounds currentpicture to TheFrame" and also > > because I need page numbering inside the MPpage, as done with draw > > textext(decimal(currentime)). > > > > So, how can I use the \useMPgraphic{layerset1} etc. inside the \dorecurse, > > assuming I name my layersets "layerset1", "layerset2", "layerset3" etc.? > > > > Emanuel > > > > On Feb. 15 2024, at 10:07 pm, Emanuel Han via ntg-context > > wrote: > > > > Dear Mikael, > > thanks a lot! > > this seems to be the solution! And it looks beatiful enough to me 😄 > > I'll try to port all my layers to this new method and see if I run into new > > problems again 😅 > > > > Emanuel > > > > > > On Feb. 15 2024, at 8:19 am, Mikael Sundqvist wrote: > > > > Hi > > > > On Thu, Feb 15, 2024 at 1:03 AM Emanuel Han via ntg-context > > wrote: > > > > > > Dear list, > > > > > > the attached .tex file is the minimal working example we discussed today > > > in the online meeting. > > > > > > I realized that the approach of looping through k of p[k] is not fitting > > > my needs, because it's not flexible enough. > > > > > > I need another approach, one which works with layer sets. > > > > > > I would stop using p as an array, because with the layer sets approach we > > > don't have a fixed order of the layers. > > > > > > So the definition of the layers would be something like > > > > > > picture layerA; > > > layerA:=image( > > > label("Word 1", z1); > > > ); > > > > > > picture layerW; > > > layerW:=image( > > > label("Mot 2", z2); > > > ); > > > > > > picture layerM; > > > layerM:=image( > > > label("Parola 3", z3); > > > ); > > > > > > picture layerC; > > > layerC:=image( > > > label("Wort 4", z3+z1); > > > ); > > > > > > picture layerY; > > > layerY:=image( > > > label("Nummer 5", z2+z3); > > > ); > > > > > > picture layerU; > > > layerU:=image( > > > label("number 6", z2+z1); > > > ); > > > > > > After that, I would define layer sets and layer subsets. This will be > > > done manually for each layer set and each layer subset. > > > I don't know the proper syntax to do that. Let's assume we could use a > > > variable type called "myset". > > > > > > myset layersubsetGamma; > > > layersubsetGamma:={layerU,layerM}; > > > > > > In my logic, the layers will be drawn in the order of their appearance > > > within the {}. In the example, drawn content of layerM might cover drawn > > > content of layerU. > > > > > > Contrary to a layer subset, each layer set will result in a PDF page, and > > > thus the layer sets are related to each other by an inner order. That's > > > why I would use an array variable here with []. > > > > > > I don't know how to append a set. In the following example, I assumed > > > there would be a function myappend(, > > initial set should be appended with>) > > > > > > myset layerset[]; > > > layerset1 := {layerW,layerA}; > > > layerset2 := myappend{layerset1, layerY}
[NTG-context] Re: Working with layer sets with Metapost
Hi, not sure I get what you are missing. But you can try setbounds currentpicture to (fullsquare scaled 200) ; in base. And then do \dorecurse{5}{ \startTEXpage[offset=1DK] \useMPgraphic{layerset#1} \stopTEXpage } if that is the looping you are after. /Mikael On Fri, Feb 16, 2024 at 6:54 AM Emanuel Han via ntg-context wrote: > > Resp. the solution should be such that each generated PDF page has the same > dimension, the same background colour and a page number and the metapost > content on each page has the same scaling factor. > > On Feb. 15 2024, at 11:10 pm, Emanuel Han via ntg-context > wrote: > > Dear Mikael, > > I actually need to keep the \dorecurse mechanism of the mwe (from line 44 > on), because I need the "setbounds currentpicture to TheFrame" and also > because I need page numbering inside the MPpage, as done with draw > textext(decimal(currentime)). > > So, how can I use the \useMPgraphic{layerset1} etc. inside the \dorecurse, > assuming I name my layersets "layerset1", "layerset2", "layerset3" etc.? > > Emanuel > > On Feb. 15 2024, at 10:07 pm, Emanuel Han via ntg-context > wrote: > > Dear Mikael, > thanks a lot! > this seems to be the solution! And it looks beatiful enough to me 😄 > I'll try to port all my layers to this new method and see if I run into new > problems again 😅 > > Emanuel > > > On Feb. 15 2024, at 8:19 am, Mikael Sundqvist wrote: > > Hi > > On Thu, Feb 15, 2024 at 1:03 AM Emanuel Han via ntg-context > wrote: > > > > Dear list, > > > > the attached .tex file is the minimal working example we discussed today in > > the online meeting. > > > > I realized that the approach of looping through k of p[k] is not fitting my > > needs, because it's not flexible enough. > > > > I need another approach, one which works with layer sets. > > > > I would stop using p as an array, because with the layer sets approach we > > don't have a fixed order of the layers. > > > > So the definition of the layers would be something like > > > > picture layerA; > > layerA:=image( > > label("Word 1", z1); > > ); > > > > picture layerW; > > layerW:=image( > > label("Mot 2", z2); > > ); > > > > picture layerM; > > layerM:=image( > > label("Parola 3", z3); > > ); > > > > picture layerC; > > layerC:=image( > > label("Wort 4", z3+z1); > > ); > > > > picture layerY; > > layerY:=image( > > label("Nummer 5", z2+z3); > > ); > > > > picture layerU; > > layerU:=image( > > label("number 6", z2+z1); > > ); > > > > After that, I would define layer sets and layer subsets. This will be done > > manually for each layer set and each layer subset. > > I don't know the proper syntax to do that. Let's assume we could use a > > variable type called "myset". > > > > myset layersubsetGamma; > > layersubsetGamma:={layerU,layerM}; > > > > In my logic, the layers will be drawn in the order of their appearance > > within the {}. In the example, drawn content of layerM might cover drawn > > content of layerU. > > > > Contrary to a layer subset, each layer set will result in a PDF page, and > > thus the layer sets are related to each other by an inner order. That's why > > I would use an array variable here with []. > > > > I don't know how to append a set. In the following example, I assumed there > > would be a function myappend(, > set should be appended with>) > > > > myset layerset[]; > > layerset1 := {layerW,layerA}; > > layerset2 := myappend{layerset1, layerY}; > > layerset3 := myappend{layerset2, layersubsetGamma}; > > layerset4 := myappend{layerset2, layerU}; > > layerset5 := myappend{layerset4, layersubsetGamma}; > > > > Finally, I would need each layerset[k] typeset on its own pdf page. And of > > course on each page k, only the layers which appear in the definition of > > the layerset[k] should be drawn on top of each other in the order as they > > appear in that definition. > > > > I'm very curious to hear your suggestions. > > > > Not beautiful, perhaps, but maybe something like this could work? I > think there is no way out of doing some manual work to tell what you > want included on each page. > > \startuseMPgraphic{base} > z1 = origin ; > z2 = (10,50) ; > z3 = (40,30) ; > > picture layerA; > layerA:=ima
[NTG-context] Re: Working with layer sets with Metapost
Resp. the solution should be such that each generated PDF page has the same dimension, the same background colour and a page number and the metapost content on each page has the same scaling factor. On Feb. 15 2024, at 11:10 pm, Emanuel Han via ntg-context wrote: > Dear Mikael, > > I actually need to keep the \dorecurse mechanism of the mwe (from line 44 > on), because I need the "setbounds currentpicture to TheFrame" and also > because I need page numbering inside the MPpage, as done with draw > textext(decimal(currentime)). > So, how can I use the \useMPgraphic{layerset1} etc. inside the \dorecurse, > assuming I name my layersets "layerset1", "layerset2", "layerset3" etc.? > Emanuel > On Feb. 15 2024, at 10:07 pm, Emanuel Han via ntg-context > wrote: > > Dear Mikael, > > thanks a lot! > > this seems to be the solution! And it looks beatiful enough to me 😄 > > I'll try to port all my layers to this new method and see if I run into new > > problems again 😅 > > > > Emanuel > > > > On Feb. 15 2024, at 8:19 am, Mikael Sundqvist wrote: > > > Hi > > > > > > On Thu, Feb 15, 2024 at 1:03 AM Emanuel Han via ntg-context > > > wrote: > > > > > > > > Dear list, > > > > > > > > the attached .tex file is the minimal working example we discussed > > > > today in the online meeting. > > > > > > > > I realized that the approach of looping through k of p[k] is not > > > > fitting my needs, because it's not flexible enough. > > > > > > > > I need another approach, one which works with layer sets. > > > > > > > > I would stop using p as an array, because with the layer sets approach > > > > we don't have a fixed order of the layers. > > > > > > > > So the definition of the layers would be something like > > > > > > > > picture layerA; > > > > layerA:=image( > > > > label("Word 1", z1); > > > > ); > > > > > > > > picture layerW; > > > > layerW:=image( > > > > label("Mot 2", z2); > > > > ); > > > > > > > > picture layerM; > > > > layerM:=image( > > > > label("Parola 3", z3); > > > > ); > > > > > > > > picture layerC; > > > > layerC:=image( > > > > label("Wort 4", z3+z1); > > > > ); > > > > > > > > picture layerY; > > > > layerY:=image( > > > > label("Nummer 5", z2+z3); > > > > ); > > > > > > > > picture layerU; > > > > layerU:=image( > > > > label("number 6", z2+z1); > > > > ); > > > > > > > > After that, I would define layer sets and layer subsets. This will be > > > > done manually for each layer set and each layer subset. > > > > I don't know the proper syntax to do that. Let's assume we could use a > > > > variable type called "myset". > > > > > > > > myset layersubsetGamma; > > > > layersubsetGamma:={layerU,layerM}; > > > > > > > > In my logic, the layers will be drawn in the order of their appearance > > > > within the {}. In the example, drawn content of layerM might cover > > > > drawn content of layerU. > > > > > > > > Contrary to a layer subset, each layer set will result in a PDF page, > > > > and thus the layer sets are related to each other by an inner order. > > > > That's why I would use an array variable here with []. > > > > > > > > I don't know how to append a set. In the following example, I assumed > > > > there would be a function myappend(, > > > initial set should be appended with>) > > > > > > > > myset layerset[]; > > > > layerset1 := {layerW,layerA}; > > > > layerset2 := myappend{layerset1, layerY}; > > > > layerset3 := myappend{layerset2, layersubsetGamma}; > > > > layerset4 := myappend{layerset2, layerU}; > > > > layerset5 := myappend{layerset4, layersubsetGamma}; > > > > > > > > Finally, I would need each layerset[k] typeset on its own pdf page. And > > > > of course on each page k, only the layers which appear in the > > > > definition of the layerset[k] should be drawn on top of each other in > > >
[NTG-context] Re: Working with layer sets with Metapost
Dear Mikael, I actually need to keep the \dorecurse mechanism of the mwe (from line 44 on), because I need the "setbounds currentpicture to TheFrame" and also because I need page numbering inside the MPpage, as done with draw textext(decimal(currentime)). So, how can I use the \useMPgraphic{layerset1} etc. inside the \dorecurse, assuming I name my layersets "layerset1", "layerset2", "layerset3" etc.? Emanuel On Feb. 15 2024, at 10:07 pm, Emanuel Han via ntg-context wrote: > Dear Mikael, > thanks a lot! > this seems to be the solution! And it looks beatiful enough to me 😄 > I'll try to port all my layers to this new method and see if I run into new > problems again 😅 > > Emanuel > > On Feb. 15 2024, at 8:19 am, Mikael Sundqvist wrote: > > Hi > > > > On Thu, Feb 15, 2024 at 1:03 AM Emanuel Han via ntg-context > > wrote: > > > > > > Dear list, > > > > > > the attached .tex file is the minimal working example we discussed today > > > in the online meeting. > > > > > > I realized that the approach of looping through k of p[k] is not fitting > > > my needs, because it's not flexible enough. > > > > > > I need another approach, one which works with layer sets. > > > > > > I would stop using p as an array, because with the layer sets approach we > > > don't have a fixed order of the layers. > > > > > > So the definition of the layers would be something like > > > > > > picture layerA; > > > layerA:=image( > > > label("Word 1", z1); > > > ); > > > > > > picture layerW; > > > layerW:=image( > > > label("Mot 2", z2); > > > ); > > > > > > picture layerM; > > > layerM:=image( > > > label("Parola 3", z3); > > > ); > > > > > > picture layerC; > > > layerC:=image( > > > label("Wort 4", z3+z1); > > > ); > > > > > > picture layerY; > > > layerY:=image( > > > label("Nummer 5", z2+z3); > > > ); > > > > > > picture layerU; > > > layerU:=image( > > > label("number 6", z2+z1); > > > ); > > > > > > After that, I would define layer sets and layer subsets. This will be > > > done manually for each layer set and each layer subset. > > > I don't know the proper syntax to do that. Let's assume we could use a > > > variable type called "myset". > > > > > > myset layersubsetGamma; > > > layersubsetGamma:={layerU,layerM}; > > > > > > In my logic, the layers will be drawn in the order of their appearance > > > within the {}. In the example, drawn content of layerM might cover drawn > > > content of layerU. > > > > > > Contrary to a layer subset, each layer set will result in a PDF page, and > > > thus the layer sets are related to each other by an inner order. That's > > > why I would use an array variable here with []. > > > > > > I don't know how to append a set. In the following example, I assumed > > > there would be a function myappend(, > > initial set should be appended with>) > > > > > > myset layerset[]; > > > layerset1 := {layerW,layerA}; > > > layerset2 := myappend{layerset1, layerY}; > > > layerset3 := myappend{layerset2, layersubsetGamma}; > > > layerset4 := myappend{layerset2, layerU}; > > > layerset5 := myappend{layerset4, layersubsetGamma}; > > > > > > Finally, I would need each layerset[k] typeset on its own pdf page. And > > > of course on each page k, only the layers which appear in the definition > > > of the layerset[k] should be drawn on top of each other in the order as > > > they appear in that definition. > > > > > > I'm very curious to hear your suggestions. > > > > > > > Not beautiful, perhaps, but maybe something like this could work? I > > think there is no way out of doing some manual work to tell what you > > want included on each page. > > > > \startuseMPgraphic{base} > > z1 = origin ; > > z2 = (10,50) ; > > z3 = (40,30) ; > > > > picture layerA; > > layerA:=image( > > label("Word 1", z1); > > ); > > > > picture layerW; > > layerW:=image( > > label("Mot 2", z2); > > ); > > > > picture layerM; > > layerM:=image( > > lab
[NTG-context] Re: Working with layer sets with Metapost
Dear Mikael, thanks a lot! this seems to be the solution! And it looks beatiful enough to me 😄 I'll try to port all my layers to this new method and see if I run into new problems again 😅 Emanuel On Feb. 15 2024, at 8:19 am, Mikael Sundqvist wrote: > Hi > > On Thu, Feb 15, 2024 at 1:03 AM Emanuel Han via ntg-context > wrote: > > > > Dear list, > > > > the attached .tex file is the minimal working example we discussed today in > > the online meeting. > > > > I realized that the approach of looping through k of p[k] is not fitting my > > needs, because it's not flexible enough. > > > > I need another approach, one which works with layer sets. > > > > I would stop using p as an array, because with the layer sets approach we > > don't have a fixed order of the layers. > > > > So the definition of the layers would be something like > > > > picture layerA; > > layerA:=image( > > label("Word 1", z1); > > ); > > > > picture layerW; > > layerW:=image( > > label("Mot 2", z2); > > ); > > > > picture layerM; > > layerM:=image( > > label("Parola 3", z3); > > ); > > > > picture layerC; > > layerC:=image( > > label("Wort 4", z3+z1); > > ); > > > > picture layerY; > > layerY:=image( > > label("Nummer 5", z2+z3); > > ); > > > > picture layerU; > > layerU:=image( > > label("number 6", z2+z1); > > ); > > > > After that, I would define layer sets and layer subsets. This will be done > > manually for each layer set and each layer subset. > > I don't know the proper syntax to do that. Let's assume we could use a > > variable type called "myset". > > > > myset layersubsetGamma; > > layersubsetGamma:={layerU,layerM}; > > > > In my logic, the layers will be drawn in the order of their appearance > > within the {}. In the example, drawn content of layerM might cover drawn > > content of layerU. > > > > Contrary to a layer subset, each layer set will result in a PDF page, and > > thus the layer sets are related to each other by an inner order. That's why > > I would use an array variable here with []. > > > > I don't know how to append a set. In the following example, I assumed there > > would be a function myappend(, > set should be appended with>) > > > > myset layerset[]; > > layerset1 := {layerW,layerA}; > > layerset2 := myappend{layerset1, layerY}; > > layerset3 := myappend{layerset2, layersubsetGamma}; > > layerset4 := myappend{layerset2, layerU}; > > layerset5 := myappend{layerset4, layersubsetGamma}; > > > > Finally, I would need each layerset[k] typeset on its own pdf page. And of > > course on each page k, only the layers which appear in the definition of > > the layerset[k] should be drawn on top of each other in the order as they > > appear in that definition. > > > > I'm very curious to hear your suggestions. > > > > Not beautiful, perhaps, but maybe something like this could work? I > think there is no way out of doing some manual work to tell what you > want included on each page. > > \startuseMPgraphic{base} > z1 = origin ; > z2 = (10,50) ; > z3 = (40,30) ; > > picture layerA; > layerA:=image( > label("Word 1", z1); > ); > > picture layerW; > layerW:=image( > label("Mot 2", z2); > ); > > picture layerM; > layerM:=image( > label("Parola 3", z3); > ); > > picture layerC; > layerC:=image( > label("Wort 4", z3+z1); > ); > > picture layerY; > layerY:=image( > label("Nummer 5", z2+z3); > ); > > picture layerU; > layerU:=image( > label("number 6", z2+z1); > ); > \stopuseMPgraphic > > \startuseMPgraphic{Gamma} > draw layerU ; > draw layerM ; > \stopuseMPgraphic > > \startuseMPgraphic{layerset1} > \includeMPgraphic{base} > draw layerW ; > draw layerA ; > \stopuseMPgraphic > > \startuseMPgraphic{layerset2} > \includeMPgraphic{layerset1} ; > draw layerY ; > \stopuseMPgraphic > > \startuseMPgraphic{layerset3} > \includeMPgraphic{layerset2} ; > \includeMPgraphic{Gamma} ; > \stopuseMPgraphic > > > \startuseMPgraphic{layerset4} > \includeMPgraphic{layerset2} ; > draw layerU ; > \stopuseMPgraphic > > \startuseMPgraphic{layerset5} > \includeMPgraphic{layerset4} ; > \include
[NTG-context] Re: Working with layer sets with Metapost
Hi On Thu, Feb 15, 2024 at 1:03 AM Emanuel Han via ntg-context wrote: > > Dear list, > > the attached .tex file is the minimal working example we discussed today in > the online meeting. > > I realized that the approach of looping through k of p[k] is not fitting my > needs, because it's not flexible enough. > > I need another approach, one which works with layer sets. > > I would stop using p as an array, because with the layer sets approach we > don't have a fixed order of the layers. > > So the definition of the layers would be something like > > picture layerA; > layerA:=image( > label("Word 1", z1); > ); > > picture layerW; > layerW:=image( > label("Mot 2", z2); > ); > > picture layerM; > layerM:=image( > label("Parola 3", z3); > ); > > picture layerC; > layerC:=image( > label("Wort 4", z3+z1); > ); > > picture layerY; > layerY:=image( > label("Nummer 5", z2+z3); > ); > > picture layerU; > layerU:=image( > label("number 6", z2+z1); > ); > > After that, I would define layer sets and layer subsets. This will be done > manually for each layer set and each layer subset. > I don't know the proper syntax to do that. Let's assume we could use a > variable type called "myset". > > myset layersubsetGamma; > layersubsetGamma:={layerU,layerM}; > > In my logic, the layers will be drawn in the order of their appearance within > the {}. In the example, drawn content of layerM might cover drawn content of > layerU. > > Contrary to a layer subset, each layer set will result in a PDF page, and > thus the layer sets are related to each other by an inner order. That's why I > would use an array variable here with []. > > I don't know how to append a set. In the following example, I assumed there > would be a function myappend(, should be appended with>) > > myset layerset[]; > layerset1 := {layerW,layerA}; > layerset2 := myappend{layerset1, layerY}; > layerset3 := myappend{layerset2, layersubsetGamma}; > layerset4 := myappend{layerset2, layerU}; > layerset5 := myappend{layerset4, layersubsetGamma}; > > Finally, I would need each layerset[k] typeset on its own pdf page. And of > course on each page k, only the layers which appear in the definition of the > layerset[k] should be drawn on top of each other in the order as they appear > in that definition. > > I'm very curious to hear your suggestions. > Not beautiful, perhaps, but maybe something like this could work? I think there is no way out of doing some manual work to tell what you want included on each page. \startuseMPgraphic{base} z1 = origin ; z2 = (10,50) ; z3 = (40,30) ; picture layerA; layerA:=image( label("Word 1", z1); ); picture layerW; layerW:=image( label("Mot 2", z2); ); picture layerM; layerM:=image( label("Parola 3", z3); ); picture layerC; layerC:=image( label("Wort 4", z3+z1); ); picture layerY; layerY:=image( label("Nummer 5", z2+z3); ); picture layerU; layerU:=image( label("number 6", z2+z1); ); \stopuseMPgraphic \startuseMPgraphic{Gamma} draw layerU ; draw layerM ; \stopuseMPgraphic \startuseMPgraphic{layerset1} \includeMPgraphic{base} draw layerW ; draw layerA ; \stopuseMPgraphic \startuseMPgraphic{layerset2} \includeMPgraphic{layerset1} ; draw layerY ; \stopuseMPgraphic \startuseMPgraphic{layerset3} \includeMPgraphic{layerset2} ; \includeMPgraphic{Gamma} ; \stopuseMPgraphic \startuseMPgraphic{layerset4} \includeMPgraphic{layerset2} ; draw layerU ; \stopuseMPgraphic \startuseMPgraphic{layerset5} \includeMPgraphic{layerset4} ; \includeMPgraphic{Gamma} ; \stopuseMPgraphic \starttext \startTEXpage[offset=1DK] \useMPgraphic{layerset1} \stopTEXpage \startTEXpage[offset=1DK] \useMPgraphic{layerset2} \stopTEXpage \startTEXpage[offset=1DK] \useMPgraphic{layerset3} \stopTEXpage \startTEXpage[offset=1DK] \useMPgraphic{layerset4} \stopTEXpage \startTEXpage[offset=1DK] \useMPgraphic{layerset5} \stopTEXpage \stoptext /Mikael ___ 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] Working with layer sets with Metapost
Dear list, the attached .tex file is the minimal working example we discussed today in the online meeting. I realized that the approach of looping through k of p[k] is not fitting my needs, because it's not flexible enough. I need another approach, one which works with layer sets. I would stop using p as an array, because with the layer sets approach we don't have a fixed order of the layers. So the definition of the layers would be something like picture layerA; layerA:=image( label("Word 1", z1); ); picture layerW; layerW:=image( label("Mot 2", z2); ); picture layerM; layerM:=image( label("Parola 3", z3); ); picture layerC; layerC:=image( label("Wort 4", z3+z1); ); picture layerY; layerY:=image( label("Nummer 5", z2+z3); ); picture layerU; layerU:=image( label("number 6", z2+z1); ); After that, I would define layer sets and layer subsets. This will be done manually for each layer set and each layer subset. I don't know the proper syntax to do that. Let's assume we could use a variable type called "myset". myset layersubsetGamma; layersubsetGamma:={layerU,layerM}; In my logic, the layers will be drawn in the order of their appearance within the {}. In the example, drawn content of layerM might cover drawn content of layerU. Contrary to a layer subset, each layer set will result in a PDF page, and thus the layer sets are related to each other by an inner order. That's why I would use an array variable here with []. I don't know how to append a set. In the following example, I assumed there would be a function myappend(, ) myset layerset[]; layerset1 := {layerW,layerA}; layerset2 := myappend{layerset1, layerY}; layerset3 := myappend{layerset2, layersubsetGamma}; layerset4 := myappend{layerset2, layerU}; layerset5 := myappend{layerset4, layersubsetGamma}; Finally, I would need each layerset[k] typeset on its own pdf page. And of course on each page k, only the layers which appear in the definition of the layerset[k] should be drawn on top of each other in the order as they appear in that definition. I'm very curious to hear your suggestions. Thanks Emanuel multipage_metapost_mwe-very_simple.tex Description: TeX document ___ 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: Seeindex with zie instead of see?
Am 14.02.24 um 10:42 schrieb G.C.H.M. Verhaag via ntg-context: Hi ConTeXt users, Wondering whether there is a possibility to modify the word *see* into the Dutch word *zie* in the use of the \seeindex command? Did you set \mainlanguage[nl]? 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 ___
[NTG-context] Seeindex with zie instead of see?
Hi ConTeXt users, Wondering whether there is a possibility to modify the word 'see' into the Dutch word 'zie' in the use of the \seeindex command? Regards, Gerard ___ 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] Seeindex with zie instead of see?
Hi ConTeXt users, Wondering whether there is a possibility to modify the word *see* into the Dutch word *zie* in the use of the \seeindex command? Regards, Gerard ___ 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 to print the book title and section title where \reference is located?
> On 7 Feb 2024, at 03:47, Joel via ntg-context wrote: > > I have an extensive multi-book project. Each book has a nickname, like TB for > "Textbook", "WB 1" for the "Workbook, Vol. 1": > > TB -- 01_textbook.tex > WB 1 -- 03_workbook.tex > WB 2 -- 04_workbook.tex > WB 3 -- 05_workbook.tex > WB 4 -- 06_workbook.tex > TG -- 08_teachersguide.tex > > I have to prove to a government agency that the content meets several > requirements, so I'm giving them a simple file that says something like > "Requirement A is met in TB, "Cats", p. 11" basically letting the reader know > its in the textbook, section called "Cats", on p. 11. To mark the pages, I'm > simply dropping in macros called "\requirementA" "\requirementB" on whichever > page of whichever book demonstrates it meets the requirement, then the file > will aquatically list the book, section, and page number by searching for > that macro. [snip] > Here is a sample message what the output should give: > > "Requirement A is met in WB 3, "Bears", p. 33." Taking you literally in that you want a *file* listing the occurences and not a typeset page listing the occurrences then you could try using the following in your document at the places where you currently put \requirementA etc: \writestatus{RequirementMet}{Requirement A is met in section \fetchmark[section][current], p. \pagenumber} This will write the current section title and page number to the console listing, prefixed by the word "RequirementMet". To produce the file for your customer all you have to do is filter these lines out of the .log file that is produced when you compile your book. In Unix-like systems that is a simple: grep RequirementMet file.log Regards, — Bruce Horrocks Hampshire, UK ___ 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: cont-new.mkiv and \everymathematics
On 1/20/2024 7:49 PM, Rogers, Michael K wrote: Hi all, In writing class notes, I frequently make one-letter macros for formatted symbols, such \v and \w for vectors. Generally speaking, one-letter names for function/macros/variables is frowned upon in programming, but I find this localized use very convenient. In cont-new.mkiv, one finds definitions of \t and \w (via \let) appended to \everymathematics, which overwrites my definition of \w every time TeX enters math mode. I can fix this by appending my definition to \everymathematics. The inefficiency seems minor, and I can live with it. I have a question and a couple of points: 1. Is there a better way than adding the definition to \everymathematics? 2. I don’t think these definitions should be in ConTeXt. Let users add them if they wish. Or add a ‘useshortcuts’ option to \setupmathematics. 3. \t and \w are undocumented, \mathword is undocumented, and it took me a while to track down the bug it created for me. In particular, they overwrote my definition only in math mode, and “\show\w” did not work in math mode. Frustrating. I could add a wikipage, I suppose, but I’m not proud of the extent of my knowledge: “\mathword{word} typesets “word” in math mode in a normal text font, somewhat like \text{word}, and \w is an abbreviation of it that is added to \everymathematics on startup.” adding to \everymathematics can work fine as long as you're the last one adding when you overload built in commands, \enabledirectives[overloadmode=error] % or warning can give you some protection 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] cont-new.mkiv and \everymathematics
Hi all, In writing class notes, I frequently make one-letter macros for formatted symbols, such \v and \w for vectors. Generally speaking, one-letter names for function/macros/variables is frowned upon in programming, but I find this localized use very convenient. In cont-new.mkiv, one finds definitions of \t and \w (via \let) appended to \everymathematics, which overwrites my definition of \w every time TeX enters math mode. I can fix this by appending my definition to \everymathematics. The inefficiency seems minor, and I can live with it. I have a question and a couple of points: 1. Is there a better way than adding the definition to \everymathematics? 2. I don’t think these definitions should be in ConTeXt. Let users add them if they wish. Or add a ‘useshortcuts’ option to \setupmathematics. 3. \t and \w are undocumented, \mathword is undocumented, and it took me a while to track down the bug it created for me. In particular, they overwrote my definition only in math mode, and “\show\w” did not work in math mode. Frustrating. I could add a wikipage, I suppose, but I’m not proud of the extent of my knowledge: “\mathword{word} typesets “word” in math mode in a normal text font, somewhat like \text{word}, and \w is an abbreviation of it that is added to \everymathematics on startup.” Thank you very much, Michael ___ 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 to Create Asymmetrical Continuous Columns in ConTeXt?
Hi all, I have a lengthy text that I wish to seamlessly incorporate using the \input{mytext} command in ConTeXt. Additionally, I aim to present it in asymmetrical continuous columns, where the text flows over several pages. I have tried paragraphs and columns, but in paragraphs, I can't flow text across several pages without manually breaking it, and in columns, I haven't found a way to implement asymmetric columns. How can I achieve this layout in ConTeXt? this is a MWE but it does not work properly: \definecolumnset[mymixedcolumn][n=2] \setupcolumnset[mymixedcolumn:1][width=4cm] \setupcolumnset[mymixedcolumn:2][width=7cm] \starttext \startcolumnset[mymixedcolumn] \dorecurse{5}{ \input{knuth} } \stopcolumnset \stoptext also is there a mechanism to automatically continue text between desired frames? For example, is there a way to write a function that, if the text reaches the end of the line and there is not enough space for another line in that frame, it continues the text in another frame that is already specified? in other word How do you make text flow to another part of a page? Thanks in advance. Best regards, Seyal ___ 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: LMTX schema for poster
Am 11.01.24 um 22:04 schrieb Bruce Horrocks: 1. "ConTeXt" should be the biggest word - or as an obvious title for the poster, away from the actual drawing. This will be only a part of the poster. I imagine a 3x3 grid with a title above and some information (website etc.) below. The 9 elements of the grid will be - such a diagram that explains the building blocks / general workflow – the diagram of the layout areas – the project structure (environment, product, component) – some examples of code and results I wanted to use the “christmas card” squares for borders around and inbetween. 2. Don't add the "MkXL" bit - it's a distracting detail that no one needs to know at this stage. Also it looks like "Mk 40" in Roman numerals, or extra large. ok. But “extra large” is intentional, I guess. 3. I though Hans had stopped using the TeX style capitalisation now i.e. just "Context"? Hans uses different versions. We use “context group”, but I keep ConTeXt; esp. in the context of LaTeX (DANTE booth!), I’d like to stress that it’s still TeX. 4. It's not clear whether the intersecting boxes are simply decorative or meant to present some sort of logical structure. I'm happy for it to be decorative, in which case fewer labels might be better. ConTeXt “wraps” the LuaMetaTeX binary, since it handles the input as well as the output. I wasn’t sure how to show what controls what. 5. Similar to the box structure comment is that it's not clear which words I should be looking at. Ask yourself: what word(s) do I want the viewer to remember when they walk away? 6. Consider swapping the TeX and MetaPost circles so that Lua, MetaPost and TeX are read left to right as they appear in the acronym LMTX. Perhaps invert the "triangle" so that there are two circles at the top. My first idea was to show that TeX and MP are under Lua control, but Hans disagreed. So while the 3 subsystems interact, I wanted to keep TeX on top. 7. It doesn't really tell the viewer that Context is a typesetting system - it looks like it is a system for producing XMLs and PDFs. (Which is what it is but... much more) I’ll show some typography on the poster, and there will be books around. 8. Don't forget space for a URL and/or a QR code to the Contextgarden website. See above. Sorry if the above sounds harsh - not meant to be - just brain storming. No problem, thank you! I have a suggestion though. Use the Christmas card code / memory game code to produce patterns to use as the dots in the QR code? If the QR is large enough for people to distinguish the individual dots then it would provide a talking point? Or maybe have a copy of the card game to hand and challenge them to find a randomly drawn card in the QR code? I don’t think I understand your intention. I wouldn’t construct a QR code out of other stuff, it would become too big. 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 ___
[NTG-context] Re: LMTX schema for poster
> On 11 Jan 2024, at 19:15, vm via ntg-context wrote: > > > > On 11/01/2024 19:52, Henning Hraban Ramm wrote: >> Here’s a preliminary schema of LMTX. What do you think? > > as is, it is difficult to understand where to look. > what does is describe? > > e.g. what is the distinction between the 'source' (lua tex) and the > 'resources' (fonts icc lib) and the 'frontend' (tex xml png ...mp) > (no lua?) Agreed. In no particular order: 1. "ConTeXt" should be the biggest word - or as an obvious title for the poster, away from the actual drawing. 2. Don't add the "MkXL" bit - it's a distracting detail that no one needs to know at this stage. Also it looks like "Mk 40" in Roman numerals, or extra large. 3. I though Hans had stopped using the TeX style capitalisation now i.e. just "Context"? 4. It's not clear whether the intersecting boxes are simply decorative or meant to present some sort of logical structure. I'm happy for it to be decorative, in which case fewer labels might be better. 5. Similar to the box structure comment is that it's not clear which words I should be looking at. Ask yourself: what word(s) do I want the viewer to remember when they walk away? 6. Consider swapping the TeX and MetaPost circles so that Lua, MetaPost and TeX are read left to right as they appear in the acronym LMTX. Perhaps invert the "triangle" so that there are two circles at the top. 7. It doesn't really tell the viewer that Context is a typesetting system - it looks like it is a system for producing XMLs and PDFs. (Which is what it is but... much more) 8. Don't forget space for a URL and/or a QR code to the Contextgarden website. Sorry if the above sounds harsh - not meant to be - just brain storming. I have a suggestion though. Use the Christmas card code / memory game code to produce patterns to use as the dots in the QR code? If the QR is large enough for people to distinguish the individual dots then it would provide a talking point? Or maybe have a copy of the card game to hand and challenge them to find a randomly drawn card in the QR code? — Bruce Horrocks Hampshire, UK — Bruce Horrocks Hampshire, UK ___ 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: Chemnitz, Leipzig, Call for Poster
Dear list, dear Hraban, > Le 7 janv. 2024 à 13:58, Henning Hraban Ramm a écrit : > > Am 07.01.24 um 17:11 schrieb garulfo: >> does this kind of poster would make sense ? >> https://wiki.contextgarden.net/Cover_Pages#Poster_01_-_proposal_for_Libre_Planet_2021 > > Thank you, that looks good but it’s not what I had in mind. > > I meant a poster _about_ ConTeXt, not only made with our toolset (I have a > stack of books for that). Maybe something about typography. > > Here’s how the DANTE booth at FrOSCon 2023 looked like: > https://yemaya.fiee.net/s/qTkeXAmXmJeosJc > (The “mindmap” diagram on the left shows projects supported by DANTE, in the > middle a drawing by Duane Bibby, on the right a Tux with its TikZ source code > in the back.) > We also had posters that show the architecture of TeX/LaTeX, but they were > seriously outdated. > > Some elements that might fit: > – some example code (like from Mikael’s BachoTeX presentation) > – anatomy of a word and a formula (with all those little boxes and measures), > maybe also in Arabic > – dodo & cow drawings from Mikael’s math manual > – overview of layout areas (I re-made Sietse’s drawing from the wiki for my > book) > - workflow diagrams > – parts of LuaMetaTeX > – artwork by Eçir Baff (art-aleatoire.com) > – Hans’ recent christmas card / memory game artwork > > But I don’t want just a wild collection of stuff, there should be something > connecting them. It should be interesting to look at as well as basic > information about ConTeXt. > Hraban > The suite ConTeXt/Metafun is so powerful, and can do so much different things, as already mentioned, that it can be difficult to present it in a coherent way. Perhaps this angle is that Context is a real Swiss Army knife: not only can it do lots of different things, it can do them very very well! You can take (and or I can provide in PDF of) any artwork from art-aleatoire.com <http://art-aleatoire.com/>, and if you wish/need I can contribute to an « art » part ! Fabrice.___ 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: Chemnitz, Leipzig, Call for Poster
Am 07.01.24 um 17:11 schrieb garulfo: does this kind of poster would make sense ? https://wiki.contextgarden.net/Cover_Pages#Poster_01_-_proposal_for_Libre_Planet_2021 Thank you, that looks good but it’s not what I had in mind. I meant a poster _about_ ConTeXt, not only made with our toolset (I have a stack of books for that). Maybe something about typography. Here’s how the DANTE booth at FrOSCon 2023 looked like: https://yemaya.fiee.net/s/qTkeXAmXmJeosJc (The “mindmap” diagram on the left shows projects supported by DANTE, in the middle a drawing by Duane Bibby, on the right a Tux with its TikZ source code in the back.) We also had posters that show the architecture of TeX/LaTeX, but they were seriously outdated. Some elements that might fit: – some example code (like from Mikael’s BachoTeX presentation) – anatomy of a word and a formula (with all those little boxes and measures), maybe also in Arabic – dodo & cow drawings from Mikael’s math manual – overview of layout areas (I re-made Sietse’s drawing from the wiki for my book) - workflow diagrams – parts of LuaMetaTeX – artwork by Eçir Baff (art-aleatoire.com) – Hans’ recent christmas card / memory game artwork But I don’t want just a wild collection of stuff, there should be something connecting them. It should be interesting to look at as well as basic information about ConTeXt. 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 ___
[NTG-context] Re: multipage metapost output from ConTeXt
Hi Mikael, with the solution provided by you, I could work on my graphic which grows from page to page. So far I have already 28 pages. Now I would like to go back to the summed graphic of p1 to p21 and add the coming p29, p30 etc. to only that (that means contents of p22 to p28 should not be visible on pages 29 and forward). I don't bother you with my code which is too long. Let's use the mwe provided by you (I added it here for convenience), where we have 3 pages. How can I have the content of p2 not be added on page 3 and forward? \startuseMPgraphic{base} picture p[]; path TheFrame ; TheFrame := fullsquare scaled 5in ; z1 = (60,40); z2 = (40,90); z3 = (10,70); p1:=image( label("Word 1", z1); ); p2:=image( label("Mot 2", z2); ); p3:=image( label("Parola 3", z3); ); \stopuseMPgraphic \starttext \dorecurse{3}{ % Frame \startMPpage[pagestate=start] \includeMPgraphic{base} currentime := #1 ; % Just for learning : draw TheFrame withpen pencircle scaled .1in withcolor magenta ; draw textext("T="&decimal(currentime)) scaled 2 shifted(0,2in) withcolor magenta ; for k=1 upto currentime: addto currentpicture also p[k]; endfor setbounds currentpicture to TheFrame ; desiredformat := 1080;% In pixels (will be converted by default at 72dpi) currentpicture := currentpicture xysized (desiredformat ,desiredformat ); \stopMPpage } \stoptext On Dez. 2 2023, at 7:46 pm, Mikael Sundqvist wrote: > Hi, > > I don't know if \startMPinclusions \stopMPinclusions shall work with > \startMPpage and \stopMPpage. In this case, one can use a separate > graphics: > > \startuseMPgraphic{base} > picture p[]; > path TheFrame ; > TheFrame := fullsquare scaled 5in ; > z1 = (60,40); > z2 = (40,90); > z3 = (10,70); > > p1:=image( > label("Word 1", z1); > ); > > p2:=image( > label("Mot 2", z2); > ); > > p3:=image( > label("Parola 3", z3); > ); > > \stopuseMPgraphic > \starttext > \dorecurse{3}{ % Frame > \startMPpage[pagestate=start] > \includeMPgraphic{base} > currentime := #1 ; > % Just for learning : > draw TheFrame withpen pencircle scaled .1in withcolor magenta ; > draw textext("T="&decimal(currentime)) scaled 2 shifted(0,2in) > withcolor magenta ; > for k=1 upto currentime: addto currentpicture also p[k]; endfor > setbounds currentpicture to TheFrame ; > > desiredformat := 1080;% In pixels (will be converted by default at 72dpi) > currentpicture := currentpicture xysized (desiredformat ,desiredformat ); > \stopMPpage > } > > \stoptext > /Mikael > On Sat, Dec 2, 2023 at 6:14 PM Emanuel Han via ntg-context > wrote: > > > > Hi Mikael, > > > > here's a very simple mwe for the label(textext()) issue. On page 1, the > > text "Word 1" should be drawn in position z1. On page 2, the same text in > > the same position should be visible, and the text "Mot 2" in position p2 > > should be added. And so on. > > > > \startMPinclusions > > > > picture p[]; > > path TheFrame ; > > TheFrame := fullsquare scaled 5in ; > > > > z1 = (60,40); > > z2 = (40,90); > > z3 = (10,70); > > > > p1:=image( > > label(textext("Word 1"), z1); > > ); > > > > p2:=image( > > label(textext("Mot 2"), z2); > > ); > > > > p3:=image( > > label(textext("Parola 3"), z3); > > ); > > > > \stopMPinclusions > > > > \starttext > > > > \dorecurse{3}{ % Frame > > \startMPpage[pagestate=start] > > currentime := #1 ; > > % Just for learning : > > draw TheFrame withpen pencircle scaled .1in withcolor magenta ; > > draw textext("T="&decimal(currentime)) scaled 2 shifted(0,2in) withcolor > > magenta ; > > for k=1 upto currentime: draw p[k]; endfor > > setbounds currentpicture to TheFrame ; > > > > desiredformat := 1080;% In pixels (will be converted by default at 72dpi) > > currentpicture := currentpicture xysized (desiredformat ,desiredformat ); > > > > \stopMPpage > > } > > > > \stoptext > > > > On Dez. 2 2023, at 5:22 pm, Mikael Sundqvist wrote: > > > > Hi Emanuel, > > > > I am not sure I understand your question, and since you use fonts that > > i do not have, I cannot test your example as is. But, maybe, if you > > want to redraw a picture, you can do > > > > addto currentpicture also p1; > > > > where you want it. > > > > /Mikael > > > > PS For the text thing, I did not get it. Could one have a _very > > simple_ example showing only that problem and no
[NTG-context] How to implement word corrections
Hi, list! I'm writing a small module to print word corrections, e.g., things like "irregardless" > "regardless"or "alverja" > "arveja" ('pea' in Spanish) with overstrikes and underlines, but I want feedback to make a module in the ConTeXt fashion. I hope the PDF attached explains better what I mean. Just in case, I want to know if anyone else in the mailing list is acquainted with grammar and orthography quizzes/exercises/exams in ConTeXt. Merry Christmas and Happy New Year! Best regards, Jairo correction_draft.tex Description: Binary data correction_draft.pdf Description: Adobe PDF document ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / 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: multipage metapost output from ConTeXt
Dear Emanuel, > Le 2 déc. 2023 à 12:08, Emanuel Han via ntg-context a > écrit : > > Hi Mikael, > > here's a very simple mwe for the label(textext()) issue. On page 1, the text > "Word 1" should be drawn in position z1. On page 2, the same text in the same > position should be visible, and the text "Mot 2" in position p2 should be > added. And so on. > > \startMPinclusions > > picture p[]; > path TheFrame ; > TheFrame := fullsquare scaled 5in ; > > z1 = (60,40); > z2 = (40,90); > z3 = (10,70); > > p1:=image( > label(textext("Word 1"), z1); > ); > > p2:=image( > label(textext("Mot 2"), z2); > ); > > p3:=image( > label(textext("Parola 3"), z3); > ); > > \stopMPinclusions > > \starttext > > \dorecurse{3}{ % Frame > \startMPpage[pagestate=start] > currentime := #1 ; > % Just for learning : > draw TheFrame withpen pencircle scaled .1in withcolor magenta ; > draw textext("T="&decimal(currentime)) scaled 2 shifted(0,2in) withcolor > magenta ; > for k=1 upto currentime: draw p[k]; endfor > setbounds currentpicture to TheFrame ; > > desiredformat := 1080;% In pixels (will be converted by default at 72dpi) > currentpicture := currentpicture xysized (desiredformat ,desiredformat ); > > \stopMPpage > } > > \stoptext > > On Dez. 2 2023, at 5:22 pm, Mikael Sundqvist wrote: > Hi Emanuel, > > I am not sure I understand your question, and since you use fonts that > i do not have, I cannot test your example as is. But, maybe, if you > want to redraw a picture, you can do > > addto currentpicture also p1; > > where you want it. > > /Mikael > > PS For the text thing, I did not get it. Could one have a _very > simple_ example showing only that problem and no other problem? > > On Sat, Dec 2, 2023 at 12:58 PM fv leung wrote: > > > > You didn't specify the color of path A in p2 and p4. So it's drawn in black. > > The other issue, I can't help. > > > > Emanuel Han via ntg-context 於 2023年12月2日 週六 下午7:23寫道: > >> > >> So is there a way to circumvent these issues? Or an explanation for this > >> behavior, so that I can try to find a solution by myself? > >> > >> Thanks > >> Emanuel > >> > >> On Nov. 29 2023, at 12:25 pm, Emanuel Han via ntg-context > >> wrote: > >> > >> Dear Aditya and Fabrice, > >> thanks for your responses. > >> > >> I included some of Fabrice's code into mine for testing purpose, and > >> indeed the multipage works now. > >> What is bizarre is that issues appear now that didn't appear before: > >> > >> Path A is drawn with color red on page 1, and in color black on all > >> following pages, while it should stay red. > >> textext(, ) is overwriting with > >> "T="&decimal(currentime) which has been used previously in textext() > >> before the for k=1 endfor loop. This overwriting happens only for the > >> first textext() which occurs inside the for k=1 endfor loop. All other > >> textext() inside the for k=1 endfor loop are not drawn at all. If the line > >> « draw textext("T="&decimal(currentime)) scaled 2 shifted(0,2in) withcolor > >> magenta ; » is commented out, the first textext() inside the for k=1 > >> endfor loop is not drawn neither. It must be an issue with textext(), > >> because when I replace textext() by lmt_outline[], the text is drawn. > >> > >> Adjusted mwe: > >> > >> \enableregime[utf] % enable unicoded input > >> > >> \definefontfamily [RomanFont] [rm] [calluna] > >> > >> \definefontfamily [KoreanFont] [rm] [applemyungjo] > >> > >> \definefontfamily [JapaneseFont] [rm] [hannotatesc] > >> > >> \definefontfeature > >> [fea] > >> [mode=node,language=dflt,script=arab, > >> init=yes, > >> medi=yes, > >> fina=yes, > >> isol=yes, > >> calt=yes, > >> rlig=yes, > >> tlig=yes, > >> trep=yes, > >> curs=yes, > >> kern=yes, > >> mark=yes > >> ] > >> > >> \starttypescript [serif] [notonaskharabic] > >> \definefontsynonym [notonaskharabic-Light] [name:notonaskharabic] > >> [features=fea] > >> \definefontsynonym [notonaskharabic-Bold] [name:notonaskharabic] > >> [features=fea] > >> \definefontsynonym [notonaskharabic-Italic] [
[NTG-context] Re: multipage metapost output from ConTeXt
Thank you Mikael, this works! Emanuel On Dez. 2 2023, at 7:46 pm, Mikael Sundqvist wrote: > Hi, > > I don't know if \startMPinclusions \stopMPinclusions shall work with > \startMPpage and \stopMPpage. In this case, one can use a separate > graphics: > > \startuseMPgraphic{base} > picture p[]; > path TheFrame ; > TheFrame := fullsquare scaled 5in ; > z1 = (60,40); > z2 = (40,90); > z3 = (10,70); > > p1:=image( > label("Word 1", z1); > ); > > p2:=image( > label("Mot 2", z2); > ); > > p3:=image( > label("Parola 3", z3); > ); > > \stopuseMPgraphic > \starttext > \dorecurse{3}{ % Frame > \startMPpage[pagestate=start] > \includeMPgraphic{base} > currentime := #1 ; > % Just for learning : > draw TheFrame withpen pencircle scaled .1in withcolor magenta ; > draw textext("T="&decimal(currentime)) scaled 2 shifted(0,2in) > withcolor magenta ; > for k=1 upto currentime: addto currentpicture also p[k]; endfor > setbounds currentpicture to TheFrame ; > > desiredformat := 1080;% In pixels (will be converted by default at 72dpi) > currentpicture := currentpicture xysized (desiredformat ,desiredformat ); > \stopMPpage > } > > \stoptext > /Mikael > On Sat, Dec 2, 2023 at 6:14 PM Emanuel Han via ntg-context > wrote: > > > > Hi Mikael, > > > > here's a very simple mwe for the label(textext()) issue. On page 1, the > > text "Word 1" should be drawn in position z1. On page 2, the same text in > > the same position should be visible, and the text "Mot 2" in position p2 > > should be added. And so on. > > > > \startMPinclusions > > > > picture p[]; > > path TheFrame ; > > TheFrame := fullsquare scaled 5in ; > > > > z1 = (60,40); > > z2 = (40,90); > > z3 = (10,70); > > > > p1:=image( > > label(textext("Word 1"), z1); > > ); > > > > p2:=image( > > label(textext("Mot 2"), z2); > > ); > > > > p3:=image( > > label(textext("Parola 3"), z3); > > ); > > > > \stopMPinclusions > > > > \starttext > > > > \dorecurse{3}{ % Frame > > \startMPpage[pagestate=start] > > currentime := #1 ; > > % Just for learning : > > draw TheFrame withpen pencircle scaled .1in withcolor magenta ; > > draw textext("T="&decimal(currentime)) scaled 2 shifted(0,2in) withcolor > > magenta ; > > for k=1 upto currentime: draw p[k]; endfor > > setbounds currentpicture to TheFrame ; > > > > desiredformat := 1080;% In pixels (will be converted by default at 72dpi) > > currentpicture := currentpicture xysized (desiredformat ,desiredformat ); > > > > \stopMPpage > > } > > > > \stoptext > > > > On Dez. 2 2023, at 5:22 pm, Mikael Sundqvist wrote: > > > > Hi Emanuel, > > > > I am not sure I understand your question, and since you use fonts that > > i do not have, I cannot test your example as is. But, maybe, if you > > want to redraw a picture, you can do > > > > addto currentpicture also p1; > > > > where you want it. > > > > /Mikael > > > > PS For the text thing, I did not get it. Could one have a _very > > simple_ example showing only that problem and no other problem? > > > > On Sat, Dec 2, 2023 at 12:58 PM fv leung wrote: > > > > > > You didn't specify the color of path A in p2 and p4. So it's drawn in > > > black. > > > The other issue, I can't help. > > > > > > Emanuel Han via ntg-context 於 2023年12月2日 週六 下午7:23寫道: > > >> > > >> So is there a way to circumvent these issues? Or an explanation for this > > >> behavior, so that I can try to find a solution by myself? > > >> > > >> Thanks > > >> Emanuel > > >> > > >> On Nov. 29 2023, at 12:25 pm, Emanuel Han via ntg-context > > >> wrote: > > >> > > >> Dear Aditya and Fabrice, > > >> thanks for your responses. > > >> > > >> I included some of Fabrice's code into mine for testing purpose, and > > >> indeed the multipage works now. > > >> What is bizarre is that issues appear now that didn't appear before: > > >> > > >> Path A is drawn with color red on page 1, and in color black on all > > >> following pages, while it should stay red. > > >> textext(, ) is overwriting with > > >> "T="&decimal(currenti
[NTG-context] Re: multipage metapost output from ConTeXt
Hi, I don't know if \startMPinclusions \stopMPinclusions shall work with \startMPpage and \stopMPpage. In this case, one can use a separate graphics: \startuseMPgraphic{base} picture p[]; path TheFrame ; TheFrame := fullsquare scaled 5in ; z1 = (60,40); z2 = (40,90); z3 = (10,70); p1:=image( label("Word 1", z1); ); p2:=image( label("Mot 2", z2); ); p3:=image( label("Parola 3", z3); ); \stopuseMPgraphic \starttext \dorecurse{3}{ % Frame \startMPpage[pagestate=start] \includeMPgraphic{base} currentime := #1 ; % Just for learning : draw TheFrame withpen pencircle scaled .1in withcolor magenta ; draw textext("T="&decimal(currentime)) scaled 2 shifted(0,2in) withcolor magenta ; for k=1 upto currentime: addto currentpicture also p[k]; endfor setbounds currentpicture to TheFrame ; desiredformat := 1080;% In pixels (will be converted by default at 72dpi) currentpicture := currentpicture xysized (desiredformat ,desiredformat ); \stopMPpage } \stoptext /Mikael On Sat, Dec 2, 2023 at 6:14 PM Emanuel Han via ntg-context wrote: > > Hi Mikael, > > here's a very simple mwe for the label(textext()) issue. On page 1, the text > "Word 1" should be drawn in position z1. On page 2, the same text in the same > position should be visible, and the text "Mot 2" in position p2 should be > added. And so on. > > \startMPinclusions > > picture p[]; > path TheFrame ; > TheFrame := fullsquare scaled 5in ; > > z1 = (60,40); > z2 = (40,90); > z3 = (10,70); > > p1:=image( > label(textext("Word 1"), z1); > ); > > p2:=image( > label(textext("Mot 2"), z2); > ); > > p3:=image( > label(textext("Parola 3"), z3); > ); > > \stopMPinclusions > > \starttext > > \dorecurse{3}{ % Frame > \startMPpage[pagestate=start] > currentime := #1 ; > % Just for learning : > draw TheFrame withpen pencircle scaled .1in withcolor magenta ; > draw textext("T="&decimal(currentime)) scaled 2 shifted(0,2in) withcolor > magenta ; > for k=1 upto currentime: draw p[k]; endfor > setbounds currentpicture to TheFrame ; > > desiredformat := 1080;% In pixels (will be converted by default at 72dpi) > currentpicture := currentpicture xysized (desiredformat ,desiredformat ); > > \stopMPpage > } > > \stoptext > > On Dez. 2 2023, at 5:22 pm, Mikael Sundqvist wrote: > > Hi Emanuel, > > I am not sure I understand your question, and since you use fonts that > i do not have, I cannot test your example as is. But, maybe, if you > want to redraw a picture, you can do > > addto currentpicture also p1; > > where you want it. > > /Mikael > > PS For the text thing, I did not get it. Could one have a _very > simple_ example showing only that problem and no other problem? > > On Sat, Dec 2, 2023 at 12:58 PM fv leung wrote: > > > > You didn't specify the color of path A in p2 and p4. So it's drawn in black. > > The other issue, I can't help. > > > > Emanuel Han via ntg-context 於 2023年12月2日 週六 下午7:23寫道: > >> > >> So is there a way to circumvent these issues? Or an explanation for this > >> behavior, so that I can try to find a solution by myself? > >> > >> Thanks > >> Emanuel > >> > >> On Nov. 29 2023, at 12:25 pm, Emanuel Han via ntg-context > >> wrote: > >> > >> Dear Aditya and Fabrice, > >> thanks for your responses. > >> > >> I included some of Fabrice's code into mine for testing purpose, and > >> indeed the multipage works now. > >> What is bizarre is that issues appear now that didn't appear before: > >> > >> Path A is drawn with color red on page 1, and in color black on all > >> following pages, while it should stay red. > >> textext(, ) is overwriting with > >> "T="&decimal(currentime) which has been used previously in textext() > >> before the for k=1 endfor loop. This overwriting happens only for the > >> first textext() which occurs inside the for k=1 endfor loop. All other > >> textext() inside the for k=1 endfor loop are not drawn at all. If the line > >> « draw textext("T="&decimal(currentime)) scaled 2 shifted(0,2in) withcolor > >> magenta ; » is commented out, the first textext() inside the for k=1 > >> endfor loop is not drawn neither. It must be an issue with textext(), > >> because when I replace textext() by lmt_outline[], the text is drawn. > >> > >> Adjusted mwe: > >> > >> \enableregime[utf] % enable unicode
[NTG-context] Re: multipage metapost output from ConTeXt
Hi Mikael, here's a very simple mwe for the label(textext()) issue. On page 1, the text "Word 1" should be drawn in position z1. On page 2, the same text in the same position should be visible, and the text "Mot 2" in position p2 should be added. And so on. \startMPinclusions picture p[]; path TheFrame ; TheFrame := fullsquare scaled 5in ; z1 = (60,40); z2 = (40,90); z3 = (10,70); p1:=image( label(textext("Word 1"), z1); ); p2:=image( label(textext("Mot 2"), z2); ); p3:=image( label(textext("Parola 3"), z3); ); \stopMPinclusions \starttext \dorecurse{3}{ % Frame \startMPpage[pagestate=start] currentime := #1 ; % Just for learning : draw TheFrame withpen pencircle scaled .1in withcolor magenta ; draw textext("T="&decimal(currentime)) scaled 2 shifted(0,2in) withcolor magenta ; for k=1 upto currentime: draw p[k]; endfor setbounds currentpicture to TheFrame ; desiredformat := 1080;% In pixels (will be converted by default at 72dpi) currentpicture := currentpicture xysized (desiredformat ,desiredformat ); \stopMPpage } \stoptext On Dez. 2 2023, at 5:22 pm, Mikael Sundqvist wrote: > Hi Emanuel, > > I am not sure I understand your question, and since you use fonts that > i do not have, I cannot test your example as is. But, maybe, if you > want to redraw a picture, you can do > > addto currentpicture also p1; > where you want it. > /Mikael > PS For the text thing, I did not get it. Could one have a _very > simple_ example showing only that problem and no other problem? > > On Sat, Dec 2, 2023 at 12:58 PM fv leung wrote: > > > > You didn't specify the color of path A in p2 and p4. So it's drawn in black. > > The other issue, I can't help. > > > > Emanuel Han via ntg-context 於 2023年12月2日 週六 下午7:23寫道: > >> > >> So is there a way to circumvent these issues? Or an explanation for this > >> behavior, so that I can try to find a solution by myself? > >> > >> Thanks > >> Emanuel > >> > >> On Nov. 29 2023, at 12:25 pm, Emanuel Han via ntg-context > >> wrote: > >> > >> Dear Aditya and Fabrice, > >> thanks for your responses. > >> > >> I included some of Fabrice's code into mine for testing purpose, and > >> indeed the multipage works now. > >> What is bizarre is that issues appear now that didn't appear before: > >> > >> Path A is drawn with color red on page 1, and in color black on all > >> following pages, while it should stay red. > >> textext(, ) is overwriting with > >> "T="&decimal(currentime) which has been used previously in textext() > >> before the for k=1 endfor loop. This overwriting happens only for the > >> first textext() which occurs inside the for k=1 endfor loop. All other > >> textext() inside the for k=1 endfor loop are not drawn at all. If the line > >> « draw textext("T="&decimal(currentime)) scaled 2 shifted(0,2in) withcolor > >> magenta ; » is commented out, the first textext() inside the for k=1 > >> endfor loop is not drawn neither. It must be an issue with textext(), > >> because when I replace textext() by lmt_outline[], the text is drawn. > >> > >> Adjusted mwe: > >> > >> \enableregime[utf] % enable unicoded input > >> > >> \definefontfamily [RomanFont] [rm] [calluna] > >> > >> \definefontfamily [KoreanFont] [rm] [applemyungjo] > >> > >> \definefontfamily [JapaneseFont] [rm] [hannotatesc] > >> > >> \definefontfeature > >> [fea] > >> [mode=node,language=dflt,script=arab, > >> init=yes, > >> medi=yes, > >> fina=yes, > >> isol=yes, > >> calt=yes, > >> rlig=yes, > >> tlig=yes, > >> trep=yes, > >> curs=yes, > >> kern=yes, > >> mark=yes > >> ] > >> > >> \starttypescript [serif] [notonaskharabic] > >> \definefontsynonym [notonaskharabic-Light] [name:notonaskharabic] > >> [features=fea] > >> \definefontsynonym [notonaskharabic-Bold] [name:notonaskharabic] > >> [features=fea] > >> \definefontsynonym [notonaskharabic-Italic] [name:notonaskharabic] > >> [features=fea] > >> \definefontsynonym [notonaskharabic-Bold-Italic] [name:notonaskharabic] > >> [features=fea] > >> \stoptypescript > >> > >> \starttypescript [serif] [notonaskharabic] > >> \usetypescript[serif][fallback] > >> \definefontsynonym [Serif] [notonaskharabic-Light] [features=fea] > >> \definefon
[NTG-context] Re: [ how to force hyphenation all words ]
On Thu, 16 Nov 2023 21:40:08 +0100 vm via ntg-context wrote: > Is there a command in context to force every word in a text to > hyphenate? e.g to typeset a text with "ge-dach-ten-streep-jes" Like this? \starttext \hyphenatedword{\samplefile{knuth}} \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] [ how to force hyphenation all words ]
Is there a command in context to force every word in a text to hyphenate? e.g to typeset a text with "ge-dach-ten-streep-jes" Thanks .Floris ___ 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
Henning and Hans, thanks for the replies. I have two follow-up questions below, as well as some other comments which other synctex users might find useful. On Sun, Nov 12, 2023 at 10:26 (+0100), 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 Thanks for that pointer. Q1: Should that be in the wiki (https://wiki.contextgarden.net/SyncTeX) somewhere? When I try that out, for example with mtxrun --script synctex --edit --name=a.tex --line=222 a.tex I am rewarded with sandbox | variable 'linenumber' has no checker (I tried various variations on that line I won't bore you with, but I keep getting that error message.) I also tried mtxrun --script synctex --goto --page=4 --x=100 --y=100 a.synctex and that silently returns without apparently doing anything. (While I don't have a 'scite' editor, I created a program called 'scite' that pops a message up on the screen if it is called.) Similar to --edit, mtxrun --script synctex --goto --page=19 --x=400 --y=180 --tolerance=99 --editor=scite a.synctex complains sandbox | variable 'tolerance' has no checker Although I don't know lua, the code is easy enough to read, but a short dive in to mtx-synctex.lua did not enlighten me. Q2: any enlightening comments on why I am getting these complaints. In any case, --find and --report (appear to) give meaningful results, so I can work with those. > 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.) So much code to write, so little time ...:-) My immediate concern is forward search (i.e., editor tells viewer which page to display) and that one should be easy for me to create a wrapper. (I use emacs + auctex, which calls the synctex program, so writing my own synctex wrapper looks easy. Hopefully I won't regret using the word "easy" later.) > AFAIK TeXshop (MacOS) is the only TeX editor that supports ConTeXt’s > workflow. I've been thinking of patching some of evince's more annoying features, if I do, maybe I should look into making it work with context. > 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. Indeed! On Sun, Nov 12, 2023 at 12:00 (+0100), Hans Hagen wrote: > On 11/12/2023 10:26 AM, Henning Hraban Ramm wrote: >> Am 12.11.23 um 00:59 schrieb Jim: >>> Hi, >>> >> 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 t
[NTG-context] Re: checkbox in fields show the word yes
Hi, three years later I would like to hint to this thread again and ask if there is hope that checkboxes will work better in Acrobat any time soon. Am Fri, Dec 11, 2020 at 06:28:36PM +0100 schrieb Hans Hagen: > On 12/11/2020 6:13 PM, Andres Conrado Montoya wrote: > > Firefox doesn't show the "yes", nor Acrobat X, but SumatraPDF does. I > > modified your definition as: > > > > \definefield[test][check][cbox][][] > > > > And now the "yes" doesn't appear. However, I don't know how this affects > > the functionality of the form. > these symbols (esp how deafults are handles) has alwaye been a bit of a mess > in acrobat (read: different per version) and relates to appearance streams > and such (when a form is made in acrobat these streams get added, it could > even be some dingbat kicking in or being vectorized or ... seen all kind of > variants) ... officially a rendering should listen to some keys that relate > to it but this is not always the case > > (part of the problem is, i think, that esp for check fields a bugs or > behaviour has become a feature which makes it kin dof inconsisten twith the > rest of the widgets .. it's even worse when one uses parent / child across > pages ... it hasn;t helped that hardly any viewer supported it which in turn > means no feedback) > > (in lmtx iu could probably generate appearance streams but i'll only do that > when i have an application for these widgets so that i can test it) > > Hans > > - > Hans Hagen | PRAGMA ADE > Ridderstraat 27 | 8061 GH Hasselt | The Netherlands >tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl > - > ___ > If your question is of interest to others as well, please add an entry to the > Wiki! > > maillist : ntg-context@ntg.nl / 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 > ___ -- Autoren-Homepage: . http://literatur.hasecke.com Satiren & Essays: . http://www.sudelbuch.de Privater Blog: http://www.hasecke.eu Netzliteratur-Projekt: http://www.generationenprojekt.de signature.asc Description: PGP signature ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : {listname} / https://mailman.ntg.nl/mailman3/lists/{list_id} 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: Toggling the symbol for the zero-width joiner and related Unicode control characters
-- Original Message -- From "Hans Hagen via ntg-context" mailto:ntg-context@ntg.nl>> To "ntg-context@ntg.nl<mailto:ntg-context@ntg.nl>" mailto:ntg-context@ntg.nl>> Cc "Hans Hagen" mailto:j.ha...@freedom.nl>> Date 9/22/2023 10:44:38 AM Subject [NTG-context] Re: Toggling the symbol for the zero-width joiner and related Unicode control characters (It seems he never considered making it an opentype feature in the font itself, but since his focus is/was XeTeX/HB (HB is rather rigid and dictatorial) I guess that's not surprising.) I admit that I don't follow what happens with xetex (they changed the rendere at some point indeed) not HB (I only notice that it gets updates frequently in the tex live repository which makes me wonder how one retains compatility unless one freezes). I actually kept the lib binding code that can use it around for your font testing (we wanted to see what uniscribe does), not sure if it still works. I remember the experimental uniscribe binding, don't recall that it was ever officially released. (Did Kai Bormann ever work with it?). I hope that it still works or can be resurrected when the time comes for testing -) Anyway, we're entering the bug cq. side effect becomes feature area here; just like yesterdays perfect bidi algorithm is todays less pefect one replaced by ... But therein lies the problem: ConTeXt shows the rendering by default, and we need to turn it off. Since most non-Latin typography targets Uniscribe applications which allows for toggling, the font developers (commercial or free) don't have to concern themselves with this issue. if context shows it then it is not a feature but hard coded shapes which is weird; how does one know what to 'remove' or not? And in what stage? If they are zero width it is simple to ignore them in the backend, if they have dimensions (w/h/d) then they contributed and wiping is tricky The metrics should be dimensionless and most Arabic fonts do that, but Lotus Linotype gives them width (one wonders why). Perhaps the Lotus designers thought that giving them width makes them easier to edit, which is indeed the case. And perhaps they were satisfied that Word/InDesign would be able, as needed, to toggle the metrics on and off as well as the shape. That WYSIWYG-DTP curse again.. \setcharacterstripping[1] gives the right results with Lotus (at least so far) -- see attached. Was pleasantly surprised that the spurious width was also suppressed. \setcharacterstripping[0] toggles back -- another pleasant result -) Since Word rules the world, most font designers target it. Since Word provides for toggling the symbols -- needed for editing purposes -- there was no need for Arabic-script font designers to worry about the symbols showing up where they are not wanted. (I suppose that InDesign behaves the same way.) I don't know ... irr these dtp programs are more like "if you want this feature applied select a range of characters and apply it" That's what was meant when I spoke of the continued effects of the WYSIWYG curse: It saved font designers from having to think much about this issue. In some way it's also flaws in the open type approach. Basically that happens when application stuff becomes a standard and one forgets that it was (is) application driven. (And you haven't seen variable fonts and color fonts yet ... no pretty standards either.) I'm in the process of switching from Multiple Masters sources to variable, so will surely encounter it soon. Unfortunately there is indeed a frustrating gray area in this arena between knowing where the standards end and where the diktats of corporations (or even free-software consortiums like HB) begin, as we've discussed in the past. With variable fonts, one has to add some degree of arbitrariness.. Not really -) This brings us to the point of consistency: For Arabic-script fonts, hard symbolic rendering of the Unicode control characters is the rule, not the exception. So not "an inconsistent mess" -- at least not as far as Arabic-script typography is concerned. Funny rules ... but I'm not going top enable 'wipe' by default: after all, one gets what one deserves, nto what one likes (which can differ per day). But you can enable the wiping. We can of course ignore in the backend when zero width but then how to explain that they contributed to the ht/dp (unless we wipe these dimensions) ... all slow-downers So far \setcharacterstripping[1] is giving the right results. If the relevant trackers are available, could add them to the attached test. But presumably you know how and why it works even for a non-dimensionless glyph. so you want to see soem zwj sumbol in a rendered text? Only in verbatim/\type'd text where it is appropriate, even necessary. Thanks to Word/WYSIWYG, the rule is de facto, but
[NTG-context] Re: Toggling the symbol for the zero-width joiner and related Unicode control characters
On 9/22/2023 3:51 PM, Hamid,Idris wrote: -- Original Message -- From "Hans Hagen" mailto:j.ha...@xs4all.nl>> To "ntg-context@ntg.nl<mailto:ntg-context@ntg.nl>" mailto:ntg-context@ntg.nl>> Date 9/22/2023 7:15:25 AM Subject [NTG-context] Re: Toggling the symbol for the zero-width joiner and related Unicode control characters ** Caution: EXTERNAL Sender ** On 9/22/2023 2:39 PM, Hamid,Idris wrote: b. we want all Unicode control symbols to be suppressed in final pdf output (for, e.g., printing). they basically are unless some font features keeps them around which is out of our control irr it was you who wanted them to be wiped decades ago as some fonts visualized them by default Yes, that's exactly the point: Somewhere along the course of history, it became standard for Arabic-script fonts (and other cursive-script fonts as well) to include symbols for the control characters. In typo-rep there is also %D \starttyping %D \definefontfeature[default][default][mode=node,formatters=strip] %D \stoptyping You included some notes about Khaled, so I guess he faced the same issue. His Amiri font displays the symbols by default, as do other Arabic fonts. (It seems he never considered making it an opentype feature in the font itself, but since his focus is/was XeTeX/HB (HB is rather rigid and dictatorial) I guess that's not surprising.) I admit that I don't follow what happens with xetex (they changed the rendere at some point indeed) not HB (I only notice that it gets updates frequently in the tex live repository which makes me wonder how one retains compatility unless one freezes). I actually kept the lib binding code that can use it around for your font testing (we wanted to see what uniscribe does), not sure if it still works. Anyway, we're entering the bug cq. side effect becomes feature area here; just like yesterdays perfect bidi algorithm is todays less pefect one replaced by ... But therein lies the problem: ConTeXt shows the rendering by default, and we need to turn it off. Since most non-Latin typography targets Uniscribe applications which allows for toggling, the font developers (commercial or free) don't have to concern themselves with this issue. if context shows it then it is not a feature but hard coded shapes which is weird; how does one know what to 'remove' or not? And in what stage? If they are zero width it is simple to ignore them in the backend, if they have dimensions (w/h/d) then they contributed and wiping is tricky Since Word rules the world, most font designers target it. Since Word provides for toggling the symbols -- needed for editing purposes -- there was no need for Arabic-script font designers to worry about the symbols showing up where they are not wanted. (I suppose that InDesign behaves the same way.) I don't know ... irr these dtp programs are more like "if you want this feature applied select a range of characters and apply it" That's what was meant when I spoke of the continued effects of the WYSIWYG curse: It saved font designers from having to think much about this issue. In some way it's also flaws in the open type approach. Basically that happens when application stuff becomes a standard and one forgets that it was (is) application driven. (And you haven't seen variable fonts and color fonts yet ... no pretty standards either.) Not really -) This brings us to the point of consistency: For Arabic-script fonts, hard symbolic rendering of the Unicode control characters is the rule, not the exception. So not "an inconsistent mess" -- at least not as far as Arabic-script typography is concerned. Funny rules ... but I'm not going top enable 'wipe' by default: after all, one gets what one deserves, nto what one likes (which can differ per day). But you can enable the wiping. We can of course ignore in the backend when zero width but then how to explain that they contributed to the ht/dp (unless we wipe these dimensions) ... all slow-downers so you want to see soem zwj sumbol in a rendered text? Only in verbatim/\type'd text where it is appropriate, even necessary. Thanks to Word/WYSIWYG, the rule is de facto, but it is not de jure -) Ideally, Scintilla (Scite, Notepad++, etc.) should do the same, or provide a toggle, as MS Notepad does. (Tangent: In terms of Unicode functionality, MS Notepad is still unrivalled, even in 2023!) We agree that for final printed output it is not appropriate (except perhaps in a paper that discusses Unicode, fonts, etc., in which case it can be rendered using the figures or symbols mechanism -- or toggled as needed.) so what is it now: - for verbatim you can use almfixed and they show up (when they have a glyph) - for other fonts if they ha
[NTG-context] Re: Toggling the symbol for the zero-width joiner and related Unicode control characters
-- Original Message -- From "Hans Hagen" mailto:j.ha...@xs4all.nl>> To "ntg-context@ntg.nl<mailto:ntg-context@ntg.nl>" mailto:ntg-context@ntg.nl>> Date 9/22/2023 7:15:25 AM Subject [NTG-context] Re: Toggling the symbol for the zero-width joiner and related Unicode control characters ** Caution: EXTERNAL Sender ** On 9/22/2023 2:39 PM, Hamid,Idris wrote: b. we want all Unicode control symbols to be suppressed in final pdf output (for, e.g., printing). they basically are unless some font features keeps them around which is out of our control irr it was you who wanted them to be wiped decades ago as some fonts visualized them by default Yes, that's exactly the point: Somewhere along the course of history, it became standard for Arabic-script fonts (and other cursive-script fonts as well) to include symbols for the control characters. In typo-rep there is also %D \starttyping %D \definefontfeature[default][default][mode=node,formatters=strip] %D \stoptyping You included some notes about Khaled, so I guess he faced the same issue. His Amiri font displays the symbols by default, as do other Arabic fonts. (It seems he never considered making it an opentype feature in the font itself, but since his focus is/was XeTeX/HB (HB is rather rigid and dictatorial) I guess that's not surprising.) But therein lies the problem: ConTeXt shows the rendering by default, and we need to turn it off. Since most non-Latin typography targets Uniscribe applications which allows for toggling, the font developers (commercial or free) don't have to concern themselves with this issue. ? Since Word rules the world, most font designers target it. Since Word provides for toggling the symbols -- needed for editing purposes -- there was no need for Arabic-script font designers to worry about the symbols showing up where they are not wanted. (I suppose that InDesign behaves the same way.) That's what was meant when I spoke of the continued effects of the WYSIWYG curse: It saved font designers from having to think much about this issue. Not really -) This brings us to the point of consistency: For Arabic-script fonts, hard symbolic rendering of the Unicode control characters is the rule, not the exception. So not "an inconsistent mess" -- at least not as far as Arabic-script typography is concerned. so you want to see soem zwj sumbol in a rendered text? Only in verbatim/\type'd text where it is appropriate, even necessary. Thanks to Word/WYSIWYG, the rule is de facto, but it is not de jure -) Ideally, Scintilla (Scite, Notepad++, etc.) should do the same, or provide a toggle, as MS Notepad does. (Tangent: In terms of Unicode functionality, MS Notepad is still unrivalled, even in 2023!) We agree that for final printed output it is not appropriate (except perhaps in a paper that discusses Unicode, fonts, etc., in which case it can be rendered using the figures or symbols mechanism -- or toggled as needed.) I hope the above made sense. Best wishes -- Idris Samawi Hamid, Professor Department of Philosophy Colorado State University Fort Collins, CO 80523 ___ 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: Toggling the symbol for the zero-width joiner and related Unicode control characters
-- Original Message -- From "Hans Hagen via ntg-context" mailto:ntg-context@ntg.nl>> To "ntg-context@ntg.nl<mailto:ntg-context@ntg.nl>" mailto:ntg-context@ntg.nl>> Cc "Hans Hagen" mailto:j.ha...@freedom.nl>> Date 9/22/2023 3:53:03 AM Subject [NTG-context] Re: Toggling the symbol for the zero-width joiner and related Unicode control characters 1. Can this approach be generalized to get what we want, viz., a way to toggle the symbols? given the inconsistency in what is or is not in a font the only way out is to have our own visualization (consistent across fonts) and even then it would add some mess because we're talking of a mix of characters that can have gone (as part of rendering) or are not characters at all but spacing so, in that case only 'verbatim' is a candidate for visualization, not so much typeset text Hm, ok. Since almfixed is based on Knuth's mono, perhaps its visuals of the control characters can be extracted and used as fallback symbols. Yes: For typeset text/printing visualization is generally unnecessary (the point of this thread). 2. \enabletrackers[typesetters.nbsp] gives a colored box, which is at least something.. But how can we get the NBSP symbol that's alerady in the font? it's gone by that time ... the line break mmechanism uses glue, not characters Ok 3. Ideally: a. we want all Unicode control symbols to show up in verbatim or in \typebuffer (as in a text editor); only there (with some non interfering rendering i guess) and even then it's probably an additonal pass over the node list Ok, that would be good. b. we want all Unicode control symbols to be suppressed in final pdf output (for, e.g., printing). they basically are unless some font features keeps them around which is out of our control If the symbols are in the font, then they are not suppressed. See below. But some fonts meant for printing have symbols for Unicode control chars -- that poses a challenge. so an inconsistent mess not worth wasting time on (as this is hobbyism only fun can be a motivational factir) But there is a certain consistency -- see below. And some fonts meant for verbatim/editing do not have symbols for the control chars -- that also poses a challenge. AlmFixed, of course, has them. Most minimally decent Arabic fonts have symbols for the Unicode control chars as default, including Scheherazade, Amiri, Uthmanic, and Noto Naskh Arabic -- all free fonts. Industry workhorses like Linotype Lotus (Arabic) also have them. i'm not interested in those .. can't afford them for playing around purposes .. we only look into commercial fonts if we get a dozen unresticted copies for context developers Except for Linotype Lotus, each of the Arabic-script fonts mentioned above is free, not commercial -) (There is also a free version of Lotus -- it also has the symbolic rendering of the contol chars.) Uniscribe applications like Notepad/Word allow for toggling in a WYSIWYG context -- can't speak for HarfBuzz -- so there is no harm in having explicit symbols in the font. sure, as long as there is no rendering ... they show the input But therein lies the problem: ConTeXt shows the rendering by default, and we need to turn it off. Since most non-Latin typography targets Uniscribe applications which allows for toggling, the font developers (commercial or free) don't have to concern themselves with this issue. Yet another curse of the WYSIWYG paradigm, which mixes form and content -) The upshot is that, for non-Latin scripts, some toggling capability in ConTeXt is important to have -- even inescapable for Arabic-script piblishing. a bit subjectiev arguing -) Not really -) This brings us to the point of consistency: For Arabic-script fonts, hard symbolic rendering of the Unicode control characters is the rule, not the exception. So not "an inconsistent mess" -- at least not as far as Arabic-script typography is concerned. (Yes, for the upcoming Husayni I can add a font feature that does the trick, but that will be an exception to the rule.) Perhaps others who use Arabic-script or Indic, etc., can chime in.. Am hopeful that we can figure something out! sore, but not with 'instant priority' (unless it is some project) My immediate project (no Husayni) is a book that features English translation of an Arabic text (hence the interest in the recent streams thread). Using some Unicode control characters will be unavoidable to get the rendering effects correct, but the symbols will need to be suppressed. Am thinking/hoping that a ConTeXt-specific font feature can do the trick. Since there appears to be consistency across Arabic fonts in this matter it should not be messy at all, simply a fallback that sends the symbols to some no-man's land. (A thought: Some of the code you kindly provided for transliteration might be reu
[NTG-context] Re: Toggling the symbol for the zero-width joiner and related Unicode control characters
On 9/22/2023 6:16 AM, Hamid,Idris wrote: -- Original Message -- From "Hans Hagen" mailto:j.ha...@xs4all.nl>> To "Hamid,Idris" mailto:idris.ha...@colostate.edu>>; "mailing list for ConTeXt users" mailto:ntg-context@ntg.nl>> Date 9/21/2023 3:29:22 PM Subject Re: [NTG-context] Re: Toggling the symbol for the zero-width joiner and related Unicode control characters Many thanks, Hans. The method appears to work only for nbsp, not zwj etc. Here is the updated MWE: === \startTEXpage[offset=1em] \disabletrackers[typesetters.directions] \disabletrackers[typesetters.zwj] \disabletrackers[typesetters.zwnj] \disabletrackers[typesetters.nbsp] \definedfont[almfixed at 14pt] ZWJ: ZWNJ: NBSP: \stopTEXpage === See attached, please advise. joiners are part of replacement etc and can come and go ... they are characters (we could visualize them but one never knows for sure if one sees them) nbsp are spaces and become glue that we can trace reliable in the node list Many thanks. Ok, here is another MWE featuring a workaround using fallbacks: == \definefontfallback[nosymbols] [file:lmmono10-regular] [200C,200D] [force=yes] \starttypescript [serif] [alm] [name] \definefontsynonym [Serif] [ArabicLatinSerif] \stoptypescript \starttypescript [mono] [alm] [name] \definefontsynonym [Mono] [ArabicLatinMono] \stoptypescript \starttypescript [serif] [alm] \definefontsynonym [ArabicLatinSerif] [file:almfixed] % [fallbacks=nosymbols] \stoptypescript \starttypescript [mono] [alm] \definefontsynonym [ArabicLatinMono] [file:almfixed] [fallbacks=nosymbols] \stoptypescript \starttypescript [almfixed-nosymbols] \definetypeface [\typescriptone] [rm] [serif] [alm] [default] \definetypeface [\typescriptone] [tt] [mono] [alm] [default] \stoptypescript \usetypescript[almfixed-nosymbols] \setupbodyfont[almfixed-nosymbols,12pt] \startTEXpage[offset=1em] \rm ZWJ: ZWNJ: NBSP: \tt ZWJ: ZWNJ: NBSP: \stopTEXpage == Under \rm we get the symbols, and under \tt they are suppressed. Of course it doesn't matter what fallback font one uses, as long as it has no control-character symbols. 1. Can this approach be generalized to get what we want, viz., a way to toggle the symbols? given the inconsistency in what is or is not in a font the only way out is to have our own visualization (consistent across fonts) and even then it would add some mess because we're talking of a mix of characters that can have gone (as part of rendering) or are not characters at all but spacing so, in that case only 'verbatim' is a candidate for visualization, not so much typeset text 2. \enabletrackers[typesetters.nbsp] gives a colored box, which is at least something.. But how can we get the NBSP symbol that's alerady in the font? it's gone by that time ... the line break mmechanism uses glue, not characters 3. Ideally: a. we want all Unicode control symbols to show up in verbatim or in \typebuffer (as in a text editor); only there (with some non interfering rendering i guess) and even then it's probably an additonal pass over the node list b. we want all Unicode control symbols to be suppressed in final pdf output (for, e.g., printing). they basically are unless some font features keeps them around which is out of our control But some fonts meant for printing have symbols for Unicode control chars -- that poses a challenge. so an inconsistent mess not worth wasting time on (as this is hobbyism only fun can be a motivational factir) And some fonts meant for verbatim/editing do not have symbols for the control chars -- that also poses a challenge. AlmFixed, of course, has them. Most minimally decent Arabic fonts have symbols for the Unicode control chars as default, including Scheherazade, Amiri, Uthmanic, and Noto Naskh Arabic -- all free fonts. Industry workhorses like Linotype Lotus (Arabic) also have them. i'm not interested in those .. can't afford them for playing around purposes .. we only look into commercial fonts if we get a dozen unresticted copies for context developers Uniscribe applications like Notepad/Word allow for toggling in a WYSIWYG context -- can't speak for HarfBuzz -- so there is no harm in having explicit symbols in the font. sure, as long as there is no rendering ... they show the input The upshot is that, for non-Latin scripts, some toggling capability in ConTeXt is important to have -- even inescapable for Arabic-script piblishing. a bit subjectiev arguing -) Perhaps others who use Arabic-script or Indic, etc., can chime in.. Am hopeful that we can figure something out! sore, but not with 'instant priority' (unless it is some project) Hans - Hans Hagen | PRAGMA ADE Ridderstr
[NTG-context] Re: Toggling the symbol for the zero-width joiner and related Unicode control characters
-- Original Message -- From "Hans Hagen" mailto:j.ha...@xs4all.nl>> To "Hamid,Idris" mailto:idris.ha...@colostate.edu>>; "mailing list for ConTeXt users" mailto:ntg-context@ntg.nl>> Date 9/21/2023 3:29:22 PM Subject Re: [NTG-context] Re: Toggling the symbol for the zero-width joiner and related Unicode control characters Many thanks, Hans. The method appears to work only for nbsp, not zwj etc. Here is the updated MWE: === \startTEXpage[offset=1em] \disabletrackers[typesetters.directions] \disabletrackers[typesetters.zwj] \disabletrackers[typesetters.zwnj] \disabletrackers[typesetters.nbsp] \definedfont[almfixed at 14pt] ZWJ: ZWNJ: NBSP: \stopTEXpage === See attached, please advise. joiners are part of replacement etc and can come and go ... they are characters (we could visualize them but one never knows for sure if one sees them) nbsp are spaces and become glue that we can trace reliable in the node list Many thanks. Ok, here is another MWE featuring a workaround using fallbacks: == \definefontfallback[nosymbols] [file:lmmono10-regular] [200C,200D] [force=yes] \starttypescript [serif] [alm] [name] \definefontsynonym [Serif] [ArabicLatinSerif] \stoptypescript \starttypescript [mono] [alm] [name] \definefontsynonym [Mono] [ArabicLatinMono] \stoptypescript \starttypescript [serif] [alm] \definefontsynonym [ArabicLatinSerif] [file:almfixed] % [fallbacks=nosymbols] \stoptypescript \starttypescript [mono] [alm] \definefontsynonym [ArabicLatinMono] [file:almfixed] [fallbacks=nosymbols] \stoptypescript \starttypescript [almfixed-nosymbols] \definetypeface [\typescriptone] [rm] [serif] [alm] [default] \definetypeface [\typescriptone] [tt] [mono] [alm] [default] \stoptypescript \usetypescript[almfixed-nosymbols] \setupbodyfont[almfixed-nosymbols,12pt] \startTEXpage[offset=1em] \rm ZWJ: ZWNJ: NBSP: \tt ZWJ: ZWNJ: NBSP: \stopTEXpage == Under \rm we get the symbols, and under \tt they are suppressed. Of course it doesn't matter what fallback font one uses, as long as it has no control-character symbols. 1. Can this approach be generalized to get what we want, viz., a way to toggle the symbols? 2. \enabletrackers[typesetters.nbsp] gives a colored box, which is at least something.. But how can we get the NBSP symbol that's alerady in the font? 3. Ideally: a. we want all Unicode control symbols to show up in verbatim or in \typebuffer (as in a text editor); b. we want all Unicode control symbols to be suppressed in final pdf output (for, e.g., printing). But some fonts meant for printing have symbols for Unicode control chars -- that poses a challenge. And some fonts meant for verbatim/editing do not have symbols for the control chars -- that also poses a challenge. AlmFixed, of course, has them. Most minimally decent Arabic fonts have symbols for the Unicode control chars as default, including Scheherazade, Amiri, Uthmanic, and Noto Naskh Arabic -- all free fonts. Industry workhorses like Linotype Lotus (Arabic) also have them. Uniscribe applications like Notepad/Word allow for toggling in a WYSIWYG context -- can't speak for HarfBuzz -- so there is no harm in having explicit symbols in the font. The upshot is that, for non-Latin scripts, some toggling capability in ConTeXt is important to have -- even inescapable for Arabic-script piblishing. Perhaps others who use Arabic-script or Indic, etc., can chime in.. Am hopeful that we can figure something out! Best wishes Idris -- Idris Samawi Hamid, Professor Department of Philosophy Colorado State University Fort Collins, CO 80523 ___ 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: XML: flush to lua function
Hi, xml.text(t) is safer than directly accessing t.dt[1]. Note: you may need to strip some XML tags from that content. If the element is not straight-up data but has nested elements, then this will return the full xml representation instead: A short title=> ‘A short title' <A short title>=> ‘' <A short title> => '<A short title>' Best wishes, Taco > On 12 Sep 2023, at 08:56, wrote: > > Ok, I’ve found a way, see below. > But maybe someone has some nice lua (or other) tricks to share… (I’m not sure > accessing t.dt[1] is particularly safe when operating on nested structures.) > Best, > Denis > \startbuffer[test] > > > > A short title > asdf asdf asdf jklö jklö jklö > > > A longer title bla bla bla bla bla bla bla bla > > asdf asdf asdf jklö jklö jklö > > > > \stopbuffer > \startxmlsetups xml:test > \xmlsetsetup{#1}{*}{-} > \xmlsetsetup{#1}{doc|chapter|p}{xml:*} > \stopxmlsetups > \xmlregisterdocumentsetup{test}{xml:test} > \startxmlsetups xml:doc >\xmlflush{#1} > \stopxmlsetups > \setuphead[chapter][expansion=yes] % make sure the stuff gets expanded on > time > \startxmlsetups xml:chapter > \startchapter >[ > > title={\xmlfilter{#1}{/title/command(xml:chapter:title)}}, > > marking={\xmlfilter{#1}{/title/command(xml:chapter:title:marking)}}, >] >\xmlflush{#1} > \stopchapter > \stopxmlsetups > \startxmlsetups xml:p > \xmlflush{#1}\par > \stopxmlsetups > \startluacode > function xml.functions.getMarking(t) > _,n = t.dt[1]:gsub("%S+","") > if n > 10 then local words = {} > for word in t.dt[1]:gmatch("%S+") do table.insert(words, word) end > local resWords = {} > resWords = { unpack( words, 1, 7 ) } > res = table.concat(resWords, " ") .. " …" > else res = t.dt[1] > end > context(res) > end > \stopluacode > \startxmlsetups xml:chapter:title:marking > \xmlfunction{#1}{getMarking} > \stopxmlsetups > \startxmlsetups xml:chapter:title > \xmlflush{#1} > \stopxmlsetups > \setupheadertexts[chapter] > \starttext > \xmlprocessbuffer{test}{test}{} > \stoptext > Von: denis.ma...@unibe.ch > Gesendet: Montag, 11. September 2023 16:47 > An: ntg-context@ntg.nl > Betreff: [NTG-context] XML: flush to lua function > Hi, > I have the following xml setup with a lua function: > \startluacode > function markingLength(s) > _,n = s:gsub("%S+","") > if n > 3 then context("yes" .. " …") else > context("no") end > end > \stopluacode > \startxmlsetups xml:ink:ink-title:marking > %\ctxlua{markingLength(\xmlflush{#1})} % does not work > \ctxlua{markingLength{"1 2 3 4"}} > \stopxmlsetups > While the function works, I cannot use xmlflush here. How can I properly > pass the xml content to the lua function? > Best, > Denis > ___ > 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 > ___ — Taco Hoekwater E: t...@bittext.nl genderfluid (all pronouns) ___ 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: XML: flush to lua function
Ok, I've found a way, see below. But maybe someone has some nice lua (or other) tricks to share... (I'm not sure accessing t.dt[1] is particularly safe when operating on nested structures.) Best, Denis \startbuffer[test] A short title asdf asdf asdf jklö jklö jklö A longer title bla bla bla bla bla bla bla bla asdf asdf asdf jklö jklö jklö \stopbuffer \startxmlsetups xml:test \xmlsetsetup{#1}{*}{-} \xmlsetsetup{#1}{doc|chapter|p}{xml:*} \stopxmlsetups \xmlregisterdocumentsetup{test}{xml:test} \startxmlsetups xml:doc \xmlflush{#1} \stopxmlsetups \setuphead[chapter][expansion=yes] % make sure the stuff gets expanded on time \startxmlsetups xml:chapter \startchapter [ title={\xmlfilter{#1}{/title/command(xml:chapter:title)}}, marking={\xmlfilter{#1}{/title/command(xml:chapter:title:marking)}}, ] \xmlflush{#1} \stopchapter \stopxmlsetups \startxmlsetups xml:p \xmlflush{#1}\par \stopxmlsetups \startluacode function xml.functions.getMarking(t) _,n = t.dt[1]:gsub("%S+","") if n > 10 then local words = {} for word in t.dt[1]:gmatch("%S+") do table.insert(words, word) end local resWords = {} resWords = { unpack( words, 1, 7 ) } res = table.concat(resWords, " ") .. " ..." else res = t.dt[1] end context(res) end \stopluacode \startxmlsetups xml:chapter:title:marking \xmlfunction{#1}{getMarking} \stopxmlsetups \startxmlsetups xml:chapter:title \xmlflush{#1} \stopxmlsetups \setupheadertexts[chapter] \starttext \xmlprocessbuffer{test}{test}{} \stoptext Von: denis.ma...@unibe.ch Gesendet: Montag, 11. September 2023 16:47 An: ntg-context@ntg.nl Betreff: [NTG-context] XML: flush to lua function Hi, I have the following xml setup with a lua function: \startluacode function markingLength(s) _,n = s:gsub("%S+","") if n > 3 then context("yes" .. " ...") else context("no") end end \stopluacode \startxmlsetups xml:ink:ink-title:marking %\ctxlua{markingLength(\xmlflush{#1})} % does not work \ctxlua{markingLength{"1 2 3 4"}} \stopxmlsetups While the function works, I cannot use xmlflush here. How can I properly pass the xml content to the lua function? Best, Denis ___ 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: Trimming (rearranging) long section name
Lukas via ntg-context schrieb am 04.09.2023 um 13:33: Hello, just " \setuphead[section][distance=1.25em] \setuphead[section][style=\bfc] " Lukas On 2023-09-04 11:25, Henning Hraban Ramm wrote: Am 04.09.23 um 13:06 schrieb Lukas via ntg-context: IOW to force the word "stavby" not to cross the right border (see the green vertical line) but to appear on the next line? I played with "strict", "verytolerant" and similar options but they seem not to affect section titles. What’s your section setup, esp. the align settings? Please try to provide a *working* minimal example the next time, otherwise we have to fill the missing parts (\starttext ... \stoptext). \mainlanguage[cz] \setuphead [section] [distance=1.25em, style=\bfc, align={flushleft,broad,nothyphenated}] \setupbodyfont[8pt] \starttext \chapter{Dummy} \samplefile{lorem} \section{Specifické požadavky pro předpokládanou technologii stavby (přístupy, přívody el. energie, skladovací plochy, montážní a pomocné plochy, montážní a pomocné konstrukce, ...)} \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://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: Trimming (rearranging) long section name
Hello, just " \setuphead[section][distance=1.25em] \setuphead[section][style=\bfc] " Lukas On 2023-09-04 11:25, Henning Hraban Ramm wrote: Am 04.09.23 um 13:06 schrieb Lukas via ntg-context: IOW to force the word "stavby" not to cross the right border (see the green vertical line) but to appear on the next line? I played with "strict", "verytolerant" and similar options but they seem not to affect section titles. What’s your section setup, esp. the align settings? Hraban ___ 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: Trimming (rearranging) long section name
Am 04.09.23 um 13:06 schrieb Lukas via ntg-context: IOW to force the word "stavby" not to cross the right border (see the green vertical line) but to appear on the next line? I played with "strict", "verytolerant" and similar options but they seem not to affect section titles. What’s your section setup, esp. the align settings? Hraban ___ 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] Trimming (rearranging) long section name
Hello, is there a way to alter the section name to be " Specifické požadavky pro předpokládanou technologii stavby (přístupy, přívody el. energie, skladovací plochy, montážní a pomocné plochy, montážní a pomocné konstrukce, ...) " instead of " Specifické požadavky pro předpokládanou technologii stavby (přístupy, přívody el. energie, skladovací plochy, mon- tážní a pomocné plochy, montážní a pomocné konstrukce, ...) " IOW to force the word "stavby" not to cross the right border (see the green vertical line) but to appear on the next line? I played with "strict", "verytolerant" and similar options but they seem not to affect section titles. (MkIV solution preferably.) Best regards, Lukas___ 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: XML processing beginner's question
Yes, I have done that. But I don't seem to have the basic context of how the processing works in order. All I have so far is this as a starting point: \startxmlsetups xml:mysetup \xmlsetsetup{main}{document|element|mdata|tdata|name|date|num|content|shortdescription|p}{xml:*} \stopxmlsetups \xmlregistersetup{xml:mysetup} \startxmlsetups xml:mysetup:document \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:mysetup:element \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:mysetup:mdata \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:mysetup:tdata \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:mysetup:name \xmlflush \stopxmlsetups \startxmlsetups xml:mysetup:num \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:mysetup:content \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:mysetup:shortdescription \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:mysetup:p \xmlflush{#1}\par \stopxmlsetups \starttext \xmlprocessbuffer {mysetup}{xmlcontent}{} \stoptext Am 21.08.2023 um 17:45 schrieb Thomas A. Schmitz: Have you looked at chapter 3.10 "Testing" of the manual xml-mkiv.pdf? There are a lot of commands there that should help you, such as \xmldoiftext {#1} {/mdata/date} {\bf \xmlflush {#1}} or \xmldoifelsetext. There's also \xmlfilter, which you can use to test for the content of tags. And of course, you can process in Lua and search for strings or use lpeg. However, your question is a bit vague now. Show us some code you have and we can take it from there; that's easier than writing the whole setup for you. Thomas On 8/21/23 17:29, Michael Löscher wrote: Hello list, having the xml data at the bottom, I would like to process it so that the result is like this: --- What it is (e.g. bold formatted) date: 2023-08-01 (italic) Description (small font size) Another text (small font size) hd1 - Header 1 § 1 First (A first short description) AA BB § 2 Second (A second short description) CC DD § 3 Third (A third short description) EE FF --- How can I process the s differently? The first element contains a tag and so it differs from the other ones. The second element's tag contains the word "Header" which makes it different again. The other elements contain a tag that they all have in common. What could be the appropriate xml setups to generate the above output? Michael --- xml data: \startbuffer[xmlcontent] What it is 2023-08-01 Description Another text hd1 Header 1 Text of Header 1 1 First A first short description AA BB 2 Second A second short description CC DD 3 Third A third short description EE FF \stopbuffer ___ 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 ___ ___ 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: XML processing beginner's question
Have you looked at chapter 3.10 "Testing" of the manual xml-mkiv.pdf? There are a lot of commands there that should help you, such as \xmldoiftext {#1} {/mdata/date} {\bf \xmlflush {#1}} or \xmldoifelsetext. There's also \xmlfilter, which you can use to test for the content of tags. And of course, you can process in Lua and search for strings or use lpeg. However, your question is a bit vague now. Show us some code you have and we can take it from there; that's easier than writing the whole setup for you. Thomas On 8/21/23 17:29, Michael Löscher wrote: Hello list, having the xml data at the bottom, I would like to process it so that the result is like this: --- What it is (e.g. bold formatted) date: 2023-08-01 (italic) Description (small font size) Another text (small font size) hd1 - Header 1 § 1 First (A first short description) AA BB § 2 Second (A second short description) CC DD § 3 Third (A third short description) EE FF --- How can I process the s differently? The first element contains a tag and so it differs from the other ones. The second element's tag contains the word "Header" which makes it different again. The other elements contain a tag that they all have in common. What could be the appropriate xml setups to generate the above output? Michael --- xml data: \startbuffer[xmlcontent] What it is 2023-08-01 Description Another text hd1 Header 1 Text of Header 1 1 First A first short description AA BB 2 Second A second short description CC DD 3 Third A third short description EE FF \stopbuffer ___ 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] XML processing beginner's question
Hello list, having the xml data at the bottom, I would like to process it so that the result is like this: --- What it is (e.g. bold formatted) date: 2023-08-01 (italic) Description (small font size) Another text (small font size) hd1 - Header 1 § 1 First (A first short description) AA BB § 2 Second (A second short description) CC DD § 3 Third (A third short description) EE FF --- How can I process the s differently? The first element contains a tag and so it differs from the other ones. The second element's tag contains the word "Header" which makes it different again. The other elements contain a tag that they all have in common. What could be the appropriate xml setups to generate the above output? Michael --- xml data: \startbuffer[xmlcontent] What it is 2023-08-01 Description Another text hd1 Header 1 Text of Header 1 1 First A first short description AA BB 2 Second A second short description CC DD 3 Third A third short description EE FF \stopbuffer ___ 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] unsubscribe
> On 18. Aug 2023, at 20:17, Carlos wrote: > > On Fri, Aug 18, 2023 at 06:20:29PM +0200, Mikael Sundqvist wrote: >> Hi, >> >> It is extremely difficult to follow what you write. >> >> On Fri, Aug 18, 2023 at 11:43 AM Carlos wrote: >>> >>> If I have the following, with these linebreaks as in: >>> >>> {\par But a system cannot be successful if it is too strongly >>> influenced by a single person. {\obeylines Once the initial design is >>> complete and fairly robust, the real test begins as people >>> with many different viewpoints undertake their own >>> experiments.}} >> >> Is that the complete document? What do you have in mind with obeying >> lines in the middle of a paragraph? > > it's the only possible way off the top of my head to circumvent body > font size with a given width, while keeping both: the kern of \TeX\ > and the double spacing that lmtx injects following a sentence, > within sanity check, hence the nonfrenchspacing > > The separation of any of these four components would have hurt T > E X sig > nificantly. > If I had not participated fully in all these activities, literally > hundreds of improvements would never have been made, because I would > never have thought of them or perceived why they were important. > But a system cannot be successful if it is too strongly influenced > by a single person. Once the initial design is > > >> >>> >>> and opted to load another font, other than cmr that is, a \frenchspacing >>> approach wouldn't be further required >> >> cmr? Not used in ConTeXt for a long time. (And what does the changing >> of font have to do with this?) > > latin modern. >> >>> >>> Bear with me here, in the current state, for example, and as long as say >>> >>> «…person.␣{\obeylines Once the initial is >>> complete…» though feasible enough, leaves any prior \␣ at the mercy of >>> whatever fontsize and/or set width happens to be. And this is just plain >>> wrong. >> >> What? >> >>> >>> Likewise, if a word sequence such as \TeX\ occurs as in {\ss The separation >>> of any of these four components would have hurt \TeX\ significantly. } >> >> Likewise what? >> >>> >>> The next sentence: «If I had not participated…» does not get any >>> \nofrenchspacing which is equally and doubly problematic. It shows lack of >>> consistency. And this ought not to be an ‹either› ‹or› scenario. But >>> rather, an and conjunctional construct. It fails both ways. >> >> Consistency of what? Spacing? Where? Can you make a complete example? >> (You can show space amount with \showmakup[space]) > > yes. and showmakeup displays: .SP:10.945 If > > rather than for example with: .SP:5.235 > OnceSP:3.926 > theSP:3.926 > initial SP:3.926 > designSP:3.926 > is > > and > > :3.586 > THK:-1.853 > H__E > X > HK:-1.390 > SP:3.586 > sigRH:0.000 > IR:0.000 > RS:0.000 > LH:0.000 > H__nificantlyLS:0.000BS:6.565 > > > and here's your example: > > \setuplayout[width=16cm] > \showmakeup > > \starttext > > Thus, I came to the conclusion that the designer of a new > system must not only be the implementer and first > large||scale user; the designer should also write the first > user manual. > \setupbodyfont[12.895pt] > > {\ss The separation of any of these four components would have > hurt \TeX\ significantly. If I had not participated fully in > all these activities, literally hundreds of improvements > would never have been made, because I would never have > thought of them or perceived why they were important.\par} > > Do you see that width of 16cm? That's what throws it off > > but then again, anything less than that 12.895 font size, throws off the > kern of \TeX\ too. > > As a result, I can't use any lower font size, before everything, > including kerning of \TeX\ and spaces after sentences, are completely > off. > > I mean. obeylines serve a better function than having extra spaces all > over with no end in sight, really. >> >>> >>> Furthermore, with the same token, if width is specified with a >>> >>> \setuplayout[width=15cm] >> >> OK, here the game changes... >> >>> >>> Anything less than 12.895pt, especifically for that use case, wwould >>> throw anything, particularly control sequences such as \TeX\ out >>> of whack, and conversely, once a value of that very pt or
[NTG-context] Re: redefine space to be the same as \␣ similar to knuthian approach
On Fri, Aug 18, 2023 at 02:26:55PM -0400, Carlos wrote: > On Fri, Aug 18, 2023 at 06:20:29PM +0200, Mikael Sundqvist wrote: > > Hi, > > > > It is extremely difficult to follow what you write. > > > > On Fri, Aug 18, 2023 at 11:43 AM Carlos wrote: > > > > > > If I have the following, with these linebreaks as in: > > > > > > {\par But a system cannot be successful if it is too strongly > > > influenced by a single person. {\obeylines Once the initial design is > > > complete and fairly robust, the real test begins as people > > > with many different viewpoints undertake their own > > > experiments.}} > > > > Is that the complete document? What do you have in mind with obeying > > lines in the middle of a paragraph? > > > > > > > > and opted to load another font, other than cmr that is, a \frenchspacing > > > approach wouldn't be further required > > > > cmr? Not used in ConTeXt for a long time. (And what does the changing > > of font have to do with this?) > > > > > > > > Bear with me here, in the current state, for example, and as long as say > > > > > > «…person.␣{\obeylines Once the initial is > > > complete…» though feasible enough, leaves any prior \␣ at the mercy of > > > whatever fontsize and/or set width happens to be. And this is just plain > > > wrong. > > > > What? > > > > > > > > Likewise, if a word sequence such as \TeX\ occurs as in {\ss The > > > separation > > > of any of these four components would have hurt \TeX\ significantly. } > > > > Likewise what? > > > > > > > > The next sentence: «If I had not participated…» does not get any > > > \nofrenchspacing which is equally and doubly problematic. It shows lack of > > > consistency. And this ought not to be an ‹either› ‹or› scenario. But > > > rather, an and conjunctional construct. It fails both ways. > > > > Consistency of what? Spacing? Where? Can you make a complete example? > > (You can show space amount with \showmakup[space]) > > > > > > > > Furthermore, with the same token, if width is specified with a > > > > > > \setuplayout[width=15cm] > > > > OK, here the game changes... > > > > > > > > Anything less than 12.895pt, especifically for that use case, wwould > > > throw anything, particularly control sequences such as \TeX\ out > > > of whack, and conversely, once a value of that very pt or pica or > > > whatever is lowered, it brings that nonfrenchspacing right back on. > > > And if width increments occur, then it follows that any control sequence > > > kerning > > > also gets thrown off as a result. > > > > Of course the width influences the spacing. That is how the paragraph > > builder works (and really, why it often looks good). > > > > > > > > It seems so far, that with lmtx, any standalone file, document, minimal > > > working example that does not load cmr at the outset does not produce > > > an acceptable outcome either. By saying acceptable I meant to say it > > > namely from a typographical point of view. Nothing else. > > > > I have no clue of what you talk about here. > > > > > > > > from the TeXbook 380-381 > > > > > > «\obeylines doesn’t say ‘\def^^M{\par}’, so we must make any desired > > > changes to > > > \par before invoking \obeylines. (2) The \uncatcodespecials operation > > > changes a > > > space to category 12; but the \tt font has the character ‘␣’ in the > > > ⟨space⟩ position, so we > > > don’t really want ␣12 . (3) The \obeyspaces macro in Appendix B merely > > > changes the > > > ⟨space⟩ character to category 13; active character ␣13 has been defined > > > to be the same > > > as \space, a macro that expands to ␣10 . This is usually what is desired; > > > for example, > > > it means that spaces in constructions like ‘\hbox to 10 pt {...}’ won’t > > > cause any > > > trouble. But in our application it has an undesirable effect, because it > > > produces spaces > > > that are affected by the space factor. To defeat this feature, it’s > > > necessary either to > > > say \frenchspacing or to redefine ␣13 to be the same as \␣. The latter > > > alternative is > > > better, because the former will discard spaces at the beginning of each > > > line.» > > > &g
[NTG-context] Re: redefine space to be the same as \␣ similar to knuthian approach
On Fri, Aug 18, 2023 at 06:20:29PM +0200, Mikael Sundqvist wrote: > Hi, > > It is extremely difficult to follow what you write. > > On Fri, Aug 18, 2023 at 11:43 AM Carlos wrote: > > > > If I have the following, with these linebreaks as in: > > > > {\par But a system cannot be successful if it is too strongly > > influenced by a single person. {\obeylines Once the initial design is > > complete and fairly robust, the real test begins as people > > with many different viewpoints undertake their own > > experiments.}} > > Is that the complete document? What do you have in mind with obeying > lines in the middle of a paragraph? > > > > > and opted to load another font, other than cmr that is, a \frenchspacing > > approach wouldn't be further required > > cmr? Not used in ConTeXt for a long time. (And what does the changing > of font have to do with this?) > > > > > Bear with me here, in the current state, for example, and as long as say > > > > «…person.␣{\obeylines Once the initial is > > complete…» though feasible enough, leaves any prior \␣ at the mercy of > > whatever fontsize and/or set width happens to be. And this is just plain > > wrong. > > What? > > > > > Likewise, if a word sequence such as \TeX\ occurs as in {\ss The separation > > of any of these four components would have hurt \TeX\ significantly. } > > Likewise what? > > > > > The next sentence: «If I had not participated…» does not get any > > \nofrenchspacing which is equally and doubly problematic. It shows lack of > > consistency. And this ought not to be an ‹either› ‹or› scenario. But > > rather, an and conjunctional construct. It fails both ways. > > Consistency of what? Spacing? Where? Can you make a complete example? > (You can show space amount with \showmakup[space]) > > > > > Furthermore, with the same token, if width is specified with a > > > > \setuplayout[width=15cm] > > OK, here the game changes... > > > > > Anything less than 12.895pt, especifically for that use case, wwould > > throw anything, particularly control sequences such as \TeX\ out > > of whack, and conversely, once a value of that very pt or pica or > > whatever is lowered, it brings that nonfrenchspacing right back on. > > And if width increments occur, then it follows that any control sequence > > kerning > > also gets thrown off as a result. > > Of course the width influences the spacing. That is how the paragraph > builder works (and really, why it often looks good). > > > > > It seems so far, that with lmtx, any standalone file, document, minimal > > working example that does not load cmr at the outset does not produce > > an acceptable outcome either. By saying acceptable I meant to say it > > namely from a typographical point of view. Nothing else. > > I have no clue of what you talk about here. > > > > > from the TeXbook 380-381 > > > > «\obeylines doesn’t say ‘\def^^M{\par}’, so we must make any desired > > changes to > > \par before invoking \obeylines. (2) The \uncatcodespecials operation > > changes a > > space to category 12; but the \tt font has the character ‘␣’ in the ⟨space⟩ > > position, so we > > don’t really want ␣12 . (3) The \obeyspaces macro in Appendix B merely > > changes the > > ⟨space⟩ character to category 13; active character ␣13 has been defined to > > be the same > > as \space, a macro that expands to ␣10 . This is usually what is desired; > > for example, > > it means that spaces in constructions like ‘\hbox to 10 pt {...}’ won’t > > cause any > > trouble. But in our application it has an undesirable effect, because it > > produces spaces > > that are affected by the space factor. To defeat this feature, it’s > > necessary either to > > say \frenchspacing or to redefine ␣13 to be the same as \␣. The latter > > alternative is > > better, because the former will discard spaces at the beginning of each > > line.» > > > > «In theory, this seems like it ought to work; but in practice, it fails in > > two ways. One > > rather obvious failure—at least, it becomes obvious when the macro is > > tested—is that > > all the empty lines of the file are omitted. The reason is that the \par > > command at the > > end of an empty line doesn’t start up a new paragraph, because it occurs in > > vertical > > mode. The other failure is not as obvious, because it occurs much less > > often: The \tt > > fonts contain ligatures for Spanish punctuati
[NTG-context] Re: redefine space to be the same as \␣ similar to knuthian approach
On Fri, Aug 18, 2023 at 06:20:29PM +0200, Mikael Sundqvist wrote: > Hi, > > It is extremely difficult to follow what you write. > > On Fri, Aug 18, 2023 at 11:43 AM Carlos wrote: > > > > If I have the following, with these linebreaks as in: > > > > {\par But a system cannot be successful if it is too strongly > > influenced by a single person. {\obeylines Once the initial design is > > complete and fairly robust, the real test begins as people > > with many different viewpoints undertake their own > > experiments.}} > > Is that the complete document? What do you have in mind with obeying > lines in the middle of a paragraph? it's the only possible way off the top of my head to circumvent body font size with a given width, while keeping both: the kern of \TeX\ and the double spacing that lmtx injects following a sentence, within sanity check, hence the nonfrenchspacing The separation of any of these four components would have hurt T E X sig nificantly. If I had not participated fully in all these activities, literally hundreds of improvements would never have been made, because I would never have thought of them or perceived why they were important. But a system cannot be successful if it is too strongly influenced by a single person. Once the initial design is > > > > > and opted to load another font, other than cmr that is, a \frenchspacing > > approach wouldn't be further required > > cmr? Not used in ConTeXt for a long time. (And what does the changing > of font have to do with this?) latin modern. > > > > > Bear with me here, in the current state, for example, and as long as say > > > > «…person.␣{\obeylines Once the initial is > > complete…» though feasible enough, leaves any prior \␣ at the mercy of > > whatever fontsize and/or set width happens to be. And this is just plain > > wrong. > > What? > > > > > Likewise, if a word sequence such as \TeX\ occurs as in {\ss The separation > > of any of these four components would have hurt \TeX\ significantly. } > > Likewise what? > > > > > The next sentence: «If I had not participated…» does not get any > > \nofrenchspacing which is equally and doubly problematic. It shows lack of > > consistency. And this ought not to be an ‹either› ‹or› scenario. But > > rather, an and conjunctional construct. It fails both ways. > > Consistency of what? Spacing? Where? Can you make a complete example? > (You can show space amount with \showmakup[space]) yes. and showmakeup displays: .SP:10.945 If rather than for example with: .SP:5.235 OnceSP:3.926 theSP:3.926 initial SP:3.926 designSP:3.926 is and :3.586 THK:-1.853 H__E X HK:-1.390 SP:3.586 sigRH:0.000 IR:0.000 RS:0.000 LH:0.000 H__nificantlyLS:0.000BS:6.565 and here's your example: \setuplayout[width=16cm] \showmakeup \starttext Thus, I came to the conclusion that the designer of a new system must not only be the implementer and first large||scale user; the designer should also write the first user manual. \setupbodyfont[12.895pt] {\ss The separation of any of these four components would have hurt \TeX\ significantly. If I had not participated fully in all these activities, literally hundreds of improvements would never have been made, because I would never have thought of them or perceived why they were important.\par} Do you see that width of 16cm? That's what throws it off but then again, anything less than that 12.895 font size, throws off the kern of \TeX\ too. As a result, I can't use any lower font size, before everything, including kerning of \TeX\ and spaces after sentences, are completely off. I mean. obeylines serve a better function than having extra spaces all over with no end in sight, really. > > > > > Furthermore, with the same token, if width is specified with a > > > > \setuplayout[width=15cm] > > OK, here the game changes... > > > > > Anything less than 12.895pt, especifically for that use case, wwould > > throw anything, particularly control sequences such as \TeX\ out > > of whack, and conversely, once a value of that very pt or pica or > > whatever is lowered, it brings that nonfrenchspacing right back on. > > And if width increments occur, then it follows that any control sequence > > kerning > > also gets thrown off as a result. > > Of course the width influences the spacing. That is how the paragraph > builder works (and really, why it often looks good). > > > > > It seems so far, that with lmtx, any standalone file, document, minimal > > working example that does not load cmr at the outset does not produce > > an acceptable outcome either. By saying acceptable I meant to s
[NTG-context] Re: redefine space to be the same as \␣ similar to knuthian approach
Hi, It is extremely difficult to follow what you write. On Fri, Aug 18, 2023 at 11:43 AM Carlos wrote: > > If I have the following, with these linebreaks as in: > > {\par But a system cannot be successful if it is too strongly > influenced by a single person. {\obeylines Once the initial design is > complete and fairly robust, the real test begins as people > with many different viewpoints undertake their own > experiments.}} Is that the complete document? What do you have in mind with obeying lines in the middle of a paragraph? > > and opted to load another font, other than cmr that is, a \frenchspacing > approach wouldn't be further required cmr? Not used in ConTeXt for a long time. (And what does the changing of font have to do with this?) > > Bear with me here, in the current state, for example, and as long as say > > «…person.␣{\obeylines Once the initial is > complete…» though feasible enough, leaves any prior \␣ at the mercy of > whatever fontsize and/or set width happens to be. And this is just plain > wrong. What? > > Likewise, if a word sequence such as \TeX\ occurs as in {\ss The separation > of any of these four components would have hurt \TeX\ significantly. } Likewise what? > > The next sentence: «If I had not participated…» does not get any > \nofrenchspacing which is equally and doubly problematic. It shows lack of > consistency. And this ought not to be an ‹either› ‹or› scenario. But > rather, an and conjunctional construct. It fails both ways. Consistency of what? Spacing? Where? Can you make a complete example? (You can show space amount with \showmakup[space]) > > Furthermore, with the same token, if width is specified with a > > \setuplayout[width=15cm] OK, here the game changes... > > Anything less than 12.895pt, especifically for that use case, wwould > throw anything, particularly control sequences such as \TeX\ out > of whack, and conversely, once a value of that very pt or pica or > whatever is lowered, it brings that nonfrenchspacing right back on. > And if width increments occur, then it follows that any control sequence > kerning > also gets thrown off as a result. Of course the width influences the spacing. That is how the paragraph builder works (and really, why it often looks good). > > It seems so far, that with lmtx, any standalone file, document, minimal > working example that does not load cmr at the outset does not produce > an acceptable outcome either. By saying acceptable I meant to say it > namely from a typographical point of view. Nothing else. I have no clue of what you talk about here. > > from the TeXbook 380-381 > > «\obeylines doesn’t say ‘\def^^M{\par}’, so we must make any desired changes > to > \par before invoking \obeylines. (2) The \uncatcodespecials operation changes > a > space to category 12; but the \tt font has the character ‘␣’ in the ⟨space⟩ > position, so we > don’t really want ␣12 . (3) The \obeyspaces macro in Appendix B merely > changes the > ⟨space⟩ character to category 13; active character ␣13 has been defined to be > the same > as \space, a macro that expands to ␣10 . This is usually what is desired; for > example, > it means that spaces in constructions like ‘\hbox to 10 pt {...}’ won’t cause > any > trouble. But in our application it has an undesirable effect, because it > produces spaces > that are affected by the space factor. To defeat this feature, it’s necessary > either to > say \frenchspacing or to redefine ␣13 to be the same as \␣. The latter > alternative is > better, because the former will discard spaces at the beginning of each > line.» > > «In theory, this seems like it ought to work; but in practice, it fails in > two ways. One > rather obvious failure—at least, it becomes obvious when the macro is > tested—is that > all the empty lines of the file are omitted. The reason is that the \par > command at the > end of an empty line doesn’t start up a new paragraph, because it occurs in > vertical > mode. The other failure is not as obvious, because it occurs much less often: > The \tt > fonts contain ligatures for Spanish punctuation, so the sequences ?‘ and !‘ > will be > printed as ¿ and ¡ respectively. Both of these defects can be cured by > inserting > > and > > > «When INITEX creates a brand new TEX, all characters have a space factor code > of 1000, except that the uppercase letters ‘A’ through ‘Z’ have code 999. > (This > slight difference is what makes punctuation act differently after an > uppercase letter; do > you see why?) Plain TEX redefines a few of these codes using the \sfcode > primitive, > which is similar to \catcode (see Appendix B); for example, the instructions > \sfcode‘)=0 &g