all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* LaTeX export: Theorem with an author
@ 2013-02-07 20:50 Vincent Beffara
  2013-02-08 19:58 ` Nicolas Goaziou
  0 siblings, 1 reply; 8+ messages in thread
From: Vincent Beffara @ 2013-02-07 20:50 UTC (permalink / raw)
  To: Org Mode List

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

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

* Re: LaTeX export: Theorem with an author
  2013-02-07 20:50 LaTeX export: Theorem with an author Vincent Beffara
@ 2013-02-08 19:58 ` Nicolas Goaziou
  2013-02-09 13:09   ` Andreas Leha
  2013-02-10 23:26   ` Vincent Beffara
  0 siblings, 2 replies; 8+ messages in thread
From: Nicolas Goaziou @ 2013-02-08 19:58 UTC (permalink / raw)
  To: Vincent Beffara; +Cc: Org Mode List

Hello,

Vincent Beffara <vbeffara+ml@gmail.com> 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

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

* Re: LaTeX export: Theorem with an author
  2013-02-08 19:58 ` Nicolas Goaziou
@ 2013-02-09 13:09   ` Andreas Leha
  2013-02-09 13:16     ` Nicolas Goaziou
  2013-02-10 23:26   ` Vincent Beffara
  1 sibling, 1 reply; 8+ messages in thread
From: Andreas Leha @ 2013-02-09 13:09 UTC (permalink / raw)
  To: emacs-orgmode

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

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

* Re: LaTeX export: Theorem with an author
  2013-02-09 13:09   ` Andreas Leha
@ 2013-02-09 13:16     ` Nicolas Goaziou
  2013-02-09 13:30       ` Andreas Leha
  0 siblings, 1 reply; 8+ messages in thread
From: Nicolas Goaziou @ 2013-02-09 13:16 UTC (permalink / raw)
  To: Andreas Leha; +Cc: emacs-orgmode

Hello,

Andreas Leha <andreas.leha@med.uni-goettingen.de> 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

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

* Re: LaTeX export: Theorem with an author
  2013-02-09 13:16     ` Nicolas Goaziou
@ 2013-02-09 13:30       ` Andreas Leha
  0 siblings, 0 replies; 8+ messages in thread
From: Andreas Leha @ 2013-02-09 13:30 UTC (permalink / raw)
  To: emacs-orgmode

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

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

* Re: LaTeX export: Theorem with an author
  2013-02-08 19:58 ` Nicolas Goaziou
  2013-02-09 13:09   ` Andreas Leha
@ 2013-02-10 23:26   ` Vincent Beffara
  2013-02-11  7:02     ` Nicolas Goaziou
  1 sibling, 1 reply; 8+ messages in thread
From: Vincent Beffara @ 2013-02-10 23:26 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: Org Mode List

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

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

* Re: LaTeX export: Theorem with an author
  2013-02-10 23:26   ` Vincent Beffara
@ 2013-02-11  7:02     ` Nicolas Goaziou
  2013-02-11 22:07       ` Vincent Beffara
  0 siblings, 1 reply; 8+ messages in thread
From: Nicolas Goaziou @ 2013-02-11  7:02 UTC (permalink / raw)
  To: Vincent Beffara; +Cc: Org Mode List

Vincent Beffara <vbeffara+ml@gmail.com> 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

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

* Re: LaTeX export: Theorem with an author
  2013-02-11  7:02     ` Nicolas Goaziou
@ 2013-02-11 22:07       ` Vincent Beffara
  0 siblings, 0 replies; 8+ messages in thread
From: Vincent Beffara @ 2013-02-11 22:07 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: Org Mode List

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

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

end of thread, other threads:[~2013-02-11 22:07 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-07 20:50 LaTeX export: Theorem with an author Vincent Beffara
2013-02-08 19:58 ` Nicolas Goaziou
2013-02-09 13:09   ` Andreas Leha
2013-02-09 13:16     ` Nicolas Goaziou
2013-02-09 13:30       ` Andreas Leha
2013-02-10 23:26   ` Vincent Beffara
2013-02-11  7:02     ` Nicolas Goaziou
2013-02-11 22:07       ` Vincent Beffara

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.