1

I have a typo legend in an image in my pdf file generated by LaTeX. There is an extra "t" at the end of the legend. Unfortunately, I cannot reproduce the correct image. How can I remove that "t" in my pdf?

enter image description here

BTW, I have the correct legend generated by MATLAB (see below). Can I somehow replace the wrong legend with correct one through LaTeX?

enter image description here

7
  • 2
    You have more than just one typo there... – Werner Jan 28 '19 at 3:02
  • 3
    Essentially this is the same as Drawing on an image with TikZ (duplicate). – Werner Jan 28 '19 at 3:03
  • 1
    Estimated... not Estiamated. If you have "the correct" legend, why not just recreate the image entirely? – Werner Jan 28 '19 at 3:06
  • 2
    Follow the instructions in the linked post to put a node onto the imported image and then place the graphics into that node like you normally would \includegraphics[..]{new_legend}. – Werner Jan 28 '19 at 3:15
  • 1
    What sometimes works is to convert the pdf to an eps file, look for the string there. correct it, and convert back to pdf. – user121799 Jan 28 '19 at 3:17
1

Adobe Acrobat (not the reader, but Pro) allows modifying elements in a pdf quite nicely. However it's a proprietary software.

For a LaTeX hack, I would have tried it this way:

\documentclass{standalone}
\usepackage{graphicx}
\begin{document}
    \includegraphics[width = 3in]{figure}%
    \hspace{-1.43in}%
    \raisebox{2.1in}{%
        \includegraphics[width = 1.31in]{legend}%
        \hspace{0.1in}}
\end{document}

...of course downloading your two images as png. This gives:

enter image description here

As you see the white space outside the new legend is a bit disturbing. So, there are several things you need to do to get things right for your pdf's.

  1. trim your new legend from just outside the box.
  2. change the lengths to suit your case.

It's a trial-and-error method-- somewhat tiresome... but works !

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.