auctex-devel
[Top][All Lists]
Advanced

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

Re: [AUCTeX-devel] \date insert american format


From: Mosè Giordano
Subject: Re: [AUCTeX-devel] \date insert american format
Date: Wed, 23 Jul 2014 15:35:22 +0200

Hi Uwe,

2014-07-23 15:01 GMT+02:00 Uwe Brauer <address@hidden>:
> Hello
>
> Look at the following german example document.
> \documentclass[12pt]{article}
> \usepackage[german]{babel}
> \usepackage[latin1]{inputenc}
> \begin{document}
>
> \title{Title}
> \author{Ich}
> \date{2014/07/23}
> \maketitle{}
>
> \section{Einleitung}
> \label{sec:einleitung}
>
> Blabla
> \end{document}
>
>
> When I executed TeX-insert-macro
> the minibuffer showed
>
> Date (default (2014/07/23))
>
> The corresponding code seems to me:
> (defun TeX-arg-date (optional &optional prompt)
>   "Prompt for a date, defaulting to the current date.
> If OPTIONAL is non-nil, insert the resulting value as an optional
> argument, otherwise as a mandatory one.  Use PROMPT as the prompt
> string."
>   (let ((default (format-time-string "%Y/%m/%d" (current-time))))
>     (TeX-argument-insert
>      (TeX-read-string (TeX-argument-prompt
>                        optional prompt (format "Date (default %s)" default))
>                       nil nil default)
>      optional)))
>
>
> Two question:
>
>     -  couldn't this function allow to select other time formats, like
>        %d.%m.%Y (german standard)

That's a good idea!

>     -  or best when scanning the header and recognising
>        \usepackage[german]{babel} auctex  does it itself.

Are you sure everybody would like this?  I think that letting people
choose the date format through a customizable option without
overriding it for specific languages is better, one can change the
format for a specific language using the `TeX-language-*-hook' hooks
anyway.

Bye,
Mosè



reply via email to

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