From 1c52817b06272b2142a4ed85a0dd54748e5f36ed Mon Sep 17 00:00:00 2001 From: Carlos Scheidegger Date: Wed, 8 Feb 2023 14:24:03 -0700 Subject: [PATCH 1/3] create envvar so that other libraries can detect the presence of quarto --- src/execute/rmd.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/execute/rmd.ts b/src/execute/rmd.ts index 75e34441219..7b96d6d0923 100644 --- a/src/execute/rmd.ts +++ b/src/execute/rmd.ts @@ -204,6 +204,14 @@ async function callR( { dir: tempDir, prefix: "r-results", suffix: ".json" }, ); + // create a temp file for communication with the computational cells + // we currently ignore the file but 3rd-party libraries like GT + // already depend on this. + const messagesFile = Deno.makeTempFileSync( + { dir: tempDir, prefix: "r-messages", suffix: ".json" }, + ); + Deno.env.set("QUARTO_MESSAGES_FILE", messagesFile); + const input = JSON.stringify({ action, params, @@ -255,6 +263,8 @@ async function callR( await printCallRDiagnostics(); } return Promise.reject(); + } finally { + Deno.env.delete("QUARTO_MESSAGES_FILE"); } } From 37a4a8bbabda2208755dc1a922908d43da445c3b Mon Sep 17 00:00:00 2001 From: Carlos Scheidegger Date: Wed, 8 Feb 2023 15:04:06 -0700 Subject: [PATCH 2/3] indent ordered lists with at least 10 elements in .scrollable --- news/changelog-1.3.md | 1 + src/resources/formats/revealjs/quarto.scss | 15 +++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/news/changelog-1.3.md b/news/changelog-1.3.md index b8cb9b5e6d8..cd47b761591 100644 --- a/news/changelog-1.3.md +++ b/news/changelog-1.3.md @@ -33,6 +33,7 @@ - reduce font size of `df-print: paged` tables ([#3380](https://github.com/quarto-dev/quarto-cli/issues/3380)) - `width` and `height` in percent are now correctly supported ([#4063](https://github.com/quarto-dev/quarto-cli/issues/4063)) +- add better margins to numbered lists in the presence of many items and `.scrollable` ([#4283](https://github.com/quarto-dev/quarto-cli/issues/4063)). ## Dates diff --git a/src/resources/formats/revealjs/quarto.scss b/src/resources/formats/revealjs/quarto.scss index 4b734d9a1c0..ab5680e46da 100644 --- a/src/resources/formats/revealjs/quarto.scss +++ b/src/resources/formats/revealjs/quarto.scss @@ -661,3 +661,18 @@ div.cell-output-display div.pagedtable-wrapper table.table { margin-left: 0.25em; } } + +/* + + https://github.com/quarto-dev/quarto-cli/issues/4283 + + The trick itself is from here: + + https://stackoverflow.com/questions/8720931/can-css-detect-the-number-of-children-an-element-has + +*/ + +.reveal .scrollable ol li:first-child:nth-last-child(n + 10), +.reveal .scrollable ol li:first-child:nth-last-child(n + 10) ~ li { + margin-left: 1em; +} From e517435c71324943b05d22d7be3f00e3df9e369d Mon Sep 17 00:00:00 2001 From: Carlos Scheidegger Date: Wed, 8 Feb 2023 15:08:09 -0700 Subject: [PATCH 3/3] revert file --- src/execute/rmd.ts | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/execute/rmd.ts b/src/execute/rmd.ts index 7b96d6d0923..75e34441219 100644 --- a/src/execute/rmd.ts +++ b/src/execute/rmd.ts @@ -204,14 +204,6 @@ async function callR( { dir: tempDir, prefix: "r-results", suffix: ".json" }, ); - // create a temp file for communication with the computational cells - // we currently ignore the file but 3rd-party libraries like GT - // already depend on this. - const messagesFile = Deno.makeTempFileSync( - { dir: tempDir, prefix: "r-messages", suffix: ".json" }, - ); - Deno.env.set("QUARTO_MESSAGES_FILE", messagesFile); - const input = JSON.stringify({ action, params, @@ -263,8 +255,6 @@ async function callR( await printCallRDiagnostics(); } return Promise.reject(); - } finally { - Deno.env.delete("QUARTO_MESSAGES_FILE"); } }