Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions news/changelog-1.9.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ All changes included in 1.9:

- ([#10291](https://github.com/quarto-dev/quarto-cli/issues/10291)): Fix detection of babel hyphenation warnings with straight-quote format instead of backtick-quote format.
- ([rstudio/tinytex-releases#49](https://github.com/rstudio/tinytex-releases/issues/49)): Fix detection of LuaTeX-ja missing file errors by matching both "File" and "file" in error messages.
- ([#13667](https://github.com/quarto-dev/quarto-cli/issues/13667)): Fix LaTeX compilation error with Python error output containing caret characters.

## Projects

Expand Down
2 changes: 1 addition & 1 deletion src/resources/filters/quarto-post/latex.lua
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,7 @@ function render_latex_fixups()

-- obtained by a local call to uuid and removing dashes
local uuid = "edbdf4a3bc424f5b8ac0e95c92ef5015"
return line:gsub("[\\]", uuid):gsub("([{}$%&%_])", "\\%1"):gsub("[%^]", "\\textasciicaret{}"):gsub("[~]", "\\textasciitilde{}"):gsub(uuid, "\\textbackslash{}")
return line:gsub("[\\]", uuid):gsub("([{}$%&%_])", "\\%1"):gsub("[%^]", "\\textasciicircum{}"):gsub("[~]", "\\textasciitilde{}"):gsub(uuid, "\\textbackslash{}")
end
if code.text:match("\027%[[0-9;]+m") and #code.classes == 0 then
local lines = split(code.text, "\n")
Expand Down
33 changes: 33 additions & 0 deletions tests/docs/smoke-all/2025/11/12/issue-13667.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
title: "Python syntax error with caret (#13667)"
format: pdf
keep-tex: true
_quarto:
tests:
pdf:
ensureLatexFileRegexMatches:
- ['\\textasciicircum\{\}']
- ['\\textasciicaret\{\}']
---

::: {.cell execution_count=1}
``` {.python .cell-code}
def my_func(a=10, b):
print(a)
print(b)

my_func(5)
```

::: {.cell-output .cell-output-error}
```
SyntaxError: parameter without a default follows parameter with a default (1331601683.py, line 1)
Cell In[2], line 1
 def my_func(a=10, b):
^
SyntaxError: parameter without a default follows parameter with a default
```
:::
:::


Loading