Use a box in the pdf output for guilabel

Open
#11,213 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
30/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
latex, python
Domain
documentation

Research direction

Start by locating the LaTeX output handling for the \guilabel command and review how the proposed tcolorbox package and custom command would fit there. Confirm the change in a generated PDF, where guilabel text should appear inside a box rather than as italic text, while existing HTML output remains unchanged.

Written by the indexing model from the issue text.

Description

builder:latex type:enhancement

currently guilabel are displayed as little boxes in the html outputs in most of the the theme I know like rdt:

image

In the latex build it's only represented as a Italic word. what if instead we use a little box around the text to display it as an actual guilabel as this example:

image

to build this I simply added the tcolorbox package and created a custom command:

\newtcbox{\sphinxbtn}[1][]{box align=base, nobeforeafter, size=small, boxsep=2pt, #1}

My proposal here is to replace the \guilabel one. What do you think ?

Dominant language
Python
Stars
8k
Forks
2.6k
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from sphinx-doc/sphinx

All issues in sphinx-doc/sphinx

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.