emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Export / LaTeX / suggestion
@ 2013-05-07 19:42 Fabrice Popineau
  2013-05-07 21:16 ` Aaron Ecay
  0 siblings, 1 reply; 3+ messages in thread
From: Fabrice Popineau @ 2013-05-07 19:42 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 568 bytes --]

Currently we need to write this :

#+ATTR_LATEX: :options [title of definition]
#+begin_definition
This is a definition.
#+end_definition

to get this with the LaTeX exporter :

\begin{definition}[title of definition]
This is a definition.
\end{definition}

I was wondering if something like this is possible :

#+begin_definition :options [title of definition]
This is a definition.
#+end_definition

Generally speaking, the rest of the line with #+begin_... could be
considered as an implicit #+ATTR_HTML for this environment.

Is it something doable ?

-- 
Fabrice

[-- Attachment #2: Type: text/html, Size: 951 bytes --]

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

* Re: Export / LaTeX / suggestion
  2013-05-07 19:42 Export / LaTeX / suggestion Fabrice Popineau
@ 2013-05-07 21:16 ` Aaron Ecay
  2013-05-07 21:34   ` Fabrice Popineau
  0 siblings, 1 reply; 3+ messages in thread
From: Aaron Ecay @ 2013-05-07 21:16 UTC (permalink / raw)
  To: Fabrice Popineau; +Cc: emacs-orgmode

Hi Fabrice,

2013ko maiatzak 7an, Fabrice Popineau-ek idatzi zuen:
> 
> Currently we need to write this :
> 
> #+ATTR_LATEX: :options [title of definition]
> #+begin_definition
> This is a definition.
> #+end_definition
> 
> to get this with the LaTeX exporter :
> 
> \begin{definition}[title of definition]
> This is a definition.
> \end{definition}
> 
> I was wondering if something like this is possible :
> 
> #+begin_definition :options [title of definition]
> This is a definition.
> #+end_definition
> 
> Generally speaking, the rest of the line with #+begin_... could be
> considered as an implicit #+ATTR_HTML for this environment.

I don’t think you want to do that – each backend (latex, html, etc.)
could have its own incompatible keywords.  In this case, :options for
latex and :options for html (and ascii, etc.) will have different
syntax.  (html, ascii, etc. export don’t handle :options at the moment,
but you can imagine how they might want to do so, which would certainly
not share latex’s syntax.)  The present #+attr_X convention keeps these
separate.

(I’ve got a solution to this that I’ve been using for the past several
weeks, but it involves several interlocking pieces and is too messy to
be shared still.  In brief, it comprises extending the parser to handle
:keywords on a #+begin_foo line, and extending the exporter backends to
allow different types of block (definition, quote, etc.) to be formatted
using that information.  I’m busy with exams at the moment, but in a
week or so I hope to have some free time to work on it, among other
org-related projects.)

-- 
Aaron Ecay

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

* Re: Export / LaTeX / suggestion
  2013-05-07 21:16 ` Aaron Ecay
@ 2013-05-07 21:34   ` Fabrice Popineau
  0 siblings, 0 replies; 3+ messages in thread
From: Fabrice Popineau @ 2013-05-07 21:34 UTC (permalink / raw)
  To: Fabrice Popineau, emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1343 bytes --]

> I don’t think you want to do that – each backend (latex, html, etc.)
> could have its own incompatible keywords.


You are right. I was thinking of dropping them if they were unkown to the
current backend,
but it is not exactly a solution.


> (I’ve got a solution to this that I’ve been using for the past several
> weeks, but it involves several interlocking pieces and is too messy to
> be shared still.  In brief, it comprises extending the parser to handle
> :keywords on a #+begin_foo line, and extending the exporter backends to
> allow different types of block (definition, quote, etc.) to be formatted
> using that information.  I’m busy with exams at the moment, but in a
> week or so I hope to have some free time to work on it, among other
> org-related projects.)


LaTeX (and worse beamer) are known to require lots of markup (sometimes
more than actual text).
The real org-mode asset is to remove lots of markup.
Maybe we should just avoid to reintroduce too much of this markup, even if
it is hidden in drawers and so on.

This was a general remark. I'm very interested in reading what you have
been able to achieve.

My primary concern was to be able to fold the #+begin_environment and to be
able to copy/paste it
without having to mark the #+attr_ previous line.

Best regards,

Fabrice

[-- Attachment #2: Type: text/html, Size: 1949 bytes --]

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

end of thread, other threads:[~2013-05-07 21:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-07 19:42 Export / LaTeX / suggestion Fabrice Popineau
2013-05-07 21:16 ` Aaron Ecay
2013-05-07 21:34   ` Fabrice Popineau

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