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

Feature Request: Custom seperators #67

Open
gepcel opened this issue May 16, 2019 · 5 comments
Open

Feature Request: Custom seperators #67

gepcel opened this issue May 16, 2019 · 5 comments

Comments

@gepcel
Copy link

gepcel commented May 16, 2019

There are two kinds of separators in figure caption I'm talking about. The first is the one between section number and figure number. The second is the one between figure number and figure title. For example (red color in the image):
image

Separator 1st: the one between section number and figure number

As the image demonstrates, the 2nd figure of the Chapter might be numbered as "Figure 1.2", and the 2nd section might be numbered as "1.2 Section2". I'm sure this is what has been used widely for a long time and thus is the default behavior. But it would be better that this separator can be customized, for example, "Figure 1-2", even better "Figure 1.1-2" with a chapter_depth parameter.

Separator 2nd: the one between figure number and figure title

I'm not sure why, but most documents I'm dealing with require a blank space as a separator. For example "Figure 1-2 Something", sometimes like "Figure 1-2. Something".

If you are interested in this, but lack of time, I can help with something.

@tomduck
Copy link
Owner

tomduck commented May 16, 2019

Thanks for this suggestion, @gepcel. My first step will be to look into how LaTeX handles this problem.

Note that there is a similar Issue for pandoc-tablenos.

@gepcel
Copy link
Author

gepcel commented May 17, 2019

Yeath, LaTex is the difficult part for me. I actually have made it works in docx for my own use.

@tomduck
Copy link
Owner

tomduck commented Jun 28, 2019

The second separator is now configurable in the pandoc-fignos 2.0 beta release. To install it run

pip install pandoc-fignos --upgrade --pre --user

This is a new major release with some incompatibilities to the 1.x series, so please be sure to have a look at the 2.0.0 documentation first.

@tomduck
Copy link
Owner

tomduck commented Jun 28, 2019

For future reference:

  1. This post on StackExchange gives the TeX needed to change the number separator.

  2. This post on latex.org describes how to achieve the second variant of the number separator. It is not exactly full customization, but maybe what is needed. Note that the \counterwithin command comes from the chngcntr package.

@anti-destiny
Copy link

Hi! I'm glad that the second separator is now configurable.

However, it seems not fully customizable. For Chinese users like me, we prefer using ":" as separators instead of ":". (They are quite similar but different.)

Would you like to make pandoc-xnos to support more languages? I would like to provide translations of Chinese words if it's in need.

The second separator is now configurable in the pandoc-fignos 2.0 beta release. To install it run

pip install pandoc-fignos --upgrade --pre --user

This is a new major release with some incompatibilities to the 1.x series, so please be sure to have a look at the 2.0.0 documentation first.

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

3 participants