emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Bilingual text in org
@ 2017-11-26  8:07 org-mode
  2017-11-27 14:16 ` Adonay Felipe Nogueira
  0 siblings, 1 reply; 5+ messages in thread
From: org-mode @ 2017-11-26  8:07 UTC (permalink / raw)
  To: Org-Mode Mailing List

[-- Attachment #1: Type: text/plain, Size: 783 bytes --]

Hi,

I want to use org-mode to translate a text from german to englisch.
In my current setup I have marked the section with a tag to select either (or both) languages.

This works fine for one language.
If I want to print both, I have to manually adjust the argument to babel.

My solution is to remove babel from 
org-latex-default-packages-alist
and add
#+LATEX_HEADER: \usepackage[englisch,german]{babel}

Is there a better way to pass two languages to babel?

(I could use Xelatex and polyglossia instead, but so far I don’t need any of the special features.)

My second question is about the otherlanguage environment.
Is there a way to wrap the text with the environment based on the tag?
Even with yasnippet that would save a lot of typing.

Axel 



[-- Attachment #2: Übersetzung.org --]
[-- Type: application/octet-stream, Size: 840 bytes --]

#+OPTIONS: ':t *:t -:t ::t <:t H:3 \n:nil ^:{} arch:headline author:t
#+OPTIONS: broken-links:nil c:nil creator:nil d:(not "LOGBOOK")
#+OPTIONS: date:t e:t email:nil f:t inline:t num:t p:nil pri:nil
#+OPTIONS: prop:nil stat:t tags:nil tasks:t tex:t timestamp:t title:t
#+OPTIONS: toc:nil todo:t |:t
#+TITLE: Übersetzung
#+DATE: <2017-11-22 Wed>
#+AUTHOR: Axel Kielhorn
#+LANGUAGE: de
# +SELECT_TAGS: export german
# +SELECT_TAGS: export english
#+EXCLUDE_TAGS: noexport
#+CREATOR: Emacs 25.3.1 (Org mode 9.1.2)

* Text deutsch                                                      :german:
\begin{otherlanguage}{german} 
  Hier ist ein Text.
\end{otherlanguage}

* Text englisch                                                    :english:
\begin{otherlanguage}{english} 
  Here is some text.
\end{otherlanguage}



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

* Re: Bilingual text in org
  2017-11-26  8:07 Bilingual text in org org-mode
@ 2017-11-27 14:16 ` Adonay Felipe Nogueira
  2017-12-02  7:14   ` org-mode
  0 siblings, 1 reply; 5+ messages in thread
From: Adonay Felipe Nogueira @ 2017-11-27 14:16 UTC (permalink / raw)
  To: emacs-orgmode

Strange, I might be wrong but this might not be set by default.

I have Org version 9.1.2 (9.1.2-15.g1d5142, which is of version 20171016
in GNU Guix package manager).

Alternatively, per `texdoc babel', you can make the language as a
document class option.

2017-11-26T09:07:44+0100 org-mode@axelkielhorn.de wrote:
> Hi,
>
> I want to use org-mode to translate a text from german to englisch.
> In my current setup I have marked the section with a tag to select
> either (or both) languages.
>
> This works fine for one language.
> If I want to print both, I have to manually adjust the argument to babel.
>
> My solution is to remove babel from 
> org-latex-default-packages-alist
> and add
> #+LATEX_HEADER: \usepackage[englisch,german]{babel}
>
> Is there a better way to pass two languages to babel?
>
> (I could use Xelatex and polyglossia instead, but so far I don’t need
> any of the special features.)
>
> My second question is about the otherlanguage environment.
> Is there a way to wrap the text with the environment based on the tag?
> Even with yasnippet that would save a lot of typing.
>
> Axel 
>
>
>

-- 
- https://libreplanet.org/wiki/User:Adfeno
- Palestrante e consultor sobre /software/ livre (não confundir com
  gratis).
- "WhatsApp"? Ele não é livre. Por favor, veja formas de se comunicar
  instantaneamente comigo no endereço abaixo.
- Contato: https://libreplanet.org/wiki/User:Adfeno#vCard
- Arquivos comuns aceitos (apenas sem DRM): Corel Draw, Microsoft
  Office, MP3, MP4, WMA, WMV.
