[rebber] Caption of code (and image) needs protection for comma and square brackets.
See original GitHub issueA (not so) funny unexpected issue arise when there is a comma in the legend of codes.
If #275 is fixed, then the following code
```c
int main() {
return 0;
}
```
Code: un truc, comme ça
Generates
\begin{CodeBlock}[un truc, comme ça]{c}
int main() {
return 0;
}
\end{CodeBlock}
while, to avoid issue, it should generates a “protection” for any comma in the caption:
\begin{CodeBlock}[un truc\protect{,} comme ça]{c}
int main() {
return 0;
}
\end{CodeBlock}
… Otherwise LaTeX thinks it is another option, and fails. It is normally limited to code captions (not table and figures, normally), but if it is easier for you, \protect{,}
is harmless, so it would work in any caption.
Issue Analytics
- State:
- Created 5 years ago
- Comments:11 (11 by maintainers)
Top Results From Across the Web
How do I remove the commas, quotes, and parentheses from ...
Right now, my Python 3 code takes data from a CSV file, stores the data as a list, creates permutations of that data,...
Read more >How to Use Brackets in Academic Writing: Some Common Rules
Enclose “sic” (loosely meaning, “as written”) in square brackets to indicate that the quote is exactly as is in the original, even if...
Read more >Style Manual (Updated 2022) - Oregon Judicial Department
B. Identifying Caption of the Appellate Court Issuing the Opinion . ... [No comma in original; brackets not needed, because comma is part...
Read more >8 Comma Rules - EnglishForEveryone.org
8 Comma Rules. (Practice Quiz). Directions: Add commas to the following sentences where needed. Section 1: Lists of three or more.
Read more >sec_E_SB_ELA_G8.pdf - TN.gov
SpringBoard English Language Arts provides you with the support you need ... Caption—box that provides background information about the scene or character.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Quotation
works differently (like the attention or info box, actually), and do not use a floating environment (thus no\captionof
). We could do it, though, but would it make sense to give a caption to a quotation ? (especially since it would render like “Quotation 26 – The author of that quotation”).Deployed.