4

I am following this acm-template (Zip set of TeX template files for easy download (May, 2015).) I have this minimal example:

\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}

I need to force a newline after the first concept, so that Theory computation starts from the next line. How to make this happen?


Attempt:

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

However, this will produce a newline, but will leave a trailing ; for the next line.

6
  • have you tried to insert a <br>?
    – naphaneal
    Apr 6, 2016 at 11:40
  • No @naphaneal, where?
    – gsamaras
    Apr 6, 2016 at 11:42
  • at the point you wish to have a newline.
    – naphaneal
    Apr 6, 2016 at 11:44
  • I tried between the concept tags, but no result @naphaneal.
    – gsamaras
    Apr 6, 2016 at 11:46
  • please provide a full MWE. I'd like to test something
    – naphaneal
    Apr 6, 2016 at 11:53

2 Answers 2

2

Assuming you want every new concept to start at a new line, you can do like this.

\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

A horrible hack for just placing a new line command before the second item:

\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

5
  • egreg, thanks, that works, but your assumption is wrong (and I am the one to blame). In practice I have more concepts and I would like to force the newline only for the 2nd one. However, if that is much work for you, let me know, so that I can accept. :)
    – gsamaras
    Apr 6, 2016 at 12:20
  • @gsamaras I'm not sure whether this is sensible. Are these “concepts” used elsewhere in the document?
    – egreg
    Apr 6, 2016 at 12:37
  • much easier: remove the - from Neighbor-nearest search. though @egreg answer is more smexy
    – naphaneal
    Apr 6, 2016 at 12:38
  • No. However, I need to change line only for the 2nd concept (which overlaps with the right column in a two-columned paper I am writing). The other concepts do not have a reason to be flushed in a newline.
    – gsamaras
    Apr 6, 2016 at 12:39
  • @naphaneal I would suggest you to provide a separate answer, if you have one. :)
    – gsamaras
    Apr 6, 2016 at 12:40
1

Somewhat less horrible hack looks like this:

\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}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .