# Tag Info

## New answers tagged tikz-styles

3

\refstepcounter should be used before \label. \refstepcounter defines \@currentlabel that is used by \label. \documentclass{book} \usepackage{lipsum} \usepackage{mathpazo} \newcounter{exam}[chapter] \setcounter{exam}{0} \renewcommand{\theexam}{\thechapter.\arabic{exam}} % % Method 1 % ...

1

Here's my solution, which uses Python to parse the adjacency matrix into something TikZ can read. I'm using a Mac, so take that into account when I declare my directories. The steps I'm showing are just an example, but I think that's better than to do it very abstractly. So suppose that your main .tex file is located in /Users/Me/Desktop/latex/. Step 1: ...

0

Unrecommended way There are several ways, this one puts tikzpicture environment to another tikzpicture environment with help of a \node. %! *latex mal-tikz-tikz.tex \documentclass[a4paper]{article} \pagestyle{empty} \usepackage{tikz} \begin{document} \def\malpic{% \begin{tikzpicture}[scale=0.5] \draw (-1,0) arc (180:360:1cm and 0.5cm); ...

2

You can use adjustbox package and its adjustbox environment and to get a caption, use a figure environment: \begin{figure}[htbp] \begin{adjustbox}{max height=0.9\textheight,center} %% adjust max height your tikz code \end{adjustbox} \caption{This is my flow chart} \end{figure} Full code: \documentclass[a4paper,10pt]{article} ...

3

This happens because axis y line=right overwrites the ylabel style. If you swap the options around (axis y line=right,ylabel style={font=\tiny}) you get the expected result.

1

The draw key in the options list for the node tells TikZ to draw the node shape around the node. And the default node shape is rectangle. So this is why the node is boxed using the draw key. Remove the draw key from the node options to not draw the node: Code \documentclass{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture} \draw ...

5

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} ...

4

Here it is. This should start as the starting point. \documentclass{article} \usepackage{mathtools,amssymb} %% this is not needed. just for demo \usepackage{tikz} \usepackage{xparse} \NewDocumentCommand{\xrightarrows}{ O{}O{} }{% \mathrel{% \vcenter{\hbox{% \begin{tikzpicture} \node[minimum width=1cm,minimum height=1ex,anchor=south,align=center] ...

5

Here is a tikz solution. Using \DrawHorizontalPhaseLine{0,2,4}{-0.5, 4.7}{1, 2.5} and \DrawVerticalPhaseLine[$y$]{0,2,4}{-0.5, 4.7}{1, 2.5} yields: The parameters to \DrawHorizontalPhaseLine are: The optional axis label to be applied (defaults to no label). The axis tick labels The positions of the right arrows as a comma separated list. The ...

1

I have added the majority of TeXLive to TeX Writer and with that then the following compile: \documentclass{article} \usepackage[all]{xy} \begin{document} \xymatrix{ A &*+[F]{\sum_{i=n}^m {i^2}} \\ & {\bullet} & D \ar[ul] } \end{document} and \documentclass[10pt, draft]{amsart} \usepackage{pgf} \usepackage{tikz} \usepackage{tikz-cd} ...

6

An attempt where foreach loop to draw lines is used if possible. a line style is newly added. Code \documentclass[a4paper,10pt]{article} \usepackage[margin=1cm]{geometry} \usepackage[utf8]{inputenc} \usepackage{tikz} \usetikzlibrary{matrix,shapes,arrows,positioning,chains,calc} \begin{document} % Define block styles \tikzset{ desicion/.style={ ...

1

One option would be to scale it (and change the shorten value accordingly): \documentclass{article} \usepackage{tikz} \usetikzlibrary{arrows, decorations.markings} \tikzset{ vecArrow/.style={ thick, decoration={markings,mark=at position 1 with {\arrow[scale=2,thin]{open triangle 60}}}, double distance=1.4pt, shorten >= 10.5pt, preaction = ...

3

Like so: \documentclass{article} \usepackage{tikz} \begin{document} \begin{figure} \begin{tikzpicture}[scale=.8,auto=left,graph/.style={circle,fill=blue!30,linewidth=10mm,inner sep=0pt,minimum size=10pt}] \begin{scope}[every node/.style=graph] \node (n1) at (8,0) {e}; \node (n2) at (0,0) {e}; ...

2

This is quite fast workaround as the tikzpicture environments are independent of each other: \documentclass{article} \parindent=0pt \usepackage{tikz} \usetikzlibrary{chains,shapes} \tikzstyle{arrow} = [ shape=single arrow , single arrow head extend=.75em , single arrow head indent=.25em , minimum width=3em , draw ] \tikzstyle{rarrow} ...

2

You can use the fact that TikZ commands are overlat aware (I used \visible for the bended arrows to prevent the figure from "jumping around"): \documentclass{beamer} \usepackage{tikz} \usetikzlibrary{shapes.arrows} \begin{document} \begin{frame} \begin{figure} \centering \begin{tikzpicture} [scale=.8,auto=left,every node/.style={circle,fill=blue!20}] ...

3

(Highly unrecommended) Since you have asked and you probably need it, we can start changing catcodes, in this case: \catcode`\,=11 But we are running into a series of problems and even then you will find comma-related situations which would need a special attention. The reason is that commas are used as a list of parameters and point coordinates ...

9

You can't because TikZ performs tests such as Does the coordinate expression involve a colon? Then go to angle:radius polar syntax. Does it involve a dot? Then switch to (node name.angle) syntax etc. A code snippet from such parsing is below; \pgfutil@in@:{#2}% \ifpgfutil@in@ \let\@next\tikz@parse@polar% \else% \pgfutil@in@,{#2}% \ifpgfutil@in@% ...

Top 50 recent answers are included