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

Asciidoc: PO4A is missing a way to define how paragraphs with custom styles are managed #548

Open
jnavila opened this issue Dec 22, 2024 · 5 comments

Comments

@jnavila
Copy link
Collaborator

jnavila commented Dec 22, 2024

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.

@Fat-Zer
Copy link
Contributor

Fat-Zer commented Jan 27, 2025

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 man git-clone's SYNOPSIS section:

ОБЗОР
-----
[synopsis]
'git clone' [--template=<каталог-шаблонов>]
	  [-l] [-s] [--no-hardlinks] [-q] [-n] [--bare] [--mirror]
	  [-o <имя>] [-b <ветка>] [-u <путь-загрузки>] [--reference <репозиторий>]
	  [--dissociate] [--separate-git-dir <каталог-git>]
	  [--depth <глубина>] [--[no-]single-branch] [--no-tags]
	  [--recurse-submodules[=<спецификатор-пути>]] [--[no-]shallow-submodules]
	  [--[no-]remote-submodules] [--jobs <n>] [--sparse] [--[no-]reject-shallow]
	  [--filter=<спецификатор-фильтра>] [--also-filter-submodules]]
	  [--] <репозиторий> [<каталог>]

While when rendered into html it looks incorrectly even in English: https://git-scm.com/docs/git-clone/2.48.0

@jnavila
Copy link
Collaborator Author

jnavila commented Jan 27, 2025

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.

@Fat-Zer
Copy link
Contributor

Fat-Zer commented Jan 28, 2025

Are you looking at the file here?

At the same file generated locally with stock po4a-0.73. It looks exactly the same though.

@jnavila
Copy link
Collaborator Author

jnavila commented Jan 28, 2025

Are you looking at the file here?

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.

@Fat-Zer
Copy link
Contributor

Fat-Zer commented Jan 28, 2025

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...

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

2 participants