emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* markup in environments in latex export
@ 2009-04-16  8:49 Chris Gray
  2009-04-16 12:21 ` Carsten Dominik
  0 siblings, 1 reply; 10+ messages in thread
From: Chris Gray @ 2009-04-16  8:49 UTC (permalink / raw)
  To: emacs-orgmode

Hello,

I have been writing a draft of a paper in org, and I would like to have
the customary org markup commands work inside of LaTeX environments.  As
an example, I would like the following to have the same thing three
times instead of only twice.

--8<---------------cut here---------------start------------->8---
#+TITLE: None


\begin{center}

- /a/ this is a
- /b/ this is b

\begin{itemize}
\item \emph{a} this is a
\item \emph{b} this is b
\end{itemize}
  
\end{center}

- /a/ this is a
- /b/ this is b
--8<---------------cut here---------------end--------------->8---


Cheers,
Chris

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

* Re: markup in environments in latex export
  2009-04-16  8:49 markup in environments in latex export Chris Gray
@ 2009-04-16 12:21 ` Carsten Dominik
  2009-04-16 13:09   ` Chris Gray
  0 siblings, 1 reply; 10+ messages in thread
From: Carsten Dominik @ 2009-04-16 12:21 UTC (permalink / raw)
  To: Chris Gray; +Cc: emacs-orgmode

Hi Chris,

you can't have the cake and eat it.

if you insert a LaTeX environment, the entire environment
will be protected.  After all, you rely on this quoting with your
itemize environment!

However, you can do this:

--8<---------------cut here---------------start------------->8---
#+TITLE: None


#+begin_center

- /a/ this is a
- /b/ this is b

\begin{itemize}
\item \emph{a} this is a
\item \emph{b} this is b
\end{itemize}

#+end_center

- /a/ this is a
- /b/ this is b
--8<---------------cut here---------------end--------------->8---

This works by the protection being done first, and only
then #+begin_center is turned into \begin{center}

HTH

- Carsten

On Apr 16, 2009, at 10:49 AM, Chris Gray wrote:

> Hello,
>
> I have been writing a draft of a paper in org, and I would like to  
> have
> the customary org markup commands work inside of LaTeX  
> environments.  As
> an example, I would like the following to have the same thing three
> times instead of only twice.
>
> --8<---------------cut here---------------start------------->8---
> #+TITLE: None
>
>
> \begin{center}
>
> - /a/ this is a
> - /b/ this is b
>
> \begin{itemize}
> \item \emph{a} this is a
> \item \emph{b} this is b
> \end{itemize}
>
> \end{center}
>
> - /a/ this is a
> - /b/ this is b
> --8<---------------cut here---------------end--------------->8---
>
>
> Cheers,
> Chris
>
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: markup in environments in latex export
  2009-04-16 12:21 ` Carsten Dominik
@ 2009-04-16 13:09   ` Chris Gray
  2009-04-16 20:47     ` Carsten Dominik
  0 siblings, 1 reply; 10+ messages in thread
From: Chris Gray @ 2009-04-16 13:09 UTC (permalink / raw)
  To: emacs-orgmode

Carsten Dominik wrote:

> Hi Chris,

> you can't have the cake and eat it.

> if you insert a LaTeX environment, the entire environment
> will be protected.  After all, you rely on this quoting with your
> itemize environment!

Hi Carsten,

I don't really understand this.  I can see it for things like the
verbatim environment, but that might be a special case.  

> However, you can do this:

> #+begin_center

I should have chosen a different example I suppose.  What I am really
using, rather than center, are the theorem, lemma, and proof
environments.  I thought it would be safer for my example to use an
environment that is included by default in LaTeX.  Unfortunately, center
is already a special case in org.  But I tried #+begin_proof and that
did not work.

> This works by the protection being done first, and only
> then #+begin_center is turned into \begin{center}

Perhaps that could be generalized so that #+begin_foo means "do the
regular org parsing and then turn on \begin{foo}"?  Other exporters
would be free to ignore these commands.

I really like doing my work in org mode, and I can certainly convert my
markup commands to regular LaTeX, but doing that really seems like a
second-best solution.

Cheers,
Chris

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

