TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am recently having trouble with combining the letter document class with the magyar language option of the babel package. The weird thing is that the last time when I had to use this combination (about half a year ago) there was no problem with it. To give an example, even the following code wouldn't compile on my machine at the moment:


Lorem ipsum.

Does anyone of you have had this problem? I am using TeX Live 2012 on Mac OS X 10.6. I updated all of my packages with the TeX Live Manager, but that didn't solve the problem either.

Any ideas?

Thank you indeed for the help,

EDIT: This is what I get when I run LaTeX on the above code (edited again to get the file list):

This is pdfTeX, Version 3.1415926-2.4-1.40.13 (TeX Live 2012)
 restricted \write18 enabled.
entering extended mode
(./Lorem Ipsum.tex
LaTeX2e <2011/06/27>
Babel <v3.8m> and hyphenation patterns for english, dumylang, nohyphenation, ge
rman-x-2012-05-30, ngerman-x-2012-05-30, afrikaans, ancientgreek, ibycus, arabi
c, armenian, basque, bulgarian, catalan, pinyin, coptic, croatian, czech, danis
h, dutch, ukenglish, usenglishmax, esperanto, estonian, ethiopic, farsi, finnis
h, french, friulan, galician, german, ngerman, swissgerman, monogreek, greek, h
ungarian, icelandic, assamese, bengali, gujarati, hindi, kannada, malayalam, ma
rathi, oriya, panjabi, tamil, telugu, indonesian, interlingua, irish, italian, 
kurmanji, latin, latvian, lithuanian, mongolian, mongolianlmc, bokmal, nynorsk,
 piedmontese, polish, portuguese, romanian, romansh, russian, sanskrit, serbian
, serbianc, slovak, slovenian, spanish, swedish, turkish, turkmen, ukrainian, u
ppersorbian, welsh, loaded.
Document Class: letter 1999/04/29 v1.2z Standard LaTeX document class
No file "Lorem Ipsum".aux.

LaTeX Warning: Please use \usepackage{t1enc} with
               \usepackage[magyar]{babel}, to get accented chars hyphenated.

LaTeX Warning: Please use \usepackage[latin2]{inputenc} with


! LaTeX Error: Can be used only in preamble.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.

l.181 \@onlypreamble

! LaTeX Error: Can be used only in preamble.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.

l.181 \@onlypreamble\makelabels

) [1{/usr/local/texlive/2012/texmf-var/fonts/map/pdftex/updmap/pdftex.map}]
(./Lorem Ipsum.aux)

 *File List*
  letter.cls    1999/04/29 v1.2z Standard LaTeX document class
  size10.clo    2007/10/19 v1.4h Standard LaTeX file (size option)
   babel.sty    2008/07/08 v3.8m The Babel package
  magyar.ldf    2007/10/19 v1.5 Magyar support from the babel v3.7 system

Output written on "Lorem Ipsum.pdf" (1 page, 12274 bytes).
SyncTeX written on "Lorem Ipsum.synctex.gz"
Transcript written on "Lorem Ipsum.log".
share|improve this question
With my updated-today TeX Live set up, I get magyar.ldf 2005/03/30 v1.4j (other file versions identical). Did you install something by hand? (There are a number of versions of magyar.ldf in circulation, and one of the big challenges for babel is sorting this.) – Joseph Wright Feb 28 '13 at 20:14
something very odd about that log file (/usr/local/texlive/2012/texmf-dist/tex/latex/base/letter.cls appears twice so the class file has been loaded twice, which accounts for most of the errors. – David Carlisle Feb 28 '13 at 20:19
@JosephWright apparently, this must be a hand-installed version of magyar.ldf, although I don't recall installing that by hand, and I also updated TeX Live today. In fact, I read everywhere that it is strongly recommended to use the 1.5 version of magyar.ldf, since many sources state that the 1.4 version has serious problems regarding Hungarian typesetting rules which has been corrected in the 1.5 version. Apparently, there might be a bug with its interaction with letter... – Siska Ádám Feb 28 '13 at 20:28
@DavidCarlisle Thanks for pointing this out. Do you have any idea how to overcome this? I didn't actually know that I'm loading it twice and I don't really know how to avoid it. – Siska Ádám Feb 28 '13 at 20:29
I don't see how you can get that log from that input (your file runs without error for me). I see you have a space in the filename which is living dangerously but I just tried saving your MWE in such a file and it still worked for me – David Carlisle Feb 28 '13 at 20:32
up vote 8 down vote accepted

So, version 1.5 is used. This style is maintained directly by Péter Szabó. Try


before loading babel and then read the docs available on http://www.math.bme.hu/latex/ . One of them explains: "if a document doesn't compile, but it compiles with defaults=safest, individual options can be turned on one-by-one to see which of them causes the compatibility problem."

share|improve this answer
The so-called 1.5 version purposely loads again the class, to do something related to page style. This, in my opinion, is a VERY BAD THING. – egreg Feb 28 '13 at 21:38

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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