pygments / pygments/pygments

inherance (of bold, italic, etc) not working as expected with LaTeX

Open
#321 10 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

S-major T-bug X-imported
Dominant language
Python
Stars
2.2k
Forks
885
PR merge metrics
No merged PRs in 30d

Description

(Original issue 614 created by None on 2010-11-16T21:00:59.827635+00:00)

Hi, I'm using Pygmentize for LaTeX output but I've got an annoying bug, I can't get italic comments while getting non italic preprocessor directives like a #include, while it works on HTML output. The problem lies in some wrong handling of style inherance for LaTeX.
For example, in murphy style we have:

Comment: "#666 italic",
Comment.Preproc: "#579 noitalic",
Comment.Special: "#c00 bold",

and, even though we have noitalic for Preproc, it keeps italic in LaTeX output (I'm using pdfLatex on TeX Live 2010) while it outputs non italic on html.

Pygmentize is great thanks.

Contributor guide

No contributing guide indexed for this repository

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.

Research direction

Reproduce the issue with Pygmentize using the murphy style and LaTeX output, then compare it with the HTML output. Inspect the LaTeX style-inheritance handling; done means Comment remains italic while Comment.Preproc is non-italic and Comment.Special remains bold, matching the declared style.

Written by the indexing model from the issue text.

Assessment

Tech stack
latex, python
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.