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

OpenDocument writer: Implement figure numbering in captions #4944

Merged
merged 1 commit into from
Oct 3, 2018

Conversation

pyssling
Copy link
Contributor

@pyssling pyssling commented Oct 2, 2018

Figure captions are now numbered 1, 2, 3, ... The format in
the caption is "Figure 1: " and so on.

This is necessary in order for libreoffice to generate an
Illustration Index (Table of Figures) for included figures.

Figure captions are now numbered 1, 2, 3, ... The format in
the caption is "Figure 1: <caption>" and so on.

This is necessary in order for libreoffice to generate an
Illustration Index (Table of Figures) for included figures.
@jgm
Copy link
Owner

jgm commented Oct 3, 2018

Instead of hard-coding the word "Figure," you can use the new translations.
See translateTerm and setTranslations in Text.Pandoc.Class.

@pyssling
Copy link
Contributor Author

pyssling commented Oct 3, 2018

I can look at doing it, but as far as I can see no translations have been used this far in any writers, so I really don't know how the API is intended to be used. Would you consider merging this and then adding translations? I plan to do the same numbered captions for tables and then I could use your example for that.

@jgm
Copy link
Owner

jgm commented Oct 3, 2018 via email

@pyssling
Copy link
Contributor Author

pyssling commented Oct 3, 2018

If you could I would very much appreciate it.

I haven't coded much Haskell since university in 2001 and let's say that I've gone through a steep learning curve the last few weeks.

@jgm jgm merged commit ecd4d5b into jgm:master Oct 3, 2018
@mb21
Copy link
Collaborator

mb21 commented Oct 4, 2018

@pyssling see 58ae017 and feel free to ask questions :-) (btw. I found http://learnyouahaskell.com really helpful)

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

Successfully merging this pull request may close these issues.

3 participants