7

I have a problem with that latest version of babel (3.10). If I compile this file:

\documentclass{article}
\usepackage[ukenglish]{babel}
\pagestyle{empty}
\begin{document}
Hello world!
\end{document}

Then I get the message

LaTeX Error: Command \setlocale already defined.

Why is that?

Here is my log file (this time, I used spanish instead of ukenglish):

This is pdfTeX, Version 3.14159265-2.6-1.40.18 (MiKTeX 2.9.6350 64-bit) (preloaded format=pdflatex 2017.5.8)  29 MAY 2017 11:13
entering extended mode
**./test.tex
(test.tex
LaTeX2e <2017-04-15>
Babel <3.9t> and hyphenation patterns for 74 language(s) loaded.
("C:\Program Files\MiKTeX 2.9\tex\latex\base\article.cls"
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
("C:\Program Files\MiKTeX 2.9\tex\latex\base\size10.clo"
File: size10.clo 2014/09/29 v1.4h Standard LaTeX file (size option)
)
\c@part=\count79
\c@section=\count80
\c@subsection=\count81
\c@subsubsection=\count82
\c@paragraph=\count83
\c@subparagraph=\count84
\c@figure=\count85
\c@table=\count86
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
)
("C:\Program Files\MiKTeX 2.9\tex\generic\babel\babel.sty"
Package: babel 2017/05/19 3.10 The Babel package

("C:\Program Files\MiKTeX 2.9\tex\generic\babel\switch.def"
File: switch.def 2017/05/19 3.10 Babel switching mechanism


! LaTeX Error: Command \setlocale already defined.
               Or name \end... illegal, see p.192 of the manual.

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

\GenericError  ...                                
                                                  \endgroup 
l.301     {Find an armchair, sit down and wait}}

? 
)
*************************************
* Local config file bblopts.cfg used
*
("C:\Program Files\MiKTeX 2.9\tex\latex\arabi\bblopts.cfg"
File: bblopts.cfg 2005/09/08 v0.1 add Arabic and Farsi to "declared" options of
 babel
)
("C:\Program Files\MiKTeX 2.9\tex\latex\babel-spanish\spanish.ldf"
Language: spanish.ldf 2016/03/03 v5.0p Spanish support from the babel system

("C:\Program Files\MiKTeX 2.9\tex\generic\babel\babel.def"
File: babel.def 2017/05/19 3.10 Babel common definitions
\babel@savecnt=\count87
\U@D=\dimen103
)
\es@quottoks=\toks14
\es@quotdepth=\count88
Package babel Info: Making " an active character on input line 561.
Package babel Info: Making . an active character on input line 662.
Package babel Info: Making < an active character on input line 707.
Package babel Info: Making > an active character on input line 707.
)) (test.aux
LaTeX Info: Redefining \. on input line 6.
LaTeX Info: Redefining \% on input line 6.
)
\openout1 = `test.aux'.

LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 6.
LaTeX Font Info:    ... okay on input line 6.
LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 6.
LaTeX Font Info:    ... okay on input line 6.
LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 6.
LaTeX Font Info:    ... okay on input line 6.
LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 6.
LaTeX Font Info:    ... okay on input line 6.
LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 6.
LaTeX Font Info:    ... okay on input line 6.
LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 6.
LaTeX Font Info:    ... okay on input line 6.
LaTeX Info: Redefining \. on input line 6.
LaTeX Info: Redefining \% on input line 6.

[1

{C:/Users/User/AppData/Local/MiKTeX/2.9/pdftex/config/pdftex.map}] (test.aux
LaTeX Info: Redefining \. on input line 6.
LaTeX Info: Redefining \% on input line 6.
)

 *File List*
 article.cls    2014/09/29 v1.4h Standard LaTeX document class
  size10.clo    2014/09/29 v1.4h Standard LaTeX file (size option)
   babel.sty    2017/05/19 3.10 The Babel package
 bblopts.cfg    2005/09/08 v0.1 add Arabic and Farsi to "declared" options of b
abel
 spanish.ldf
 ***********

 ) 
Here is how much of TeX's memory you used:
 1053 strings out of 493330
 13040 string characters out of 3139261
 74021 words of memory out of 3000000
 4656 multiletter control sequences out of 15000+200000
 3640 words of font info for 14 fonts, out of 3000000 for 9000
 1141 hyphenation exceptions out of 8191
 27i,4n,30p,169b,359s stack positions out of 5000i,500n,10000p,200000b,50000s
<C:/Program Files/MiKTeX 2.9/fonts/type1/public/amsfonts/cm/cmr10.pfb>
Output written on test.pdf (1 page, 12297 bytes).
PDF statistics:
 10 PDF objects out of 1000 (max. 8388607)
 0 named destinations out of 1000 (max. 500000)
 1 words of extra memory for PDF output out of 10000 (max. 10000000)
  • Can you add \listfiles to your input and edit the File list from the .log into the question? You might also point to the path of ukenglish.ldf (doesn't seem to have a file version). – Joseph Wright May 29 '17 at 08:40
  • Sure. Here is the file list: File List article.cls 2014/09/29 v1.4h Standard LaTeX document class size10.clo 2014/09/29 v1.4h Standard LaTeX file (size option) babel.sty 2017/05/19 3.10 The Babel package bblopts.cfg 2005/09/08 v0.1 add Arabic and Farsi to "declared" options of babel ukenglish.ldf – José Carlos Santos May 29 '17 at 09:10
  • Note that this problem arises for any language that I use. – José Carlos Santos May 29 '17 at 09:12
  • https://tex.stackexchange.com/questions/313539/miktex-and-babel-missing-file-and-useless-package-installation-required/313676 I suspect: with TeX Live I don't get bblopts.cfg listed and have no issues with the demo (other file versions the same). – Joseph Wright May 29 '17 at 09:19
  • I tried copying bblopts.cfg in the working directory, but I don't get the error (on TeX Live). Same file list. – egreg May 29 '17 at 09:29
  • It is a related problem, but not the same one. I am using MiKTeX indeed, but at the question for which you posted a link there is no mention to the error message that I mentioned. – José Carlos Santos May 29 '17 at 09:30
  • @JoséCarlosSantos What do you get for your LaTeX format version? I have LaTeX2e <2017-04-15> Babel <3.10> and hyphenation patterns for 84 language(s) loaded. (start of the .log). – Joseph Wright May 29 '17 at 09:35
  • Same thing (almost) here: LaTeX2e <2017-04-15> Babel <3.10> and hyphenation patterns for 74 language(s) loaded. – José Carlos Santos May 29 '17 at 09:43
  • You could add \errorcontextlines=1000 as the first line of your document then post the log you get from the above test file, in a code block so lone endings are preserved. – David Carlisle May 29 '17 at 09:48
  • I can't reproduce the error and I don't see why bblopts.cfg should matter. Can you show your log file? – Ulrike Fischer May 29 '17 at 10:04
  • Note that I do not get therror if I compile using LaTeX; only when I use PDFLaTeX. I shall edit my original post in otder to add the log file. – José Carlos Santos May 29 '17 at 10:12
  • 4
    Your babel version in the format (Babel <3.9t>) differ from the one loaded as package. You probably should recreate the formats (probably you have a user version of the format and should use the user version of miktex settings). – Ulrike Fischer May 29 '17 at 10:25
  • 1
    That suggestion solved the problem. Thanks a lot, Ulrike. – José Carlos Santos May 29 '17 at 10:45
  • It's a bug, which will be fixed in the next release. But the workaround provided by Ulrike should work - just recreate the formats. – Javier Bezos May 29 '17 at 17:11
  • @JoséCarlosSantos I have the same problem What are the steps of the solution – Emad kareem Aug 23 '17 at 00:12
  • @UlrikeFischer I have the same problem What are the steps of the solution – Emad kareem Aug 23 '17 at 00:13
  • @Emadkareem Like I said in the comments, I recreated the formats. – José Carlos Santos Aug 23 '17 at 08:01

1 Answers1

1

There is no error with babel version 3.12.

However, you should change ukenglish into UKenglish. The ukenglish option has never existed, but due to the filesystem in Windows being case insensitive, the correct file UKenglish.ldf is loaded anyway under that OS.

egreg
  • 1,121,712