Run-in Headings wrapped in Paragraph tags trigger PAC Logical Structure "Inappropriate Use"' warnings
I maintainer di solito rispondono entro 2 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 25/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- rust
- Ambito
- documentation
Direzione di ricerca
The warning comes from PDF tag resolution in the Typst PDF crate; the reporter's patch targets the tags/resolve mod.rs logic that wraps heading nodes inside paragraph tags. Start by reproducing the snippet with a heading.where(level: 2) show rule and checking the PAC 2026 Logical Structure output. Done when run-in headings no longer trigger the warning and the strong-styled variant also passes the checker.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Description
By run-in headings I mean the ones from APA Style (sections of level 4 and 5; see https://apastyle.apa.org/style-grammar-guidelines/paper-format/headings).
The following reproduces such warning:
#show heading.where(level: 2): it => {
box(strong(it.body))
h(0.5em, weak: true)
}
#set document(title: [Hola])
= hola
hola
== adios
adios
== spaced
wrong!!!11111111
#heading(level: 2)[with function.] might this work?
Causing:
I tried to compare it with Microsoft Word, which passes, but does so by just styling the heading, stripping its value:
I tried to fix it in my fork with the following patch:
// This is mod.rs from tags/resolve in the Typst PDF crate.
if matches!(tag, TagKind::P(_))
&& nodes.iter().any(|node| {
matches!(node, Node::Group(group) if matches!(group.tag, TagKind::Hn(_)))
})
{
let mut paragraph = Vec::new();
for mut node in nodes {
if let Node::Group(heading) = &mut node
&& matches!(heading.tag, TagKind::Hn(_))
{
if !paragraph.is_empty() {
accum.push(Node::Group(kt::TagGroup::with_children(
tag.clone(),
std::mem::take(&mut paragraph),
)));
}
if heading.tag.lang().is_none() {
heading.tag.set_lang(tag.lang().map(str::to_owned));
}
accum.push(node);
} else {
paragraph.push(node);
}
}
if !paragraph.is_empty() {
accum.push(Node::Group(kt::TagGroup::with_children(tag, paragraph)));
}
} else {
accum.push(Node::Group(kt::TagGroup::with_children(tag, nodes)));
}
Which produces:
Fixes the warning, although its integrated AI checker still complains about the last 2 headings (excluding the first run-in for some reason).
The second one has a 0.02 score.
The AI warnings seem to be triggered by using strong:
#[ // Warning
#show heading.where(level: 2): it => {
strong(it.body)
h(0.5em, weak: true)
}
== Run-in heading.
Following paragraph text.
]
#[ // Pass
#show heading.where(level: 2): it => {
it.body
h(0.5em, weak: true)
}
== Run-in heading.
Following paragraph text.
]
Operating system
Windows
Typst version
- I am using the latest version of Typst
- Lingua principale
- Rust
- Stelle
- 57.2k
- Fork
- 1.8k
- Merge medio
- 1g 17h
- PR unite (30g)
- 22
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di typst/typst
-
feature request
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
I maintainer di solito rispondono entro 2 giorni
-
bug foundations
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
typst/typst#9047 · 2 commenti · 2 reazioni ·
I maintainer di solito rispondono entro 2 giorni
-
`h3` font size is too smallApertadocs-infra
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
typst/typst#9020 · 2 commenti ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
typst/typst#8987 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
docs-infra
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
typst/typst#8934 · 2 commenti ·
I maintainer di solito rispondono entro 2 giorni
Issue simili
-
[Bug]: opencode_go chat route drops reasoning_effort (even 'none'), while the same endpoint honors it via custom_llm_provider=openaiForse già presa @arvindkumar-ship-it l’ha presa oggi. Apertallm translation
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
BerriAI/litellm#51871 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
comp-formats
Difficoltà 2/5 Mezza giornata Idoneità per principianti 64/100
ClickHouse/ClickHouse#131694 ·
I maintainer di solito rispondono entro 1 giorno
-
cli: `execCargoMetadata` decodes stdout per chunk, corrupting non-ASCII paths across pipe boundariesAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
C-Bug S-Needs-Triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
bevyengine/bevy#26558 ·
I maintainer di solito rispondono entro 2 giorni