Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Levels 2-3 of Bulleted Lists in odt have a missing character #1400

Closed
bexelbie opened this issue Jul 3, 2014 · 16 comments
Closed

Levels 2-3 of Bulleted Lists in odt have a missing character #1400

bexelbie opened this issue Jul 3, 2014 · 16 comments

Comments

@bexelbie
Copy link

bexelbie commented Jul 3, 2014

Levels 2-3 of bulleted list get a bad bullet character.

Image attached

Markdown:

  • Level 1-a
    • Level 2-a - BROKEN BULLET
    • Level 2-b - BROKEN BULLET
      • Level 3-a - BROKEN BULLET
        • Level 4-a
      • Level 3-b - BROKEN BULLET
    • Level 2-c - BROKEN BULLET
  • Level 1-b

screenshot from 2014-07-03 16 54 51

pandoc 1.12.3.3
Compiled with texmath 0.6.6.1, highlighting-kate 0.5.6.

@mpickering
Copy link
Collaborator

What command are you running to produce this output?

@bexelbie
Copy link
Author

bexelbie commented Jul 3, 2014

command:

pandoc -f markdown -t odt -o foo.odt foo.md

@jgm
Copy link
Owner

jgm commented Jul 5, 2014

I couldn't reproduce the problem. Tried it with LibreOffice 4.2.4.2 for Mac. Result attached. Perhaps the problem is that you're using a font without a glyph for the missing bullets?
screen shot 2014-07-04 at 9 26 55 pm

@bexelbie
Copy link
Author

bexelbie commented Jul 7, 2014

I opened both my custom reference.odt where I first noticed the problem and the one installed in the data directory by pandoc (which I used for this issue). In each document I can create a bullet list and indent to my heart's desire and still have good bullets. It appears that pandoc is custom setting the bullet icon for each level (as I never got the arrow/triangle or dash) instead of using hte default bullets for the style. Is this the case?

@bexelbie
Copy link
Author

A little more work leads me to believe pandoc is also forcing the bullet font to be "Star Symbol". I can't tell for sure that this is the case either though.

Any guidance?

@jgm
Copy link
Owner

jgm commented Jul 10, 2014

The content in an ODT is generated by the OpenDocument writer.
Andrea Rossato wrote it, and I don't know the details well.
But you can use 'pandoc -t opendocument -s' to see what opendocument
is being produced for your nested bullet list.

It looks as if automatic styles are being used, and the styles
for lists encode particular bullet characters. They also set
the style to "Bullet Symbols", which may be why you're seeing the
font forcing.

It does look much more complicated than necessary, and it would
be much better to allow the bullets to be customized by user styles.
But I'm really not familiar with OpenDocument. Andrea, if you're
reading, can you comment?

+++ bcexelbi [Jul 10 14 06:06 ]:

A little more work leads me to believe pandoc is also forcing the
bullet font to be "Star Symbol". I can't tell for sure that this is the
case either though.

Any guidance?


Reply to this email directly or [1]view it on GitHub.

References

  1. Levels 2-3 of Bulleted Lists in odt have a missing character #1400 (comment)

@bexelbie
Copy link
Author

In the larger picture, my use case requires the use of a reference.odt. Pandoc doesn't seem to support reference.fodt (opendocument) files. I wonder if the odt writer is ignoring the presence of bullet styling in the reference odt and writing it's own styles. Could it be changed to only put in it's styles if there isn't one in the reference doc?

Is Andrea Rossato on github?

@bexelbie
Copy link
Author

Another note: It appears that in Writer/OpenDocument.hs the bulletListToOpenDocument function is creating a new list style for every level of indention, instead of using a single list style's level definitions.

@jgm
Copy link
Owner

jgm commented Jul 22, 2014

+++ bcexelbi [Jul 22 14 02:18 ]:

Another note: It appears that in Writer/OpenDocument.hs the
bulletListToOpenDocument function is creating a new list style for
every level of indention, instead of using a single list style's level
definitions.

I'm not familiar with opendocument, and didn't write the original
module. But if you are familiar with opendocument and would like
to give an example of how you think a list should be rendered, with
styles, that would be helpful!

@bexelbie
Copy link
Author

@jgm Well I have you beat. I don't know Haskel and I am not an ODF expert :)

It appears that ODF doesn't define any automatic list styles, so you have to define them in your document. I propose that we do the following:

  1. Document all of the styles the ODT/ODF writers use and ensure that they are defined in reference.odt. This way someone could modify those styles and achieve their desired effects.

  2. Fix the code so that it uses a single list style for the entire list.

There is some precedence for #1 in the reST (reStructuredText) converter. I don't think we need to go so far in supporting alternative names, etc. http://docutils.sourceforge.net/docs/user/odt.html#list-styles

@bexelbie bexelbie reopened this Jul 23, 2014
@bexelbie
Copy link
Author

I am seeing some similar issues, but not directly identical with things like quotations. Docbook admonitions are rendered as quotations in odt, however the OpenDocument Writer (around line 503) overrides margin values. It'd be great if we could be more flexible ala the above.

@gawrysz
Copy link

gawrysz commented Mar 13, 2017

I just run into same problem. Default combination of characters and fonts results in some placeholder printed instead of bullets for levels 2, 3, 5, 6, 8 and 9 when I use the .odt output in Linux. IIRC on Windows machine there were correct bullets displayed in the same file

After unzipping and opening content.xml in emacs I saw "‣" and "⁃" defined as bullet characters for the problematic list levels. I created a fresh .odt with LibreOffice 5 and saw that somewhat different characters were used there by default.

My temporary fix for broken bullet characters is to process content.xml through sed -i 's/‣/◦/g;s/⁃/▪/g' inside Makefile but it is far from elegant and I have no idea how bulletproof it is ;-) I just hope these findings can shed some light on the issue.

@jgm
Copy link
Owner

jgm commented Mar 14, 2017 via email

@gawrysz
Copy link

gawrysz commented Mar 14, 2017

In LibreOffice I've found the ones, which I used in sed:

  • "◦" for levels 2, 5 and 8
  • "▪" fof levels 3, 6 and 9

@jgm
Copy link
Owner

jgm commented Mar 14, 2017 via email

@gawrysz
Copy link

gawrysz commented Mar 14, 2017

Yes, after replacing bullets inside content.xml from "‣" and "⁃" to "◦" and "▪" with sed, the .odt files (and .pdf converted from .odt) look the same and are displayed correctly on both my computers at work (Ubuntu 14.05 LTS and Windows 10) and a machine with Fedora 25 at home.

I've got an idea for a nice feature. If there was an option to feed pandoc with a string made of characters intended to be used in bullet lists it would give more control and provide a solution on computers with strange font collections (such as localized to national languages). Something like pandoc --bullet-chars="•◦▪".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants