Hot answers tagged

19

\documentclass[border=5pt,tikz]{standalone} \begin{document} \begin{tikzpicture}[xscale=1,yscale=1] \fill[blue!20] (0,-2.5) --+ (0,2.5) arc (0:180:1.5) -- (-3,-2.5) arc (180:235:3) --+ (0,-.25) --+ (.45,-.25) --+ (.45,.015) (0,-2.5) arc (0:-55:3); \fill[white] (0,0) arc(0:180:1.5) --+ (0,-2) -| cycle; \fill[blue!10] (-1.5,-2) circle ({1....


18

You don't need to connect nodes. First draw background lines. All starting from (0,0). \foreach \angle in {0,1,...,359} \draw[cyan!50!black] (0,0)--++(\angle:4); Second, draw a circular node white filled: \node[circle, fill=white, text=cyan!50!black, text width=15mm, align=center]{Orion\\2000}; And third (although it's the first command), define the ...


17

\documentclass[a4paper]{article} \pdfpageheight\paperheight \pdfpagewidth\paperwidth \makeatletter \dimen4=.996264\paperheight \dimen6=.996264\paperwidth \pdfliteral page{% q n 0 0 m \strip@pt\dimen6 \space \strip@pt\dimen4 \space l s Q} \begin{document} zzzz \end{document}


17

Note sure if it is more efficient, but it is a lot easier to work with if you define the coordinates first, and then draw them. BTW: +1 for a nice usable MWE \documentclass[border=5pt,tikz]{standalone} \usetikzlibrary{backgrounds,calc} \definecolor{hellblau}{RGB}{18,158,181} \definecolor{dunkelblau}{RGB}{22,141,163} \newcommand{\changefont}[3]{\...


15

Welcome to TeX.SE! Here is a simple prototype of what you need. Hopefully, you may apply your desired customizations to it. \documentclass[border=1pt]{standalone} \usepackage{tikz} %TikZ central library is called. \usetikzlibrary{automata,positioning} % automata and positioning libraries are required to use nodes and coordinates in addition to placement ...


15

For complicated figures with graphics, I think there is some consensus that tikz is the way to go. It is probably worth learning. It is amazing, but can be intimidating for the beginner. For very simple pictures (lines, arrows, text, ovals) the picture environment has easy-to-learn tools. The \put command together with \line and \vector commands can recreate ...


13

To connect the edges of the circle you can use the border anchors of nodes (A.120) and the to Operator to connect it to the outer square. \documentclass[tikz, border=5mm]{standalone} \begin{document} \begin{tikzpicture} \draw[clip] (-2,-2) rectangle +(3,3); \node[minimum size=5cm](A){}; \node[circle, draw, minimum size=1cm](B) at (A.center) {}; \foreach \...


13

Like this? \documentclass[border=10pt,multi,tikz]{standalone} \begin{document} \begin{tikzpicture} \foreach \m in {0,1,2}{ % draws shaded regions \draw [fill=gray!50!white, rounded corners] ({ 15+120*\m}:2.25) arc ({15+120*\m}:{129+120*\m}:2.25) -- ({129+120*\m}:1.75) arc ({129+120*\m}:{15+120*\m}:1.75) -- cycle; } % draws non shaded regions \...


12

This answer shows how to get a rotated rectangle to fit around any two given nodes, so does not require any change to the way you set-up the picture. \documentclass{article} \usepackage{amsmath, amsfonts, amssymb} \usepackage{tikz} \usetikzlibrary{fit} \begin{document} \begin{tikzpicture} \node (a) at (0, 0) {a}; \node (b) at (1,0) {b}; ...


12

\documentclass[tikz, margin=3mm]{standalone} \usetikzlibrary{arrows.meta, positioning} \usepackage{circuitikz} \begin{document} \begin{tikzpicture}[box/.style={draw, thick, minimum size=10mm}] \node [box] (A) {A}; \node [box, right=20mm of A] (B) {B}; \path (A) to [lowpass, name=lpf] (B); \draw [-{Latex[length=2mm]}] (A.east) to (lpf.west); ...


12

\documentclass[border=2mm, tikz]{standalone} \usetikzlibrary{matrix, positioning} \tikzset{ trafficlight/.style = {% matrix of nodes, nodes in empty cells, rounded corners, draw = blue!70, fill = blue!30, nodes = {circle, minimum size=5mm, anchor=center, draw=black}, row 1/.style={nodes={fill=red}}...


12

Here's how to do it with pstricks. I also suggest a line with arms: \documentclass[svgnames]{article} \usepackage{pst-node} % \usepackage{auto-pst-pdf} to compile with pdflatex --enable-write18 (MiKTeX) % or pdflatex --shell-escape (TeXLive, MacTeX) \begin{document} This is a very long\Rnode{st}{ \underline{sentence that}} appears in this very \Rnode{ss}{\...


12

\documentclass{article} \usepackage{tikz} \usetikzlibrary{topaths} \tikzstyle{every picture}+=[remember picture,inner xsep=0,inner ysep=0.25ex] \begin{document} This is a very long \tikz[baseline=(node1.base)]\node (node1) {\underline{sentence that}}; appears in this very \tikz[baseline=(node2.base)]\node (node2) {\underline{short short}}; document. \...


12

Using iterative tricks you could obtain better result. RESULT: MWE: \documentclass[border=5pt,tikz]{standalone} \definecolor{hellblau}{HTML}{129EB5} \definecolor{dunkelblau}{HTML}{168DA3} \usetikzlibrary{backgrounds} \pagecolor{hellblau} \newcommand{\changefont}[3]{\fontfamily{#1}\fontseries{#2}\fontshape{#3}\selectfont}%Nice code! \begin{document} \...


12

Here's a version in plain Metapost featuring a useful idiom to find all the intersection points between two paths. This is wrapped up in luamplib so compile it with lualatex (or work out how to adapt it for plain mpost). \documentclass[border=5mm]{standalone} \usepackage{luatex85} \usepackage{luamplib} \begin{document} \mplibtextextlabel{enable} \begin{...


12

\documentclass{article} \usepackage{tikz} \usetikzlibrary{decorations.text} \definecolor{myWhite}{HTML}{f7f7f7} \definecolor{myGr1}{HTML}{c6c6c6} \definecolor{myGr2}{HTML}{e3e3e3} \definecolor{myCy}{HTML}{0396C1} \begin{document} \pagestyle{empty} \begin{tikzpicture}[scale=0.4] %front \fill[myWhite] (4.3,-17.6) -- (-9.5,-14.25) -- (-9.5,8.2) -- (4.3,5.75) -- ...


11

There is no every draw available. One possible way is to style every path. \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture}[every path/.style={->,red,thick}] \draw(0,0)node[left]{$ A $}--(5,0)node[right]{$ B $}; \end{tikzpicture} \end{document} An alternative solution is to globally set draw for every picture. ...


11

\documentclass[border=2mm]{standalone} \usepackage{tikz} \usetikzlibrary{matrix,calc} \begin{document} \begin{tikzpicture} \matrix (M) [matrix of nodes] { a & b & c & d \\ e & f & g & h \\ i & j & k & l \\ m & n & o & p \\ }; \draw[blue,rounded corners] let \p1=($(M-1-1)!-2mm!(...


11

This not using tikz ;-) \documentclass[a4paper]{article} \usepackage{pgf} \usepackage{eso-pic} \begin{document} \AddToShipoutPictureFG{% \AtPageLowerLeft{% \begin{pgfpicture} \pgfpathmoveto{\pgfpoint{0mm}{\paperheight}} \pgfpathlineto{\pgfpoint{\paperwidth}{0mm}} \pgfusepath{stroke} \end{pgfpicture}}}% blub\newpage blub \end{document}


11

Macros can be defined for each color. How the circles overlap depends on the order they are drawn, the second one is drawn over the first. With every path/.style={thick,fill=lightgray} the default style for the circles is set (line width and fill color here). The fill color is later overwritten with e.g. [fill=red] for individual circles. Using polar ...


11

\documentclass{article} \usepackage{stackengine,amssymb,xcolor} \setstackgap{L}{16pt} \savestack\trafficlight{% \stackinset{c}{.1pt}{c}{-1pt}{% \Longstack{\textcolor{red}{\Huge$\bullet$} \textcolor{yellow}{\Huge$\bullet$} \textcolor{green}{\Huge$\bullet$}}% }{\textcolor{blue!30!gray}{\rule[-1ex]{3.5ex}{4\baselineskip}}}% } \begin{document} \...


11

Package eso-pic can be used to put something on every page: \documentclass[]{article} \usepackage{tikz} \usepackage{bbding,lipsum} \usepackage{eso-pic,picture} \AddToShipoutPicture{% \AtPageLowerLeft{% \put(0,.5\paperheight){\makebox(0,0)[cl]{\ScissorHollowRight}}% \put(1.5em,.5\paperheight){\tikz\draw[dashed] (0,0) -- (\paperwidth-3em,0);} ...


Only top voted, non community-wiki answers of a minimum length are eligible