Re: [O] LaTeX export: Theorem with an author

2013-02-11 Thread Vincent Beffara
Hi, 
> > #+begin_theorem :options [Him]
> > slkdfj
> > #+end_theorem
> 
> This isn't future-proof. If, for example, we need to add options for the
> HTML back-end, there will be a syntax conflict. The rule is the
> following:
> 
> - If the toggle are global, allow them on the block opening string
> (i.e. src-block and code toggles)
> 
> - For back-end specific value, use attributes.
Fair enough. Although as Andreas said, something backend-agnostic to specify 
meta-data could still make sense at some point, which each backend could choose 
to implement as reasonable or ignore. You're right that setting LaTeX to add 
[Author] is probably not one of those cases.

Cheers,

/v
> 
> 
> Regards,
> 
> -- 
> Nicolas Goaziou






Re: [O] LaTeX export: Theorem with an author

2013-02-10 Thread Nicolas Goaziou
Vincent Beffara  writes:

> It does seem more consistent with things like fig captions and so on -
> thanks for implementing! A little bit more verbose but that's fine ...
> and I agree that the previous "#+begin_theorem Somebody" felt a bit
> vague. How about a middle ground like this ?
>
> #+begin_theorem :options [Him]
> slkdfj
> #+end_theorem

This isn't future-proof. If, for example, we need to add options for the
HTML back-end, there will be a syntax conflict. The rule is the
following:

- If the toggle are global, allow them on the block opening string
  (i.e. src-block and code toggles)

- For back-end specific value, use attributes.


Regards,

-- 
Nicolas Goaziou



Re: [O] LaTeX export: Theorem with an author

2013-02-10 Thread Vincent Beffara
Hi,
> There's no right way at the moment: I forgot to implement this.
> 
> Anyway, since this feature was LaTeX only, what do you think about the
> following syntax (which doesn't work yet):
> 
> #+attr_latex: :options [Newton]
> #+begin_theorem
> Blah.
> #+end_theorem
> 
> It is heavier but it seems more consistent to me.
It does seem more consistent with things like fig captions and so on - thanks 
for implementing! A little bit more verbose but that's fine ... and I agree 
that the previous "#+begin_theorem Somebody" felt a bit vague. How about a 
middle ground like this ?

#+begin_theorem :options [Him]
slkdfj
#+end_theorem
> 
> 
> Regards,
> 
> -- 
> Nicolas Goaziou






Re: [O] LaTeX export: Theorem with an author

2013-02-09 Thread Andreas Leha
Hi Nicolas,

>>>   #+attr_latex: :options [Newton]
>>>   #+begin_theorem
>>>   Blah.
>>>   #+end_theorem
>>>
>>> It is heavier but it seems more consistent to me.
>>
>> Even if it *was* LaTeX only, shouldn't it be up to the backend to
>> provide translation of such arguments?  I'd vote for the shorter version
>> to have a (possibly future) backend-agnostic version.
>
> Well, I already have implemented this syntax. We'll see how it goes.
>

Since I go the LaTeX-route most times, I'll be a most-times-happy user
of this.  Thanks for implementing it!

Exporting to multiple backends takes more efforts than I'd like, anyway.
So I try to avoid that and concentrate on one backend per project.  I'd
just rather like to see the differences decrease -- not increase ;-)

- Andreas




Re: [O] LaTeX export: Theorem with an author

2013-02-09 Thread Nicolas Goaziou
Hello,

Andreas Leha  writes:

>>   #+attr_latex: :options [Newton]
>>   #+begin_theorem
>>   Blah.
>>   #+end_theorem
>>
>> It is heavier but it seems more consistent to me.
>
> Even if it *was* LaTeX only, shouldn't it be up to the backend to
> provide translation of such arguments?  I'd vote for the shorter version
> to have a (possibly future) backend-agnostic version.

Well, I already have implemented this syntax. We'll see how it goes.


Regards,

-- 
Nicolas Goaziou



Re: [O] LaTeX export: Theorem with an author

2013-02-09 Thread Andreas Leha
Hi Nicolas,

>> How to generate latex code for a theorem with an author, like this:
>>
>> \begin{theorem}[Newton]
>> Blah.
>> \end{theorem}
>>
>> With the old exporter, you could do this:
>>
>>
>> #+BEGIN_theorem Newton
>> Blah.
>> #+END_theorem
>>
>>

[...]

I was not aware of that possibility in the old exporter.  Neat!

>
> There's no right way at the moment: I forgot to implement this.
>
> Anyway, since this feature was LaTeX only, what do you think about the
> following syntax (which doesn't work yet):
>
>   #+attr_latex: :options [Newton]
>   #+begin_theorem
>   Blah.
>   #+end_theorem
>
> It is heavier but it seems more consistent to me.

Even if it *was* LaTeX only, shouldn't it be up to the backend to
provide translation of such arguments?  I'd vote for the shorter version
to have a (possibly future) backend-agnostic version.

Just my 2ct.

- Andreas




Re: [O] LaTeX export: Theorem with an author

2013-02-08 Thread Nicolas Goaziou
Hello,

Vincent Beffara  writes:

> How to generate latex code for a theorem with an author, like this:
>
> \begin{theorem}[Newton]
> Blah.
> \end{theorem}
>
> With the old exporter, you could do this:
>
>
> #+BEGIN_theorem Newton
> Blah.
> #+END_theorem
>
>
> (possibly with brackets, not sure) but now the rest of the #+BEGIN_ line is 
> ignored ... This works:
>
>
> #+BEGIN_theorem
> [Newton]
> Blah.
> #+END_theorem
>
>
> but it is more by accident than anything else. What would be the right
> way?

There's no right way at the moment: I forgot to implement this.

Anyway, since this feature was LaTeX only, what do you think about the
following syntax (which doesn't work yet):

  #+attr_latex: :options [Newton]
  #+begin_theorem
  Blah.
  #+end_theorem

It is heavier but it seems more consistent to me.


Regards,

-- 
Nicolas Goaziou



[O] LaTeX export: Theorem with an author

2013-02-07 Thread Vincent Beffara
Hi, 

How to generate latex code for a theorem with an author, like this:

\begin{theorem}[Newton]
Blah.
\end{theorem}

With the old exporter, you could do this:

#+BEGIN_theorem Newton
Blah.
#+END_theorem

(possibly with brackets, not sure) but now the rest of the #+BEGIN_ line is 
ignored ... This works:

#+BEGIN_theorem
[Newton]
Blah.
#+END_theorem

but it is more by accident than anything else. What would be the right way?

Thanks,

/v 

-- 
Vincent Beffara