Tag Info

2

I just added \draw [very thick,->] (13) to [out=-90,in=0] (32); \draw [very thick,->] (13) to [out=-90,in=45] (decide.east); \draw [very thick,->] (13) to [out=-90,in=60] (stop.east); \draw [very thick,->] (13) edge[loop right] (13); to your code \documentclass[a4paper,10pt]{article} \usepackage[utf8]{inputenc} \usepackage{tikz} ...

6

I am not sure what you mean by the "inner square color should overlap", but perhaps you just mean that there shouldn't be a black line between the inner and outside squares. If so, you probably want something like the following: This was produced by: \documentclass[border=5mm,tikz]{standalone} \usepackage{mwe} \usepackage{tikz} \begin{document} ...

2

The normal distance between base lines is \baselineskip: \includegraphics[height=.3\baselineskip]{...} Or the height can be calculated, e.g.: \newdimen\MyLineHeight % goes into the preamble ... \settoheight{\MyLineHeight}{H}% \includegraphics[height=.3\MyLineHeight]{...} Or with package calc: \usepackage{calc}% goes into the preamble ... ...

6

pdfcrop that is part of Tex Live, can crop multi-page pdf automatically, and create a new pdf with all the pages cropped. You can then simply use includgraphics to read each page, or read all pages at once. I do the cropping in makefile, which does all the pre-processing and then calls latex. But you can do it from inside Latex as well ...

2

The rework of cfr's graphs solution with scope to place the two graphs side-by-side, originating from our discussion with Alan. \begin{tikzpicture} \graph [grow right, nodes={draw, circle}, /tikz/every label/.append style={label distance=5pt}] { a/"1" -> 1[label=above:$S_1$] <-> 2[label=below:(b) $x_1+x_1x_2+x_2x_3$] -> ...

5

In my view this question ought not be answered. Even so, here's a demonstration of the graphs syntax provided by TikZ: \documentclass[tikz,border=10pt,multi]{standalone} \usetikzlibrary{graphs,quotes} \begin{document} \begin{tikzpicture} \graph [chain shift=(45:1), branch left, nodes={inner sep=0pt, minimum size=2.5pt, circle, fill, draw}, empty nodes, ...

5

You may use PGF/TikZ to create diagrams in Latex. There are some tutorials and examples in the Internet. In the PGF/TikZ gallery you may find examples of Graphs, Trees and Logic circuits and gates. Additionally, you may check the answers to How to create a Hasse/Lattice Diagram

2

If I've understood what you want correctly, then you would like the following input \section{X} \myplotFF{file={example-image-a},Re=50,DOF=4M, statsName=Drag} to produce the following output The code as you currently have it is a mess. You seem to have multiple modules for one package/class/ and multiple sub-modules for handling the same options/data. ...

3

I don't know why you refuse to post compilable code, but whatever. Anyway, for something like that, I'd use fit to draw the boundaries around 2+ nodes. And I'd use a chain or the TikZ graphs stuff for the graph itself. For example, with a simple chain (no real need for a graph here): \documentclass[tikz,border=10pt,multi]{standalone} ...

2

