Alan Bowen schrieb am 30.03.2024 um 20:59:
How can I get the last page number of a chapter for a list (ToC)?
Outside of a list, I use \lastpagenumber.
But that does not work in a list such as the ToC.
Any tips or pointers will be gladly received.
You can try this:
\definepagestate[alanpage
.)
\definelistalternative[startendfmpages][renderingsetup=list:startendfmpages]
\startsetups[list:startendfmpages]
\structurelistuservariable{itemAuthor}\crlf
\structurelistuservariable{itemTitle}\hfill%
\at[\currentlistentrypagenumber]–\at[\lastpagenumber]
\vglue1pc
\stopsetups
where I
> On 30 Mar 2024, at 19:59, Alan Bowen wrote:
>
> How can I get the last page number of a chapter for a list (ToC)?
>
> Outside of a list, I use \lastpagenumber.
> But that does not work in a list such as the ToC.
>
> Any tips or pointers will be gladly received.
How can I get the last page number of a chapter for a list (ToC)?
Outside of a list, I use \lastpagenumber.
But that does not work in a list such as the ToC.
Any tips or pointers will be gladly received.
Alan
]
[\pagenumber\space of \lastpagenumber]
-
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma
[state=repeat].
Thank you!
But \setupbackgrounds[footer][text][background=Blocks,state=repeat]
doesn’t work.
Does this make sense if I don’t want layers in _all_ areas to repeat?
\setuppapersize[SW]
\startuseMPgraphic{Blocks}
fill unitsquare xysized (OverlayWidth * PageNumber / LastPageNumber
\setupbackgrounds[state=repeat].
\setuppapersize[SW]
\startuseMPgraphic{Blocks}
fill unitsquare xysized (OverlayWidth * PageNumber / LastPageNumber,
OverlayHeight) withcolor blue;
%setbounds currentpicture to OverlayBox;
\stopuseMPgraphic
\defineoverlay[Blocks][\useMPgraphic{Blocks}]
\setupbackgrounds[state
On Sun, 8 Nov 2020 at 13:44, Pablo Rodriguez wrote:
> On 11/8/20 11:48 AM, Sylvain Hubert wrote:
> > Indeed, \setupfooterexts is much clearer for page numbering. Thanks for
> > the help!.
> >
> > Btw, do you know whether there is any difference between \lastpagenumber
On 11/8/20 11:48 AM, Sylvain Hubert wrote:
> Indeed, \setupfooterexts is much clearer for page numbering. Thanks for
> the help!.
>
> Btw, do you know whether there is any difference between \lastpagenumber
> and \lastuserpagenumber mentioned both by Wolfgang and by the excursi
t;mailto:oi...@gmx.es <mailto:oi...@gmx.es>>> wrote:
>
> Hi Sylvain,
>
> \setupfootertexts[\pagenumber/\lastpagenumber]
> \starttext
> \dorecurse{25}{\null\page}
> \stoptext
>
>
&
>
> > \setupfootertexts[\pagenumber/\lastpagenumber]
> >\starttext
> >\dorecurse{25}{\null\page}
> >\stoptext
> >
> >
> > Indeed, \setupfooterexts is much clearer for page numbering. Thanks for
> > the help!.
> >
>
Sylvain Hubert schrieb am 08.11.2020 um 11:48:
On Sun, 8 Nov 2020 at 10:31, Pablo Rodriguez <mailto:oi...@gmx.es>> wrote:
Hi Sylvain,
\setupfootertexts[\pagenumber/\lastpagenumber]
\starttext
\dorecurse{25}{\null\page}
\stoptext
Indeed, \setupf
On Sun, 8 Nov 2020 at 10:31, Pablo Rodriguez wrote:
> Hi Sylvain,
>
> \setupfootertexts[\pagenumber/\lastpagenumber]
> \starttext
> \dorecurse{25}{\null\page}
> \stoptext
>
Indeed, \setupfooterexts is much clearer for page numbering. Thanks for the
help!.
Btw
e
> }{/\lastcounter[userpage]}]
>
> but \lastcounter[userpage] results in empty string.
Hi Sylvain,
\setupfootertexts[\pagenumber/\lastpagenumber]
\starttext
\dorecurse{25}{\null\page}
\stoptext
I never used you approach with \setuppagenubering (all being said).
This migh
> \setupbackgrounds[page][background=pgnumber]
> \starttext
> \placelist[section][alternative=d]
> \dorecurse{16}{\section{Section}}
> \pagenumber/\lastpagenumber
> \setlayer[pgnumber]
> {\comment{\pagenumber}}
> \stoptext
>
> Could anyone confirm the iss
]
\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
]
\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
\scale[width=\textwidth]{a}
> \scale[width=\textwidth]{b}
>
> \doifmode{*first}{\executesystemcommand{rm zikaasd.abh}}
>
> \startnotmode[*first]
> \ifnum\lastpagenumber<2
> \executesystemcommand{touch zikaasd.abh}
> \fi
>
>
\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.a
}}
\ruledhbox to \hsize{\hbox{Q}\hss\hbox{B}}
\ruledhbox to \hsize{\hbox{\smash[d]{Q}}\hss\hbox{B}}
\stoptext
\setupfootertexts
[margin]
[]
[{\externalfigure[logo.png][height=]}]
[]
[{\externalfigure[logo.png][height=]}]
\setupfootertexts[{Page \pagenumber\ of \goto{\lastpagenumber}[lastpage
,
backspace=20mm,
width=middle]
\setupbackgrounds
[header]
[text]
[frame=off,
topframe=on,
bottomframe=on,
framecolor=,
rulethickness=1pt]
\setupinteraction[state=start]
\setupfooter[margin][strut=no]
\setupfootertexts[{Page \pagenumber\ of \goto{\lastpagenumber
wframe
\setupfootertexts[][Page\,\pagenumber\,sur\,\lastpagenumber]
\setuppagenumbering[location=]
\starttext
\dorecurse{50}{a\page}
\stoptext
Wikify what you think it may help others (or that it might have helped
you if it w
}]
\unknown
\stopxcell
\stopxcellgroup
\stopxrow
\startxrow
\startxcellgroup[height=1cm,foregroundstyle=small]
\startxcell[width=0.10\paperwidth,align={flushright,lohi}]
Pagina
\stopxcell
\startxcell[width=0.15\paperwidth,align={flushleft,lohi}]
\pagenumber/\lastpagenumber
\stopxcell
\stopxcellgroup
\startxcell[width=0.15\paperwidth,align={flushleft,lohi}]
\pagenumber/\lastpagenumber
\stopxcell
\stopxcellgroup
\stopxrow
\stopembeddedxtable
\stopsetups
\stopxcell
\startxcell[width=0.15\paperwidth,align={flushleft,lohi}]
\pagenumber/\lastpagenumber
\stopxcell
\stopxcellgroup
and the third page footer to render Page 2 of 2. That is, I
would like the first (title) page to not be used in the computation of
\currentpage or \lastpage.
The name of the counter is “userpage” and you have to use \pagenumber and
\lastpagenumber to show the correct values.
\setupfooter
: \totalnumberofpages \par
%% synonyms: \nofuserpages, \lastuserpagenumber
last user page: \lastpagenumber\par
%% for sake of completeness
first real page \firstpage \par
\chapter{no counting}
\dorecurse{5}{%
\section{iteration \recurselevel}
\starttable[|l|l|]
\NC counter\NC value
}]
\setupbackgrounds[page][background={{2e31ddc5-43da-4879-a223-61674e0df438}}]
\setuplayout[contents_1]
\edef\lastpagenumber{\pagenumber}
{\bf November 08, 2010}
({\bf Enryakuji})
\ifnum\pagenumber\lastpagenumber
\setupbackgrounds[page][background={{}}]\setuplayout[contents_4]
\fi\pagenumber\par
My labmates
Thank you (again). It seems that
\setupfootertexts[Page \pagenumber~of~\lastpagenumber]
also works.
___
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : ntg-context
?
\defineoverlay
[pagenumber]
[\vbox to \paperheight
{\blank[force,3cm]
\midaligned{\pagenumber\ – \lastpagenumber}
\vfill}]
\setupbackgrounds[page][background={foreground,pagenumber}]
\starttext
...
\stoptext
Wolfgang
mechanisms
Could you give me an example about background mechanism ?
\defineoverlay
[pagenumber]
[\vbox to \paperheight
{\blank[force,3cm]
\midaligned{\pagenumber\ – \lastpagenumber}
\vfill}]
\setupbackgrounds[page][background={foreground,pagenumber}]
\starttext
[dummy][#2][][#1]\from[dummy]
Cheers, Peter
P.S: Any news about the problems with \placehead and \lastpagenumber ?
--
Contact information: http://pmrb.free.fr/contact/
___
If your question is of interest to others
On Thu, 11 Jun 2009, Hans Hagen wrote:
Peter Münster wrote:
\lastpagenumber ?
should work in the beta
Indeed, thanks!
Peter
--
Contact information: http://pmrb.free.fr/contact/
___
If your question
Hello,
\lastpagenumber is 1 but should be 5:
\setupfootertexts[\pagenumber/\lastpagenumber]
\starttext
\dorecurse5{bla\page}
\stoptext
Cheers, Peter
--
Contact information: http://pmrb.free.fr/contact
prefix.
I still can't get the total number of pages to work out right if I
have a title page. I used standardmakeup to keep the title page from
being numbered, but it is still counted in \totalnumberofpages.
Use \lastpagenumber.
Wolfgang
}
\stopsetups
\startsetups head:table:first
\bTABLE[textwidth=\textwidth,option=stretch,align=right]
\bTR
\bTD[nx=2] Type of document\\\getvariable{document}{type} \eTD
\bTD Page\\\pagenumber\space(\lastpagenumber) \eTD
\eTR
\bTR
\bTD Name of document\\\getvariable{document}{name} \eTD
\setuppagenumbering[left={stran },right={ od \lastpagenumber},location=right]
\chapter{Kr en poglavje}
\section[1]{Prvo poglavje}
\input tufte
\subsection[1.1]{podpoglavje}
\input knuth
tuki citiram, veš? \footnote{\cite[extras={ str. IV-VI in XI}][bavcon_zkp]}
% \placepublications
spremeni jezik v angleÅ¡Äino
\subsection[summary]{Summary}
\input knuth
}
\stopfrontmatter
\startbodymatter
\setuppagenumbering[left={stran },right={ od \lastpagenumber},location=right]
\chapter{Kr en poglavje}
\section[1]{Prvo poglavje}
\input tufte
\subsection[1.1]{podpoglavje}
\input knuth
,location=right]
\placecontent
\section[uvod]{Uvod}
\subsection[povzetek]{Povzetek}
\input knuth
{\en % začasno spremeni jezik v angleščino
\subsection[summary]{Summary}
\input knuth
}
\stopfrontmatter
\startbodymatter
\setuppagenumbering[left={stran },right={ od \lastpagenumber},location=right
% začasno spremeni jezik v angleščino
\subsection[summary]{Summary}
\input knuth
}
\stopfrontmatter
\startbodymatter
\setuppagenumbering[left={stran },right={ od \lastpagenumber},location=right]
\chapter{Kr en poglavje}
\section[1]{Prvo poglavje}
\input tufte
\subsection[1.1]{podpoglavje
.
[...]
\startbodymatter
\page[odd] % only \page give a empty before the \section
\setuppagenumber[number=1]
\setupfootertexts[page \pagenumber{} of \lastpagenumber] % no \totalnumber...
Thanks a lot :)
\dorecurse{10}{\subject{real content} \dorecurse{\recurselevel}{\input knuth
answer but I stumpled across this
question after I was searching for something in the archive and I found
the following solution.
[...]
\startbodymatter
\page[odd] % only \page give a empty before the \section
\setuppagenumber[number=1]
\setupfootertexts[page \pagenumber{} of \lastpagenumber
with alphabetic subpage number
\startinteractionmenu[bottom]
\placelist[chapter] [alternative=bottom,criterium=all,pagenumber=no]
\\
\pagenumber{\characters\subpagenumber}/\lastpagenumber
\stopinteractionmenu
\setupcolors[state=start]
\SetupSteps[defaultsection=Subject]
\starttext
with alphabetic subpage number
\startinteractionmenu[bottom]
\placelist[chapter] [alternative=bottom,criterium=all,pagenumber=no]
\\
\pagenumber{\characters\subpagenumber}/\lastpagenumber
\stopinteractionmenu
\setupcolors[state=start]
\SetupSteps[defaultsection=Subject]
\starttext
: \NC Testperson \NC \NR
\NC Ausgabedatum: \NC 14.06.2007 \NC \NR
\stoptabulate
Seite {\pagenumber} von {\lastpagenumber}
}
}
\stopsetups
\startsetups[allpage]
\setuplayout[
header=3.6cm,
]
\hbox {\framed[height=3.6cm,width=6.22cm,x=0cm,y=0mm,frame=off,offset=none,frameoffset=0mm] {} \framed
]
Ausdruck des Webseitenbereiches:
\stopalignment
\starttabulate[| l w(2cm) | r w(4.5cm) |]
\NC 1.Eingelogged: \NC Testperson \NC \NR
\NC Ausgabedatum: \NC 14.06.2007 \NC \NR
\stoptabulate
Seite {\pagenumber} von {\lastpagenumber
:=15.8592pt;
BodyFontSize:=12.0pt;
TopSkip:=12.0pt;
StrutHeight:=11.41864pt;
StrutDepth:=4.44055pt;
CurrentWidth:=469.47046pt;
CurrentHeight:=681.80237pt;
EmWidth:=12.0pt;
ExHeight:=5.664pt;
PageNumber:=1;
RealPageNumber:=1;
LastPageNumber:= lastpage;
prologues:=2;
HSize:=469.47046pt
\thisisbytesequence{}
f b {test}
f b {PARTS/ONE.tex}
f e {PARTS/ONE.tex}
f b {PARTS/TWO.tex}
f e {PARTS/TWO.tex}
c \initializevariable\usedcolorchannels{}
f e {test}
c \initializevariable\lastpage{1}
c \initializevariable\lastpagenumber{1}
c \initializevariable\totalnofMPgraphics{0}
c
\initializevariable\lastpagenumber{1}
c \initializevariable\totalnofMPgraphics{0}
c \initializevariable\totalnofpositions{0}
c \initializevariable\totalnofparbackgrounds{0}
c \initializevariable\currentstrategypass{1}
Steffen
___
ntg-context mailing list
ntg-context
{test}
c \initializevariable\lastpage{1}
c \initializevariable\lastpagenumber{1}
c \initializevariable\totalnofMPgraphics{0}
c \initializevariable\totalnofpositions{0}
c \initializevariable\totalnofparbackgrounds{0}
c \initializevariable\currentstrategypass{1}
and the tuo files?
texexec --pdf test.tex
- as Gerben explained) :
%
% TeXUtil 9.0.0 - ConTeXt / PRAGMA ADE 1992-2004 / Commands
%
\thisissectionseparator{:}
\thisisutilityversion{2003.07.19}
\thisisbytesequence{}
\initializevariable\usedcolorchannels{}
\initializevariable\lastpage{1}
\initializevariable\lastpagenumber{1
{chapter}{1}{1}{test}{2::0:1:0:0:0:0:0::2}{2}
r e {index} {2} {} {test} {2::0:1:0:0:0:0:0::2} {2}
f e {tester}
c \initializevariable\lastpage{2}
c \initializevariable\lastpagenumber{2}
c \initializevariable\totalnofMPgraphics{0}
c \initializevariable\totalnofpositions{0}
c \initializevariable
52 matches
Mail list logo