emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Rasmus <rasmus@gmx.us>
To: emacs-orgmode@gnu.org
Cc: alantyree@gmail.com
Subject: Re: [patch, ox] Unnumbered headlines
Date: Thu, 02 Oct 2014 02:35:26 +0200	[thread overview]
Message-ID: <87r3yrl35d.fsf@gmx.us> (raw)
In-Reply-To: 87lhp0iusr.fsf@pank.eu

["Cloud-note" to self (probably) or, preferably, someone else]

One "deficit" of unnumbered headlines in odt is that they are
indented.  This looks dumb!  Here's some notes on how I think is the
best way to get rid of the indention in ox-odt.

If this bothers someone, please go ahead and fix it!  Otherwise I
might look at it eventually. . .

Alan L Tyree <alantyree@gmail.com> writes:

> Also interesting [to note on unnumbered headlines in LO]: right
> click on the unnumbered headline. Go to Bullets and Numbering. Click
> on 'Remove' at the bottom and the headline jumps back into proper
> alignment.

Arh, so indention for unnumbered headlines can be removed!

Studying the xml files of LO it seems the mechanism is something like
this.  Basically, to get an unnumbered headline you have to specify it
as a list header.  This is what the current patch does and how LO does
it.  But the indention is caused by the fact that it's a list
header. To get rid of the indention one has to specify the list style
to be the empty style "" (empty quote). . .

So, for unnumbered headlines, append text:is-list-header="true" to the
text:h specification.  Example: 

<text:h text:style-name="Heading_20_1" text:outline-level=1 text:is-list-header="true">headline</text:h>

To get it unindented we need to add

style:list-style-name=""

To the style.  LO does this by generating PN, N is an int, styles on
the fly that are derived from Heading styles:

<style:style style:name="P2" style:family="paragraph" style:parent-style-name="Heading_20_1" style:list-style-name=""/>

In Org, I think the easiest thing to do would be to add these styles
to the styles.xml file and choose the right style based on whether
headline is numbered or not numbered. . .  Unfortunately, it seems we
cannot just add style:list-style-name="" to the end of the style
definition of Heading_20_N as this kills the number.

—Rasmus

-- 
Dobbelt-A

  reply	other threads:[~2014-10-02  0:36 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-08 13:39 [patch, ox] Unnumbered headlines Rasmus
2014-08-08 22:35 ` Alan L Tyree
2014-08-09  1:04 ` [patch, ox] Unnumbered headlines - early test Alan L Tyree
2014-08-09  7:47 ` [patch, ox] Unnumbered headlines Detlef Steuer
2014-08-11 14:18 ` Nicolas Goaziou
2014-08-11 15:37   ` Rasmus
2014-08-12  8:58     ` Nicolas Goaziou
2014-09-20 16:02       ` Rasmus
2014-09-20 20:34         ` Alan L Tyree
2014-09-21 13:12         ` Nicolas Goaziou
2014-09-21 14:37           ` Rasmus
2014-09-21 19:40             ` Nicolas Goaziou
2014-09-21 20:13               ` Rasmus
2014-09-22 15:53                 ` Nicolas Goaziou
2014-09-23  0:35                   ` Rasmus
2014-09-23  1:10                     ` Thomas S. Dye
2014-09-26  7:51                     ` Nicolas Goaziou
2014-09-26 13:48                       ` Rasmus
2014-09-27  8:19                         ` Nicolas Goaziou
2014-09-30 22:54                       ` Rasmus
2014-10-02  0:35                         ` Rasmus [this message]
2014-10-03  7:56                         ` Nicolas Goaziou
2014-10-03  8:49                           ` Sebastien Vauban
2014-10-03 10:26                           ` Rasmus
2014-10-03 20:14                             ` Nicolas Goaziou
2014-10-03 20:31                               ` Rasmus
2014-10-05  8:06                                 ` Nicolas Goaziou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r3yrl35d.fsf@gmx.us \
    --to=rasmus@gmx.us \
    --cc=alantyree@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).