emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Different (setq org-export-with-section-numbers) depending on HTML or LaTeX export
@ 2011-03-06 23:07 Jakub Szypulka
  2011-03-07  5:37 ` Aankhen
  0 siblings, 1 reply; 4+ messages in thread
From: Jakub Szypulka @ 2011-03-06 23:07 UTC (permalink / raw)
  To: Emacs-orgmode

Hey,

I'm trying to hide section numbers in the HTML export, while keeping
the sections in the LaTeX export.

Adding (setq org-export-with-section-numbers nil) successfully removes
the HTML section numbering, but for a mysterious reason also removes
headlines when doing a LaTeX export.

Is there any way to have differing settings, based on the current
export choice? Or is there maybe another way to achieve what I want?

Thanks,
Jakub Szypulka

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

* Re: Different (setq org-export-with-section-numbers) depending on HTML or LaTeX export
  2011-03-06 23:07 Different (setq org-export-with-section-numbers) depending on HTML or LaTeX export Jakub Szypulka
@ 2011-03-07  5:37 ` Aankhen
  2011-03-07 16:24   ` Eric S Fraga
  0 siblings, 1 reply; 4+ messages in thread
From: Aankhen @ 2011-03-07  5:37 UTC (permalink / raw)
  To: Jakub Szypulka, Org-mode ml

Hi,

On Mon, Mar 7, 2011 at 04:37, Jakub Szypulka <cubibubi@googlemail.com> wrote:
> I'm trying to hide section numbers in the HTML export, while keeping
> the sections in the LaTeX export.
>
> Adding (setq org-export-with-section-numbers nil) successfully removes
> the HTML section numbering, but for a mysterious reason also removes
> headlines when doing a LaTeX export.

Could you give a sample of the input and output?  Using Org-mode from
git, I can’t reproduce this problem:

,----[ foo.org ]
| * Foo
|
| * Bar
|
| ** Quux
|
| * Baz
`----

Becomes:

,----[ Exported LaTeX ]
| \usepackage{amssymb}
| \usepackage{hyperref}
| \tolerance=1000
| \providecommand{\alert}[1]{\textbf{#1}}
|
| \title{No Title}
| \author{}
| \date{07 March 2011}
|
| \begin{document}
|
| \maketitle
|
| \section*{Foo}
| \label{sec-1}
| \section*{Bar}
| \label{sec-2}
| \subsection*{Quux}
| \label{sec-2_1}
| \section*{Baz}
| \label{sec-3}
|
| \end{document}
`----

Which seems about right when converted to a PDF.

Aankhen

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

* Re: Different (setq org-export-with-section-numbers) depending on HTML or LaTeX export
  2011-03-07  5:37 ` Aankhen
@ 2011-03-07 16:24   ` Eric S Fraga
  2011-03-08  6:43     ` Aankhen
  0 siblings, 1 reply; 4+ messages in thread
From: Eric S Fraga @ 2011-03-07 16:24 UTC (permalink / raw)
  To: Aankhen; +Cc: Jakub Szypulka, Org-mode ml

Aankhen <aankhen@gmail.com> writes:

> Hi,
>
> On Mon, Mar 7, 2011 at 04:37, Jakub Szypulka <cubibubi@googlemail.com> wrote:
>> I'm trying to hide section numbers in the HTML export, while keeping
>> the sections in the LaTeX export.
>>
>> Adding (setq org-export-with-section-numbers nil) successfully removes
>> the HTML section numbering, but for a mysterious reason also removes
>> headlines when doing a LaTeX export.
>
> Could you give a sample of the input and output?  Using Org-mode from
> git, I can’t reproduce this problem:
>
> ,----[ foo.org ]
> | * Foo
> |
> | * Bar
> |
> | ** Quux
> |
> | * Baz
> `----
>
> Becomes:
>
> ,----[ Exported LaTeX ]
> | \usepackage{amssymb}
> | \usepackage{hyperref}
> | \tolerance=1000
> | \providecommand{\alert}[1]{\textbf{#1}}
> |
> | \title{No Title}
> | \author{}
> | \date{07 March 2011}
> |
> | \begin{document}
> |
> | \maketitle
> |
> | \section*{Foo}

Actually, you *have* reproduced the problem: a =section*= does not
include section numbers which I believe Jakub wanted (in the latex but
not the HTML).

For Jakub,  I don't think there is a direct way of achieving what you
want.  Instead, you could have two files, one for HTML export and one
for LaTeX export, both of which #+INCLUDE the real content but differ
solely in the

#+OPTIONS: num:nil

or

#+OPTIONS: num:t

line (former doesn't generate section numbers, latter does).

Alternatively, you could customise =org-export-latex-classes= so that
=section=, =subsection=, etc. are used even for unnumbered export.

HTH,
eric

-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.50.1
: using Org-mode version 7.5 (release_7.5.2.g11a1)

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

* Re: Different (setq org-export-with-section-numbers) depending on HTML or LaTeX export
  2011-03-07 16:24   ` Eric S Fraga
@ 2011-03-08  6:43     ` Aankhen
  0 siblings, 0 replies; 4+ messages in thread
From: Aankhen @ 2011-03-08  6:43 UTC (permalink / raw)
  To: Eric S Fraga, Jakub Szypulka, Org-mode ml

On Mon, Mar 7, 2011 at 21:54, Eric S Fraga <e.fraga@ucl.ac.uk> wrote:
> Aankhen <aankhen@gmail.com> writes:
>> On Mon, Mar 7, 2011 at 04:37, Jakub Szypulka <cubibubi@googlemail.com> wrote:
>>> I'm trying to hide section numbers in the HTML export, while keeping
>>> the sections in the LaTeX export.
>>>
>>> Adding (setq org-export-with-section-numbers nil) successfully removes
>>> the HTML section numbering, but for a mysterious reason also removes
>>> headlines when doing a LaTeX export.
>>
>> Could you give a sample of the input and output?  Using Org-mode from
>> git, I can’t reproduce this problem:
> [snip]
>
> Actually, you *have* reproduced the problem: a =section*= does not
> include section numbers which I believe Jakub wanted (in the latex but
> not the HTML).

Hmm, I understood the problem to be that setting
=org-export-with-section-numbers= to =nil= resulted in a
=section=-less LaTeX document, which I couldn’t reproduce.  Maybe I
misunderstood the message.

Aankhen

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

end of thread, other threads:[~2011-03-08  6:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-06 23:07 Different (setq org-export-with-section-numbers) depending on HTML or LaTeX export Jakub Szypulka
2011-03-07  5:37 ` Aankhen
2011-03-07 16:24   ` Eric S Fraga
2011-03-08  6:43     ` Aankhen

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