emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* english automatically option added to latex's babel package
@ 2013-07-18 21:15 Renato
  2013-07-19  8:48 ` Rasmus
  2013-07-19  9:02 ` Eric S Fraga
  0 siblings, 2 replies; 5+ messages in thread
From: Renato @ 2013-07-18 21:15 UTC (permalink / raw)
  To: emacs-orgmode

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi, I've customized org-latex-packages-alist and added the package
"babel", with option "italian", however in my latex exports I get:

\usepackage[italian, english]{babel}

I don't want the english option to be there (latex gives it priority
over the italian one it seems). What could be wrong? I have english as
default language on my system (archlinux), so maybe I should change some
variable in emacs?

cheers,
reanto
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.20 (GNU/Linux)

iQEcBAEBAgAGBQJR6FsMAAoJEBz6xFdttjrfwBUIAIKKOH56Ypt6mFPmMJVVppDu
aKaurtpqPnXwQbHszDoFVc38lrHctpnGhMeKOK7h3kCGvcE3eXuaNq+KuScxkaN9
e9Scl6pVTR+xceZzmWSxe70f3pTgzYs8Ap9Ss1QDdRY3zQdR+7XGqdKESwxQCpw9
jKwUg8rS8HoBewzIx9CLqpnD2rDpkQdE3f72+QK1HKp/zsLnsHpG8Yl4H54YLKFw
OZMN/k2JED+gL+gEMc9a/9aZVbUwld7QTcgCPRi0vUBzbXIdi8hbiEKRiy3duD97
JPEEXsLSIdrhhdySpoY07Q9rV5L97gNppvhG6mHNms1lrUmsw/DnfGJKf+lLtjg=
=ANDX
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: english automatically option added to latex's babel package
  2013-07-18 21:15 english automatically option added to latex's babel package Renato
@ 2013-07-19  8:48 ` Rasmus
  2013-07-19  9:02 ` Eric S Fraga
  1 sibling, 0 replies; 5+ messages in thread
From: Rasmus @ 2013-07-19  8:48 UTC (permalink / raw)
  To: emacs-orgmode

Renato <rennabh@gmail.com> writes:

> Hi, I've customized org-latex-packages-alist and added the package
> "babel", with option "italian", however in my latex exports I get:
>
> \usepackage[italian, english]{babel}
>
> I don't want the english option to be there (latex gives it priority
> over the italian one it seems). What could be wrong? I have english as
> default language on my system (archlinux), so maybe I should change some
> variable in emacs?

From the documentation of `org-latex-classes'.  

Likewise, if your header contains \"\\usepackage[AUTO]{babel}\",
AUTO will be replaced with the language related to the language
code specified by `org-export-default-language', which see.  Note
that constructions such as \"\\usepackage[french,AUTO,english]{babel}\"
are permitted.

So the correct way is to set `org-export-default-language'.  None the
less I'd be interested in seeing a minimal example (from emacs -q)
that reproduce your error.  There may be a bug in
`org-latex-guess-babel-language'.

–Rasmus

-- 
Summon the Mothership!

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: english automatically option added to latex's babel package
  2013-07-18 21:15 english automatically option added to latex's babel package Renato
  2013-07-19  8:48 ` Rasmus
@ 2013-07-19  9:02 ` Eric S Fraga
  2013-07-19 11:00   ` Rasmus
  1 sibling, 1 reply; 5+ messages in thread
From: Eric S Fraga @ 2013-07-19  9:02 UTC (permalink / raw)
  To: Renato; +Cc: emacs-orgmode

Renato <rennabh@gmail.com> writes:

> Hi, I've customized org-latex-packages-alist and added the package
> "babel", with option "italian", however in my latex exports I get:

Add it with AUTO instead of italian and then specify the language in
your document using 

#+language: it

If you want Italian for all documents by default, set
org-export-default-language:

,----[ C-h v org-export-default-language RET ]
| org-export-default-language is a variable defined in `ox.el'.
| Its value is "en"
| 
| Documentation:
| The default language for export and clocktable translations, as a string.
| This may have an association in
| `org-clock-clocktable-language-setup',
| `org-export-smart-quotes-alist' and `org-export-dictionary'.
| This option can also be set with the LANGUAGE keyword.
| 
| You can customize this variable.
`----

HTH,
eric
-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.3.50.1, Org release_8.0.6-341-g338603

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: english automatically option added to latex's babel package
  2013-07-19  9:02 ` Eric S Fraga
