emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Header levels and section numbering > 3, in LaTeX export
@ 2010-10-06  3:36 ` Kai
  2010-10-06  4:22   ` Indraneel Majumdar
  2010-10-06  5:38   ` Nick Dokos
  0 siblings, 2 replies; 7+ messages in thread
From: Kai @ 2010-10-06  3:36 UTC (permalink / raw)
  To: emacs-orgmode

With a .org file having headers 4-5 levels deep (e.g. **** This 
Section), I'd like the LaTeX export to treat it as a subsubsubsection 
with numbering, e.g. 1.1.1.1.  But no luck, and I'm not sure whether I'm 
doing something wrong with org-mode, or need to customize my LaTeX 
template.  In the org file I have:

#+OPTIONS: H:5 num:t

...which does give the TeX markup of \label{sec-1_1_1_1} in the .tex 
file, but the header text is wrapped in a \paragraph{The Header}, 
instead of \subsubsubsection{The Header}.

Is there a way to have the org-mode LaTeX export mark that up as a 
subsubsubsection?  I'm using the org-mode trunk.  Thanks in advance for 
any help,

K

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

* Re: Header levels and section numbering > 3, in LaTeX export
  2010-10-06  3:36 ` Header levels and section numbering > 3, in LaTeX export Kai
@ 2010-10-06  4:22   ` Indraneel Majumdar
  2010-10-06  5:38   ` Nick Dokos
  1 sibling, 0 replies; 7+ messages in thread
From: Indraneel Majumdar @ 2010-10-06  4:22 UTC (permalink / raw)
  To: Kai; +Cc: emacs-orgmode

  Hi,

If you're 4 levels down, it'll be a sub sub sub section, same as a paragraph
* Section
** Sub section
*** Sub Sub section
**** Paragraph
***** Sub paragraph

H:5 will give you the levels but you have to enable numbering explicitly 
with
\setcounter{secnumdepth}{5}

paragraph is actually a sectioning command. If you want to use it as sub 
sub sub section do this:

**** Sub sub sub section heading
       Paragraph starts here...

If you simply want numbered paragraphs, do this:

****
       Paragraph starts here...
And \includepackage{titlesec} to iron out the redundant spaces that 
would otherwise appear.


HTH,
Indraneel

On 2010-10-06 9:06, Kai wrote:
> With a .org file having headers 4-5 levels deep (e.g. **** This 
> Section), I'd like the LaTeX export to treat it as a subsubsubsection 
> with numbering, e.g. 1.1.1.1.  But no luck, and I'm not sure whether 
> I'm doing something wrong with org-mode, or need to customize my LaTeX 
> template.  In the org file I have:
>
> #+OPTIONS: H:5 num:t
>
> ...which does give the TeX markup of \label{sec-1_1_1_1} in the .tex 
> file, but the header text is wrapped in a \paragraph{The Header}, 
> instead of \subsubsubsection{The Header}.
>
> Is there a way to have the org-mode LaTeX export mark that up as a 
> subsubsubsection?  I'm using the org-mode trunk.  Thanks in advance 
> for any help,
>
> K
>
>
> _______________________________________________
> 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] 7+ messages in thread

* Re: Header levels and section numbering > 3, in LaTeX export
  2010-10-06  3:36 ` Header levels and section numbering > 3, in LaTeX export Kai
  2010-10-06  4:22   ` Indraneel Majumdar
@ 2010-10-06  5:38   ` Nick Dokos
  2010-10-06 21:45     ` Scot Becker
  1 sibling, 1 reply; 7+ messages in thread
From: Nick Dokos @ 2010-10-06  5:38 UTC (permalink / raw)
  To: Kai; +Cc: nicholas.dokos, emacs-orgmode

Kai <k@limist.com> wrote:

> With a .org file having headers 4-5 levels deep (e.g. **** This
> Section), I'd like the LaTeX export to treat it as a subsubsubsection
> with numbering, e.g. 1.1.1.1.  But no luck, and I'm not sure whether
> I'm doing something wrong with org-mode, or need to customize my LaTeX
> template.  In the org file I have:
> 
> #+OPTIONS: H:5 num:t
> 
> ...which does give the TeX markup of \label{sec-1_1_1_1} in the .tex
> file, but the header text is wrapped in a \paragraph{The Header},
> instead of \subsubsubsection{The Header}.
> 
> Is there a way to have the org-mode LaTeX export mark that up as a
> subsubsubsection?  I'm using the org-mode trunk.  Thanks in advance
> for any help,
> 

