1

I have this MWE:

\documentclass[11pt]{article}
\pagestyle{empty}
\usepackage{blindtext}

\usepackage[pass]{geometry}
\geometry{showframe,a4paper}

\begin{document}

\blindtext

\end{document}

enter image description here

I'd like to remove the geometry stuff from the file and pass it by command line. I mean something like:

latex "\AtBeginDocument{\RequirePackage[pass]{geometry}\geometry{showframe,a4paper}}\
\input{myfile.tex}" 

As it is, it doesn't work (the frame isn't added). Is it possible to do it?

1 Answer 1

2

Try this:

  • Firstly, load etoolbox
  • Then load and config geometry inside \AtEndPreamble{...}
pdflatex -jobname=myfile '\RequirePackage{etoolbox}\AtEndPreamble{\usepackage[pass]{geometry}\geometry{showframe, a4paper}}\input{myfile}'

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .