I use KOMA-Script for most everything, including correspondence. This is painless when I am using A4 paper, but when I try to use US letter, the problems start.
With the scrartcl class, \KOMAoptions{paper=letter} does the trick.
With the scrlttr2 class:
If the default class option file is used (DIN.lco, I believe), then \KOMAOptions{paper=letter} has no effect. The document compiles with this warning:
Class scrlttr2 Warning: Letter option file `DIN.lco'
(scrlttr2) needs paper size `a4'.
(scrlttr2) Current paper size is not `a4'!
(scrlttr2) You should add `paper=a4' at the
(scrlttr2) option list of \documentclass!
(scrlttr2) Maybe you know what you are doing,
(scrlttr2) so I do not change this myself.
and the output is A4.
If I use UScommercial9.lco without paper=letter, it compiles with this warning:
Class scrlttr2 Warning: Letter option file `UScommercial9.lco'
(scrlttr2) needs paper size `letter'.
(scrlttr2) Current paper size is not `letter'!
(scrlttr2) You should add `paper=letter' at the
(scrlttr2) option list of \documentclass!
(scrlttr2) Maybe you know what you are doing,
(scrlttr2) so I do not change this myself.
If I use the UScommercial9.lco, as in this MWE:
\documentclass[UScommercial9]{scrlttr2}
\usepackage[english]{babel}
\listfiles
\KOMAoptions{paper=letter,fromphone=true,fromfax=false}
\begin{document}
\setkomavar{fromname}{Stephen Bosch}
\setkomavar{fromaddress}{10 Lemon Lane \\ Sour Orchards BC V0E 0B0}
\setkomavar{fromphone}{+1 250 377 4141}
\begin{letter}{Tremulor Nocharme \\ Compliance Officer \\ Special TPS Police
\\ Fram Jammer Building \\ 320, 220 -- 4 Street \\ Treacleton AB T0M 0M0}
\setkomavar{subject}{Late TPS reports 2008, 2009, 2010, 2011, 2012}
\opening{Dear Mr. Nocharme,}
Attached please find the TPS reports you requested. Please accept my apologies for the delay.\\
\closing{Sincerely,}
\end{letter}
\end{document}
I no longer receive the warning, but the output is still A4.
In addition, when I try to simplify my MWE further by removing the
\usepackage[english]{babel}
line, I get a series of very strange errors:
! Undefined control sequence.
\select@language ... \@empty }\languageshorthands
{none}\babel@beginsave \cs...
l.8 \begin{document}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
! Undefined control sequence.
\select@language ...me \relax \babel@savevariable
\lefthyphenmin \babel@save...
l.8 \begin{document}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
! Undefined control sequence.
\select@language ...hyphenmin \babel@savevariable
\righthyphenmin \expandaft...
l.8 \begin{document}
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
Class scrlttr2 Info: used language is `english'.
(scrlttr2) Supported languages are `english', `UKenglish',
(scrlttr2) `british', `american', `USenglish',
(scrlttr2) `german', `ngerman', `austrian', `naustrian',
(scrlttr2) `dutch', `italian', `spanish',
(scrlttr2) `croatian', `finnish', `norsk' on input line 8.
Note: I get this error even though I have deleted all the output files (including aux)! To my knowledge, KOMA-Script and DIN.lco do not require babel, and yet the error messages suggest that there are babel leftovers somewhere. If so, I know not where, because I have deleted everything that I can see prior to compiling. I have read this post and this post already.
The files used (from \listfiles) are:
*File List*
scrlttr2.cls 2012/07/29 v3.11b KOMA-Script document class (letter)
scrkbase.sty 2012/07/29 v3.11b KOMA-Script package (KOMA-Script-dependent ba
sics and keyval usage)
scrbase.sty 2012/07/29 v3.11b KOMA-Script package (KOMA-Script-independent
basics and keyval usage)
keyval.sty 1999/03/16 v1.13 key=value parser (DPC)
scrlfile.sty 2012/06/15 v3.12 KOMA-Script package (loading files)
scrsize12pt.clo 2012/07/29 v3.11b KOMA-Script font size class option (12pt)
typearea.sty 2012/07/29 v3.11b KOMA-Script package (type area)
DIN.lco 2012/07/29 v3.11b KOMA-Script letter-class-option
UScommercial9.lco
***********
In case it is relevant, I am using XeTeX when compiling.
scrlttr2examples had a\usepackage[language]{babel}, apparently it's required although I couldn't find a direct statement saying so. It makes since though why it is needed. I get a more sensible error message:! Package babel Error: You haven't loaded the option english yet....... – abdulhaq-e Mar 17 '13 at 18:37pagesizework? This should be enough to write the page size into the pdf. – Josef Mar 17 '13 at 19:14babelis necceccary ... – Mensch Mar 17 '13 at 19:15pagesizeor your comment is misinterpretative … This option is for choosing the output driver, more see in documentation. – Speravir Mar 17 '13 at 22:40pagesizeis not for choosing the output driver. It writes the specified page size into the output file. Otherwise the distribution's page size default is used. If i addpagesizeto Stephen'S MWE as global option i get a PDF in letter size. Withoutpagesizei get A4. You can add something likepagesize=pdftex, but in general koma script is clever enough to detect the output driver itself. – Josef Mar 18 '13 at 10:27DIN.lcoforces page size A4 with\LetterOptionNeedsPapersize{DIN}{a4}, which is not a surprise. DIN.lco provides the design of a german business letter defined by DIN. I have not checked the norm, but i guess DIN forces A4. No surprise again for the 'inventor' of the A,B,C paper series. – Josef Mar 18 '13 at 11:00pagesizemeanspagesize=auto. – Speravir Mar 18 '13 at 22:28pagesizeneeds to know the output driver because the code to specify the page size is depending on the output driver.pdftexfor example offers the primitives\pdfpagewidthand\pdfpageheight. In case ofdvipsthe page size is written in so called special into the dvi, which is read bydvips, which then writes the page size into the postscript file. So, pagesize is really not for specifying the output driver in general. It's just a indicator forpagesize, which commands should be used. And in general even this is not necessary, as the koma classes can detect themselves. – Josef Mar 18 '13 at 23:22scrguien.pdf: “With option pagesize you may select an output driver for writing the paper size into the destination document.” This I was referring in my first reply to you. – Speravir Mar 18 '13 at 23:47pagesizeis default. With this usingpaper=letteris enough to get a PDF with letter page size. And if you usegeometry(see answer) it is enough to use optionpaper=letterbefore loadinggeometryor to loadgeometrywith optionletterpaper. So the problem should be obsolete. – Schweinebacke Jun 21 '17 at 06:45