Tag Info

Hot answers tagged

7

Using text depth and text height, you can control the total height for the nodes; text width gives you control over the width (there's also a minimum size key which could be used): \documentclass{article} \usepackage[svgnames]{xcolor} \usepackage{tikz} \begin{document} \begin{tikzpicture}[every node/.style={anchor=base,text depth=.5ex,text ...


6

You can use every node/.style={font=\strut} Code \documentclass[tikz,margin=10pt]{standalone} \begin{document} \begin{tikzpicture}[ shorten >=1pt, every node/.style={font=\strut}, node distance=1cm, auto ] \node(q_0) {$c$}; \node(q_1) [right of=q_0] {$b$}; \node(q_2) [right of=q_1] {$a$}; \node(q_3) [right of=q_2] {$c$}; ...


5

Maybe this gives you a start: \documentclass[tikz]{standalone} \usepackage[utf8]{inputenc} \usetikzlibrary{automata,positioning,arrows,matrix,backgrounds,calc} \usetikzlibrary{decorations.text} \usetikzlibrary{decorations.pathmorphing} \usetikzlibrary{shapes.geometric} \tikzset{ node_standard/.style = { ->,>=stealth',shorten >=1pt,node ...


5

You can move a single node near coord by using a conditional yshift that checks the current coordinate index, which is stored in the macro \coordindex: \documentclass{article} \usepackage{pgfplots} \begin{document} \pgfplotsset{every axis/.append style={ font=\footnotesize, line width=0.5pt, bar width=7pt, tick style={line width=0.4pt}}} ...


5

In a nutshell, <name>/.style syntax is a container of other styles or codes that are called in the order of declaration. This is the instance of the more general key=value system and it is part of the powerful pgfkeys library which you can read up in the same manual under libraries section. So to your first question, yes that would be equivalent ...


5

TiKZ 3.0 introduced pics. They are not exactly nodes but they allow to draw complex figures and manage them as a single one. Search for them in TeX.SX and you'll find some more examples. Two of them: Rotating pictures and labels together with pics in TikZ (this one also shows how to include a .pdf graphics into a node) How to create something like a ...


4

I think the problem involves the use of edge which creates a second construction after the main path is drawn. Since [-latex] applies to the entire command until the ;, you end up with 2 arrows. Replacing edge with a regular -- removes the problem: \documentclass[tikz]{standalone} \usetikzlibrary{decorations.pathreplacing} \begin{document} ...


4

If I understood your question properly then your problem is that the average plot sometimes overlaps the values on top of the bars. I have came up with a solution, but you will have to omit the nodes near coords option from your bar plot, and manually add the nodes after drawing the average plot. The solution I'm posting has different values than yours to ...


3

This is a solution -- simply draw the the 3rd ybar independently and add node near coords key with raisebox command into the option. Note: To avoid shift of xticks, ybar key should move to individual addplot. nodes near coords=\raisebox{0.3cm}{\pgfmathprintnumber\pgfplotspointmeta} Code \documentclass[pdftex,11pt,a4paper]{scrreprt} ...


3

Simply pass the align=<value> key to the title node and/or use text width=<length>, so line breaks are allowed. Here's a little example completing your snippets to a complete example: \documentclass{beamer} \usepackage{tikz} \usetikzlibrary{calc} \setbeamertemplate{title page}{% \begin{tikzpicture} \node[text ...


3

The quick answer: you can just nest a tikzpicture environment into the contents of your node: \node[draw] (A) { \begin{tikzpicture} \draw (0,0) ellipse (1 and 1.5) (0,2.5) circle (1) (2.5,0) circle (1.5); \end{tikzpicture}}; However this is discouraged for various reasons but it will work for simple designs. Another ...


2

I think the matrix of nodes is a more elegant solution, but a less elegant alternative would be to use base right=of from the positioning library rather than on grid. \documentclass[border=5pt,tikz]{standalone} \usetikzlibrary{positioning} \begin{document} \begin{tikzpicture}[shorten >=1pt,node distance=1cm] \node(q_0) {$c$}; \node(q_1) ...


2

The problems are two basically: The \foreach needs braces if there are more than one operation to be performed; It is not possible to use \draw and \fill in the same path. The point n.2 is the most important: what one does while using a \foreach statement inside a \drawn path is to append things. Of course it is possible to append nodes, but it is not ...


2

An even easier version is using the label option for nodes: \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} \node[draw,circle,label=left:010101] (CircleNode) at (0,0) {A}; \end{tikzpicture} \end{document} It looks just like Peter Grill's solution.


2

It is somehow unclear what you are asking. Do you want to have multiple hidden layers? Then how about output layer connections. I did something based on my understanding of your question. Please comment if it is not exactly what you want. My answer is based on your own code and this example. \documentclass{article} \usepackage{tikz} \usetikzlibrary[topaths] ...


1

Yet one more: \documentclass{article} \usepackage{amssymb} \begin{document} Hello $\boxtimes$ Word \end{document} And a lowercase version without packages: \documentclass{article} \def\BoxedTimes{\fboxrule=.04em\fboxsep=-0.11em\fbox{\makebox[.725em]{$\times$}}} \begin{document} Hello \BoxedTimes{} Word \end{document}


1

Just for fun with plain TeX's math mode only. \def\dju{\mathbin{\coprod}} \def\id{\mathop{\rm id}} \def\Ga{\hphantom{f()}G} \def\Ha{H\hphantom{g()}} \def\rar#1{\buildrel {#1} \over {\hbox to 4em{\rightarrowfill}}} \def\dar#1{\Bigg\downarrow\rlap{$\scriptstyle#1$}} \def\drar#1{\searrow\raise1ex\rlap{$\scriptstyle#1$}} $$ \matrix{ \Ga\dju \Ha ...


1

This does what I want, but it's admittedly not pretty. It's motivated by Dependent node size in TikZ . I'm puzzled why using column 1/.style={Minimum Width=c1} etcetera doesn't work the same way as the row style commands. Thanks all. \documentclass[12pt]{article} \usepackage[svgnames]{xcolor} \usepackage{tikz} ...


1

Playing a little bit with: \setbeamertemplate{itemize items}[circle] \setbeamercolor{local structure}{fg=red!50!black}\color{red!50!black} \setlength{\leftmargini}{6pt} \setlength{\labelsep}{1pt} \color{red!50!black} \itemsep1pt I came up with the following MWE: \documentclass{beamer} \usepackage{tikz} ...



Only top voted, non community-wiki answers of a minimum length are eligible