Giter Site home page Giter Site logo

csquotes's People

Contributors

abdulkerimgok avatar cmplstofb avatar ivankokan avatar josephwright avatar jspitz avatar junoslukan avatar kristiank avatar mafsi avatar michal-h21 avatar moewew avatar rxw1 avatar vvavrychuk avatar wehro avatar wilx avatar wojciechbielecki avatar xurxodiz avatar yjhn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

csquotes's Issues

csquotes incompatibility with phase-II and phase-III

I've also posted the issue here: latex3/tagging-project#3

I am using TeX Live 2023 (packages updates are frozen to March 2023).

I cannot compile a document that loads csquotes if I set testphase=phase-II or testphase=phase-III in \DocumentMetadata{}

I am compiling the following MWE twice with lualatex --synctex=1 --interaction=nonstopmode --file-line-error csquotes.tex:

\DocumentMetadata{
 % does not work
 %testphase=phase-III,
 testphase=phase-II,
 % works
 %testphase=phase-I,
 pdfversion=2.0,
 pdfstandard=A-4
}

\documentclass[a4paper,10pt]{article}

\usepackage{csquotes}

\begin{document}

\section{First section}
Section text

\blockquote{Random sentence}

\end{document}

Output for phase-II:

This is LuaHBTeX, Version 1.17.0 (TeX Live 2023/Arch Linux) 
 restricted system commands enabled.
(./csquotes.tex
LaTeX2e <2022-11-01> patch level 1
 L3 programming layer <2023-02-22>
(/usr/share/texmf-dist/tex/latex/latex-lab/documentmetadata-support.ltx
(/usr/share/texmf-dist/tex/latex/pdfmanagement-testphase/pdfmanagement-testphas
e.sty (/usr/share/texmf-dist/tex/latex/tagpdf/tagpdf-base.sty)
(/usr/share/texmf-dist/tex/latex/pdfmanagement-testphase/pdfmanagement-testphas
e.ltx (/usr/share/texmf-dist/tex/latex/l3experimental/l3bitset/l3bitset.sty))))
 (/usr/share/texmf-dist/tex/latex/l3backend/l3backend-luatex.def)
(/usr/share/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-lu
atex.def (/usr/share/texmf-dist/tex/latex/pdfmanagement-testphase/l3ref-tmp.sty
)) (/usr/share/texmf-dist/tex/latex/latex-lab/phase-II-latex-lab-testphase.ltx
(/usr/share/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-new-or.sty
(/usr/share/texmf-dist/tex/latex/latex-lab/latex-lab-footnotes.ltx))
(/usr/share/texmf-dist/tex/latex/tagpdf/tagpdf.sty
(/usr/share/texmf-dist/tex/latex/tagpdf/tagpdf-luatex.def)
(/usr/share/texmf-dist/tex/latex/tagpdf/tagpdf-mc-code-lua.sty)))
(/usr/share/texmf-dist/tex/latex/pdfmanagement-testphase/pdfmanagement-firstaid
.sty) (/usr/share/texmf-dist/tex/latex/base/article.cls
Document Class: article 2022/07/02 v1.4n Standard LaTeX document class
(/usr/share/texmf-dist/tex/latex/base/size10.clo))
(/usr/share/texmf-dist/tex/latex/csquotes/csquotes.sty
(/usr/share/texmf-dist/tex/latex/etoolbox/etoolbox.sty)
(/usr/share/texmf-dist/tex/latex/graphics/keyval.sty)
(/usr/share/texmf-dist/tex/latex/csquotes/csquotes.def)
(/usr/share/texmf-dist/tex/latex/csquotes/csquotes.cfg))
(/usr/share/texmf-dist/tex/latex/pdfmanagement-testphase/output-patches-tmp-ltx
.sty
Patching header in \@outputpage
Patching footer in \@outputpage
)
No file csquotes.aux.
(/usr/share/texmf-dist/tex/latex/base/ts1cmr.fd)<<sRGB.icc>>

./csquotes.tex:20: LaTeX Error: Control sequence \g__tag_struct_6_prop already 
defined.

For immediate help type H <return>.
 ...                                              
                                                  
l.20 \blockquote{Random sentence}
                               

./csquotes.tex:20: LaTeX Error: Control sequence \__tag_struct_output_prop_6:n 
already defined.

For immediate help type H <return>.
 ...                                              
                                                  
l.20 \blockquote{Random sentence}
                               

./csquotes.tex:20: LaTeX Error: Control sequence \g__tag_struct_kids_6_seq alre
ady defined.

For immediate help type H <return>.
 ...                                              
                                                  
l.20 \blockquote{Random sentence}
                               

./csquotes.tex:20: LaTeX Error: Control sequence \c__pdf_object___tag/struct/6_
int already
(LaTeX)        defined.

For immediate help type H <return>.
 ...                                              
                                                  
l.20 \blockquote{Random sentence}
                               

./csquotes.tex:20: LaTeX Error: Control sequence \c__pdf_backend_object___tag/s
truct/6_int
(LaTeX)        already defined.

For immediate help type H <return>.
 ...                                              
                                                  
l.20 \blockquote{Random sentence}
                               

./csquotes.tex:20: LaTeX Error: Control sequence \g__tag_struct_7_prop already 
defined.

For immediate help type H <return>.
 ...                                              
                                                  
l.20 \blockquote{Random sentence}
                               

./csquotes.tex:20: LaTeX Error: Control sequence \__tag_struct_output_prop_7:n 
already defined.

For immediate help type H <return>.
 ...                                              
                                                  
l.20 \blockquote{Random sentence}
                               

./csquotes.tex:20: LaTeX Error: Control sequence \g__tag_struct_kids_7_seq alre
ady defined.

For immediate help type H <return>.
 ...                                              
                                                  
l.20 \blockquote{Random sentence}
                               

./csquotes.tex:20: LaTeX Error: Control sequence \c__pdf_object___tag/struct/7_
int already
(LaTeX)        defined.

For immediate help type H <return>.
 ...                                              
                                                  
l.20 \blockquote{Random sentence}
                               

./csquotes.tex:20: LaTeX Error: Control sequence \c__pdf_backend_object___tag/s
truct/7_int
(LaTeX)        already defined.

For immediate help type H <return>.
 ...                                              
                                                  
l.20 \blockquote{Random sentence}
                               
[1{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}] (./csquotes.aux))
(see the transcript file for additional information)
 422 words of node memory still in use:
   3 hlist, 1 vlist, 1 rule, 2 glue, 3 kern, 2 glyph, 5 attribute, 49 glue_spec
