graphicss.sty
changeset 1019 f71399fe3fdc
equal deleted inserted replaced
1018:fd6a64c53f0e 1019:f71399fe3fdc
       
     1 \usepackage{tikz}
       
     2 \usepackage{pgf}
       
     3 \usetikzlibrary{positioning}
       
     4 \usetikzlibrary{calc}
       
     5 \usetikzlibrary{automata}
       
     6 \usetikzlibrary{arrows}
       
     7 \usetikzlibrary{backgrounds}
       
     8 \usetikzlibrary{fit}
       
     9 \usetikzlibrary{shadows}
       
    10 \usepackage{tikz-qtree}
       
    11 \usepackage{graphicx} 
       
    12 \usepackage{pgfplots}
       
    13 
       
    14 
       
    15 
       
    16 \pgfplotsset{compat=1.15}
       
    17 
       
    18 \newenvironment{bubble}[1][]{%
       
    19 \addtolength{\leftmargini}{4mm}%
       
    20 \begin{tikzpicture}[baseline=(current bounding box.north)]%
       
    21 \draw (0,0) node[drop shadow,inner sep=2mm,fill=cream,ultra thick,draw=red,rounded corners=2mm]% 
       
    22 \bgroup\begin{minipage}{#1}\raggedright{}}
       
    23 {\end{minipage}\egroup;%
       
    24 \end{tikzpicture}\bigskip}
       
    25 
       
    26 
       
    27 %%% for trees
       
    28 %% http://anorien.csc.warwick.ac.uk/mirrors/CTAN/graphics/pgf/contrib/forest/forest.pdf
       
    29 
       
    30 \newcommand\grid[1]{%
       
    31 \begin{tikzpicture}[baseline=(char.base)]
       
    32   \path[use as bounding box]
       
    33     (0,0) rectangle (1em,1em);
       
    34   \draw[red!50, fill=red!20]
       
    35     (0,0) rectangle (1em,1em);
       
    36   \node[inner sep=1pt,anchor=base west]
       
    37     (char) at (0em,\gridraiseamount) {#1};
       
    38 \end{tikzpicture}}
       
    39 \newcommand\gridraiseamount{0.12em}
       
    40 
       
    41 \makeatletter
       
    42 \newcommand\Grid[1]{%
       
    43   \@tfor\z:=#1\do{\grid{\z}}}
       
    44 \makeatother	
       
    45 
       
    46 \newcommand\Vspace[1][.3em]{%
       
    47   \mbox{\kern.06em\vrule height.3ex}%
       
    48   \vbox{\hrule width#1}%
       
    49   \hbox{\vrule height.3ex}}
       
    50 
       
    51 \def\VS{\Vspace[0.6em]}