chains, loops and scopes can help: \documentclass[tikz,border=10pt,multi]{standalone} \usetikzlibrary{chains,scopes} \begin{document} \begin{tikzpicture} [ start chain=main going below, every on chain/.append style={text width=15mm, text centered, minimum height=7.5mm, draw}, every join/.append style={->} ] \node [on chain, join] {A}; \node [on ...

0

My answer isn't TeX-style, but how I prefer to do it: Use inkscape (external, but free software) and \includegraphics the exported pdf. The main advantage of this method is, that it is very simple and easy to use. If you dont want to use Tex by any means for Tex's sake, I would recommend this to a beginner.

5

As starting point can serve the following pure TikZ code with libraries arrows.meta, chains and positioning: \documentclass[border=3mm, multi, tikz]{standalone} \usetikzlibrary{arrows.meta, chains, positioning} \begin{document} \begin{tikzpicture}[ node distance = 12mm and 2mm, start chain = going right, every ...

1

Ah, sorry, \ar{}[dr]|>{\ulcorner} works.

3

I can't help but feel that there should be a better package somewhere if this is a standard notation. This is most inelegant - not to say hackish. Note that I've switched to LaTeX font commands. \bf, \rm etc. should not be used in LaTeX as they were made obsolete by 2e a couple of decades ago. (I think the documentation uses them because it is intended to ...

1

The following sets the boxes and vertical construction as a set of tabulars: \documentclass{article} \usepackage{xcolor,array} \newcommand{\diagrambox}[2][15em]{% \fcolorbox{blue}{white}{% \setlength{\tabcolsep}{0pt}% \begin{tabular}{>{\centering\arraybackslash}p{#1}} #2 \end{tabular}}} \begin{document} \begin{center} ...

2

Using the content kindly provided by salim bou, which the OP refused to supply, here are two Forest versions. Note, however, that I do not really think Forest is the best choice here. \documentclass[tikz,border=10pt,multi]{standalone} \usetikzlibrary{arrows.meta} \usepackage{amsmath} \usepackage{forest} \useforestlibrary{edges} \tikzset{% >=stealth, ...

2

Ok, I first followed Peter's suggestion and tried it with tables. Unfortunately I also use booktabs in my document and apparently it doesn't like vertical lines. I then moved on to tikz as suggested by ebo and I'm quite happy with the result: \usepackage{tikz} \usetikzlibrary{shapes,positioning} \begin{tikzpicture}[align=center, text width=6cm, line ...

1

Here's one way which involves using the tikzpicture environment as described in tikz-cd's manual around page 12 with TikZ's pgfinterruptboundingbox environment. It isn't very elegant, but it does work. \documentclass[tikz, border=5pt, multi]{standalone} \usepackage{tikz-cd,amsmath} \begin{document} \begin{tikzpicture}[commutative diagrams/every diagram]% ...

1

Take 2 tables and one image. Pack it into a minipage environment. Its very simple. Just my opinion.

1

Probably someone will suggest using forest for this kind of graph. It will be a good suggestion. But while waiting for it, you can start using positioning library and its =of (instead of of=) syntax. \documentclass[a4paper,12pt]{article} \usepackage{tikz} \usetikzlibrary{positioning} \tikzset{ treenode/.style = {align=center, inner sep=0pt, text ...

1

Another solution. It keeps phantom adc1 and adc2 nodes because they are later used to draw connections. But when connections are drawn an individual node is added. I've also changed the inner foreach condition. \documentclass[tikz,border=2mm]{standalone} \usepackage{circuitikz} \usetikzlibrary{chains,fit,positioning} \begin{document} % Version 3 ...

1

A suggestion. I start by defining a new style block4 that is a rectangle split type node, i.e. a rectangular node with multiple parts. The shapes.multipart library is loaded because of this. In the adc nodes, change the style from block to block4, and the node label to ADC\nodepart{two}ADC\nodepart{three}ADC\nodepart{four}ADC. ...

1

\documentclass[border=4,pstricks]{standalone} \usepackage{pst-plot} \begin{document} \psset{unit=2,arrowscale=2} \begin{pspicture}(-1,-1)(5,3) \psaxes[labels=none,ticks=none]{->}(0,0)(-0.5,-0.5)(4.5,2.5)[$x$,-90][$y$,180] \psset{origin={1,0}} \psRandom[dotsize=1pt,randomPoints=2000](3,3){% \psline[linestyle=none](0,0)(2.5;60)(3;45)(0,0)} ...

5

Here's a pattern I defined by taking the coordinates from your image. One could probably use some external program such as octave or the scripting capabilities of luatex to generate new points. Just taking purely random points doesn't really work, because those won't be distributed evenly enough. \documentclass[tikz,margin=1cm]{standalone} ...

9

Basically, with this approach to drawing trees, you have to figure out suitable spacing for the tree. TikZ doesn't do it for you. In this case, the bag nodes need to be wider (or you need to break the lines when mathematical expressions are too long). To avoid the crossings of edges and mixing up of nodes, you need to increase the sibling distance for level ...

3

Some small tweak suggestions: Increase the size of the text in the nodes bag, so your edges do not overlap text. That is, instead of 4em in the definition, use something like: \tikzstyle{bag} = [text width=5em, text centered] Change the vertical stretching with a global option. For instance when beginning the tikzpicture environment, use something like: ...

4

Here's a version with Tikz, the command is \dbox and it takes one mandatory argument, the text. The optional argument is the label on the arrow. You can choose not to write it. Of course, the first occurrence of \dbox cannot have an arrow label, you can write it, but it won't yield any result. The letter indicating the box (A, B, ...) is automatically ...

1

What, no pgfplots example? \documentclass[border=5mm]{standalone} \usepackage{pgfplots} \usetikzlibrary{arrows.meta} \begin{document} \begin{tikzpicture} \begin{axis}[ axis lines=middle, axis line style={Stealth-Stealth,very thick}, xmin=-5.5,xmax=5.5,ymin=-5.5,ymax=5.5, xtick distance=1, ytick distance=1, xlabel=$x$, ylabel=$y$, ...

1

You can't do this by defining the color in TeX code. However, there is a way to get the custom color you want. Using an html color converter and inputting #B28B3C for your custom color, it appears that the cmyk code for the color is cmyk(0%, 22%, 66%, 30%). Similarly, if you ask for Purple from the color converter, you get the cmyk code cmyk(0%, 100%, 0%, ...

2

Here is the diagram with diagrams.sty; I drew the version with the standard arrow along with the head=littlevee version. The latter has disastrous results. \documentclass{article} \usepackage[small,nohug]{diagrams} \diagramstyle[labelstyle=\scriptstyle] \begin{document} \begin{diagram} X & & \rTo^{\gamma} & ...

2

Here are two solutions: one with  pstricks, the other with tikz-cd: \documentclass{article} \usepackage{amsmath} \usepackage{pstricks-add} \usepackage{tikz-cd} \usepackage{auto-pst-pdf} \begin{document} With \texttt{pstricks}: \[ \psset{arrows=->, arrowinset=0.2, linewidth=0.5pt, nodesep=2pt, labelsep=2pt, rowsep=0.8cm, colsep=1cm, shortput=tab, ...

1

I don't know the diagram environment but for commutative diagrams I recommend using tikz package and a matrix of math nodes to give: Here is the code: \documentclass[border=5mm,tikz]{standalone} \usepackage{tikz} \usetikzlibrary{matrix} \begin{document} \begin{center} \begin{tikzpicture}[>=stealth,->,shorten >=2pt,looseness=.5,auto] ...

4

If you don't mind using xy-pic, the code \documentclass{beamer} \usepackage[all,cmtip]{xy} \begin{document} \begin{displaymath} \xymatrix{ {X} \ar[rr]^{\gamma} \ar[dr]^{\alpha} && {Y}\\ {\varepsilon_{3}} \ar[r] & {Z} \ar[ur]^{\beta} & {\varepsilon_{2}} \ar[u] }% xymatrix \end{displaymath} \end{document} will ...

3

Here is a sketch of the solution to adapt \documentclass{article} \usepackage{amsmath} \usepackage{tikz} \usetikzlibrary{positioning,calc} \begin{document} \begin{tikzpicture} \node[draw,minimum height=2em, minimum width=8em](pred) {(1) Prediction}; \node[below=0em of pred](equa1) { \$\left\{\begin{aligned} A_t&= F A_{t-1}\\ P_t&=F P_{t-1} ...

1

Metapost is a good tool for this sort of semi-numerical graph. Here I've shown it wrapped up with luamplib, so this example needs to be compiled with lualatex. \documentclass[border=5mm]{standalone} \usepackage{luamplib} \begin{document} \mplibtextextlabel{enable} \begin{mplibcode} beginfig(1); % unit size numeric u; u = 7mm; % axes path xx, yy; xx = ...

1

A version in Metapost and luamplib, adapted from my answer to a similar question simply by changing the images used for the targets and the hits. Compile with lualatex. \documentclass[border=5mm]{standalone} \usepackage{fontspec} \setmainfont{Tex Gyre Pagella} \usepackage{luamplib} \begin{document} \mplibtextextlabel{enable} \begin{mplibcode} ...

2

A PSTricks solution: \documentclass{article} \usepackage{pstricks-add} \def\target{% {\psset{fillstyle = solid} \pscircle[fillcolor = white](0.7,0.7){0.7} \pscircle[fillcolor = blue!60](0.7,0.7){0.5} \pscircle[fillcolor = white](0.7,0.7){0.3} \pscircle[fillcolor = red!80](0.7,0.7){0.1}}} \def\dots[#1](#2,#3){% \psRandom[ dotsize = 2pt, ...

8

You can begin with this \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} \foreach \r/\col in {2.8 cm/white,2 cm/blue!50!white,1.2 cm/white,0.4 cm/red!50!white}{% \path[draw,fill=\col] (0,0) circle (\r) ;} \foreach \coords in {(0,.4),(.2,.5),(.1,.6),(-.2,.5)}{% \draw[fill=blue] \coords circle (.6mm);} ...

5

For this I would start by placing (and naming) nodes or coordinates at the desired locations. (A coordinate is basically a node with no size and no caption.) In the example below I name them according to location, with l/r meaning left/right, and t/m/b meaning top/mid/bottom. I would then connect the nodes as necessary. Using a thick line may be easier in ...

Top 50 recent answers are included