- Arquivos comuns aceitos e enviados: CSV, GNU Dia, GNU Emacs Org, GNU
  GIMP, Inkscape SVG, JPG, LibreOffice (padrão ODF), OGG, OPUS, PDF
  (apenas sem DRM), PNG, TXT, WEBM.

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

* Re: Bilingual text in org
  2017-11-27 14:16 ` Adonay Felipe Nogueira
@ 2017-12-02  7:14   ` org-mode
  2017-12-08  8:38     ` org-mode
  2018-01-13 13:31     ` Adonay Felipe Nogueira
  0 siblings, 2 replies; 5+ messages in thread
From: org-mode @ 2017-12-02  7:14 UTC (permalink / raw)
  To: Org-Mode Mailing List


> Am 27.11.2017 um 15:16 schrieb Adonay Felipe Nogueira <adfeno@hyperbola.info>:
> 
> Strange, I might be wrong but this might not be set by default.
> 
> I have Org version 9.1.2 (9.1.2-15.g1d5142, which is of version 20171016
> in GNU Guix package manager).
> 
> Alternatively, per `texdoc babel', you can make the language as a
> document class option.

You are right, I forgot that option.

I have re-added babel to my latex-defaults and added
#+LATEX_CLASS_OPTIONS
to the file.

Thanks for reminding me.

Axel

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

* Re: Bilingual text in org
  2017-12-02  7:14   ` org-mode
@ 2017-12-08  8:38     ` org-mode
  2018-01-13 13:31     ` Adonay Felipe Nogueira
  1 sibling, 0 replies; 5+ messages in thread
From: org-mode @ 2017-12-08  8:38 UTC (permalink / raw)
  To: Org-Mode Mailing List

I have added @@latex: to my template in order to generate an HTML preview.

Here ist the current version:

#+OPTIONS: ':t *:t -:t ::t <:t H:3 \n:nil ^:{} arch:headline author:t
#+OPTIONS: broken-links:nil c:nil creator:nil d:(not "LOGBOOK")
#+OPTIONS: date:t e:t email:nil f:t inline:t num:t p:nil pri:nil
#+OPTIONS: prop:nil stat:t tags:nil tasks:t tex:t timestamp:t title:t
#+OPTIONS: toc:nil todo:t |:t
#+TITLE: Übersetzung
#+DATE: <2017-12-08 Fri>
#+AUTHOR: Axel Kielhorn
#+LANGUAGE: de
# +SELECT_TAGS: export german
# +SELECT_TAGS: export english
#+EXCLUDE_TAGS: noexport new glossar
#+CREATOR: Emacs 25.3.1 (Org mode 9.1.2)
#+LATEX_CLASS: komaarticle
#+LATEX_CLASS_OPTIONS: [english, german]
# +LATEX_HEADER: \usepackage[noindent,parskip]{stdpage}
#+TAGS_ALL: german english new glossar

* Text deutsch                                                    :german:
@@latex:\begin{otherlanguage}{german}@@ 
  Hier ist ein Text.
@@latex:\end{otherlanguage}@@

* Text englisch                                                   :english:
@@latex:\begin{otherlanguage}{english}@@
  Here is some text.
@@latex:\end{otherlanguage}@@

* Glossar                                                           :glossar:

Greetings
Axel

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

* Re: Bilingual text in org
  2017-12-02  7:14   ` org-mode
  2017-12-08  8:38     ` org-mode
@ 2018-01-13 13:31     ` Adonay Felipe Nogueira
  1 sibling, 0 replies; 5+ messages in thread
From: Adonay Felipe Nogueira @ 2018-01-13 13:31 UTC (permalink / raw)
  To: emacs-orgmode

You're welcome! ;)

2017-12-02T08:14:53+0100 org-mode@axelkielhorn.de wrote:
> You are right, I forgot that option.
>
> I have re-added babel to my latex-defaults and added
> #+LATEX_CLASS_OPTIONS
> to the file.
>
> Thanks for reminding me.
>
> Axel

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

end of thread, other threads:[~2018-01-13 13:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-26  8:07 Bilingual text in org org-mode
2017-11-27 14:16 ` Adonay Felipe Nogueira
2017-12-02  7:14   ` org-mode
2017-12-08  8:38     ` org-mode
2018-01-13 13:31     ` Adonay Felipe Nogueira

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).