* Re: Re: markup in environments in latex export
  2009-04-16 13:09   ` Chris Gray
@ 2009-04-16 20:47     ` Carsten Dominik
  2009-04-19 19:55       ` Chris Gray
  0 siblings, 1 reply; 10+ messages in thread
From: Carsten Dominik @ 2009-04-16 20:47 UTC (permalink / raw)
  To: Chris Gray; +Cc: emacs-orgmode

Hi Chris,

no, this is really by design the way it is.  Org-mode has its own
markup.  As a bonus to people used to LaTeX, it allows certain
LaTeX constructs to be intermingled into the file.  For LaTeX
export, it will export these *literally*, the entire construct.
For HTML export, you can arrange for these snippets to be
processed by LaTeX as well and then included as images,
this is useful for formulas and some other constructs.

Here is a way to fool it:

\nop{}\begin{center}

- /a/ this is a
- /b/ this is b

\begin{itemize}
\item \emph{a} this is a
\item \emph{b} this is b
\end{itemize}

\nop{}\end{center}

- /a/ this is a
- /b/ this is b


Why does it fool it?  Because it recognized full environments to be  
included
by \begin ... \end, wit these macros at the beginning of the line.

If I were to allow what you propose, it would quickly become hard to  
know
what should be LaTeX and what not.  I think.

Feel free to try to make a patch that will convince me of the opposite.

- Carsten



On Apr 16, 2009, at 3:09 PM, Chris Gray wrote:

> Carsten Dominik wrote:
>
>> Hi Chris,
>
>> you can't have the cake and eat it.
>
>> if you insert a LaTeX environment, the entire environment
>> will be protected.  After all, you rely on this quoting with your
>> itemize environment!
>
> Hi Carsten,
>
> I don't really understand this.  I can see it for things like the
> verbatim environment, but that might be a special case.
>
>> However, you can do this:
>
>> #+begin_center
>
> I should have chosen a different example I suppose.  What I am really
> using, rather than center, are the theorem, lemma, and proof
> environments.  I thought it would be safer for my example to use an
> environment that is included by default in LaTeX.  Unfortunately,  
> center
> is already a special case in org.  But I tried #+begin_proof and that
> did not work.
>
>> This works by the protection being done first, and only
>> then #+begin_center is turned into \begin{center}
>
> Perhaps that could be generalized so that #+begin_foo means "do the
> regular org parsing and then turn on \begin{foo}"?  Other exporters
> would be free to ignore these commands.
>
> I really like doing my work in org mode, and I can certainly convert  
> my
> markup commands to regular LaTeX, but doing that really seems like a
> second-best solution.
>
> Cheers,
> Chris
>
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: markup in environments in latex export
  2009-04-16 20:47     ` Carsten Dominik
@ 2009-04-19 19:55       ` Chris Gray
  2009-04-20  6:04         ` Carsten Dominik
  2009-05-02  7:27         ` Carsten Dominik
  0 siblings, 2 replies; 10+ messages in thread
From: Chris Gray @ 2009-04-19 19:55 UTC (permalink / raw)
  To: emacs-orgmode

Hi Carsten,

I took up your challenge and made a patch that does what I want.  It
does what I suggested in my previous email in that it allows one to
put #+begin_foo and #+end_foo tags in the body of an org file.  These
tags allow you to change the environment of the text between them.
What that means is left up to the exporter.  For example, in LaTeX,
the tags are expanded to \begin{foo} and \end{foo}, whereas in HTML, I
have the tags being expanded to <div class="foo"> and </div>.  (I am
not sure if that is the right thing to do in HTML...)  The text
between the tags is not protected, and thus it is interpreted for
markup just as the rest of the file.

I have left the old cases in place, so blockquote, verse, and center
should still have the same behaviour as before.  The only behaviour
that changes is with #+begin_quote in HTML.  This no longer generates
a blockquote, but a <div class="quote">.  It would be easy to revert
this to the old behaviour if many people were using #+begin_quote with
HTML export.

I have put the patches up in a github repository (basically because I
wanted to play with github), so you should be able to pull them from
the general-cookies branch of git://github.com/chrismgray/org-mode.git

Cheers,
Chris

Carsten Dominik wrote:

> Hi Chris,

> no, this is really by design the way it is.  Org-mode has its own
> markup.  As a bonus to people used to LaTeX, it allows certain
> LaTeX constructs to be intermingled into the file.  For LaTeX
> export, it will export these *literally*, the entire construct.
> For HTML export, you can arrange for these snippets to be
> processed by LaTeX as well and then included as images,
> this is useful for formulas and some other constructs.

> Here is a way to fool it:

> \nop{}\begin{center}

> - /a/ this is a
> - /b/ this is b

> \begin{itemize}
> \item \emph{a} this is a
> \item \emph{b} this is b
> \end{itemize}

> \nop{}\end{center}

> - /a/ this is a
> - /b/ this is b


> Why does it fool it?  Because it recognized full environments to be
> included
> by \begin ... \end, wit these macros at the beginning of the line.

> If I were to allow what you propose, it would quickly become hard to
> know
> what should be LaTeX and what not.  I think.

> Feel free to try to make a patch that will convince me of the opposite.

> - Carsten



> On Apr 16, 2009, at 3:09 PM, Chris Gray wrote:

>> Carsten Dominik wrote:

>>> Hi Chris,

>>> you can't have the cake and eat it.

>>> if you insert a LaTeX environment, the entire environment
>>> will be protected.  After all, you rely on this quoting with your
>>> itemize environment!

>> Hi Carsten,

>> I don't really understand this.  I can see it for things like the
>> verbatim environment, but that might be a special case.

>>> However, you can do this:

>>> #+begin_center

>> I should have chosen a different example I suppose.  What I am really
>> using, rather than center, are the theorem, lemma, and proof
>> environments.  I thought it would be safer for my example to use an
>> environment that is included by default in LaTeX.  Unfortunately,
>> center
>> is already a special case in org.  But I tried #+begin_proof and that
>> did not work.

>>> This works by the protection being done first, and only
>>> then #+begin_center is turned into \begin{center}

>> Perhaps that could be generalized so that #+begin_foo means "do the
>> regular org parsing and then turn on \begin{foo}"?  Other exporters
>> would be free to ignore these commands.

>> I really like doing my work in org mode, and I can certainly convert
>> my
>> markup commands to regular LaTeX, but doing that really seems like a
>> second-best solution.

>> Cheers,
>> Chris



>> _______________________________________________
>> Emacs-orgmode mailing list
>> Remember: use `Reply All' to send replies to the list.
>> Emacs-orgmode@gnu.org
>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode



> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: Re: markup in environments in latex export
  2009-04-19 19:55       ` Chris Gray
@ 2009-04-20  6:04         ` Carsten Dominik
  2009-05-02  7:27         ` Carsten Dominik
  1 sibling, 0 replies; 10+ messages in thread
From: Carsten Dominik @ 2009-04-20  6:04 UTC (permalink / raw)
  To: Chris Gray; +Cc: emacs-orgmode

Hi Chris,

Normally a request for a patch shuts people up, not in your case. :-)

Very interesting, I like how you did this parallel to the
other, similar environments that also require internal
processing.

I am quite over committed right now and have a trip coming up,
and  I will need to think a bit more about this, so I may not
get to in quickly.  I'll get back to you, at the latest
in mid May.

- Carsten

P.S.  Do you have an FSF copyright assignment?  If not, could
you please get one?

On Apr 19, 2009, at 9:55 PM, Chris Gray wrote:

> Hi Carsten,
>
> I took up your challenge and made a patch that does what I want.  It
> does what I suggested in my previous email in that it allows one to
> put #+begin_foo and #+end_foo tags in the body of an org file.  These
> tags allow you to change the environment of the text between them.
> What that means is left up to the exporter.  For example, in LaTeX,
> the tags are expanded to \begin{foo} and \end{foo}, whereas in HTML, I
> have the tags being expanded to <div class="foo"> and </div>.  (I am
> not sure if that is the right thing to do in HTML...)  The text
> between the tags is not protected, and thus it is interpreted for
> markup just as the rest of the file.
>
> I have left the old cases in place, so blockquote, verse, and center
> should still have the same behaviour as before.  The only behaviour
> that changes is with #+begin_quote in HTML.  This no longer generates
> a blockquote, but a <div class="quote">.  It would be easy to revert
> this to the old behaviour if many people were using #+begin_quote with
> HTML export.
>
> I have put the patches up in a github repository (basically because I
> wanted to play with github), so you should be able to pull them from
> the general-cookies branch of git://github.com/chrismgray/org-mode.git
>
> Cheers,
> Chris
>
> Carsten Dominik wrote:
>
>> Hi Chris,
>
>> no, this is really by design the way it is.  Org-mode has its own
>> markup.  As a bonus to people used to LaTeX, it allows certain
>> LaTeX constructs to be intermingled into the file.  For LaTeX
>> export, it will export these *literally*, the entire construct.
>> For HTML export, you can arrange for these snippets to be
>> processed by LaTeX as well and then included as images,
>> this is useful for formulas and some other constructs.
>
>> Here is a way to fool it:
>
>> \nop{}\begin{center}
>
>> - /a/ this is a
>> - /b/ this is b
>
>> \begin{itemize}
>> \item \emph{a} this is a
>> \item \emph{b} this is b
>> \end{itemize}
>
>> \nop{}\end{center}
>
>> - /a/ this is a
>> - /b/ this is b
>
>
>> Why does it fool it?  Because it recognized full environments to be
>> included
>> by \begin ... \end, wit these macros at the beginning of the line.
>
>> If I were to allow what you propose, it would quickly become hard to
>> know
>> what should be LaTeX and what not.  I think.
>
>> Feel free to try to make a patch that will convince me of the  
>> opposite.
>
>> - Carsten
>
>
>
>> On Apr 16, 2009, at 3:09 PM, Chris Gray wrote:
>
>>> Carsten Dominik wrote:
>
>>>> Hi Chris,
>
>>>> you can't have the cake and eat it.
>
>>>> if you insert a LaTeX environment, the entire environment
>>>> will be protected.  After all, you rely on this quoting with your
>>>> itemize environment!
>
>>> Hi Carsten,
>
>>> I don't really understand this.  I can see it for things like the
>>> verbatim environment, but that might be a special case.
>
>>>> However, you can do this:
>
>>>> #+begin_center
>
>>> I should have chosen a different example I suppose.  What I am  
>>> really
>>> using, rather than center, are the theorem, lemma, and proof
>>> environments.  I thought it would be safer for my example to use an
>>> environment that is included by default in LaTeX.  Unfortunately,
>>> center
>>> is already a special case in org.  But I tried #+begin_proof and  
>>> that
>>> did not work.
>
>>>> This works by the protection being done first, and only
>>>> then #+begin_center is turned into \begin{center}
>
>>> Perhaps that could be generalized so that #+begin_foo means "do the
>>> regular org parsing and then turn on \begin{foo}"?  Other exporters
>>> would be free to ignore these commands.
>
>>> I really like doing my work in org mode, and I can certainly convert
>>> my
>>> markup commands to regular LaTeX, but doing that really seems like a
>>> second-best solution.
>
>>> Cheers,
>>> Chris
>
>
>
>>> _______________________________________________
>>> Emacs-orgmode mailing list
>>> Remember: use `Reply All' to send replies to the list.
>>> Emacs-orgmode@gnu.org
>>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
>
>
>> _______________________________________________
>> Emacs-orgmode mailing list
>> Remember: use `Reply All' to send replies to the list.
>> Emacs-orgmode@gnu.org
>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
>
>
>
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: Re: markup in environments in latex export
  2009-04-19 19:55       ` Chris Gray
  2009-04-20  6:04         ` Carsten Dominik
@ 2009-05-02  7:27         ` Carsten Dominik
  2009-05-04  7:52           ` Chris Gray
  1 sibling, 1 reply; 10+ messages in thread
From: Carsten Dominik @ 2009-05-02  7:27 UTC (permalink / raw)
  To: Chris Gray; +Cc: emacs-orgmode

Hi Chris,

I have been pondering about this idea, and I prefer to not integrate
it into the Org core because I think it may lead to undesired behavior,
in particular in the other backends like docbook or ASCII.

However, I have just created three new hooks

	* org-exp.el (org-export-preprocess-after-blockquote-hook): New hook.
	(org-export-preprocess-string): Run the new hook.

         * org-latex.el (org-export-latex-after-blockquotes-hook): New  
hook.
         (org-export-latex-preprocess): Run the new hook.

	* org-html.el (org-export-html-after-blockquotes-hook): New hook.
	(org-export-as-html): Run the new hook.

which would allow to easily implement your idea as an add-on package
that we could include in the contrib directory.  Would you like to
reformulate your patch into a small add-on?  The only thing I would
like to ask is to keep it LaTeX/HTML-specific, and this means that
the action to turn #+begin_..... into the cookies should be wrapped
into

(when (or latexp htmlp)
    .......
   )



latexp and htmlp are a local variables available when the
first of the three hooks is run.

- Carsten

On Apr 19, 2009, at 9:55 PM, Chris Gray wrote:

> Hi Carsten,
>
> I took up your challenge and made a patch that does what I want.  It
> does what I suggested in my previous email in that it allows one to
> put #+begin_foo and #+end_foo tags in the body of an org file.  These
> tags allow you to change the environment of the text between them.
> What that means is left up to the exporter.  For example, in LaTeX,
> the tags are expanded to \begin{foo} and \end{foo}, whereas in HTML, I
> have the tags being expanded to <div class="foo"> and </div>.  (I am
> not sure if that is the right thing to do in HTML...)  The text
> between the tags is not protected, and thus it is interpreted for
> markup just as the rest of the file.
>
> I have left the old cases in place, so blockquote, verse, and center
> should still have the same behaviour as before.  The only behaviour
> that changes is with #+begin_quote in HTML.  This no longer generates
> a blockquote, but a <div class="quote">.  It would be easy to revert
> this to the old behaviour if many people were using #+begin_quote with
> HTML export.
>
> I have put the patches up in a github repository (basically because I
> wanted to play with github), so you should be able to pull them from
> the general-cookies branch of git://github.com/chrismgray/org-mode.git
>
> Cheers,
> Chris
>
> Carsten Dominik wrote:
>
>> Hi Chris,
>
>> no, this is really by design the way it is.  Org-mode has its own
>> markup.  As a bonus to people used to LaTeX, it allows certain
>> LaTeX constructs to be intermingled into the file.  For LaTeX
>> export, it will export these *literally*, the entire construct.
>> For HTML export, you can arrange for these snippets to be
>> processed by LaTeX as well and then included as images,
>> this is useful for formulas and some other constructs.
>
>> Here is a way to fool it:
>
>> \nop{}\begin{center}
>
>> - /a/ this is a
>> - /b/ this is b
>
>> \begin{itemize}
>> \item \emph{a} this is a
>> \item \emph{b} this is b
>> \end{itemize}
>
>> \nop{}\end{center}
>
>> - /a/ this is a
>> - /b/ this is b
>
>
>> Why does it fool it?  Because it recognized full environments to be
>> included
>> by \begin ... \end, wit these macros at the beginning of the line.
>
>> If I were to allow what you propose, it would quickly become hard to
>> know
>> what should be LaTeX and what not.  I think.
>
>> Feel free to try to make a patch that will convince me of the  
>> opposite.
>
>> - Carsten
>
>
>
>> On Apr 16, 2009, at 3:09 PM, Chris Gray wrote:
>
>>> Carsten Dominik wrote:
>
>>>> Hi Chris,
>
>>>> you can't have the cake and eat it.
>
>>>> if you insert a LaTeX environment, the entire environment
>>>> will be protected.  After all, you rely on this quoting with your
>>>> itemize environment!
>
>>> Hi Carsten,
>
>>> I don't really understand this.  I can see it for things like the
>>> verbatim environment, but that might be a special case.
>
>>>> However, you can do this:
>
>>>> #+begin_center
>
>>> I should have chosen a different example I suppose.  What I am  
>>> really
>>> using, rather than center, are the theorem, lemma, and proof
>>> environments.  I thought it would be safer for my example to use an
>>> environment that is included by default in LaTeX.  Unfortunately,
>>> center
>>> is already a special case in org.  But I tried #+begin_proof and  
>>> that
>>> did not work.
>
>>>> This works by the protection being done first, and only
>>>> then #+begin_center is turned into \begin{center}
>
>>> Perhaps that could be generalized so that #+begin_foo means "do the
>>> regular org parsing and then turn on \begin{foo}"?  Other exporters
>>> would be free to ignore these commands.
>
>>> I really like doing my work in org mode, and I can certainly convert
>>> my
>>> markup commands to regular LaTeX, but doing that really seems like a
>>> second-best solution.
>
>>> Cheers,
>>> Chris
>
>
>
>>> _______________________________________________
>>> Emacs-orgmode mailing list
>>> Remember: use `Reply All' to send replies to the list.
>>> Emacs-orgmode@gnu.org
>>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
>
>
>> _______________________________________________
>> Emacs-orgmode mailing list
>> Remember: use `Reply All' to send replies to the list.
>> Emacs-orgmode@gnu.org
>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
>
>
>
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: markup in environments in latex export
  2009-05-02  7:27         ` Carsten Dominik
