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

Let the Fenced Div class transfer to a custom style in DOCX/ODT etc. #4139

Closed
iandol opened this issue Dec 11, 2017 · 4 comments
Closed

Let the Fenced Div class transfer to a custom style in DOCX/ODT etc. #4139

iandol opened this issue Dec 11, 2017 · 4 comments

Comments

@iandol
Copy link
Contributor

iandol commented Dec 11, 2017

Hi, the new Fenced Div feature in Pandoc 2 is excellent, and I was wondering whether there was a feeling that the class name should be converted to a style by default for writers that support it (DOCX, ODT etc). For DOCX, @jkr made a super wonderful addition (#3070) to do this using the custom-style attribute, which I assume we could wire together using a filter, but my question is really whether this being done natively would be beneficial. My view is it would be great to be able to use Fenced Divs to specify styles in DOCX etc.

I'm creating a new issue as there are several overlapping issues which don't specifically deal with the current design intention for what a writer should do with the new fenced div.

Related issues:
#2542 (closed)
#2106
#3070 (merged pull request)

@mb21
Copy link
Collaborator

mb21 commented Dec 11, 2017

Agreed, from this comment:

Since the following already works for docx output:

::: {custom-style=poetry}
My example poem,
is bad.
:::

the idea is to change the syntax (and probably AST representation) to use a class with the style- prefix:

::: style-poetry
My example poem,
is bad.
:::

In response to this, in that issue it was suggested to use an extension (e.g. +environment) which can be turned on in the command line, instead of the style- prefix. I'm not sure which approach is the better one. (Prefix is more verbose but also more explicit, so you could have multiple divs in the same document and only some converted to environments.)

P.S. Not sure whether this discussion should actually take place in #2106, should I change the title of that issue and close this one?

@iandol
Copy link
Contributor Author

iandol commented Dec 11, 2017

I didn't really understand the need for the +environment when I first looked at #2106 and assumed it was trying for something different to simple translation of style->style. But that was probably me reading through that thread too quickly. I'm sure there is a good reason why we can't just use a straight conversion of style names (::: Poetry ::: becomes a Poetry style in word) without needing an extension, i just haven't grokked it yet...

If this is my own ignorance then close this and lets continue on #2106.

@mb21
Copy link
Collaborator

mb21 commented Dec 11, 2017

Duplicate of #2106

@mb21 mb21 marked this as a duplicate of #2106 Dec 11, 2017
@mb21 mb21 closed this as completed Dec 11, 2017
@jgm
Copy link
Owner

jgm commented Dec 11, 2017 via email

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

No branches or pull requests

3 participants