LaTeX forum ⇒ Graphics, Figures & TablesAdding a Touch of Style in Till's manual Topic is solved

Information and discussion about graphics, figures & tables in LaTeX documents.
Posts: 3
Joined: Tue Jul 18, 2017 11:38 pm

Adding a Touch of Style in Till's manual

Postby ehud » Wed Aug 16, 2017 5:41 pm

Section 2.8 in Till Tantau's manual for TikZ tells me that I can manage styles - predefined sets of options that can be used to organize how a graphic is drawn.

I am trying to set my grid to be in red by manipulating help lines:

  1. \documentclass[tikz,border=2mm]{standalone}
  2. \begin{document}
  3. \begin{tikzpicture}[scale=2.5]
  4. help line/.style={color=red, very thin}
  5. \draw [help lines] (-4,-4) grid (4,4);
  6. \end{tikzpicture}
  7. \end{document}

but it doesn't work. Anything that I am missing here?

User avatar
Stefan Kottwitz
Site Admin
Posts: 8368
Joined: Mon Mar 10, 2008 9:44 pm
Location: Hamburg, Germany

Postby Stefan Kottwitz » Wed Aug 16, 2017 7:44 pm


there are two small things:

- the s at the end of help lines was missing
- the style has to be set in the tikzpicture options, in the square brackets (but can be set globally via \tikzstyle too)

  1. \documentclass[tikz,border=2mm]{standalone}
  2. \begin{document}
  3. \begin{tikzpicture}[scale=2.5,
  4. help lines/.style={color=red, very thin}]
  5. \draw [help lines] (-4,-4) grid (4,4);
  6. \end{tikzpicture}
  7. \end{document}

Site admin

Return to “Graphics, Figures & Tables”

Who is online

Users browsing this forum: No registered users and 8 guests