![使用 csquotes 包实现不同的引号](https://linux22.com/image/303836/%E4%BD%BF%E7%94%A8%20csquotes%20%E5%8C%85%E5%AE%9E%E7%8E%B0%E4%B8%8D%E5%90%8C%E7%9A%84%E5%BC%95%E5%8F%B7.png)
对于德语文档,我使用csquotes
软件包的 guillemets 选项。但文档中有一节我想使用德语的“常规”引号——“常规”表示不选择 guillemets 选项时获得的引号。可以同时使用两者吗?如果可以,如何操作?
为了说清楚,让我补充一点,我想要的是该csquotes
包中适用于两种引号类型的功能。
对此的 MWE 如下:
\documentclass{memoir}
\usepackage[german]{babel}
\usepackage[
german = guillemets,%quotes,<- I'd like to have both quot. marks in the same document
autostyle = true,
autopunct,
csdisplay = true,
]{csquotes}
\begin{document}
Written in English but \enquote{meant to be used} in a document written in German.
\end{document}
答案1
如果您想保留csquotes
功能,只需使用
\setquotestyle[quotes]{german}
和
\setquotestyle[guillemets]{german}
梅威瑟:
\documentclass{memoir}
\usepackage[german]{babel}
\usepackage[
german = guillemets,%quotes,<- I'd like to have both quot. marks in the same document
autostyle = true,
autopunct,
csdisplay = true,
]{csquotes}
\begin{document}
Written in English but \enquote{meant to be used} in a document written in German.
\setquotestyle[quotes]{german}
Written in English but \enquote{meant to be used} in a document written in German.
\setquotestyle[guillemets]{german}
Written in English but \enquote{meant to be used} in a document written in German.
\end{document}
输出
否则,您始终可以使用\glqq
和\grqq
。
\documentclass{memoir}
\usepackage[german]{babel}
\usepackage[
german = guillemets,%quotes,<- I'd like to have both quot. marks in the same document
autostyle = true,
autopunct,
csdisplay = true,
]{csquotes}
\newcommand{\defaultquote}[1]{\glqq #1\grqq}
\begin{document}
Written in English but \enquote{meant to be used} in a document written in German.
Written in English but \defaultquote{meant to be used} in a document written in German.
\end{document}
输出