# Using pstricks, I need to created the following grid sheet, which fits well with A4 paper

Distance between any adjacent horizontal lines or adjacent vertical lines is 10 mm.

The 2 vertical border lines are 1.0pt thick. The 18 vertical lines are 0.1pt thick.

The 2 horizontal border lines are 1.0pt thick. The 25 horizontal lines are 0.1pt thick.

The ticks are 0.1pt thick and are placed at the midpoints.

Everything should fit in the A4 paper (210 mm x 297 mm)!

Greatly appreciate COMPLETE CODE to generate the Rectangular Grid Sheet, using PsTricks.

ps:

1. I am new to this website, kindly forgive my mistakes.
2. I have created this drawing in AutoCAD but when I take the print out, it is not neat. Let us FORGET AutoCAD!
3. I have managed to generate this grid in LaTeX, but not sure it is clean one!
4. COMPLETE CODE, actually helps me understand how many of the experts are solving this problem with different tools/methods.
5. This is not assignment question.
6. I have to create Isometric Sheet as well. Before I post that question, I will use the tools I will learn here, and post specific question when encountered with a problem.
7. I tried in pspicture environment.

THE CODE.

\documentclass[12pt,a4paper]{article}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{pst-plot}
\usepackage{pstricks}
\usepackage{pst-all}
\usepackage{auto-pst-pdf}
\usepackage{pst-pdf}
\usepackage{multido}
\usepackage{textpos}
\begin{document}

\thispagestyle{empty}

\psset{xunit=1cm,yunit=1cm}

\begin{pspicture}(3.2,5)(23,23)
\multiput(1,0)(1,0){18}{\psline[linewidth=0.2pt](0,26)}
\multiput(0,1)(0,1){25}{\psline[linewidth=0.2pt](19,0)}
\psline[linewidth=1.0pt](0,0)(0,26)
\psline[linewidth=1.0pt](19,0)(19,26)
\psline[linewidth=1.0pt](0,0)(19,0)
\psline[linewidth=1.0pt](0,26)(19,26)
%
\multiput(0.5,0)(1,0){19}{\psline[linewidth=0.2pt](0,-0.1)(0,0.1)}
\multiput(0.5,0)(1,0){19}{\psline[linewidth=0.2pt](0,0.9)(0,1.1)}
\multiput(0.5,0)(1,0){19}{\psline[linewidth=0.2pt](0,1.9)(0,2.1)}
\multiput(0.5,0)(1,0){19}{\psline[linewidth=0.2pt](0,2.9)(0,3.1)}
\multiput(0.5,0)(1,0){19}{\psline[linewidth=0.2pt](0,3.9)(0,4.1)}
\multiput(0.5,0)(1,0){19}{\psline[linewidth=0.2pt](0,4.9)(0,5.1)}
\multiput(0.5,0)(1,0){19}{\psline[linewidth=0.2pt](0,5.9)(0,6.1)}
\multiput(0.5,0)(1,0){19}{\psline[linewidth=0.2pt](0,6.9)(0,7.1)}
\multiput(0.5,0)(1,0){19}{\psline[linewidth=0.2pt](0,7.9)(0,8.1)}
\multiput(0.5,0)(1,0){19}{\psline[linewidth=0.2pt](0,8.9)(0,9.1)}
\multiput(0.5,0)(1,0){19}{\psline[linewidth=0.2pt](0,9.9)(0,10.1)}
\multiput(0.5,0)(1,0){19}{\psline[linewidth=0.2pt](0,10.9)(0,11.1)}
\multiput(0.5,0)(1,0){19}{\psline[linewidth=0.2pt](0,11.9)(0,12.1)}
\multiput(0.5,0)(1,0){19}{\psline[linewidth=0.2pt](0,12.9)(0,13.1)}
\multiput(0.5,0)(1,0){19}{\psline[linewidth=0.2pt](0,13.9)(0,14.1)}
\multiput(0.5,0)(1,0){19}{\psline[linewidth=0.2pt](0,14.9)(0,15.1)}
\multiput(0.5,0)(1,0){19}{\psline[linewidth=0.2pt](0,15.9)(0,16.1)}
\multiput(0.5,0)(1,0){19}{\psline[linewidth=0.2pt](0,16.9)(0,17.1)}
\multiput(0.5,0)(1,0){19}{\psline[linewidth=0.2pt](0,17.9)(0,18.1)}
\multiput(0.5,0)(1,0){19}{\psline[linewidth=0.2pt](0,18.9)(0,19.1)}
\multiput(0.5,0)(1,0){19}{\psline[linewidth=0.2pt](0,19.9)(0,20.1)}
\multiput(0.5,0)(1,0){19}{\psline[linewidth=0.2pt](0,20.9)(0,21.1)}
\multiput(0.5,0)(1,0){19}{\psline[linewidth=0.2pt](0,21.9)(0,22.1)}
\multiput(0.5,0)(1,0){19}{\psline[linewidth=0.2pt](0,22.9)(0,23.1)}
\multiput(0.5,0)(1,0){19}{\psline[linewidth=0.2pt](0,23.9)(0,24.1)}
\multiput(0.5,0)(1,0){19}{\psline[linewidth=0.2pt](0,24.9)(0,25.1)}
\multiput(0.5,0)(1,0){19}{\psline[linewidth=0.2pt](0,25.9)(0,26.1)}
%
\multiput(0,0.5)(0,1){26}{\psline[linewidth=0.2pt](-0.1,0)(0.1,0)}
\multiput(0,0.5)(0,1){26}{\psline[linewidth=0.2pt](0.9,0)(1.1,0)}
\multiput(0,0.5)(0,1){26}{\psline[linewidth=0.2pt](1.9,0)(2.1,0)}
\multiput(0,0.5)(0,1){26}{\psline[linewidth=0.2pt](2.9,0)(3.1,0)}
\multiput(0,0.5)(0,1){26}{\psline[linewidth=0.2pt](3.9,0)(4.1,0)}
\multiput(0,0.5)(0,1){26}{\psline[linewidth=0.2pt](4.9,0)(5.1,0)}
\multiput(0,0.5)(0,1){26}{\psline[linewidth=0.2pt](5.9,0)(6.1,0)}
\multiput(0,0.5)(0,1){26}{\psline[linewidth=0.2pt](6.9,0)(7.1,0)}
\multiput(0,0.5)(0,1){26}{\psline[linewidth=0.2pt](7.9,0)(8.1,0)}
\multiput(0,0.5)(0,1){26}{\psline[linewidth=0.2pt](8.9,0)(9.1,0)}
\multiput(0,0.5)(0,1){26}{\psline[linewidth=0.2pt](9.9,0)(10.1,0)}
\multiput(0,0.5)(0,1){26}{\psline[linewidth=0.2pt](10.9,0)(11.1,0)}
\multiput(0,0.5)(0,1){26}{\psline[linewidth=0.2pt](11.9,0)(12.1,0)}
\multiput(0,0.5)(0,1){26}{\psline[linewidth=0.2pt](12.9,0)(13.1,0)}
\multiput(0,0.5)(0,1){26}{\psline[linewidth=0.2pt](13.9,0)(14.1,0)}
\multiput(0,0.5)(0,1){26}{\psline[linewidth=0.2pt](14.9,0)(15.1,0)}
\multiput(0,0.5)(0,1){26}{\psline[linewidth=0.2pt](15.9,0)(16.1,0)}
\multiput(0,0.5)(0,1){26}{\psline[linewidth=0.2pt](16.9,0)(17.1,0)}
\multiput(0,0.5)(0,1){26}{\psline[linewidth=0.2pt](17.9,0)(18.1,0)}
\multiput(0,0.5)(0,1){26}{\psline[linewidth=0.2pt](18.9,0)(19.1,0)}
%
\end{pspicture}

