Text Body style with intent affects bulleted list style as well

Text Body style with intent affects bulleted list style as well

I’m using org-mode export to ODT. Generally working well. But, to meet a journal’s formatting requirements, I had to set the Text Body style to indent the first line. This is in a separate Writer template – I did not change the overall default. Org-mode has instructions on generating this template, including a number of styles specifically for org export.[1]

The Text Body indent is fine.

BUT somehow the OrgBulletedList style is connected to Text Body, and inherits the first-line indent.

  • If I set Text Body to 0.0 first-line indent, then OrgBulletedList shows a hanging indent.

  • If I set it to 0.5" first-line indent, then OrgBulletedList shifts the first line of each bullet point to the right. The bullet is now indented, rather than outdented.

As it is, I cannot have both indented first lines, and hanging bullets. I would like to dissociate OrgBulletedList from Text Body, but I can’t find any interface where to do that. I searched some questions on the web, but it seems rather arcane.

Quite likely, the org-mode team will have to change the way the Org styles are created. But, if I am to give them meaningful feedback on this, then I should understand how the list styles are connected to their parent paragraph styles, and how to change that. So I’m asking here first.

Thanks.

[1] http://orgmode.org/manual/Applying-custom-styles.html#Applying-custom-styles

It is usually preferable to make paragraph styles formatting lists independent from bulk text styles.

In your case, modify your OrgBulletedList (right click on the style name in the style side panel and choose Modify...). Open the Organizer tab and choose -None- or, better, a “neutral” style like Default Style in the Linked with drop down menu. This will break the relationship netween Body Text and OrgBulletedList.

Don’t forget to review all attributes so that the updated style remains compliant with the requirement.

If this answer helped you, please accept it by clicking the check mark :heavy_check_mark: to the left and, karma permitting, upvote it. If this resolves your problem, close the question, that will help other people with the same question.

This is helpful – it confirms that I should see the link between the styles in the editor. I don’t… so: a/ the problem is something else and b/ I don’t feel bad about not seeing something that wasn’t there.

It turns out that org-mode is encoding the text of the list item as a text-body paragraph, and then wrapping this in a list item. So I will have to take it up with the org developers.

But now I understand the issue better – that’s important. Thanks so much for the help!

In addition to ajlittoz’s answer, here is a solution for org-mode export. Org has “filter” functions for various document elements, so it’s pretty straightforward to add a function for any “item” (i.e. list item) that replaces “Text body” with “Text list body” – then I only have to define a Text list body style in the .ott stylesheet, and voila.

In ~/.emacs:

;; odt separate list paragraph style from main paragraph style
(defun hjh-odt-filter-list-graph-style (text backend info)
  "Replace Text_20_body with Text_20_list_20_body in lists"
  (when (org-export-derived-backend-p backend 'odt)
    (replace-regexp-in-string "Text_20_body" "Text_20_list_20_body" text)))

(add-to-list 'org-export-filter-item-functions
	     'hjh-odt-filter-list-graph-style)

Sharing just in case there are any org users out there.

Seeing style name with 20 inside reminds me of a problem I had once. Such names arise when LO is in trouble finding correct style dependency; so it (re)creates new custom styles based on inferred deps. You should check the complete list of styles and closely track dependencies between categories (paragraph, character and numbering/list mainly). There may be hidden relations between them.