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
  • 1
    scrartcl from koma-script offers much better options for setting the page dimensions than geometry. You should use these - or even better: typearea. Feb 24, 2017 at 21:33

2 Answers 2

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

2
  • Can you define a command before \documentclass? Every day a surprise!
    – CarLaTeX
    Feb 24, 2017 at 22:19
  • @CarLaTeX Why not? ;-) It's best not to do \def\documentclass{WOW}, though.
    – egreg
    Feb 24, 2017 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

You must log in to answer this question.

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