Skip to content

Commit da45c35

Browse files
committed
Merge branch 'main' into feature/finegrained-luacov
2 parents b434846 + 9c74ddf commit da45c35

File tree

103 files changed

+6691
-8648
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+6691
-8648
lines changed

.github/workflows/actions/quarto-dev/action.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ runs:
3939
If ( "$(git status --porcelain)" -ne "" ) { Exit 1 }
4040
4141
- name: Quarto Check
42+
if: runner.debug == '1'
4243
working-directory: tests
4344
shell: pwsh
4445
run: quarto check

.github/workflows/test-smokes.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,9 @@ jobs:
124124
- name: Set up Python
125125
uses: actions/setup-python@v4
126126
with:
127+
python-version: "3.11"
127128
cache: "pipenv"
128129
cache-dependency-path: "./tests/Pipfile.lock"
129-
python-version-file: "./tests/.python-version"
130130

131131
- name: Restore Python Dependencies
132132
working-directory: tests
@@ -148,16 +148,24 @@ jobs:
148148
- name: Setup Julia
149149
uses: julia-actions/setup-julia@v1
150150
with:
151-
version: 1.8.5
151+
version: 1.9.3
152152

153153
- name: Cache Julia Packages
154154
uses: julia-actions/cache@v1
155+
with:
156+
cache-name: version-1
157+
cache-registries: true
155158

156159
- name: Restore Julia Packages
157160
working-directory: tests
158161
shell: bash
159162
run: |
160-
julia --color=yes --project=. -e "import Pkg; Pkg.instantiate(); Pkg.build(\"IJulia\"); Pkg.precompile()"
163+
# Setup IJulia with the jupyter from the Python environment
164+
# https://julialang.github.io/IJulia.jl/stable/manual/installation/
165+
export JUPYTER=$(find $(dirname $(pipenv run which jupyter))/ -type f -name "jupyter.exe" -o -name "jupyter")
166+
pipenv run julia --color=yes --project=. -e "import Pkg; Pkg.instantiate(); Pkg.build(\"IJulia\"); Pkg.precompile()"
167+
echo "Julia Jupyter:"
168+
julia --project=. -e "import IJulia;println(IJulia.JUPYTER);println(IJulia.find_jupyter_subcommand(\"notebook\"))"
161169
162170
- name: Setup timing file for timed test
163171
if: ${{ matrix.time-test == true }}

configuration

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export TYPST=0.8.0
1818
# Bootstrap dependencies from bslib
1919
# (use commit hash from bslib repo)
2020
export BOOTSTRAP=ad946cafdbf1c91cfd714cb39948bb203ae66e66 # 0.5.1 + consolidated components
21-
export HTMLTOOLS=0.5.6
21+
export HTMLTOOLS=0.5.7
2222
export BOOTSTRAP_FONT=1.11.1
2323
export BOOTSWATCH=5.3.1
2424

news/changelog-1.4.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
## Dependencies
1313

14-
- Update to Pandoc 3.1.6.1
14+
- Update to Pandoc 3.1.8
1515
- Update to Typst 0.7.0
1616

