3

Consider the following Minimum Working Example to get some nice technical drawing template:

\documentclass{report}
\pagestyle{empty}
\usepackage[a3paper, landscape]{geometry}
\usepackage{circuitikz}

\begin{document}
    \begin{tikzpicture}[overlay, remember picture]
        \draw (current page.center)  ++(-20,14) coordinate (NW) % using 40x28cm because A3 has 420x297
            -- ++(40,0) coordinate (NE)
            -- ++(0,-28) coordinate (SE)
            -- ++(-40,0) coordinate (SW)
            -- cycle;
        \foreach \x [count=\i from 1] in {0,5,...,35}
             \draw (NW) ++(\x,0) rectangle ++(5,-1) ++(-2.5, 0.5) node[]{\i};

    \end{tikzpicture}
\end{document}

Screenshot of the result:

Screenshot of the result


Question:

How can I insert an image that is centered in the middle of the white area?

If I just use \includegraphics{filename} the whole border will be shifted out of the page...


Screenshot of the desired state:

Screenshot of the desired state

1
  • This has little to do with circuitikz...
    – Rmano
    Commented Sep 12, 2019 at 20:32

1 Answer 1

6
\documentclass{report}
\pagestyle{empty}
\usepackage[a3paper, landscape]{geometry}
\usepackage{circuitikz}
\usepackage{graphicx}

\begin{document}
    \begin{tikzpicture}[overlay, remember picture]
        \draw[blue] (current page.center)  ++(-20,14) coordinate (NW) % using 40x28cm because A3 has 420x297
            -- ++(40,0) coordinate (NE)
            -- ++(0,-28) coordinate (SE)
            -- ++(-40,0) coordinate (SW)
            -- cycle;
        \foreach \x [count=\i from 1] in {0,5,...,35}
             \draw (NW) ++(\x,0) rectangle ++(5,-1) ++(-2.5, 0.5) node{\i};
             %                                   ^ the yshift is half this number "-1", in this case, -0.5.
        \node[yshift=-0.5cm] at (current page.center){\includegraphics[scale=3]{example-image}};
    \end{tikzpicture}
\end{document}

Output

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .