Hacker News new | ask | show | jobs
by ivansavz 1637 days ago
Would it be possible to share the macro for highlighting topic sentences? I'd love to try that out on a recent draft I'm working on.
1 comments

Sure, I'm pasting it below. Since I might sometimes want bold-face, I am also colouring it red, which my journals will not permit. (I am not sure how this will format in hackernews, but the main thing is that you uncomment either of the two `newcommand` lines.) If you want to do other things, you might want to use the `\if` method, so that altering just one line will let you alter a bunch of properties at once.

  \documentclass{report}
  \usepackage{color}
  \begin{document}
  
  \newcommand{\topic}[1]{\color{red}\textbf{#1}\color{black}}
  %\newcommand{\topic}[1]{#1}
  
  \topic{Lorem ipsum dolor sit amet, consectetur
  adipiscing elit.} Praesent vel consectetur est,
  sed accumsan dolor.
  
  \topic{In malesuada in nulla eget aliquam.} In 
  facilisis erat neque, non sollicitudin felis finibus a.
  Sed pellentesque suscipit lorem, quis lacinia mi
  suscipit at.

  \end{document}