\end{document}
• Welcome to TeX.sx! On this site, a question should typically revolve around an abstract issue (e.g. "How do I get a double horizontal line in a table?") rather than a concrete application (e.g. "How do I make this table?"). Questions that look like "Please do this complicated thing for me" tend to get closed because they are either "off topic", "too broad", or "unclear". Please try to make your question clear and simple by giving a minimal working example (MWE): you'll stand a greater chance of getting help. – Werner Sep 16 '14 at 23:28
• Give me time several nano seconds please... – kiss my armpit Sep 16 '14 at 23:51
• @Ohmyghost if your nano seconds estimate is correct, I am experiencing some serious time dilation at the moment... ;-) – Paul Gessler Sep 17 '14 at 0:14
• @PaulGessler: :-) – kiss my armpit Sep 17 '14 at 0:45
• There used to be a site featuring all kinds of printable paper created in TiKZ at michaelgoerz.net/blog/2009/07/… but the site has disappeared. Does anybody know if anything similar exists elsewhere? [Note that I don't know it would have answered this question even if this question did not include a pstricks condition.] – cfr Sep 17 '14 at 1:37

The grid in my answer not only conforms to the requirement but also respects the aesthetic aspects. It means that the grid is horizontally and vertically centered (please kindly see the last edit, the red frame emphasizes the paper border).

\documentclass[pstricks]{standalone}
\usepackage{pst-node}
\psset{dimen=monkey}
\begin{document}
\begin{pspicture}(210mm,297mm)
\rput(105mm,148.5mm){%
\pspicture[linewidth=.1pt](18,25)
\multips(0,0)(1,0){18}{\multips(0,0)(0,1){25}{\psframe(1,1)\multips(0,0)(1,0){2}{\psline(-2pt,.5)(2pt,.5)}\multips(0,0)(0,1){2}{\psline(.5,-2pt)(.5,2pt)}}}
\psframe[linewidth=1pt](18,25)
\endpspicture
}
\end{pspicture}
\end{document}

## Edit

\documentclass[pstricks]{standalone}
\usepackage{pst-node}
\psset{dimen=monkey}
\begin{document}
\begin{pspicture}(210mm,297mm)
\rput(105mm,148.5mm){%
\pspicture[linewidth=.1pt](18,25)
\multips(0,0)(1,0){18}{\multips(0,0)(0,1){25}{\psframe(1,1)\multips(0,0)(1,0){2}{\psline(-2pt,.5)(2pt,.5)}\multips(0,0)(0,1){2}{\psline(.5,-2pt)(.5,2pt)}}}
\psframe[linewidth=1pt](18,25)
\endpspicture
}
\rput(105mm,\dimexpr148.5mm+12.5cm+12pt){This form is generated by the omnipotent PSTricks. }
\end{pspicture}
\end{document}

• Great code! Neatly done. Thanks a million! Appreciate it all. – ltxEnthu Sep 17 '14 at 1:10
• I am unable to add text to it! For e.g. \rput(105mm,148.5mm){text} – ltxEnthu Sep 17 '14 at 1:14
• @ltxEnthu: Please kindly see my last edit, it has the text in question. – kiss my armpit Sep 17 '14 at 6:23

Before "Oh my ghost" comes up with pstricks answer, here is a more verbose tikz answer for him (he likes them very much) ;-)

