* Omit top level heading in latex export?
@ 2010-10-03 13:31 Indraneel Majumdar
2010-10-03 15:27 ` suvayu ali
0 siblings, 1 reply; 10+ messages in thread
From: Indraneel Majumdar @ 2010-10-03 13:31 UTC (permalink / raw)
To: orgmode
Hi,
I'm running into a problem with latex export. I have several essays
under a top level heading "Essays". How can I export say only one essay
without the top level heading "Essays" also showing up in the output as
a "Section"? I want the heading of my essay to be displayed as a latex
section. Is this possible in any simple way? The manual describes some
option to define my own class in the .emacs file, but I couldn't
understand that very well.
eg.
* Essays
** Essay One
** Essay Two
I want to export only "Essay Two" (eg with a :export: tag) and don't
want "Essays" to show up.
Thanks in advance,
Indraneel
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Omit top level heading in latex export?
2010-10-03 13:31 Omit top level heading in latex export? Indraneel Majumdar
@ 2010-10-03 15:27 ` suvayu ali
2010-10-03 15:31 ` Indraneel Majumdar
2010-10-25 20:49 ` Hsiu-Khuern Tang
0 siblings, 2 replies; 10+ messages in thread
From: suvayu ali @ 2010-10-03 15:27 UTC (permalink / raw)
To: Indraneel Majumdar; +Cc: orgmode
On 3 October 2010 06:31, Indraneel Majumdar <indraneel@indraneel.info> wrote:
> Hi,
>
> I'm running into a problem with latex export. I have several essays under a
> top level heading "Essays". How can I export say only one essay without the
> top level heading "Essays" also showing up in the output as a "Section"? I
> want the heading of my essay to be displayed as a latex section. Is this
> possible in any simple way? The manual describes some option to define my
> own class in the .emacs file, but I couldn't understand that very well.
> eg.
>
> * Essays
> ** Essay One
> ** Essay Two
>
> I want to export only "Essay Two" (eg with a :export: tag) and don't want
> "Essays" to show up.
>
What about just exporting the subtree you want? I believe the way to
do that is to go to the subtree and while exporting limit the export
with `1'. Hope this helps.
>
> Thanks in advance,
> Indraneel
>
--
Suvayu
Open source is the future. It sets us free.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Omit top level heading in latex export?
2010-10-03 15:27 ` suvayu ali
@ 2010-10-03 15:31 ` Indraneel Majumdar
2010-10-03 15:42 ` suvayu ali
2010-10-03 16:51 ` Matt Lundin
2010-10-25 20:49 ` Hsiu-Khuern Tang
1 sibling, 2 replies; 10+ messages in thread
From: Indraneel Majumdar @ 2010-10-03 15:31 UTC (permalink / raw)
To: suvayu ali; +Cc: orgmode
On 2010-10-03 20:57, suvayu ali wrote:
> On 3 October 2010 06:31, Indraneel Majumdar<indraneel@indraneel.info> wrote:
>> Hi,
>>
>> I'm running into a problem with latex export. I have several essays under a
>> top level heading "Essays". How can I export say only one essay without the
>> top level heading "Essays" also showing up in the output as a "Section"? I
>> want the heading of my essay to be displayed as a latex section. Is this
>> possible in any simple way? The manual describes some option to define my
>> own class in the .emacs file, but I couldn't understand that very well.
>> eg.
>>
>> * Essays
>> ** Essay One
>> ** Essay Two
>>
>> I want to export only "Essay Two" (eg with a :export: tag) and don't want
>> "Essays" to show up.
>>
> What about just exporting the subtree you want? I believe the way to
> do that is to go to the subtree and while exporting limit the export
> with `1'. Hope this helps.
>
Yes, that exports the subtree (Essay Two) and also exports "Essays" (but
not "Essay One"). I do not want "Essays" to show up at all.
Indraneel
>> Thanks in advance,
>> Indraneel
>>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Omit top level heading in latex export?
2010-10-03 15:31 ` Indraneel Majumdar
@ 2010-10-03 15:42 ` suvayu ali
2010-10-03 15:49 ` Indraneel Majumdar
2010-10-03 16:51 ` Matt Lundin
1 sibling, 1 reply; 10+ messages in thread
From: suvayu ali @ 2010-10-03 15:42 UTC (permalink / raw)
To: Indraneel Majumdar; +Cc: orgmode
On 3 October 2010 08:31, Indraneel Majumdar <indraneel@indraneel.info> wrote:
>
> On 2010-10-03 20:57, suvayu ali wrote:
>>
>> On 3 October 2010 06:31, Indraneel Majumdar<indraneel@indraneel.info>
>> wrote:
>>>
>>> Hi,
>>>
>>> I'm running into a problem with latex export. I have several essays under
>>> a
>>> top level heading "Essays". How can I export say only one essay without
>>> the
>>> top level heading "Essays" also showing up in the output as a "Section"?
>>> I
>>> want the heading of my essay to be displayed as a latex section. Is this
>>> possible in any simple way? The manual describes some option to define my
>>> own class in the .emacs file, but I couldn't understand that very well.
>>> eg.
>>>
>>> * Essays
>>> ** Essay One
>>> ** Essay Two
>>>
>>> I want to export only "Essay Two" (eg with a :export: tag) and don't want
>>> "Essays" to show up.
>>>
>> What about just exporting the subtree you want? I believe the way to
>> do that is to go to the subtree and while exporting limit the export
>> with `1'. Hope this helps.
>>
> Yes, that exports the subtree (Essay Two) and also exports "Essays" (but not
> "Essay One"). I do not want "Essays" to show up at all.
>
In that case you can try the `noexport' tag on the top level headline
with this header `#+EXPORT_EXCLUDE_TAGS: noexport' option. I just
tried it, seems to work pretty well.
> Indraneel
--
Suvayu
Open source is the future. It sets us free.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Omit top level heading in latex export?
2010-10-03 15:42 ` suvayu ali
@ 2010-10-03 15:49 ` Indraneel Majumdar
2010-10-03 16:05 ` suvayu ali
0 siblings, 1 reply; 10+ messages in thread
From: Indraneel Majumdar @ 2010-10-03 15:49 UTC (permalink / raw)
To: suvayu ali; +Cc: orgmode
On 2010-10-03 21:12, suvayu ali wrote:
> On 3 October 2010 08:31, Indraneel Majumdar<indraneel@indraneel.info> wrote:
>> On 2010-10-03 20:57, suvayu ali wrote:
>>> On 3 October 2010 06:31, Indraneel Majumdar<indraneel@indraneel.info>
>>> wrote:
>>>> Hi,
>>>>
>>>> I'm running into a problem with latex export. I have several essays under
>>>> a
>>>> top level heading "Essays". How can I export say only one essay without
>>>> the
>>>> top level heading "Essays" also showing up in the output as a "Section"?
>>>> I
>>>> want the heading of my essay to be displayed as a latex section. Is this
>>>> possible in any simple way? The manual describes some option to define my
>>>> own class in the .emacs file, but I couldn't understand that very well.
>>>> eg.
>>>>
>>>> * Essays
>>>> ** Essay One
>>>> ** Essay Two
>>>>
>>>> I want to export only "Essay Two" (eg with a :export: tag) and don't want
>>>> "Essays" to show up.
>>>>
>>> What about just exporting the subtree you want? I believe the way to
>>> do that is to go to the subtree and while exporting limit the export
>>> with `1'. Hope this helps.
>>>
>> Yes, that exports the subtree (Essay Two) and also exports "Essays" (but not
>> "Essay One"). I do not want "Essays" to show up at all.
>>
> In that case you can try the `noexport' tag on the top level headline
> with this header `#+EXPORT_EXCLUDE_TAGS: noexport' option. I just
> tried it, seems to work pretty well.
>
Does not work for me. It blocks out the entire tree, even if I have
:export: on "Essay Two". From the manual, it seems that is how it should be.
>> Indraneel
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Omit top level heading in latex export?
2010-10-03 15:49 ` Indraneel Majumdar
@ 2010-10-03 16:05 ` suvayu ali
0 siblings, 0 replies; 10+ messages in thread
From: suvayu ali @ 2010-10-03 16:05 UTC (permalink / raw)
To: Indraneel Majumdar; +Cc: orgmode
On 3 October 2010 08:49, Indraneel Majumdar <indraneel@indraneel.info> wrote:
>
>
> On 2010-10-03 21:12, suvayu ali wrote:
>>
>> On 3 October 2010 08:31, Indraneel Majumdar<indraneel@indraneel.info>
>> wrote:
>>>
>>> On 2010-10-03 20:57, suvayu ali wrote:
>>>>
>>>> On 3 October 2010 06:31, Indraneel Majumdar<indraneel@indraneel.info>
>>>> wrote:
>>>>>
>>>>> Hi,
>>>>>
>>>>> I'm running into a problem with latex export. I have several essays
>>>>> under
>>>>> a
>>>>> top level heading "Essays". How can I export say only one essay without
>>>>> the
>>>>> top level heading "Essays" also showing up in the output as a
>>>>> "Section"?
>>>>> I
>>>>> want the heading of my essay to be displayed as a latex section. Is
>>>>> this
>>>>> possible in any simple way? The manual describes some option to define
>>>>> my
>>>>> own class in the .emacs file, but I couldn't understand that very well.
>>>>> eg.
>>>>>
>>>>> * Essays
>>>>> ** Essay One
>>>>> ** Essay Two
>>>>>
>>>>> I want to export only "Essay Two" (eg with a :export: tag) and don't
>>>>> want
>>>>> "Essays" to show up.
>>>>>
>>>> What about just exporting the subtree you want? I believe the way to
>>>> do that is to go to the subtree and while exporting limit the export
>>>> with `1'. Hope this helps.
>>>>
>>> Yes, that exports the subtree (Essay Two) and also exports "Essays" (but
>>> not
>>> "Essay One"). I do not want "Essays" to show up at all.
>>>
>> In that case you can try the `noexport' tag on the top level headline
>> with this header `#+EXPORT_EXCLUDE_TAGS: noexport' option. I just
>> tried it, seems to work pretty well.
>>
> Does not work for me. It blocks out the entire tree, even if I have :export:
> on "Essay Two". From the manual, it seems that is how it should be.
Could be a result of some setting in my setup. Only remotely relevant
variable I could find was `(setq org-hierarchical-todo-statistics
nil)'. I don't usually export my trees except for beamer
presentations. Not sure what else you could try. Sorry. :(
>>>
>>> Indraneel
>
--
Suvayu
Open source is the future. It sets us free.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Omit top level heading in latex export?
2010-10-03 15:31 ` Indraneel Majumdar
2010-10-03 15:42 ` suvayu ali
@ 2010-10-03 16:51 ` Matt Lundin
2010-10-03 17:31 ` Indraneel Majumdar
1 sibling, 1 reply; 10+ messages in thread
From: Matt Lundin @ 2010-10-03 16:51 UTC (permalink / raw)
To: Indraneel Majumdar; +Cc: orgmode
Indraneel Majumdar <indraneel@indraneel.info> writes:
> On 2010-10-03 20:57, suvayu ali wrote:
>> On 3 October 2010 06:31, Indraneel Majumdar<indraneel@indraneel.info> wrote:
>>> Hi,
>>>
>>> I'm running into a problem with latex export. I have several essays under a
>>> top level heading "Essays". How can I export say only one essay without the
>>> top level heading "Essays" also showing up in the output as a "Section"? I
>>> want the heading of my essay to be displayed as a latex section. Is this
>>> possible in any simple way? The manual describes some option to define my
>>> own class in the .emacs file, but I couldn't understand that very well.
>>> eg.
>>>
>>> * Essays
>>> ** Essay One
>>> ** Essay Two
>>>
>>> I want to export only "Essay Two" (eg with a :export: tag) and don't want
>>> "Essays" to show up.
>>>
>> What about just exporting the subtree you want? I believe the way to
>> do that is to go to the subtree and while exporting limit the export
>> with `1'. Hope this helps.
>>
> Yes, that exports the subtree (Essay Two) and also exports "Essays"
> (but not "Essay One"). I do not want "Essays" to show up at all.
I cannot replicate this. Take the following subtree:
--8<---------------cut here---------------start------------->8---
* Essays
** Essay One
Some text.
** Essay Two
Some special text.
--8<---------------cut here---------------end--------------->8---
With the latest org from git, if I press "C-c C-e 1 h" while the cursor
is on (or under) the Essay Two headline, the html output looks like
this:
--8<---------------cut here---------------start------------->8---
Essay Two
Some special text.
Author: Matt Lundin
Date: 2010-10-03 12:47:58 EDT
HTML generated by org-mode 7.01trans in emacs 24
--8<---------------cut here---------------end--------------->8---
Best,
Matt
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Re: Omit top level heading in latex export?
2010-10-03 16:51 ` Matt Lundin
@ 2010-10-03 17:31 ` Indraneel Majumdar
2010-10-03 18:18 ` Indraneel Majumdar
0 siblings, 1 reply; 10+ messages in thread
From: Indraneel Majumdar @ 2010-10-03 17:31 UTC (permalink / raw)
To: Matt Lundin; +Cc: orgmode
Thanks Matt and Suvayu,
I messed up with my lisp and that was causing the error. So now I have
another problem, how to fix the lisp code...
I'm using a org export hook to make all targets invisible by a regex
replace. This is probably messing up the selection, so what do I do to
not lose the selected text till the exporter takes over (or probably not
tamper with the selection or something)? I don't know any lisp.
(defun regex-replace (regex string)
(goto-char (point-min))
(while (re-search-forward regex nil t)
(replace-match string)))
(defun invisibletag()
"Make all targets invisible"
(regex-replace "\\(<<.+?>>\\) " "\\1(INVISIBLE) ")
)
(add-hook 'org-export-first-hook 'invisibletag)
Indraneel
On 2010-10-03 22:21, Matt Lundin wrote:
> Indraneel Majumdar<indraneel@indraneel.info> writes:
>
>> On 2010-10-03 20:57, suvayu ali wrote:
>>> On 3 October 2010 06:31, Indraneel Majumdar<indraneel@indraneel.info> wrote:
>>>> Hi,
>>>>
>>>> I'm running into a problem with latex export. I have several essays under a
>>>> top level heading "Essays". How can I export say only one essay without the
>>>> top level heading "Essays" also showing up in the output as a "Section"? I
>>>> want the heading of my essay to be displayed as a latex section. Is this
>>>> possible in any simple way? The manual describes some option to define my
>>>> own class in the .emacs file, but I couldn't understand that very well.
>>>> eg.
>>>>
>>>> * Essays
>>>> ** Essay One
>>>> ** Essay Two
>>>>
>>>> I want to export only "Essay Two" (eg with a :export: tag) and don't want
>>>> "Essays" to show up.
>>>>
>>> What about just exporting the subtree you want? I believe the way to
>>> do that is to go to the subtree and while exporting limit the export
>>> with `1'. Hope this helps.
>>>
>> Yes, that exports the subtree (Essay Two) and also exports "Essays"
>> (but not "Essay One"). I do not want "Essays" to show up at all.
> I cannot replicate this. Take the following subtree:
>
> --8<---------------cut here---------------start------------->8---
> * Essays
> ** Essay One
> Some text.
> ** Essay Two
> Some special text.
> --8<---------------cut here---------------end--------------->8---
>
> With the latest org from git, if I press "C-c C-e 1 h" while the cursor
> is on (or under) the Essay Two headline, the html output looks like
> this:
>
> --8<---------------cut here---------------start------------->8---
> Essay Two
>
> Some special text.
>
> Author: Matt Lundin
>
> Date: 2010-10-03 12:47:58 EDT
>
> HTML generated by org-mode 7.01trans in emacs 24
> --8<---------------cut here---------------end--------------->8---
>
> Best,
> Matt
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please 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: Omit top level heading in latex export?
2010-10-03 17:31 ` Indraneel Majumdar
@ 2010-10-03 18:18 ` Indraneel Majumdar
0 siblings, 0 replies; 10+ messages in thread
From: Indraneel Majumdar @ 2010-10-03 18:18 UTC (permalink / raw)
To: orgmode
I fixed my lisp. Just to archive the solution, here's my new defun:
(defun regex-replace (regex string)
(point-to-register 'rrr)
(goto-char (point-min))
(while (re-search-forward regex nil t)
(replace-match string))
(jump-to-register 'rrr))
On 2010-10-03 23:01, Indraneel Majumdar wrote:
> Thanks Matt and Suvayu,
>
> I messed up with my lisp and that was causing the error. So now I have
> another problem, how to fix the lisp code...
>
> I'm using a org export hook to make all targets invisible by a regex
> replace. This is probably messing up the selection, so what do I do to
> not lose the selected text till the exporter takes over (or probably
> not tamper with the selection or something)? I don't know any lisp.
>
> (defun regex-replace (regex string)
> (goto-char (point-min))
> (while (re-search-forward regex nil t)
> (replace-match string)))
>
> (defun invisibletag()
> "Make all targets invisible"
> (regex-replace "\\(<<.+?>>\\) " "\\1(INVISIBLE) ")
> )
> (add-hook 'org-export-first-hook 'invisibletag)
>
>
> Indraneel
>
> On 2010-10-03 22:21, Matt Lundin wrote:
>> Indraneel Majumdar<indraneel@indraneel.info> writes:
>>
>>> On 2010-10-03 20:57, suvayu ali wrote:
>>>> On 3 October 2010 06:31, Indraneel
>>>> Majumdar<indraneel@indraneel.info> wrote:
>>>>> Hi,
>>>>>
>>>>> I'm running into a problem with latex export. I have several
>>>>> essays under a
>>>>> top level heading "Essays". How can I export say only one essay
>>>>> without the
>>>>> top level heading "Essays" also showing up in the output as a
>>>>> "Section"? I
>>>>> want the heading of my essay to be displayed as a latex section.
>>>>> Is this
>>>>> possible in any simple way? The manual describes some option to
>>>>> define my
>>>>> own class in the .emacs file, but I couldn't understand that very
>>>>> well.
>>>>> eg.
>>>>>
>>>>> * Essays
>>>>> ** Essay One
>>>>> ** Essay Two
>>>>>
>>>>> I want to export only "Essay Two" (eg with a :export: tag) and
>>>>> don't want
>>>>> "Essays" to show up.
>>>>>
>>>> What about just exporting the subtree you want? I believe the way to
>>>> do that is to go to the subtree and while exporting limit the export
>>>> with `1'. Hope this helps.
>>>>
>>> Yes, that exports the subtree (Essay Two) and also exports "Essays"
>>> (but not "Essay One"). I do not want "Essays" to show up at all.
>> I cannot replicate this. Take the following subtree:
>>
>> --8<---------------cut here---------------start------------->8---
>> * Essays
>> ** Essay One
>> Some text.
>> ** Essay Two
>> Some special text.
>> --8<---------------cut here---------------end--------------->8---
>>
>> With the latest org from git, if I press "C-c C-e 1 h" while the cursor
>> is on (or under) the Essay Two headline, the html output looks like
>> this:
>>
>> --8<---------------cut here---------------start------------->8---
>> Essay Two
>>
>> Some special text.
>>
>> Author: Matt Lundin
>>
>> Date: 2010-10-03 12:47:58 EDT
>>
>> HTML generated by org-mode 7.01trans in emacs 24
>> --8<---------------cut here---------------end--------------->8---
>>
>> Best,
>> Matt
>>
>> _______________________________________________
>> Emacs-orgmode mailing list
>> Please 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
> Please 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: Omit top level heading in latex export?
2010-10-03 15:27 ` suvayu ali
2010-10-03 15:31 ` Indraneel Majumdar
@ 2010-10-25 20:49 ` Hsiu-Khuern Tang
1 sibling, 0 replies; 10+ messages in thread
From: Hsiu-Khuern Tang @ 2010-10-25 20:49 UTC (permalink / raw)
To: orgmode
Hi all,
Even though this problem has been solved by exporting a region
consisting of a single subtree ... I've always thought that it would
be nice to be able to get the same behavior using org-publish, so that
it can be used more easily in scripts. To be concrete: if I have this
structure:
* Essays :export:
** Essay One
** Essay Two
I'd like to be able to use a publishing option to export "Essays" and
get output like
Section 1 Essay One
Section 2 Essay Two
(which is what we get when we select the subtree "Essays" as the
active region before exporting) instead of
Section 1 Essays
Section 1.1 Essay One
Section 1.2 Essay Two
--
Best,
Hsiu-Khuern.
On Sun, Oct 3, 2010 at 8:27 AM, suvayu ali <fatkasuvayu+linux@gmail.com> wrote:
> On 3 October 2010 06:31, Indraneel Majumdar <indraneel@indraneel.info> wrote:
>> Hi,
>>
>> I'm running into a problem with latex export. I have several essays under a
>> top level heading "Essays". How can I export say only one essay without the
>> top level heading "Essays" also showing up in the output as a "Section"? I
>> want the heading of my essay to be displayed as a latex section. Is this
>> possible in any simple way? The manual describes some option to define my
>> own class in the .emacs file, but I couldn't understand that very well.
>> eg.
>>
>> * Essays
>> ** Essay One
>> ** Essay Two
>>
>> I want to export only "Essay Two" (eg with a :export: tag) and don't want
>> "Essays" to show up.
>>
>
> What about just exporting the subtree you want? I believe the way to
> do that is to go to the subtree and while exporting limit the export
> with `1'. Hope this helps.
>
>>
>> Thanks in advance,
>> Indraneel
>>
>
> --
> Suvayu
>
> Open source is the future. It sets us free.
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please 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:[~2010-10-25 20:49 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-03 13:31 Omit top level heading in latex export? Indraneel Majumdar
2010-10-03 15:27 ` suvayu ali
2010-10-03 15:31 ` Indraneel Majumdar
2010-10-03 15:42 ` suvayu ali
2010-10-03 15:49 ` Indraneel Majumdar
2010-10-03 16:05 ` suvayu ali
2010-10-03 16:51 ` Matt Lundin
2010-10-03 17:31 ` Indraneel Majumdar
2010-10-03 18:18 ` Indraneel Majumdar
2010-10-25 20:49 ` Hsiu-Khuern Tang
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).