LaTeX: a paragraph cell in a tabular header row is not bold
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 76/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- latex, xml
- Domain
- documentation
Research direction
The bug is in the paragraph branch of the cell template in pretext-latex-common.xsl, around line 8055; the bare-text branch next to it already applies the header row's bold. Compare the two branches and check where \bfseries is added for header rows. Reproduce with the minimal tabular example from the issue. Done when a <p> cell in a header row gets \bfseries alongside \raggedright, and the column width still applies.
Written by the indexing model from the issue text.
Description
In a <tabular> header row (<row header="yes">), the LaTeX conversion sets a bare-text cell in bold but not a cell that contains a <p>. So a header cell in a column with a <col width> loses its bold, because the width only applies to paragraph cells. The HTML conversion is fine: both cells become <th>.
Minimal example:
<tabular>
<col width="40%"/>
<col/>
<row header="yes">
<cell><p>Wrapped header</p></cell>
<cell>Bare header</cell>
</row>
<row>
<cell><p>a</p></cell>
<cell>b</cell>
</row>
</tabular>
LaTeX output (checkout 58551797, 2026-08-23):
\begin{tabular}{ll}
\multicolumn{1}{m{0.4\linewidth}}{\raggedright%
Wrapped header%
}&{\bfseries{}Bare header}\tabularnewline[0pt]
\multicolumn{1}{m{0.4\linewidth}}{\raggedright%
a%
}&b
\end{tabular}
"Bare header" gets \bfseries, but "Wrapped header" doesn't. The paragraph branch of the cell template in pretext-latex-common.xsl (around line 8055) never applies the header row's bold.
Expected: the header row's bold applies to a paragraph cell too, e.g. {\raggedright\bfseries{}Wrapped header}. Then a table can give its columns widths without its header row losing its emphasis.
🤖 Generated with Claude Code
- Dominant language
- XSLT
- Stars
- 466
- Forks
- 251
- Avg merge
- 4m
- Merged PRs (30d)
- 13
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from PreTeXtBook/pretext
-
The print preview leaves writing space short by the margins of hidden headers, footers and solutionsOpen
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
PreTeXtBook/pretext#3329 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 1-3 hours Newbie friendliness 82/100
PreTeXtBook/pretext#3305 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
PreTeXtBook/pretext#3297 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
PreTeXtBook/pretext#3285 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
PreTeXtBook/pretext#3283 ·
Maintainers usually reply within 1 day
All issues in PreTeXtBook/pretext
Similar issues
-
documentation tool triaged
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
can1357/oh-my-pi#19608 · 2 comments ·
Maintainers usually reply within 1 day
-
documentation good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
liberation-data/drivine-python#529 ·
Maintainers usually reply within 1 day
-
automated documentation maintenance
Difficulty 1/5 1-3 hours Newbie friendliness 75/100
github/gh-aw-mcpg#16717 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 2 days