# CircuiTikZ: How to create professional wiring diagram borders?

Assumed we have this Minimum Working Example (MWE):

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{circuits.ee.IEC}

\begin{document}
\begin{tikzpicture}[circuit ee IEC]
\draw (0,0) to [battery={info={$e_1$}}] ++(10,0)
to [current direction' = {info = {$i$}, near start}, resistor = {info = {$R$}, near end}] ++(0,10)
to [bulb] ++(-10,0) to[current direction' = {info = {$i$}}] (0,0);
\end{tikzpicture}
\end{document}


Screenshot of the result:

As you can see, this is just an ugly whitepage. Would it be possible to add some nice page borders containing document information to let the sheet appear a bit more professional?

I would dream about some nice borders based on the following ideas.

Screenshots of nice wiring diagram borders:

Maybe there is some good template available to upstyle the initial wiring diagram to improve its appearance?

• In technical language that is called a title block. There was already this same question, with no answers though. – Massimo Ortolano Jun 9 '19 at 18:05
• You are not using circuitikz in your example. Anyway, both it and the circuit library are just drawing; you can use boxes and matrix to draw this kind of things. If your question is if there are pre-made template, I think the answer is no. – Rmano Jun 9 '19 at 19:35
• This look like a company or possibly government dependent form. So unless whoever specified the form has a template, odds are against it. – John Kormylo Jun 9 '19 at 21:48

## 1 Answer

Just as a starting point: you can use absolute page coordinate (see Positioning relative to page in TikZ) and overlays, together with a bit of coordinate labeling...

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

\begin{tikzpicture}[overlay, remember picture]
\draw (current page.center)  ++(-20,14) coordinate (NW) % using 40x28cm
-- ++(40,0) coordinate (NE)
-- ++(0,-28) coordinate (SE)
-- ++(-40,0) coordinate (SW)
-- cycle;
\foreach \x in {0,5,...,35}
\draw (NW) ++(\x,0) rectangle ++(5,-1) ++(-2.5, 0.5) node[]{\x};
\node [draw, anchor=south east, align=left, font=\Huge, inner sep=12pt]
at(SE) {Drawn by yours truly\\Romano};
\end{tikzpicture}

\begin{circuitikz}[remember picture, overlay]
\draw (current page.center) node[op amp](A3){} (A3.+) -- ++(0,-0.5) node[ground]{};
\draw (A3.-) to[R, l_=$R$, name=c3] ++(-2,0) coordinate(in) (A3.-) -- ++(0,1)
coordinate(tmp) to[R, l_=$R$] (tmp-|A3.out) -- (A3.out) -- ++(1,0) node[midway, above]{out} ;
\draw (in) node[op amp, noinv input up, anchor=out](B){} (B.-) -- ++(0,-1) coordinate(tmp) -- (tmp-|B.out) -- (B.out);
\draw (B.+) -- ++(-0.5,0) node[midway, above]{in};
\end{circuitikz}
\end{document}


• This is awesome, thank you very much! Would it be possible to replace the precise \x text with symbolic x coords like T1, T2, ... , T5 (instead of the current measuring value 0, 5, ... , 35)? – Dave Jun 16 '19 at 10:46
• Yes, of course. \foreach is very powerful; look at the manual (TikZ manual, section 83, page 900 in version 3.0.1a). Try: \foreach \x [count=\i from 1] in {0,5,...,35} \draw (NW) ++(\x,0) rectangle ++(5,-1) ++(-2.5, 0.5) node[]{T\i}; – Rmano Jun 16 '19 at 16:04
• Wow, this is nice! Thank you! :-) – Dave Jun 16 '19 at 16:21