@ 2009-05-04  7:52           ` Chris Gray
  2009-05-04 14:28             ` Carsten Dominik
  0 siblings, 1 reply; 10+ messages in thread
From: Chris Gray @ 2009-05-04  7:52 UTC (permalink / raw)
  To: emacs-orgmode

Hi Carsten,

That seems like a good solution.  I will work on it and test it over the
next couple of days and let you know when it is ready.  Do you have any
preference for the name of the file?

BTW, I also have signed and sent the copyright papers.  I don't know if
that's necessary for a contrib package, but now it's done...

Cheers,
Chris

Carsten Dominik wrote:

> Hi Chris,

> I have been pondering about this idea, and I prefer to not integrate
> it into the Org core because I think it may lead to undesired behavior,
> in particular in the other backends like docbook or ASCII.

> However, I have just created three new hooks

> 	* org-exp.el (org-export-preprocess-after-blockquote-hook): New hook.
> 	(org-export-preprocess-string): Run the new hook.

>         * org-latex.el (org-export-latex-after-blockquotes-hook): New
> hook.
>         (org-export-latex-preprocess): Run the new hook.

> 	* org-html.el (org-export-html-after-blockquotes-hook): New hook.
> 	(org-export-as-html): Run the new hook.

> which would allow to easily implement your idea as an add-on package
> that we could include in the contrib directory.  Would you like to
> reformulate your patch into a small add-on?  The only thing I would
> like to ask is to keep it LaTeX/HTML-specific, and this means that
> the action to turn #+begin_..... into the cookies should be wrapped
> into

