kjambunathan / org-mode-ox-odt

The Authoritative fork of Org mode's ODT exporter
GNU General Public License v3.0
45 stars 9 forks source link

Add dotted line in org-mode for export to ODT #54

Open kjambunathan opened 5 years ago

kjambunathan commented 5 years ago

See Add dotted line in org-mode for export to latex and ODT - Emacs Stack Exchange


Add dotted line in org-mode for export to ODT

The solution should also be able to cope with strings with different lengths. For example:

apple..................................month/year

banana..................................month/year

pear..................................month/year

with the above example I need the correct amount of dots in each line, so that the dates are all right aligned.

kjambunathan commented 5 years ago

Add dotted line in org-mode for export to ODT

For quick start, download dottedfill.zip

To get

Screenshot from 2019-03-15 10-37-45

use the snippet that I enclose below.

Some comments on the snippet

  1. Note the the verse block below has a tab and not spaces
  2. The Text_20_body styles uses the following settings

Screenshot from 2019-03-15 10-38-10

#+OPTIONS: author:nil date:nil

#+TITLE: Dotted Fill using Verse blocks and Custom Paragraph Styles

#+ODT_EXTRA_STYLES: <style:style style:name="Text_20_body" style:display-name="Text body" style:family="paragraph" style:parent-style-name="Standard" style:class="text">
#+ODT_EXTRA_STYLES:  <style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0.212cm" loext:contextual-spacing="false">
#+ODT_EXTRA_STYLES:   <style:tab-stops>
#+ODT_EXTRA_STYLES:    <style:tab-stop style:position="0cm"/>
#+ODT_EXTRA_STYLES:    <style:tab-stop style:position="9.999cm" style:leader-style="dotted" style:leader-text="."/>
#+ODT_EXTRA_STYLES:   </style:tab-stops>
#+ODT_EXTRA_STYLES:  </style:paragraph-properties>
#+ODT_EXTRA_STYLES: </style:style>

#+ATTR_ODT: :style "Text_20_body"
#+begin_verse
apple   month/year

banana  month/year

pear    month/year
#+end_verse