3

I just wanted to define a new style, a very very simple one with align left, text width=6cm but I found out even simpler code won't work. Basically I assume my installation is broken or I run the code in some secretly incorrect way. Googled for this for about 20 minutes already and I just can't figure it out.

EDIT My eyes still work fine, by the way. Long day.

MWE

\documentclass[
a4paper
]{scrartcl}

\usepackage{
newtxtext,
amsmath,
}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}

\usepackage{tikz}
\tikzset{
sometest/.style{
    align=left,
    text width=5cm
},
asdfasdf/.style{
    rectangle
},
}

\listfiles

\begin{document}
Test.
\begin{center}
\begin{tikzpicture}
\node {Something text.};
\node[sometest] {AAA};
\end{tikzpicture}
\end{center}
\end{document}
\end{document}

produces

enter image description here

File List

*File List*
scrartcl.cls    2013/12/19 v3.12 KOMA-Script document class (article)
scrkbase.sty    2013/12/19 v3.12 KOMA-Script package (KOMA-Script-dependent bas
ics and keyval usage)
 scrbase.sty    2013/12/19 v3.12 KOMA-Script package (KOMA-Script-independent b
asics and keyval usage)
  keyval.sty    1999/03/16 v1.13 key=value parser (DPC)
scrlfile.sty    2013/12/19 v3.12 KOMA-Script package (loading files)
tocbasic.sty    2013/12/19 v3.12 KOMA-Script package (handling toc-files)
scrsize11pt.clo    2013/12/19 v3.12 KOMA-Script font size class option (11pt)
typearea.sty    2013/12/19 v3.12 KOMA-Script package (type area)
newtxtext.sty    2014/04/07 v1.25
fontaxes.sty    2014/03/23 v1.0d Font selection axes
 xkeyval.sty    2012/10/14 v2.6b package option processing (HA)
 xkeyval.tex    2012/10/14 v2.6b key=value parser (HA)
etoolbox.sty    2011/01/03 v2.1 e-TeX tools for LaTeX
    etex.sty    1998/03/26 v2.0 eTeX basic definition package (PEB)
 fontenc.sty
   t1enc.def    2005/09/27 v1.99g Standard LaTeX file
textcomp.sty    2005/09/27 v1.99g Standard LaTeX package
  ts1enc.def    2001/06/05 v3.0e (jk/car/fm) Standard LaTeX file
 amsmath.sty    2013/01/14 v2.14 AMS math features
 amstext.sty    2000/06/29 v2.01
  amsgen.sty    1999/11/30 v2.0
  amsbsy.sty    1999/11/29 v1.2d
  amsopn.sty    1999/12/14 v2.01 operator names
 fontenc.sty
   t1enc.def    2005/09/27 v1.99g Standard LaTeX file
inputenc.sty    2008/03/30 v1.1d Input encoding file
    utf8.def    2008/04/05 v1.1m UTF-8 support for inputenc
   t1enc.dfu    2008/04/05 v1.1m UTF-8 support for inputenc
  ot1enc.dfu    2008/04/05 v1.1m UTF-8 support for inputenc
  omsenc.dfu    2008/04/05 v1.1m UTF-8 support for inputenc
  ts1enc.dfu    2008/04/05 v1.1m UTF-8 support for inputenc
    tikz.sty    2013/12/13 v3.0.0 (rcs-revision 1.142)
     pgf.sty    2013/12/18 v3.0.0 (rcs-revision 1.14)
  pgfrcs.sty    2013/12/20 v3.0.0 (rcs-revision 1.28)
everyshi.sty    2001/05/15 v3.00 EveryShipout Package (MS)
  pgfrcs.code.tex
 pgfcore.sty    2010/04/11 v3.0.0 (rcs-revision 1.7)
graphicx.sty    1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)
graphics.sty    2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)
    trig.sty    1999/03/16 v1.09 sin cos tan (DPC)
