0

I have been trying to use the \put command in TeXstudio 4.1.1. [ \put(x,y){\input{xxx}} ], but it says that the command is unrecognized. My preamble does include \usepackage{graphicx}. Same thing with \usepackage{graphics}. Is there a new version of \put, do I need a different package, or something else?

Thanks

  • Exactly what is saying \put is unrecognized? If it is your editor, note that the editors probably don't support all possible latex commands. \put usually lives inside the picture envronment and is defined in the kernel, thus no package should be needed. – daleif Dec 01 '21 at 12:31
  • 2
    \put is not from graphicx. It doesn't mean anything if texstudio doesn't recognize it. Try this here as example: https://tex.stackexchange.com/a/114847/2388 – Ulrike Fischer Dec 01 '21 at 12:31

1 Answers1

0

Try to compose a minimal working example. This one should compile:

\documentclass{article}
\usepackage{mwe}
\usepackage{graphics}

\begin{document} \setlength{\unitlength}{1cm} \begin{picture}(10,10) \put(0,5){\includegraphics{example-image-a}} \end{picture} \end{document}

gigiair
  • 1,812
  • Thank you. It was omission on my part,. Forgot to enclose \put in figure. – Andjelko Basic Dec 01 '21 at 12:51
  • 1
    Unrelated, never use the minimal class for anything. It is not for public use and certain things aren't set up, so might confuse packages. Use article or standalone for MWEs – daleif Dec 01 '21 at 13:30
  • @Campa. I tried @giglair's code but deleting the picture environment so \put was in the normal text area. This raised errors about \raise. Are you sure that \put can be used anywhere? If so, how? – Peter Wilson Dec 01 '21 at 18:24
  • @PeterWilson My bad. I thought it started with \leavevmode but it doesn't, hence the error you observed. I should amend the statement to: It can be used wherever you like in horizontal mode. – campa Dec 01 '21 at 21:00