Probably a very simple question, but how do I get a page number to be centered, at the bottom and vertically in the middle whilst having my doc margins?
![](https://secure.gravatar.com/avatar/f1d4a0098f72e50f9892b2114dac79b5.jpg?s=120&d=mm&r=g)
I have the following code that I tried editing with no success https://pastebin.com/jT58Z8uY This has no footer or header but when I add code for a header that is AI generated it outputs a wrong result l, and I tried reading documentation too but didn't really find anything helpful What I want; everything that is included in the preamble that affects the sizing and alignment, but I want a bottom centered page number that is vertically aligned (it doesn't have to be perfect but I think context can oroabbly do that? I'm a complete novice, sorry). Would greatly appreciate if someone can format this into the doc. Thank you!
![](https://secure.gravatar.com/avatar/3d131c6a351a6b0092c19b389bd99cf0.jpg?s=120&d=mm&r=g)
Hi,
I am not sure I understand what you want, but if you change footer=0in
to footer=.5in and then add
\setuppagenumbering
[location=footer]
you will get pagenumbers in the footer. If you need to tweak your
layout more, it might be helpful to add
\showframe
to get a hint on how the page is set up, or even
\showlayout
if you want some more information.
/Mikael
PS You can also play with
\setupfootertexts
[pagenumber]
or
\setupfootertexts
[pagenumber]
[B]
On Mon, Aug 19, 2024 at 7:32 AM Felix
I have the following code that I tried editing with no success
This has no footer or header but when I add code for a header that is AI generated it outputs a wrong result l, and I tried reading documentation too but didn't really find anything helpful
What I want; everything that is included in the preamble that affects the sizing and alignment, but I want a bottom centered page number that is vertically aligned (it doesn't have to be perfect but I think context can oroabbly do that? I'm a complete novice, sorry). Would greatly appreciate if someone can format this into the doc. Thank you! ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___________________________________________________________________________________
![](https://secure.gravatar.com/avatar/f1d4a0098f72e50f9892b2114dac79b5.jpg?s=120&d=mm&r=g)
Hello mikail, I would send a picture to be more clear with what I want but it seems to not be possible, what adding the footer=.5in code does is simply take away .5in from the bottom margin, what I mean is that The bottom margin really just becomes 1in because the footer takes up .5in from the margin setting, ``` \setuppapersize [letter] [letter] \setuplayout[ backspace=0.5in, topspace=0.5in, header=0in, % No headers footer=.5in, % Space for the footer width=middle, height=middle, ] \setuppagenumbering [location=footer] \showframe \definefontfeature [default] [default] [trep=yes] \definefontfamily [TimesNewRoman] [rm] [Times New Roman] \definetypeface [TimesNewRoman] [mm] [math] [stixtwo] \setupbodyfont [TimesNewRoman,12pt] \mainlanguage[en-us] \setupindenting[yes,0.5in] \setupheads[indentnext=yes] % To get indentation after section numbers, use this \startsetups document:start \centerline{\documentvariable{title}} \centerline{\documentvariable{author}} \centerline{\documentvariable{date}} \blank[line] \stopsetups \startdocument[title=Title,author=Author,date=Date] \stopdocument ``` I hope this better explains what I am trying to achieve
![](https://secure.gravatar.com/avatar/5955e8e90611e77ccbfc7721b6112027.jpg?s=120&d=mm&r=g)
On 8/19/24 17:11, Felix wrote:
Hello mikail, I would send a picture to be more clear with what I want but it seems to not be possible Hi Felix,
attachments to the list should be less than 100kb. If you generate your image as a PNG file, it should fit in that file size. I attach sample image (from the next minimal sample).
what adding the footer=.5in code does is simply take away .5in from the bottom margin, what I mean is that The bottom margin really just becomes 1in because the footer takes up .5in from the margin setting,
Well, the extra half inch is taken from the text body, not from the bottom margin. I mean, when you set up topspace and height to mmiddle, bottomspace will have the same value as topspace. Here you have a stupid sample: \showframe\showgrid \setuppapersize [letter] \setuplayout[ backspace=0.5in, topspace=\topspace, header=0in, % No headers footer=5in, % Space for the footer width=middle, height=middle, ] \starttext \null \stoptext Now some comments (just for your info):
\setuppapersize [letter] [letter]
When both papersizes are the same, I’d say the second one is redundant.
\setupbodyfont [TimesNewRoman,12pt]
The default value for font size is 12pt, so this isn’t really required.
\mainlanguage[en-us]
The default language is US English, so this isn’t really required. I hope it helps, Pablo
participants (3)
-
Felix
-
Mikael Sundqvist
-
Pablo Rodriguez