Tag Info

New answers tagged

1

Another approach \documentclass{article} \usepackage{tikz} \usetikzlibrary{positioning,shapes} \tikzset{ eq/.style={minimum width=3cm,rectangle,name=first}, bubble/.style={draw,help lines,ellipse}, } \def\step#1#2{% \node[bubble] (left) [below left=of first] {#1}; \node[bubble] (right) [below right=of first] {#1}; \draw[help ...


1

I found tikz-cd surprisingly suited in this case. \documentclass[tikz,border=9]{standalone} \usepackage{tikz-cd} \usetikzlibrary{shapes.geometric} \begin{document} %%%%%%%%%%%%%%%%%%%% What YOU would like to automate %%%%%%%%%%%%%%%%%%%% \begin{tikzcd}[row sep=30] ax^2+bx+c=0 \dar[bend ...


5

Either use a third variable, as Sigur suggested, or use an ifcase construction: Code \documentclass[tikz,border=2mm]{standalone} \begin{document} \begin{tikzpicture} [ scale=0.8, auto=left, every node/.style={circle,fill=blue!20}, lnode/.style={rectangle,fill=none}, ] \node (n6) at (1,10) {6}; \node (n4) at (4,8) {4}; \node (n5) at ...


1

This is not a complete answer for your problem (i.e. and it is my first answer in this community for tikz. :)) however, once you draw the shape, you need to multiply each vertex with the transformation matrix. I've modified this code and added the spheres. The result is For rotation around z-axis, this is the result (i.e. the rotation order zyz but you ...


4

A simple solution with @HeikoOberdiek's idea in mind: \documentclass[border=4pt]{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture}[par/.style={sloped,fill=white,inner sep=-.6ex}] \draw (0, 0) -- node[par]{//} (2, 2) (0, 0) -- node[par]{//} ++(2, 0) -- node[sloped]{\textbar} ++(0, 2) -- node[sloped]{\textbar} ++(-2, 0) ...


10

Here's another option using decorations to produce the two requested styles: \documentclass{article} \usepackage{tikz} \usetikzlibrary{decorations.markings} \def\MarkLt{6pt} \def\MarkSep{3pt} \tikzset{ TwoMarks/.style={ postaction={decorate, decoration={ markings, mark=at position #1 with { ...


8

A sloped node could be used with white background and the symbol as contents you want to use: \documentclass{article} \usepackage{tikz} \tikzstyle{cont} = [ sloped, node contents={//}, fill=white, inner xsep=.1em, inner ysep=0pt, ] \begin{document} \begin{tikzpicture} \draw (0, 0) -- node[pos=.5, cont] {} (2, 2) (0, 0) -- node[pos=.5, ...


0

The thing with tikz is, since it's so malleable, you can take from several examples and make your own. Here are a few examples of what you might be looking for (before stretching): One cuboid : http://www.texample.net/tikz/examples/cuboid/ A commutative diagram : http://www.texample.net/tikz/examples/commutative-diagram/ For what is left, it's a matter ...


4

All the hard work is done by Gonzalo already. You have to just change the part to chap and PART to SOLUTION in his code. \documentclass{book} \usepackage{fourier}% change to lmodern if fourier is no available \usepackage{tikz} \usepackage[explicit]{titlesec} \definecolor{mybluei}{RGB}{0,173,239} \definecolor{myblueii}{RGB}{63,200,244} ...


1

You only have to change the options of the nodes to: \node[pos=<..>,above] The pos value is included between 0 and 1, where 0 corresponds to the beginning of the arrow and 1 to the end of it. The complete code is: \documentclass[crop=true,border=2cm (all sides) i]{standalone} \usepackage[utf8]{inputenc} \usepackage{tikz} \usetikzlibrary{calc} ...


3

Update Here's another option producing an isometric view; the squares in the top layer can be easily labelled since the four corners can be accessed using (t-#), (l-#), (b-#), and (r-#) (see code below): The code: \documentclass[tikz,border=5]{standalone} \def\Side{0.5cm} \newcounter{mycube} \tikzset{ cube/.style={ thin, fill opacity=.5, ...


3

\tikzset recieves a comma separated list of options as argument. In the simpler form, those options are lists of comma-separated pairs of the form key = value, for example: \tikzset{>=latex,shorten >= 4pt} but in more elaborate situations you can also have styles, pic paths and other stuff in the argument of \tikzset; in any case, one of the ...


4

I'd suggest to use positioning library which can help you to place nodes beside/above/below others. \documentclass{article} \usepackage{tikz} \usetikzlibrary{positioning, fit} \begin{document} \begin{tikzpicture}[ mytext/.style={ draw, text width=#1, align=center, minimum height=1.5cm }, ar/.style={ ->, >=latex } ] ...


2

You can use the in=<angle>, out=<angle> options together with the looseness and/or distance (family of) keys. A little complete example: \documentclass{article} \usepackage{tikz} \usetikzlibrary{arrows,positioning} \begin{document} \begin{tikzpicture}[every node/.append style={circle,draw}] \path node (1) {1} node (2) [left=of 1] {2} ...



Top 50 recent answers are included