下文中:
\documentclass[fontsize=11pt]{book}
\usepackage{microtype}
\usepackage{times}
\usepackage{csquotes}
\usepackage[frenchb]{babel}
\frenchbsetup{IndentFirst=false}
\begin{document}
text in French \foreignblockquote{english}[][.]{quotation in English} text in French text \blockquote[][.]{quotation in French}
\end{document}
我想将英文引文斜体化。显然可以使用,\renewcommand{\mkblockquote}[4]{\emph{#1}#2#4#3}
但它会影响所有块状引文。我快速浏览了一下csquotes.sty
文件,但对我来说太复杂了。我还查看了包中可用的条件语句,但没有一个与语言相关。
答案1
在和中\mktextquote
,\mkblockquote
添加
\iflanguage{english}{\itshape}{}
在适当的位置。(\iflanguage
是babel
条件句。)
\documentclass[fontsize=11pt]{book}
\usepackage[frenchb]{babel}
\usepackage{csquotes}
\renewcommand{\mktextquote}[6]{%
#1%
\iflanguage{english}{\itshape}{}% ADDED
#2#4#3#6#5%
}
\renewcommand{\mkblockquote}[4]{%
\iflanguage{english}{\itshape}{}% ADDED
#1#2#4#3%
}
\begin{document}
text in French
\foreignblockquote{english}[][.]{quotation in English}
text in French
\blockquote[][.]{quotation in French}
text in French
\foreignblockquote{english}[][.]{quotation \\in \\English}
text in French
\blockquote[][.]{quotation \\in \\French}
text in French
\end{document}