, 5 attribute_list, 1 write nodes
   avail lists: 1:1,2:106,3:54,4:6,5:23,6:6,7:170,9:32,11:8
</usr/share/texmf-dist/fonts/opentype/public/lm/lmroman10-regular.otf></usr/sha
re/texmf-dist/fonts/opentype/public/lm/lmroman12-bold.otf>
Output written on csquotes.pdf (1 page, 24727 bytes).
SyncTeX written on csquotes.synctex.gz.
Transcript written on csquotes.log.

Output for phase-III:

This is LuaHBTeX, Version 1.17.0 (TeX Live 2023/Arch Linux) 
 restricted system commands enabled.
(./csquotes.tex
LaTeX2e <2022-11-01> patch level 1
 L3 programming layer <2023-02-22>
(/usr/share/texmf-dist/tex/latex/latex-lab/documentmetadata-support.ltx
(/usr/share/texmf-dist/tex/latex/pdfmanagement-testphase/pdfmanagement-testphas
e.sty (/usr/share/texmf-dist/tex/latex/tagpdf/tagpdf-base.sty)
(/usr/share/texmf-dist/tex/latex/pdfmanagement-testphase/pdfmanagement-testphas
e.ltx (/usr/share/texmf-dist/tex/latex/l3experimental/l3bitset/l3bitset.sty))))
 (/usr/share/texmf-dist/tex/latex/l3backend/l3backend-luatex.def)
(/usr/share/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-lu
atex.def (/usr/share/texmf-dist/tex/latex/pdfmanagement-testphase/l3ref-tmp.sty
))
(/usr/share/texmf-dist/tex/latex-dev/latex-lab/phase-III-latex-lab-testphase.lt
x (/usr/share/texmf-dist/tex/latex/latex-lab/phase-II-latex-lab-testphase.ltx
(/usr/share/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-new-or.sty
(/usr/share/texmf-dist/tex/latex/latex-lab/latex-lab-footnotes.ltx))
(/usr/share/texmf-dist/tex/latex/tagpdf/tagpdf.sty
(/usr/share/texmf-dist/tex/latex/tagpdf/tagpdf-luatex.def)
(/usr/share/texmf-dist/tex/latex/tagpdf/tagpdf-mc-code-lua.sty)))
(/usr/share/texmf-dist/tex/latex-dev/latex-lab/latex-lab-testphase-block-taggin
g.sty (/usr/share/texmf-dist/tex/latex/l3packages/xtemplate/xtemplate.sty
(/usr/share/texmf-dist/tex/latex/l3kernel/expl3.sty))
(/usr/share/texmf-dist/tex/latex-dev/latex-lab/latex-lab-kernel-changes.sty
(/usr/share/texmf-dist/tex/generic/pdftex/glyphtounicode.tex)
(/usr/share/texmf-dist/tex/latex-dev/latex-lab/glyphtounicode-cmex.tex)))
(/usr/share/texmf-dist/tex/latex-dev/latex-lab/latex-lab-testphase-sec-tagging.
sty)
(/usr/share/texmf-dist/tex/latex-dev/latex-lab/latex-lab-testphase-toc-tagging.
sty))
(/usr/share/texmf-dist/tex/latex/pdfmanagement-testphase/pdfmanagement-firstaid
.sty) (/usr/share/texmf-dist/tex/latex/base/article.cls
Document Class: article 2022/07/02 v1.4n Standard LaTeX document class
(/usr/share/texmf-dist/tex/latex/base/size10.clo))
(/usr/share/texmf-dist/tex/latex/csquotes/csquotes.sty
(/usr/share/texmf-dist/tex/latex/etoolbox/etoolbox.sty)
(/usr/share/texmf-dist/tex/latex/graphics/keyval.sty)
(/usr/share/texmf-dist/tex/latex/csquotes/csquotes.def)
(/usr/share/texmf-dist/tex/latex/csquotes/csquotes.cfg))
(/usr/share/texmf-dist/tex/latex/pdfmanagement-testphase/output-patches-tmp-ltx
.sty
Patching header in \@outputpage
Patching footer in \@outputpage
)
No file csquotes.aux.
(/usr/share/texmf-dist/tex/latex/base/ts1cmr.fd)<<sRGB.icc>>

./csquotes.tex:20: LaTeX Error: Control sequence \g__tag_struct_7_prop already 
defined.

For immediate help type H <return>.
 ...                                              
                                                  
l.20 \blockquote{Random sentence}
                               

./csquotes.tex:20: LaTeX Error: Control sequence \__tag_struct_output_prop_7:n 
already defined.

For immediate help type H <return>.
 ...                                              
                                                  
l.20 \blockquote{Random sentence}
                               

./csquotes.tex:20: LaTeX Error: Control sequence \g__tag_struct_kids_7_seq alre
ady defined.

For immediate help type H <return>.
 ...                                              
                                                  
l.20 \blockquote{Random sentence}
                               

./csquotes.tex:20: LaTeX Error: Control sequence \c__pdf_object___tag/struct/7_
int already
(LaTeX)        defined.

For immediate help type H <return>.
 ...                                              
                                                  
l.20 \blockquote{Random sentence}
                               

./csquotes.tex:20: LaTeX Error: Control sequence \c__pdf_backend_object___tag/s
truct/7_int
(LaTeX)        already defined.

For immediate help type H <return>.
 ...                                              
                                                  
l.20 \blockquote{Random sentence}
                               

./csquotes.tex:20: LaTeX Error: Control sequence \g__tag_struct_8_prop already 
defined.

For immediate help type H <return>.
 ...                                              
                                                  
l.20 \blockquote{Random sentence}
                               

./csquotes.tex:20: LaTeX Error: Control sequence \__tag_struct_output_prop_8:n 
already defined.

For immediate help type H <return>.
 ...                                              
                                                  
l.20 \blockquote{Random sentence}
                               

./csquotes.tex:20: LaTeX Error: Control sequence \g__tag_struct_kids_8_seq alre
ady defined.

For immediate help type H <return>.
 ...                                              
                                                  
l.20 \blockquote{Random sentence}
                               

./csquotes.tex:20: LaTeX Error: Control sequence \c__pdf_object___tag/struct/8_
int already
(LaTeX)        defined.

For immediate help type H <return>.
 ...                                              
                                                  
l.20 \blockquote{Random sentence}
                               

./csquotes.tex:20: LaTeX Error: Control sequence \c__pdf_backend_object___tag/s
truct/8_int
(LaTeX)        already defined.

For immediate help type H <return>.
 ...                                              
                                                  
l.20 \blockquote{Random sentence}
                               
[1{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}] (./csquotes.aux))
(see the transcript file for additional information)
 437 words of node memory still in use:
   3 hlist, 1 vlist, 1 rule, 2 glue, 3 kern, 2 glyph, 5 attribute, 52 glue_spec
, 5 attribute_list, 1 write nodes
   avail lists: 1:1,2:122,3:58,4:6,5:89,6:6,7:172,9:36,11:8
</usr/share/texmf-dist/fonts/opentype/public/lm/lmroman10-regular.otf></usr/sha
re/texmf-dist/fonts/opentype/public/lm/lmroman12-bold.otf>
Output written on csquotes.pdf (1 page, 25198 bytes).
SyncTeX written on csquotes.synctex.gz.
Transcript written on csquotes.log.

\hyphenquote gives undefined error

MWE:

\documentclass{article}
\usepackage[english]{babel}
\usepackage[english=american]{csquotes}
\begin{document}
\hyphenquote{english}{test}
\end{document}

Error:

! Undefined control sequence.
\edef \csq@mainlang {\langname
}
l.5 \hyphenquote{english}{test}

File versions:

File List
article.cls 2019/10/25 v1.4k Standard LaTeX document class
size10.clo 2019/10/25 v1.4k Standard LaTeX file (size option)
babel.sty 2019/11/14 3.36 The Babel package
english.ldf 2017/06/06 v3.3r English support from the babel system
csquotes.sty 2019-11-14 v5.2g context-sensitive quotations (JAW)
etoolbox.sty 2019/09/21 v2.5h e-TeX tools for LaTeX (JAW)
keyval.sty 2014/10/28 v1.15 key=value parser (DPC)
csquotes.def 2019-11-14 v5.2g csquotes generic definitions (JAW)
csquotes.cfg

System: TUG TeXLive 2019, fully up to date (as per tlmgr)

UKenglish or USenglish and \foreign* environments

csquotes lowercases all language names in \csq@lang etc. with the rationale "workaround for page headers of book.cls et al." (see comment in csquotes.sty). This results in language names that have uppercase letters (UKenglish and USenglish) not being detected (the lowercase variants, ukenglish and usenglish, are unknown to babel).

I think this is not a big issue, since people can use british and american instead, but it should be documented.

Need the comma after the quoted title in Greek

As I have posted in josephwright/biblatex-ieee#20, I am using biblatex-ieee and polyglossia for writing my thesis in Greek and have references appearing like this

[63] P. R. Wilson, M. S. Johnstone, M. Neely και D. Boles, «Dynamic Storage Allocation: A Survey and Critical Review,» στο IWMM, 1995, σσ. 1–116.

I have the impression that in Greek it is more preferred to have the comma after the quotes, e.g., «Dynamic Storage Allocation: A Survey and Critical Review»,. Would this be possible via csquotes?

