emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Pedro Andres Aranda Gutierrez <paaguti@gmail.com>
To: Ihor Radchenko <yantar92@posteo.net>
Cc: Org Mode List <emacs-orgmode@gnu.org>
Subject: Re: New try at multi-lingual export to latex/pdf using pdflatex and babel
Date: Sun, 21 Jan 2024 18:11:43 +0100	[thread overview]
Message-ID: <CAO48Bk9Eo9zrgU7i7jMDcEAY120VZSHF70PdXOXKFCuKZGKGcg@mail.gmail.com> (raw)
In-Reply-To: <87sf2qg7pg.fsf@localhost>


[-- Attachment #1.1: Type: text/plain, Size: 2175 bytes --]

Thanks for the feedback, attached is a new version

Best, /PA

On Sun, 21 Jan 2024 at 13:59, Ihor Radchenko <yantar92@posteo.net> wrote:

> Pedro Andres Aranda Gutierrez <paaguti@gmail.com> writes:
>
> > hopefully this is more informative. It complements the =polyglossia=
> > example with some =babel= that can be compiled with pdflatex.
>
> Thanks!
> Several minor comments.
>
> > From 4d0dcde4f8f149d3d028164c3cd3c8e9bff2a060 Mon Sep 17 00:00:00 2001
> > From: "Pedro A. Aranda" <paaguti@gmail.com>
> > Date: Sun, 21 Jan 2024 09:39:35 +0100
> > Subject: [PATCH] Add multi-language babel example
>
> Please indicate that the patch deals with the manual in the first line:
>
>   org-manual: Add multi-language babel example
>
> And add the changelog entry.
>
> > +Another example using ~pdflatex~ and ~babel~ and mixing Latin and
>
> =pdflatex= and =babel= I think - we use ~...~ mostly for Elisp code.
>
> > +Greek fonts in the document using the =\PassOptionsToPackage= command
> > +from =babel= would be:
> > +
> > +#+begin_example
> > +,#+latex_class_options: [greek,spanish,oneside]
> > +,#+language: es
> > +,#+latex_header: \PassOptionsToPackage{main=spanish}{babel}
> > +,#+latex_header: \usepackage{alphabeta} % to support greek script
> > +#+end_example
> > +
> > +Note that you can add more options to the ~latex_class_options~.
>
> =#+latex_class_options:=
>
> > +The important thing is that you include the *translated* name
>
> Maybe just /translated/? Bold is usually considered too strong
> typographically.
>
> Also, I do not really understand what you mean by "translated" here.
>
> > +for the =#+language:# you specify in the other commands for
>
> =#+language:=
>
> --
> Ihor Radchenko // yantar92,
> Org mode contributor,
> Learn more about Org mode at <https://orgmode.org/>.
> Support Org development at <https://liberapay.com/org-mode>,
> or support my work at <https://liberapay.com/yantar92>
>


-- 
Fragen sind nicht da, um beantwortet zu werden,
Fragen sind da um gestellt zu werden
Georg Kreisler

Headaches with a Juju log:
unit-basic-16: 09:17:36 WARNING juju.worker.uniter.operation we should run
a leader-deposed hook here, but we can't yet

[-- Attachment #1.2: Type: text/html, Size: 3347 bytes --]

[-- Attachment #2: 0001-org-manual-Add-multi-language-babel-example.patch --]
[-- Type: text/x-patch, Size: 2254 bytes --]

From d540ad65d228bfb31a672cc1f7a771504cb3f58c Mon Sep 17 00:00:00 2001
From: "Pedro A. Aranda" <paaguti@gmail.com>
Date: Sun, 21 Jan 2024 18:06:19 +0100
Subject: [PATCH] org-manual: Add multi-language babel example

org-manual.org: Add multi-language babel example

* doc/org-manual.org: Add an example for the LaTeX header commands
needed to export multi-language documents to pdflatex. In this case
we need to use and configure the babel package appropriately.

---
 doc/org-manual.org | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/doc/org-manual.org b/doc/org-manual.org
index acc6d07ff..71cc8b1a1 100644
--- a/doc/org-manual.org
+++ b/doc/org-manual.org
@@ -13925,6 +13925,10 @@ general options (see [[*Export Settings]]).
                '("AUTO" "polyglossia" t ("xelatex" "lualatex")))
   #+end_src
 
+  The value used for =babel= or =polyglossia= is set in
+  ~org-export-default-language~. The default value is ~"en"~, which
+  means American English.
+
 - =LATEX_CLASS= ::
 
   #+cindex: @samp{LATEX_CLASS}, keyword
@@ -14079,6 +14083,37 @@ the =\babelprovide= command:
 ,#+LATEX_HEADER: \babelprovide[import, main]{AUTO}
 #+end_example
 
+Another example using =pdflatex= and =babel= and mixing Latin and
+Greek fonts in the document using the =\PassOptionsToPackage= command
+from =babel= would be:
+
+#+begin_example
+,#+latex_class_options: [greek,spanish,oneside]
+,#+language: es
+,#+latex_header: \PassOptionsToPackage{main=spanish}{babel}
+,#+latex_header: \usepackage{alphabeta} % to support greek script
+#+end_example
+
+Note that you can add more options to the ~latex_class_options~.
+You need to include the language resulting from translating the
+=#+language:= statement in the other commands in your LaTeX header.
+In the previous example
+
+#+begin_example
+,#+language: es
+#+end_example
+
+is translated to
+
+#+begin_example
+\usepackage[spanish]{babel}
+#+end_example
+
+and =spanish= is used for the other header commands and in the
+=#+latex_class_options=.
+
+
+
 =Polyglossia=, for this procedure to be effective, must be loaded
 using the same =babel= classic syntax (but note that /this is not/
 the actual polyglossia syntax).  For example, suppose a document
-- 
2.34.1


  reply	other threads:[~2024-01-21 17:13 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-21  8:44 New try at multi-lingual export to latex/pdf using pdflatex and babel Pedro Andres Aranda Gutierrez
2024-01-21 13:02 ` Ihor Radchenko
2024-01-21 17:11   ` Pedro Andres Aranda Gutierrez [this message]
2024-01-21 17:47     ` Juan Manuel Macías
2024-01-22  6:30       ` Pedro Andres Aranda Gutierrez
2024-01-22  6:47         ` Pedro Andres Aranda Gutierrez
2024-01-22 13:11           ` Juan Manuel Macías
2024-01-22 12:10       ` Ihor Radchenko
2024-01-22 13:40         ` Juan Manuel Macías
2024-01-23  7:41           ` Pedro Andres Aranda Gutierrez
2024-01-24 16:25             ` Ihor Radchenko
2024-01-25  7:25               ` Pedro A. Aranda
2024-01-25 13:41                 ` Ihor Radchenko
2024-01-25 16:54                   ` Pedro A. Aranda
2024-01-26 13:28                     ` Ihor Radchenko
2024-01-26 17:49                       ` Pedro Andres Aranda Gutierrez
2024-01-28 13:47                         ` Ihor Radchenko
2024-01-28 17:02                           ` Pedro Andres Aranda Gutierrez
2024-01-29 13:28                             ` Ihor Radchenko
2024-01-29 14:34                               ` Pedro Andres Aranda Gutierrez
2024-01-29 14:51                                 ` Ihor Radchenko
2024-01-29 14:51                                   ` Pedro Andres Aranda Gutierrez
2024-02-09 23:10     ` Ihor Radchenko
2024-02-10  6:13       ` Pedro Andres Aranda Gutierrez
2024-02-10 14:39         ` Ihor Radchenko
2024-02-11  6:22           ` Pedro Andres Aranda Gutierrez
2024-02-11 11:04             ` Juan Manuel Macías
2024-04-15 12:21               ` Ihor Radchenko
2024-04-22 20:06                 ` Ihor Radchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAO48Bk9Eo9zrgU7i7jMDcEAY120VZSHF70PdXOXKFCuKZGKGcg@mail.gmail.com \
    --to=paaguti@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=yantar92@posteo.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).