我正在使用\usepackage{csquotes}
和命令blockquote
和quote
。我对的显示很满意blockquote
,但想更改的显示,quote
以便输出以斜体显示。
这是我的代码:
\documentclass[paper=a4, fontsize=11pt]{scrartcl}
\usepackage{todonotes}
\usepackage[T1]{fontenc}
\usepackage{fourier}
\usepackage{longtable}
\usepackage{arydshln}
\usepackage[ngerman, english]{babel}
\usepackage[utf8]{inputenc}
\usepackage{amsmath,amsfonts,amsthm} % Math packages
\usepackage{lipsum}
\usepackage[hidelinks]{hyperref}
\usepackage{arydshln}
\usepackage{sectsty}
\allsectionsfont{\centering \normalfont\scshape}
\usepackage{fancyhdr}
\pagestyle{fancyplain}
\fancyhead{}
\fancyfoot[L]{} % Empty left footer
\fancyfoot[C]{} % Empty center footer
\fancyfoot[R]{\thepage} % Page numbering for right footer
\renewcommand{\headrulewidth}{0pt} % Remove header underlines
\renewcommand{\footrulewidth}{0pt} % Remove footer underlines
\setlength{\headheight}{13.6pt} % Customize the height of the header
\usepackage{tikz}
\usepackage{lscape}
\usetikzlibrary{trees,shapes}
\usepackage{csquotes}
\usepackage[round]{natbib}
\bibliographystyle{plainnat}
\begin{document}
In my document I want to have two different kinds of quotes.
\begin{blockquote}
{This is a blockquote which is simply a sentence in quotation marks but otherwise part of the normal text}
\end{blockquote}
And now I have a longer quote which I want to mark as standing out, so I use the quote-environment:
\begin{quote}It followed from the special theory of relativity that mass and energy are both but different manifestations of the same thing — a somewhat unfamiliar conception for the average mind. Furthermore, the equation [...] in which energy is put equal to mass, multiplied by the square of the velocity of light, showed that very small amounts of mass may be converted into a very large amount of energy and vice versa. The mass and energy were in fact equivalent, according to the formula mentioned before. This was demonstrated by Cockcroft and Walton in 1932, experimentally.
\end{quote}
And after that quote I want to continue with the normal text.
\end{document}
我的问题是,我不知道该quote
用斜体表示。我猜应该是\renewcommand
,但我不知道如何将类似的东西合并textit
到其中。
非常感谢您的帮助!
爱因斯坦的名言摘自维基语录
答案1
我其实不blockquote
认为环境,它应该用作宏,即\blockquote{the quote}
。 为这种东西csquotes
定义一个环境,然后重新定义为包含使其成为斜体。displayquote
\mkbegdispquote
\itshape
\documentclass[paper=a4, fontsize=11pt]{scrartcl}
\usepackage{csquotes}
\renewcommand{\mkbegdispquote}[2]{\itshape}
\begin{document}
In my document I want to have two different kinds of quotes.
\blockquote{This is a blockquote which is simply a sentence in quotation marks but otherwise part of the normal text}
And now I have a longer quote which I want to mark as standing out, so I use the quote-environment:
\begin{displayquote}
It followed from the special theory of relativity that mass and energy are both but different manifestations of the same thing — a somewhat unfamiliar conception for the average mind. Furthermore, the equation [...] in which energy is put equal to mass, multiplied by the square of the velocity of light, showed that very small amounts of mass may be converted into a very large amount of energy and vice versa. The mass and energy were in fact equivalent, according to the formula mentioned before. This was demonstrated by Cockcroft and Walton in 1932, experimentally.
\end{displayquote}
And after that quote I want to continue with the normal text.
\end{document}
您还可以\blockquote
对两个引号使用命令。它被设计成如果长度超过给定的行数(默认为 4),则将其排版为显示环境。默认情况下quote
使用环境,但例如您可以使用\AtBeginEnvironment{quote}{\itshape}
将所有环境设置quote
为斜体。由 加载的包\AtBeginEnvironment
提供。etoolbox
csquotes
\documentclass[paper=a4, fontsize=11pt]{scrartcl}
\usepackage{csquotes}
\AtBeginEnvironment{quote}{\itshape}
\begin{document}
In my document I want to have two different kinds of quotes.
\blockquote{This is a blockquote which is simply a sentence in quotation marks but otherwise part of the normal text}
And now I have a longer quote which I want to mark as standing out, so I use the quote-environment:
\blockquote{It followed from the special theory of relativity that mass and energy are both but different manifestations of the same thing — a somewhat unfamiliar conception for the average mind. Furthermore, the equation [...] in which energy is put equal to mass, multiplied by the square of the velocity of light, showed that very small amounts of mass may be converted into a very large amount of energy and vice versa. The mass and energy were in fact equivalent, according to the formula mentioned before. This was demonstrated by Cockcroft and Walton in 1932, experimentally.}
And after that quote I want to continue with the normal text.
\end{document}
答案2
环境quote
不是由csquotes
包提供的,只是blockquote
。话虽如此,您可以创建一个itquote
将斜体应用于文本的新环境。
fancyhdr
请注意,不建议与 KOMA 脚本类一起使用。
输出
代码
\documentclass[paper=a4, fontsize=11pt]{scrartcl}
\usepackage{todonotes}
\usepackage[T1]{fontenc}
\usepackage{fourier}
\usepackage{longtable}
\usepackage{arydshln}
\usepackage[ngerman, english]{babel}
\usepackage[utf8]{inputenc}
\usepackage{amsmath,amsfonts,amsthm} % Math packages
\usepackage{lipsum}
\usepackage[hidelinks]{hyperref}
\usepackage{arydshln}
\usepackage{sectsty}
\allsectionsfont{\centering \normalfont\scshape}
\usepackage{tikz}
\usepackage{lscape}
\usetikzlibrary{trees,shapes}
\usepackage{csquotes}
\usepackage[round]{natbib}
\bibliographystyle{plainnat}
\newenvironment{itquote}
{\begin{quote}\itshape}
{\end{quote}}
\begin{document}
In my document I want to have two different kinds of quotes.
\blockquote{This is a blockquote which is simply a sentence in quotation marks but otherwise part of the normal text}
And now I have a longer quote which I want to mark as standing out, so I use the quote-environment:
\begin{itquote}It followed from the special theory of relativity that mass and energy are both but different manifestations of the same thing — a somewhat unfamiliar conception for the average mind. Furthermore, the equation [...] in which energy is put equal to mass, multiplied by the square of the velocity of light, showed that very small amounts of mass may be converted into a very large amount of energy and vice versa. The mass and energy were in fact equivalent, according to the formula mentioned before. This was demonstrated by Cockcroft and Walton in 1932, experimentally.
\end{itquote}
And after that quote I want to continue with the normal text.
\end{document}