Re: [NTG-context] margin comment above heading
> Am 17.06.2020 um 22:47 schrieb Wolfgang Schuster > : > > Pablo Rodriguez schrieb am 16.06.2020 um 22:17: >> Dear list, >> I have the following sample: >> \startsetups[tinytiny] >> \setupwhitespace[-2em] >> \setupbodyfont[0.01pt] >> \setupinterlinespace[1sp] >> \stopsetups > > ??? > >> \setupinteraction[state=start] >> \showframe\showgrid >> \starttext >> \blank[force, 10em] >> \section{Move comment above this heading} >> \startparagraph[setups=tinytiny] >> \dontleavehmode >> \comment[location={rightmargin}, color=orange] >> {comment} >> \stopparagraph >> \stoptext >> Is there a way to move the comment above the heading that goes before? > > Like this? > > \setupinteraction[state=start] > > \showframe > \showgrid > > \starttext > > \blank[force,10em] > > \comment[location={rightmargin},color=orange]{comment} > \section{Move comment above this heading} > > \stoptext Pablo, do I understand right that you’re converting XML and the comment comes last in that structure, but you need it first? I.e. the real question is how to process the XML structure in a different order, right? That would avoid shifting boxes around, which might be possible, but ugly and hard to control. Hraban ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] spacing before items
On 6/17/2020 11:03 PM, Mike Cooper wrote: OK. I'm not sure how I'm supposed to guess that. I am a rank beginner and while there are breakthroughs now and then, frustration is still the main thing I experience trying to learn/use ConTeXt... In any case, my original question is still not solved. The before/inbetween keys add space everywhere. I only want space between top-level items. Here is something like what I need, with the spacing exaggerated: 1. Multi-line, involved question… Multi-line, involved question… Multi-line, involved question… Multi-line, involved question… Multi-line, involved question… Multi-line, involved question… Multi-line, involved question… Multi-line, involved question… Multi-line, involved question… Multi-line, involved question… Multi-line, involved question… Multi-line, involved question… Multi-line, involved question… Multi-line, involved question… What’s the answer? a. An answer that may well wrap onto a second or even third line but is usually half a line or less. b. By the time the data has been accurately analyzed, critical failure has already occurred. c. Seven bands must be hired to adequately bring the funk. 2. Another question with detailed data and information and scenario. Another question with detailed data and information and scenario. Another question with detailed data and information and scenario. Another question with detailed data and information and scenario. Another question with detailed data and information and scenario. Another question with detailed data and information and scenario. Another question with detailed data and information and scenario. Another question with detailed data and information and scenario. What’s the correct action to take? a. Create a spreadsheet which compiles the salient data into a logical order/layout, perform calculations and analysis then search the internet for a solution. b. Immediately report the data to the supervisory team. c. File the data in the relevant, appropriate locations, complete a standardized company report form, notify all vested parties, raise the flags, abandon ship. 3. Yet another of the same. Yet another of the same. Yet another of the same. Yet another of the same. Yet another of the same. Yet another of the same. Yet another of the same. Yet another of the same. Yet another of the same. Yet another of the same. Yet another of the same. Yet another of the same. Yet another of the same. Yet another of the same. Yet another of the same. Yet another of the same. What would you do? a. Run b. Walk c. Crawl I want the top-level chunks to be visually separated for better readability, etc. \defineenumeration [question] [text=, alternative=serried, distance=1em, width=fit, before={\testpage[4]\blank[3*big]}, after={\blank}] \starttext \dorecurse{10}{ \startquestion \input ward \stopquestion \startitemize[packed,a] \startitem \input ward \stopitem \startitem \input ward \stopitem \startitem \input ward \stopitem \stopitemize } \stoptext -Original Message- From: ntg-context [mailto:ntg-context-boun...@ntg.nl] On Behalf Of Wolfgang Schuster Sent: Wednesday, June 17, 2020 2:45 PM To: mailing list for ConTeXt users Subject: Re: [NTG-context] spacing before items Mike Cooper schrieb am 17.06.2020 um 21:50: I really should have fiddled with this before thanking you, Wolfgang. I was focused on catching up on email etc. this morning. Thanks for trying though! Your "answer" is pretty much coded code to me. I don't understand it and don't have the first notion of how to implement it in my file. For one thing, I have no clue what "ttbf" means. Can't find it on the wiki or in the manuals. Google says it's the Texas Teen Book Festival but I'm guessing that ain't it. ??? My example shows which key is used for which space around each item. To insert vertical space you have to use the \blank command and set a value in the optional argument, e.g. \blank[1cm]. To insert now a space of 1cm before the first item you need the "before" key with \blank as argument: \setupitemgroup[mdshw][1][before={\blank[1cm]}] Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___ ___ 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 :
Re: [NTG-context] spacing before items
OK. I'm not sure how I'm supposed to guess that. I am a rank beginner and while there are breakthroughs now and then, frustration is still the main thing I experience trying to learn/use ConTeXt... In any case, my original question is still not solved. The before/inbetween keys add space everywhere. I only want space between top-level items. Here is something like what I need, with the spacing exaggerated: 1. Multi-line, involved question… Multi-line, involved question… Multi-line, involved question… Multi-line, involved question… Multi-line, involved question… Multi-line, involved question… Multi-line, involved question… Multi-line, involved question… Multi-line, involved question… Multi-line, involved question… Multi-line, involved question… Multi-line, involved question… Multi-line, involved question… Multi-line, involved question… What’s the answer? a. An answer that may well wrap onto a second or even third line but is usually half a line or less. b. By the time the data has been accurately analyzed, critical failure has already occurred. c. Seven bands must be hired to adequately bring the funk. 2. Another question with detailed data and information and scenario. Another question with detailed data and information and scenario. Another question with detailed data and information and scenario. Another question with detailed data and information and scenario. Another question with detailed data and information and scenario. Another question with detailed data and information and scenario. Another question with detailed data and information and scenario. Another question with detailed data and information and scenario. What’s the correct action to take? a. Create a spreadsheet which compiles the salient data into a logical order/layout, perform calculations and analysis then search the internet for a solution. b. Immediately report the data to the supervisory team. c. File the data in the relevant, appropriate locations, complete a standardized company report form, notify all vested parties, raise the flags, abandon ship. 3. Yet another of the same. Yet another of the same. Yet another of the same. Yet another of the same. Yet another of the same. Yet another of the same. Yet another of the same. Yet another of the same. Yet another of the same. Yet another of the same. Yet another of the same. Yet another of the same. Yet another of the same. Yet another of the same. Yet another of the same. Yet another of the same. What would you do? a. Run b. Walk c. Crawl I want the top-level chunks to be visually separated for better readability, etc. -Original Message- From: ntg-context [mailto:ntg-context-boun...@ntg.nl] On Behalf Of Wolfgang Schuster Sent: Wednesday, June 17, 2020 2:45 PM To: mailing list for ConTeXt users Subject: Re: [NTG-context] spacing before items Mike Cooper schrieb am 17.06.2020 um 21:50: > I really should have fiddled with this before thanking you, Wolfgang. I was > focused on catching up on email etc. this morning. > > Thanks for trying though! > > Your "answer" is pretty much coded code to me. I don't understand it and > don't have the first notion of how to implement it in my file. For one > thing, I have no clue what "ttbf" means. Can't find it on the wiki or in > the manuals. Google says it's the Texas Teen Book Festival but I'm guessing > that ain't it. ??? My example shows which key is used for which space around each item. To insert vertical space you have to use the \blank command and set a value in the optional argument, e.g. \blank[1cm]. To insert now a space of 1cm before the first item you need the "before" key with \blank as argument: \setupitemgroup[mdshw][1][before={\blank[1cm]}] Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] margin comment above heading
Pablo Rodriguez schrieb am 16.06.2020 um 22:17: Dear list, I have the following sample: \startsetups[tinytiny] \setupwhitespace[-2em] \setupbodyfont[0.01pt] \setupinterlinespace[1sp] \stopsetups ??? \setupinteraction[state=start] \showframe\showgrid \starttext \blank[force, 10em] \section{Move comment above this heading} \startparagraph[setups=tinytiny] \dontleavehmode \comment[location={rightmargin}, color=orange] {comment} \stopparagraph \stoptext Is there a way to move the comment above the heading that goes before? Like this? \setupinteraction[state=start] \showframe \showgrid \starttext \blank[force,10em] \comment[location={rightmargin},color=orange]{comment} \section{Move comment above this heading} \stoptext Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] spacing before items
Mike Cooper schrieb am 17.06.2020 um 21:50: I really should have fiddled with this before thanking you, Wolfgang. I was focused on catching up on email etc. this morning. Thanks for trying though! Your "answer" is pretty much coded code to me. I don't understand it and don't have the first notion of how to implement it in my file. For one thing, I have no clue what "ttbf" means. Can't find it on the wiki or in the manuals. Google says it's the Texas Teen Book Festival but I'm guessing that ain't it. ??? My example shows which key is used for which space around each item. To insert vertical space you have to use the \blank command and set a value in the optional argument, e.g. \blank[1cm]. To insert now a space of 1cm before the first item you need the "before" key with \blank as argument: \setupitemgroup[mdshw][1][before={\blank[1cm]}] Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] spacing before items
Yes, I did try it. It put "[before]" (in ttbf (thanks for the hint!)) on the previously blank line before the first top-level item. And it put "[inbetween]" in the other previously blank lines between both level of items, and "[after]" into the previously blank line after the last item. Spacing was not affected at all, only mysterious words in square brackets showed up in the output. ?? -Original Message- From: ntg-context [mailto:ntg-context-boun...@ntg.nl] On Behalf Of Henning Hraban Ramm Sent: Wednesday, June 17, 2020 2:27 PM To: mailing list for ConTeXt users Subject: Re: [NTG-context] spacing before items > Am 17.06.2020 um 21:50 schrieb Mike Cooper > : > > For one thing, I have no clue what "ttbf" means. Can't find it on the wiki > or in the manuals. Google says it's the Texas Teen Book Festival but I'm > guessing that ain't it. ??? Did you try it? (Hint: There’s \tt and \bf ...) HR ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] spacing before items
> Am 17.06.2020 um 21:50 schrieb Mike Cooper > : > > For one thing, I have no clue what "ttbf" means. Can't find it on the wiki > or in the manuals. Google says it's the Texas Teen Book Festival but I'm > guessing that ain't it. ??? Did you try it? (Hint: There’s \tt and \bf ...) HR ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] spacing before items
I really should have fiddled with this before thanking you, Wolfgang. I was focused on catching up on email etc. this morning. Thanks for trying though! Your "answer" is pretty much coded code to me. I don't understand it and don't have the first notion of how to implement it in my file. For one thing, I have no clue what "ttbf" means. Can't find it on the wiki or in the manuals. Google says it's the Texas Teen Book Festival but I'm guessing that ain't it. ??? Thanks anyway! -Original Message- From: ntg-context [mailto:ntg-context-boun...@ntg.nl] On Behalf Of Wolfgang Schuster Sent: Tuesday, June 16, 2020 1:14 PM To: mailing list for ConTeXt users Subject: Re: [NTG-context] spacing before items Mike Cooper schrieb am 16.06.2020 um 19:51: > Hello list, > > Another very simple issue—no doubt the answer is right in front of me > but I can’t find it or figure it out… > > (Please let me know where it is!) > > I want more space before each top-level item.MWE: > > \defineitemgroup[mdshw][levels=2] > > \setupitemgroup[mdshw][1][n] > > \setupitemgroup[mdshw][2][a, packed, 1*broad][left=(, right=), stopper=] > > \starttext > > \startsection{First Section} \startsection[title={...}] The first entry uses the "before" value while inner entries use "inbetween". \starttext \setupitemgroup [itemize][1] [ before={\endgraf{\ttbf[before]}\endgraf}, inbetween={\endgraf{\ttbf [inbetween]}\endgraf}, after={\endgraf{\ttbf [after]}\endgraf}] \startitemize \startitem Choose the correct answer. \startitemize \item This one \item This one \stopitemize \stopitem \startitem Choose the correct answer. \startitemize \item This one \item This one \stopitemize \stopitem \stopitemize \stoptext Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] (no subject)
On 6/17/2020 3:46 PM, Taco Hoekwater wrote: Like this (an arrangement that uses two physical pages, that is where the \poparrangedpagesAB and \arrangedpageA / \arrangedpageB come from): \installpagearrangement 1*4*reversed {\dosetuparrangement{2}{2}{4}{3}{3}% X,Y,Total,hcutmarks,vcutmarks \pusharrangedpageFOURSINGLESIDEDFOLDEDREVERSED\poparrangedpagesAB\relax} \def\pusharrangedpageFOURSINGLESIDEDFOLDEDREVERSED#1% {\advancearrangedpageN \reportarrangedpage\arrangedpageN \ifcase\arrangedpageN \or \handlearrangedpageXandY{#1}010\arrangedpageA % 1 rot,hskip,vskip \or \handlearrangedpageXandY{#1}111\arrangedpageA % 2 \or \handlearrangedpageXandY{#1}101\arrangedpageA % 3 \or \handlearrangedpageXandY{#1}000\arrangedpageA % 4 \or \handlearrangedpageXandY{#1}000\arrangedpageB % 5 \or \handlearrangedpageXandY{#1}010\arrangedpageB % 6 \or \handlearrangedpageXandY{#1}001\arrangedpageB % 7 \or \handlearrangedpageXandY{#1}011\arrangedpageB % 8 \poparrangedpages \fi} Best wishes, Taco You forgot to mention that the price to pay for this nice solution it that Malte needs to wikify 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 ___
Re: [NTG-context] Yet another cornercase of ^^ handling in LuaMetaTeX
On 6/17/2020 4:24 PM, Marcel Fabian Krüger wrote: How does this work with mark nodes? Their mark field has a table containing triples of command, character and "cs" value. How can the actual csname of a controlsequence be extracted from this in LuaMetaTeX? at the token ends marks are stored as token lists but not directly accessible by a token itself as they get resolved during a split; a topmarks token is a cmd/chr combination that indicates that token (\topmarks) which then picks up a number (i noticed that i somehow lost picking up the number at the tex end but i'll fix that) i'll add a tex.getmarks("top|bottom|...",) for whatveer use it might have and probably also backport that to luatex then 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 ___
Re: [NTG-context] spacing before items
Thanks Tomáš! 1. Where can this solution be found? 2. This solution also adds space between the top-level and second-level lists... I only want some visual separation between the top-level chunks. Thanks! -Original Message- From: ntg-context [mailto:ntg-context-boun...@ntg.nl] On Behalf Of Tomas Hala Sent: Tuesday, June 16, 2020 1:18 PM To: mailing list for ConTeXt users Subject: Re: [NTG-context] spacing before items Hi Mike, \setupitemgroup[youritems][1][inbetween={\blank[5*big]}] could help you. Best wishes, Tomáš Tue, Jun 16, 2020 ve 05:51:20PM + Mike Cooper napsal(a): #Link: [1]File-List #Link: [2]Edit-Time-Data # #Hello list, # # # #Another very simple issue—no doubt the answer is right in front of me but #I can’t find it or figure it out… # #(Please let me know where it is!) # # # #I want more space before each top-level item. MWE: # # # #\defineitemgroup[mdshw][levels=2] # # \setupitemgroup[mdshw][1][n] # # \setupitemgroup[mdshw][2][a, packed, 1*broad][left=(, right=), #stopper=] # # # # # #\starttext # # # #\startsection{First Section} # # # #\startmdshw # # \item Choose the correct answer. # # \startmdshw # # \item This one # # \item This one # # \item This one # # \stopmdshw # # # # \item Choose the correct answer. # # \startmdshw # # \item This one # # \item This one # # \item This one # # \stopmdshw # # # # \item Choose the correct answer. # # \startmdshw # # \item This one # # \item This one # # \item This one # # \stopmdshw # # # #\startmdshw # # # #\stoptext # # # # # #THANK YOU!! # # # #Mike Cooper # #Technical Trainer # #Murchison Drilling Schools, Inc. # #2501 Juan Tabo NE # #Albuquerque, NM 87112 # #Tel: (505) 293-6271 # #Fax: (505) 298-5294 # #Email: [3]m...@murchisondrillingschools.com # #Website: [4]www.murchisondrillingschools.com # #[5]cid:image007.jpg@01D03ADC.BD6E6850 [6]cid:image008.jpg@01D03ADC.BD6E6850 [7]cid:image009.jpg@01D03ADC.BD6E6850 # #Murchison Drilling Schools is now part of # #[8]cid:image001.png@01D63515.857FD120 # # # # References # #Visible links #1. file:///home/thala/.mutt-tmp/cid:filelist.xml@01D643D4.723482A0 #2. file:///home/thala/.mutt-tmp/cid:editdata.mso #3. mailto:m...@murchisondrillingschools.com #4. http://www.murchisondrillingschools.com/ #5. https://www.facebook.com/pages/Murchison-Drilling-Schools/158018484232622 #6. http://www.linkedin.com/company/murchison-drilling-schools-inc- #7. https://twitter.com/trainingmds # ___ # 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 # ___ Tomáš Hála Mendelova univerzita, Provozně ekonomická fakulta, ústav informatiky Zemědělská 1, CZ-613 00 Brno, tel. +420 545 13 22 28 http://akela.mendelu.cz/~thala ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] spacing before items
Thanks Wolfgang! 1. Where can this solution be found? (wiki or elsewhere) 2. I'm guessing that you're saying that my \startsection should have [title={...}] instead of what I gave? -Original Message- From: ntg-context [mailto:ntg-context-boun...@ntg.nl] On Behalf Of Wolfgang Schuster Sent: Tuesday, June 16, 2020 1:14 PM To: mailing list for ConTeXt users Subject: Re: [NTG-context] spacing before items Mike Cooper schrieb am 16.06.2020 um 19:51: > Hello list, > > Another very simple issue—no doubt the answer is right in front of me > but I can’t find it or figure it out… > > (Please let me know where it is!) > > I want more space before each top-level item.MWE: > > \defineitemgroup[mdshw][levels=2] > > \setupitemgroup[mdshw][1][n] > > \setupitemgroup[mdshw][2][a, packed, 1*broad][left=(, right=), stopper=] > > \starttext > > \startsection{First Section} \startsection[title={...}] The first entry uses the "before" value while inner entries use "inbetween". \starttext \setupitemgroup [itemize][1] [ before={\endgraf{\ttbf[before]}\endgraf}, inbetween={\endgraf{\ttbf [inbetween]}\endgraf}, after={\endgraf{\ttbf [after]}\endgraf}] \startitemize \startitem Choose the correct answer. \startitemize \item This one \item This one \stopitemize \stopitem \startitem Choose the correct answer. \startitemize \item This one \item This one \stopitemize \stopitem \stopitemize \stoptext Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Yet another cornercase of ^^ handling in LuaMetaTeX
On Wed, Jun 17, 2020 at 03:43:49PM +0200, Hans Hagen wrote: > On 6/17/2020 12:10 PM, Marcel Fabian Krüger wrote: > > On Mon, Jun 15, 2020 at 04:16:06PM +0200, Hans Hagen wrote: > > > > > > ah, i removed some doee that i though was never seen; i'll add that bit > > > again > > > > > > > Beside that, I noticed a smaller weird thing when using LuaMetaTeX in > > > > ini > > > > mode without Context: The default mathcodes for digits and letters have > > > > their class and family values switched. So e.g. "A" has a default > > > > mathcode of 119537729=0x7200041, indicating class 1 and family 7, > > > > instead of the expected 31457345=0x1E00041, indicating class 7 and > > > > family 1. Of course this isn't really a problem because the format will > > > > normally assign new mathcodes anyway, but especially class 1 seems like > > > > a *very* unnatural default for normal letters. > > > i'll check it (digits get class 0) ... indeed these defaults nowadays > > > never > > > kick in this way > > > > Thanks. Is there any way to convert either a token number (as given e.g. > > by t.tok) or a numeric cs identifier (as given e.g. by t.tok-cs_token_flag) > > to a token uservalue? > > In LuaTeX I used to use `token.new(tok, 0)` for this, but LuaMetaTeX > > seems to do more checking here. > > Indeed there is more checking. So, when you create a token you need to use a > valid cmd code and a valid chr code. > > \ctxlua{ > local t = token.new(string.byte("X"),token.command_id("letter")) > tex.print(t) > } > > The interface might evolve a bit more. Valid commands (at this moment) are: > > \ctxlua{ > for k, v in ipairs(token.values("command")) do > print(k,v) > end > } > > So, things like this should work > > \dimen3456=1234pt > > \dimen3467= > \ctxlua{ > local t = token.new(3456,token.command_id("register_dimen")) > % local t = token.new("register_dimen",3456) % in upcoming version > tex.sprint(t) > } > > \the\dimen3467 > > As does: > > \ctxlua{ > local t1 = token.new(string.byte("{"),token.command_id("letter")) > local t2 = token.new(string.byte("}"),token.command_id("letter")) > tex.print(t1) > tex.print(t2) > } > > Properties like cs_token_flag are not user level and have no meaning in the > interface. In fact, the 'token-as-number' is just some representation with > no intended meaning. Also, tokens that are problematic or can interfere > badly might become inaccessible in future versions. > > (I don't expect many users to use the low level token interface anyway but > it's there as part of the package.) > > Hans > How does this work with mark nodes? Their mark field has a table containing triples of command, character and "cs" value. How can the actual csname of a controlsequence be extracted from this in LuaMetaTeX? Marcel ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] (no subject)
Like this (an arrangement that uses two physical pages, that is where the \poparrangedpagesAB and \arrangedpageA / \arrangedpageB come from): \installpagearrangement 1*4*reversed {\dosetuparrangement{2}{2}{4}{3}{3}% X,Y,Total,hcutmarks,vcutmarks \pusharrangedpageFOURSINGLESIDEDFOLDEDREVERSED\poparrangedpagesAB\relax} \def\pusharrangedpageFOURSINGLESIDEDFOLDEDREVERSED#1% {\advancearrangedpageN \reportarrangedpage\arrangedpageN \ifcase\arrangedpageN \or \handlearrangedpageXandY{#1}010\arrangedpageA % 1 rot,hskip,vskip \or \handlearrangedpageXandY{#1}111\arrangedpageA % 2 \or \handlearrangedpageXandY{#1}101\arrangedpageA % 3 \or \handlearrangedpageXandY{#1}000\arrangedpageA % 4 \or \handlearrangedpageXandY{#1}000\arrangedpageB % 5 \or \handlearrangedpageXandY{#1}010\arrangedpageB % 6 \or \handlearrangedpageXandY{#1}001\arrangedpageB % 7 \or \handlearrangedpageXandY{#1}011\arrangedpageB % 8 \poparrangedpages \fi} Best wishes, Taco > On 17 Jun 2020, at 13:31, Malte Frank Gerdes wrote: > > Hi, > > I'm new to context and found this > > ``` > \installpagearrangement 1*4*reversed > {\dosetuparrangement{2}{2}{4}{3}{3}% X,Y,Total,hcutmarks,vcutmarks > > \pusharrangedpageFOURSINGLESIDEDFOLDEDREVERSED\poparrangedpagesTWO\relax} > > \def\pusharrangedpageFOURSINGLESIDEDFOLDEDREVERSED#1% > {\advancearrangedpageN > \reportarrangedpage\arrangedpageN > \ifcase\arrangedpageN > \or \handlearrangedpageXandY{#1}010\arrangedpageA % 1 rot,hskip,vskip > \or \handlearrangedpageXandY{#1}111\arrangedpageA % 2 > \or \handlearrangedpageXandY{#1}101\arrangedpageA % 3 > \or \handlearrangedpageXandY{#1}000\arrangedpageA % 4 > \poparrangedpages > \fi} > > \setuppapersize [A10][A8] > \setuparranging [1*4*reversed] > \setuplayout[margin=0pt, width=fit] > > \showframe > > \starttext > \dorecurse{8}{\vbox to \textheight{\vfill\midaligned{\tfd ABC}\vfill}\page} > \stoptext > ``` > > imposition scheme in the garden wiki and tried it out. Now i noticed > that this sets the imposition scheme for *every* page, but i would like > to have a different scheme on the second page (1*4), how do i set that > (if this is even possible)? > > The result should look like > > ``` > P4 P1 > R3 R2 > > P5 P6 > P7 P8 > ``` > > where 5-8 should be on the back of 1-4 (double sided). > > Thanks in advacne for any help :) > > Malte > ___ > 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 > ___ Taco Hoekwater Elvenkind BV ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Yet another cornercase of ^^ handling in LuaMetaTeX
On 6/17/2020 12:10 PM, Marcel Fabian Krüger wrote: On Mon, Jun 15, 2020 at 04:16:06PM +0200, Hans Hagen wrote: ah, i removed some doee that i though was never seen; i'll add that bit again Beside that, I noticed a smaller weird thing when using LuaMetaTeX in ini mode without Context: The default mathcodes for digits and letters have their class and family values switched. So e.g. "A" has a default mathcode of 119537729=0x7200041, indicating class 1 and family 7, instead of the expected 31457345=0x1E00041, indicating class 7 and family 1. Of course this isn't really a problem because the format will normally assign new mathcodes anyway, but especially class 1 seems like a *very* unnatural default for normal letters. i'll check it (digits get class 0) ... indeed these defaults nowadays never kick in this way Thanks. Is there any way to convert either a token number (as given e.g. by t.tok) or a numeric cs identifier (as given e.g. by t.tok-cs_token_flag) to a token uservalue? In LuaTeX I used to use `token.new(tok, 0)` for this, but LuaMetaTeX seems to do more checking here. Indeed there is more checking. So, when you create a token you need to use a valid cmd code and a valid chr code. \ctxlua{ local t = token.new(string.byte("X"),token.command_id("letter")) tex.print(t) } The interface might evolve a bit more. Valid commands (at this moment) are: \ctxlua{ for k, v in ipairs(token.values("command")) do print(k,v) end } So, things like this should work \dimen3456=1234pt \dimen3467= \ctxlua{ local t = token.new(3456,token.command_id("register_dimen")) % local t = token.new("register_dimen",3456) % in upcoming version tex.sprint(t) } \the\dimen3467 As does: \ctxlua{ local t1 = token.new(string.byte("{"),token.command_id("letter")) local t2 = token.new(string.byte("}"),token.command_id("letter")) tex.print(t1) tex.print(t2) } Properties like cs_token_flag are not user level and have no meaning in the interface. In fact, the 'token-as-number' is just some representation with no intended meaning. Also, tokens that are problematic or can interfere badly might become inaccessible in future versions. (I don't expect many users to use the low level token interface anyway but it's there as part of the package.) 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 ___
Re: [NTG-context] using modeset
Thank you for your advice Hraban. From: Henning Hraban RammSent: Monday, 15 June 2020 20:23To: mailing list for ConTeXt usersSubject: Re: [NTG-context] using modeset > Am 12.06.2020 um 11:26 schrieb Jan Willem Flamma :> > Thank you Wolfgang, BPJ and Robert for your answers and feedback. Much appreciated. > > I will explorer the solutions that have been offered to extend my knowledge on using ConTeXt but at the same time I value the advice of not going down that route for large document. The project that pays my bills is technical documentation in several languages (in LaTeX3, setup by Marei). Each manual is constructed from many small building blocks of text. Each block is in its own file.That makes editing one whole manual somewhat tedious, but pays off if you recycle the same blocks. E.g. each block is only translated once, even if it appears in several manuals (think of security instructions or legal stuff that is the same in all). Each block has an explicite change date to keep track of the state of the different translations.The two main files of each product are one that contains just a few settings and one that pulls in all the needed building blocks. In this case all blocks with the same content in different languages are kept together in one directory (files have a language code). Another approach would be same structures and file names below a main language directory.If you have only one translation, the latter might be better. If you need to keep several translations in sync, the first approach might make more sense. Hraban___If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-contextwebpage : http://www.pragma-ade.nl / http://context.aanhet.netarchive : https://bitbucket.org/phg/context-mirror/commits/wiki : http://contextgarden.net___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] (no subject)
Hi, I'm new to context and found this ``` \installpagearrangement 1*4*reversed {\dosetuparrangement{2}{2}{4}{3}{3}% X,Y,Total,hcutmarks,vcutmarks \pusharrangedpageFOURSINGLESIDEDFOLDEDREVERSED\poparrangedpagesTWO\relax} \def\pusharrangedpageFOURSINGLESIDEDFOLDEDREVERSED#1% {\advancearrangedpageN \reportarrangedpage\arrangedpageN \ifcase\arrangedpageN \or \handlearrangedpageXandY{#1}010\arrangedpageA % 1 rot,hskip,vskip \or \handlearrangedpageXandY{#1}111\arrangedpageA % 2 \or \handlearrangedpageXandY{#1}101\arrangedpageA % 3 \or \handlearrangedpageXandY{#1}000\arrangedpageA % 4 \poparrangedpages \fi} \setuppapersize [A10][A8] \setuparranging [1*4*reversed] \setuplayout[margin=0pt, width=fit] \showframe \starttext \dorecurse{8}{\vbox to \textheight{\vfill\midaligned{\tfd ABC}\vfill}\page} \stoptext ``` imposition scheme in the garden wiki and tried it out. Now i noticed that this sets the imposition scheme for *every* page, but i would like to have a different scheme on the second page (1*4), how do i set that (if this is even possible)? The result should look like ``` P4 P1 R3 R2 P5 P6 P7 P8 ``` where 5-8 should be on the back of 1-4 (double sided). Thanks in advacne for any help :) Malte ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] No dots in \dotfill with new font
On 6/16/2020 11:13 PM, James Withers wrote: Many thanks Hans. That has made the dots appear. If possible I would like to use the dot from the same font, especially if using a font where full stops are diamond shaped rather than circular. Is there any way to map the dot from the external font so that it can be used by the \dotfill command? dotfill is actually a plain tex command using periods and spacing from the math font / mode ... (maybe we should redefine it to behave differently in text mode) you can use this: \definefiller [myfill] [symbol=., method=middle, width=.5\emwidth, leftmargin=.25em, rightmargin=.25em] \starttext text before \filler[myfill] text after \stoptext James On Tue, 16 Jun 2020 at 21:04, Hans Hagen wrote: On 6/16/2020 1:03 PM, James Withers wrote: Hello I've followed the instructions on the Context Garden wiki to make use of a different font. Unfortunately when using \dotfill the dots do not show up. My minimal example is below. I think this might be because \dotfill takes its dots from the math mode font which I have not set up correctly. Grateful for any assistance James \starttypescript [cormorant] \definefontsynonym[Cormorant-Regular] [file:Cormorant-Regular] \stoptypescript \starttypescript [cormorant] \setups[font:fallback:serif] \definefontsynonym[Serif] [Cormorant-Regular] [features=default] \stoptypescript \starttypescript [cormorant] \definetypeface [cormorant] [rm] [serif] [cormorant] [default] \definetypeface [cormorant] [mm] [math] [cormorant] [default] \stoptypescript \setupbodyfont [cormorant] \starttext . text before dotfill\dotfill text after dotfill . \stoptext you need a math font \definetypeface [cormorant] [mm] [math] [pagella] [default] - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - -- - 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 ___