(If you want further help, please raise a issue on my github repo)
I installed the alternative odt exporter with the suggested procedure but I now have a new problem: the exportation is not done and an error message is issued: "org-odt-template: OpenDocument export failed with error: ‘Styles file is invalid:".
Don't surround your styles file within double quotes.
That will take care of the error.
In the screenshot below, you see the input org file and and the result I get in LibreOffice Writer. Note that I have commented out the
ODT_STYLES_FILE. Pay particular attention to the color of the python block within Emacs, and color of it in LibreOffice Writer. They match. This tells you that if you want different set of colors for src block in your ODT file, you pick a matching color or custom theme for Emacs.
Source fontification in ODT document matches the fontification in Emacs
Correspondence between style names in styles.xml and styles in LibreOffice stylist
I tried the same procedure for the OrgTitle style and it works as expected (the style is correctly applied in the resulting odt document).
If you are using my fork, then you don't have to use the
#+ODT_STYLES_FILE at all. I have added an option for inline automatic and custom styles. If you are a user of LibreOffice you already know what /automatic/ and /custom/ styles mean.
Try exporting the snippet below using my fork, and see what you get. You will see that the title is in green and left-aligned. The snippet does NOT use
ODT_STYLES_FILE and instead uses
What I am saying is this: The inline styles feature is available only on my fork, and is not available in the official Emacs.
#+Title: Test ODT exporter
#+odt_extra_styles: <style:style style:name="OrgTitle" style:family="paragraph" style:parent-style-name="Title">
#+odt_extra_styles: <style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm" loext:contextual-spacing="false" fo:text-align="start" style:justify-single-word="false"/>
#+odt_extra_styles: <style:text-properties fo:color="#579835" fo:font-size="24pt"/>
I try to change the style of src code blocks export with odt exporter but it does not work as expected.
It is not clear to me what sort of effect you want to achieve. So, I am at a loss to give you any hints in this area. If you would like to venture in to Emacs Lisp code relevant to source code fontification, please look at
Before I go, LibreOffice compresses the XML file it generates (i.e., they don't have a newlines for example). Emacs is notorious for choking when opening files that have very long lines. So, if you want to grok the LibreOffice generated XML file, then configure your LibreOffice to produce pretty XML. See https://github.com/kjambunathan/org-mode-ox-odt/wiki#libreoffice-tips
The document used are those posted on the official org mode list.
Here is the link to your post on Emacs Orgmode mailing list: https://lists.gnu.org/archive/html/emacs-orgmode/2019-08/msg00169.html
For the attention of anyone who wants help with my fork of ODT exporter ....
Let me reiterate, the issues page of my fork--- https://github.com/kjambunathan/org-mode-ox-odt/issues ---is the official channel for any queries related to my fork of ODT exporter. I don't track Stack exchange or Emacs Orgmode mailing lists these days. (It so happened that your query happened to catch my attention on one of my random visits.) But I do get notifications when someone raises an issue on my github repo. So, the best way to get my immediate attention is through the issues page I linked above. Please pop up on my github repo, if you want further help.