Code Monkey home page Code Monkey logo

latex-graph-paper's Introduction

Build examples Latest Zip of PDFs

Graph papers in LaTeX: the gridpapers package

Make your own quadrille, graph, hex, etc. paper! Uses the PGF/TikZ package for LaTeX, which should be part of any modern TeX installation. All colors and spacing are customizable.

Once you clone or download the repo, simply run latex twice on the file "graph paper.tex" to produce a pdf. From the command line, type:

pdflatex "graph paper.tex"

There are more example .tex files in the examples directory to help get you started with customization. Each tex file has an almost-empty body, with a \usepackage statement that you can customize. For example, engineer-pad.tex looks like this:

\documentclass{article}
\usepackage[pattern=majmin, colorset=engineer]{gridpapers}
\begin{document}
\thispagestyle{empty}
~
\end{document}

(The ~ in the body forces a non-empty body, or else latex wouldn't generate a PDF).

Note: This package is distinct from a different package with a similar name, graphpaper (on CTAN).

Usage

All the configuration happens via the \usepackage command. The current valid options are:

  • pattern=<name>: Valid pattern names are: std,stdeight,majmin,dot,hex,hexup,tri,iso,lightcone,ruled,doubleruled. Default is std. Patterns come with default page geometry (size and margins; see geometry), and default 'fullness' (whether they fill the page or not; see options fullpage and textarea).
  • colorset=<name>: Valid color preset names are: std,precocious,ghostly,brickred,engineer,plumpad. Default is std. A preset determines the majorcolor, minorcolor, and bgcolor all at once. But, you can start from a preset and then override some colors.
  • majorcolor=<color>: Override the preset "major" color. This can be a named color, or using the syntax from xcolor to mix colors together.
  • minorcolor=<color>: Override the preset "minor" color. As above.
  • bgcolor=<color>: Override the preset background color. As above.
  • patternsize=<length>: Override the preset pattern size. The meaning of this length argument is different for each pattern; see PDF documentation for full details..
  • dotsize=<length>: Controls the size of the dots themselves for pattern=dot. Default: .7pt
  • fullpage: Make the pattern fill the whole page.
  • textarea: Make the pattern fill only the text area of the document. At most one of the fullpage or textarea can be specified. If one is specified, it will override the default 'fullness' setting of the pattern.
  • geometry={<geometry spec>}: Page geometry specification, using the syntax of the geometry package. If the geometry package was loaded before gridpapers, this option will be ignored. This specification will override the pattern's default page geometry.

For example, let's say you want to use the tri pattern, which by default fills the page. But you want it to fill just the textarea of an A4 page with 2cm margins, and you want the triangles to be .75cm long. Finally, you like the colors of the engineer set, but want a white background. Then you would write:

\usepackage[pattern=tri,
  patternsize=0.75cm,
  textarea,
  colorset=engineer,
  bgcolor=white,
  geometry={a4paper, margin=2cm}]{gridpapers}

Gallery

Some example styles:

Standard

Quad

Hex

Dots

Light cone

Precocious Engineer

Hex Engineer

Credits

This package was created by Robert McNees with additional contributions from Leo C. Stein, and is maintained by both. This material is subject to the LaTeX Project Public License 1.3c, (c) 2017-2021. The hexagon pattern code is due to Philippe Goutet.

latex-graph-paper's People

Contributors

duetosymmetry avatar mcnees avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.