Discussion:
[Docutils-users] Font Specification For rst2odt?
Tim Daneliuk
2015-04-06 19:24:16 UTC
Permalink
Is there a way to specify what default fonts to use for various portions of an
rst document when converting to odt? I am using libreoffice in headless mode
to emit .doc files from a makefile I would like better control of font
selection in the makefile so as to produce output that renders a bit prettier
in Word.

Thanks,
--
----------------------------------------------------------------------------
Tim Daneliuk ***@tundraware.com
PGP Key: http://www.tundraware.com/PGP/


------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
_______________________________________________
Docutils-users mailing list
Docutils-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/docutils-users

Please use "Reply All" to reply to the list.
David Goodger
2015-04-06 21:19:01 UTC
Permalink
Post by Tim Daneliuk
Is there a way to specify what default fonts to use for various portions of an
rst document when converting to odt? I am using libreoffice in headless mode
to emit .doc files from a makefile I would like better control of font
selection in the makefile so as to produce output that renders a bit prettier
in Word.
I don't think any font information is generated by Docutils for ODT. I
believe the answer is to make and use a custom stylesheet.
Instructions here:
http://docutils.sourceforge.net/docs/user/odt.html#defining-and-using-a-custom-stylesheet
--
David Goodger <http://python.net/~goodger>

------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
_______________________________________________
Docutils-users mailing list
Docutils-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/docutils-users

Please use "Reply All" to reply to the list.
Terry Brown
2015-04-06 21:24:46 UTC
Permalink
[replied to OP only by mistake]

On Mon, 06 Apr 2015 14:24:16 -0500
Post by Tim Daneliuk
Is there a way to specify what default fonts to use for various
portions of an rst document when converting to odt? I am using
Yes, make your odt file:

(1) rst2odf myfile.txt >myfile.odt

make a copy

(2) cp myfile.odt myfile.styles.odt

edit the copy and change the styles to be the way you want

(3) libreoffice myfile.styles.odt

(F11 the style manager thing, modify the styles in the document, not
just the text on the page)

after that you can do

(4) rst2odf --stylesheet=myfile.styles.odt myfile.txt >myfile.odt

It doesn't matter if myfile.styles.odt gets out of date content wise,
it's just being used to look up styles. I.e. you only need to do
steps 1-3 once. Unless... if your changes to myfile.txt cause the use
of a new style in myfile.odt, e.g. a figure caption style
after the first time you add a figure, just do steps 2 and 3 again -
you'll only need to edit the new style, the previous style edits get
copied at step 2.

Hope that helps.

Cheers -Terry
Post by Tim Daneliuk
libreoffice in headless mode to emit .doc files from a makefile I
would like better control of font selection in the makefile so as to
produce output that renders a bit prettier in Word.
Thanks,
------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
_______________________________________________
Docutils-users mailing list
Docutils-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/docutils-users

Please use "Reply All" to reply to the list.
Terry Brown
2015-04-06 22:21:59 UTC
Permalink
On Mon, 6 Apr 2015 16:24:46 -0500
Post by Terry Brown
(1) rst2odf myfile.txt >myfile.odt
[snip]
Post by Terry Brown
(4) rst2odf --stylesheet=myfile.styles.odt myfile.txt >myfile.odt
Blah, `rst2odt`, obviously, not rst2odf.

Cheers -Terry

------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
_______________________________________________
Docutils-users mailing list
Docutils-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/docutils-users

Please use "Reply All" to reply to the list.

Tim Daneliuk
2015-04-06 21:57:53 UTC
Permalink
Post by Tim Daneliuk
Is there a way to specify what default fonts to use for various portions of an
rst document when converting to odt? I am using libreoffice in headless mode
to emit .doc files from a makefile I would like better control of font
selection in the makefile so as to produce output that renders a bit prettier
in Word.
Thanks,
Thanks Terry & David. I shall try this.
--
----------------------------------------------------------------------------
Tim Daneliuk ***@tundraware.com
PGP Key: http://www.tundraware.com/PGP/


------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
_______________________________________________
Docutils-users mailing list
Docutils-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/docutils-users

Please use "Reply All" to reply to the list.
Loading...