From d953c76783ef043e706002e72de86f0d36d21938 Mon Sep 17 00:00:00 2001 From: Andreas Bogossian Date: Tue, 31 Mar 2026 21:11:32 +0300 Subject: [PATCH 1/3] fix(appendix): wrap BibTeX block in code-copy-outer-scaffold In 1.8 the CSS copy-button hover selector was changed to require a div.code-copy-outer-scaffold parent. Regular code blocks were updated but the citation appendix template was not, making the copy button invisible. Wrap the bibtex
 in the scaffold div to match.
---
 src/format/html/format-html-appendix.ts | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/format/html/format-html-appendix.ts b/src/format/html/format-html-appendix.ts
index d18b373f902..0e8849ae84b 100644
--- a/src/format/html/format-html-appendix.ts
+++ b/src/format/html/format-html-appendix.ts
@@ -304,10 +304,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) {

From 0d31ab0994c7ea97ae40e7cc744fb3aa71f97c31 Mon Sep 17 00:00:00 2001
From: Andreas Bogossian 
Date: Sat, 18 Apr 2026 20:44:30 +0300
Subject: [PATCH 2/3] Add changelog entry for #13669 (BibTeX copy button
 regression fix)

---
 news/changelog-1.10.md | 1 +
 1 file changed, 1 insertion(+)

diff --git a/news/changelog-1.10.md b/news/changelog-1.10.md
index fb34c2e35bc..add9e43df84 100644
--- a/news/changelog-1.10.md
+++ b/news/changelog-1.10.md
@@ -7,6 +7,7 @@ All changes included in 1.10:
 - ([#14298](https://github.com/quarto-dev/quarto-cli/issues/14298)): Fix `quarto preview` browse URL including output filename (e.g., `hello.html`) for single-file documents, breaking Posit Workbench proxied server access.
 - ([#14489](https://github.com/quarto-dev/quarto-cli/issues/14489)): Restore `--output-dir` support for `quarto preview` of single files when no `_quarto.yml` is present (e.g. R-package workspaces). Regression introduced in v1.9.18.
 - ([rstudio/rstudio#17333](https://github.com/rstudio/rstudio/issues/17333)): Fix `quarto inspect` on standalone files emitting project metadata that breaks RStudio's publishing wizard.
+- ([#13669](https://github.com/quarto-dev/quarto-cli/issues/13669)): Fix BibTeX copy button in citation appendix not visible due to missing `div.code-copy-outer-scaffold` wrapper, a regression from 1.8. (author: @AJBogo9)
 
 ## Accessibility
 

From 81b2a4f63cc71e18d4237473ab6f3d82600777f5 Mon Sep 17 00:00:00 2001
From: Christophe Dervieux 
Date: Tue, 27 Oct 2026 12:06:52 +0100
Subject: [PATCH 3/3] Move #13669 changelog entry to 1.11 and add a regression
 test

The fix ships in 1.11 (QUARTO_VERSION and the issue milestone), so the
entry moves to the Regression fixes section of changelog-1.11.md. It
names v1.8.15 as the release that introduced the regression: 62c71225c
added the code-copy-outer-scaffold wrapper to regular code blocks only,
and the copy button icon and position CSS both key on that wrapper.

The smoke-all test checks the BibTeX block and its copy button share the
scaffold. It fails on main with the scaffold missing.

Also removes trailing whitespace in format-html-appendix.ts.
---
 news/changelog-1.10.md                          |  1 -
 news/changelog-1.11.md                          |  1 +
 src/format/html/format-html-appendix.ts         |  2 +-
 tests/docs/smoke-all/2026/10/27/issue-13669.qmd | 17 +++++++++++++++++
 4 files changed, 19 insertions(+), 2 deletions(-)
 create mode 100644 tests/docs/smoke-all/2026/10/27/issue-13669.qmd

diff --git a/news/changelog-1.10.md b/news/changelog-1.10.md
index 2ad298eda6f..69af732b322 100644
--- a/news/changelog-1.10.md
+++ b/news/changelog-1.10.md
@@ -9,7 +9,6 @@ All changes included in 1.10:
 - ([#14489](https://github.com/quarto-dev/quarto-cli/issues/14489)): Restore `--output-dir` support for `quarto preview` of single files when no `_quarto.yml` is present (e.g. R-package workspaces). Regression introduced in v1.9.18.
 - ([#14683](https://github.com/quarto-dev/quarto-cli/issues/14683)): Fix `quarto preview` of a knitr document in a project subdirectory failing when run from that subdirectory with a bare filename (the shape RStudio's Render button uses). Regression introduced in v1.9.18.
 - ([rstudio/rstudio#17333](https://github.com/rstudio/rstudio/issues/17333)): Fix `quarto inspect` on standalone files emitting project metadata that breaks RStudio's publishing wizard.
-- ([#13669](https://github.com/quarto-dev/quarto-cli/issues/13669)): Fix BibTeX copy button in citation appendix not visible due to missing `div.code-copy-outer-scaffold` wrapper, a regression from 1.8. (author: @AJBogo9)
 
 ## Dependencies
 
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 5b77282fa5a..26f5813683d 100644
--- a/src/format/html/format-html-appendix.ts
+++ b/src/format/html/format-html-appendix.ts
@@ -305,7 +305,7 @@ export async function processDocumentAppendix(
 
             const bibTexDiv = createCodeBlock(doc, cite.bibtex, "bibtex");
             bibTexDiv.classList.add(kQuartoCiteBibtexClass);
-            
+
             const outerScaffold = doc.createElement("div");
             outerScaffold.classList.add("code-copy-outer-scaffold");
             outerScaffold.appendChild(bibTexDiv);
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).