Undefined control sequence \langname

Since the last update, the following will yield the above error:

\documentclass{article}
\usepackage[german,british]{babel}
\usepackage[babel]{csquotes}
\begin{document}
\foreignquote{german}{Das Zitat}
\end{document}

because in this definition \langname should be \languagename I guess -:

\def\csq@savelang{%
  \ifdef\csq@mainlang
    {}
    {\ifdef\babelname
       {\edef\csq@mainlang{\babelname}}
       {\edef\csq@mainlang{\langname}}}}

MakeOuterQuote seems to be ignored

\documentclass{article}

\usepackage{polyglossia}
\setmainlanguage{russian}
\setotherlanguage{english}
\defaultfontfeatures{Ligatures=TeX}

\setmainfont{Liberation Serif}
\setsansfont{Liberation Sans}
\setmonofont{Liberation Mono}

\usepackage{csquotes}
	\MakeOuterQuote{"}

\begin{document}

\enquote{в кавычках}% line 1

"ещё в кавычках"% line 2

\end{document}

Line 1 produces expected results; line 2 outputs two ". If I change the style (ex. using the style option for package) it correctly changes line 1 but still ignores line 2.

Polyglossia 2020/04/08 v1.49
Csquotes 2019-12-06 v5.2j

Log file attached.
debug.log

Ignore leading and trailing spaces

Consider

I quote: \textcquote{some-source}{%
  this is a quote.
}

This code will produce a small space before the closing quote. It would be nice if the commands ignored trailing spaces. (And leading spaces too, so that the % at the opening bracket can be dropped. However, as footnotes have the same behaviour, this is less important; but, for footnotes that trailing space is invisible.)

I like the above coding style since it makes the code more readable. However, it requires adding those comments to give the expected result, which is sort of taking one step back again.

Tested on version 5.2c.

Support [sic] for typographical/spelling errors

I have a small feature request for csquotes: It would be great if we could have a auxiliary command for [sic] see [1] for marking typographical errors in quotations.

It may be international, but may also be localized via babel, so IMHO it is useful to add.

We already have \textelp and \textins and IMHO they would fall in the same category and make this package very useful.


I already submitted this via mail and received a reply, but I still think it is a useful addition or at least useful to discuss with the community.

Babel-french’s "og=«, fg=»" creates wrong space for "«" in bibliography

Hello,

It seems this configuration (MWE) :

\documentclass{article}
\usepackage[main=french]{babel}
\frenchsetup{og=«, fg=»} % Remove these options then no problem!
\usepackage[autostyle]{csquotes}
\begin{document}
This « kind » of space. % Good

This «kind» of space. % Good

This \enquote{kind} of space. % Bad
\end{document}

creates a wrong (longer) space, like This «  kind » of space .

It is explained in the French version of Babel-french manual; I added myself the last sentence to the shorter English one (link):

og=«, fg=»; when guillemets characters are available on the keyboard (through a compose key for instance), it is nice to use them instead of typing \og and \fg. This option tells babel-french which characters are opening and closing French guillemets (they depend on the input encoding), then you can type either « guillemets » or «guillemets» (with or without spaces) to get properly typeset French quotes. On the other hand, if you enable this option, you should not explicitly code unbreakable spaces: «~quotes~» would produce «  quotes » where the space following the opening quote is too large.

It seems we are exactly in the described case.

If I remove the og=«, fg=» options, it works well, but I enable it because I have the characters directly on my keyboard (as well as thin and non-breaking spaces).

Don’t hesitate to tell me if it is already known and that I missed a compatibility option somewhere…

Sincerely.

Implementing Turkish quotation mark

I am working on localization of Turkish language for biblatex (turkish.lbx), but Turkish is not defined in the csquotes package. I defined the style in the localization key file to get the bibliography right for now, but can you implement the following or should I go fork and do this the git way?

\DeclareQuoteStyle[quotes]{turkish}
  {\textquotedblleft}
  {\textquotedblright}
  [0.05em]
  {\textquoteleft}
  {\textquoteright}
\DeclareQuoteStyle[guillemets]{turkish}
  {\guillemotleft}
  {\guillemotright}
  [0.025em]
  {\guilsinglleft}
  {\guilsinglright}

EDIT: DID IT THE GIT WAY!

Using thresholdtype=words results in error

As seen on TeX.SE csquotes will give an error message, when using the thresholdtype=word option.

\documentclass[a4paper,11pt, oneside, parskip=false]{scrbook}
\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
% \usepackage[autostyle=true, german]{csquotes}
%% This gives an error!
\usepackage[autostyle=true, german, threshold=2, thresholdtype=words]{csquotes}
%% Same here!
% \ExecuteQuoteOptions{thresholdtype=words}
%% This works as expected!
% \ExecuteQuoteOptions{thresholdtype=lines}

\begin{document}

%% This works:
\blockquote{
  \begin{enumerate}
  \item Wiederholte Einwirkungen
  \item Impulse mit längerer Einwirkungsdauer, z.\,B.\ Fußauftritte
  \item Impulse mit kürzerer Einwirkungsdauer.
  \end{enumerate}
}

%% ... while this gives an error, but only, if the option thresholdtype=words is used!
\blockquote{7.3.3 Wohnungsdecken
  \begin{enumerate}
  \item Wiederholte Einwirkungen
  \item Impulse mit längerer Einwirkungsdauer, z.\,B.\ Fußauftritte
  \item Impulse mit kürzerer Einwirkungsdauer.
  \end{enumerate}
}

\end{document}

LaTeX throws an error about a missing \item.

I consider this a bug?

Bug when enquote starts with duplicated character in section with Hyperref.

I found a really weird behavior:
If I "enquote" (csquotes) something that starts with two identical characters in a section header AND use hyperref I get the error:

! Argument of \csq@pdf@quote@ii has an extra }.
<inserted text> 
                \par 
