在概念中强制换行

在概念中强制换行

我正在关注acm-模板(可轻松下载的 TeX 模板文件 Zip 集(2015 年 5 月)。)我有这个最小的例子:

\documentclass{sig-alternate-05-2015}
\usepackage[english]{babel}

\begin{document}

\begin{CCSXML}
<ccs2012>
<concept>
<concept_id>10002951.10003227.10003351.10003445</concept_id>
<concept_desc>Information systems~Nearest-neighbor search</concept_desc>
<concept_significance>500</concept_significance>
</concept>
<concept>
<concept_id>10003752.10003809.10010055.10010060</concept_id>
<concept_desc>Theory of computation~Nearest neighbor algorithms</concept_desc>
<concept_significance>500</concept_significance>
</concept>

</ccs2012>
\end{CCSXML}

\ccsdesc[500]{Information systems~Nearest-neighbor search}
\ccsdesc[500]{Theory of computation~Nearest neighbor algorithms}
\printccsdesc
\end{document}

我需要在第一个概念后强制换行,以便理论计算从下一行开始。如何实现这一点?


试图:

\ccsdesc[500]{Information systems~Nearest-neighbor search\newline}
\ccsdesc[500]{Theory of computation~Nearest neighbor algorithms}

;但是,这将产生一个换行符,但会为下一行留下尾随。

答案1

假设你想要每一个新的概念,从新的路线开始,你可以这样做。

\documentclass{sig-alternate-05-2015}
\usepackage[english]{babel}

\usepackage{etoolbox}
\makeatletter
\patchcmd{\ccsdesc@parse}{\textbullet}{\par\noindent\textbullet}{}{}
\makeatother

\begin{document}

\begin{CCSXML}
<ccs2012>
<concept>
<concept_id>10002951.10003227.10003351.10003445</concept_id>
<concept_desc>Information systems~Nearest-neighbor search</concept_desc>
<concept_significance>500</concept_significance>
</concept>
<concept>
<concept_id>10003752.10003809.10010055.10010060</concept_id>
<concept_desc>Theory of computation~Nearest neighbor algorithms</concept_desc>
<concept_significance>500</concept_significance>
</concept>

</ccs2012>
\end{CCSXML}

\ccsdesc[500]{Information systems~Nearest-neighbor search}
\ccsdesc[500]{Theory of computation~Nearest neighbor algorithms}

\printccsdesc
\end{document}

enter image description here

一个可怕的黑客行为,只是在第二项之前放置一个换行命令:

\documentclass{sig-alternate-05-2015}
\usepackage[english]{babel}

\newcommand\HH{% horrible hack
  \global\let\savedtextbullet\textbullet
  \gdef\textbullet{%
    \par\noindent\savedtextbullet\global\let\textbullet\savedtextbullet
  }%
}

\begin{document}

\begin{CCSXML}
<ccs2012>
<concept>
<concept_id>10002951.10003227.10003351.10003445</concept_id>
<concept_desc>Information systems~Nearest-neighbor search</concept_desc>
<concept_significance>500</concept_significance>
</concept>
<concept>
<concept_id>10003752.10003809.10010055.10010060</concept_id>
<concept_desc>Theory of computation~Nearest neighbor algorithms</concept_desc>
<concept_significance>500</concept_significance>
</concept>

</ccs2012>
\end{CCSXML}

\ccsdesc[500]{Information systems~Nearest-neighbor search\HH}
\ccsdesc[500]{Theory of computation~Nearest neighbor algorithms}
\ccsdesc[500]{Nothing particular~Just for testing}
\printccsdesc
\end{document}

enter image description here

答案2

不那么可怕的黑客攻击看起来是这样的:

\def\NL#1{#1\hfil\break}

...
\ccsdesc[500]{Information systems~Nearest-neighbor search\NL}
\ccsdesc[500]{Theory of computation~Nearest neighbor algorithms}
\ccsdesc[500]{Nothing particular~Just for testing}

相关内容