This is a LaTeX limitation (if you want to call it that), not an orgmode
one. See

     http://www.tex.ac.uk/cgi-bin/texfaq2html?label=subsubsub

for some workarounds/comments/references (but be prepared for at least some
strangeness).

HTH,
Nick

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

* Re: Header levels and section numbering > 3, in LaTeX export
  2010-10-06  5:38   ` Nick Dokos
@ 2010-10-06 21:45     ` Scot Becker
  2010-10-07  1:06       ` Indraneel Majumdar
  0 siblings, 1 reply; 7+ messages in thread
From: Scot Becker @ 2010-10-06 21:45 UTC (permalink / raw)
  To: nicholas.dokos; +Cc: emacs-orgmode, Kai

And if you just want deeply nested numbered paragraphs, like lists.
You might try the Easylist package:

http://www.tex.ac.uk/tex-archive/help/Catalogue/entries/easylist.html

You'd have to do a tweak or to to get org-mode to export to easylist,
but it shouldn't be too complicated, since easylist takes its input in
a format almost exactly like org's native outline structure.

Scot


On Wed, Oct 6, 2010 at 6:38 AM, Nick Dokos <nicholas.dokos@hp.com> wrote:
> Kai <k@limist.com> wrote:
>
>> With a .org file having headers 4-5 levels deep (e.g. **** This
>> Section), I'd like the LaTeX export to treat it as a subsubsubsection
>> with numbering, e.g. 1.1.1.1.  But no luck, and I'm not sure whether
>> I'm doing something wrong with org-mode, or need to customize my LaTeX
>> template.  In the org file I have:
>>
>> #+OPTIONS: H:5 num:t
>>
>> ...which does give the TeX markup of \label{sec-1_1_1_1} in the .tex
>> file, but the header text is wrapped in a \paragraph{The Header},
>> instead of \subsubsubsection{The Header}.
>>
>> Is there a way to have the org-mode LaTeX export mark that up as a
>> subsubsubsection?  I'm using the org-mode trunk.  Thanks in advance
>> for any help,
>>
>
> This is a LaTeX limitation (if you want to call it that), not an orgmode
> one. See
>
>     http://www.tex.ac.uk/cgi-bin/texfaq2html?label=subsubsub
>
> for some workarounds/comments/references (but be prepared for at least some
> strangeness).
>
> HTH,
> Nick
>
>
> _______________________________________________
> 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] 7+ messages in thread

* Re: Header levels and section numbering > 3, in LaTeX export
  2010-10-06 21:45     ` Scot Becker
@ 2010-10-07  1:06       ` Indraneel Majumdar
  2010-10-07  9:55         ` Scot Becker
  0 siblings, 1 reply; 7+ messages in thread
From: Indraneel Majumdar @ 2010-10-07  1:06 UTC (permalink / raw)
  To: Scot Becker; +Cc: emacs-orgmode

  Thanks Scot, exactlt what I was looking for, and I was actually 
deliberating on the Tractacus! I couldn't get easylist to understand the 
\star symbol that orgmode uses. Do you know how to do that? And also to 
skip the first 3 stars in a level4 heading (if I want to retain latex's 
default top 3 levels)?

Indraneel

