-
Notifications
You must be signed in to change notification settings - Fork 390
fixup regression regarding longtable handling (and some tests fixes) #9925
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
854462a
fixup regression following lua regex change
cderv 49dc500
Test about longtable when no crossref
cderv 6b7fe9b
[test] error if we use an unknown verify function in one of the smoke…
cderv 3d19cd7
test - Add a verify function adapted to test latex file while renderi…
cderv 78bfa7a
test - Add a reminder to use keep-* when verify function requires them
cderv f893a28
test - correctly verify functions when test spec is an object
cderv 41a8eab
test - typo in check function
cderv 6b282e1
test - check for keep-* under the format name
cderv 066d6b9
test - Correct verify function
cderv 56c60e6
test - set keep-typ: true as ensureTypstFileRegexMatches is used
cderv 3843813
test - typo in another verify function in test spec
cderv eed9459
this test had no valid verify function
cderv 081c2b9
Add input name to error message
cderv d4abb1f
Also show format in error
cderv 1293b9c
Fix some problems in feature format doc having tests
cderv File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,7 +10,7 @@ format: | |
| dashboard: | ||
| quality: 1 | ||
| typst: | ||
| output-ext: typ | ||
| keep-typ: true | ||
| quality: 2 | ||
| revealjs: | ||
| quality: 1 | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,7 +4,7 @@ format: latex | |
| _quarto: | ||
| tests: | ||
| latex: | ||
| verifyNoErrors: true | ||
| noErrors: true | ||
| --- | ||
|
|
||
| :::{#fig-1} | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
tests/docs/smoke-all/crossrefs/float/latex/latex-longtable-fixup-caption-no-crossref.qmd
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| --- | ||
| format: pdf | ||
| keep-tex: true | ||
| title: "Long Table kable fixups etc" | ||
| _quarto: | ||
| tests: | ||
| pdf: | ||
| ensureLatexFileRegexMatches: | ||
| - ['\\begin\{longtable\}'] | ||
| - [] | ||
| --- | ||
|
|
||
| ## Raw longtable table with no crossref and caption from kable function | ||
|
|
||
| In this case we'll issue a warning about of the type | ||
| ```` | ||
| Raw LaTeX table found with non-tbl label: tab:not-tbl | ||
| Won't be able to cross-reference this table using Quarto's native crossref system. | ||
| ```` | ||
| ```{r} | ||
| #| label: not-tbl | ||
| #| echo: false | ||
| df <- tibble::tibble( | ||
| x = 1:20, | ||
| y = rnorm(20), | ||
| z = rnorm(20) | ||
| ) | ||
| knitr::kable(df, | ||
| format = "latex", | ||
| longtable = TRUE, | ||
| booktabs = TRUE, | ||
| caption = "A long table with a caption") | ||
| ``` |
29 changes: 29 additions & 0 deletions
29
tests/docs/smoke-all/crossrefs/float/latex/latex-longtable-fixup-no-cap-no-crossref.qmd
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| --- | ||
| format: pdf | ||
| keep-tex: true | ||
| title: "Long Table kable fixups etc" | ||
| _quarto: | ||
| tests: | ||
| pdf: | ||
| ensureLatexFileRegexMatches: | ||
| - ['\\begin\{longtable\*\}'] | ||
| - ['\\begin\{longtable\}'] | ||
| --- | ||
|
|
||
| ## Raw longtable table with no crossref and no caption | ||
|
|
||
| In this case, Quarto will transform to longtable* | ||
|
|
||
| ```{r} | ||
| #| echo: false | ||
| df <- tibble::tibble( | ||
| x = 1:20, | ||
| y = rnorm(20), | ||
| z = rnorm(20) | ||
| ) | ||
| knitr::kable(df, | ||
| format = "latex", | ||
| longtable = TRUE, | ||
| booktabs = TRUE) | ||
| ``` | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| --- | ||
| format: | ||
| typst: | ||
| output-ext: typ | ||
| keep-typ: true | ||
| _quarto: | ||
| tests: | ||
| html: | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| --- | ||
| format: | ||
| typst: | ||
| output-ext: typ | ||
| keep-typ: true | ||
| _quarto: | ||
| tests: | ||
| html: | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| --- | ||
| format: | ||
| typst: | ||
| output-ext: typ | ||
| keep-typ: true | ||
| _quarto: | ||
| tests: | ||
| html: | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a head up that fixing this is breaking the feature format matrix test
https://github.com/quarto-dev/quarto-cli/actions/runs/9423620780/job/25962387025#step:26:214
So I don't know if revealjs is just not well supported here, or something else but this is probably to fix in another issue.
This PR just surfaced it as previously there was no test, and it was silently not testing