emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* export comments in LaTeX ?
@ 2010-11-22 18:10 e20100633
  2010-11-22 18:34 ` Juan Pechiar
  2011-01-04 10:44 ` Bastien
  0 siblings, 2 replies; 6+ messages in thread
From: e20100633 @ 2010-11-22 18:10 UTC (permalink / raw)
  To: emacs-orgmode

Hello,

I found in the manual that commented lines will *not* be exported.

But I'd like to know if there's a hook around allowing to export
comments from org-mode to LaTeX (I mean, comments will appear in the
dvi/pdf in some way).

I have bunch of files in org-mode with comments, and I need to see the
comments in my finals pdfs. For now, I just add them by hand in my .tex
files and I surround them in boxes but it take me hours...

So maybe there's a way to tell org-mode to treat comments as quotes or
something ?

Thanks for your help.

Regards,

-- 
~ TYPE 1707-A3 SLACKWARE13 RLU #527034
~ #ID: e20100633 <e20100633()inbox!lv>

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

* Re: export comments in LaTeX ?
  2010-11-22 18:10 export comments in LaTeX ? e20100633
@ 2010-11-22 18:34 ` Juan Pechiar
  2010-11-22 21:53   ` e20100633
  2011-01-04 10:44 ` Bastien
  1 sibling, 1 reply; 6+ messages in thread
From: Juan Pechiar @ 2010-11-22 18:34 UTC (permalink / raw)
  To: e20100633; +Cc: emacs-orgmode

Hi,

Maybe you can easily regexp-replace all 'COMMENT' keywords for a tag
(like :noexport:).

Then there are header options for tags which should be included /
excluded on export.

     #+EXPORT_SELECT_TAGS:   Tags that select a tree for export
     #+EXPORT_EXCLUDE_TAGS:  Tags that exclude a tree from export

Regards,
.j.

On Mon, Nov 22, 2010 at 07:10:55PM +0100, e20100633 wrote:
> I have bunch of files in org-mode with comments, and I need to see the
> comments in my finals pdfs. For now, I just add them by hand in my .tex
> files and I surround them in boxes but it take me hours...
>
> So maybe there's a way to tell org-mode to treat comments as quotes or
> something ?

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

* Re: export comments in LaTeX ?
  2010-11-22 18:34 ` Juan Pechiar
@ 2010-11-22 21:53   ` e20100633
  2010-11-22 23:07     ` Juan Pechiar
  0 siblings, 1 reply; 6+ messages in thread
From: e20100633 @ 2010-11-22 21:53 UTC (permalink / raw)
  To: emacs-orgmode

Hello,

Juan Pechiar <juan@pechiar.com> writes:

> Maybe you can easily regexp-replace all 'COMMENT' keywords for a tag
> (like :noexport:).
>
> Then there are header options for tags which should be included /
> excluded on export.
>
>      #+EXPORT_SELECT_TAGS:   Tags that select a tree for export
>      #+EXPORT_EXCLUDE_TAGS:  Tags that exclude a tree from export

Ok, you mean for each commented line I have to put a tag which give me
that result for example ? :

--8<---------------cut here---------------start------------->8---
# This is a comment line.                           :mytag:
# And this is an other comment line                 :mytag:
--8<---------------cut here---------------end--------------->8---

Then I'll just use the EXPORT_SELECT_TAGS ?

Hum very interesting, I'll give it a try, thank you for your answer :)

Regards,

-- 
~ TYPE 1707-A3 SLACKWARE13 RLU #527034
~ #ID: e20100633 <e20100633()inbox!lv>

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

