Skip to content

Instantly share code, notes, and snippets.

@chentz78
Last active December 18, 2019 09:24
Show Gist options
  • Save chentz78/20fb298fa3c4d97b16b29dfbab8de0e8 to your computer and use it in GitHub Desktop.
Save chentz78/20fb298fa3c4d97b16b29dfbab8de0e8 to your computer and use it in GitHub Desktop.
Shooting target model to print in A4 paper and using Tikz and Latex. Preview https://chentz78.github.io/files/targetA4.pdf
%Based on
%* http://www.texample.net/tikz/examples/polar-coordinates-template/
%* https://michaelgoerz.net/notes/printable-paper-with-latex-and-tikz.html
\documentclass[a4paper, 10pt]{article}
\usepackage{euler}
\usepackage{tikz}
\usepackage{qrcode}
\begin{document}
\pagestyle{empty}
\begin{tikzpicture}[remember picture, overlay]
\tikzset{normal lines/.style={gray, very thin}}
\tikzset{margin lines/.style={gray, thick}}
\tikzset{mm lines/.style={gray, ultra thin}}
\tikzset{strong lines/.style={black, very thin}}
\tikzset{master lines/.style={black, very thick}}
\tikzset{dashed master lines/.style={loosely dashed, black, very thick}}
%A4 Paper = 210mm,297mm
\node at (current page.south west){
\begin{tikzpicture}[remember picture, overlay]
\draw[style=normal lines,step=10mm] (10mm,10mm) grid +(190mm,280mm);
%\draw[style=margin lines] (25mm,0)--(25mm,297mm);
%\draw[style=margin lines] (180mm,0)--(180mm,297mm);
\end{tikzpicture}
};
\node at (current page.north west){
\begin{tikzpicture}[remember picture, overlay]
%Marks
\draw (205mm, -147mm) node {\small\em 148.5mm}; %Vert
\draw (105mm, -4mm) node {\small\em 105mm}; %Horz
%Mark Lines x Cols
\foreach \v [count=\i] in {12,22,32,...,282}
\draw (5mm, -\v mm) node {\i};
\foreach \v [count=\i] in {15,25,...,195}
\draw (\v mm, -291mm) node {\i};
%Version Info
\draw (175mm,-4mm) node {\small\em Cleverton Hentz, Version 1.0, MIT Licence};
\end{tikzpicture}
};
\node at (current page.center){
\begin{tikzpicture}[remember picture, overlay]
%Circles
\foreach \r [count=\i] in {2,3.5,...,10.0} {
\draw[black,very thick] (0,0) circle (\r);
%Radius labels (background filled white)
\draw (\r,0) node[inner sep=1pt,below=3pt,rectangle,fill=white,xshift=-19pt] {\i};
};
%Main Rays
\foreach \a in {0, 90,...,359}
\draw[dashed,very thick] (0,0) -- (\a:10);
%Central point
\draw[fill=gray] (0,0) circle (6mm);
%Central point
\draw[fill=white] (0,0) circle (2.2mm);
\end{tikzpicture}
};
\node at (current page.south east) [xshift=-85pt,yshift=85pt] {
\qrcode[version=2,height=4cm]{https://gist.github.com/chentz78/20fb298fa3c4d97b16b29dfbab8de0e8}
};
\end{tikzpicture}
\end{document}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment