0

I would like to add a triangle to highlight important paragraphs in my document. Especially, the triangle should not change the existing text flow.

Example before:

   Paragraph one.
   Paragraph two.
   Paragraph three.

Example after:

   Paragraph one.
|> Paragraph two.
   Paragraph three.
2

Another suggestion:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[svgnames]{xcolor}
\usepackage{fourier-orns}
\newcommand{\warn}{\leavevmode\llap{\raisebox{-0.5ex}{\Large\color{Crimson}\lefthand}\hspace{\parindent}}}

\usepackage{lipsum}

\begin{document}

\lipsum[11]

\warn \lipsum[11]

\lipsum[11]

\end{document} 

enter image description here

  • Thank you, that works well with text paragraphs. I would also like to highlight subsection headlines the same way. In this case, the arrow is shown above the headline. Is this something that could be supported easily or should I open a new question for that? – danijar Nov 19 '17 at 11:35
  • Do you want to highlight every subsection headlines, or only some of them? – Bernard Nov 19 '17 at 11:46
  • Just some of them. It actually seems to work fine if I add \warn inside the section command, but I was wondering if it's possible to specify it before the \section{} to keep it more readable. If not, I can also create a \warnsection command. – danijar Nov 19 '17 at 12:14
  • You might define some \warnsection command, which incorporates the \warn command, and uses the optional argument of section for the header and the table of contents. – Bernard Nov 19 '17 at 12:38
1

like this?

enter image description here

edit (consider your comments below): for heightening paragraphs always on the left side of paragraph:

\documentclass{article}
\usepackage{amssymb}
\newcommand{\attention}{\makebox[0pt][r]{$\vartriangleright$\hspace{\parindent}\quad}} % <---

\usepackage{lipsum}
\begin{document}
\lipsum[11]

\attention\lipsum[11]

\lipsum[11]
\end{document}
  • Yes, that's great. How to get the triangle on the left side of the text? – danijar Nov 18 '17 at 17:47
  • it is simple to have it on outside of text of two side pages (on the left on the even page and on the right right on the odd page). is this what you like to have? – Zarko Nov 18 '17 at 17:50
  • In my case all pages should have it on the left, since it's a digital document. But it may be possible to set that information globally for LaTeX. – danijar Nov 18 '17 at 17:53
  • I figured out how to put the symbol on the other side using \reversemarginpar. One little problem is that the symbols are a bit lower for paragraphs that directly follow a section headline. Do you have any idea what causes this and how to fix it? – danijar Nov 18 '17 at 18:23
  • meanwhile i change solution: i accommodate to your wish that triangle be always on the left side. now is better aligned to first paragraph line. – Zarko Nov 18 '17 at 18:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.