将块引用文本保持在一行上

将块引用文本保持在一行上

我正在CSQUOTES按照建议使用包这个TEX问题。它与嵌套的{}s配合得很好

如何让以下 (bibtex) 文本的每一行都保持在一行上,同时采用 blockquote (缩进) 格式?它应该看起来像这样,但在 blockquote 中:

@inproceedings{Velloso:2013:MMM:2470654.2466171,
 author = {Velloso, Eduardo and Bulling, Andreas and Gellersen, Hans},
 title = {MotionMA: Motion Modelling and Analysis by Demonstration},
 booktitle = {Proceedings of the SIGCHI Conference on Human Factors in Computing Systems},
 series = {CHI '13},
 year = {2013},
 isbn = {978-1-4503-1899-0},
 doi = {10.1145/2470654.2466171},
 acmid = {2466171},
 publisher = {ACM},
 ...
}

答案1

您可以使用包lstlisting中的环境listings来执行此操作。这是一个逐字环境,这意味着其中的所有内容都会按书写方式准确打印,包括空格、括号、反斜杠等。您可以将其配置为允许长行换行(breaklines=true),并使用设置缩进xleftmargin=<length>

这样,您就不必手动添加所有换行符,也不必转义所有括号。另一方面,单词不会像在您的引文中那样自动连字符。

\documentclass{article}
\usepackage{csquotes} % for comparison

\usepackage{listings}
\lstset{breaklines=true,
        breakatwhitespace=false,
        columns=flexible,
        xleftmargin=2em}
\begin{document}

\noindent With \texttt{lstlistings}:
\begin{lstlisting}
@inproceedings{Velloso:2013:MMM:2470654.2466171,
 author = {Velloso, Eduardo and Bulling, Andreas and Gellersen, Hans},
 title = {MotionMA: Motion Modelling and Analysis by Demonstration},
 booktitle = {Proceedings of the SIGCHI Conference on Human Factors in Computing Systems},
 series = {CHI '13},
 year = {2013},
 isbn = {978-1-4503-1899-0},
 doi = {10.1145/2470654.2466171},
 acmid = {2466171},
 publisher = {ACM},
 ...
}
\end{lstlisting}

\noindent With \texttt{blockquote}: 
\blockquote{
  @inproceedings\{Velloso:2013:MMM:2470654.2466171,\\*   
   author = \{Velloso, Eduardo and Bulling, Andreas and Gellersen, Hans\},\\*    
   title = \{MotionMA: Motion Modelling and Analysis by Demonstration\},\\*    
   booktitle = \{Proceedings of the SIGCHI Conference on Human Factors in Computing Systems\},\\*    
   year = \{2013\},\\* 
   isbn = \{978-1-4503-1899-0\},\\* 
   pages = \{1309--1318\},\\* 
   numpages = \{10\},\\* 
   url = \{http://doi.acm.org/10.1145/2470654.2466171\},\\* 
   doi = \{10.1145/2470654.2466171\},\\* 
   acmid = \{2466171\},\\* 
   publisher = \{ACM\},\\* 
   address = \{New York, NY, USA\},\\* 
  \} \\* 
}


\end{document}

在此处输入图片描述

答案2

使用新线\\*

\blockquote{
  @inproceedings\{Velloso:2013:MMM:2470654.2466171,\\*   
   author = \{Velloso, Eduardo and Bulling, Andreas and Gellersen, Hans\},\\*    
   title = \{MotionMA: Motion Modelling and Analysis by Demonstration\},\\*    
   booktitle = \{Proceedings of the SIGCHI Conference on Human Factors in Computing Systems\},\\*    
   year = \{2013\},\\* 
   isbn = \{978-1-4503-1899-0\},\\* 
   pages = \{1309--1318\},\\* 
   numpages = \{10\},\\* 
   url = \{http://doi.acm.org/10.1145/2470654.2466171\},\\* 
   doi = \{10.1145/2470654.2466171\},\\* 
   acmid = \{2466171\},\\* 
   publisher = \{ACM\},\\* 
   address = \{New York, NY, USA\},\\* 
  \} \\* 
}

相关内容