emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] LaTeX export: list with non-optional argument


From: Andreas Leha
Subject: Re: [O] LaTeX export: list with non-optional argument
Date: Fri, 24 Jan 2014 10:00:36 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Nicolas Goaziou <address@hidden> writes:

> Hello,
>
> Andreas Leha <address@hidden> writes:
>
>> How can a pass a non-optional argument to a special list in LaTeX
>> export?
>
> You can't. See below.
>
>> The 'currvita' LaTeX package comes with the environment 'cvlist'.  This
>> cvlist is to be used like this:
>>
>> \begin{cvlist}{Personal Information}
>>   \item[Date of Birth] 01.01.2014
>>   \item[Place of Birth] Berlin
>>   \item[Nationality] German
>> \end{cvlist}
>>
>> So, it has the title of the list as argument.  How would I create such
>> list from Org mode?
>>
>> For that case it seems to be a little inconvenient that Org does
>> surround any given :options with '[ ... ]' automatically, because the
>> closest I get with a pure Org mode solution is
>
> I introduced :environment property thinking about "paralist" package,
> which uses only optional arguments. Therefore :options tries to be smart
> and enclose its value within square brackets when necessary.
>
> The problem is that this differs from :options property in special
> blocks, which will append its value verbatim after the environment name.
>
> I guess the best move would be to avoid being too smart and do the same
> for :options in plain lists. The manual would need to be updated
> accordingly.
>
> Opinions?

I would (obviously?) vote in favour of such a change.
- It does not hurt too much for the other use cases to include the
  square brackets manually.
- It provides more flexibility in general.
- It solves my special use case.

>
>> \begin{cvlist}[{Personal Information}]
>> \item [Date of Birth]  01.01.2014
>> \item [Place of Birth] Berlin
>> \item [Nationality]    German
>> \end{cvlist}
>>
>> produced by this Org snippet:
>>
>> #+ATTR_LATEX: :environment cvlist :options {Personal Information}
>> - [Date of Birth]  01.01.2014
>> - [Place of Birth] Berlin
>> - [Nationality]    German
>
> This syntax is not possible anymore in latest Org release. You cannot
> start an item with a square bracket and expect it will become an option
> to \item anymore.

Thanks for pointing that out.  I remember having seen the thread, but I
did not follow it.  (For the same reason, that I have not been updating
Org lately: time constraints)

> This should be:
>
>   #+ATTR_LATEX: :environment cvlist :options {Personal Information}
>   - @@latex:[Date of Birth]@@ ...
>   - @@latex:[Place of Birth]@@ ...
>   - @@latex:[Nationality]@@ ...
>

That seems to be a regression...


> or, in this particular case, simply:
>
>   #+ATTR_LATEX: :environment cvlist :options {Personal Information}
>   - Date of Birth :: ...
>   - Place of Birth :: ...
>   - Nationality :: ...

... or not.  That is even better than my original syntax.

Regards,
Andreas




reply via email to

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