On 2010-10-07 3:15, Scot Becker wrote:
> And if you just want deeply nested numbered paragraphs, like lists.
> You might try the Easylist package:
>
> http://www.tex.ac.uk/tex-archive/help/Catalogue/entries/easylist.html
>
> You'd have to do a tweak or to to get org-mode to export to easylist,
> but it shouldn't be too complicated, since easylist takes its input in
> a format almost exactly like org's native outline structure.
>
> Scot
>
>
> On Wed, Oct 6, 2010 at 6:38 AM, Nick Dokos<nicholas.dokos@hp.com>  wrote:
>> Kai<k@limist.com>  wrote:
>>
>>> With a .org file having headers 4-5 levels deep (e.g. **** This
>>> Section), I'd like the LaTeX export to treat it as a subsubsubsection
>>> with numbering, e.g. 1.1.1.1.  But no luck, and I'm not sure whether
>>> I'm doing something wrong with org-mode, or need to customize my LaTeX
>>> template.  In the org file I have:
>>>
>>> #+OPTIONS: H:5 num:t
>>>
>>> ...which does give the TeX markup of \label{sec-1_1_1_1} in the .tex
>>> file, but the header text is wrapped in a \paragraph{The Header},
>>> instead of \subsubsubsection{The Header}.
>>>
>>> Is there a way to have the org-mode LaTeX export mark that up as a
>>> subsubsubsection?  I'm using the org-mode trunk.  Thanks in advance
>>> for any help,
>>>
>> This is a LaTeX limitation (if you want to call it that), not an orgmode
>> one. See
>>
>>      http://www.tex.ac.uk/cgi-bin/texfaq2html?label=subsubsub
>>
>> for some workarounds/comments/references (but be prepared for at least some
>> strangeness).
>>
>> HTH,
>> Nick
>>
>>
>> _______________________________________________
>> 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] 7+ messages in thread

* Re: Header levels and section numbering > 3, in LaTeX export
  2010-10-07  1:06       ` Indraneel Majumdar
@ 2010-10-07  9:55         ` Scot Becker
  2010-10-08 10:24           ` Indraneel Majumdar
  0 siblings, 1 reply; 7+ messages in thread
From: Scot Becker @ 2010-10-07  9:55 UTC (permalink / raw)
  To: Indraneel Majumdar; +Cc: emacs-orgmode

Indraneel,

>  Thanks Scot, exactlt what I was looking for, and I was actually
> deliberating on the Tractacus!

Funny.  Glad it looks like it may work.

> I couldn't get easylist to understand the
> \star symbol that orgmode uses. Do you know how to do that?

No.  You might have seen the footnote in the easylist documentation
(on p. 2) which says:

"You might not be happy with the symbols and maybe you'd like to use
another one, or simply have your favorite symbol
as default to avoid remembering such a cumbersome name as 'pilcrow'.
Here's a simple hack that does the job: select the
entire code of the package, and replace all occurrences of Ÿ (<<-- the
pilcrow) with your symbol. Make sure you won't use it in the list for
other purposes, though."

I've not tried this, however.  It would be nice if there were a dead
easy way to get easylist and org-mode to work well together, since the
two are very natural partners.  Let me know if you can make this work.

> And also to skip
> the first 3 stars in a level4 heading (if I want to retain latex's default
> top 3 levels)?

I've never actually gone all the way to making a document
easy-to-publish with Easylist.  I've just manually converted
org-mode's stars to a character Easylist can understand, then manually
wrapped the whole thing in a LaTeX preamble.  The ideal would be to
automate the process, perhaps by using org-babel and putting your
easylist sections in special code blocks. But I've not taken the time
to figure all that out.

Failing that, I bet you could do a halfway hack with minimal amount of
manual work.  For example (if I understand you correctly), you could
make an org document like this:

* Regular org heading
** Subheading
** Here's a third-level heading
STARTLIST
**** My first thesis, which is longer and wordier than it probably should be.
***** Of course it's nothing compared to the length of its supporting arguments
*****  Both of them
**** Here is my second thesis, as convincing as the first
ENDLIST

Org-mode will let you do all of that, just fine.  Then either
manually, or with a temporary latex export hook, do something like
this:

replace STARTLIST with \begin{easylist} and ENDLIST with \end{easylist}
replace '**** ' with '& ' and '***** ' with '&& ' and ****** ' with '&&& ', etc.


If you do it in an export hook, I think you'd want to do it in one
that runs before everything else.  That way org-mode will leave
everthing in your easylist environment alone.  What that will do to
quotation marks and /emphasis/ I don't know.

This should leave you with an easylist which starts at level '1', in a
document which uses org's header levels 1-3 in the normal latex way.
Is that what you want?

Make sure in the preamble, you have \usepackage[ampersand]{easylist}

Let me know if you need help figuring any of this out in detail.
That's just a rough sketch.

Cheers,

Scot

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

* Re: Header levels and section numbering > 3, in LaTeX export
  2010-10-07  9:55         ` Scot Becker
