0

An easy one hopefully:

I'm trying to label an image with some annotations, and I'd like to use some simple text and arrows for this.

At the moment I'm just doing this, inside a standard image environment: \put(x,y){$\leftarrow$ X kDa}

But the pedant in me would like block-headed (or 'filled' arrowheads). Is there a simple option to specify this, or a different arrow command/keywork that can be used?

\documentclass[a4paper, oneside, 11pt]{report}
\usepackage{graphicx}
\usepackage{wasysym}
\begin{document}

\begin{figure}[h]
    \centering
    \includegraphics[width=0.5\textwidth, trim={0 0 0 0}, clip, draft]{image.jpg}
    \put(0,180){$\leftarrow$ X kDa}
    \put(0,120){\LEFTarrow X kDa}

\end{figure}
\end{document}

Which produces:

enter image description here

All I want to do is change the arrow style. I know Tikz etc could do all this but thats far more complicated than I want to get in to right now. wasysym has a block arrow without a stem which is a little closer, but not exactly what I'd like.

  • 1
    So you want to change the math font? – TeXnician Jan 5 '18 at 13:07
  • It doesn't have to be a math arrow, a standard 'in text' arrow would be fine. In fact id rather not change the math font else itll affect equations elsewhere in the doc – Joe Healey Jan 5 '18 at 13:10
1

This is a very quick fix that does not require an additional package. EDIT: Moved the arrow up a bit.

\documentclass[a4paper, oneside, 11pt]{report}
\usepackage{graphicx}
\usepackage{wasysym}
\newcommand{\MyOwnArrow}{\raisebox{1pt}{\LEFTarrow$\!-$}}
\begin{document}

\begin{figure}[h]
    \centering
    \includegraphics[width=0.5\textwidth, trim={0 0 0 0}, clip, draft]{image.jpg}
    \put(0,180){$\leftarrow$ X kDa}
    \put(0,120){\MyOwnArrow X kDa}

\end{figure}
\end{document}

enter image description here

Needless to say that there are much more elegant ways of annotating pictures, e.g. based on TikZ.

  • Hacky solutions not requiring additional packages are fine by me! ;). As a little follow up, would you happen to know any way of raising the arrow up slightly so that it is more aligned with the centre of the following characters? At the moment they seem to lie a bit low in the line height. – Joe Healey Jan 7 '18 at 10:37
  • @JoeHealey I modified the answer slightly. If you really want the arrow to be centered in the middle of the subsequent character, this can also be done, but it would be more complicated. In this case, I personally would start to annotate the picture with, say, TikZ or pstricks. – user121799 Jan 7 '18 at 14:33

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.