graphics.cfg    2010/04/23 v1.9 graphics configuration of TeX Live
  pdftex.def    2011/05/27 v0.06d Graphics/color for pdfTeX
infwarerr.sty    2010/04/08 v1.3 Providing info/warning/error messages (HO)
 ltxcmds.sty    2011/11/09 v1.22 LaTeX kernel commands for general use (HO)
  pgfsys.sty    2013/11/30 v3.0.0 (rcs-revision 1.47)
  pgfsys.code.tex
pgfsyssoftpath.code.tex    2013/09/09  (rcs-revision 1.9)
pgfsysprotocol.code.tex    2006/10/16  (rcs-revision 1.4)
  xcolor.sty    2007/01/21 v2.11 LaTeX color extensions (UK)
   color.cfg    2007/01/18 v1.5 color configuration of teTeX/TeXLive
 pgfcore.code.tex
pgfcomp-version-0-65.sty    2007/07/03 v3.0.0 (rcs-revision 1.7)
pgfcomp-version-1-18.sty    2007/07/23 v3.0.0 (rcs-revision 1.1)
  pgffor.sty    2013/12/13 v3.0.0 (rcs-revision 1.25)
 pgfkeys.sty    
 pgfkeys.code.tex
 pgfmath.sty    
 pgfmath.code.tex
  pgffor.code.tex
    tikz.code.tex
  ts1cmr.fd    1999/05/25 v2.5h Standard LaTeX font definitions
 t1ntxrx.fd    2012/12/25 v1.0
supp-pdf.mkii
pdftexcmds.sty    2011/11/29 v0.20 Utility functions of pdfTeX for LuaTeX (HO)
ifluatex.sty    2010/03/01 v1.3 Provides the ifluatex switch (HO)
   ifpdf.sty    2011/01/30 v2.3 Provides the ifpdf switch (HO)
epstopdf-base.sty    2010/02/09 v2.5 Base part for package epstopdf
  grfext.sty    2010/08/19 v1.1 Manage graphics extensions (HO)
kvdefinekeys.sty    2011/04/07 v1.3 Define keys (HO)
kvoptions.sty    2011/06/30 v3.11 Key value format for package options (HO)
kvsetkeys.sty    2012/04/25 v1.16 Key value parser (HO)
etexcmds.sty    2011/02/16 v1.5 Avoid name clashes with e-TeX commands (HO)
epstopdf-sys.cfg    2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Live
henry
  • 6,594

1 Answers1

4

You are missing an = following the .style={}.

Code:

\documentclass[
a4paper
]{scrartcl}

\usepackage{ newtxtext, amsmath, } \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc}

\usepackage{tikz} \tikzset{ sometest/.style={ align=left, text width=5cm }, asdfasdf/.style={ rectangle }, }

\listfiles

\begin{document} Test. \begin{center} \begin{tikzpicture} \node {Something text.}; \node[sometest] {AAA}; \end{tikzpicture} \end{center} \end{document} \end{document}

Peter Grill
  • 223,288
  • 1
    Oh... right. Let's all move along, nothing to see here, nothing to see here. – henry Apr 09 '14 at 16:22
  • 1
    @henry: :-) Yeah I know the feeling. I Have quite a few embarrassing questions here myself. But you are probably not the last one to get stuck like this so your question may help someone in the future. – Peter Grill Apr 09 '14 at 16:24
  • Haha, thanks. Yes, once in a while the most simple things turn into mystical adventures, especially due to lousy c & p events... – henry Apr 09 '14 at 16:28
  • 1
    @henry: My latest question which I am pretty sure will turn out to be quite embarrassing once an answer is posted: \foreach not behaving in axis environment. So, now you can have a laugh at my expense. :-) – Peter Grill Apr 10 '14 at 04:10
  • :) But actually that is very interesting, haven't run into that one yet. Personally, I like TikZ for such kind of graphs more. I only use pgfplots to plot data based on files, i.e. tables from another program. – henry Apr 11 '14 at 07:40