diff --git a/news/changelog-1.11.md b/news/changelog-1.11.md index e1b823c6e9e..4e5941b402b 100644 --- a/news/changelog-1.11.md +++ b/news/changelog-1.11.md @@ -2,6 +2,7 @@ All changes included in 1.11: ## Regression fixes +- ([#13669](https://github.com/quarto-dev/quarto-cli/issues/13669)): Fix the copy button of the BibTeX citation in the HTML appendix showing no icon and being placed outside the code block (regression introduced in v1.8.15). (author: @AJBogo9) - ([#14920](https://github.com/quarto-dev/quarto-cli/issues/14920)): Fix Windows ARM diagnostics for x64 R crashes to preserve the specialized error in `quarto check`, JSON output, and render failures, and update the native ARM64 R installation guidance. - ([#14731](https://github.com/quarto-dev/quarto-cli/pull/14731)): Fix `QUARTO_VENDOR_BINARIES=false` builds silently succeeding with missing binaries. The `configure` step's "is it on PATH?" check for `typst-gather`, `typst`, `pandoc` and `esbuild` compared an unawaited `Promise` against `undefined`, so the guard never fired. A build with `typst-gather` neither vendored nor on PATH reported success and produced a Quarto tree without it, surfacing only at render time as `typst-gather analyze failed; staging all packages as fallback`. The missing-binary error message now also names the path that was checked and the `QUARTO_TYPST_GATHER` environment variable. - ([#14741](https://github.com/quarto-dev/quarto-cli/issues/14741)): Fix PDF rendering of a cross-referenced table failing with `! Extra }, or forgotten \endgroup.` when the `endfloat` package defers `longtable` environments (`\DeclareDelayedFloatFlavor*{longtable}{table}`). diff --git a/src/format/html/format-html-appendix.ts b/src/format/html/format-html-appendix.ts index 1836a094a43..26f5813683d 100644 --- a/src/format/html/format-html-appendix.ts +++ b/src/format/html/format-html-appendix.ts @@ -305,10 +305,14 @@ export async function processDocumentAppendix( const bibTexDiv = createCodeBlock(doc, cite.bibtex, "bibtex"); bibTexDiv.classList.add(kQuartoCiteBibtexClass); - contentsDiv.appendChild(bibTexDiv); + + const outerScaffold = doc.createElement("div"); + outerScaffold.classList.add("code-copy-outer-scaffold"); + outerScaffold.appendChild(bibTexDiv); + contentsDiv.appendChild(outerScaffold); const copyButton = createCodeCopyButton(doc, format); - bibTexDiv.appendChild(copyButton); + outerScaffold.appendChild(copyButton); } if (cite?.html) { diff --git a/tests/docs/smoke-all/2026/10/27/issue-13669.qmd b/tests/docs/smoke-all/2026/10/27/issue-13669.qmd new file mode 100644 index 00000000000..11663e084f0 --- /dev/null +++ b/tests/docs/smoke-all/2026/10/27/issue-13669.qmd @@ -0,0 +1,17 @@ +--- +title: "Citation BibTeX copy button" +author: "Author name" +date: "2025-01-01" +format: html +citation: true +_quarto: + tests: + html: + ensureHtmlElements: + - + - '#quarto-citation div.code-copy-outer-scaffold > pre.quarto-appendix-bibtex' + - '#quarto-citation div.code-copy-outer-scaffold > button.code-copy-button' + - [] +--- + +The BibTeX block in the citation appendix sits in the same `code-copy-outer-scaffold` wrapper as other code blocks, so the copy button is positioned inside the block and its icon shows on hover (#13669).