TeX - LaTeX Asked on May 22, 2021
I want to apply fgruler on my whole document, such that every page has top, left, right, and bottom ruler (if it’s not possible, top ruler and left ruler only is ok). Just like when i’m using M. W@rd, it helps me to measure vspace. But i want the measurement is in inch instead of cm.
Here, my MWE only produces ruler on the first page only:
documentclass{article}
usepackage{blindtext}
usepackage[a4paper, inner=4cm, outer=5cm, top=4cm, bottom=3cm]{geometry}
usepackage[type=none]{fgruler}
begin{document}
fgruler{upperleft}{0cm}{0cm}
blinddocument
end{document}
Below I use eso-pic
to insert top/bottom/left/right rules on each page manually, since you may want to tweak the direction of the rulers individually.
documentclass{article}
usepackage{blindtext}
usepackage[type=none]{fgruler}
usepackage{eso-pic}
% Top-to-bottom, left-to-right
AddToShipoutPictureFG{%
AtPageLowerLeft{ruler[in]{downright}{paperheight}}
AtPageLowerLeft{ruler[in]{rightup}{paperwidth}}
AtPageUpperLeft{raisebox{-height}{ruler[in]{rightdown}{paperwidth}}}
AtPageLowerLeft{makebox[paperwidth][r]{ruler[in]{downleft}{paperheight}}}
}%
% Bottom-to-top, left-to-right
%AddToShipoutPictureFG{%
% AtPageLowerLeft{ruler[in]{upright}{paperheight}}
% AtPageLowerLeft{ruler[in]{rightup}{paperwidth}}
% AtPageUpperLeft{raisebox{-height}{ruler[in]{rightdown}{paperwidth}}}
% AtPageLowerLeft{makebox[paperwidth][r]{ruler[in]{upleft}{paperheight}}}
%}%
begin{document}
blinddocument
end{document}
Correct answer by Werner on May 22, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP