TeX Live and MacTeXa4paper option in \documentclass doesn't work

Information and discussion about TeX Live distribution for all platforms (Windows, Linux, Mac OS X) and the related MacTeX: installing, updating, configuring
Post Reply
gioacchele
Posts: 5
Joined: Fri Mar 27, 2009 12:45 pm

a4paper option in \documentclass doesn't work

Post by gioacchele »

Hi all,
this is my first post in this forum. I've searched this and other forums to solve this problem, but i could not find anything.
I'm using texlive on fedora 10, installed from the repositories.
I can't get latex to use the a4 paper size, neither with \documentclass, nor with the geometry.sty package.

I don't get any error messages from the compiler. Here's the output of the log file.

Any ideas?

Code: Select all

This is pdfTeXk, Version 3.141592-1.40.3 (Web2C 7.5.6) (format=latex 2009.3.26)  27 MAR 2009 11:50
entering extended mode
 %&-line parsing enabled.
**"/home/amir/Desktop/new file.tex"
(/home/amir/Desktop/new file.tex
LaTeX2e <2005/12/01>
Babel <v3.8h> and hyphenation patterns for english, usenglishmax, dumylang, noh
yphenation, arabic, basque, bulgarian, coptic, welsh, czech, slovak, german, ng
erman, danish, esperanto, spanish, catalan, galician, estonian, farsi, finnish,
 french, greek, monogreek, ancientgreek, croatian, hungarian, interlingua, ibyc
us, indonesian, icelandic, italian, latin, mongolian, dutch, norsk, polish, por
tuguese, pinyin, romanian, russian, slovenian, uppersorbian, serbian, swedish, 
turkish, ukenglish, ukrainian, loaded.
(/usr/share/texmf/tex/latex/base/report.cls
Document Class: report 2005/09/16 v1.4f Standard LaTeX document class
(/usr/share/texmf/tex/latex/base/size12.clo
File: size12.clo 2005/09/16 v1.4f Standard LaTeX file (size option)
)
\c@part=\count79
\c@chapter=\count80
\c@section=\count81
\c@subsection=\count82
\c@subsubsection=\count83
\c@paragraph=\count84
\c@subparagraph=\count85
\c@figure=\count86
\c@table=\count87
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
)
(/usr/share/texmf/tex/latex/base/inputenc.sty
Package: inputenc 2006/05/05 v1.1b Input encoding file
\inpenc@prehook=\toks14
\inpenc@posthook=\toks15

(/usr/share/texmf/tex/latex/base/utf8.def
File: utf8.def 2006/03/30 v1.1i UTF-8 support for inputenc
Now handling font encoding OML ...
... no UTF-8 mapping file for font encoding OML
Now handling font encoding T1 ...
... processing UTF-8 mapping file for font encodingT1

(/usr/share/texmf/tex/latex/base/t1enc.dfu
File: t1enc.dfu 2006/03/30 v1.1i UTF-8 support for inputenc
   defining Unicode char U+00A1 (decimal 161)
   defining Unicode char U+00A3 (decimal 163)
   defining Unicode char U+00AB (decimal 171)
   defining Unicode char U+00BB (decimal 187)
   defining Unicode char U+00BF (decimal 191)
   defining Unicode char U+00C0 (decimal 192)
   defining Unicode char U+00C1 (decimal 193)
   defining Unicode char U+00C2 (decimal 194)
   defining Unicode char U+00C3 (decimal 195)
   defining Unicode char U+00C4 (decimal 196)
   defining Unicode char U+00C5 (decimal 197)
   defining Unicode char U+00C6 (decimal 198)
   defining Unicode char U+00C7 (decimal 199)
   defining Unicode char U+00C8 (decimal 200)
   defining Unicode char U+00C9 (decimal 201)
   defining Unicode char U+00CA (decimal 202)
   defining Unicode char U+00CB (decimal 203)
   defining Unicode char U+00CC (decimal 204)
   defining Unicode char U+00CD (decimal 205)
   defining Unicode char U+00CE (decimal 206)
   defining Unicode char U+00CF (decimal 207)
   defining Unicode char U+00D0 (decimal 208)
   defining Unicode char U+00D1 (decimal 209)
   defining Unicode char U+00D2 (decimal 210)
   defining Unicode char U+00D3 (decimal 211)
   defining Unicode char U+00D4 (decimal 212)
   defining Unicode char U+00D5 (decimal 213)
   defining Unicode char U+00D6 (decimal 214)
   defining Unicode char U+00D8 (decimal 216)
   defining Unicode char U+00D9 (decimal 217)
   defining Unicode char U+00DA (decimal 218)
   defining Unicode char U+00DB (decimal 219)
   defining Unicode char U+00DC (decimal 220)
   defining Unicode char U+00DD (decimal 221)
   defining Unicode char U+00DE (decimal 222)
   defining Unicode char U+00DF (decimal 223)
   defining Unicode char U+00E0 (decimal 224)
   defining Unicode char U+00E1 (decimal 225)
   defining Unicode char U+00E2 (decimal 226)
   defining Unicode char U+00E3 (decimal 227)
   defining Unicode char U+00E4 (decimal 228)
   defining Unicode char U+00E5 (decimal 229)
   defining Unicode char U+00E6 (decimal 230)
   defining Unicode char U+00E7 (decimal 231)
   defining Unicode char U+00E8 (decimal 232)
   defining Unicode char U+00E9 (decimal 233)
   defining Unicode char U+00EA (decimal 234)
   defining Unicode char U+00EB (decimal 235)
   defining Unicode char U+00EC (decimal 236)
   defining Unicode char U+00ED (decimal 237)
   defining Unicode char U+00EE (decimal 238)
   defining Unicode char U+00EF (decimal 239)
   defining Unicode char U+00F0 (decimal 240)
   defining Unicode char U+00F1 (decimal 241)
   defining Unicode char U+00F2 (decimal 242)
   defining Unicode char U+00F3 (decimal 243)
   defining Unicode char U+00F4 (decimal 244)
   defining Unicode char U+00F5 (decimal 245)
   defining Unicode char U+00F6 (decimal 246)
   defining Unicode char U+00F8 (decimal 248)
   defining Unicode char U+00F9 (decimal 249)
   defining Unicode char U+00FA (decimal 250)
   defining Unicode char U+00FB (decimal 251)
   defining Unicode char U+00FC (decimal 252)
   defining Unicode char U+00FD (decimal 253)
   defining Unicode char U+00FE (decimal 254)
   defining Unicode char U+00FF (decimal 255)
   defining Unicode char U+0102 (decimal 258)
   defining Unicode char U+0103 (decimal 259)
   defining Unicode char U+0104 (decimal 260)
   defining Unicode char U+0105 (decimal 261)
   defining Unicode char U+0106 (decimal 262)
   defining Unicode char U+0107 (decimal 263)
   defining Unicode char U+010C (decimal 268)
   defining Unicode char U+010D (decimal 269)
   defining Unicode char U+010E (decimal 270)
   defining Unicode char U+010F (decimal 271)
   defining Unicode char U+0110 (decimal 272)
   defining Unicode char U+0111 (decimal 273)
   defining Unicode char U+0118 (decimal 280)
   defining Unicode char U+0119 (decimal 281)
   defining Unicode char U+011A (decimal 282)
   defining Unicode char U+011B (decimal 283)
   defining Unicode char U+011E (decimal 286)
   defining Unicode char U+011F (decimal 287)
   defining Unicode char U+0130 (decimal 304)
   defining Unicode char U+0131 (decimal 305)
   defining Unicode char U+0132 (decimal 306)
   defining Unicode char U+0133 (decimal 307)
   defining Unicode char U+0139 (decimal 313)
   defining Unicode char U+013A (decimal 314)
   defining Unicode char U+013D (decimal 317)
   defining Unicode char U+013E (decimal 318)
   defining Unicode char U+0141 (decimal 321)
   defining Unicode char U+0142 (decimal 322)
   defining Unicode char U+0143 (decimal 323)
   defining Unicode char U+0144 (decimal 324)
   defining Unicode char U+0147 (decimal 327)
   defining Unicode char U+0148 (decimal 328)
   defining Unicode char U+014A (decimal 330)
   defining Unicode char U+014B (decimal 331)
   defining Unicode char U+0150 (decimal 336)
   defining Unicode char U+0151 (decimal 337)
   defining Unicode char U+0152 (decimal 338)
   defining Unicode char U+0153 (decimal 339)
   defining Unicode char U+0154 (decimal 340)
   defining Unicode char U+0155 (decimal 341)
   defining Unicode char U+0158 (decimal 344)
   defining Unicode char U+0159 (decimal 345)
   defining Unicode char U+015A (decimal 346)
   defining Unicode char U+015B (decimal 347)
   defining Unicode char U+015E (decimal 350)
   defining Unicode char U+015F (decimal 351)
   defining Unicode char U+0160 (decimal 352)
   defining Unicode char U+0161 (decimal 353)
   defining Unicode char U+0162 (decimal 354)
   defining Unicode char U+0163 (decimal 355)
   defining Unicode char U+0164 (decimal 356)
   defining Unicode char U+0165 (decimal 357)
   defining Unicode char U+016E (decimal 366)
   defining Unicode char U+016F (decimal 367)
   defining Unicode char U+0170 (decimal 368)
   defining Unicode char U+0171 (decimal 369)
   defining Unicode char U+0178 (decimal 376)
   defining Unicode char U+0179 (decimal 377)
   defining Unicode char U+017A (decimal 378)
   defining Unicode char U+017B (decimal 379)
   defining Unicode char U+017C (decimal 380)
   defining Unicode char U+017D (decimal 381)
   defining Unicode char U+017E (decimal 382)
   defining Unicode char U+200C (decimal 8204)
   defining Unicode char U+2013 (decimal 8211)
   defining Unicode char U+2014 (decimal 8212)
   defining Unicode char U+2018 (decimal 8216)
   defining Unicode char U+2019 (decimal 8217)
   defining Unicode char U+201A (decimal 8218)
   defining Unicode char U+201C (decimal 8220)
   defining Unicode char U+201D (decimal 8221)
   defining Unicode char U+201E (decimal 8222)
   defining Unicode char U+2030 (decimal 8240)
   defining Unicode char U+2031 (decimal 8241)
   defining Unicode char U+2039 (decimal 8249)
   defining Unicode char U+203A (decimal 8250)
   defining Unicode char U+2423 (decimal 9251)
)
Now handling font encoding OT1 ...
... processing UTF-8 mapping file for font encodingOT1

(/usr/share/texmf/tex/latex/base/ot1enc.dfu
File: ot1enc.dfu 2006/03/30 v1.1i UTF-8 support for inputenc
   defining Unicode char U+00A1 (decimal 161)
   defining Unicode char U+00A3 (decimal 163)
   defining Unicode char U+00B8 (decimal 184)
   defining Unicode char U+00BF (decimal 191)
   defining Unicode char U+00C5 (decimal 197)
   defining Unicode char U+00C6 (decimal 198)
   defining Unicode char U+00D8 (decimal 216)
   defining Unicode char U+00DF (decimal 223)
   defining Unicode char U+00E6 (decimal 230)
   defining Unicode char U+00EC (decimal 236)
   defining Unicode char U+00ED (decimal 237)
   defining Unicode char U+00EE (decimal 238)
   defining Unicode char U+00EF (decimal 239)
   defining Unicode char U+00F8 (decimal 248)
   defining Unicode char U+0131 (decimal 305)
   defining Unicode char U+0141 (decimal 321)
   defining Unicode char U+0142 (decimal 322)
   defining Unicode char U+0152 (decimal 338)
   defining Unicode char U+0153 (decimal 339)
   defining Unicode char U+2013 (decimal 8211)
   defining Unicode char U+2014 (decimal 8212)
   defining Unicode char U+2018 (decimal 8216)
   defining Unicode char U+2019 (decimal 8217)
   defining Unicode char U+201C (decimal 8220)
   defining Unicode char U+201D (decimal 8221)
)
Now handling font encoding OMS ...
... processing UTF-8 mapping file for font encodingOMS

(/usr/share/texmf/tex/latex/base/omsenc.dfu
File: omsenc.dfu 2006/03/30 v1.1i UTF-8 support for inputenc
   defining Unicode char U+00A7 (decimal 167)
   defining Unicode char U+00B6 (decimal 182)
   defining Unicode char U+00B7 (decimal 183)
   defining Unicode char U+2020 (decimal 8224)
   defining Unicode char U+2021 (decimal 8225)
   defining Unicode char U+2022 (decimal 8226)
)
Now handling font encoding OMX ...
... no UTF-8 mapping file for font encoding OMX
Now handling font encoding U ...
... no UTF-8 mapping file for font encoding U
   defining Unicode char U+00A9 (decimal 169)
   defining Unicode char U+00AA (decimal 170)
   defining Unicode char U+00AE (decimal 174)
   defining Unicode char U+00BA (decimal 186)
   defining Unicode char U+02C6 (decimal 710)
   defining Unicode char U+02DC (decimal 732)
   defining Unicode char U+200C (decimal 8204)
   defining Unicode char U+2026 (decimal 8230)
   defining Unicode char U+2122 (decimal 8482)
   defining Unicode char U+2423 (decimal 9251)
))
(/usr/share/texmf/tex/generic/babel/babel.sty
Package: babel 2005/11/23 v3.8h The Babel package

(/usr/share/texmf/tex/generic/babel/italian.ldf
Language: italian 2005/11/17 v1.2r Italian support from the babel system

(/usr/share/texmf/tex/generic/babel/babel.def
File: babel.def 2005/11/23 v3.8h Babel common definitions
\babel@savecnt=\count88
\U@D=\dimen103
)
Package babel Info: Making " an active character on input line 91.
Now handling font encoding LGR ...
... no UTF-8 mapping file for font encoding LGR
)) (./new file.aux)
\openout1 = `"new file.aux"'.

LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 5.
LaTeX Font Info:    ... okay on input line 5.
LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 5.
LaTeX Font Info:    ... okay on input line 5.
LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 5.
LaTeX Font Info:    ... okay on input line 5.
LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 5.
LaTeX Font Info:    ... okay on input line 5.
LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 5.
LaTeX Font Info:    ... okay on input line 5.
LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 5.
LaTeX Font Info:    ... okay on input line 5.
LaTeX Font Info:    Checking defaults for LGR/cmr/m/n on input line 5.
LaTeX Font Info:    Try loading font information for LGR+cmr on input line 5.

(/usr/share/texmf/tex/generic/babel/lgrcmr.fd
File: lgrcmr.fd 2001/01/30 v2.2e Greek Computer Modern
)
LaTeX Font Info:    ... okay on input line 5.
LaTeX Font Info:    External font `cmex10' loaded for size
(Font)              <14.4> on input line 10.
LaTeX Font Info:    External font `cmex10' loaded for size
(Font)              <7> on input line 10.
 [1

] (./new file.toc
LaTeX Font Info:    External font `cmex10' loaded for size
(Font)              <12> on input line 2.
LaTeX Font Info:    External font `cmex10' loaded for size
(Font)              <8> on input line 2.
LaTeX Font Info:    External font `cmex10' loaded for size
(Font)              <6> on input line 2.
)
\tf@toc=\write3
\openout3 = `"new file.toc"'.

 [1

]
(./new file.aux) ) 
Here is how much of TeX's memory you used:
 849 strings out of 256217
 9712 string characters out of 1917095
 62286 words of memory out of 1500000
 4176 multiletter control sequences out of 10000+200000
 8800 words of font info for 31 fonts, out of 1200000 for 2000
 645 hyphenation exceptions out of 8191
 24i,6n,24p,174b,179s stack positions out of 5000i,500n,6000p,200000b,15000s

Output written on "new file.dvi" (2 pages, 1648 bytes).

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Keta
Posts: 63
Joined: Tue Nov 25, 2008 1:00 pm

Re: a4paper option in \documentclass doesn't work

Post by Keta »

Could you provide us with a minimal working example? It's hard to know what happens without having the source of the problem.
gioacchele
Posts: 5
Joined: Fri Mar 27, 2009 12:45 pm

a4paper option in \documentclass doesn't work

Post by gioacchele »

The problem occurs with every document.
For example, with this one:

Code: Select all

\documentclass[a4paper, 12pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[italian]{babel}

\begin{document}
\title{prova}
\author{Amir}
\date{\today}

\maketitle
\tableofcontents

\section{Capitolo di prova}
blablabla
\section{Sezione}
bla
\section{Altro capitolo di prova}
blabka

\end{document}
josephwright
Site Moderator
Posts: 814
Joined: Tue Jul 01, 2008 2:19 pm

Re: a4paper option in \documentclass doesn't work

Post by josephwright »

How do you determine your document size? What is your workflow: do you use pdflatex to make a PDF directly or do you go via a DVI?
Joseph Wright
gioacchele
Posts: 5
Joined: Fri Mar 27, 2009 12:45 pm

Re: a4paper option in \documentclass doesn't work

Post by gioacchele »

Hi Joseph,

thanks, pdflatex works properly!

I was using latex to make the dvi file, and dvipdf to make dvi. The output of the pdf is always US letter. I can't check the dvi, as evince can't open dvi files, prompting this error:

Unable to open document
File type TeX DVI document (application/x-dvi) is not supported

So i'll use pdflatex now, but i'm curious to know why i can't produce a4 documents with the other workflow.
phi
Posts: 577
Joined: Tue Oct 21, 2008 8:10 pm

a4paper option in \documentclass doesn't work

Post by phi »

gioacchele wrote:I can't check the dvi, as evince can't open dvi files, prompting this error:
That is quite weird because evince does support DVI files.
gioacchele wrote:So i'll use pdflatex now, but i'm curious to know why i can't produce a4 documents with the other workflow.
You can, but you have to specify the paper size explicitly as there is no notion of "paper size" in the DVI format:

Code: Select all

latex foo.tex
dvips -t a4 foo.dvi
ps2pdf foo.ps
TeX Live (at least version 2008) allows to change the default paper size. But if you want to produce PDFs and don't need PostScript-specific features like PSTricks, pdflatex is usually the way to go.
Post Reply