> (when (or latexp htmlp)
>    .......
>   )



> latexp and htmlp are a local variables available when the
> first of the three hooks is run.

> - Carsten

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

* Re: Re: markup in environments in latex export
  2009-05-04  7:52           ` Chris Gray
@ 2009-05-04 14:28             ` Carsten Dominik
  2009-05-06 14:01               ` Chris Gray
  0 siblings, 1 reply; 10+ messages in thread
From: Carsten Dominik @ 2009-05-04 14:28 UTC (permalink / raw)
  To: Chris Gray; +Cc: emacs-orgmode


On May 4, 2009, at 9:52 AM, Chris Gray wrote:

> Hi Carsten,
>
> That seems like a good solution.  I will work on it and test it over  
> the
> next couple of days and let you know when it is ready.  Do you have  
> any
> preference for the name of the file?

Hard to find a good name

org-block2env.el
org-anyblock.el

I don't know, your call.

>
> BTW, I also have signed and sent the copyright papers.  I don't know  
> if
> that's necessary for a contrib package, but now it's done...

It is not necessary for a contrib package, but it will be good to have  
anyway.  Maybe this add-on will move into the core distro eventually  
(turned off by default), or maybe you will contribute other patches.

Thanks.

- Carsten


>
> Cheers,
> Chris
>
> Carsten Dominik wrote:
>
>> Hi Chris,
>
>> I have been pondering about this idea, and I prefer to not integrate
>> it into the Org core because I think it may lead to undesired  
>> behavior,
>> in particular in the other backends like docbook or ASCII.
>
>> However, I have just created three new hooks
>
>> 	* org-exp.el (org-export-preprocess-after-blockquote-hook): New  
>> hook.
>> 	(org-export-preprocess-string): Run the new hook.
>
>>        * org-latex.el (org-export-latex-after-blockquotes-hook): New
>> hook.
>>        (org-export-latex-preprocess): Run the new hook.
>
>> 	* org-html.el (org-export-html-after-blockquotes-hook): New hook.
>> 	(org-export-as-html): Run the new hook.
>
>> which would allow to easily implement your idea as an add-on package
>> that we could include in the contrib directory.  Would you like to
>> reformulate your patch into a small add-on?  The only thing I would
>> like to ask is to keep it LaTeX/HTML-specific, and this means that
>> the action to turn #+begin_..... into the cookies should be wrapped
>> into
>
>> (when (or latexp htmlp)
>>   .......
>>  )
>
>
>
>> latexp and htmlp are a local variables available when the
>> first of the three hooks is run.
>
>> - Carsten
>
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

* Re: markup in environments in latex export
  2009-05-04 14:28             ` Carsten Dominik