\documentclass[tikz,border=2mm]{standalone}
\begin{document}
\begin{tikzpicture}
\draw[line width=1pt] (0,0) -- (210mm,0);
\draw[line width=1pt] (0,300mm) -- (210mm,300mm);
\draw[line width=1pt] (0,0) -- (0,300mm);
\draw[line width=1pt] (210mm,0) -- (210mm,300mm);
\foreach \a in {5,15,...,205} {
\draw[line width=1pt] (\a mm,0.1) -- (\a mm,-0.1);
\draw[line width=1pt] ([yshift=300mm]\a mm,0.1) -- ([yshift=300mm]\a mm,-0.1);
}
\foreach \a in {5,15,...,295} {
\draw[line width=1pt] (0.1,\a mm) -- (-0.1,\a mm);
\draw[line width=1pt] ([xshift=210mm]0.1,\a mm) -- ([xshift=210mm]-0.1,\a mm);
}
\foreach \b in {1,2,...,20} {
\draw[line width=0.1pt] (\b,0) -- (\b,300mm);
}
\foreach \b in {1,2,...,20} {
\foreach \a in {5,15,...,295} {
\draw[line width=0.1pt] ([xshift=\b cm]0.1,\a mm) -- ([xshift=\b cm]-0.1,\a mm);
}
}
\foreach \b in {1,2,...,29} {
\draw[line width=0.1pt] (0,\b) -- (210mm,\b);
}
\foreach \b in {1,2,...,29} {
\foreach \a in {5,15,...,205} {
\draw[line width=0.1pt] ([yshift=\b cm]\a mm,0.1) -- ([yshift=\b cm]\a mm,-0.1);
}
}
\end{tikzpicture}
\end{document}

Here is a less verbose code for humans ;-)

\documentclass[tikz,border=2mm]{standalone}
\begin{document}
\begin{tikzpicture}
\draw[line width=1pt] (0,0) rectangle (210mm,300mm);
\draw[help lines, line width=0.1pt,step=1cm] (0,0) grid (210mm,300mm);
\foreach \x in {0,1,...,21} {
\foreach \y in {5,15,...,295} {
\draw[line width=0.1pt] ([xshift=\x cm]0.1,\y mm) -- ([xshift=\x cm]-0.1,\y mm);
}
}
\foreach \y in {0,10,...,300} {
\foreach \x in {5,15,...,205} {
\draw[line width=0.1pt] ([yshift=\y mm]\x mm,0.1) -- ([yshift=\y mm]\x mm,-0.1);
}
}
\end{tikzpicture}
\end{document}
• Faster than pstricks despite requiring "many more keystrokes"! :-) – Paul Gessler Sep 17 '14 at 0:16
• Thanks a tonne Harish Kumar. I use TeXstudio on Windows OS. I ran the code, it did not show the grid you posted here. – ltxEnthu Sep 17 '14 at 0:27
• @Harish Kumar. I use MikTeX. – ltxEnthu Sep 17 '14 at 0:33
• Before "Oh my ghost" comes up with pstricks answer, here is a more verbose tikz answer for him (he likes them very much) ;-) Haha. :) – henry Sep 17 '14 at 7:27

Another short solution with pstricks, using \psgrid, multips and the subticks parameter of pst-plot — and some colour in addition:

\documentclass[a4paper,11pt,x11names,svgnames]{article}

\usepackage[margin = 1.5cm, noheadfoot]{geometry}
\usepackage{auto-pst-pdf}
\usepackage{xcolor}
\setlength\parindent{0pt}
\pagestyle{empty}

\begin{document}

\begin{pspicture}(0,0)(18,25)
\psset{linecolor=DodgerBlue4, tickcolor=white, subtickcolor=DodgerBlue4, gridcolor=DodgerBlue4, gridlabelcolor=white}%
\psset{linewidth=0.1pt, tickwidth=0.1pt, ticksize=-2pt 2pt, subticks=2, subtickwidth=0.1pt, labels=none}
\psframe[linewidth=1pt](0,0)(18,25)
\multips(0,0)(1,0){19}{\psaxes[yAxis](0,0)(0,25)}%
\multips(0,0)(0,1){26}{\psaxes[xAxis,](0,0)(18,0)}
\psset{gridwidth=0.1pt, subgriddiv=1}
\psgrid(0,0)(18,25)
\end{pspicture}

\end{document}

It can be compiled with pdfLaTeX.

• Thank you very much folks for great time here. Great answers, so many way to do same stuff. – ltxEnthu Sep 17 '14 at 15:31