# Tag Info

1

Not an answer to my specific questions/problems, but a different, less-TikZ'y way of doing it, by using a simple macro: \newcommand\manifold[3][]{ \draw[every to/.style={out=-20,in=160,relative},#1] (#2) to ($(#2 -| #3)!0.2!(#2 |- #3)$) to (#3) to ($(#2 -| #3)!0.8!(#2 |- #3)$) to cycle; } and using it like \manifold[green,thick]{0,0}{4,3} ...

5

Completely reimplemented and using explicit Bézier curve paths using a coordinate (passed as argument, which has a default value) to determine the curviness. Hopefully comments explain everything. \documentclass[tikz,border=5]{standalone} \usetikzlibrary{calc} \tikzset{manifold/.style={to path={ % Create new coordinates to save typing (\tikztostart) ...

4

The lines do end at the nodes, you have to consider that nodes have some padding (inner sep, outer sep), and lines are drawn to the edge of the node, not the center. Add draw to the node options and you'll see this: \documentclass{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture} \draw (4,2) node(p1)[draw,label={[label ...

1

Go to tikz.code.tex line 3713, there is the definition of \tikz@do@fig. This is the essential part of typesetting nodes. In the definition one can see \tikz@atbegin@node at line 3736 and \tikz@halign@check at 3755. As one might guess, \tikz@atbegin@node is the macro the stores execute at begin node-codes, and \tikz@halign@check checks if you says ...

2

Here's a way of doing it with PGF keys and a couple of macros. It allows you to say \tikzset{% S1 set={3,5,8}, S2 set={1,4}, } for example, to determine which nodes should take each of styles S1 and S2. It is probably a bad idea to name nodes using numbers alone, but I've not changed this in the code below. (Giving each a standard prefix is an easy ...

2

This version adopts etoolbox, very powerful package for setting conditions. I guess it could be included in the \tikzset but I'm not sure how yet. I'll edit the answer in case. Output Code \documentclass[margin=10pt]{standalone} \usepackage[utf8]{inputenc} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{tikz} ...

1

Frankly said, I do not understand what you doing in your code and what should be your result, so the main purposes of this answer is clarify this. The MWE below generate this picture: where colors are select on basis even/odd number in \label: \documentclass[10pt,a4paper]{article} \usepackage[utf8]{inputenc} \usepackage{amsmath,amsfonts,amssymb} ...

4

Is this what you wanted? \documentclass[border=2pt]{standalone} \usepackage{tikz} \usetikzlibrary{backgrounds,fit, positioning} \tikzset{ nonlin/.style = { rectangle,thick,draw,minimum width=1cm,minimum height=0.6cm,#1, append after command={ \pgfextra{ \node[fit=(\tikzlastnode),#1, draw, inner sep=1.8pt] ...

2

Just to point out an alternative to "I know Tikz is the starting point." Here is an approach using Metapost as part of LuaLaTeX and the luamplib package. Compile with lualatex. \documentclass[border=5mm]{standalone} \usepackage{fontspec} \usepackage{luamplib} \setmainfont{Helvetica Neue} \begin{document} \mplibtextextlabel{enable} % this allows plain ...

3

If you look in TikZ manual, you will find in chapter 65 Shading Library (from page 686 further) description of shadings. For color you have possibilities shading axis top color= ..., bottom color=... and middle color=... left color=..., right color=... and midle color (the same as above) and shading ball shading billinear transformation etc So in ...

3

An image worth 1 thousand words... \documentclass{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture} [ mynode/.style={ shade, % top/bottom color? right color=blue, left color=red, shading angle=0, align=center}, every node/.style=mynode ] \node {X}; \end{tikzpicture} ...

2

Taking some liberties (as pointed out in the comments, we don't know exactly what you are after) here is a quick implementation. The centers and radii of the circles are declared as commands and then the \clip command is used to build the intersecting regions, which are filled. \documentclass{article} \usepackage{tikz} \newcommand{\circleA}{(0cm,0cm) ...

6

Yes. you can do this on two ways: use \tikzset (not tikzstyle, it is deprecated) and put them after \begin{tikzpicture}, for example \begin{tikzpicture} \tikzset{ every node/.style = {draw, align= center, ...}, arrow/.style = {thick,-{Latext[]} } ... } \node (first) {...}; ... \end{tikzpicture} include styles as tikzpicture ...

1

You can overlay the text using TikZ nodes. You can even expand this to fill the entire page using [overlay] and (current page). \documentclass[11pt,letterpaper]{article} \usepackage{tikz} \usetikzlibrary{calc} \usepackage{graphicx} \pgfmathdeclarerandomlist{MyRandomColors}{% {red}% {red!25}% {magenta}% {magenta!25}% {olive}% ...

1

This question gets some votes but the answer is somehow hidden in the comments. To sum up: this difference is due to the pdf viewer. Everything works fine with Adobe Reader, which should always be the reference. The reason why most viewers can display the effect when the class article is used, and not when the class beamer is used remains a mystery. For ...

8

A short example with tikz-cd and some TikZ for drawing the node border. Output Code \documentclass{article} \usepackage{tikz-cd} \usepackage{amssymb} \newcommand\tkkz[2]{% \tikz{\node[draw, inner sep=2pt, minimum width=8mm,outer sep=0, text height=1.5ex, text depth=.3ex, append after command={\pgfextra{\draw ...

5

\documentclass{article} \let\LA\leftarrow \let\RA\rightarrow \let\LRA\leftrightarrow \def\BOX(#1,#2){\tabular{|c|c|}\hline\strut#1&#2\\\hline\endtabular} \begin{document} $\thickmuskip=0mu\emptyset\, \LA\BOX(a,b)\LRA\BOX(c,d)\LRA\BOX(e,f)\LRA\cdots\LA\BOX(y,z)\RA\, \emptyset$ \end{document} If you want the a,b,... in italic use \array instead ...

9

Arguably overkill, but here's a version using the TikZ libraries shapes.multipart, chains and positioning: \documentclass[border=20pt,tikz]{standalone} \usetikzlibrary{shapes.multipart,chains, positioning} \begin{document} \begin{tikzpicture} [ double link/.style n args=2{% page 726 on chain, rectangle split, rectangle ...

8

TikZ-free suggestion. \documentclass{article} \newcommand\boxlist[2]{\begin{array}{|c|c|} \hline #1 & #2 \\ \hline \end{array}} \begin{document} $\phi \leftarrow \boxlist{a}{b} \leftrightarrow \boxlist{c}{d} \leftrightarrow \boxlist{e}{f} \leftrightarrow \cdots \leftrightarrow \boxlist{x}{y} \rightarrow \phi$ \end{document}

7

I've found one useful github repository with example of doubly linked list in tikz. You can inspire in this. Code of the example: \documentclass{article} \usepackage[pdftex,active,tightpage]{preview} \setlength\PreviewBorder{2mm} \usepackage{tikz} \usetikzlibrary{calc,shapes.multipart,chains,arrows,positioning} \tikzset{ squarecross/.style={ ...

0

Just throw the whole thing into a figure environment. Note that it will become a float, so it could float around a bit ;) You can use the standard parameters like [!h] for "stay put here" or [!t] for "try to stay up top" or [!b] for "try to stay down below" e.g. \begin{figure}[!h] For extreme measures you could get the [H] parameter by loading the float ...

Top 50 recent answers are included