1717
## HTML Format
@@ -38,6 +38,7 @@
3838
- ([#6833](https://github.com/quarto-dev/quarto-cli/issues/6833)): Handle partially-specified aspect ratio, width, and height attributes in `video` shortcode.
3939
- ([#7137](https://github.com/quarto-dev/quarto-cli/discussions/7137)): Automatically set `rel="noopener"` when setting a target on external links
4040
- ([#7187](https://github.com/quarto-dev/quarto-cli/issues/7187)): Add `html-table-processing: none` to document- and project-level metadata to disable HTML table processing. Add `{html-table-processing="none"}` to a fenced div to disable HTML table processing for the elements in that div. Add `html-table-processing: none` on knitr or jupyter cell to disable HTML table processing for the cell output content.
41+
- ([#7441](https://github.com/quarto-dev/quarto-cli/issues/7441)): Links in hover box (e.g. links to DOI when hover for citations is opt-in) are now correctly process for external and new window processing (when `link-external-icon: true` and `link-external-newwindow: true`).
4142

4243
## Appendix
4344

@@ -119,6 +120,7 @@
119120
- ([#5932](https://github.com/quarto-dev/quarto-cli/issues/5932)): Correct Open Graph metadata key name for `og:site_name`
120121
- ([#6432](https://github.com/quarto-dev/quarto-cli/issues/6432)): Don't decorate navigation tools with external link icon (we generally don't decorate navigation chrome in this way)
121122
- ([#6708](https://github.com/quarto-dev/quarto-cli/issues/6708)): Prevent duplication of footnotes within the abstract or description within websites and books.
123+
- ([#7447](https://github.com/quarto-dev/quarto-cli/issues/7447)): Changing the `$primary` color in a SCSS theme will now properly change the navigation bar background color.
122124

123125
## Website Search
124126

@@ -222,6 +224,7 @@
222224
## Other Fixes and Improvements
223225

224226
- Exit if project pre or post render script fails
227+
- Support `--output-dir` for rendering individual files.
225228
- Use InternalError in typescript code, and offer a more helpful error message when an internal error happens.
226229
- ([#1392](https://github.com/quarto-dev/quarto-cli/issues/1392)): Add tools and LaTeX information to `quarto check` output.
227230
- ([#2214](https://github.com/quarto-dev/quarto-cli/issues/2214), reopened): don't report a non-existing version of Google Chrome in macOS.
@@ -251,3 +254,4 @@
251254
- ([#7032](https://github.com/quarto-dev/quarto-cli/issues/7032)): `quarto` is now correctly working when installed in a folder with spaces in path.
252255
- ([#7131](https://github.com/quarto-dev/quarto-cli/issues/7131)): Fix typo in ISBN entry for JATS subarticle template (author: @jasonaris).
253256
- ([#3599](https://github.com/quarto-dev/quarto-cli/issues/3599), [#5870](https://github.com/quarto-dev/quarto-cli/issues/5870)): Fix hash issue causing unexpected render when `freeze` is activated on Windows but re-rendered on Linux (e.g. in Github Action).
257+
- ([#7252](https://github.com/quarto-dev/quarto-cli/issues/7252)): Improve handling with `tlmgr` of some mismatched LaTeX support files, associated with `expl3.sty` loading.

src/command/render/cmd.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export const renderCommand = new Command()
3636
)
3737
.option(
3838
"--output-dir",
39-
"Write project output to DIR (path is project relative)",
39+
"Write output to DIR (path is input/project relative)",
4040
)
4141
.option(
4242
"-M, --metadata",

src/command/render/latexmk/parse-error.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ const packageMatchers = [
230230
return "lua-uni-algos.lua";
231231
},
232232
},
233-
233+
{ regex: /.* Loading '([^']+)' aborted!.*/g },
234234
{ regex: /.*! LaTeX Error: File `([^']+)' not found.*/g },
235235
{ regex: /.* file ['`]?([^' ]+)'? not found.*/g },
236236
{ regex: /.*the language definition file ([^ ]+) .*/g },

src/command/render/latexmk/pdf.ts

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,6 @@ async function initialCompileLatex(
156156
quiet?: boolean,
157157
) {
158158
let packagesUpdated = false;
159-
let tlmgrUpdated = false;
160159
while (true) {
161160
// Run the pdf engine
162161
const response = await runPdfEngine(
@@ -197,7 +196,6 @@ async function initialCompileLatex(
197196
logProgress("updating tlmgr");
198197
}
199198
await pkgMgr.updatePackages(false, true);
200-
tlmgrUpdated = true;
201199
info("");
202200

203201
if (!quiet) {
@@ -208,23 +206,6 @@ async function initialCompileLatex(
208206
}
209207

210208
const logText = Deno.readTextFileSync(response.log);
211-
// See if tlmgr just needs to be updated
212-
// https://github.com/rstudio/tinytex/commit/5946a2a1bf3c6ecefbd1213178a4e473ff4c26dc
213-
// https://github.com/quarto-dev/quarto-cli/issues/7087
214-
if (logText.match(/.* Loading '([^']+)' aborted!/)) {
215-
if (!tlmgrUpdated) {
216-
continue;
217-
} else {
218-
// We've already tried updating, just need to throw and die
219-
// We failed to install packages (but there are missing packages), give up
220-
displayError(
221-
"tlmgr needs to be updated, but the update failed",
222-
response.log,
223-
response.result,
224-
);
225-
return Promise.reject();
226-
}
227-
}
228209

229210
// Try to find and install packages
230211
const packagesInstalled = await findAndInstallPackages(

src/command/render/latexmk/texlive.ts

Lines changed: 43 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,28 @@ async function installPackage(
225225
opts?: string[],
226226
quiet?: boolean,
227227
) {
228+
// if any packages have been installed already, update packages first
229+
let isInstalled = await verifyPackageInstalled(pkg, context);
230+
if (isInstalled) {
231+
// update tlmgr itself
232+
const updateResult = await updatePackages(
233+
true,
234+
true,
235+
context,
236+
opts,
237+
quiet,
238+
);
239+
if (updateResult.code !== 0) {
240+
return Promise.reject();
241+
}
242+
243+
// Rebuild format tree
244+
const fmtutilResult = await fmtutilCommand(context);
245+
if (fmtutilResult.code !== 0) {
246+
return Promise.reject();
247+
}
248+
}
249+
228250
// Run the install command
229251
let installResult = await tlmgrCommand(
230252
"install",
@@ -240,8 +262,8 @@ async function installPackage(
240262
);
241263
}
242264

243-
// Check whether we should update and retry the install
244-
const isInstalled = await verifyPackageInstalled(pkg, context);
265+
// Check whether we should update again and retry the install
266+
isInstalled = await verifyPackageInstalled(pkg, context);
245267
if (!isInstalled) {
246268
// update tlmgr itself
247269
const updateResult = await updatePackages(
@@ -255,6 +277,12 @@ async function installPackage(
255277
return Promise.reject();
256278
}
257279

280+
// Rebuild format tree
281+
const fmtutilResult = await fmtutilCommand(context);
282+
if (fmtutilResult.code !== 0) {
283+
return Promise.reject();
284+
}
285+
258286
// Rerun the install command
259287
installResult = await tlmgrCommand(
260288
"install",
@@ -417,3 +445,16 @@ function tlmgrCommand(
417445
return execTlmgr([tlmgr.fullPath, tlmgrCmd, ...args]);
418446
}
419447
}
448+
449+
// Execute fmtutil
450+
// https://tug.org/texlive/doc/fmtutil.html
451+
function fmtutilCommand(context: TexLiveContext) {
452+
const fmtutil = texLiveCmd("fmtutil-sys", context);
453+
return execProcess(
454+
{
455+
cmd: [fmtutil.fullPath, "--all"],
456+
stdout: "piped",
457+
stderr: "piped",
458+
},
459+
);
460+
}

src/command/render/pandoc.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -960,7 +960,7 @@ export async function runPandoc(
960960
);
961961
});
962962

963-
// Ensure that citationMetadat is expanded into
963+
// Ensure that citationMetadata is expanded into
964964
// and object for downstream use
965965
if (
966966
typeof (pandocMetadata[kCitation]) === "boolean" &&

src/command/render/project.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,8 @@ export async function renderProject(
173173
// if there is an output dir then remove it if clean is specified
174174
if (
175175
renderAll && hasProjectOutputDir(context) &&
176-
(options.flags?.clean == true) && (projType.cleanOutputDir === true)
176+
(options.forceClean ||
177+
(options.flags?.clean == true) && (projType.cleanOutputDir === true))
177178
) {
178179
// ouptut dir
179180
const realProjectDir = normalizePath(context.dir);

0 commit comments

Comments
 (0)