emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: org-mode@axelkielhorn.de
To: Org-Mode Mailing List <emacs-orgmode@gnu.org>
Subject: Re: Handling bilingual text in single org file?
Date: Thu, 11 Apr 2019 18:40:04 +0200	[thread overview]
Message-ID: <48FB9679-57A8-4EB1-8C07-91F1ADD02A93@axelkielhorn.de> (raw)
In-Reply-To: <87a7gwvco0.fsf@hornfels.zedat.fu-berlin.de>


> Am 11.04.2019 um 16:28 schrieb Loris Bennett <loris.bennett@fu-berlin.de>:
> 
> Hi,
> 
> I have a text I would like to keep in a single org file in both an
> English and a German version.
> 
> I could just have first one version and the other and export via tags.
> However, ideally I would like to keep both versions of a given paragraph
> close together to allow easier translation and editing.  It would
> potential be nice to be able to fold up one language to just view the
> other. 
> 
> Does anyone have a good workflow for this use-case?

I had the same question about a year ago.
Here is what I came up with.
It works on section (subsection) level, not on paragraph level.
I can either export one language or both for comparison.
I’ve used yasnippets to insert the @@latex environments.

You can select which language to export by removing the space in the +SELECT_TAGS: line.

#+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}@@

This was used for one smallish project.
Most of my documents are german only.

Greeting Axel

      reply	other threads:[~2019-04-11 16:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-11 14:28 Handling bilingual text in single org file? Loris Bennett
2019-04-11 16:40 ` org-mode [this message]

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=48FB9679-57A8-4EB1-8C07-91F1ADD02A93@axelkielhorn.de \
    --to=org-mode@axelkielhorn.de \
    --cc=emacs-orgmode@gnu.org \
    /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).