* Re: Re: export comments in LaTeX ?
  2010-11-22 21:53   ` e20100633
@ 2010-11-22 23:07     ` Juan Pechiar
  2010-11-23 22:05       ` e20100633
  0 siblings, 1 reply; 6+ messages in thread
From: Juan Pechiar @ 2010-11-22 23:07 UTC (permalink / raw)
  To: e20100633; +Cc: emacs-orgmode

Just note that tags work on _headings_, not on a line by line basis as
you suggest below:

Example:

8<------------------------------------------------------------
#+EXPORT_EXCLUDE_TAGS: privatnote

** This will get exported sometimes   :privatenote:
   Hi there!

8<------------------------------------------------------------

.j.

On Mon, Nov 22, 2010 at 10:53:20PM +0100, e20100633 wrote:
> Juan Pechiar <juan@pechiar.com> writes:
>
> > Maybe you can easily regexp-replace all 'COMMENT' keywords for a tag
> > (like :noexport:).
> >
> > Then there are header options for tags which should be included /
> > excluded on export.
> >
> >      #+EXPORT_SELECT_TAGS:   Tags that select a tree for export
> >      #+EXPORT_EXCLUDE_TAGS:  Tags that exclude a tree from export
>
> Ok, you mean for each commented line I have to put a tag which give me
> that result for example ? :
>
> --8<---------------cut here---------------start------------->8---
> # This is a comment line.                           :mytag:
> # And this is an other comment line                 :mytag:
> --8<---------------cut here---------------end--------------->8---
>
> Then I'll just use the EXPORT_SELECT_TAGS ?
>
> Hum very interesting, I'll give it a try, thank you for your answer :)

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

* Re: export comments in LaTeX ?
  2010-11-22 23:07     ` Juan Pechiar
@ 2010-11-23 22:05       ` e20100633
  0 siblings, 0 replies; 6+ messages in thread
From: e20100633 @ 2010-11-23 22:05 UTC (permalink / raw)
  To: emacs-orgmode

Hello,

Juan Pechiar <juan@pechiar.com> writes:

> Just note that tags work on _headings_, not on a line by line basis as
> you suggest below:
>
> Example:
>
> 8<------------------------------------------------------------
> #+EXPORT_EXCLUDE_TAGS: privatnote
>
> ** This will get exported sometimes   :privatenote:
>    Hi there!
>
> 8<------------------------------------------------------------
>
> .j.
>

Well, great ! Thank you very much :)

Regards,

-- 
~ #ID: e20100633 <e20100633()inbox!lv> #TEL: 9-8M 4554
~ TYPE 1707-A3 S/N L3-M2812 SLACKWARE 13.0 RLU #527034
------------------------------------------------{,_,">

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

* Re: export comments in LaTeX ?
  2010-11-22 18:10 export comments in LaTeX ? e20100633
  2010-11-22 18:34 ` Juan Pechiar
@ 2011-01-04 10:44 ` Bastien
  1 sibling, 0 replies; 6+ messages in thread
From: Bastien @ 2011-01-04 10:44 UTC (permalink / raw)
  To: e20100633; +Cc: emacs-orgmode

e20100633 <e20100633@inbox.lv> writes:

> I found in the manual that commented lines will *not* be exported.
>
> But I'd like to know if there's a hook around allowing to export
> comments from org-mode to LaTeX (I mean, comments will appear in the
> dvi/pdf in some way).

On top of other solutions already mentioned, see also this hook:

,----[ org-export-preprocess-hook ]
| Hook for preprocessing an export buffer.
| Pretty much the first thing when exporting is running this hook.
| Point will be in a temporary buffer that contains a copy of
| the original buffer, or of the section that is being export.
| All the other hooks in the org-export-preprocess... category
| also work in that temporary buffer, already modified by various
| stages of the processing.
`----

You can set this hook to a function that toggles the COMMENT keyword or
the :noexport: tag, or convert inline comments (#) to #+begin_example
sections.

The hook operates on a temporary buffer so it's safe for your org file.

HTH,

-- 
 Bastien

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

end of thread, other threads:[~2011-01-04 10:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-22 18:10 export comments in LaTeX ? e20100633
2010-11-22 18:34 ` Juan Pechiar
2010-11-22 21:53   ` e20100633
2010-11-22 23:07     ` Juan Pechiar
2010-11-23 22:05       ` e20100633
2011-01-04 10:44 ` Bastien

Code repositories for project(s) associated with this 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).