I try to get swiss quotation marks («text») in a markdown (quarto) document.
My _quarto.yml looks like that:
project:
title: "quotes"
book:
chapters:
- index.qmd
format:
html:
lang: de-CH
css: style.css
The styles.css like that:
html[lang="de-CH"] q {
quotes: '«' '»' '‹' '›';
}
The index.qmd looks like this:
# Quotation Test
"Quotation please!"
But after rendering it looks always like this
I have tried it with:
only: q {quotes: '«' '»' '‹' '›';}
in the styles.css,
lang: with and without quotes in the yaml,
and using only de instead of de-CH
I always get the english quotation marks.
Here is a way using pandoc lua filter for quotations. The raw code for the filter can be found here (you have to copy that code into a newly created file in your project called pandoc-quotation.lua).
---
format: html
filters: [pandoc-quotation.lua]
quot-lang: de-CH
---
# Quotation Test
"Quotation please!"
'Small quotation please!'
A full list of potential quotations:
ar = {'”', '“', '’', '‘' },
bs = {'”', '”', '’', '’' },
bo = {'「', '」', '『', '』' },
bs = {'”', '”', '’', '’' },
cn = {'「', '」', '『', '』' },
cs = {'„', '“', '‚', '‘' },
cy = {'‘', '’', '“', '”' },
da = {'»', '«', '›', '‹' },
de = {'„', '“', '‚', '‘' },
['de-CH'] = {'«', '»', '‹', '›' },
el = {'«', '»', '“', '”' },
en = {'“', '”', '‘', '’' },
['en-US'] = {'“', '”', '‘', '’' },
['en-GB'] = {'‘', '’', '“', '”' },
['en-UK'] = {'‘', '’', '“', '”' },
['en-CA'] = {'“', '”', '‘', '’' },
eo = {'“', '”', '‘', '’' },
es = {'«', '»', '“', '”' },
et = {'„', '“', '‚', '‘' },
fi = {'”', '”', '’', '’' },
fil = {'“', '”', '‘', '’' },
fa = {'«', '»', '‹', '›' },
fr = {'«', '»', '‹', '›' },
ga = {'“', '”', '‘', '’' },
gd = {'‘', '’', '“', '”' },
gl = {'«', '»', '‹', '›' },
he = {'“', '”', '‘', '’' },
hi = {'“', '”', '‘', '’' },
hu = {'„', '”', '»', '«' },
hr = {'„', '“', '‚', '‘' },
ia = {'“', '”', '‘', '’' },
id = {'“', '”', '‘', '’' },
is = {'„', '“', '‚', '‘' },
it = {'«', '»', '“', '”' },
['it-CH'] = {'«', '»', '‹', '›' },
ja = {'「', '」', '『', '』' },
jbo = {'lu', 'li\'u', 'lu', 'li\'u'},
ka = {'„', '“', '‚', '‘' },
khb = {'《', '》', '〈', '〉' },
kk = {'«', '»', '‹', '›' },
km = {'«', '»', '‹', '›' },
ko = {'《', '》', '〈', '〉' },
['ko-KR'] = {'“', '”', '‘', '’' },
lt = {'„', '“', '‚', '‘' },
lv = {'„', '“', '‚', '‘' },
lo = {'«', '»', '‹', '›' },
nl = {'„', '”', '‚', '’' },
mk = {'„', '“', '’', '‘' },
mn = {'«', '»', '‹', '›' },
mt = {'“', '”', '‘', '’' },
no = {'«', '»', '«', '»' },
pl = {'„', '”', '»', '«' },
ps = {'«', '»', '‹', '›' },
pt = {'«', '»', '“', '”' },
['pt-BR'] = {'“', '”', '‘', '’' },
rm = {'«', '»', '‹', '›' },
ro = {'„', '”', '«', '»' },
ru = {'«', '»', '“', '”' },
sk = {'„', '“', '‚', '‘' },
sl = {'„', '“', '‚', '‘' },
sq = {'„', '“', '‚', '‘' },
sr = {'„', '“', '’', '’' },
sv = {'”', '”', '’', '’' },
tdd = {'「', '」', '『', '』' },
ti = {'«', '»', '‹', '›' },
th = {'“', '”', '‘', '’' },
thi = {'「', '」', '『', '』' },
tr = {'«', '»', '‹', '›' },
ug = {'«', '»', '‹', '›' },
uk = {'«', '»', '„', '“' },
uz = {'«', '»', '„', '“' },
vi = {'“', '”', '‘', '’' },
wen = {'„', '“', '‚', '‘' },
ka = {'„', '“', '‚', '‘' },
khb = {'《', '》', '〈', '〉' },
kk = {'«', '»', '‹', '›' },
km = {'«', '»', '‹', '›' },
ko = {'《', '》', '〈', '〉' },
['ko-KR'] = {'“', '”', '‘', '’' },
lt = {'„', '“', '‚', '‘' },
lv = {'„', '“', '‚', '‘' },
lo = {'«', '»', '‹', '›' },
nl = {'„', '”', '‚', '’' },
mk = {'„', '“', '’', '‘' },
mn = {'«', '»', '‹', '›' },
mt = {'“', '”', '‘', '’' },
no = {'«', '»', '«', '»' },
pl = {'„', '”', '»', '«' },
ps = {'«', '»', '‹', '›' },
pt = {'«', '»', '“', '”' },
['pt-BR'] = {'“', '”', '‘', '’' },
rm = {'«', '»', '‹', '›' },
ro = {'„', '”', '«', '»' },
ru = {'«', '»', '“', '”' },
sk = {'„', '“', '‚', '‘' },
sl = {'„', '“', '‚', '‘' },
sq = {'„', '“', '‚', '‘' },
sr = {'„', '“', '’', '’' },
sv = {'”', '”', '’', '’' },
tdd = {'「', '」', '『', '』' },
ti = {'«', '»', '‹', '›' },
th = {'“', '”', '‘', '’' },
thi = {'「', '」', '『', '』' },
tr = {'«', '»', '‹', '›' },
ug = {'«', '»', '‹', '›' },
uk = {'«', '»', '„', '“' },
uz = {'«', '»', '„', '“' },
vi = {'“', '”', '‘', '’' },
wen = {'„', '“', '‚', '‘' }