emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] [new exporter] latex-date-timestamp-format not adhering #+LANGUA


From: Andreas Leha
Subject: Re: [O] [new exporter] latex-date-timestamp-format not adhering #+LANGUAGE
Date: Wed, 06 Mar 2013 15:02:01 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Hi Nicolas,

thanks for taking this up!

Nicolas Goaziou <address@hidden> writes:

> Hello,
>
> Andreas Leha <address@hidden> writes:
>
>> I'd very much like to see org-latex-timestamp-format adhere to a
>> possibly present #+LANGUAGE setting.
>
> There is no such variable as `org-latex-timestamp-format'.
>

Of course I meant 'org-latex-date-timestamp-format'.

>> If I set org-latex-timestamp-format to "%A, %Y-%m-%d" the following org
>> file produces
>> "Donnerstag, 2013-03-07" on my system, where I'd prefer
>> "Thursday, 2013-03-07".
>>
>> #+begin_src org
>> #+TITLE: Some Document
>> #+DATE: <2013-03-07 Do>
>> #+LANGUAGE: en
>>
>>
>> * Some test document
>> With some content
>> #+end_src
>>
>> Would such a change be possible?
>
> It is difficult.
>
> "%A" depends on a locale built within glibc. Assuming we know the locale
> associated to the language string, it may or may not be available in
> glibc. Also, `format-time-string' is a primitive, so even if local is
> available, you cannot change it locally easily.

I understand.

>
> A proper implementation would, IMO, not rely directly on
> `format-time-string'. There could be a `org-format-time-string'
> accepting the same arguments as `format-time-string' but replacing
> locale related placeholders beforehand, according to a dictionary.
>

That sound quite tedious and boring work...

And while I still think, that setting the #+LANGUAGE in org should
ideally be reflected in the export -- also for the date formatting -- I
found a solution to my problem that I use now: It does not use orgmode's
date and date-formatting facilities, but moves the work to LaTeX.  Thus, the
bad side is that it is backend specific.

#+begin_src org
#+TITLE: Some Document
#+DATE: \printdate{2013-03-07}
#+LANGUAGE: en
#+LaTeX_HEADER: \usepackage[english]{isodate}

* Some test document
With some content
#+end_src

vs.

#+begin_src org
#+TITLE: Some Document
#+DATE: \printdate{2013-03-07}
#+LANGUAGE: en
#+LaTeX_HEADER: \usepackage[german]{isodate}

* Some test document
With some content
#+end_src

Regards,
Andreas




reply via email to

[Prev in Thread] Current Thread [Next in Thread]