I'm creating a pdf with the scribble/acmart
language. How can I add page numbers to my document?
Page numbers in scribble/acmart
876 Views Asked by Ben Greenman At
2
There are 2 best solutions below
0

- Make a LaTeX file with the line
\settopmatter{printfolios=true}
If the file is named
texstyle.tex
, invoke Scribble with the command:scribble ++style texstyle.tex --pdf FILE.scrbl
The rendered FILE.pdf
should have line numbers.
(If you already had a ++style
file, just add the \settopmatter
line to that.)
The solution Ben gave is one way. But you can actually do this without modifying your
texstyle.tex
file.If you add the following lines to your document, the appropriate topmatter will be added to your pdf file:
You can see it doing this by running:
If you do this, you will notice the following line in your pdf file:
(Where
Hello
andWorld
is the name and author of your paper, and the\title...
macro runs\maketitle
.)This works because the
'pretitle
style (when given to a paragraph), pulls its entire body above the title.And whenever a string is given as the style for an element, it maps to the a latex command.
That is, this scribble code:
Maps to:
The result of composing these two forms together is to drag this to the top of the file.
And because you've done this in scribble rather than latex, you can use Racket's semantics to add page numbers. For example, if you use your own
#lang
, you can now have the language decide whether or not you want pages.