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

pandoc -f man will miss some text? #9055

Closed
Freed-Wu opened this issue Sep 3, 2023 · 5 comments
Closed

pandoc -f man will miss some text? #9055

Freed-Wu opened this issue Sep 3, 2023 · 5 comments
Labels

Comments

@Freed-Wu
Copy link

Freed-Wu commented Sep 3, 2023

Explain the problem.

Some text is missing.

$ zcat /usr/share/man/man1/tmux.1.gz > /dev/shm/a.nroff
$ pandoc -f man a.nroff -o a.md
$ rg display-panes a.nroff
481:.Ic display-panes
487:.Ic display-panes
2270:.Ic display-panes
2280:.Ic display-panes-colour
2282:.Ic display-panes-active-colour
2292:.Ic display-panes-time
3819:.It Ic display-panes-active-colour Ar colour
3821:.Ic display-panes
3823:.It Ic display-panes-colour Ar colour
3825:.Ic display-panes
3827:.It Ic display-panes-time Ar time
3829:.Ic display-panes
$ rg display-panes a.md
$ pandoc --version | rg '^pandoc'
1:pandoc 3.1.6
$ uname -r
6.4.12
@Freed-Wu Freed-Wu added the bug label Sep 3, 2023
@jgm
Copy link
Owner

jgm commented Sep 3, 2023

tmux.1 is in mandoc format, not man...

@jgm jgm closed this as completed Sep 3, 2023
@Freed-Wu
Copy link
Author

Freed-Wu commented Sep 3, 2023

So pandoc support man, doesn't support mandoc, really?

@jgm
Copy link
Owner

jgm commented Sep 3, 2023

Correct. Of course a mandoc reader would be a welcome addition...but it's an entirely different set of macros, considerably more complex than man.

@jgm
Copy link
Owner

jgm commented Sep 3, 2023

See #9056

@jgm
Copy link
Owner

jgm commented Sep 3, 2023

Your best workaround at this point is probably to render the mandoc manual to HTML using mandoc -T html and pipe the result through pandoc -f html.

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

No branches or pull requests

2 participants