-
Notifications
You must be signed in to change notification settings - Fork 66
Asciidoc: PO4A is missing a way to define how paragraphs with custom styles are managed #548
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
Comments
I assume you are talking about git-manpages, aren't you? Are you sure po4a is to blame here? It looks like po4a produces a correct result as-is both in POs and in output docs. Here is an example of Russian translation of
While when rendered into html it looks incorrectly even in English: https://git-scm.com/docs/git-clone/2.48.0 |
Are you looking at the file here? It was generated with a customized po4a. I still need to polish it and push it upstream to fix this issue. In its actual state, it is quite working, but has some corner cases. As for the rendering on git-scm.com, I'm also pushing git/git-scm.com#1921 in order to manage the new git-manpage format for synopsis. |
At the same file generated locally with stock po4a-0.73. It looks exactly the same though. |
This is unexpected. When tested locally, it produced po files where the synopsis paragraph was inlined, different from the your outcome. I do not understand how your file could ever be produced, because there's no link from 'synopsis' style to verbatim in the current po4a-0.73. |
I haven't dig into the the source too deep, but it's probably just because next lines start with spaces, which gets the whole paragraph be interpreted as a non-wrappable... We probably should fix it anyway in case somebody will be stylizing actual poems or something... |
The style handling was a bit messy and making the verse style a special case was not a good idea. This commit refactors the style handling to make it more consistent and easier to understand. This commit also introduces a new style definition extension with the '%' character that allows to define a style of paragraphs and blocks that is not wrapped. fixes mquinson#548 Signed-off-by: Jean-Noël Avila <[email protected]>
The style handling was a bit messy and making the verse style a special case was not a good idea. This commit refactors the style handling to make it more consistent and easier to understand. This commit also introduces a new style definition extension with the '%' character that allows to define a style of paragraphs and blocks that is not wrapped. fixes mquinson#548 Signed-off-by: Jean-Noël Avila <[email protected]>
Style customization is possible in Asciidoc, and the formatting of such new style can be defined in the configuration of the asciidoc engine. This has an effect on how the styled paragraph or block is supposed to be processed during the translation, mainly whether the segment of text is wrapped or not (whether line breaks should be preserved). The style handling was a bit messy and making the verse style a special case was not a good idea. This commit refactors the style handling to make it more consistent and easier to understand. This commit also introduces a new style definition extension with the '%' character that allows to define a style of paragraphs and blocks that is not wrapped. fixes mquinson#548 Signed-off-by: Jean-Noël Avila <[email protected]>
For git manpages, I defined a special paragraph style named "synopsis", which derives from "verse". When processing these paragraphs with po4a, they are managed as flowed paragraph in lieu of verbatim.
Po4a should provide a way to indicate that a paragraph with a custom style must be managed as verbatim.
The text was updated successfully, but these errors were encountered: