Re: [NTG-context] how to interrupt doublesided in particular instance
Thanks for that reminder Rik! Very timely! I had just noticed the missing chapters in the TOC :-) Julian On 7/5/20 12:33 am, Rik Kabel wrote: On 5/6/2020 00:54, jbf wrote: So simple, Wolfgang. Thanks. I had got close amid all the varieties I was trying out to achieve the same result. Perhaps my closest was: \setuphead[chapter][pagebreak=chapterverso], but it couldn't quite cut it! Julian On 6/5/20 1:57 pm, Wolfgang Schuster wrote: jbf schrieb am 06.05.2020 um 01:31: Hi list, I have a document set up in a standard way (\setuppagenumbering[alternative=doublesided]) to ensure that new chapters always begin on a recto page, but in one particular instance only, I want the new chapter to start on the next (verso) page instead of creating a blank then starting on the recto side. I thought I might have been able to force that with \page[no] immediately after the previous chapter concluded or before \chapter{My new chapter}, but this command is ignored (and may well be the wrong command to achieve what I want). Is there a way to interrupt the setup so the new chapter in this case can start on the verso page? Create a new heading for chapters which can start on left/right pages. \setuppagenumbering[alternative=doublesided] \definehead[mychapter][chapter] \setuphead[mychapter][page=yes] \starttext \chapter{Right page} \chapter{Right page} \mychapter{New page} \chapter{Right page} \stoptext Wolfgang ___ You may want the new /mychapter/ head to appear in the TOC and pdf bookmarks as well, so take a look at /\setupcombinedlist/ and /\placebookmarks/. -- Rik ___ 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 ___
[NTG-context] Retrieving original value of enviroment variable HOME
Hello, before I run ConTeXt, I set a (new) variable "HOME" to point to a particular directory. ConTeXt changes its value during startup - it sets its value to %USERPROFILE% - I guess it is to unify environment somehow for all platforms ConTeXt supports; probably here: data-ini.lua, ln. ~86 do local homedir = osgetenv(ostype == "windows" and 'USERPROFILE' or 'HOME') or '' if not homedir or homedir == "" then homedir = char(127) -- we need a value, later we wil trigger on it end homedir = file.collapsepath(homedir) ossetenv("HOME", homedir) -- can be used in unix cnf files << HERE ossetenv("USERPROFILE",homedir) -- can be used in windows cnf files environment.homedir = homedir end But anyway - would it be possible to store the original value of HOME environment variable (if set) before it gets changed during initialization - e.g. to a Lua table? - I would need to work with the original value in run-time (Win7 / WinX; ConTeXt MkIV). 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 / 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] how to interrupt doublesided in particular instance
On 5/6/2020 00:54, jbf wrote: So simple, Wolfgang. Thanks. I had got close amid all the varieties I was trying out to achieve the same result. Perhaps my closest was: \setuphead[chapter][pagebreak=chapterverso], but it couldn't quite cut it! Julian On 6/5/20 1:57 pm, Wolfgang Schuster wrote: jbf schrieb am 06.05.2020 um 01:31: Hi list, I have a document set up in a standard way (\setuppagenumbering[alternative=doublesided]) to ensure that new chapters always begin on a recto page, but in one particular instance only, I want the new chapter to start on the next (verso) page instead of creating a blank then starting on the recto side. I thought I might have been able to force that with \page[no] immediately after the previous chapter concluded or before \chapter{My new chapter}, but this command is ignored (and may well be the wrong command to achieve what I want). Is there a way to interrupt the setup so the new chapter in this case can start on the verso page? Create a new heading for chapters which can start on left/right pages. \setuppagenumbering[alternative=doublesided] \definehead[mychapter][chapter] \setuphead[mychapter][page=yes] \starttext \chapter{Right page} \chapter{Right page} \mychapter{New page} \chapter{Right page} \stoptext Wolfgang ___ You may want the new /mychapter/ head to appear in the TOC and pdf bookmarks as well, so take a look at /\setupcombinedlist/ and /\placebookmarks/. -- Rik ___ 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] conflict between colored emoji and save/restore
When using a colored emoji font directly after a save/restore pair in context mkiv following text gets lost: \pdfvariable compresslevel=0 \font\fontB={file:seguiemj.ttf:mode=node;+colr;} \starttext \pdfextension save\relax \pdfextension restore\relax {\fontB \char"2603} % is not there \stoptext The problem is that the coordinate transformation from the restore ends inside the emoji code: /Span << /ActualText >> BDC q 0.000 g 1 0 0 1 -70.867 -714.33967 cm %< BT (Such an save/restore part is e.g. inserted with a scaled graphics: \externalfigure[tinypicture.pdf][width=1cm]) -- 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 / 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] Definition of \registerpagerange (Henning Hraban Ramm)
Am Mittwoch, den 06.05.2020, 06:55 +0200 schrieb ntg-context- requ...@ntg.nl: > This doesn’t answer your question, but I found: > > \setupregister[index][compress=yes] % 14, 15 becomes 14-15 > \setupregister[index][compress=text] % 14, 15 becomes 14f. > > To change the "f."/"ff." text, you’d use: > > \setuplabeltext[de][following:singular=sq.,following:plural=sqq.] > > This is defined in tex/context/base/mkiv/lang-txt.lua > and addressed in context/base/mkiv/strc-reg.mkiv in the definition of > \registerpagerange: > > \unexpanded\def\registerpagerange#1#2#3#4#5#6#7#8% #1:class > #2:processor content, content todo: -- configurable > {\pushcurrentregister{#1}% >\edef\p_pagenumber{\registerparameter\c!pagenumber}% >\ifx\p_pagenumber\v!no\else > \registerpageseparator > \global\setconstant\c_strc_registers_page_state\plusone > \dostarttagged\t!registerpagerange\empty > \dostarttagged\t!registerfrompage\empty > \withregisterpagecommand{#2}{#3}{#4}{#5}% > \dostoptagged > \ifconditional\c_strc_registers_following >\ifnum#3=\numexpr#6-1\relax > \labeltext{following:\s!singular}% >\else > \labeltext{following:\s!plural}% >\fi > \else >\registeronepagerangeseparator >\dostarttagged\t!registertopage\empty >\withregisterpagecommand{#2}{#6}{#7}{#8}% > \fi > \dostoptagged > \dostoptagged >\fi >\popcurrentregister} > > (see > https://source.contextgarden.net/tex/context/base/mkiv/strc-reg.mkiv?search=singular > ) > > > You should be able to combine the two "else" branches. Thank you for answering. I have had looked into this source before and tried exactly the same approach you descrived but I am on TeXlive 2019 where this is defined differently: \unexpanded\def\registerpagerange#1#2#3#4#5#6#7#8% #1:class #2:processor content, content todo: -- configurable {\pushcurrentregister{#1}% \edef\p_pagenumber{\registerparameter\c!pagenumber}% \ifx\p_pagenumber\v!no\else \registerpageseparator \global\setconstant\c_strc_registers_page_state\plusone \dostarttagged\t!registerpagerange\empty \dostarttagged\t!registerfrompage\empty \withregisterpagecommand{#2}{#3}{#4}{#5}% \dostoptagged \registeronepagerangeseparator \dostarttagged\t!registertopage\empty \withregisterpagecommand{#2}{#6}{#7}{#8}% \dostoptagged \dostoptagged \fi \popcurrentregister} and, most importantly, does not work with this approach: \unexpanded\def\registerpagerange#1#2#3#4#5#6#7#8% #1:class #2:processor content, content todo: -- configurable { \pushcurrentregister{#1}% \edef\p_pagenumber{\registerparameter\c!pagenumber}% \ifx\p_pagenumber\v!no\else \registerpageseparator \global\setconstant\c_strc_registers_page_state\plusone \dostarttagged\t!registerpagerange\empty \dostarttagged\t!registerfrompage\empty \withregisterpagecommand{#2}{#3}{#4}{#5}% \dostoptagged \ifnum#3=\numexpr#6-1\relax f.% \else \registeronepagerangeseparator \dostarttagged\t!registertopage\empty \withregisterpagecommand{#2}{#6}{#7}{#8}% \fi \dostoptagged \dostoptagged \fi \popcurrentregister} May it be that parameters have changed since then? Best regards Stefan smime.p7s Description: S/MIME cryptographic signature ___ 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 ___