Tag Info

New answers tagged

1

Seems the plotmark doesn't end up in the center of the node for some reason. An alternative is to use the regular polygon shape for the node instead, see the triangle style that I defined. You need the shapes.geometric library to use it, but you're already loading shapes, so that's fine. Note I used the top corner of the triangle as the endpoint of the line. ...


4

Here is one suggestion. Instead of using scopes and shifting those around, I place one of the lower nodes of the two automata on the sides relative to the closest of the lower nodes on the center one. The rectangles are drawn afterwards with the help of the fit library. Other remarks: I've changed from of= to =of, and loaded the positioning library. This ...


1

What about the following code with fancyhdr package and tikz \documentclass{article} \usepackage{fancyhdr} \usepackage{lipsum} \pagestyle{fancy} \fancyhf{} \fancyfoot[C]{\dotfill \protect\circled{\thepage} \dotfill} \usepackage{tikz} \newcommand*\circled[1]{\tikz[baseline]{\node[shape=circle,draw,inner sep=2pt] (char) {#1};}} \begin{document} ...


2

Here's the solution with Tikz since you were asking for it. I basically defined a new command with four arguments: \tabb{#1}{#2}{#3}{#4} Position of the node Color (the second color will automatically be lighter than the label) Label text Main text I changed the x and y of the tikzpicture above for making it easier for me to place the examples. ...


5

The \parbox isn't really needed, but I wasn't sure if one could specify the text widths for each part separately. \documentclass[border=.1in]{standalone} \usepackage{adjustbox} \usepackage[svgnames]{xcolor} \usepackage{tikz} \usetikzlibrary{shapes.multipart} \begin{document} \begin{tikzpicture} \node[rectangle split,rectangle split horizontal,rounded ...


9

You can do this with tcolorbox: The code (adjust the settings according to your needs): \documentclass{article} \usepackage[many]{tcolorbox} \definecolor{bluebg}{RGB}{201,218,248} \definecolor{bluelabel}{RGB}{0,0,255} \newtcbox{\labelbox}{ enhanced, nobeforeafter, tcbox raise base, boxrule=0.4pt, top=0.4cm, bottom=0.4cm, right=0pt, ...


2

Option scatter/use mapped color can be used to change the draw color of the marks to the same as the fill color. (The value none did not work.) The line width of ultra thick is 1.6 pt. The default draw line width is 0.4 pt. The the value of the size (radius) of the mark should be set to (1.6 pt - 2 * 0.4 pt/2)/2 = 0.6 pt. \documentclass{article} ...


4

You already used |- syntax as intersection point: \draw[dashed] (circ.west) -- (circ.west-|origen.340); In this case means the intersection point between an horizontal line throgh circ.west and a vertical line through origen.340. A side comment: you can say (circ)--(circ-|origen.340) because path stops at node border and circ which is equivalent to ...


2

One line TikZ solution : \documentclass[tikz,border=7mm]{standalone} \usetikzlibrary{graphs} \begin{document} \tikz\graph[nodes=draw, grow right=14mm] { "$g(t)$" -- "System" -- "$y(t)$"}; \end{document}


1

A MetaPost solution, for whom it may interest: input boxes beginfig(1); boxjoin(b.w - a.e = (3cm, 0)); boxit.g(btex $g(t)$ etex); boxit.sys(btex System etex); boxit.y(btex $y(t)$ etex); defaultdx := .75cm; defaultdy := .5cm; drawboxed(g, sys, y); drawarrow g.e -- sys.w; drawarrow sys.e -- y.w; endfig; end.


0

With tikz-cd: % arara: pdflatex \documentclass{article} \usepackage{tikz-cd} \usepackage{mathtools} \begin{document} \[ \begin{tikzcd}[% ,every arrow/.append style=dash ,cells={% nodes={% ,draw ,minimum width = 1.45cm % optional if you want squares ,minimum height= 1.45cm % optional if you want squares ...


2

You can draw this with TikZ as well. Drawing large block diagrams with TikZ is fairly straightforward, moreso than using LaTeX native structures. \documentclass{book} \usepackage{tikz} \usetikzlibrary{calc} \usepackage[active,tightpage]{preview} \PreviewEnvironment{tikzpicture} \begin{document} \begin{tikzpicture} \node (g) [draw, minimum ...


9

Below I present three possibilities Using basic boxes: \parboxes and \fbox (without color) or \fcolorbox (with color) nad \hline. Using tikz and chains. Drawing the diagram as a tree with forest. The code A TikZ-free solution: \documentclass{article} \usepackage{amsmath} \newcommand\MBox[2][2em]{% \fbox{\parbox[c][2em][c]{#1}{\centering#2}% }% } ...


4

I think it should rather be a \csname type#1\endcsname instead of \noexpand\type#1. \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{shapes} \newcommand{\nodeperso}[1]{\node[\csname type#1\endcsname](){\csname nom#1\endcsname};} \newcommand{\typeAAB}{Boite} \newcommand{\nomAAB}{coucou} \begin{document} \begin{tikzpicture}[Boite/.style={rounded ...


4

I assume, you want to optimize the code of the question. All these operations can be put in one \draw command. Then the command form \tikz instead of the environment can be used. The path construction can be simplified via rectangle. \documentclass{article} \usepackage{tikz} \begin{document} \tikz[scale=.3]\draw (1, 2) node {\textbullet} ...


4

Just a possible solution. Instead of lines, use a rectangular node which fits desired coordinates. After that, place label and points using anchors. \documentclass[border=2mm,tikz]{standalone} \usetikzlibrary{fit} \begin{document} \begin{tikzpicture}[scale=0.3, box/.style={draw, inner sep=0pt, outer sep=0pt}] \node[fit={(1,2) (8,4)}, box] (a){}; ...


1

I just replaced some "right" and "left" to "above" and "below" \documentclass{article} \usepackage{tikz} \usetikzlibrary{arrows} \begin{document} \begin{tikzpicture}[->,>=stealth',shorten >=1pt,auto,node distance=2.5cm, thick,main node/.style={circle,fill=blue!10,draw,font=\sffamily\Large\bfseries}] % nodes \node[main node] (A) {A}; ...


2

The inner sep key for the surrounding node is probably what you're after. To move the label, the easiest is to make a new node, placed relative to the surrounding node. \documentclass[tikz,border=10pt]{standalone} \usetikzlibrary{shapes,arrows,fit} \begin{document} \tikzset{ sum/.style = {draw, circle, node distance = 2cm, minimum size=.9cm}, % ...


3

You can use the handler .append style: \documentclass{article} \usepackage{pgfplots} \pgfplotsset{compat=1.12} \tikzstyle{block} = [rectangle, draw,minimum width=3em,] \begin{document} \begin{tikzpicture} % This works ok \node[block, minimum width=3em,] (b1) {B1}; \end{tikzpicture} \begin{tikzpicture}[block/.append style={minimum ...


0

There is nothing in the Tikz manual about enlarging the loop, so you might have to switch to the regular edge, and use manual out and in angles. A combination of these and looseness does the job. (1) edge [out=150,in=210,looseness=30] (1)


0

How about using something like (1) edge [loop left, very thick] node {} (1) BTW: you should visit http://www.texample.net/tikz/examples/ for useful tricks


1

Here's one option, using a loop. It uses the \foreach command, which has syntax: \foreach <control sequence> in {<first number>,<second number>,...,<last number>}{% <do this> }% The trick here is that the first and second number have a specific delta, which the parser will remember for the interdistance between loops. The ...


1

TikZ and pgfplots are not the same programs. Actually, pgfplots is based on TikZ and is dedicated for drawing diagrams. For learning them, you need to read their manuals (for TikZ at least chapter 3: TikZ ist kein Zeichenprogramm). There is a lot examples which you lead to desired knowledge :-) For your MWE in TikZ try: \documentclass[tikz,border=2mm] ...


4

Note that I don't think forest is 'better' for drawing trees. It is more powerful and more flexible. It is particularly good at some things e.g. compact trees. But if you have perfectly good trees drawn with another package and you are happy with them, I think recoding them is a waste of time. Unless you are doing it to learn how to use the package either ...


4

These are PGF syntax which is the basic layer behind TikZ. Roughly speaking, TikZ is the front-end, user-convenient parser for the actual graphics format PGF. There is also a system layer but you shouldn't need it unless you have serious intentions and a lot of free time. Hence when you write for example a calc library notation \node at ($(2,1) + (0,2)$) ...



Top 50 recent answers are included