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

Man page using :samp: with braces - font doesn't reset #1860

Closed
ghost opened this issue Apr 22, 2015 · 3 comments · Fixed by #9350
Closed

Man page using :samp: with braces - font doesn't reset #1860

ghost opened this issue Apr 22, 2015 · 3 comments · Fixed by #9350
Assignees
Milestone

Comments

@ghost
Copy link

ghost commented Apr 22, 2015

There are issues with the man page rendering when using :samp:{blah}
The font change doesn't reset after the closure of the samp but runs onto subsequent lines until certain 'resetting' elements are encountered, such as a bullet, heading and probably others I haven't tested for.
:samp:like this is ok. HTML and Latex (pdf) formats are also unaffected by this issue.

MWE included with screen shot.

Manpage Test

:samp:Sample Text (with 'samp') {and this text in braces}

Text that should be plain.

  • A bullet that should be plain.

And back to normal.

:samp:{this text in braces} but not this

More text that should be plain.

  • A bullet that should be plain.

And back to normal.

:samp:Now a 'samp' with no braces

All ok on this line.

screen shot 2015-04-22 at 11 26 43

@tk0miya tk0miya added this to the 1.3.4 milestone Jan 7, 2016
@tk0miya tk0miya self-assigned this Jan 7, 2016
@tk0miya
Copy link
Member

tk0miya commented Jan 7, 2016

Fixed at c6c9c5c
Thank you for reporting

@tk0miya tk0miya closed this as completed Jan 7, 2016
tk0miya added a commit that referenced this issue Jan 8, 2016
tk0miya added a commit that referenced this issue Jan 8, 2016
It is not a part of 'testcase for #1860'. It's my miss commit.
Sorry.
@marxin
Copy link
Contributor

marxin commented Jun 15, 2021

Apparently, I face the same problem with the latest release 4.0.2:

index.rst:

Welcome to demo documentation!
==============================

This is :samp:`fine`.

Show :samp:`{problematic}` underscore starting here.

And this is also bad.

conf.py:

project = 'Demo project'
copyright = '2001-2021 XYZ'
authors = 'Me'

man_pages = [
    ('index', 'demo', 'GNU project C

and template Makefile is needed:

$ make man
man _build/man/demo.1
$ grep problematic _build/man/demo.1
Show \fB\fIproblematic\fP\fP underscore starting here.

Screenshot from 2021-06-15 22-00-24

@marxin
Copy link
Contributor

marxin commented Jun 16, 2021

Apparently, it's problematic only when a :samp: directive begins with {. I've got a patch for it.

marxin added a commit to marxin/sphinx that referenced this issue Jun 16, 2021
When a samp begins with a variable part, it is not unwrapped for manual
pages.

Fixes sphinx-doc#1860.
marxin added a commit to marxin/sphinx that referenced this issue Jun 16, 2021
When a samp begins with a variable part, it is not unwrapped for manual
pages.

Fixes sphinx-doc#1860.
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants