Tim <wiskey5al...@gmail.com> writes:

> At Mon, 26 Aug 2013 12:16:53 +0200,
> Nicolas Goaziou wrote:
>> > Is there any way to have carriage returns within the text of the
>> > macro ?
>> 
>> No, there isn't. Macros target small substitutions.
>> 
>> > I have already tried using the #+BEGIN_ODT...#+END_ODT construct, but that
>> > *really* messes with the format of the text within it.
>> 
>> What do you mean? I don't know odt exporter very well, but contents of
>> the block should be included as-is.
>> 
> If I put several lines into an #+BEGIN_ODT..#+END_ODT block, all whitespace 
> formating is lost.  A list like
>
> - List one
> - List two
> - List three 
>
> becomes
>
> - List one - List two - List three
>
> This is why I started puting the formatting on each line, and rather than 
> type all of the <text:p... on every line, i created a macro.  Ill just stick
> with that i guess... still better than using a word processer ;-) 
>
> Thanks
> Tim

The attached document shows how you can attach custom styles to
standalone paragraphs and the paragraph within lists.  You can export
with and without ATTR_ODT lines and see whether it offers what you want.

The changes are available from my git repository at 

Web URL:  http://repo.or.cz/w/org-mode/org-kjn.git
Pull URL: http://repo.or.cz/r/org-mode/org-kjn.git

Note that the above URL is my own repository and not the official
Orgmode's.

I am CCing Nicolas.  Just in case...

> --

Attachment: parstyles.odt
Description: application/vnd.oasis.opendocument.text

* COMMENT Simple paragraphs

Testing testing testing testing Testing testing testing testing
Testing testing testing testing Testing testing testing testing
Testing testing testing testing Testing testing testing testing
Testing testing testing testing Testing testing testing testing
Testing testing testing testing Testing testing testing testing
Testing testing testing testing

#+ATTR_ODT: :style "Text_20_body_20_indent"
Testing testing testing testing Testing testing testing testing
Testing testing testing testing Testing testing testing testing
Testing testing testing testing Testing testing testing testing
Testing testing testing testing Testing testing testing testing
Testing testing testing testing Testing testing testing testing
Testing testing testing testing

#+ATTR_ODT: :style "Text_20_body_20_bold"
Testing testing testing testing Testing testing testing testing
Testing testing testing testing Testing testing testing testing
Testing testing testing testing Testing testing testing testing
Testing testing testing testing Testing testing testing testing
Testing testing testing testing Testing testing testing testing
Testing testing testing testing

* COMMENT Paragraphs in Simple list

1. L1N1
2. L1N4
3. L1N5

#+ATTR_ODT: :p-style "Text_20_body_20_bold"
1. L1N1
2. L1N4
3. L1N5

* Paragraphs in Complex list

#+ATTR_ODT: :style "OrgBulletedList" :p-style "Text_20_body_20_bold"
1. N1
   1. N11
   2. N12
2. N2
   #+ATTR_ODT: :style "OrgNumberedList" :p-style "Preformatted_20_Text"
   * B21

   * B22
     - B221

       First paragraph.

       #+ATTR_ODT: :style "OrgBibliographyList" :p-style "Text_20_body"
       1. one
       2. two
       3. three

       #+ATTR_ODT: :style "Text_20_body_20_indent"
       Second paragraph.

     - B222
   * B23
3. N3


Reply via email to