How to change 'solution' title and prefix? #10020
Replies: 2 comments 1 reply
-
Indeed, there's no equivalent and not only for "solution". ---
title: Exemplo
author: Jander
lang: pt-BR
language:
crossref-exr-title: "Problemaaaa"
environment-solution-title: "Resposta"
---
# Problemas
::: {#exr-1}
Um problema qualquer.
Veja @sol-1.
:::
# Respostas
::: {#sol-1}
Uma resposta.
Veja @exr-1.
::: cc @cscheid From what I've seen, solution/remark (and proof) were special environments, but the documentation currently implies that they are of the same kind as the others: https://quarto.org/docs/authoring/cross-references.html#theorems-and-proofs |
Beta Was this translation helpful? Give feedback.
-
For now, my workaround is a filter for local function starts_with(text, subtext)
return string.sub(text, 1, #subtext) == subtext
end
function Cite(cite)
if starts_with(cite.citations[1].id, "rem") then
cite.citations[1].prefix = pandoc.Str("Comentário") -- remark
elseif starts_with(cite.citations[1].id, "sol") then
cite.citations[1].prefix = pandoc.Str("Resposta") -- solution
end
return cite
end |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Description
I want to use
#exr-...
div
s to present problems to students, as well as#sol-...
to provide answers.The text is in Portuguese and here is a MWE:
A first issue is that
#sol-...
labels create "Solução 1", but@sol-...
remains "Solution" (in English).I actually want to change both title and prefix for solutions to "Resposta" (a better word in Portuguese for my case).
I can use
exr-title
andexr-prefix
to change exercices to problems (problemas), but there's nosol-title
norsol-prefix
to adjust solutions.Quarto's crossref options page shows the available translation options, but solutions aren't there. (Curiously, proof is not there either...)
Is there a way to correct this or should I consider writing a filter?
Quarto
Beta Was this translation helpful? Give feedback.
All reactions