@ 2009-05-06 14:01               ` Chris Gray
  0 siblings, 0 replies; 10+ messages in thread
From: Chris Gray @ 2009-05-06 14:01 UTC (permalink / raw)
  To: emacs-orgmode

Hi Carsten,

You can find the commit in the special-blocks branch of my github
repository.  I've tested exporting both LaTeX and HTML.  

Cheers,
Chris

Carsten Dominik wrote:


> On May 4, 2009, at 9:52 AM, Chris Gray wrote:

>> Hi Carsten,

>> That seems like a good solution.  I will work on it and test it over
>> the
>> next couple of days and let you know when it is ready.  Do you have
>> any
>> preference for the name of the file?

> Hard to find a good name

> org-block2env.el
> org-anyblock.el

> I don't know, your call.


>> BTW, I also have signed and sent the copyright papers.  I don't know
>> if
>> that's necessary for a contrib package, but now it's done...

> It is not necessary for a contrib package, but it will be good to have
> anyway.  Maybe this add-on will move into the core distro eventually
> (turned off by default), or maybe you will contribute other patches.

> Thanks.

> - Carsten



>> Cheers,
>> Chris

>> Carsten Dominik wrote:

>>> Hi Chris,

>>> I have been pondering about this idea, and I prefer to not integrate
>>> it into the Org core because I think it may lead to undesired
>>> behavior,
>>> in particular in the other backends like docbook or ASCII.

>>> However, I have just created three new hooks

>>> 	* org-exp.el (org-export-preprocess-after-blockquote-hook):
>>> New hook.
>>> 	(org-export-preprocess-string): Run the new hook.

>>>        * org-latex.el (org-export-latex-after-blockquotes-hook): New
>>> hook.
>>>        (org-export-latex-preprocess): Run the new hook.

>>> 	* org-html.el (org-export-html-after-blockquotes-hook): New hook.
>>> 	(org-export-as-html): Run the new hook.

>>> which would allow to easily implement your idea as an add-on package
>>> that we could include in the contrib directory.  Would you like to
>>> reformulate your patch into a small add-on?  The only thing I would
>>> like to ask is to keep it LaTeX/HTML-specific, and this means that
>>> the action to turn #+begin_..... into the cookies should be wrapped
>>> into

>>> (when (or latexp htmlp)
>>>   .......
>>>  )



>>> latexp and htmlp are a local variables available when the
>>> first of the three hooks is run.

>>> - Carsten



>> _______________________________________________
>> Emacs-orgmode mailing list
>> Remember: use `Reply All' to send replies to the list.
>> Emacs-orgmode@gnu.org
>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode



> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode


-- 

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

end of thread, other threads:[~2009-05-06 14:02 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-16  8:49 markup in environments in latex export Chris Gray
2009-04-16 12:21 ` Carsten Dominik
2009-04-16 13:09   ` Chris Gray
2009-04-16 20:47     ` Carsten Dominik
2009-04-19 19:55       ` Chris Gray
2009-04-20  6:04         ` Carsten Dominik
2009-05-02  7:27         ` Carsten Dominik
2009-05-04  7:52           ` Chris Gray
2009-05-04 14:28             ` Carsten Dominik
2009-05-06 14:01               ` Chris Gray

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