@ 2013-07-19 11:00   ` Rasmus
  2013-07-25  8:34     ` Renato
  0 siblings, 1 reply; 5+ messages in thread
From: Rasmus @ 2013-07-19 11:00 UTC (permalink / raw)
  To: emacs-orgmode

Eric S Fraga <e.fraga@ucl.ac.uk> writes:

> Renato <rennabh@gmail.com> writes:
>
>> Hi, I've customized org-latex-packages-alist and added the package
>> "babel", with option "italian", however in my latex exports I get:
>
> Add it with AUTO instead of italian and then specify the language in
> your document using 
>
> #+language: it
>
> If you want Italian for all documents by default, set
> org-export-default-language:

These are the recommend instructions, yes, and indeed how I imagined
people to use it.

I looked at it and while I can reproduce there's no bug.

Start from emacs -q and eval

(require 'ox-latex)
(add-to-list 'org-latex-default-packages-alist '("italian" babel nil))

When I export the document

#+begin_src org
   * titel
#+end_src

the language defaults to org-export-default-language which is "en".
So it does what you'd expect and loads English in front of Italian
'cause it's the document language.

Compare to what Eric says:

#+begin_src org
#+LANGUAGE: it
   * titel
#+end_src

You get only Italian. 

So it guesses the language correctly.

–Rasmus

-- 
Got mashed potatoes. Ain't got no T-Bone. No T-Bone

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: english automatically option added to latex's babel package
  2013-07-19 11:00   ` Rasmus
@ 2013-07-25  8:34     ` Renato
  0 siblings, 0 replies; 5+ messages in thread
From: Renato @ 2013-07-25  8:34 UTC (permalink / raw)
  To: Rasmus; +Cc: emacs-orgmode

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Fri, 19 Jul 2013 13:00:26 +0200
Rasmus <rasmus@gmx.us> wrote:

> Eric S Fraga <e.fraga@ucl.ac.uk> writes:
> 
> > Renato <rennabh@gmail.com> writes:
> >
> >> Hi, I've customized org-latex-packages-alist and added the package
> >> "babel", with option "italian", however in my latex exports I get:
> >
> > Add it with AUTO instead of italian and then specify the language in
> > your document using 
> >
> > #+language: it
> >
> > If you want Italian for all documents by default, set
> > org-export-default-language:
> 
> These are the recommend instructions, yes, and indeed how I imagined
> people to use it.
> 
> I looked at it and while I can reproduce there's no bug.
> 
> Start from emacs -q and eval
> 
> (require 'ox-latex)
> (add-to-list 'org-latex-default-packages-alist '("italian" babel nil))
> 
> When I export the document
> 
> #+begin_src org
>    * titel
> #+end_src
> 
> the language defaults to org-export-default-language which is "en".
> So it does what you'd expect and loads English in front of Italian
> 'cause it's the document language.
> 
> Compare to what Eric says:
> 
> #+begin_src org
> #+LANGUAGE: it
>    * titel
> #+end_src
> 
> You get only Italian. 
> 
> So it guesses the language correctly.


Hi, many thanks. Yes the #+language option is perfect, as I still want
my default language to be english.

cheers,
renato
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.20 (GNU/Linux)

iQEcBAEBAgAGBQJR8OMdAAoJEBz6xFdttjrfNmEH/AijrA9V1AM2DyiSFqy+ZF23
LiNIGUTQwuCsI5LZPi3q4Xv80CyvQLuJGlazBTL3uN684bCgNXbaTEPaisET8ZHc
Z8dyrbr3JP+TVhvK9FV9ypF5I7NPc69nQ50aGtFk+g6I016iPe+dLfppr16hnVCv
vIvTE7DU4uZU8lZn7LGMU3dRPm1DX5GNmFXOzqg+Lqgif2PSn7Ny3UCFMAwgxuGX
Zf/PReKx4gcwdo7FQIJbCweFVNS8VOM7p0CuMW3VtSZrV4WKG5RppoQ8O7qA1u5V
YBYcpYAYyns107zv7U5U8LUvlKi50IIbNAKCD8Apbp6EquYdZM5Zo3gTwMw2NVk=
=XPer
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-07-25  8:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-18 21:15 english automatically option added to latex's babel package Renato
2013-07-19  8:48 ` Rasmus
2013-07-19  9:02 ` Eric S Fraga
2013-07-19 11:00   ` Rasmus
2013-07-25  8:34     ` Renato

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).