@ 2010-10-08 10:24           ` Indraneel Majumdar
  0 siblings, 0 replies; 7+ messages in thread
From: Indraneel Majumdar @ 2010-10-08 10:24 UTC (permalink / raw)
  To: Scot Becker; +Cc: emacs-orgmode


>> I couldn't get easylist to understand the
>> \star symbol that orgmode uses. Do you know how to do that?
> No.  You might have seen the footnote in the easylist documentation
> (on p. 2) which says:
>
> "You might not be happy with the symbols and maybe you'd like to use
> another one, or simply have your favorite symbol
> as default to avoid remembering such a cumbersome name as 'pilcrow'.
> Here's a simple hack that does the job: select the
> entire code of the package, and replace all occurrences of Ÿ (<<-- the
> pilcrow) with your symbol. Make sure you won't use it in the list for
> other purposes, though."
>
> I've not tried this, however.  It would be nice if there were a dead
> easy way to get easylist and org-mode to work well together, since the
> two are very natural partners.  Let me know if you can make this work.
>
I couldn't get either \star nor \ast to work so I'm just using \sharp 
now, and am simply replacing # (at beginning of the line) with a hook. 
I'm not sure which is the best hook to use though. I don't want to alter 
my orgmode buffer and also want the hook to run on orgmode syntax. So 
far, I've failed at this.
org-export-first-hook runs in my orgmode buffer and alters the contents.
org-export-latex-after-blockquotes-hook runs after latex export has 
already happened (ie \section etc have already been converted)
Maybe there's a hook in the middle somewhere, but I couldn't find any 
documentation on it.
>> And also to skip
>> the first 3 stars in a level4 heading (if I want to retain latex's default
>> top 3 levels)?
> I've never actually gone all the way to making a document
> easy-to-publish with Easylist.  I've just manually converted
> org-mode's stars to a character Easylist can understand, then manually
> wrapped the whole thing in a LaTeX preamble.  The ideal would be to
> automate the process, perhaps by using org-babel and putting your
> easylist sections in special code blocks. But I've not taken the time
> to figure all that out.
I do not even know what babel is, although I've heard it in a ton of 
different contexts. Considering what the word "babel" means, I'm not 
even sure if that is strange or not!
> Failing that, I bet you could do a halfway hack with minimal amount of
> manual work.  For example (if I understand you correctly), you could
> make an org document like this:
>
> * Regular org heading
> ** Subheading
> ** Here's a third-level heading
> STARTLIST
> **** My first thesis, which is longer and wordier than it probably should be.
> ***** Of course it's nothing compared to the length of its supporting arguments
> *****  Both of them
> **** Here is my second thesis, as convincing as the first
> ENDLIST
>
> Org-mode will let you do all of that, just fine.  Then either
> manually, or with a temporary latex export hook, do something like
> this:
>
> replace STARTLIST with \begin{easylist} and ENDLIST with \end{easylist}
> replace '**** ' with '&  ' and '***** ' with'&&  ' and ****** ' with'&&&  ', etc.
>
>
> If you do it in an export hook, I think you'd want to do it in one
> that runs before everything else.  That way org-mode will leave
> everthing in your easylist environment alone.  What that will do to
> quotation marks and /emphasis/ I don't know.
>
This is exactly what I want to do, but which export hook to use? 
Something that will not modify my original buffer and also understand 
regexp that I can base on what was originally in my buffer. So instead 
of searching for \paragraph, I can search for "**** ", but I want to 
keep "**** " in my original org buffer.

Indraneel
> This should leave you with an easylist which starts at level '1', in a
> document which uses org's header levels 1-3 in the normal latex way.
> Is that what you want?
>
> Make sure in the preamble, you have \usepackage[ampersand]{easylist}
>
> Let me know if you need help figuring any of this out in detail.
> That's just a rough sketch.
>
> Cheers,
>
> Scot
>
> _______________________________________________
> 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] 7+ messages in thread

end of thread, other threads:[~2010-10-08 10:55 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <k@limist.com>
2010-10-06  3:36 ` Header levels and section numbering > 3, in LaTeX export Kai
2010-10-06  4:22   ` Indraneel Majumdar
2010-10-06  5:38   ` Nick Dokos
2010-10-06 21:45     ` Scot Becker
2010-10-07  1:06       ` Indraneel Majumdar
2010-10-07  9:55         ` Scot Becker
2010-10-08 10:24           ` Indraneel Majumdar

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