emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* LaTeX export: how to customize date format?
@ 2012-01-09 11:44 Carlos Russo
  2012-01-09 12:11 ` Bastien
  0 siblings, 1 reply; 5+ messages in thread
From: Carlos Russo @ 2012-01-09 11:44 UTC (permalink / raw)
  To: emacs-orgmode

Hello,

Is there a way to customize how a date is exported into LaTeX?
Google couldn't help me on this.

For example, if an org file contains a timestamp <2012-01-09 Mon>, I'm
getting an italicized version in the .tex file, i.e. \textit{2012-01-09
Mon}.

I would like to be able to change how dates are displayed in a global
way. In particular, I'm interested in automatically formatting the dates
in my documents using \usepackage[option]{isodate}?

So, in other words, I'd like to tell orgmode that it should output the
following
\printdate{2012-01-09}
or
\date-range{2012-01-01}{2012-01-09}
for date ranges.

I could use then use
#+LATEX_HEADER: \usepackage[option]{isodate}
to quickly change the date format, which could produce results as
diverse as:
Jan 9, 2012
January 9, 2012
Janvier 9, 2012
2012/01/09
2012/09/01
and so on...

Any hints on how to do this?

Cheers,
Carlos

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

* Re: LaTeX export: how to customize date format?
  2012-01-09 11:44 LaTeX export: how to customize date format? Carlos Russo
@ 2012-01-09 12:11 ` Bastien
  2012-01-09 12:24   ` Bastien
  0 siblings, 1 reply; 5+ messages in thread
From: Bastien @ 2012-01-09 12:11 UTC (permalink / raw)
  To: Carlos Russo; +Cc: emacs-orgmode

Hi Carlos,

Carlos Russo <mestre.adamastor@gmail.com> writes:

> Is there a way to customize how a date is exported into LaTeX?

You cannot do this right now.

See these variables:

org-export-latex-timestamp-markup:
  "A printf format string to be applied to time stamps."

org-export-latex-timestamp-inactive-markup:
  "A printf format string to be applied to inactive time stamps."

org-export-latex-timestamp-keyword-markup:
  "A printf format string to be applied to time stamps."

HTH,

-- 
 Bastien

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

* Re: LaTeX export: how to customize date format?
  2012-01-09 12:11 ` Bastien
@ 2012-01-09 12:24   ` Bastien
  2012-01-09 12:26     ` Carlos Russo
  0 siblings, 1 reply; 5+ messages in thread
From: Bastien @ 2012-01-09 12:24 UTC (permalink / raw)
  To: Carlos Russo; +Cc: emacs-orgmode

Bastien <bzg@altern.org> writes:

>> Is there a way to customize how a date is exported into LaTeX?
>
> You cannot do this right now.

Er.. forget this sentence -- perhaps my subconscious is trying
to tell me there are too many variables in Org now :) 

-- 
 Bastien

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

* Re: LaTeX export: how to customize date format?
  2012-01-09 12:24   ` Bastien
@ 2012-01-09 12:26     ` Carlos Russo
  2012-01-09 12:38       ` Bastien
  0 siblings, 1 reply; 5+ messages in thread
From: Carlos Russo @ 2012-01-09 12:26 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode

Thanks, it seems that
(setq org-export-latex-timestamp-markup "\\printdate{%s}")
does half of the job already.

> Er.. forget this sentence -- perhaps my subconscious is trying
> to tell me there are too many variables in Org now :) 


I suppose this means there are no plans of creating a variable containing the markup associated with a date range, right :-p?

Cheers,
Carlos

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

* Re: LaTeX export: how to customize date format?
  2012-01-09 12:26     ` Carlos Russo
@ 2012-01-09 12:38       ` Bastien
  0 siblings, 0 replies; 5+ messages in thread
From: Bastien @ 2012-01-09 12:38 UTC (permalink / raw)
  To: Carlos Russo; +Cc: emacs-orgmode

Carlos Russo <mestre.adamastor@gmail.com> writes:

> I suppose this means there are no plans of creating a variable containing
> the markup associated with a date range, right :-p?

Not that I know -- but beware of the conspiracy, as the LaTeX exporter
is currently being rewritten by Nicolas...  see org-e-latex.el in the 
EXPERIMENTAL/ directory.  I guess configuring the format for dates range 
is not beyond possibility.

-- 
 Bastien

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

end of thread, other threads:[~2012-01-09 12:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-09 11:44 LaTeX export: how to customize date format? Carlos Russo
2012-01-09 12:11 ` Bastien
2012-01-09 12:24   ` Bastien
2012-01-09 12:26     ` Carlos Russo
2012-01-09 12:38       ` Bastien

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