l.19 \section{Foo Bar \enquote{AA}}

When the "double" character is not at the start everything is fine.

MWE:

\documentclass{article}

\usepackage{csquotes}

%Hyperref
\usepackage{hyperref}
 
 
\begin{document}
\section{Foo Bar \enquote{AA}}
\end{document}

See here for discussion.

There is also an explanation from another user.
I quote his comment here:
It's a bug in csquotes: if I modify two definitions to have \if*#1 instead of \if#1*, the run is successful.

The \if#1* test is obviously wrong: with \tracingmacros=1 I get

\enquote #1->\if #1*\relax \expandafter \@firstoftwo \else \expandafter \@secon
doftwo \fi {\csq@pdf@quote@ii } {\csq@pdf@quote@i {#1}}
#1<-AA

but clearly the macro is supposed to check if there's a leading *.

\usepackage{csquotes}
 
%Hyperref
\usepackage{hyperref}

% fix the bugs
\makeatletter
\long\def\csq@pdf@quote#1{%
  \if*#1\relax
    \expandafter\@firstoftwo
  \else
    \expandafter\@secondoftwo
  \fi
    {\csq@pdf@quote@ii}
    {\csq@pdf@quote@i{#1}}}
\long\def\csq@pdf@fquote#1{%
  \if*#1\relax
    \expandafter\@firstoftwo
  \else
    \expandafter\@secondoftwo
  \fi
    {\expandafter\csq@pdf@quote@ii\@gobble}
    {\csq@pdf@quote@i}}
\makeatother

\begin{document}

\section{Foo Bar \enquote{AA}}

\end{document}

Quote styles change in hpyhenrules

Via https://tex.stackexchange.com/q/396569/35864

\documentclass{article}
\usepackage[british]{babel}
\usepackage[autostyle=true]{csquotes}

\begin{document}
\begin{hyphenrules}{german}
\languagename{} \enquote{test}
\end{hyphenrules}

\begin{hyphenrules}{british}
\languagename{} \enquote{test}
\end{hyphenrules}

\begin{hyphenrules}{french}
\languagename{} \enquote{test}
\end{hyphenrules}
\end{document}

Since the babel documentation states that hyphenrules only changes the hyphenation, I would expect to get British quotation marks in all three cases.

The 'problem' here is that csuotes uses \languagename to change the quote style. And hyphenrules changes \languagename even though I (maybe wrongly) expected it not to.
See also https://chat.stackexchange.com/transcript/message/40594592#40594592

Feature request: Provide separate open and close quote commands

I recently found myself wanting to typeset some verbatim text in quotation marks. Since all of the inline quotation commands provided by csquotes consume the text to be quoted as an argument, this is not possible using it. An interface to produce only the opening or the closing quotation mark would be useful for cases like this.

Maybe an environment would be best, so outer and inner quotes can still be selected automatically, though typing an environment inline would be rather akward.

TeXLive 2016 breaks french space in "guillemet"

Consider this MWE, run with XeLaTeX:

\listfiles
\documentclass{article}
\usepackage{polyglossia}
\usepackage{csquotes}
\setmainlanguage{french}
\makeatletter
\apptocmd{\french@punctuation}{%
     \XeTeXinterchartoks \french@punctguillstart 255 = {\nobreakspace\xpg@nospace}% "«  " -> "«~"
     \XeTeXinterchartoks 255 \french@punctguillend = {\xpg@unskip\nobreakspace}% "  »" -> "~»"  
}{}{}
\makeatother
\begin{document}

\enquote{x}

«x»
\end{document}

The makeatletter/makeatoher code is to conturn bug in polyglossia (cf #7 and reutenauer/polyglossia#141), and was working well in TeXLive2015.

So we got space inside the quotation mark, which is the attempted behavior.

texlive2015

With TeXLive2016, we get not the space in the \enquote command.
texlive2016.

Enclosed, the result of the listfiles for the two texlive.
2015.txt
2016.txt

I have tried to get back to the files of TeXLive2015 > same problem. So the issue must be in the change of XeTeX engine… indeed, running LuaLaTeX is working.
cc @aurelberra

Xkeyval error with russian support

When using csquotes with polyglossia and trying to add russian as supported language like the follwoing:

\usepackage{polyglossia}
\newfontfamily\cyrillicfont[Script=Cyrillic]{CMU Serif} 
\newfontfamily\cyrillicfontsf[Script=Cyrillic]{CMU Sans Serif} 
\newfontfamily\cyrillicfonttt[Script=Cyrillic]{CMU Typewriter Text} 
\setdefaultlanguage{german}
\usepackage[autostyle=true, russian=guillments]{csquotes}
\setotherlanguages{russian, french, english}

You get the follwoing error.

Package xkeyval: russian' undefined in families csq'.

Dsitro: TeX Live 2019
Csquotes locale rev: 53041 (5.2j)
polyglossia locale rev: 53592 (1.47)

If needed the full error message can be added, but its long...

Suppress the polyglossia warning

Is there any way to suppress the warning when using csquotes with polyglossia? I am getting the following message:

Package csquotes Warning: Using preliminary 'polyglossia' interface.
(csquotes)                Some of the multilingual features may not
(csquotes)                work as expected.

\enquote is not guarding againsts internal font changes

If there is a font change inside \enquote it affects the right quote!

Example:

\documentclass{article}

\usepackage{csquotes}

\begin{document}

\fontfamily{Overlock-LF}\selectfont

A \enquote{test}.

And another \enquote{\fontfamily{cmr}\selectfont test}.

\showoutput

\end{document}

Which gives

enquote-bug.pdf

Dutch quotation marks changed from low-high double to high-high double too quickly. At least discuss this. Without a discussion, revert or provide the user with a switch, the low-high double being the default.

A discussion from several (at least more than one) experts in Dutch and native Dutch speakers is missing in #64 ; the change occurred on a vote of only one user, whose level of expertise in this matter is not (or not clearly) visible.
According to Wikipedia as of 2024-04-10, the primary form is „”, and «The standard form in the preceding table is taught in schools and used in handwriting. Most large newspapers have kept these low-high quotation marks, and ; otherwise, the alternative form with single or double English-style quotes is now often the only form seen in printed matter.».
The lack of clarity in «often the only» put aside, if the part before the semicolon is true, then the low-high double quotation marks is the school and not a “very old-school” way, and certain credible media have been typesetting the low-high double form for a while (perhaps, ever since). Moreover, recompiling old LaTeX documents now leads to different results for no good reason :-(.
In the past, the high-high double quotation marks could have been favoured because of the keyboards of typewriters and computers and ASCII. However, the significance of this argument has decreased since the advent of a wide range of input methods and of character encodings. For instance, with my keyboard and my language settings in Linux, I have been routinely typesetting using AltGr+V, using AltGr+B, and using AltGr+N for years. Some folks use screen keyboards, projections of keyboards onto the table surface, physical keyboards with letters displayed by mini-screens (e.g., Optimus Maximus), … meanwhile. In such cases (potentially, after tuning), the effort for the two forms is the same.
So though the reasons for a change are not completely invalid (cf. https://op.europa.eu/en/web/eu-vocabularies/formex/physical-specifications/character-encoding/use-of-quotation-marks-in-the-different-languages and https://onzetaal.nl/taalloket/aanhalingstekens-hoog-of-laag), they are weak. If the US keyboard layout and ASCII turn out to be the only real reason for using the high-high quotation marks, then it does not constitute an improvement. In intentionally strong terms, which might hurt a reader's feelings, it is corruption.
Therefore, unless a proper discussion takes place and new and better arguments emerge, it'd be best to stick to the low-high (old, standard, school) double form as default and provide the user with a switch for the alternative high-high double form.

Fragile \@ifstar's

It appears like biblatex, in some cases, stumbles over definitions that use \@ifstar. This also applies to \enquote* in bibliography fields (see plk/biblatex-apa#35).

Although I don't blame csquotes for this, I'd like to mention that I have fixed this problem in a package of my own by using xparse for command creation and star parsing, i.e. via \NewDocumentCommand and the s arg spec, and I wonder whether this won't be worth doing in csquotes as well. It might make csquotes more robust.

"Missing }" when using `\foreignblockcquote` with `\footcite`

When setting the cite command to \footcite as described on page 30 in Section 9.2 of the manual, using \foreignblockcquote results in an error:

! Missing } inserted.
<inserted text> 
                }
l.32 ... – ein geradezu unorthographisches Leben.}

Minimal working example:

\documentclass{article}

\usepackage{polyglossia}

\usepackage{biblatex}
\addbibresource{biblatex-examples.bib}

\usepackage{csquotes}
% as per the manual:
\SetCiteCommand{\footcite}
\renewcommand{\mkccitation}[1]{#1}

\setdefaultlanguage{english}
\setotherlanguage{german}

\begin{document}
	% works:
	\blockcquote{angenendt}{Weit hinten, hinter den Wortbergen, fern der Länder
		Vokalien und Konsonantien leben die Blindtexte. Abgeschieden wohnen sie in
		Buchstabhausen an der Küste des Semantik, eines großen Sprachozeans. Ein kleines
		Bächlein namens Duden fließt durch ihren Ort und versorgt sie mit den nötigen
		Regelialien. Es ist ein paradiesmatisches Land, in dem einem gebratene Satzteile
		in den Mund fliegen. Nicht einmal von der allmächtigen Interpunktion werden die
		Blindtexte beherrscht – ein geradezu unorthographisches Leben.}
	
	% does not work:
	\foreignblockcquote{german}{angenendt}{Weit hinten, hinter den Wortbergen, fern
		der Länder Vokalien und Konsonantien leben die Blindtexte. Abgeschieden wohnen
		sie in Buchstabhausen an der Küste des Semantik, eines großen Sprachozeans. Ein
		kleines Bächlein namens Duden fließt durch ihren Ort und versorgt sie mit den
		nötigen Regelialien. Es ist ein paradiesmatisches Land, in dem einem gebratene
		Satzteile in den Mund fliegen. Nicht einmal von der allmächtigen Interpunktion
		werden die Blindtexte beherrscht – ein geradezu unorthographisches Leben.}
\end{document}

Adding Estonian support

I would like to add support for Estonian quotes, but I am unsure how to do it by looking at the code here. Maybe it would be possible to just point me in a direction of a conversion table between Unicode characters and LaTeX names and I might be able to solve it my self?

I know these marks „“ (e.g 99 below and 66 above) are the, let's say most correct quotation marks to use in Estonian (http://keeleabi.eki.ee/?leht=8&id=270). Probably it would be nice to also allow the French/Russian guillemets, because they are used in some larger newspapers (but never in academia).

Quotation marks in the text produced by \enquote not reproduced in the bookmarks

The following MCE points out that the specific quotation marks produced in the text by \enquote are not reproduced in the (hyperref's) bookmarks: in the latter, they are only straight double quotes whereas they could be the same as in the text.

\documentclass[english,german,french]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage[autostyle=true]{csquotes}
\usepackage{babel}
\usepackage{hyperref}
\begin{document}
\tableofcontents
%
\section{\enquote{Foo} et « Foo »}
%
\selectlanguage{german}
\section{\enquote{Bar} und „Bar“}
%
\selectlanguage{english}
\section{\enquote{Baz} and “Baz”}
\end{document}

bookmarks fault if argument starts with two identical letters

The internal test in \csq@pdf@quote (and similar in \csq@pdf@fquote) uses \if#1* and that gets confused if #1 starts with two identical letters as can be seen in the second bookmark.

image

I think one can improve that and use a better command in the bookmarks.

\documentclass{article}
\usepackage{csquotes}
\usepackage{bookmark}
\begin{document}

\section{ \enquote{sub}  function }

\section{ \enquote{ssub} functions }

\section{ \enquote*{ssub} functions}

\section{ \enquote{*ssub} functions}

\section{ \enquote*{*ssub} functions}

\makeatletter
\RenewExpandableDocumentCommand\csq@pdf@quote{sm}
 {\IfBooleanTF{#1}
  {\csq@pdf@quote@ii{#2}}
  {\csq@pdf@quote@i{#2}}}
  
\bookmark[dest=Doc-Start]{XXXXXXXX}  
\section{ \enquote{sub}  function }

\section{ \enquote{ssub} functions }

\section{ \enquote*{ssub} functions}

\section{ \enquote{*ssub} functions}

\section{ \enquote*{*ssub} functions}
\end{document}

\textelp not resetting the space factor

The macro \textelp is defined via \textellipsis, which leaves after it the space factor of the period, which is correct, because \textellipsis can be used to end a sentence.

On the other hand, \textelp should never be sentence ending.

Example with proposed fix:

\documentclass{article}
\usepackage{csquotes}

\begin{document}

\xspaceskip=20pt % to make the spacing more evident

% this is the default definition
% \newcommand{\mktextelp}{[\textellipsis\unkern]}
% \newcommand{\mktextelpins}[1]{[\textellipsis\unkern] [#1]}

Lorem ipsum \textelp{} sit amet

Lorem ipsum \textelp{x} sit amet

% the fix
\renewcommand{\mktextelp}{[\textellipsis\unkern]\@}
\renewcommand{\mktextelpins}[1]{[\textellipsis\unkern\@] [#1]}

Lorem ipsum \textelp{} sit amet

Lorem ipsum \textelp{x} sit amet

\end{document}

image

Reference: https://tex.stackexchange.com/q/583216/4427

Kerns added by \textcoquote cause microtype to not see quotation mark properly

Description

When I compile the minimal example below, which uses microtype and biblatex with the american language option, using LuaLaTeX, then closing quotation marks in the bibliography don't protrude into the right margin.

If I remove csquotes then quotation marks protrude, but then biblatex issues a warning.

I have posted a question regarding this over at Stack Exchange previously. And, before I realized that there was a public repo also for csquotes and that the root cause was in this package, I posted issues in the bug trackers of biblatex and microtype.

@moewew noted in the biblatex issue that "the kerns added by csquotes \textcoquote cause microtype to no longer see the quotation mark properly".

Minimal example demonstrating the issue

Screenshot of MWE showing how closing quotation marks don't protrude into the right margin

\documentclass[american]{article}
\usepackage[
  style=authoryear,
  backend=biber,
  dashed=false,
]{biblatex}

\setlength{\bibhang}{0pt}

\usepackage{filecontents}
\begin{filecontents*}{mwe.bib}
  @article{andersson2011,
    title={An article title that ought to have a closing quotation mark that protrudes iiinto the margin},
    author={Anderson, A Lengthy List of First Names to Move the Article Title to the Next Line},
    journaltitle={Review of Utter Nonsense},
    date={2011},
    volume={5},
  }

  @article{andersson2021,
    title={An article title that ought to have a closing quotation mark that protrudes iiiinto the margin},
    date={2021},
    volume={40},
    crossref={andersson2011}
  }
\end{filecontents*}

\addbibresource{mwe.bib}

\usepackage[showframe, text={140mm, 230mm}]{geometry}
\usepackage{babel}
\usepackage[babel]{microtype}
\usepackage[babel]{csquotes}

\begin{document}
  \noindent ``We see that quotation marks protrude into the right margin when outside the bibliography.''

  \nocite{andersson2021,andersson2011}

  \printbibliography
\end{document}

\csq@mainlang

I need to add \def\csq@mainlang{german} to the preamble, or I get errors about it being undefined.

Behaviour of \blockquote in \parbox, etc., is inconsistent with manual

In the example

\documentclass{article}
\usepackage{csquotes}
\usepackage{lipsum}
\begin{document}

\blockquote{\lipsum*[1]}

\parbox{\textwidth}{\blockquote{\lipsum*[1]}}

\csdisplaytrue

\parbox{\textwidth}{\blockquote{\lipsum*[1]}}

\parbox{\textwidth}{\leavevmode\blockquote{\lipsum*[1]}}

\end{document}

only the last case gives the expected 'display-like' appearance. That can be traced back to the use of an \ifinner test in the code, which also shows up in beamer frames (see http://tex.stackexchange.com/q/351733). The addition of \leavevmode solves the issue but this seems at best rather odd.

Add Polish support

In Polish, the outer quotation marks are always and . There are three variants of quotation marks that are used for a quote inside a quote.

  1. Almost always, the French-style guillemots are used: « and ».
  2. Sometimes (perhaps in scientific writing) they are reversed (German-style): » and «.
  3. It is also possible to use single quotation marks: and

screen shot 2018-02-26 at 22 04 16

polyglossia, french and spacing

This is a complex issue, because related to the fix of the issue on a other package.

In french, there is space after opening guillemet («) and before closing one (»). Normaly, csquotes let polyglossia manage it.

However polyglossia 1.24 break the automatic insertion (cf reutenauer/polyglossia#141). The problem was for some user who inserted space if filesource, like this following:

\enquote{ 1 }
"  5 "
« 5 »

I think, I have found a way to solve the « 5 » example: cf reutenauer/polyglossia#141 (comment).

But this does not work when using \enquotes command.

Cf this MWE

\documentclass{article}
\usepackage{polyglossia}
\setmainlanguage{french}
\usepackage[french=guillemets]{csquotes}
\MakeOuterQuote{"}
\makeatletter
\XeTeXinterchartoks \french@punctguillstart 255 = {\nobreakspace\xpg@nospace\ignorespaces}% "« " -> "«~"
\makeatother
\begin{document}


« 1 » % Not csquotes
\enquote{ 1 } % Csquotes
"  5 " % Csquotes
\end{document}

My suggestion : should it be csquotes automatically gobble the spurious space after / before opening/closing quotation in the sourcefile, and let polyglossia (debuged) manage it ?

foreignblockquote across pages fails with documentclass memoir

When using foreinblockquote from csquotes with the class memoir, if the quote spreads across pages, the document won't compile but will fail with the message "Missing } inserted."

The following minimal example illustrates the problem :

\documentclass{memoir}

\usepackage{polyglossia}
\setdefaultlanguage{english}
\setotherlanguage{latin}

\usepackage{lipsum} 

\usepackage{csquotes}

\begin{document}

\foreignblockquote{latin}{\lipsum[1-5]}

%The following would work as four paragraphs fit on a single page
%\foreignblockquote{latin}{\lipsum[1-4]}

\end{document}

`\foreignquote` does not work with `polyglossia`

When trying to compile this

\documentclass{article}

\usepackage[autostyle]{csquotes}

\usepackage{polyglossia}
\setmainlanguage{english}
\setotherlanguage{french}
% \usepackage[french, english]{babel} % works fine

\begin{document}
\foreignquote{french}{Ceci est en français.}
\end{document}

the error below is reported

! Extra }, or forgotten \endgroup.
<argument> ...ettextdirection:n {\l_tmpa_tl }{\group_begin: }
                                                  
l.11 \foreignquote{french}{Ceci est en français.}

polyglossia version: 2022/04/20 v1.56
csquotes version: 2021-02-22 v5.2l

documentation of \mktextelpins

It says "redefine \mktextelpins accordingly:" but then continues with

\newcommand{\mktextelpins}[1]{[\textellipsis #1]}

which should probably be \renewcommand. Maybe in other places as well.

autostyle=once doesn't honor babel's main=⟨language⟩

According to the documentation, the autostyle=once option controls multilingual support by only adapting the style once so that it matches the main language of the document.

This does work if the main language is just the last listed one, as shown by the following MCE:

\documentclass[french,english]{article}
\usepackage[T1]{fontenc}
\usepackage[autostyle=once]{csquotes}
\usepackage{babel}

\begin{document}
\section{Default}
\enquote{Very interesting quote.}

\selectlanguage{french}
\section{French}
\enquote{Une très intéressante citation.}

\selectlanguage{english}
\section{English}
\enquote{Very interesting quote.}
\end{document}

image

But this doesn't work if the main language is stipulated through the babel's main=⟨language⟩ option, as shown by the following MCE:

\documentclass[french,main=english]{article}
\usepackage[T1]{fontenc}
\usepackage[autostyle=once]{csquotes}
\usepackage{babel}

\begin{document}
\section{Default}
\enquote{Very interesting quote.}

\selectlanguage{french}
\section{French}
\enquote{Une très intéressante citation.}

\selectlanguage{english}
\section{English}
\enquote{Very interesting quote.}
\end{document}

image

Interestingly, the babel's main=⟨language⟩ option is honored by the autostyle=true option

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.