3

I'm compiling this simple tex file.

\newcommand\sheetwidth{373.33333333mm}
\newcommand\sheetheight{210mm}
\documentclass[paper=\sheetwidth:\sheetheight]{scrartcl}
\usepackage[ includeheadfoot,  top=8.0mm,  bottom=3.5mm,
left=15.0mm, right=15.0mm, headsep=1.5mm, footskip=8.5mm]{geometry}

\begin{document}
This is my test
\end{document}

However, when I compile it I get the wrong output. The width should be larger than the height. This is what I see:

enter image description here

I'm working in windows and compiling the tex document using pdflatex (compiling with lualatex gives the same output). I've already tried to re-install miktex but this doesn't solve the problem.

  • 1
    scrartcl from koma-script offers much better options for setting the page dimensions than geometry. You should use these - or even better: typearea. – Martin Schröder Feb 24 '17 at 21:33
6

Pass the options to geometry:

\newcommand\sheetwidth{373.33333333mm}
\newcommand\sheetheight{210mm}

\documentclass{scrartcl}
\usepackage[
  paperwidth=\sheetwidth,
  paperheight=\sheetheight,
  includeheadfoot,
  top=8.0mm,
  bottom=3.5mm,
  left=15.0mm,
  right=15.0mm,
  headsep=1.5mm,
  footskip=8.5mm
]{geometry}

\begin{document}
This is my test
\end{document}

enter image description here

| improve this answer | |
  • Can you define a command before \documentclass? Every day a surprise! – CarLaTeX Feb 24 '17 at 22:19
  • @CarLaTeX Why not? ;-) It's best not to do \def\documentclass{WOW}, though. – egreg Feb 24 '17 at 22:40
1

Tell KOMA-Script that the paper should be landscape instead of portrait:

\newcommand\sheetwidth{373.33333333mm}
\newcommand\sheetheight{210mm}
\documentclass[paper=\sheetwidth:\sheetheight,paper=landscape]{scrartcl}
\usepackage[ includeheadfoot,  top=8.0mm,  bottom=3.5mm,
left=15.0mm, right=15.0mm, headsep=1.5mm, footskip=8.5mm]{geometry}

\begin{document}
This is my test
\end{document}

enter image description here

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.