2

According to some coordinate system, whatever that may be, how can I position a scaled image where I want it in the document using the center of the image as the point of reference? For example, something like this:

\being{whatever}(4cm,6cm)
     \includegraphics[scale=0.5]{img.jpg}
\end{whatever}

Here is my minimal working whatever:

\documentclass{article}
\usepackage{something}
\title{Cartesian closed categories and the price of eggs}
\author{Jane Doe}
\date{September 1994}
\begin{document}
   \maketitle
   Hello world!
\end{document}
Blarxly
  • 43

1 Answers1

1

Simply replace the text that was being placed with the appropriate \includegraphics:

enter image description here

Below is an adaption of What are the ways to position things absolutely on the page to use \includegraphics[<<options>>]{<<file>>} instead of given text.

Code:

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{calc}

%% ------ https://tex.stackexchange.com/a/169836/4301 %% Following obtained from \layout. May need adjustment based on class and %% page settings. Alternatively, can set these to 0pt and then position will %% be relative to bottom left of page. \newcommand{\BottomLeftX}{1.0in+\hoffset+\oddsidemargin}% \newcommand{\BottomLeftY}{\paperheight-1.0in-\voffset-\topmargin-\headheight-\headsep-\textheight}%

\newcommand*{\AbsolutePosition}[4][]{% % #1 = tikz options % #2 = x (from south west corner of page % #3 = y % #4 = text \begin{tikzpicture}[remember picture,overlay, ultra thick] %\draw [shift={(#2,#3)},#1] (current page.south west) circle (2pt) \draw [#1] ($(current page.south west) + (\BottomLeftX,\BottomLeftY) + (#2,#3)$) %circle (2pt) % adding [opacity=0.2] to the node below will let you see this reference point node[] {#4}; \end{tikzpicture}% }

\title{Cartesian closed categories and the price of eggs} \author{Jane Doe} \date{September 1994} \begin{document} \maketitle Hello world!

\AbsolutePosition[fill=red,draw=red]{7.0cm}{12.0cm}{\includegraphics[scale=0.1]{../images/EiffelWide}} \end{document}

Peter Grill
  • 223,288
  • What about multiple images? I can place my signature in the right place, but when I try to position a pspicture barcode under the address I have in my document things start flying around... – Blarxly Apr 24 '14 at 21:06
  • @Blarxly: You should be able to place as many objects as you want. But if that does not work, you should post a new question with a MWE that reproduces the problem. – Peter Grill Apr 25 '14 at 04:33