The csquotes package changes the \spacefactor of several punctuation characters when they are used inside quotations. In \nonfrenchspacing, the \spacefactor of ? and ! are changed from 3000 to 3002 and 3001, respectively. In \frenchspacing, the \spacefactor of . ? ! : ; , change from 1000 to 1006, 1008, 1007, 1005, 1004, and 1003, respectively. I have verified this via testing (see my MWE) and lines 653 to 673 of the csquotes.sty file. Although the change in \spacefactor is small (<1%) and hard to observe visually, it is probably not typographically desirable. I cannot imagine any publisher or style guide seriously recommending such tiny changes in spacing. Furthermore, unless I am mistaken, I doubt the package authors actually want this change in spacing. Maybe it is a hack or funny way of programming the csquotes package.
In my MWE below, I first display the \spacefactor of different punctuation characters. Notably, the closing double curly quote (\textquotedblright) has a \spacefactor of 1000 when it probably should be 0. (A \spacefactor of 0 means that the character is essentially ignored when calculating trailing interword space.) I haven't figured out how to change this. \sfcode\textquotedblright=0 doesn't work for whatever reason.
I use \@savsf to create a workaround by defining \enquote without using the \csquotes package. I define \enquote such that \textquotedblright acts as if its \spacefactor is 0. (I've used American English style quotations.) This lets me create quotations without unnecessarily changing the \spacefactor and producing ever-so-slightly suboptimal typography. Of course, it would likely be easier to just change the \spacefactor of the closing double curly quote to 0.
\documentclass{article}
\def\pangram{The quick brown fox jumps over the lazy dog}
\usepackage{stix2}
\parindent=0pt
\parskip=4pt
\raggedright
%\usepackage{csquotes}
\makeatletter
\NewDocumentCommand{\enquote}{ s m }{%
\IfBooleanTF{#1}%
{\textquoteleft#2\textquoteright}%
% {\textquotedblleft#2\textquotedblright}%results in incorrect trailing spacefactor
{%
\textquotedblleft{}%
#2%
\@savsf\spacefactor%stores current spacefactor
\textquotedblright{}%
\spacefactor=\@savsf%outputs stored spacefactor
%\textquotedblright has a spacefactor of 1000 and I haven't figured out how to change it to 0
}%
}
\makeatother
%\sfcode\textquotedblright=0%doesn't work
\begin{document}
I display the \verb|\spacefactor| of different punctuation characters with \verb|\nonfrenchspacing|.
\par
period . = \the\sfcode`\.
\par
exclamation mark ? = \the\sfcode`\?
\par
question mark ! = \the\sfcode`\!
\par
colon : = \the\sfcode`\:
\par
semi-colon ; = \the\sfcode`\;
\par
comma , = \the\sfcode`\,
\par
single straight quote \textquotesingle{} = \the\sfcode`'
\par
double straight quote \textquotedbl{} = \the\sfcode\textquotedbl
\par
opening double curly quote \textquotedblleft{} = \the\sfcode\textquotedblleft
\par
closing double curly quote \textquotedblright{} = \the\sfcode\textquotedblright
\par
opening single curly quote \textquoteleft{} = \the\sfcode\textquoteleft
\par
closing single curly quote \textquoteright{} = \the\sfcode\textquoteright
\par
\medskip
\nonfrenchspacing
Testing \verb|\enquote{\pangram{}<punc char>}\the\spacefactor| with \verb|\nonfrenchspacing|
\par
\enquote{\pangram{}.}\the\spacefactor
\par
\enquote{\pangram{}?}\the\spacefactor
\par
\enquote{\pangram{}!}\the\spacefactor
\par
\enquote{\pangram{}:}\the\spacefactor
\par
\enquote{\pangram{};}\the\spacefactor
\par
\enquote{\pangram{},}\the\spacefactor
\par
\medskip
Testing \verb|\enquote*{\pangram{}<punc char>}\the\spacefactor| with \verb|\nonfrenchspacing|
\par
\enquote*{\pangram{}.}\the\spacefactor
\par
\enquote*{\pangram{}?}\the\spacefactor
\par
\enquote*{\pangram{}!}\the\spacefactor
\par
\enquote*{\pangram{}:}\the\spacefactor
\par
\enquote*{\pangram{};}\the\spacefactor
\par
\enquote*{\pangram{},}\the\spacefactor
\par
\medskip
\frenchspacing
Testing \verb|\enquote{\pangram{}<punc char>}\the\spacefactor| with \verb|\frenchspacing|
\par
\enquote{\pangram{}.}\the\spacefactor
\par
\enquote{\pangram{}?}\the\spacefactor
\par
\enquote{\pangram{}!}\the\spacefactor
\par
\enquote{\pangram{}:}\the\spacefactor
\par
\enquote{\pangram{};}\the\spacefactor
\par
\enquote{\pangram{},}\the\spacefactor
\par
\medskip
Testing \verb|\enquote*{\pangram{}<punc char>}\the\spacefactor| with \verb|\frenchspacing|
\par
\enquote*{\pangram{}.}\the\spacefactor
\par
\enquote*{\pangram{}?}\the\spacefactor
\par
\enquote*{\pangram{}!}\the\spacefactor
\par
\enquote*{\pangram{}:}\the\spacefactor
\par
\enquote*{\pangram{};}\the\spacefactor
\par
\enquote*{\pangram{},}\the\spacefactor
\end{document}
EDIT: I found that I can change the \spacefactor of \textquotedblright from 1000 (default) to 0 via this code snippet:
Spacefactor & Unicode Curly Quotes
\sfcode\csname\encodingdefault\string\textquotedblright\endcsname=0
So
\NewDocumentCommand{\enquote}{ s m }{%
\IfBooleanTF{#1}%
{\textquoteleft#2\textquoteright}%
{\textquotedblleft#2\textquotedblright}
}
would have the correct trailing \spacefactor after the \textquotedblright.
\spacefactorincreases the interword stretch and decreases the interword shrink, even when used withcsquotes's\enquote. – User23456234 Apr 21 '23 at 16:14