[NTG-context] header text on final page of section
I am using \title within frontmatter for an introduction. The \setupheadertexts for title (recto and verso pages) is: \setupheadertexts [{\hfill\getmarking[title]\hfill}][] [{\hfill\documentvariable{metadata:title}\hfill}][] Now, that setup (this time for [chapter]) works correctly for chapters in the main body of text, but for some reason that I am unaware of, in the case of the 'Introduction', I get a header text ('Introduction' is the text) where I should */except for the last page of the introduction/* (There are seven pages in the intro, so it is the 7th, therefore odd-numbered page that is missing the header). I would like to understand why this is happening and, of course, be able to adjust something so that I do get the header on that page, as I do for the other pages. Julian ___ 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] Page number 0 in Table of Contents with makeup
On 2020-08-11, Pablo Rodriguez wrote: > On 8/11/20 10:11 PM, Nicola wrote: >> Consider this example: >> >> \definemakeup[toc][align=middle] >> \setuppagenumbering[alternative=doublesided] >> \starttext >> \startfrontmatter >> \startmakeup[toc] >> \placecontent >> \stopmakeup >> %\setuppagenumber[number=1] >> \startchapter[title={A}]\stopchapter >> \startchapter[title={B}]\stopchapter >> \stopfrontmatter >> \stoptext >> >> The first entry in the ToC has page number 0. I can fix it by >> uncommenting the commented line or by removing the makeup. Is this >> expected behaviour? If so, why? > > Hi Nicola, > > makeups have pagestate set to stop by default. > > \definemakeup[toc][align=middle, pagestate=start] solves your issue. > > I hope it helps, Yes, it does! Thanks, Nicola ___ 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] Help on tweaking alignment, page numbers and ToC
On 2020-08-11, Pablo Rodriguez wrote: > On 8/11/20 9:24 PM, Nicola wrote: >> Thank Pablo, Wolfgang, >> I have learned more by reading your replies than by myself in the rest >> of the afternoon. > > Hi Nicola, > > if you found replies useful, please update the wiki (this may help others). > >> Just one more thing: >> [...] >> I'd prefer all the titles to be aligned: >> >> Preface >>I XYZ >> ... >> VIII XYZ >> ... >> >> I have tried to do my homework by playing with \setuphead, but I am >> afraid I need your help on this. > > Sorry, but too tired to type a sample. > > How about setting distance for \setuplist[chapter] in the sectionblock > frontpart with the desired width? That does not seem to change the layout, unfortunately. I have tried with `margin` and `aligntitle` as well: \setuplist[chapter][distance=1cm,aligntitle=yes] \startsectionblockenvironment[frontpart] \setuplist[chapter][aligntitle=yes,margin=2cm,distance=2cm] \stopsectionblockenvironment I'll take a fresh look tomorrow. Nicola ___ 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] Page number 0 in Table of Contents with makeup
On 8/11/20 10:11 PM, Nicola wrote: > Consider this example: > > \definemakeup[toc][align=middle] > \setuppagenumbering[alternative=doublesided] > \starttext > \startfrontmatter > \startmakeup[toc] > \placecontent > \stopmakeup > %\setuppagenumber[number=1] > \startchapter[title={A}]\stopchapter > \startchapter[title={B}]\stopchapter > \stopfrontmatter > \stoptext > > The first entry in the ToC has page number 0. I can fix it by > uncommenting the commented line or by removing the makeup. Is this > expected behaviour? If so, why? Hi Nicola, makeups have pagestate set to stop by default. \definemakeup[toc][align=middle, pagestate=start] solves your issue. I hope it helps, Pablo -- http://www.ousia.tk ___ 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] Help on tweaking alignment, page numbers and ToC
On 8/11/20 8:34 PM, Wolfgang Schuster wrote: > Pablo Rodriguez schrieb am 11.08.2020 um 14:53: >> On 8/11/20 1:32 PM, Nicola wrote: >> [...] >>> 3. Suppress page numbers and headers in all blank pages. >> >> Break pages with \page[yes, blank]. > > Not the best solution for empty pages before a new chapter. When I copied the code, I removed right from the \page. Now I realize that without page, that pagebreak is almost useless. >> I never used environments (other than the ones to typeset XML sources), >> so this is my best option 😅. > > A environment is nothing more than a external file for the style, the > only difference between \input{...} and \environment[...] is that > ConTeXt loads environment files only once. Many thanks for the explanation. Pablo -- http://www.ousia.tk ___ 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] Page number 0 in Table of Contents with makeup
Consider this example: \definemakeup[toc][align=middle] \setuppagenumbering[alternative=doublesided] \starttext \startfrontmatter \startmakeup[toc] \placecontent \stopmakeup %\setuppagenumber[number=1] \startchapter[title={A}]\stopchapter \startchapter[title={B}]\stopchapter \stopfrontmatter \stoptext The first entry in the ToC has page number 0. I can fix it by uncommenting the commented line or by removing the makeup. Is this expected behaviour? If so, why? Nicola ___ 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] Help on tweaking alignment, page numbers and ToC
On 8/11/20 9:24 PM, Nicola wrote: > Thank Pablo, Wolfgang, > I have learned more by reading your replies than by myself in the rest > of the afternoon. Hi Nicola, if you found replies useful, please update the wiki (this may help others). > Just one more thing: > [...] > I'd prefer all the titles to be aligned: > > Preface >I XYZ > ... > VIII XYZ > ... > > I have tried to do my homework by playing with \setuphead, but I am > afraid I need your help on this. Sorry, but too tired to type a sample. How about setting distance for \setuplist[chapter] in the sectionblock frontpart with the desired width? I hope it helps, Pablo -- http://www.ousia.tk ___ 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] Help on tweaking alignment, page numbers and ToC
Thank Pablo, Wolfgang, I have learned more by reading your replies than by myself in the rest of the afternoon. Just one more thing: >>> 1. Increase the space between Roman numbers and titles in the ToC. >> >> distance with dimension is the key in \setuplist. > > Correct but it's also important to set "width" to a value which is large > enough to fit the number. Chapters in the front matter have no number, so the Preface gets aligned with the numbers of the other chapters: Preface I XYZ ... VIII XYZ ... I'd prefer all the titles to be aligned: Preface I XYZ ... VIII XYZ ... I have tried to do my homework by playing with \setuphead, but I am afraid I need your help on this. Nicola ___ 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] Help on tweaking alignment, page numbers and ToC
Pablo Rodriguez schrieb am 11.08.2020 um 14:53: On 8/11/20 1:32 PM, Nicola wrote: Hi, first of all, let me say *thank you* for the vast improvements on ConTeXt Garden! Browsing the documentation and finding stuff is so much easier and pleasant than it used to be (also the site seems faster). Hi Nicola, Garulfo invested a lot of time and effort in the new wiki layout and contents. Taco is always improving the software that runs the wiki (and the source). Many thanks to them and to all other developers. Thanks to the docs, dropcaps and protrusion have no secrets for me, but I am still struggling with some basic tasks (see the document below): 0. Push text to the bottom of the text area (see copyright). Well, \setupalignment tweaks position in line (I’d rather say). Bottom isn’t an option there. Adding \null\vfill before the alignment does the job. I think a makeup environment fits here better. \definemakeup [copyright] [page=yes, pagestate=start, doublesided=no, align=flushright, bottom=] \startmakeup[copyright] Copyright © 2020 Author \stopmakeup 1. Increase the space between Roman numbers and titles in the ToC. distance with dimension is the key in \setuplist. Correct but it's also important to set "width" to a value which is large enough to fit the number. 2. Vertically center the ToC (wrt to the text area). Use a makeup for the TOC (if and only if it takes a single page). 3. Suppress page numbers and headers in all blank pages. Break pages with \page[yes, blank]. Not the best solution for empty pages before a new chapter. \setuphead [chapter] [page={yes,header,footer,right}] 4. Suppress headers in the front matter. This would be my educated guess: \startsectionblockenvironment[frontpart] \setupheader[state=stop] \stopsectionblockenvironment 5. Style and position page numbers differently in the front and body matter (e.g., centered only in the front matter). Alignment only (style comes with the proper option 😉): \setuppagenumbering[location={bottom, inmargin}] \startsectionblockenvironment[frontpart] \setuppagenumbering[location={bottom, centered}] \stopsectionblockenvironment As my full document uses environments, I would like most setups to be in the environment, if possible. E.g., is it possible to replace \setuphead[chapter][after={}] (see below) with an environment setup that applies only to the ToC? Either you create and set up a \chapter command for the TOC (such as \chapterTOC) to use it only once, or you create a sectionblock that you apply only for the TOC (and define the chapter settings for that sectionblock). I never used environments (other than the ones to typeset XML sources), so this is my best option 😅. A environment is nothing more than a external file for the style, the only difference between \input{...} and \environment[...] is that ConTeXt loads environment files only once. 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] Help on tweaking alignment, page numbers and ToC
On 8/11/20 1:32 PM, Nicola wrote: > Hi, > first of all, let me say *thank you* for the vast improvements on > ConTeXt Garden! Browsing the documentation and finding stuff is so > much easier and pleasant than it used to be (also the site seems > faster). Hi Nicola, Garulfo invested a lot of time and effort in the new wiki layout and contents. Taco is always improving the software that runs the wiki (and the source). Many thanks to them and to all other developers. > Thanks to the docs, dropcaps and protrusion have no secrets for me, > but I am still struggling with some basic tasks (see the document > below): > > 0. Push text to the bottom of the text area (see copyright). Well, \setupalignment tweaks position in line (I’d rather say). Bottom isn’t an option there. Adding \null\vfill before the alignment does the job. > 1. Increase the space between Roman numbers and titles in the ToC. distance with dimension is the key in \setuplist. > 2. Vertically center the ToC (wrt to the text area). Use a makeup for the TOC (if and only if it takes a single page). > 3. Suppress page numbers and headers in all blank pages. Break pages with \page[yes, blank]. > 4. Suppress headers in the front matter. This would be my educated guess: \startsectionblockenvironment[frontpart] \setupheader[state=stop] \stopsectionblockenvironment > 5. Style and position page numbers differently in the front and body >matter (e.g., centered only in the front matter). Alignment only (style comes with the proper option 😉): \setuppagenumbering[location={bottom, inmargin}] \startsectionblockenvironment[frontpart] \setuppagenumbering[location={bottom, centered}] \stopsectionblockenvironment > As my full document uses environments, I would like most setups to > be in the environment, if possible. E.g., is it possible to replace > > \setuphead[chapter][after={}] > > (see below) with an environment setup that applies only to the ToC? Either you create and set up a \chapter command for the TOC (such as \chapterTOC) to use it only once, or you create a sectionblock that you apply only for the TOC (and define the chapter settings for that sectionblock). I never used environments (other than the ones to typeset XML sources), so this is my best option 😅. I hope it helps, Pablo -- http://www.ousia.tk ___ 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] Help on tweaking alignment, page numbers and ToC
Hi, first of all, let me say *thank you* for the vast improvements on ConTeXt Garden! Browsing the documentation and finding stuff is so much easier and pleasant than it used to be (also the site seems faster). Thanks to the docs, dropcaps and protrusion have no secrets for me, but I am still struggling with some basic tasks (see the document below): 0. Push text to the bottom of the text area (see copyright). 1. Increase the space between Roman numbers and titles in the ToC. 2. Vertically center the ToC (wrt to the text area). 3. Suppress page numbers and headers in all blank pages. 4. Suppress headers in the front matter. 5. Style and position page numbers differently in the front and body matter (e.g., centered only in the front matter). As my full document uses environments, I would like most setups to be in the environment, if possible. E.g., is it possible to replace \setuphead[chapter][after={}] (see below) with an environment setup that applies only to the ToC? Nicola %%% \definepapersize[lsda][width=128.4mm,height=198.3mm] \setuppapersize[lsda] \setuplayout[ backspace=22.9mm, width=90.3mm, topspace=8.9mm, height=181.1mm, header=4mm, headerdistance=6.4mm, footerdistance=6.4mm, footer=4mm, leftmargin=15.2mm, leftmargindistance=0mm, rightmargindistance=0mm, rightmargin=15.2mm, ] \setuplabeltext[it][chapter=] \setuphead[chapter][ header=empty, alternative=middle, conversion=Romannumerals, numbercommand=\groupedcommand{\blank[20mm]}{\blank[10mm]}, after={\blank[3cm]}, ] \setupheadtext[content=] \setupheadertexts[] \setupheadertexts[\setups{text a}][][][\setups{text b}] \startsetups[text a] \rlap{whatever} \hfill \getmarking[chapter] \hfill \llap{whatever} \stopsetups \startsetups[text b] \rlap{} \hfill Some text goes here \hfill \llap{} \stopsetups \setuppagenumbering[ alternative=doublesided, location={text,footer,right}, style=\tfx ] \definestructureconversionset[frontpart:pagenumber][][romannumerals] \definestructureconversionset[bodypart:pagenumber] [][numbers] \starttext \startfrontmatter \page[even] \startalignment[bottom,flushright] Copyright © 2020 Author \stopalignment \start \setuphead[chapter][after={}] \completecontent \stop \page[odd] \startchapter[title={Preface}]\input{knuth}\stopchapter \stopfrontmatter \startbodymatter \setuppagenumber[number=1] \dorecurse{10}{\startchapter[title={XYZ}]\input{tufte}\stopchapter} \stopbodymatter \stoptext %%% ___ 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] About testing rest of space on a page
Hello Taco and Wolfgang! Thank you both for the reply and input. — I am going to play :-) Kind regards Willi > On 30 Jul 2020, at 21:25, Wolfgang Schuster > wrote: > > Taco Hoekwater schrieb am 30.07.2020 um 09:05: >>> On 29 Jul 2020, at 23:08, Willi Egger wrote: >>> >>> Good evening! >>> >>> I have a bookproject in which sections are ended with a small graphical >>> element. Now as usual this graphic might be moved to a new page which is of >>> course unwanted. >>> >>> At this moment I have: >>> >>> \startsetups endsection >>> \vfil >>> \placefigure[middle,none][]{}{\externalfigure[ornament2][height=2\lineheight]} >>> \stopsection >>> \stopsetups >>> >>> \def\stopmysection{\setups{endsection}} >>> >>> I use then instead of \stopsection the \stopmysection. This works except >>> that the ornament is in some cases placed on the next page. — My question >>> is whether it is possible to do a \testpage and evaluate the result hereof >>> and then using either the placement of the ornament and stop the section or >>> just end the section without ornament? >> You can put your setups *inside* the test: >> >> \definepagechecker >>[willi] >>[method=1,before=,after=,inbetween={\setups{endsection}}] >> >> \def\stopmysection >>{\checkpage[willi][lines=4]} >> >> The before=/after= pair is used when a page break is forced by the test, >> inbetween= is used if there is no forced break. >> >> (\testpage is a wrapper around \checkpage: >> https://source.contextgarden.net/page-brk.mkiv?search=testpage#l564 ) > > No need for a new \stop command. > > \setuphead > [section] > [aftersection={\checkpage[willi][lines=4]}] > > 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] About testing rest of space on a page
Taco Hoekwater schrieb am 30.07.2020 um 09:05: On 29 Jul 2020, at 23:08, Willi Egger wrote: Good evening! I have a bookproject in which sections are ended with a small graphical element. Now as usual this graphic might be moved to a new page which is of course unwanted. At this moment I have: \startsetups endsection \vfil \placefigure[middle,none][]{}{\externalfigure[ornament2][height=2\lineheight]} \stopsection \stopsetups \def\stopmysection{\setups{endsection}} I use then instead of \stopsection the \stopmysection. This works except that the ornament is in some cases placed on the next page. — My question is whether it is possible to do a \testpage and evaluate the result hereof and then using either the placement of the ornament and stop the section or just end the section without ornament? You can put your setups *inside* the test: \definepagechecker [willi] [method=1,before=,after=,inbetween={\setups{endsection}}] \def\stopmysection {\checkpage[willi][lines=4]} The before=/after= pair is used when a page break is forced by the test, inbetween= is used if there is no forced break. (\testpage is a wrapper around \checkpage: https://source.contextgarden.net/page-brk.mkiv?search=testpage#l564 ) No need for a new \stop command. \setuphead [section] [aftersection={\checkpage[willi][lines=4]}] 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] About testing rest of space on a page
> On 29 Jul 2020, at 23:08, Willi Egger wrote: > > Good evening! > > I have a bookproject in which sections are ended with a small graphical > element. Now as usual this graphic might be moved to a new page which is of > course unwanted. > > At this moment I have: > > \startsetups endsection > \vfil > > \placefigure[middle,none][]{}{\externalfigure[ornament2][height=2\lineheight]} > \stopsection > \stopsetups > > \def\stopmysection{\setups{endsection}} > > I use then instead of \stopsection the \stopmysection. This works except that > the ornament is in some cases placed on the next page. — My question is > whether it is possible to do a \testpage and evaluate the result hereof and > then using either the placement of the ornament and stop the section or just > end the section without ornament? You can put your setups *inside* the test: \definepagechecker [willi] [method=1,before=,after=,inbetween={\setups{endsection}}] \def\stopmysection {\checkpage[willi][lines=4]} The before=/after= pair is used when a page break is forced by the test, inbetween= is used if there is no forced break. (\testpage is a wrapper around \checkpage: https://source.contextgarden.net/page-brk.mkiv?search=testpage#l564 ) Best wishes, Taco ___ 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] About testing rest of space on a page
Good evening! I have a bookproject in which sections are ended with a small graphical element. Now as usual this graphic might be moved to a new page which is of course unwanted. At this moment I have: \startsetups endsection \vfil \placefigure[middle,none][]{}{\externalfigure[ornament2][height=2\lineheight]} \stopsection \stopsetups \def\stopmysection{\setups{endsection}} I use then instead of \stopsection the \stopmysection. This works except that the ornament is in some cases placed on the next page. — My question is whether it is possible to do a \testpage and evaluate the result hereof and then using either the placement of the ornament and stop the section or just end the section without ornament? Kind regards Willi ___ 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] question on page transitions
Dear list, I have a question about page transitions (lines 297-304 from scrn-pag.mkvi): \def\scrn_transitions_set_indeed {\begingroup \edef\currentinteractionscreendelay{\interactionscreenparameter\c!delay}% \clf_setpagetransition n {\scrn_transitions_list}% delay \ifx\currentinteractionscreendelay\v!none \zerocount\else\currentinteractionscreendelay\fi \relax \endgroup} I wonder whether the "delay" option in \setupinteractionscreen defines the number of seconds for the page or for the transition. From what I read in the code above, I would say that the duration is defined for the transition itself. Inspecting the output PDF code in generated documents, the duration is set for the page. In PDF code. /Page <> sets the number of seconds for the page (https://www.adobe.com/content/dam/acom/en/devnet/pdf/PDF32000_2008.pdf#search=duration). /Page <> >> sets the number of seconds for the transition (https://www.adobe.com/content/dam/acom/en/devnet/pdf/PDF32000_2008.pdf#nameddest=G11.2295795). With the followling sample: \setuppapersize[A9,landscape] \setupinteraction[state=start] \setupinteractionscreen[option=max, delay=5] \setuppagetransitions[random] \setupbodyfont[50pt] \starttext \dorecurse{2}{% \startmakeup[page][style=\bf\ss, align=center] \recurselevel \stopmakeup% } \stoptext The output PDF document may contain a /Page object such as: 6 0 obj << /Contents 4 0 R /Dur 5 /Trans << /Di 90 /M /O /S /Fly >> /Type /Page >> endobj This forces the viewer to advance the page after 5s. To have a transition duration of 5s, it should read: 6 0 obj << /Contents 4 0 R /Trans << /D 5 /Di 90 /M /O /S /Fly >> /Type /Page >> endobj https://www.adobe.com/content/dam/acom/en/devnet/pdf/PDF32000_2008.pdf#nameddest=G11.2104292 shows the difference between /Dur and /D. Could anyone confirm whether this should be fixed (or I’m missing something)? Many thanks for your help, Pablo -- http://www.ousia.tk ___ 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] \blank space at the top of a page
Many thanks Wolfgang I tried using force but that caused a problem with aligning to the grid, not included in my original example, but included below. I think I have seen \mbox used in this way in Latex, so was trying to find a quick solution. James \setuplayout[grid=yes] \showgrid \setuphead[chapter][before={\blank[4*big]}] \starttext \startchapter[title={No space above this chapter}] chapter text etc \stopchapter \setuphead[chapter][before={\blank[4*big,force]}] \startchapter[title={Chapter with spacing but out of line with grid}] chapter text etc \stopchapter \setuphead[chapter][before={\blank[4*line,force]}] \startchapter[title={Chapter with spacing but out of line with grid}] chapter text etc \stopchapter \stoptext On Thu, 18 Jun 2020 at 16:44, Wolfgang Schuster wrote: > > James Withers schrieb am 18.06.2020 um 17:35: > > Hello list > > > > I have been trying to find a solution to how to insert blank lines > > before a chapter heading at the start of a page. In the following > > example the \blank[4*big] is ignored. The solution I've found is to > > add an empty box using \mbox{} before the \blank command. > > I'm curious where the use of \mbox is documented. > > > Is this the right way to do it or is there a more elegant way that I > > am missing? > > > > Many thanks > > > > James > > > > > > \setuphead[chapter][before={\blank[4*big]}] > > You have to add the "force" keyword to \blank because TeX ignores by > default vertical space at the begin of a page. > > \setuphead[chapter][before={\blank[force,4*big]}] > > 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] \blank space at the top of a page
James Withers schrieb am 18.06.2020 um 17:35: Hello list I have been trying to find a solution to how to insert blank lines before a chapter heading at the start of a page. In the following example the \blank[4*big] is ignored. The solution I've found is to add an empty box using \mbox{} before the \blank command. I'm curious where the use of \mbox is documented. Is this the right way to do it or is there a more elegant way that I am missing? Many thanks James \setuphead[chapter][before={\blank[4*big]}] You have to add the "force" keyword to \blank because TeX ignores by default vertical space at the begin of a page. \setuphead[chapter][before={\blank[force,4*big]}] 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 ___
[NTG-context] \blank space at the top of a page
Hello list I have been trying to find a solution to how to insert blank lines before a chapter heading at the start of a page. In the following example the \blank[4*big] is ignored. The solution I've found is to add an empty box using \mbox{} before the \blank command. Is this the right way to do it or is there a more elegant way that I am missing? Many thanks James \setuphead[chapter][before={\blank[4*big]}] \starttext \startchapter[title={No space above this chapter}] chapter text etc \stopchapter \setuphead[chapter][before={\mbox{}\blank[4*big]}] \startchapter[title={Chapter with the right spacing}] chapter text etc \stopchapter \stoptext ___ 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] wrong page for annotation and \pagenumber
On Tue, 16 Jun 2020, Pablo Rodriguez wrote: On 6/16/20 4:58 PM, Wolfgang Schuster wrote: Pablo Rodriguez schrieb am 16.06.2020 um 16:31: [...] I’m afraid that you get the same result, so there may be a bug there. There is no bug. When you take a look at my pagenumber example you see a few lines at the top show the number of the previous page, this happens because TeX collects more than necessary which means in your example above the layer is placed when TeX was still on the first page. Many thanks for your reply, Wolfgang. I’m afraid that TeX is too tricky for me in that case (or I simply think that it is misbehaving there). In your example you can add \testpage to \section to force a page break when there isn't enough space available to place the heading, this moves also the layer placement to the next page. I’m afraid this doesn’t work with my real document. I need another approach. This sample reflects my problem: \setupinteraction[state=start] %~ \showframe\showgrid \starttext \dorecurse{41}{one line\par} \ \comment[location={rightmargin}]{comment} \stoptext Since layers are problematic for the task, I insert the comments right after the text (which actually comes from \xmlflush{#1} [XML sources]). I’m afraid that the paragraph before \comment comes from \xmlflush, so I cannot avoid it. This is unproblematic for most cases, but the sample above displays the problem of adding a comment in a new paragraph. It might add a new page. To avoid this issue: how could I prevent the pagebreak before \comment and the addition of a pagebreak above? If that were possible, I could add a \blank[-2*line] that would place the comment right. Try \removeunwantedwhitespace or \blank[samepage] Aditya___ 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] wrong page for annotation and \pagenumber
On 6/16/20 4:58 PM, Wolfgang Schuster wrote: > Pablo Rodriguez schrieb am 16.06.2020 um 16:31: >> [...] >> I’m afraid that you get the same result, so there may be a bug there. > > There is no bug. When you take a look at my pagenumber example you see a > few lines at the top show the number of the previous page, this happens > because TeX collects more than necessary which means in your example > above the layer is placed when TeX was still on the first page. Many thanks for your reply, Wolfgang. I’m afraid that TeX is too tricky for me in that case (or I simply think that it is misbehaving there). > In your example you can add \testpage to \section to force a page break > when there isn't enough space available to place the heading, this moves > also the layer placement to the next page. I’m afraid this doesn’t work with my real document. I need another approach. This sample reflects my problem: \setupinteraction[state=start] %~ \showframe\showgrid \starttext \dorecurse{41}{one line\par} \ \comment[location={rightmargin}]{comment} \stoptext Since layers are problematic for the task, I insert the comments right after the text (which actually comes from \xmlflush{#1} [XML sources]). I’m afraid that the paragraph before \comment comes from \xmlflush, so I cannot avoid it. This is unproblematic for most cases, but the sample above displays the problem of adding a comment in a new paragraph. It might add a new page. To avoid this issue: how could I prevent the pagebreak before \comment and the addition of a pagebreak above? If that were possible, I could add a \blank[-2*line] that would place the comment right. Many thanks for your help, Pablo -- http://www.ousia.tk ___ 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] wrong page for annotation and \pagenumber
Pablo Rodriguez schrieb am 16.06.2020 um 16:31: On 6/16/20 4:53 AM, Rudolf Bahr wrote: [...] Hi Pablo, I fear I don't understand what issue you mean, therefore I append my output here. Many thanks for your reply, Rudolf. The issue is that the layer is placed on the first page, where it should be placed on the second page. This sample shows thie problem in a simpler way: \definelayer[whatever] [x=3em, y=3em] \setupbackgrounds[page][background=whatever] \setuphead [section] [before={\testpage[2]\blank[2*big]}] \starttext \dorecurse{18}{\section{Section}} just a line \setlayerframed[whatever][foregroundstyle=\bf\ss] {layer on the last page?} \stoptext I’m afraid that you get the same result, so there may be a bug there. There is no bug. When you take a look at my pagenumber example you see a few lines at the top show the number of the previous page, this happens because TeX collects more than necessary which means in your example above the layer is placed when TeX was still on the first page. In your example you can add \testpage to \section to force a page break when there isn't enough space available to place the heading, this moves also the layer placement to the next page. 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] wrong page for annotation and \pagenumber
On 6/16/20 4:53 AM, Rudolf Bahr wrote: > [...] > Hi Pablo, > > I fear I don't understand what issue you mean, therefore I append my output > here. Many thanks for your reply, Rudolf. The issue is that the layer is placed on the first page, where it should be placed on the second page. This sample shows thie problem in a simpler way: \definelayer[whatever] [x=3em, y=3em] \setupbackgrounds[page][background=whatever] \starttext \dorecurse{18}{\section{Section}} just a line \setlayerframed[whatever][foregroundstyle=\bf\ss] {layer on the last page?} \stoptext I’m afraid that you get the same result, so there may be a bug there. Many thanks for your help, Pablo -- http://www.ousia.tk ___ 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] wrong page for annotation and \pagenumber
On Mon, Jun 15, 2020 at 02:52:49PM +0200, Pablo Rodriguez wrote: > Dear list, > > I have the following number with wrong annotation placement and wrong > page number, which would be both on the second page: > > \setupinteraction[state=start] > \definelayer[pgnumber] > \setupbackgrounds[page][background=pgnumber] > \starttext > \placelist[section][alternative=d] > \dorecurse{16}{\section{Section}} > \pagenumber/\lastpagenumber > \setlayer[pgnumber] > {\comment{\pagenumber}} > \stoptext > > Could anyone confirm the issue? > > Many thanks for your help, > > Pablo Hi Pablo, I fear I don't understand what issue you mean, therefore I append my output here. I'm using: LuaMetaTeX, Version 2.04.02 ConTeXt ver: 2020.02.17 19:36 MKIV beta fmt: 2020.2.23 Best wishes, Rudolf annotation-u-pagenumber.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 / 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] wrong page for annotation and \pagenumber
On 6/15/20 4:09 PM, Wolfgang Schuster wrote: > Pablo Rodriguez schrieb am 15.06.2020 um 14:52: >> Dear list, >> >> I have the following number with wrong annotation placement and wrong >> page number, which would be both on the second page: >> [...] >> Could anyone confirm the issue? > > \pagenumber is only reliable headers/footer texts or page backgrounds, > for everything else you need a multi pass mechanism (save the page > number in the first run and provide it in the second). Many thanks for your reply, Wolfgang. I thought this was caused by the deployment of "\placelist[section][alternative=d]". But my new sample shows clearly that this isn’t the cause. My question is now is how to get the right page for the layer in this sample: \definelayer[whatever] [x=3em, y=3em] \setupbackgrounds[page][background=whatever] \starttext \dorecurse{18}{\section{Section}} just a line \setlayerframed[whatever][foregroundstyle=\bf\ss] {layer on the last page?} \stoptext Many thanks for your help, Pablo -- http://www.ousia.tk ___ 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] wrong page for annotation and \pagenumber
Pablo Rodriguez schrieb am 15.06.2020 um 14:52: Dear list, I have the following number with wrong annotation placement and wrong page number, which would be both on the second page: \setupinteraction[state=start] \definelayer[pgnumber] \setupbackgrounds[page][background=pgnumber] \starttext \placelist[section][alternative=d] \dorecurse{16}{\section{Section}} \pagenumber/\lastpagenumber \setlayer[pgnumber] {\comment{\pagenumber}} \stoptext Could anyone confirm the issue? \pagenumber is only reliable headers/footer texts or page backgrounds, for everything else you need a multi pass mechanism (save the page number in the first run and provide it in the second). \setuppapersize[A6] \definepagestate[pagenumber] \starttext \subject{\tex{pagenumber}} \dorecurse{50}{\twodigits{\recurselevel}: \pagenumber\par} \page \subject{\tex{pagestaterealpage}} \dorecurse{50} {\twodigits{\recurselevel}: \setpagestate[pagenumber]% \pagestaterealpage{pagenumber}{\recurselevel}\par} \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 ___
[NTG-context] wrong page for annotation and \pagenumber
Dear list, I have the following number with wrong annotation placement and wrong page number, which would be both on the second page: \setupinteraction[state=start] \definelayer[pgnumber] \setupbackgrounds[page][background=pgnumber] \starttext \placelist[section][alternative=d] \dorecurse{16}{\section{Section}} \pagenumber/\lastpagenumber \setlayer[pgnumber] {\comment{\pagenumber}} \stoptext Could anyone confirm the issue? Many thanks for your help, Pablo -- http://www.ousia.tk ___ 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] Wrong page numbers in frontmatter
Thanks kindly, Wolfgang. On Mon, 15 Jun 2020 at 00:49, Wolfgang Schuster < wolfgang.schuster.li...@gmail.com> wrote: > Jack Steyn schrieb am 14.06.2020 um 16:46: > > Hi, > > > > I'm not sure why the following MWE produces a document where page 2 > > has the page number i instead of ii. It seems to have something to do > > with the use of makeup. I was using it to create a vertically centered > > title page. Is there a better way of doing this which will give the > > correct page numbers? > > > > Best, > > > > Jack > > > > \definestructureconversionset[frontpart:pagenumber][][romannumerals] > > \definestructureconversionset[bodypart:pagenumber][][numbers] > > > > \definemakeup[titlepage][align=middle] > > \definemakeup[titlepage][align=middle,pagestate=start] > > 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] Wrong page numbers in frontmatter
Jack Steyn schrieb am 14.06.2020 um 16:46: Hi, I'm not sure why the following MWE produces a document where page 2 has the page number i instead of ii. It seems to have something to do with the use of makeup. I was using it to create a vertically centered title page. Is there a better way of doing this which will give the correct page numbers? Best, Jack \definestructureconversionset[frontpart:pagenumber][][romannumerals] \definestructureconversionset[bodypart:pagenumber][][numbers] \definemakeup[titlepage][align=middle] \definemakeup[titlepage][align=middle,pagestate=start] 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 ___
[NTG-context] Wrong page numbers in frontmatter
Hi, I'm not sure why the following MWE produces a document where page 2 has the page number i instead of ii. It seems to have something to do with the use of makeup. I was using it to create a vertically centered title page. Is there a better way of doing this which will give the correct page numbers? Best, Jack \definestructureconversionset[frontpart:pagenumber][][romannumerals] \definestructureconversionset[bodypart:pagenumber][][numbers] \definemakeup[titlepage][align=middle] \starttext \startfrontmatter \startmakeup[titlepage] Title \stopmakeup test \stopfrontmatter \startbodymatter \setcounter[userpage][1] test \stopbodymatter \stoptext ___ 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] problem with counters (page)
Alan Bowen schrieb am 10.06.2020 um 17:04: Thanks, Taco! That works in my mwe. I added way=bytext in my env file and the output is just what I need. Why don't you use sub pages? \starttext %\setupsubpagenumber[start=5]\resetsubpagenumber \setcounter[subpage][5] \startTEXpage \samplefile{ward} \blank \midaligned{\subpagenumber} \stopTEXpage \startTEXpage \samplefile{ward} \blank \midaligned{\subpagenumber} \stopTEXpage \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] problem with counters (page)
Thanks, Taco! That works in my mwe. I added way=bytext in my env file and the output is just what I need. Best, Alan On Wed, Jun 10, 2020 at 9:44 AM Taco Hoekwater wrote: > Hi Alan, > > Sorry, I should have actually tried your MWE. You do *not* want > way=bypage here, as that resets the counter to one at the start > of the next page (it is useful for footnotes that are numbered > per-page, but not for actual page counters). > > > \definecounter[volpage][type=page] > \starttext > \setcounter[volpage][5] > \dorecurse{3}{\startTEXpage[offset=2pc] > \input ward > \blank[medium] > > \centerline{\red\tfa\rawcounter[volpage]\incrementcounter[volpage]} > \stopTEXpage} > \stoptext > > > > On 10 Jun 2020, at 15:05, Alan Bowen wrote: > > > > Hi, Taco— > > > > Thanks for the suggestion. I have tried it with \incrementcounter before > and after the TEXpage. Sadly, neither worked. > > > > This mwe is an attempt to capture the failure of the following in > processing a product with numerous components: > > > > \definecounter[volpage][type=page, way=bypage] > > \setupfootertexts[text] > > [] > > [{\centerline{\raise\NumberRaise\hbox{\rawcounter[volpage]}} > > \incrementcounter[volpage]}] > > [{\centerline{\raise\NumberRaise\hbox{\rawcounter[volpage]}} > > \incrementcounter[volpage]}] > > [] > > > > If your suggestion had worked, I would have had difficulty in applying > it. > > > > Alan > > > > On Wed, Jun 10, 2020 at 3:14 AM Taco Hoekwater > wrote: > > Hi, > > > > Incrementing the counter outside of the TEXpage should work. > > > > Best wishes, > > Taco > > > > > On 9 Jun 2020, at 23:34, Alan Bowen wrote: > > > > > > My efforts to set up a new page counter in the footertexts of a book > are not proving successful. The following code shows the nature of the > problem. > > > > > > \definecounter[volpage][type=page, way=bypage] > > > \starttext > > > \setcounter[volpage][5] > > > \dorecurse{3}{\startTEXpage[offset=2pc] > > > \input ward > > > \blank[medium] > > > > \centerline{\red\tfa\rawcounter[volpage]\incrementcounter[volpage]} > > > \stopTEXpage} > > > \stoptext > > > > > > As you will see, the counter is not incremented on pages 2 and 3. > > > > > > I expect that I have missed something important. But what? > > > > > > Alan > > > > ___ > > > 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 > > > ___ > > > ___ > > 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
Re: [NTG-context] problem with counters (page)
Hi Alan, Sorry, I should have actually tried your MWE. You do *not* want way=bypage here, as that resets the counter to one at the start of the next page (it is useful for footnotes that are numbered per-page, but not for actual page counters). \definecounter[volpage][type=page] \starttext \setcounter[volpage][5] \dorecurse{3}{\startTEXpage[offset=2pc] \input ward \blank[medium] \centerline{\red\tfa\rawcounter[volpage]\incrementcounter[volpage]} \stopTEXpage} \stoptext > On 10 Jun 2020, at 15:05, Alan Bowen wrote: > > Hi, Taco— > > Thanks for the suggestion. I have tried it with \incrementcounter before and > after the TEXpage. Sadly, neither worked. > > This mwe is an attempt to capture the failure of the following in processing > a product with numerous components: > > \definecounter[volpage][type=page, way=bypage] > \setupfootertexts[text] > [] > [{\centerline{\raise\NumberRaise\hbox{\rawcounter[volpage]}} > \incrementcounter[volpage]}] > [{\centerline{\raise\NumberRaise\hbox{\rawcounter[volpage]}} > \incrementcounter[volpage]}] > [] > > If your suggestion had worked, I would have had difficulty in applying it. > > Alan > > On Wed, Jun 10, 2020 at 3:14 AM Taco Hoekwater wrote: > Hi, > > Incrementing the counter outside of the TEXpage should work. > > Best wishes, > Taco > > > On 9 Jun 2020, at 23:34, Alan Bowen wrote: > > > > My efforts to set up a new page counter in the footertexts of a book are > > not proving successful. The following code shows the nature of the problem. > > > > \definecounter[volpage][type=page, way=bypage] > > \starttext > > \setcounter[volpage][5] > > \dorecurse{3}{\startTEXpage[offset=2pc] > > \input ward > > \blank[medium] > > > > \centerline{\red\tfa\rawcounter[volpage]\incrementcounter[volpage]} > > \stopTEXpage} > > \stoptext > > > > As you will see, the counter is not incremented on pages 2 and 3. > > > > I expect that I have missed something important. But what? > > > > Alan > > ___ > > 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 > ___ > ___ > 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] problem with counters (page)
Hi, Taco— Thanks for the suggestion. I have tried it with \incrementcounter before and after the TEXpage. Sadly, neither worked. This mwe is an attempt to capture the failure of the following in processing a product with numerous components: \definecounter[volpage][type=page, way=bypage] \setupfootertexts[text] [] [{\centerline{\raise\NumberRaise\hbox{\rawcounter[volpage]}} \incrementcounter[volpage]}] [{\centerline{\raise\NumberRaise\hbox{\rawcounter[volpage]}} \incrementcounter[volpage]}] [] If your suggestion had worked, I would have had difficulty in applying it. Alan On Wed, Jun 10, 2020 at 3:14 AM Taco Hoekwater wrote: > Hi, > > Incrementing the counter outside of the TEXpage should work. > > Best wishes, > Taco > > > On 9 Jun 2020, at 23:34, Alan Bowen wrote: > > > > My efforts to set up a new page counter in the footertexts of a book are > not proving successful. The following code shows the nature of the problem. > > > > \definecounter[volpage][type=page, way=bypage] > > \starttext > > \setcounter[volpage][5] > > \dorecurse{3}{\startTEXpage[offset=2pc] > > \input ward > > \blank[medium] > > > \centerline{\red\tfa\rawcounter[volpage]\incrementcounter[volpage]} > > \stopTEXpage} > > \stoptext > > > > As you will see, the counter is not incremented on pages 2 and 3. > > > > I expect that I have missed something important. But what? > > > > Alan > > > ___ > > 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 > > ___ > ___ 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] problem with counters (page)
Hi, Incrementing the counter outside of the TEXpage should work. Best wishes, Taco > On 9 Jun 2020, at 23:34, Alan Bowen wrote: > > My efforts to set up a new page counter in the footertexts of a book are not > proving successful. The following code shows the nature of the problem. > > \definecounter[volpage][type=page, way=bypage] > \starttext > \setcounter[volpage][5] > \dorecurse{3}{\startTEXpage[offset=2pc] > \input ward > \blank[medium] > > \centerline{\red\tfa\rawcounter[volpage]\incrementcounter[volpage]} > \stopTEXpage} > \stoptext > > As you will see, the counter is not incremented on pages 2 and 3. > > I expect that I have missed something important. But what? > > Alan > ___ > 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 ___
[NTG-context] problem with counters (page)
My efforts to set up a new page counter in the footertexts of a book are not proving successful. The following code shows the nature of the problem. \definecounter[volpage][type=page, way=bypage] \starttext \setcounter[volpage][5] \dorecurse{3}{\startTEXpage[offset=2pc] \input ward \blank[medium] \centerline{\red\tfa\rawcounter[volpage]\incrementcounter[volpage]} \stopTEXpage} \stoptext As you will see, the counter is not incremented on pages 2 and 3. I expect that I have missed something important. But what? Alan ___ 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] Let chapter start on odd page and make the even page before show an image
> Am 29.05.2020 um 22:18 schrieb Aditya Mahajan : > > On Fri, 29 May 2020, Henning Hraban Ramm wrote: > >> In a similar setup I wanted to start every chapter with image and short vita >> the author and came up with the following (of course not without help from >> our wizards): >> >> >> \doifelse{\structureuservariable{image}}{}{% if image empty >> }{% >> ... >> } >> \doifnot{\structureuservariable{vita}}{}{% if vita >> ... >> }% >> }% >> }% > > You can use `\doifsomething{\structureuservariable{image}}` etc which is > slightly more readable than \doifelse{...}\empty{}{} or \doifnot{...}\empty{}. I tried several \doifs and this was the one that worked. Can’t remember the details, it’s been a while. 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] Let chapter start on odd page and make the even page before show an image
On Fri, 29 May 2020, Henning Hraban Ramm wrote: In a similar setup I wanted to start every chapter with image and short vita the author and came up with the following (of course not without help from our wizards): \doifelse{\structureuservariable{image}}{}{% if image empty }{% ... } \doifnot{\structureuservariable{vita}}{}{% if vita ... }% }% }% You can use `\doifsomething{\structureuservariable{image}}` etc which is slightly more readable than \doifelse{...}\empty{}{} or \doifnot{...}\empty{}. Aditya ___ 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] Let chapter start on odd page and make the even page before show an image
In a similar setup I wanted to start every chapter with image and short vita the author and came up with the following (of course not without help from our wizards): \definefont[ChapterFont][Sans*default at 30pt] \startsetups normalheader % default numbers of my bodyfont are oldstyle \setupheadertexts[chapter][{\addff{normnum}\pagenumber}][{\addff{normnum}\pagenumber}][] \stopsetups \startsetups noheader \setupheadertexts[][][][] \stopsetups \startsetups bigchapter \setupalign[flushleft,hz,hanging,verytolerant,nothyphenated] \doifelse{\structureuservariable{image}}{}{% if image empty }{% \directsetup{noheader} \vbox{% {\ChapterFont\structurevariable{title}\par}% \blank[big] \externalfigure[img/\structureuservariable{image}][width=0.8\textwidth]\par } \doifnot{\structureuservariable{vita}}{}{% if vita \vfill \vbox{% {\tf\ss\structureuservariable{vita}} }% }% \page[right] \vbox{% \doifnot{\structureuservariable{subtitle}}{}{% if subtitle {\definedfont[SerifItalic*eka at 30pt]\structureuservariable{subtitle}} }% }% }% \blank[3*big] \directsetup{normalheader} \setupalign[width,hz,hanging,hyphenated]% reset alignment \stopsetups \setuphead[chapter][ page=left, number=no, command=\gobbletwoarguments, before=, after={\directsetup{bigchapter}}, style={\ChapterFont}, ] This is the result: https://www.dreiviertelhaus.de/editionka/lauf-los-buch/ (see preview images linked at the bottom) Best, 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] Let chapter start on odd page and make the even page before show an image
Am 29.05.20 um 18:03 schrieb Aditya Mahajan: > The magic of loading and reusing them happens behind the scenes, so the > user doesn't have to worry about it. See > https://wiki.contextgarden.net/System_Macros/Key_Value_Assignments#Multi-pass_data > for more details. > > Now, suppose you wanted to use the image defined as part of > `\startchapter` as the background image of the _current_ page, then you > could access the value of the \structureuservariable. For example, > > \startchapter[title=whatever][image=filename] > > \structureuservariable{image} > > \stopchapter > > But you want to use the value of the image _before_ the start of the > chapter. So, Wolfgang is using the two-pass mechanism to store the value > of the image in the database named 'chapter` in the hash-location > `\ChapterCounter` and then retrieving it before it is defined! Thanks a lot for the clarification! juh ___ 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] Let chapter start on odd page and make the even page before show an image
On Fri, 29 May 2020, Jan U. Hasecke wrote: One and a half question. Why did you set \ChapterCounter explizitly and why is \ChapterCounter part of the datasetvariable? \dataset... is a high level interface for collecting two-pass data in ConTeXt. Here is a simple example: \definedataset[name] \starttext The values of the three dataset variables are: \startlines \datasetvariable{name}{hash1}{key} \datasetvariable{name}{hash2}{key} \datasetvariable{name}{hash3}{key} \stoplines Now we set the values. \setdataset[name][hash1][key=value1] \setdataset[name][hash2][key=value2] \setdataset[name][hash3][key=value3] \stoptext Note that we are using the values stored in different hash-ids before they are defined. ConTeXt stores the values in the `.tuc` file and uses them. This is what is stored in the `.tuc` file: utilitydata.job.datasets.collected={ ["name"]={ ["hash1"]={ ["key"]="value1", }, ["hash2"]={ ["key"]="value2", }, ["hash3"]={ ["key"]="value3", }, }, } The magic of loading and reusing them happens behind the scenes, so the user doesn't have to worry about it. See https://wiki.contextgarden.net/System_Macros/Key_Value_Assignments#Multi-pass_data for more details. Now, suppose you wanted to use the image defined as part of `\startchapter` as the background image of the _current_ page, then you could access the value of the \structureuservariable. For example, \startchapter[title=whatever][image=filename] \structureuservariable{image} \stopchapter But you want to use the value of the image _before_ the start of the chapter. So, Wolfgang is using the two-pass mechanism to store the value of the image in the database named 'chapter` in the hash-location `\ChapterCounter` and then retrieving it before it is defined! Aditya ___ 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] Let chapter start on odd page and make the even page before show an image
Hi Wolfgang, thank you very much. Amazing! Am 29.05.20 um 15:35 schrieb Wolfgang Schuster: > \definedataset [chapter] > > \startsetups [chapter:before] > > \page[yes] > > \doglobal\increment\ChapterCounter > > \doifoddpageelse > {} > {\doifsomething > {\datasetvariable{chapter}{\ChapterCounter}{image}} > {\startlayout[page] > \centerbox{\externalfigure > [\datasetvariable{chapter}{\ChapterCounter}{image}][factor=min]} > \stoplayout}} > > \stopsetups > > \setuphead > [chapter] > [page=, > beforesection=\directsetup{chapter:before}, > insidesection={\setdataset[chapter][\ChapterCounter][image=\structureuservariable{image}]}] > One and a half question. Why did you set \ChapterCounter explizitly and why is \ChapterCounter part of the datasetvariable? juh ___ 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] Let chapter start on odd page and make the even page before show an image
Jan U. Hasecke schrieb am 29.05.2020 um 15:10: Am 29.05.20 um 12:45 schrieb Wolfgang Schuster: juh schrieb am 29.05.2020 um 10:29: Dear all, with your help I can colorize the empty even page right before a chapter starts on the odd page. The mwe below shows it. Now I would like to redefine the contents of the left page on the fly in the text so that I could place images on this page. I thought that I could get a simple solution by inserting a TEXpage as even page, but this does not work for several reasons. First a TEXpage is not counted correctly like a normal page. And secondly I found now way to put it on the even page. So what I really want to achieve is a way to redefine this setups at some point in the text to insert eg. a picture on the even page before a chapter. \startsetups [chapter:before] \doifoddpageelse {} {\pushbackground[page] \setupbackgrounds[page][background=color,backgroundcolor=blue,] \page[empty,right] \popbackground} \stopsetups As you see the image is not in the right place and of course the pagenumbering is wrong. Use \startTEXpage[pagestate=start] to increase the page number with TEX pages. Thanks for this hint. I want that one of these blue pages shows an image. Is this possible? Yes but there are different ways for different requirements. - Do you you have a picture before *every* chapter? No, the additional image page shall appear only if the last chapter ends on an odd page. Then I need the image page to push the new chapter to the next odd page. - Do you use full page images? - Are the images cropped to fit the page dimension, stretched or centered with margins? For this usecase images are blown up and cropped to fit the page dimension including the bleed. \setuppagenumbering [alternative=doublesided] \setupexternalfigures [location=default] \definedataset [chapter] \startsetups [chapter:before] \page[yes] \doglobal\increment\ChapterCounter \doifoddpageelse {} {\doifsomething {\datasetvariable{chapter}{\ChapterCounter}{image}} {\startlayout[page] \centerbox{\externalfigure [\datasetvariable{chapter}{\ChapterCounter}{image}][factor=min]} \stoplayout}} \stopsetups \setuphead [chapter] [page=, beforesection=\directsetup{chapter:before}, insidesection={\setdataset[chapter][\ChapterCounter][image=\structureuservariable{image}]}] \setupexternalfigure[location=default] \starttext \startchapter [title={Tufte}] [image=cow] \dorecurse{4}{\samplefile{tufte}} \stopchapter \startchapter [title={Knuth}] [image=mill] \dorecurse{8}{\samplefile{knuth}} \stopchapter \startchapter [title={Zapf}] [image=hacker] \dorecurse{6}{\samplefile{zapf}} \stopchapter \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] Let chapter start on odd page and make the even page before show an image
Am 29.05.20 um 12:45 schrieb Wolfgang Schuster: > juh schrieb am 29.05.2020 um 10:29: >> Dear all, >> >> with your help I can colorize the empty even page right before a >> chapter starts >> on the odd page. The mwe below shows it. >> >> Now I would like to redefine the contents of the left page on the fly >> in the text >> so that I could place images on this page. >> >> I thought that I could get a simple solution by inserting a TEXpage as >> even >> page, but this does not work for several reasons. First a TEXpage is >> not counted >> correctly like a normal page. And secondly I found now way to put it >> on the >> even page. >> >> So what I really want to achieve is a way to redefine this setups at >> some point >> in the text to insert eg. a picture on the even page before a chapter. >> >> \startsetups [chapter:before] >> \doifoddpageelse >> {} >> {\pushbackground[page] >> \setupbackgrounds[page][background=color,backgroundcolor=blue,] >> \page[empty,right] >> \popbackground} >> \stopsetups >> >> As you see the image is not in the right place and of course the >> pagenumbering >> is wrong. > Use \startTEXpage[pagestate=start] to increase the page number with TEX > pages. Thanks for this hint. >> I want that one of these blue pages shows an image. Is this possible? > Yes but there are different ways for different requirements. > > - Do you you have a picture before *every* chapter? No, the additional image page shall appear only if the last chapter ends on an odd page. Then I need the image page to push the new chapter to the next odd page. > - Do you use full page images? > - Are the images cropped to fit the page dimension, stretched or > centered with margins? For this usecase images are blown up and cropped to fit the page dimension including the bleed. juh ___ 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] Let chapter start on odd page and make the even page before show an image
juh schrieb am 29.05.2020 um 10:29: Dear all, with your help I can colorize the empty even page right before a chapter starts on the odd page. The mwe below shows it. Now I would like to redefine the contents of the left page on the fly in the text so that I could place images on this page. I thought that I could get a simple solution by inserting a TEXpage as even page, but this does not work for several reasons. First a TEXpage is not counted correctly like a normal page. And secondly I found now way to put it on the even page. So what I really want to achieve is a way to redefine this setups at some point in the text to insert eg. a picture on the even page before a chapter. \startsetups [chapter:before] \doifoddpageelse {} {\pushbackground[page] \setupbackgrounds[page][background=color,backgroundcolor=blue,] \page[empty,right] \popbackground} \stopsetups Here comes the not so mwe: %% start mwe \setuplayout [ location=doublesided ] \setuppagenumbering[alternative=doublesided] \definepagebreak [chapter] [footer,yes,header,footer,right] \startsetups [chapter:before] \doifoddpageelse {} {\pushbackground[page] \setupbackgrounds[page][background=color,backgroundcolor=blue,] \page[empty,right] \popbackground} \stopsetups \setuphead [chapter] [ page=yes, before=\directsetup{chapter:before}, ] \setupexternalfigure[location=default] \starttext \startchapter [title={foo}] \dorecurse{2}{\input tufte \par} \stopchapter \startchapter [title={foo2}] \dorecurse{6}{\input tufte \par} \stopchapter \startchapter [title={bar}] \input knuth \startTEXpage \externalfigure[cow.pdf][height=\paperheight,width=\paperwidth] \stopTEXpage \stopchapter \startchapter [title={baz}] \input knuth \stopchapter \stoptext %% stop mwe As you see the image is not in the right place and of course the pagenumbering is wrong. Use \startTEXpage[pagestate=start] to increase the page number with TEX pages. I want that one of these blue pages shows an image. Is this possible? Yes but there are different ways for different requirements. - Do you you have a picture before *every* chapter? - Do you use full page images? - Are the images cropped to fit the page dimension, stretched or centered with margins? - ... 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 ___
[NTG-context] Let chapter start on odd page and make the even page before show an image
Dear all, with your help I can colorize the empty even page right before a chapter starts on the odd page. The mwe below shows it. Now I would like to redefine the contents of the left page on the fly in the text so that I could place images on this page. I thought that I could get a simple solution by inserting a TEXpage as even page, but this does not work for several reasons. First a TEXpage is not counted correctly like a normal page. And secondly I found now way to put it on the even page. So what I really want to achieve is a way to redefine this setups at some point in the text to insert eg. a picture on the even page before a chapter. \startsetups [chapter:before] \doifoddpageelse {} {\pushbackground[page] \setupbackgrounds[page][background=color,backgroundcolor=blue,] \page[empty,right] \popbackground} \stopsetups Here comes the not so mwe: %% start mwe \setuplayout [ location=doublesided ] \setuppagenumbering[alternative=doublesided] \definepagebreak [chapter] [footer,yes,header,footer,right] \startsetups [chapter:before] \doifoddpageelse {} {\pushbackground[page] \setupbackgrounds[page][background=color,backgroundcolor=blue,] \page[empty,right] \popbackground} \stopsetups \setuphead [chapter] [ page=yes, before=\directsetup{chapter:before}, ] \setupexternalfigure[location=default] \starttext \startchapter [title={foo}] \dorecurse{2}{\input tufte \par} \stopchapter \startchapter [title={foo2}] \dorecurse{6}{\input tufte \par} \stopchapter \startchapter [title={bar}] \input knuth \startTEXpage \externalfigure[cow.pdf][height=\paperheight,width=\paperwidth] \stopTEXpage \stopchapter \startchapter [title={baz}] \input knuth \stopchapter \stoptext %% stop mwe As you see the image is not in the right place and of course the pagenumbering is wrong. I want that one of these blue pages shows an image. Is this possible? Thanks for your help. juh -- 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 : 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] Wiki - Proposal to update the Welcome page
Hi, I like the new page layout. It is a big improvement structurally, and great work! Best wishes, Taco > On 24 May 2020, at 10:53, Henning Hraban Ramm wrote: > > > >> Am 24.05.2020 um 04:06 schrieb Aditya Mahajan : >> >> I am okay with changing the main page as well. But since this is the main >> page, let's wait for the other mods to chime in as well. > > Am I a mod? Just a frequent contributor, I guess... > > I like the new main page, it looks very friendly. Myself I never look a lot > at the main page but use the search or type the URL directly, since I usually > know what I’m looking for... > > Thanks for the efforts though! > > 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 > ___ 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] Wiki - Proposal to update the Welcome page
> Am 24.05.2020 um 04:06 schrieb Aditya Mahajan : > > I am okay with changing the main page as well. But since this is the main > page, let's wait for the other mods to chime in as well. Am I a mod? Just a frequent contributor, I guess... I like the new main page, it looks very friendly. Myself I never look a lot at the main page but use the search or type the URL directly, since I usually know what I’m looking for... Thanks for the efforts though! 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] Wiki - Proposal to update the Welcome page
On Sat, 23 May 2020, Garulfo wrote: 1/ Concerning the Manuals Page - As proposed, "obsolete banners" are added to thumbnails of the oldest manuals. Looks good. A few minor comments: I haven't tested it, but the natural tables in context examples (in Sec 3.6) should still work with latest versions. The "context rehab for amsmath addicts" should be in math (or sciences) rather than tables. (This reminds me, I should update that reference). Both corrections are made, thanks for your help. - About providing zips of manuals per topics: maybe we could just add a index.html in the distribution structure, to provide the user with a browsing system similar to the wiki's one. - If the admistrators wish, I can now replace the current page. One concern that I have is how easy it is to navigate the page on the phone. Currently, it does not really work on the phone. Is there some way to make it more responsive? Thanks again, of primary importance. Should be far better now (quickly checked on two smartphones, one android and one ios) Thanks. Both pages look good on mobile now. I am okay with merging this with the old manuals page. A small suggestion is that we could omit the table of content on this page, as it is almost redundant in the new format. 2/ After the Manuals, please find a proposal for the Welcome Page, which is probably trickier - https://wiki.contextgarden.net/Main_Page_TempProposal - https://wiki.contextgarden.net/Main_Page (the current) - 4 objectives : 1/ do something more visual, reduce the amount of text, Some of us prefer text. What was earlier a one step process for me (go to home page, search for keyword, go to page), is now a two step process. But I agree that the new proposed layout is more friendly to new users and support it. Yes, I suspected that the current version had advantages as a result of past iterations. It would be interesting to identify the links that people want to access in one step. We can list them in https://wiki.contextgarden.net/Talk:Main_Page_TempProposal, and I will try to find ways to integrate them. Personally, I don't think that it is a big deal. 2/ provide a fairly comprehensive overview with less than 15 topics, 3/ but hold in one (big) screen, 4/ avoid redundancies on the Welcome Page, 5/ match both the Wiki's structure & the Manuals' structure. Again, depending on your feedbacks, I would be happy to improve it. It's built from scripts ==> not too hard now to reorder, to adapt. You should also document your work flow somewhere (perhaps the talk page of the same page or a dedicated page on the wiki). That is useful for long term maintainability of the wiki. Done: two zip files are uploaded, with link and brief description in the Talk zone of the respective pages. Thanks. I am okay with changing the main page as well. But since this is the main page, let's wait for the other mods to chime in as well. Aditya ___ 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] Wiki - Proposal to update the Welcome page
1/ Concerning the Manuals Page - As proposed, "obsolete banners" are added to thumbnails of the oldest manuals. Looks good. A few minor comments: I haven't tested it, but the natural tables in context examples (in Sec 3.6) should still work with latest versions. The "context rehab for amsmath addicts" should be in math (or sciences) rather than tables. (This reminds me, I should update that reference). Both corrections are made, thanks for your help. - About providing zips of manuals per topics: maybe we could just add a index.html in the distribution structure, to provide the user with a browsing system similar to the wiki's one. - If the admistrators wish, I can now replace the current page. One concern that I have is how easy it is to navigate the page on the phone. Currently, it does not really work on the phone. Is there some way to make it more responsive? Thanks again, of primary importance. Should be far better now (quickly checked on two smartphones, one android and one ios) 2/ After the Manuals, please find a proposal for the Welcome Page, which is probably trickier - https://wiki.contextgarden.net/Main_Page_TempProposal - https://wiki.contextgarden.net/Main_Page (the current) - 4 objectives : 1/ do something more visual, reduce the amount of text, Some of us prefer text. What was earlier a one step process for me (go to home page, search for keyword, go to page), is now a two step process. But I agree that the new proposed layout is more friendly to new users and support it. Yes, I suspected that the current version had advantages as a result of past iterations. It would be interesting to identify the links that people want to access in one step. We can list them in https://wiki.contextgarden.net/Talk:Main_Page_TempProposal, and I will try to find ways to integrate them. 2/ provide a fairly comprehensive overview with less than 15 topics, 3/ but hold in one (big) screen, This looks more reasonable on the phone. The 2nd half of the page looks okay, but the first half still looks weird (too narrow and long columns). Perhaps there is a way to may it a bit more responsive on the phone. See above, should be far better now. 4/ avoid redundancies on the Welcome Page, 5/ match both the Wiki's structure & the Manuals' structure. Again, depending on your feedbacks, I would be happy to improve it. It's built from scripts ==> not too hard now to reorder, to adapt. You should also document your work flow somewhere (perhaps the talk page of the same page or a dedicated page on the wiki). That is useful for long term maintainability of the wiki. Done: two zip files are uploaded, with link and brief description in the Talk zone of the respective pages. ___ 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] Wiki - Proposal to update the Welcome page
On Fri, 22 May 2020, Garulfo wrote: Hi all, thanks for your encouraging feedbacks. 1/ Concerning the Manuals Page - As proposed, "obsolete banners" are added to thumbnails of the oldest manuals. Looks good. A few minor comments: I haven't tested it, but the natural tables in context examples (in Sec 3.6) should still work with latest versions. The "context rehab for amsmath addicts" should be in math (or sciences) rather than tables. (This reminds me, I should update that reference). - About providing zips of manuals per topics: maybe we could just add a index.html in the distribution structure, to provide the user with a browsing system similar to the wiki's one. - If the admistrators wish, I can now replace the current page. One concern that I have is how easy it is to navigate the page on the phone. Currently, it does not really work on the phone. Is there some way to make it more responsive? 2/ After the Manuals, please find a proposal for the Welcome Page, which is probably trickier - https://wiki.contextgarden.net/Main_Page_TempProposal - https://wiki.contextgarden.net/Main_Page (the current) - 4 objectives : 1/ do something more visual, reduce the amount of text, Some of us prefer text. What was earlier a one step process for me (go to home page, search for keyword, go to page), is now a two step process. But I agree that the new proposed layout is more friendly to new users and support it. 2/ provide a fairly comprehensive overview with less than 15 topics, 3/ but hold in one (big) screen, This looks more reasonable on the phone. The 2nd half of the page looks okay, but the first half still looks weird (too narrow and long columns). Perhaps there is a way to may it a bit more responsive on the phone. 4/ avoid redundancies on the Welcome Page, 5/ match both the Wiki's structure & the Manuals' structure. Again, depending on your feedbacks, I would be happy to improve it. It's built from scripts ==> not too hard now to reorder, to adapt. You should also document your work flow somewhere (perhaps the talk page of the same page or a dedicated page on the wiki). That is useful for long term maintainability of the wiki. Aditya ___ 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] Wiki - Proposal to update the Welcome page
On 5/22/2020 11:42 PM, Garulfo wrote: Hi all, thanks for your encouraging feedbacks. 1/ Concerning the Manuals Page - As proposed, "obsolete banners" are added to thumbnails of the oldest manuals. - About providing zips of manuals per topics: maybe we could just add a index.html in the distribution structure, to provide the user with a browsing system similar to the wiki's one. - If the admistrators wish, I can now replace the current page. probbaly no one knows this but there is real old feature >mtxrun --launch --pattern=luametafun.pdf mtxrun | launching: c:/data/develop/tex-context/tex/texmf-context/doc/context/documents/general/manuals/luametafun.pdf i could probably extend that with a list option (there is actually a xml file that describes the manuals as on the website ... it's used in generating the website which happens every update - from also rather ancient xml files) 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 ___
[NTG-context] Wiki - Proposal to update the Welcome page
Hi all, thanks for your encouraging feedbacks. 1/ Concerning the Manuals Page - As proposed, "obsolete banners" are added to thumbnails of the oldest manuals. - About providing zips of manuals per topics: maybe we could just add a index.html in the distribution structure, to provide the user with a browsing system similar to the wiki's one. - If the admistrators wish, I can now replace the current page. 2/ After the Manuals, please find a proposal for the Welcome Page, which is probably trickier - https://wiki.contextgarden.net/Main_Page_TempProposal - https://wiki.contextgarden.net/Main_Page (the current) - 4 objectives : 1/ do something more visual, reduce the amount of text, 2/ provide a fairly comprehensive overview with less than 15 topics, 3/ but hold in one (big) screen, 4/ avoid redundancies on the Welcome Page, 5/ match both the Wiki's structure & the Manuals' structure. Again, depending on your feedbacks, I would be happy to improve it. It's built from scripts ==> not too hard now to reorder, to adapt. Best ___ 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] Text to be placed into the free space after columns and end of the page
Hello Aditya, thanks for all your answers. You were right - my minimalist sample was not very suitable, and my real sample can be successfuly handled with \startnarrower. Thanks again for your time. Best regards, Lukas On 2020-05-21 10:52, Aditya Mahajan wrote: On Thu, 21 May 2020, cont...@vivaldi.net wrote: Hello, at least a short reaction would be appreciated - is it possible to get the desired with ConTeXt? - I need to typeset a column-shaped document with a colofon in the bottom of the page, so my interest is not academical but very practical; and the code presented bellow is a minimalistic version ("abcd" stands for colofon). Best regards, Lukas On 2020-05-20 16:38, cont...@vivaldi.net wrote: Hello, suppose the minimal example: \showboxes \starttext \startcolumns[n=2,balance=no,] \input knuth \stopcolumns \vfill abcd \stoptext This produces two page document with columns on the first page and text "abcd" on the second. It is not clear to me why you are using columns here. If you want balanced columns, you could use: \starttext \startsimplecolumns[n=2] \input knuth \stopsimplecolumns \vfill abcd \stoptext But - I want the text "abcd" to be placed to the bottom of the same page as columns are (thus I attempted to put \vfill into the code, but it doesn't work), so to get one page document looking like: +-- page width -+ Column text | (unused) column text | column text | column text | column text | column text | (some vertical space) abcd +- end of page -+ - How to achieve this? If you just want a narrower one column output (since using balance=no and \vfill after that only makes sense if the length of the content is less than a single column), you can use \setupnarrower[right=0.5\textwidth] \startnarrower[right] \input knuth \stopnarrower or to get right frame: \startframedtext[width=0.45\textwidth,frame=off, rightframe=on, roffset=0.5em] \input knuth \stopframedtext Aditya ___ 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] Proposal to update the "Manuals" wiki page
This is great work. Many thanks! Kind regards,Jan Willem Flamma From: GarulfoSent: Tuesday, 19 May 2020 15:23To: ntg-context@ntg.nlSubject: [NTG-context] Proposal to update the "Manuals" wiki page Hi, I hope you're all doing well. Please, you will find a proposal to update the Manuals page on the wiki:https://wiki.contextgarden.net/ManualsGallery 2 objectives:1/ to make something more visual, to help the user identify the different documents, their organization, their date of release.2/ to gather all the updated documents in one place Sources were :- http://www.pragma-ade.com/overview.htm- https://wiki.contextgarden.net/Manuals, and wiki snippets here and there.- https://github.com/hmenke/context-examples/blob/master/GUIDE.md Depending on your comments, and if there is an interest, I would be happy to improve it (correct errors, change document segmentation, better colors choice, additional data such as authors, number of pages). It's mainly built from cvs table + script. Finally, if you approve this update, I can arrange to clean up some pages of the wiki about the manuals. Best, ___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 ___
Re: [NTG-context] Text to be placed into the free space after columns and end of the page
Hello, at least a short reaction would be appreciated - is it possible to get the desired with ConTeXt? - I need to typeset a column-shaped document with a colofon in the bottom of the page, so my interest is not academical but very practical; and the code presented bellow is a minimalistic version ("abcd" stands for colofon). Best regards, Lukas On 2020-05-20 16:38, cont...@vivaldi.net wrote: Hello, suppose the minimal example: \showboxes \starttext \startcolumns[n=2,balance=no,] \input knuth \stopcolumns \vfill abcd \stoptext This produces two page document with columns on the first page and text "abcd" on the second. But - I want the text "abcd" to be placed to the bottom of the same page as columns are (thus I attempted to put \vfill into the code, but it doesn't work), so to get one page document looking like: +-- page width -+ Column text | (unused) column text | column text | column text | column text | column text | (some vertical space) abcd +- end of page -+ - How to achieve this? 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] Text to be placed into the free space after columns and end of the page
On Thu, 21 May 2020, cont...@vivaldi.net wrote: Hello, at least a short reaction would be appreciated - is it possible to get the desired with ConTeXt? - I need to typeset a column-shaped document with a colofon in the bottom of the page, so my interest is not academical but very practical; and the code presented bellow is a minimalistic version ("abcd" stands for colofon). Best regards, Lukas On 2020-05-20 16:38, cont...@vivaldi.net wrote: Hello, suppose the minimal example: \showboxes \starttext \startcolumns[n=2,balance=no,] \input knuth \stopcolumns \vfill abcd \stoptext This produces two page document with columns on the first page and text "abcd" on the second. It is not clear to me why you are using columns here. If you want balanced columns, you could use: \starttext \startsimplecolumns[n=2] \input knuth \stopsimplecolumns \vfill abcd \stoptext But - I want the text "abcd" to be placed to the bottom of the same page as columns are (thus I attempted to put \vfill into the code, but it doesn't work), so to get one page document looking like: +-- page width -+ Column text | (unused) column text | column text | column text | column text | column text | (some vertical space) abcd +- end of page -+ - How to achieve this? If you just want a narrower one column output (since using balance=no and \vfill after that only makes sense if the length of the content is less than a single column), you can use \setupnarrower[right=0.5\textwidth] \startnarrower[right] \input knuth \stopnarrower or to get right frame: \startframedtext[width=0.45\textwidth,frame=off, rightframe=on, roffset=0.5em] \input knuth \stopframedtext Aditya ___ 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] Proposal to update the "Manuals" wiki page
> On 19 May 2020, at 15:22, Garulfo wrote: > > Hi, > > I hope you're all doing well. > > Please, you will find a proposal to update the Manuals page on the wiki: > https://wiki.contextgarden.net/ManualsGallery > > 2 objectives: > 1/ to make something more visual, to help the user identify the different > documents, their organization, their date of release. > 2/ to gather all the updated documents in one place > > Sources were : > - http://www.pragma-ade.com/overview.htm > - https://wiki.contextgarden.net/Manuals, and wiki snippets here and there. > - https://github.com/hmenke/context-examples/blob/master/GUIDE.md > > Depending on your comments, and if there is an interest, I would be happy to > improve it (correct errors, change document segmentation, better colors > choice, additional data such as authors, number of pages). > > It's mainly built from cvs table + script. > > Finally, if you approve this update, I can arrange to clean up some pages of > the wiki about the manuals. > > > Best, > Very helpful addition. G > > > > > > > ___ > 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] Proposal to update the "Manuals" wiki page
Hello Garulfo, thanks for the great work! Two suggestions: 1. Obsolete manuals: Could their pictures be scratched somehow? One will see on the first sight that he is to investigate "no-more-valid" stuff. 2. Could you add a "download all manuals" hlink/button next to each (sub)title to download appropriate manuals as .zip, so to get: " Up-to-date Documentation (title) [download-all-up-to-date-manuals-in-this-section-inc-subsections (hlink)] ... Graphics and Colors (subtitle) [download-all-graphics-and-colors-manuals-inc-subsections (hlink)] ... " - IMHO it would be good for offline users (and for those who prefer printed form). Best regards, Lukas On 2020-05-19 15:22, Garulfo wrote: Hi, I hope you're all doing well. Please, you will find a proposal to update the Manuals page on the wiki: https://wiki.contextgarden.net/ManualsGallery 2 objectives: 1/ to make something more visual, to help the user identify the different documents, their organization, their date of release. 2/ to gather all the updated documents in one place Sources were : - http://www.pragma-ade.com/overview.htm - https://wiki.contextgarden.net/Manuals, and wiki snippets here and there. - https://github.com/hmenke/context-examples/blob/master/GUIDE.md Depending on your comments, and if there is an interest, I would be happy to improve it (correct errors, change document segmentation, better colors choice, additional data such as authors, number of pages). It's mainly built from cvs table + script. Finally, if you approve this update, I can arrange to clean up some pages of the wiki about the manuals. Best, ___ 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] Text to be placed into the free space after columns and end of the page
Hello, suppose the minimal example: \showboxes \starttext \startcolumns[n=2,balance=no,] \input knuth \stopcolumns \vfill abcd \stoptext This produces two page document with columns on the first page and text "abcd" on the second. But - I want the text "abcd" to be placed to the bottom of the same page as columns are (thus I attempted to put \vfill into the code, but it doesn't work), so to get one page document looking like: +-- page width -+ Column text | (unused) column text | column text | column text | column text | column text | (some vertical space) abcd +- end of page -+ - How to achieve this? Best regards, Lukas \showboxes \starttext \startcolumns[n=2,balance=no,] \input knuth \stopcolumns \vfill abcd \stoptext Col.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 / 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] Proposal to update the "Manuals" wiki page
On 5/20/2020 4:55 PM, cont...@vivaldi.net wrote: 2. Could you add a "download all manuals" hlink/button next to each (sub)title to download appropriate manuals as .zip, so to get: most manuals are in the distribution - 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] Proposal to update the "Manuals" wiki page
Am 19.05.2020 um 15:22 schrieb Garulfo: Hi, I hope you're all doing well. Please, you will find a proposal to update the Manuals page on the wiki: https://wiki.contextgarden.net/ManualsGallery 2 objectives: 1/ to make something more visual, to help the user identify the different documents, their organization, their date of release. 2/ to gather all the updated documents in one place Sources were : - http://www.pragma-ade.com/overview.htm - https://wiki.contextgarden.net/Manuals, and wiki snippets here and there. - https://github.com/hmenke/context-examples/blob/master/GUIDE.md Depending on your comments, and if there is an interest, I would be happy to improve it (correct errors, change document segmentation, better colors choice, additional data such as authors, number of pages). It's mainly built from cvs table + script. Finally, if you approve this update, I can arrange to clean up some pages of the wiki about the manuals. Best, Thanks! That's very helpful. Best, Denis ___ 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] Proposal to update the "Manuals" wiki page
On 5/19/2020 3:22 PM, Garulfo wrote: Hi, I hope you're all doing well. Please, you will find a proposal to update the Manuals page on the wiki: https://wiki.contextgarden.net/ManualsGallery 2 objectives: 1/ to make something more visual, to help the user identify the different documents, their organization, their date of release. 2/ to gather all the updated documents in one place Sources were : - http://www.pragma-ade.com/overview.htm - https://wiki.contextgarden.net/Manuals, and wiki snippets here and there. - https://github.com/hmenke/context-examples/blob/master/GUIDE.md Depending on your comments, and if there is an interest, I would be happy to improve it (correct errors, change document segmentation, better colors choice, additional data such as authors, number of pages). It's mainly built from cvs table + script. Finally, if you approve this update, I can arrange to clean up some pages of the wiki about the manuals. Nicely done. 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] Proposal to update the "Manuals" wiki page
On Tue, May 19, 2020 at 03:22:47PM +0200, Garulfo wrote: > Hi, > > I hope you're all doing well. > > Please, you will find a proposal to update the Manuals page on the wiki: > https://wiki.contextgarden.net/ManualsGallery > > 2 objectives: > 1/ to make something more visual, to help the user identify the different > documents, their organization, their date of release. > 2/ to gather all the updated documents in one place > > Sources were : > - http://www.pragma-ade.com/overview.htm > - https://wiki.contextgarden.net/Manuals, and wiki snippets here and there. > - https://github.com/hmenke/context-examples/blob/master/GUIDE.md > > Depending on your comments, and if there is an interest, I would be happy to > improve it (correct errors, change document segmentation, better colors > choice, additional data such as authors, number of pages). > > It's mainly built from cvs table + script. > > Finally, if you approve this update, I can arrange to clean up some pages of > the wiki about the manuals. > > > Best, > Hi Garulfo, thank you very much for your excellent work! It will be of great help. Best wishes, Rudolf ___ 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] Proposal to update the "Manuals" wiki page
Hi, I hope you're all doing well. Please, you will find a proposal to update the Manuals page on the wiki: https://wiki.contextgarden.net/ManualsGallery 2 objectives: 1/ to make something more visual, to help the user identify the different documents, their organization, their date of release. 2/ to gather all the updated documents in one place Sources were : - http://www.pragma-ade.com/overview.htm - https://wiki.contextgarden.net/Manuals, and wiki snippets here and there. - https://github.com/hmenke/context-examples/blob/master/GUIDE.md Depending on your comments, and if there is an interest, I would be happy to improve it (correct errors, change document segmentation, better colors choice, additional data such as authors, number of pages). It's mainly built from cvs table + script. Finally, if you approve this update, I can arrange to clean up some pages of the wiki about the manuals. Best, ___ 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] Building a page based on exact location of graphical elements (PDF)
What is the simplest way to build a page based on positioning of external images? Some of these images are page-sized (so take up an entire page, though I might want to overlay some other text boxes and MP graphics). I’ve been trying to find a good explanation/introduction into layers (which I think ConTeXtgarden says I should use) but haven’t found one. G ___ 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] Building a page based on exact location of graphical elements (PDF)
Gerben Wierda schrieb am 17.05.2020 um 16:52: What is the simplest way to build a page based on positioning of external images? Some of these images are page-sized (so take up an entire page, though I might want to overlay some other text boxes and MP graphics). I’ve been trying to find a good explanation/introduction into layers (which I think ConTeXtgarden says I should use) but haven’t found one. I recommend the following manuals: - details.pdf - metafun-p.pdf 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] Blank page added after pagecolumns
I thought that the "yes" and "nop" suffixes were related to "page=yes" and "page=no" for a few reasons. First, because I thought "nop" could be shorthand for "no page." More importantly, however, I thought they might be related because setting page=no in \definepagecolumns does not appear to have any effect, and patching \page_col_stop_yes to do what \page_col_stop_nop does had the desired effect. But as you have shown, doing this causes problems with the transition back to a single-column layout, so I suppose that the \page_col_stop_yes and \page_col_stop_nop macros are meant to implement behavior dependent on the number of columns. Your suggestion to add a column if the column at the end of the environment is not the last one is elegant and works on different variations of the MWE, including cases with more than two columns. Joey On Sat, May 16, 2020 at 4:12 AM Wolfgang Schuster < wolfgang.schuster.li...@gmail.com> wrote: > Joey McCollum schrieb am 16.05.2020 um 05:45: > > All right, I've found a tentative solution that appears to work in all > > cases, but I'd like to know more about why the code I'm patching was > > implemented in the first place, because I don't want to break anything > > else. According to the code in page-pcl.mkiv, the \stoppagecolumns macro > > has two implementations, \page_col_stop_yes and \page_col_stop_nop. The > > choice of which implementation is used is determined by which of two > > implementations of \startpagecolumns (\page_col_start_yes > > and \page_col_start_nop) is used. That choice, in turn, is made in > > the \page_col_start macro, in the following lines: > > > > ``` > > \c_page_col_n_of_columns\pagecolumnsparameter\c!n\relax > > \ifnum\c_page_col_n_of_columns>\plusone > > \expandafter\page_col_start_yes > > \else > > \expandafter\page_col_start_nop > > \fi > > ``` > > > > so if the number of columns (i.e., the n option for the > > pagecolumns environment) is more than one, the "yes" implementation of > > the start and stop commands is used. > > > > But this seems wrong. The naming convention for the two implementations > > ("yes" and "nop") suggests that they should be related the parameters > > "page=yes" and "page=no" (hence, no page, which is what I think "nop" > > abbreviates), but the choice of which implementation to use is > > determined not by the page parameter, but by the n parameter. Is this an > > error in the code, or am I just understanding this incorrectly? Is there > > some reason why a layout with more than one column would need special > > instructions to add a blank page after stopping the environment? > > Why do you think "yes" and "nop" are related to the page-key? > > > In any event, I was able to solve the problem by patching the > > \page_col_start_yes macro to invoke the \page_col_start_nop macro as > > follows: > > > > ``` > > > > \unprotect > > > > \def\page_col_stop_yes > > {\page_col_stop_nop} > > > > \protect > > > > ``` > > > > With this fix, the MWE I provided works regardless of which column the > > text ends in. I'm content to consider the problem solved, but I would > > certainly appreciate any feedback on my thoughts and questions about > > page-pcl.mkiv. > > You broke now now normal single columns text after the pagecolumns > environment. A better fix is to add a check for the \column command at > the end of the environment and add it only when we aren't in the last > column. > > \unexpanded\def\page_col_stop_yes >{%\column % \page_otr_eject_page > \ifnum\c_page_col_current<\c_page_col_n_of_columns > \column > \fi > \page > \endgroup > % \setupoutputroutine[\s!singlecolumn]% > \page_otr_command_set_vsize > \page_otr_command_set_hsize > \page > \endgroup} > > 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] Blank page added after pagecolumns
Joey McCollum schrieb am 16.05.2020 um 05:45: All right, I've found a tentative solution that appears to work in all cases, but I'd like to know more about why the code I'm patching was implemented in the first place, because I don't want to break anything else. According to the code in page-pcl.mkiv, the \stoppagecolumns macro has two implementations, \page_col_stop_yes and \page_col_stop_nop. The choice of which implementation is used is determined by which of two implementations of \startpagecolumns (\page_col_start_yes and \page_col_start_nop) is used. That choice, in turn, is made in the \page_col_start macro, in the following lines: ``` \c_page_col_n_of_columns\pagecolumnsparameter\c!n\relax \ifnum\c_page_col_n_of_columns>\plusone \expandafter\page_col_start_yes \else \expandafter\page_col_start_nop \fi ``` so if the number of columns (i.e., the n option for the pagecolumns environment) is more than one, the "yes" implementation of the start and stop commands is used. But this seems wrong. The naming convention for the two implementations ("yes" and "nop") suggests that they should be related the parameters "page=yes" and "page=no" (hence, no page, which is what I think "nop" abbreviates), but the choice of which implementation to use is determined not by the page parameter, but by the n parameter. Is this an error in the code, or am I just understanding this incorrectly? Is there some reason why a layout with more than one column would need special instructions to add a blank page after stopping the environment? Why do you think "yes" and "nop" are related to the page-key? In any event, I was able to solve the problem by patching the \page_col_start_yes macro to invoke the \page_col_start_nop macro as follows: ``` \unprotect \def\page_col_stop_yes {\page_col_stop_nop} \protect ``` With this fix, the MWE I provided works regardless of which column the text ends in. I'm content to consider the problem solved, but I would certainly appreciate any feedback on my thoughts and questions about page-pcl.mkiv. You broke now now normal single columns text after the pagecolumns environment. A better fix is to add a check for the \column command at the end of the environment and add it only when we aren't in the last column. \unexpanded\def\page_col_stop_yes {%\column % \page_otr_eject_page \ifnum\c_page_col_current<\c_page_col_n_of_columns \column \fi \page \endgroup % \setupoutputroutine[\s!singlecolumn]% \page_otr_command_set_vsize \page_otr_command_set_hsize \page \endgroup} 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] Blank page added after pagecolumns
All right, I've found a tentative solution that appears to work in all cases, but I'd like to know more about why the code I'm patching was implemented in the first place, because I don't want to break anything else. According to the code in page-pcl.mkiv, the \stoppagecolumns macro has two implementations, \page_col_stop_yes and \page_col_stop_nop. The choice of which implementation is used is determined by which of two implementations of \startpagecolumns (\page_col_start_yes and \page_col_start_nop) is used. That choice, in turn, is made in the \page_col_start macro, in the following lines: ``` \c_page_col_n_of_columns\pagecolumnsparameter\c!n\relax \ifnum\c_page_col_n_of_columns>\plusone \expandafter\page_col_start_yes \else \expandafter\page_col_start_nop \fi ``` so if the number of columns (i.e., the n option for the pagecolumns environment) is more than one, the "yes" implementation of the start and stop commands is used. But this seems wrong. The naming convention for the two implementations ("yes" and "nop") suggests that they should be related the parameters "page=yes" and "page=no" (hence, no page, which is what I think "nop" abbreviates), but the choice of which implementation to use is determined not by the page parameter, but by the n parameter. Is this an error in the code, or am I just understanding this incorrectly? Is there some reason why a layout with more than one column would need special instructions to add a blank page after stopping the environment? In any event, I was able to solve the problem by patching the \page_col_start_yes macro to invoke the \page_col_start_nop macro as follows: ``` \unprotect \def\page_col_stop_yes {\page_col_stop_nop} \protect ``` With this fix, the MWE I provided works regardless of which column the text ends in. I'm content to consider the problem solved, but I would certainly appreciate any feedback on my thoughts and questions about page-pcl.mkiv. Joey On Thu, May 14, 2020 at 5:03 PM Joey McCollum wrote: > Okay, I think I'm getting close, but I'm not quite there yet. The > pagecolumns source code is found in page-pcl.mkiv ( > source.contextgarden.net/tex/context/base/mkiv/page-pcl.mkiv), and in > that code, the \page_col_stop_yes macro seems to have something to do with > the issue: > > ``` > \unexpanded\def\page_col_stop_yes > {\column % \page_otr_eject_page >\page > \endgroup > % \setupoutputroutine[\s!singlecolumn]% >\page_otr_command_set_vsize > \page_otr_command_set_hsize > \page >\endgroup} > ``` > > If I redefine this macro in my MWE as follows, I can remove the extra page > that is added when the last page ends with text in the last column: > > ``` > > \unprotect > > \def\page_col_stop_yes > > {\column %\page_otr_eject_page > > %\page > > \endgroup > > % \setupoutputroutine[\s!singlecolumn]% > > \page_otr_command_set_vsize > > \page_otr_command_set_hsize > > %\page > > \endgroup} > > \protect > ``` > > Commenting out the \page calls does the trick in this case, but now, if > the last page ends with its text in a column before the last one, then the > last page is not typeset at all, and a blank page takes its place. > > On Sun, May 10, 2020 at 8:34 PM Thangalin wrote: > >> Bump. >> >> See also: https://tex.stackexchange.com/q/542993/2148 >> >> On Mon, May 4, 2020 at 11:46 AM Joey McCollum >> wrote: >> > >> > After continuing to look into this a bit, I noticed that a similar >> issue involving the insertion of a blank page after a columnset environment >> has been discussed on the mailing list in the thread "Blank page inserted >> when text reaches column's end" (dated 08 Dec 2019). In that thread, a >> proposed solution was to redefine the \page_grd_stop macro found in >> page-cst.mkiv as follows: >> > >> > ``` >> > \unprotect >> > \def\page_grd_stop{% >> > \endgraf % needed, else wrong vsize in one par case >> > \vfill % otherwise weird \placenotes[endnotes] >> > \page_grd_command_set_vsize % needed >> > \penalty\c_page_otr_eject_penalty >> > %\page_grd_command_flush_page >> > \page_otr_fill_and_eject_page >> > \page_grd_command_set_vsize % why here >> > \egroup >> > \page_otr_command_set_vsize >> > \page_otr_command_set_hsize >> > } >> > \protect >> > ``` >> > >> > Unfortunately, this approach was found to have potential issues in that >> thread, and it does not fix the problem with pagecolumns in my MWE. Are >> pagecolumns commands
Re: [NTG-context] page number with brief centered line above
Thanks Wolfgang. It seems I was almost there, but had forgotten the braces for \pagenumber! I am grateful for the observation. \framed is definitely the preferred solution. Julian On 15/5/20 1:28 am, Wolfgang Schuster wrote: jbf schrieb am 14.05.2020 um 07:30: Hi list, I am trying to achieve a layout where there is a brief line above the bottom-centered page number (of a double-sided document). I am able to achieve the centered bottom-located page number easily and obviously enough with: \setuppagenumbering [alternative=doublesided,location={footer,middle}] \setupfooter [style=bold] And I was able to achieve a result with a short line above where the page number should be - but by adopting the solution below I have now lost the page number. \setuppagenumbering [alternative=doublesided,location={footer,middle}] \setupfootertexts[{\framed[frame=off,topframe=on,width=.5\textwidth]}] You forgot the braces for the argument of \framed. So then I thought that having left out any reference to page numbers I had better put it in, so I added [pagenumber] to the above, but I ended up with two page numbers, one centered, the other to the inner or outer margins (depending on recto/verso), and the line was likewise to the right or left of the centred number. So clearly not what I want. Maybe the solution lies with some combination of the above I haven't thought of, or maybe there is another solution altogether. Any thoughts? 1. Add a rule at the top of the footer. \setuppagenumbering [location=footer] \setupfooter [text] [before=\hrule] \starttext \page[dummy] \stoptext 2. Put the page number in a frame (preferred method). \setuppagenumbering [location=] \setupfootertexts [{\framed[width=max,frame=off,topframe=on]{\pagenumber}}] \starttext \page[dummy] \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] Blank page added after pagecolumns
Okay, I think I'm getting close, but I'm not quite there yet. The pagecolumns source code is found in page-pcl.mkiv ( source.contextgarden.net/tex/context/base/mkiv/page-pcl.mkiv), and in that code, the \page_col_stop_yes macro seems to have something to do with the issue: ``` \unexpanded\def\page_col_stop_yes {\column % \page_otr_eject_page \page \endgroup % \setupoutputroutine[\s!singlecolumn]% \page_otr_command_set_vsize \page_otr_command_set_hsize \page \endgroup} ``` If I redefine this macro in my MWE as follows, I can remove the extra page that is added when the last page ends with text in the last column: ``` \unprotect \def\page_col_stop_yes {\column %\page_otr_eject_page %\page \endgroup % \setupoutputroutine[\s!singlecolumn]% \page_otr_command_set_vsize \page_otr_command_set_hsize %\page \endgroup} \protect ``` Commenting out the \page calls does the trick in this case, but now, if the last page ends with its text in a column before the last one, then the last page is not typeset at all, and a blank page takes its place. On Sun, May 10, 2020 at 8:34 PM Thangalin wrote: > Bump. > > See also: https://tex.stackexchange.com/q/542993/2148 > > On Mon, May 4, 2020 at 11:46 AM Joey McCollum > wrote: > > > > After continuing to look into this a bit, I noticed that a similar issue > involving the insertion of a blank page after a columnset environment has > been discussed on the mailing list in the thread "Blank page inserted when > text reaches column's end" (dated 08 Dec 2019). In that thread, a proposed > solution was to redefine the \page_grd_stop macro found in page-cst.mkiv as > follows: > > > > ``` > > \unprotect > > \def\page_grd_stop{% > > \endgraf % needed, else wrong vsize in one par case > > \vfill % otherwise weird \placenotes[endnotes] > > \page_grd_command_set_vsize % needed > > \penalty\c_page_otr_eject_penalty > > %\page_grd_command_flush_page > > \page_otr_fill_and_eject_page > > \page_grd_command_set_vsize % why here > > \egroup > > \page_otr_command_set_vsize > > \page_otr_command_set_hsize > > } > > \protect > > ``` > > > > Unfortunately, this approach was found to have potential issues in that > thread, and it does not fix the problem with pagecolumns in my MWE. Are > pagecolumns commands aliased to pagegrid commands like columnset commands > are, or are they defined somewhere else? I checked page-col.mkiv, but it > seems to be too short to be the file that defines pagecolumns behavior. > > > > Joey > > > > On Sat, May 2, 2020 at 11:46 AM Joey McCollum < > jmccollum20140...@gmail.com> wrote: > >> > >> I recently found the pagecolumns manual ( > http://www.pragma-ade.com/general/manuals/pagecolumns.pdf), and in > several of the examples (including those for side floats and footnotes), > the addition of a blank page after the end of the pagecolumns environment > also seems to occur. So when the manual says, "We always start at a new > page and end on a new one," does it mean that this is a feature of > pagecolumns? And if so, is there any way to disable it? I have no problem > with a page break after the end of the pagecolumns environment, but an > empty page added after the break seems unnecessary. I checked for a wiki > page on the \definepagecolumns command to get more information on its > accepted inputs, but there doesn't appear to be a page for this command. > >> > >> Joey > >> > >> On Tue, Apr 28, 2020 at 1:40 PM Joey McCollum < > jmccollum20140...@gmail.com> wrote: > >>> > >>> I am typesetting a document using pagecolumns to ensure that my > footnotes are set ragged-bottom in columns. I have observed some unexpected > behavior whenever the last column on a page is left incomplete: a blank > page is added at the end of the document. A minimal working example follows: > >>> > >>> ``` > >>> > >>> \starttext > >>> > >>> \startpagecolumns[n=2] > >>> > >>> \dorecurse{3}{\par\input zapf} > >>> > >>> \stoppagecolumns > >>> > >>> \stoptext > >>> > >>> ``` > >>> > >>> I typeset this using ConTeXt version 2020.03.10, as released with > TeXLive 2020. Notably, if \dorecurse{3} is changed to \dorecurse{2} or > \dorecurse{6} (so that the text ends in the first column of a page), then > there is no problem. I have tried to fix this by specifying page=no in the > \startpageco
Re: [NTG-context] page number with brief centered line above
jbf schrieb am 14.05.2020 um 07:30: Hi list, I am trying to achieve a layout where there is a brief line above the bottom-centered page number (of a double-sided document). I am able to achieve the centered bottom-located page number easily and obviously enough with: \setuppagenumbering [alternative=doublesided,location={footer,middle}] \setupfooter [style=bold] And I was able to achieve a result with a short line above where the page number should be - but by adopting the solution below I have now lost the page number. \setuppagenumbering [alternative=doublesided,location={footer,middle}] \setupfootertexts[{\framed[frame=off,topframe=on,width=.5\textwidth]}] You forgot the braces for the argument of \framed. So then I thought that having left out any reference to page numbers I had better put it in, so I added [pagenumber] to the above, but I ended up with two page numbers, one centered, the other to the inner or outer margins (depending on recto/verso), and the line was likewise to the right or left of the centred number. So clearly not what I want. Maybe the solution lies with some combination of the above I haven't thought of, or maybe there is another solution altogether. Any thoughts? 1. Add a rule at the top of the footer. \setuppagenumbering [location=footer] \setupfooter [text] [before=\hrule] \starttext \page[dummy] \stoptext 2. Put the page number in a frame (preferred method). \setuppagenumbering [location=] \setupfootertexts [{\framed[width=max,frame=off,topframe=on]{\pagenumber}}] \starttext \page[dummy] \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 ___
[NTG-context] page number with brief centered line above
Hi list, I am trying to achieve a layout where there is a brief line above the bottom-centered page number (of a double-sided document). I am able to achieve the centered bottom-located page number easily and obviously enough with: \setuppagenumbering [alternative=doublesided,location={footer,middle}] \setupfooter [style=bold] And I was able to achieve a result with a short line above where the page number should be - but by adopting the solution below I have now lost the page number. \setuppagenumbering [alternative=doublesided,location={footer,middle}] \setupfootertexts[{\framed[frame=off,topframe=on,width=.5\textwidth]}] So then I thought that having left out any reference to page numbers I had better put it in, so I added [pagenumber] to the above, but I ended up with two page numbers, one centered, the other to the inner or outer margins (depending on recto/verso), and the line was likewise to the right or left of the centred number. So clearly not what I want. Maybe the solution lies with some combination of the above I haven't thought of, or maybe there is another solution altogether. Any thoughts? Julian ___ 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] Blank page added after pagecolumns
Bump. See also: https://tex.stackexchange.com/q/542993/2148 On Mon, May 4, 2020 at 11:46 AM Joey McCollum wrote: > > After continuing to look into this a bit, I noticed that a similar issue > involving the insertion of a blank page after a columnset environment has > been discussed on the mailing list in the thread "Blank page inserted when > text reaches column's end" (dated 08 Dec 2019). In that thread, a proposed > solution was to redefine the \page_grd_stop macro found in page-cst.mkiv as > follows: > > ``` > \unprotect > \def\page_grd_stop{% > \endgraf % needed, else wrong vsize in one par case > \vfill % otherwise weird \placenotes[endnotes] > \page_grd_command_set_vsize % needed > \penalty\c_page_otr_eject_penalty > %\page_grd_command_flush_page > \page_otr_fill_and_eject_page > \page_grd_command_set_vsize % why here > \egroup > \page_otr_command_set_vsize > \page_otr_command_set_hsize > } > \protect > ``` > > Unfortunately, this approach was found to have potential issues in that > thread, and it does not fix the problem with pagecolumns in my MWE. Are > pagecolumns commands aliased to pagegrid commands like columnset commands > are, or are they defined somewhere else? I checked page-col.mkiv, but it > seems to be too short to be the file that defines pagecolumns behavior. > > Joey > > On Sat, May 2, 2020 at 11:46 AM Joey McCollum > wrote: >> >> I recently found the pagecolumns manual >> (http://www.pragma-ade.com/general/manuals/pagecolumns.pdf), and in several >> of the examples (including those for side floats and footnotes), the >> addition of a blank page after the end of the pagecolumns environment also >> seems to occur. So when the manual says, "We always start at a new page and >> end on a new one," does it mean that this is a feature of pagecolumns? And >> if so, is there any way to disable it? I have no problem with a page break >> after the end of the pagecolumns environment, but an empty page added after >> the break seems unnecessary. I checked for a wiki page on the >> \definepagecolumns command to get more information on its accepted inputs, >> but there doesn't appear to be a page for this command. >> >> Joey >> >> On Tue, Apr 28, 2020 at 1:40 PM Joey McCollum >> wrote: >>> >>> I am typesetting a document using pagecolumns to ensure that my footnotes >>> are set ragged-bottom in columns. I have observed some unexpected behavior >>> whenever the last column on a page is left incomplete: a blank page is >>> added at the end of the document. A minimal working example follows: >>> >>> ``` >>> >>> \starttext >>> >>> \startpagecolumns[n=2] >>> >>> \dorecurse{3}{\par\input zapf} >>> >>> \stoppagecolumns >>> >>> \stoptext >>> >>> ``` >>> >>> I typeset this using ConTeXt version 2020.03.10, as released with TeXLive >>> 2020. Notably, if \dorecurse{3} is changed to \dorecurse{2} or >>> \dorecurse{6} (so that the text ends in the first column of a page), then >>> there is no problem. I have tried to fix this by specifying page=no in the >>> \startpagecolumns arguments, but it did not change anything. Is there >>> something else I am missing? >>> >>> Thank you, >>> >>> Joey > > ___ > 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] long caption in 2-page spread
After trying Hraban's two suggestions to resolve the problem of a caption ('title=') for an image across a two-page spread (and I have tried a variety of adaptations of those two possible solutions), I still have not resolved the issue. To repeat what Hans gave me, to resolve the 2-page spread in the first instance: \startpostponing \setuppagenumbering[state=stop] \startspread \startplacefigure[location=here,title={This is a cow!}] \externalfigure[cow.pdf][height=\textheight]% \stopplacefigure \stopspread \setuppagenumbering[state=start] \stoppostponing The problem I have is that the figure has a title/caption much longer than 'This is a cow', and the end result is that it commences on the verso page but then runs across (repeats, part of it) on the recto page. Hraban suggests, first of all: title={\hbox to \textwidth{\vbox{Your lengthy caption}}} but this results in the first part of the caption properly located left-flushed on the verso page, and the other part right-flushed (and to the right of the figure, so running off the page) on the recto page. The second solution is title={\framedtext[width=\textwidth,frame=off,align=right]{Your lengthy caption}} and this almost works, but this time part of the caption repeats on the left of the recto page more or less within the inner margin, so I can live with that, knowing that it will not be visible ultimately at the binding stage. Of course, what I really want to achieve is that the caption (aka 'title') appears either on the verso or the recto page, but not both. Is that achievable? The actual coding for all this as I have it at the moment is as follows: \startpostponing \setuppagenumbering[state=stop] \startspread \startplacefigure[location=here,title={{\sc Plates 12/13.} \switchtobodyfont[9.5pt] My very, very,_very long\\ caption for this_ figure}] \externalfigure[plate12-13.jpg][height=.8\textheight]% \stopplacefigure \stopspread \setuppagenumbering[state=start] \stoppostponing but ..._very long caption_ _for this _... is repeated on the recto page. This is what I want to avoid. Julian On 5/5/20 4:18 pm, Henning Hraban Ramm wrote: Am 05.05.2020 um 03:31 schrieb jbf : The following excellent solution (see below) to a 2-page spread of an image was given me by Hans (I had been completely unaware of the command \startspread. It appears to be recent and undocumented, but it certainly simplifies matters). But in my case the title is a lengthy sentence, rather than the 4-word 'This is a cow'. And even though I have been able to split the line, e.g. title={this is my very, very, very,\\ very etc. etc. long title}, what happens is that part of the caption still appears on the right-hand page of the spread. Is there a way that I can limit the appearance of the caption to just one (the left-hand) page? In other words, so the figure is spread but not the caption? Or alternatively, have the caption neatly split across the two pages with appropriate space inbetween? I tried various combinations, including an \hfill halfway through the title, but to no avail. Perhaps this is asking too much, but there may be a workaround. I guess you need something like title={\hbox to \textwidth{\vbox{Your lengthy caption}}} or title={\framedtext[width=\textwidth,frame=off,align=right]{Your lengthy caption}} HTH 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 ___ ___ 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] long caption in 2-page spread
> Am 05.05.2020 um 03:31 schrieb jbf : > > The following excellent solution (see below) to a 2-page spread of an image > was given me by Hans (I had been completely unaware of the command > \startspread. It appears to be recent and undocumented, but it certainly > simplifies matters). > > But in my case the title is a lengthy sentence, rather than the 4-word 'This > is a cow'. And even though I have been able to split the line, e.g. > title={this is my very, very, very,\\ very etc. etc. long title}, what > happens is that part of the caption still appears on the right-hand page of > the spread. > > Is there a way that I can limit the appearance of the caption to just one > (the left-hand) page? In other words, so the figure is spread but not the > caption? Or alternatively, have the caption neatly split across the two pages > with appropriate space inbetween? I tried various combinations, including an > \hfill halfway through the title, but to no avail. Perhaps this is asking too > much, but there may be a workaround. I guess you need something like title={\hbox to \textwidth{\vbox{Your lengthy caption}}} or title={\framedtext[width=\textwidth,frame=off,align=right]{Your lengthy caption}} HTH 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 ___
[NTG-context] long caption in 2-page spread
The following excellent solution (see below) to a 2-page spread of an image was given me by Hans (I had been completely unaware of the command \startspread. It appears to be recent and undocumented, but it certainly simplifies matters). But in my case the title is a lengthy sentence, rather than the 4-word 'This is a cow'. And even though I have been able to split the line, e.g. title={this is my very, very, very,\\ very etc. etc. long title}, what happens is that part of the caption still appears on the right-hand page of the spread. Is there a way that I can limit the appearance of the caption to just one (the left-hand) page? In other words, so the figure is spread but not the caption? Or alternatively, have the caption neatly split across the two pages with appropriate space inbetween? I tried various combinations, including an \hfill halfway through the title, but to no avail. Perhaps this is asking too much, but there may be a workaround. Julian \startpostponing \setuppagenumbering[state=stop] \startspread \startplacefigure[location=here,title={This is a cow!}] \externalfigure[cow.pdf][height=\textheight]% \stopplacefigure \stopspread \setuppagenumbering[state=start] \stoppostponing ___ 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] Blank page added after pagecolumns
After continuing to look into this a bit, I noticed that a similar issue involving the insertion of a blank page after a columnset environment has been discussed on the mailing list in the thread "Blank page inserted when text reaches column's end" (dated 08 Dec 2019). In that thread, a proposed solution was to redefine the \page_grd_stop macro found in page-cst.mkiv as follows: ``` \unprotect \def\page_grd_stop{% \endgraf % needed, else wrong vsize in one par case \vfill % otherwise weird \placenotes[endnotes] \page_grd_command_set_vsize % needed \penalty\c_page_otr_eject_penalty %\page_grd_command_flush_page \page_otr_fill_and_eject_page \page_grd_command_set_vsize % why here \egroup \page_otr_command_set_vsize \page_otr_command_set_hsize } \protect ``` Unfortunately, this approach was found to have potential issues in that thread, and it does not fix the problem with pagecolumns in my MWE. Are pagecolumns commands aliased to pagegrid commands like columnset commands are, or are they defined somewhere else? I checked page-col.mkiv, but it seems to be too short to be the file that defines pagecolumns behavior. Joey On Sat, May 2, 2020 at 11:46 AM Joey McCollum wrote: > I recently found the pagecolumns manual ( > http://www.pragma-ade.com/general/manuals/pagecolumns.pdf), and in > several of the examples (including those for side floats and footnotes), > the addition of a blank page after the end of the pagecolumns environment > also seems to occur. So when the manual says, "We always start at a new > page and end on a new one," does it mean that this is a feature of > pagecolumns? And if so, is there any way to disable it? I have no problem > with a page break after the end of the pagecolumns environment, but an > empty page added after the break seems unnecessary. I checked for a wiki > page on the \definepagecolumns command to get more information on its > accepted inputs, but there doesn't appear to be a page for this command. > > Joey > > On Tue, Apr 28, 2020 at 1:40 PM Joey McCollum > wrote: > >> I am typesetting a document using pagecolumns to ensure that my footnotes >> are set ragged-bottom in columns. I have observed some unexpected behavior >> whenever the last column on a page is left incomplete: a blank page is >> added at the end of the document. A minimal working example follows: >> >> ``` >> >> \starttext >> >> \startpagecolumns[n=2] >> >> \dorecurse{3}{\par\input zapf} >> >> \stoppagecolumns >> >> \stoptext >> ``` >> >> I typeset this using ConTeXt version 2020.03.10, as released with TeXLive >> 2020. Notably, if \dorecurse{3} is changed to \dorecurse{2} or >> \dorecurse{6} (so that the text ends in the first column of a page), then >> there is no problem. I have tried to fix this by specifying page=no in the >> \startpagecolumns arguments, but it did not change anything. Is there >> something else I am missing? >> >> Thank you, >> >> Joey >> > ___ 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] Blank page added after pagecolumns
I recently found the pagecolumns manual ( http://www.pragma-ade.com/general/manuals/pagecolumns.pdf), and in several of the examples (including those for side floats and footnotes), the addition of a blank page after the end of the pagecolumns environment also seems to occur. So when the manual says, "We always start at a new page and end on a new one," does it mean that this is a feature of pagecolumns? And if so, is there any way to disable it? I have no problem with a page break after the end of the pagecolumns environment, but an empty page added after the break seems unnecessary. I checked for a wiki page on the \definepagecolumns command to get more information on its accepted inputs, but there doesn't appear to be a page for this command. Joey On Tue, Apr 28, 2020 at 1:40 PM Joey McCollum wrote: > I am typesetting a document using pagecolumns to ensure that my footnotes > are set ragged-bottom in columns. I have observed some unexpected behavior > whenever the last column on a page is left incomplete: a blank page is > added at the end of the document. A minimal working example follows: > > ``` > > \starttext > > \startpagecolumns[n=2] > > \dorecurse{3}{\par\input zapf} > > \stoppagecolumns > > \stoptext > ``` > > I typeset this using ConTeXt version 2020.03.10, as released with TeXLive > 2020. Notably, if \dorecurse{3} is changed to \dorecurse{2} or > \dorecurse{6} (so that the text ends in the first column of a page), then > there is no problem. I have tried to fix this by specifying page=no in the > \startpagecolumns arguments, but it did not change anything. Is there > something else I am missing? > > Thank you, > > Joey > ___ 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] Getting page width and height in Lua
Jack Steyn schrieb am 30.04.2020 um 16:36: If I want to get the paper width and height to use in some Lua code, I can use: local paperwidth, paperheight = backends.pdf.codeinjections.getpagedimensions() But what if I want to get the page width and height? That is, the width and height of the first argument in the two-argument version of \setuppapersize. Does anyone know how I can obtain these using Lua? You can use tex.dimen[...] or tex.dimen. but all values are in scaled points. \setuppapersize[A5][A4] \setuplayout[location=middle] \showframe \starttext \startluacode local pagedimensions = { "paperwidth", "paperheight", "printpaperwidth", "printpaperheight", } context.starttabulate() for _, pagedimension in next, pagedimensions do context.NC() context.Word(pagedimension) context.NC() context((number.tomillimeters(tex.dimen[pagedimension],"%.F%s"))) context.NC() context.NR() end context.stoptabulate() \stopluacode \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 ___
[NTG-context] Getting page width and height in Lua
If I want to get the paper width and height to use in some Lua code, I can use: local paperwidth, paperheight = backends.pdf.codeinjections.getpagedimensions() But what if I want to get the page width and height? That is, the width and height of the first argument in the two-argument version of \setuppapersize. Does anyone know how I can obtain these using Lua? Many thanks, Jack ___ 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] image across 2 page spread
On 4/30/2020 2:05 AM, jbf wrote: Hi list, With 99% of work complete on a book, including single page images, I now find myself confronted with a final problem: how to run one image across facing pages or in other words, one image (plus its caption) across a two-page spread, such that there is no gap. I have tried a number of fairly crass attempts (obviously too simple) to see if I could get somewhere near what I want, e.g. \externalfigure[plate12.jpg][width=\paperwidth, height=.7\paperheight, frame=none] {\tfx \sc Plates 12, 13. \tfx Twenty trucks from the Netherlands setting off} \externalfigure[plate13.jpg][width=\paperwidth, height=.7\paperheight, frame=none] {\tfx for their first mission amongst the German diaspora.} My thinking here was that \paperwidth might help extend the image to the inner edge on the left-hand page, but it doesn't work that way for the right-hand page, since there it extends to the outer edge, not the inner edge! The .7\paperheight was to provide room for the caption. But all in all, this is no solution! If it is any help, the setup dimensions for the book are US Digest: \definepapersize [ACN][width=5.5in,height=8.5in] % w140mm x h216mm I then looked up how one might do it in LaTeX, and found the following link: https://tex.stackexchange.com/questions/23860/how-to-include-a-picture-over-two-pages-left-part-on-left-side-right-on-right How much of that would be transferable to ConTeXt? (I am thinking particularly of the |\newcommand*{\twopagepicture}[4]| bit. There are explanations for how to do this in InDesign, and since it is something someone might often want to do (e.g. in magazines), I also thought it might be easier to find reference to it on Contextgarden, yet haven't found anything there. But I am sure ConTeXt has a way to do this. Could someone point me in the right direction with this please? \setuppagenumbering [alternative=doublesided] \starttext \dorecurse{3}{\input tufte \par} \startpostponing \setuppagenumbering[state=stop] \startspread \startplacefigure[location=here,title={This is a cow!}] \externalfigure[cow.pdf][height=\textheight]% \stopplacefigure \stopspread \setuppagenumbering[state=start] \stoppostponing \dorecurse{10}{\input tufte \par} \stoptext - 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] image across 2 page spread
> Am 30.04.2020 um 02:05 schrieb jbf : > > Hi list, > > With 99% of work complete on a book, including single page images, I now find > myself confronted with a final problem: how to run one image across facing > pages or in other words, one image (plus its caption) across a two-page > spread, such that there is no gap. You need to use \clip and calculate the sections. Thangalin already gave you an example. Here’s a convoluted one that I use: % full double page image % usage: % \startpostponing[pagenumber] % \doublepagefig[reference][left/right/width/height*]{caption}{filename} % \stoppostponing % * lw,lh,rw,rh - place as left/right page, adapt image to width/height % default is lw % postponing is important, otherwise the page numbering gets wrong \newdimen\Bleed \newdimen\maxWidth \newdimen\maxHeight \newdimen\doubleWidth \newdimen\topOffset \newdimen\bottomOffset \Bleed=3mm \setupbleeding[offset=\Bleed] \maxWidth=\dimexpr\paperwidth + \Bleed\relax \maxHeight=\dimexpr\paperheight + 2\Bleed\relax \doubleWidth=\dimexpr2\maxWidth\relax \topOffset=\dimexpr\topspace + \headerheight + \Bleed\relax \bottomOffset=\dimexpr\bottomheight + \footerheight + \Bleed\relax \definelayer[bgpicleft][x=-\Bleed,y=-\Bleed,width=\maxWidth,height=\maxHeight] % inkl. Beschnitt \definelayer[bgpicright][x=0mm,y=-\Bleed,width=\maxWidth,height=\maxHeight] % inkl. Beschnitt \definemakeup[fullpage][ page=no, doublesided=no, headerstate=empty, footerstate=empty, pagestate=start, ] \def\doublepagefig{\dodoubleempty\doDoublePagefig} \def\doDoublePagefig[#1][#2]#3#4{ \startfullpagemakeup \setlayer[bgpicleft]{\textreference[#1]{}% \clip[ hoffset=0mm, voffset=0mm, width=\maxWidth, height=\maxHeight, ]{% \doifinstringelse{h}{#2}{% \externalfigure[#4][height=\maxHeight]% }{% \externalfigure[#4][width=\doubleWidth]% }% }% } % set caption into footer (left page) \doiftext{#3}{\doifinstring{l}{#2}{% \setlayer[bgpicleft][ x=\backspace, y=\dimexpr\makeupheight + \footerheight\relax, ]{% \doifmodeelse{blackcaption}{% \tfx\vbox{#3}% }{% \inframed[ frame=off,background=shadow, foregroundcolor=captioncolor,]{% \bfx{#3}%\vbox{#3}% }% }% }% }} % debugging information \setlayer[bgpicleft][x=0mm,y=-\Bleed]{% \color[debugcolor]{~\tt\bfx #1 / #2 / #4} } \stopfullpagemakeup \startfullpagemakeup \setlayer[bgpicright]{% \clip[ hoffset=\maxWidth, voffset=0mm, width=\maxWidth, height=\maxHeight, ]{% \doifinstringelse{h}{#2}{% \externalfigure[#4][height=\maxHeight]% }{% \externalfigure[#4][width=\doubleWidth]% }% }% } % set caption into footer (right page) \doiftext{#3}{\doifinstring{r}{#2}{% \setlayer[bgpicright][ x=\backspace, y=\dimexpr\makeupheight + \footerheight\relax, ]{% \doifmodeelse{blackcaption}{% \tfx\vbox{#3}% }{% \inframed[ frame=off,background=shadow,foregroundcolor=captioncolor]{% \bfx{#3}%\vbox{#3}% }% }% }% }}% % debugging information \setlayer[bgpicright][x=0mm,y=-\Bleed]{% \color[captioncolor]{~\tt\bfx #1 / #2 / #4} } \stopfullpagemakeup } % doublepagefig You can see the outcome here: https://www.dreiviertelhaus.de/architekturfuehrer/hicog/ Have fun, 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] image across 2 page spread
Would something like this work? \setupbackgrounds[page][ background={BookIllustrationLayer}, ] \definelayer[BookIllustrationLayer][ width=\paperwidth, height=.5\paperheight, y=.5\paperheight, position=no, repeat=no, ] \setlayer[BookIllustrationLayer]{% \clip[x=\doifelseoddpage{2}{1}]{% \externalfigure[filename][ width=2\paperwidth, height=.5\paperheight]% }% }% On Wed, Apr 29, 2020 at 5:05 PM jbf wrote: > > Hi list, > > With 99% of work complete on a book, including single page images, I now find > myself confronted with a final problem: how to run one image across facing > pages or in other words, one image (plus its caption) across a two-page > spread, such that there is no gap. > > I have tried a number of fairly crass attempts (obviously too simple) to see > if I could get somewhere near what I want, e.g. > > \externalfigure[plate12.jpg][width=\paperwidth, height=.7\paperheight, > frame=none] {\tfx \sc Plates 12, 13. \tfx Twenty trucks from the Netherlands > setting off} > > \externalfigure[plate13.jpg][width=\paperwidth, height=.7\paperheight, > frame=none] {\tfx for their first mission amongst the German diaspora.} > > My thinking here was that \paperwidth might help extend the image to the > inner edge on the left-hand page, but it doesn't work that way for the > right-hand page, since there it extends to the outer edge, not the inner > edge! The .7\paperheight was to provide room for the caption. But all in all, > this is no solution! > > If it is any help, the setup dimensions for the book are US Digest: > > \definepapersize > [ACN][width=5.5in,height=8.5in] % w140mm x h216mm > > I then looked up how one might do it in LaTeX, and found the following link: > https://tex.stackexchange.com/questions/23860/how-to-include-a-picture-over-two-pages-left-part-on-left-side-right-on-right > > How much of that would be transferable to ConTeXt? (I am thinking > particularly of the \newcommand*{\twopagepicture}[4] bit. > > There are explanations for how to do this in InDesign, and since it is > something someone might often want to do (e.g. in magazines), I also thought > it might be easier to find reference to it on Contextgarden, yet haven't > found anything there. But I am sure ConTeXt has a way to do this. > > Could someone point me in the right direction with this please? > > Julian > > ___ > 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] further to the single image across two page spread
After sending my previous email, I realised that my own attempt could be quite misleading, since there I was using two separate images across facing pages. I was simply trying to get the two images to 'marry' across the divide! But that is not my problem, since what I need to do is to get the one image (a suitable landscape image I might add) to run seamlessly across a two-page spread (which is what the LaTeX example I gave does). Sorry for any confusion, Julian ___ 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] image across 2 page spread
Hi list, With 99% of work complete on a book, including single page images, I now find myself confronted with a final problem: how to run one image across facing pages or in other words, one image (plus its caption) across a two-page spread, such that there is no gap. I have tried a number of fairly crass attempts (obviously too simple) to see if I could get somewhere near what I want, e.g. \externalfigure[plate12.jpg][width=\paperwidth, height=.7\paperheight, frame=none] {\tfx \sc Plates 12, 13. \tfx Twenty trucks from the Netherlands setting off} \externalfigure[plate13.jpg][width=\paperwidth, height=.7\paperheight, frame=none] {\tfx for their first mission amongst the German diaspora.} My thinking here was that \paperwidth might help extend the image to the inner edge on the left-hand page, but it doesn't work that way for the right-hand page, since there it extends to the outer edge, not the inner edge! The .7\paperheight was to provide room for the caption. But all in all, this is no solution! If it is any help, the setup dimensions for the book are US Digest: \definepapersize [ACN][width=5.5in,height=8.5in] % w140mm x h216mm I then looked up how one might do it in LaTeX, and found the following link: https://tex.stackexchange.com/questions/23860/how-to-include-a-picture-over-two-pages-left-part-on-left-side-right-on-right How much of that would be transferable to ConTeXt? (I am thinking particularly of the |\newcommand*{\twopagepicture}[4]| bit. There are explanations for how to do this in InDesign, and since it is something someone might often want to do (e.g. in magazines), I also thought it might be easier to find reference to it on Contextgarden, yet haven't found anything there. But I am sure ConTeXt has a way to do this. Could someone point me in the right direction with this please? Julian || ___ 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] Blank page added after pagecolumns
I am typesetting a document using pagecolumns to ensure that my footnotes are set ragged-bottom in columns. I have observed some unexpected behavior whenever the last column on a page is left incomplete: a blank page is added at the end of the document. A minimal working example follows: ``` \starttext \startpagecolumns[n=2] \dorecurse{3}{\par\input zapf} \stoppagecolumns \stoptext ``` I typeset this using ConTeXt version 2020.03.10, as released with TeXLive 2020. Notably, if \dorecurse{3} is changed to \dorecurse{2} or \dorecurse{6} (so that the text ends in the first column of a page), then there is no problem. I have tried to fix this by specifying page=no in the \startpagecolumns arguments, but it did not change anything. Is there something else I am missing? Thank you, Joey ___ 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 make page break & headers in XY arrangements?
On 3/30/2020 2:21 PM, Mojca Miklavec wrote: On Mon, 30 Mar 2020 at 13:21, Hans Hagen wrote: On 3/30/2020 1:03 PM, Mojca Miklavec wrote: % I want an actual page break here \page a rather stipid solution: \dorecurse{15}{\page[empty]} I did think of this one (and actually did it for the batch that I had to print today). But it involves manual counting and when data changes, the file needs to be adjusted every time. Anyway, this is relatively low priority. If there is no mechanism for this in place already, there's no need to add anything new. I can live with a few manual adjustments, and I guess I could do something based on current page number modulo total subpages as well.\setuppapersize [XY][A4] \setuppaper [topspace=10mm,backspace=10mm,dx=0mm,dy=0mm,nx=5,ny=13] \setuplayout [page] [topspace=2mm,backspace=2mm] \setuplayout [page] \setuplayout [location=middle] \setuparranging [XY] \showframe \setupbodyfont [8pt] \def\somecontent#1{\startpagemakeup #1 \stoppagemakeup} \starttext \installpagebreakmethod{mojca} {\page \scratchcounterone \numexpr\rootlayouttargetparameter{nx}*\rootlayouttargetparameter{ny}\relax \scratchcountertwo \luaexpr{math.mod(\the\realpageno-1,\the\scratchcounterone)}% \scratchcounterthree\numexpr\scratchcounterone-\scratchcountertwo\relax \dorecurse\scratchcounterthree{\page[empty]}} \setupheadertexts[1][1][1][1]\dorecurse{50}{\somecontent{Label 1 #1}} \page[mojca] \setupheadertexts[2][2][2][2]\dorecurse{70}{\somecontent{Label 2 #1}} \page[mojca] \setupheadertexts[3][3][3][3]\dorecurse{10}{\somecontent{Label 3 #1}} \page[mojca] \setupheadertexts[4][4][4][4]\dorecurse{30}{\somecontent{Label 3 #1}} \page[mojca] \stoptext - 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] How to make page break & headers in XY arrangements?
On Mon, 30 Mar 2020 at 13:21, Hans Hagen wrote: > On 3/30/2020 1:03 PM, Mojca Miklavec wrote: > > > > % I want an actual page break here > > \page > > a rather stipid solution: > > \dorecurse{15}{\page[empty]} I did think of this one (and actually did it for the batch that I had to print today). But it involves manual counting and when data changes, the file needs to be adjusted every time. Anyway, this is relatively low priority. If there is no mechanism for this in place already, there's no need to add anything new. I can live with a few manual adjustments, and I guess I could do something based on current page number modulo total subpages as well. Thank you, Mojca ___ 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 make page break & headers in XY arrangements?
On 3/30/2020 1:03 PM, Mojca Miklavec wrote: Hi, Stupid question: what's the proper way to introduce an actual page break and put some header on the paper holding the XY arrangement of smaller pages? I know I can create the second document which includes the first one and adds page numbers on top, but I'm sure there's a more elegant way to achieve the same. Thank you, Mojca \setuppapersize [XY][A4] \setuppaper [topspace=10mm,backspace=10mm,dx=0mm,dy=0mm,nx=5,ny=13] \setuplayout [page] [topspace=2mm,backspace=2mm] \setuplayout [page] \setuplayout [location=middle] \setuparranging [XY] \showframe \setupbodyfont [8pt] \def\somecontent#1{\startpagemakeup #1 \stoppagemakeup} \starttext % I want to mark the page with label numbers \setupheadertexts[1][1][1][1]% \dorecurse{50}{\somecontent{Label ONE}} % I want an actual page break here \page a rather stipid solution: \dorecurse{15}{\page[empty]} \setupheadertexts[2][2][2][2]% \dorecurse{70}{\somecontent{Label TWO}} \stoptext ___ 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 ___ -- - 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 ___
[NTG-context] How to make page break & headers in XY arrangements?
Hi, Stupid question: what's the proper way to introduce an actual page break and put some header on the paper holding the XY arrangement of smaller pages? I know I can create the second document which includes the first one and adds page numbers on top, but I'm sure there's a more elegant way to achieve the same. Thank you, Mojca \setuppapersize [XY][A4] \setuppaper [topspace=10mm,backspace=10mm,dx=0mm,dy=0mm,nx=5,ny=13] \setuplayout [page] [topspace=2mm,backspace=2mm] \setuplayout [page] \setuplayout [location=middle] \setuparranging [XY] \showframe \setupbodyfont [8pt] \def\somecontent#1{\startpagemakeup #1 \stoppagemakeup} \starttext % I want to mark the page with label numbers \setupheadertexts[1][1][1][1]% \dorecurse{50}{\somecontent{Label ONE}} % I want an actual page break here \page \setupheadertexts[2][2][2][2]% \dorecurse{70}{\somecontent{Label TWO}} \stoptext ___ 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] repeat a page inside a document
Hello Pablo, although I'm not sure about what to achieve, should this be helpful for you? Ctx source: Pablo.mkiv \starttext \setupheadertexts[][\cldcontext{"Mode = " .. (tex.modes["1"] and "1" or tex.modes["2"] and "2" or "??")}] % Just for debugging \input knuth \page[right] \startmodeset [1] {% \setuplayout[page] foo } [2] {% \pagefigure[\jobname_.pdf][page=1] } \stopmodeset \stoptext To be compiled in two runs, with this: d:\Lukas\ConTeXt\Test> Ctx.bat Pablo.mkiv --mode=1 & move /y Pablo.pdf Pablo_.pdf & Ctx.bat Pablo.mkiv --mode=2 Best regards, Lukas On 2020-02-06 16:28, Pablo Rodriguez wrote: Dear list, I have the following sample: \starttext \input knuth \page[right] \setuplayout[page] \externalfigure[\jobname.pdf][page=1] \stoptext My question is how to get a page from the document you‘re compiling repeated inside the same document. I have tried to search both i-context.pdf and the wiki, but “mirror” and “repeat” seem to be bad options. Many thanks in advance, Pablo -- http://www.ousia.tk ___ 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 ___ \starttext \setupheadertexts[][\cldcontext{"Mode = " .. (tex.modes["1"] and "1" or tex.modes["2"] and "2" or "??")}] % Just for debugging \input knuth \page[right] \startmodeset [1] {% \setuplayout[page] foo } [2] {% \pagefigure[\jobname_.pdf][page=1] } \stopmodeset \stoptext ___ 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] Chapter in header, but not on title page
> Am 2020-02-15 um 23:20 schrieb Pablo Rodriguez : > > > On 2/15/20 9:16 PM, Henning Hraban Ramm wrote: >> I guess I’m stupid. >> I’d like to have my chapter title in the header on right pages, but >> not on the first page of a chapter, that always is a right page. >> Since I’d like to keep the page number in the header on these pages, >> I can’t use header=empty. >> What’s the right setup for me? > > Hi Hraban, > > I think this is what you intend: >\definetext[chapter-first][header][][pagenumber] > >\setuphead[chapter][% > page={yes, header, right}, > header=chapter-first, >] > > Just in case it helps, Thank you, that works in the example, but not in my actual project, and I didn’t find why. But I found a workaround (used \setupheadertexts before and in the middle of the chapter). In the end there was just one chapter left where the problem arose, since the other chapters use a different setup (double page intro). Best, 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] Chapter in header, but not on title page
On 2/15/20 9:16 PM, Henning Hraban Ramm wrote: > I guess I’m stupid. > I’d like to have my chapter title in the header on right pages, but > not on the first page of a chapter, that always is a right page. > Since I’d like to keep the page number in the header on these pages, > I can’t use header=empty. > What’s the right setup for me? Hi Hraban, I think this is what you intend: \usemodule[visual] \setuppagenumbering[alternative=doublesided, location=] \setupheadertexts[chapter][pagenumber][pagenumber][chapter] \definetext[chapter-first][header][][pagenumber] \setuphead[chapter][% page={yes, header, right}, header=chapter-first, ] \starttext \dorecurse{5}{ \startchapter[title={\fakewords{2}{5}}] \dorecurse{5}{ \fakewords{100}{400}\par } \stopchapter } \stoptext Just in case it helps, Pablo -- http://www.ousia.tk ___ 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] Chapter in header, but not on title page
I guess I’m stupid. I’d like to have my chapter title in the header on right pages, but not on the first page of a chapter, that always is a right page. Since I’d like to keep the page number in the header on these pages, I can’t use header=empty. What’s the right setup for me? (In the MWE there’s still a page number in the center, that’s not my problem.) \usemodule[visual] \setuppagenumbering[alternative=doublesided] \setupheadertexts[chapter][pagenumber][pagenumber][] \setuphead[chapter][ page=right, ] \starttext \dorecurse{5}{ \startchapter[title={\fakewords{2}{5}}] \dorecurse{5}{ \fakewords{100}{400}\par } \stopchapter } \stoptext Greetlings, Hraban --- https://www.fiee.net http://wiki.contextgarden.net https://www.dreiviertelhaus.de GPG Key ID 1C9B22FD ___ 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] page break
Hi, Sorry if my minimal example is not, but I have to understand with your help what is wrong. For example, why a page break after the second item when there seems to be enough space to stay on this page ? Thanks Fabrice \define\starttikzpicture {\hbox\bgroup\forcecolorhack\tikzpicture} \define\stoptikzpicture {\endtikzpicture\egroup} \define[2]\CScript{\start\switchtobodyfont[xitsbidi]\m{{\mathscript{#1}}_{#2}}\stop} \usemodule[tikz] \usemodule[pgfplots] \pgfplotsset{compat=newest} \unexpanded\def\R{\math{\mathbb{R}}\autoinsertnextspace} \unexpanded\def\intervalff#1#2{\math{\left[#1\nonscript\,;#2\right]}} \unexpanded\def\point#1#2#3{\math{#1\left(#2\,;#3\right)}} \switchtobodyfont[pagella,11pt] \definefloat [recipe] [figure] \setupfloat [recipe] [default={right,nonumber}] \setuppagenumbering [alternative=, location=] \starttext \startitemize[n] \startitem {\it Pour tout événement \m{E}, on note \m{\overline{E}} l'évènement contraire de \m{E}.} \blank On considère l'arbre pondéré suivant : \startlinecorrection[blank] \startmidaligned \starttikzpicture [level 1/.style={level distance=40mm,sibling distance=25mm,very thick}, level 2/.style={level distance=35mm,sibling distance=20mm,very thick}] \node{}[grow=right] child {node{\m{\overline{R}}} child{node{\m{\overline{S}}}edge from parent node[below=2pt]{0,8}} child{node{\m{S}}edge from parent node[above=2pt]{0,2} } edge from parent node[below=2pt]{0,3}} child {node{\m{R}} child{node{\m{\overline{S}}}edge from parent node[below=2pt]{0,6}} child{node{\m{S}}edge from parent node[above=2pt]{0,4}} edge from parent node[above=2pt]{0,7}}; \stoptikzpicture \stopmidaligned \stoplinecorrection {\bi Affirmation 1 : } La probabilité de \m{\overline{R}} sachant \m{S} est 0,06. \stopitem \blank \startitem Soit \m{f} une fonction dérivable sur l'intervalle \intervalff{0}{15}. On suppose que sa fonction dérivée, notée \m{f'}, est continue sur \intervalff{0}{15}. Les variations de \m{f'} sont représentées dans le tableau ci-dessous. \startlinecorrection[blank] \startmidaligned \externalfigure[tab_bacblanc.pdf] \stopmidaligned \stoplinecorrection {\bi Affirmation 2 :} La courbe représentative \CScript{C}{f} de la fonction \m{f} admet une et une seule tangente parallèle à l'axe des abscisses. \stopitem \placerecipe{}{ \hbox{ \starttikzpicture [extended line/.style={shorten >=-#1,shorten <=-#1}, scale=1, every node/.style={scale=0.8}, /pgf/declare function={f(\x)=\x^2 +1 - \x^3;}, /pgf/declare function={g(\x)=-5*\x - 2;}] \startaxis [restrict x to domain=-2:3, xmax=3, xmin=-2, restrict y to domain=-3:4, ymax=4, ymin=-3, x=0.8cm, y=0.8cm, axis x line=middle, axis y line=middle, major tick style=black, axis line style = ultra thick, tick align=outside, tickwidth=0.14cm, tick style=thick, grid=both, xtick={-1,...,2}, ytick={-2,...,3}, extra x ticks={-2,3}, extra x tick label={\null}, extra y ticks={-3,4}, extra y tick label={\null}, extra tick style={tick style={draw=none}}, xlabel=$x$,ylabel=$y$, every axis x label/.style={ at={(ticklabel* cs:1.01)},anchor=west}, every axis y label/.style={ at={(ticklabel* cs:1.01)}, anchor=south}, samples=2000, axis on top=false, >=stealth] \addplot [very thick,domain=-1.25:2] {g(x)}; \addplot [darkred,very thick,domain=-1.25:2] {f(x)}; \node[below left=1pt] at (0,0){\m{0}}; \node[above right] at (-1,{f(-1)}) {\m{A}}; \node[above right] at (0,{g(0)}) {\m{B}}; \node[above right] at (1.2,0.5){\CScript{C}{h}}; \node[left] at (-0.5,0.5){\m{T}}; \node[fill=black,circle,scale=0.5] at (-1,{f(-1)}){}; \node[fill=black,circle,scale=0.5] at (0,{g(0)}){}; \stopaxis \stoptikzpicture } } \startitem La courbe \CScript{C}{h} représentative d'une fonction \m{h} définie et dérivable sur \R est représentée ci-contre. On a tracé la tangente \m{T} à \CScript{C}{h} au point \point{A}{-1}{3}. \m{T} passe par le point \point{B}{0}{-2}. \blan
Re: [NTG-context] repeat a page inside a document
On 2/6/20 10:26 PM, Wolfgang Schuster wrote: > On Thu, 6 Feb 2020 22:04:47 +0100 Pablo Rodriguez wrote: >> [...] >> At least, creating and removing empty files with Lua would be more >> portable. And not having to use an external file would be better. > > Your example is still very confusing and I have no idea > what you're trying to achieve. They way to go depends also > what you try to achieve, when you need an exact copy of > the first page the above is the way to go. Sorry again for the poor explanation, Wolfgang. I must recognize that I need this as a workaround to avoid crap at work (and that is all I’m allowed to explain there). I need an exact copy of the first page in the documents that only contain a single page. Sorry, I cannot provide a minimal sample (only an explanation [and I’m not sure it would be minimal]). What I discovered after my previous message is that both "\savebuffer[whatever][αβδ.γεζ]" and "\ctxlua{os.remove([[\jobname]].."-αβδ.γεζ")}" are portable ways of creating and removing empty files. > Another way is to use a make file (or a ctx-file for ConTeXt) > to add a image of the first page to your document afterwards. I’m not sure I’m getting this: do you mean something similar to \typesetbuffer? Many thanks for your help, Pablo -- http://www.ousia.tk ___ 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] repeat a page inside a document
On Thu, 6 Feb 2020 22:04:47 +0100 Pablo Rodriguez wrote: > On 2/6/20 8:17 PM, Wolfgang Schuster wrote: > > On Thu, 6 Feb 2020 19:02:08 +0100 Pablo Rodriguez wrote: > >> [...] > >> BTW, in my real-world document I use layers which are different for > >> first and other pages. > > > > How many pages has your document, first you write is has only > > one page but now you write about a document with many pages. > > Sorry for the inaccuracies in my previous description, Wolfgang. > > I use a single source combined with data read from CSV files to generate > documents which may contain a single or more than one page. > > I assumed that modes were persistent across runs. And maybe they aren’t > or my approach is wrong. > > >> Could you provide a minimal sample showing how a component may include a > >> page twice? > > > > Can you provide a minimal example of your document because > > there is no solution which works for all cases. > > The sample that seems to work is the following (too tricky for my taste > and I have to adapt it to Windows): > > \installshipoutmethod{savepages} > {\dowithnextbox > {\invokepagehandler{normal}{\copy\nextbox}% > \putboxincache{savedpages}{\number\realpageno}\nextbox} >\hbox} > > \setuppaper[method=savepages] > > \starttext > > \scale[width=\textwidth]{a} > \scale[width=\textwidth]{b} > > \doifmode{*first}{\executesystemcommand{rm zikaasd.abh}} > > \startnotmode[*first] > \ifnum\lastpagenumber<2 > \executesystemcommand{touch zikaasd.abh} > \fi > > \doiffileexistselse{zikaasd.abh}{% > \startlayout[page] > \directboxfromcache{savedpages}{1} > \stoplayout}{} > \stopnotmode > > \stoptext > > I wonder whether there is a better way of doing this. > > At least, creating and removing empty files with Lua would be more > portable. And not having to use an external file would be better. Your example is still very confusing and I have no idea what you're trying to achieve. They way to go depends also what you try to achieve, when you need an exact copy of the first page the above is the way to go. Another way is to use a make file (or a ctx-file for ConTeXt) to add a image of the first page to your document afterwards. 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] repeat a page inside a document
On 2/6/20 8:17 PM, Wolfgang Schuster wrote: > On Thu, 6 Feb 2020 19:02:08 +0100 Pablo Rodriguez wrote: >> [...] >> BTW, in my real-world document I use layers which are different for >> first and other pages. > > How many pages has your document, first you write is has only > one page but now you write about a document with many pages. Sorry for the inaccuracies in my previous description, Wolfgang. I use a single source combined with data read from CSV files to generate documents which may contain a single or more than one page. I assumed that modes were persistent across runs. And maybe they aren’t or my approach is wrong. >> Could you provide a minimal sample showing how a component may include a >> page twice? > > Can you provide a minimal example of your document because > there is no solution which works for all cases. The sample that seems to work is the following (too tricky for my taste and I have to adapt it to Windows): \installshipoutmethod{savepages} {\dowithnextbox {\invokepagehandler{normal}{\copy\nextbox}% \putboxincache{savedpages}{\number\realpageno}\nextbox} \hbox} \setuppaper[method=savepages] \starttext \scale[width=\textwidth]{a} \scale[width=\textwidth]{b} \doifmode{*first}{\executesystemcommand{rm zikaasd.abh}} \startnotmode[*first] \ifnum\lastpagenumber<2 \executesystemcommand{touch zikaasd.abh} \fi \doiffileexistselse{zikaasd.abh}{% \startlayout[page] \directboxfromcache{savedpages}{1} \stoplayout}{} \stopnotmode \stoptext I wonder whether there is a better way of doing this. At least, creating and removing empty files with Lua would be more portable. And not having to use an external file would be better. Many thanks for your help, Pablo -- http://www.ousia.tk ___ 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 ___