New answers tagged

1

Here is an approach that doesn't require any libraries (not that there's anything wrong with using libraries). \documentclass{article} \usepackage[english]{babel} \usepackage{tikz} \begin{document} \begin{tikzpicture}[ startstop/.style={rectangle, rounded corners, minimum width=3cm, minimum height=1cm,text centered, draw=black, fill=red!30}, startstop2/....


1

You may use the TikZ library calc, with the appropriate coordinates: \documentclass{article} \usepackage[english]{babel} \usepackage{tikz} \usetikzlibrary{calc} % TikZ library calc \begin{document} \begin{tikzpicture} \tikzstyle{startstop} = [rectangle, rounded corners, minimum width=3cm, minimum height=1cm,text centered, draw=black, fill=red!...


1

Two ways, depending on desired alignment. In the first case, I just left-align a \Longunderstack of the desired text following the \textsuperscript{*}. In the second case, I \llap the \textsuperscript{*}. \documentclass[twoside]{article} \usepackage{pgfplots,stackengine} \setstackEOL{\\} \usepackage{tikz} \begin{document} \begin{tikzpicture} \setstackgap{...


1

\hphantom doesn't start horizontal mode and indeed you get blank lines instead of the space you want. Instead of \hphantom, I recommend using tabular. \documentclass[twoside]{article} \usepackage{tikz} \begin{document} \noindent \begin{tikzpicture} \draw (0,0) node[ outer sep=-1pt, inner sep=0pt, below right, text width=\textwidth ]{\begin{tabular}...


1

I finish only left image, the second you can finish on similar way: \documentclass{article} \usepackage{tikz} \usetikzlibrary{backgrounds, scopes} \usepackage[showframe]{geometry} \begin{document} \begin{center}% \begin{tikzpicture}[scale=0.8, thick, L/.style args = {#1/#2}{% L: line line width=#1, draw = #2 %color }, L/....


3

You can use in the third one \draw[line width=1mm,blue] (A) to[out=90,in=300,out looseness=1.3] (C); and in the last one \coordinate (aux) at (.5,2.4); \draw[line width=1mm,smooth,blue] (A) to[out=90,in=270] (aux) to[out=90,in=270] (C); To get the end of the last line to be straight, you can do \coordinate (aux) at (.5,2); \draw[line width=1mm,...


3

pdftex has no information about the character other than four lengths height, depth, width, italic correction, it may be a black square or a white rectangle or look like an F so there is no way to avoid giving tex the corrections by hand, either on each instance or setting up a font-specific table of spacing corrections for each character


3

It is not true that the text has to go where the nodes are if you use one of the easier tree specification syntaxes. forest allows you to put the text from the nodes somewhere else entirely. For example, \documentclass[border=10pt,multi,tikz]{standalone} \usepackage{forest} \begin{document} \begin{forest} for tree={ parent anchor=children, anchor=...


2

It may not be that easy to read, but it looks like it's possible to continue the way you started: \documentclass{article} \usepackage{tikz} \begin{document} \begin{figure} \begin{tikzpicture}[ font = \footnotesize, edge from parent/.style = {draw ,thin}, SN/.style = {%solid node circle, inner sep=1.2 ,fill=blue},...


3

If you want to change the fontsize of nodes inserted by an \addplot command you can use something like every axis plot/.append style = {font = \scriptsize} Code: \documentclass[margin=5pt]{standalone} \usepackage{pgfplots} \usepackage{amsmath} \pgfplotsset{compat=newest} \pgfplotsset{ tick label style = {font = \tiny}, label style = {font = \...


2

I must confess that your code is beyond my ability of comprehension ... So I only redraw provided images: I'm pretty sure that it can be easy to extend/adopt to your demands. Straight lines can be replaced with curves with plot macros if necessary. MWE for above picture is: \documentclass[tikz, border=5mm]{standalone} \usetikzlibrary{calc, intersections}...


6

Well, I will convert my comment to one of possible solutions ... See, if the following is what you looking for: Code (Minimal Working Example: MWE) -- I took opportunity and changes obsolete \tikzstyle for nodes styles to option of tikzpicture, correct wrong syntax in positioning of nodes and add TikZ library chains and with this slightly make code ...


3

One solution, as pointed out by Zarko in his answer would be to use the tape style if it's applicable. Another solution would be to use a pic, where you can draw arbitrary shapes that can conveniently be reused. Your souce with the added tikz pic: \documentclass{article} \usepackage{tikz} \usetikzlibrary{shapes.geometric, arrows} \begin{document} \...


1

Don't use a negative outer sep and take a look at Should \tikzset or \tikzstyle be used to define TikZ styles? \documentclass[a4paper]{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} [ level/.style={sibling distance=20mm/#1}, level distance=25mm, hollow node/.style={draw, circle, minimum width=10pt, inner sep=0pt}, black ...


2

Another solution with a rectangle split shape. As this kind of shapes doesn't consider a minimum height for vertically split nodes, a \parbox has been used to define different heights in each part. \documentclass[tikz,border=2mm]{standalone} \usetikzlibrary{positioning,shapes.multipart} \newcommand{\textbox}{\parbox[c][1cm][c]{3cm}{\centering #1}} \begin{...


3

I understand, that nodes in stack differs in its heights, which you like to calculate from relative size (in provided picture are written in nodes in stack) of something, i.e. you like to obtain something like this: Code for this can be quite simple and concise, if you employ two more TikZ libraries: calc and chains \documentclass[tikz, border=3mm]{...


3

Just using positioning TikZ library and a well defined node style. Code \documentclass[border=2pt,tikz]{standalone} \usetikzlibrary{positioning} \begin{document} \tikzset{block/.style={shape=rectangle, draw, node distance=-1pt, minimum width = 10em, line width=1pt}} \begin{tikzpicture} \node[block] (first) {first node}; \node[block,...



Top 50 recent answers are included