Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

New answers tagged

2

\documentclass{article} \usepackage{tikz} \begin{document} \begin{figure}[htbp] \centering % Note! if you change the scale = 2 to something else in the next line, you need to change the % radius of the circles manually as well. \begin{tikzpicture}[scale = 2] % Axes \draw[->, very thick] (0,0) -- ...


2

\documentclass[tikz,border=3.14mm]{standalone} \begin{document} \begin{tikzpicture}[scale = 0.7] \draw[thick,->] (0,0) -- (10,0) node[anchor=north west] {$x$}; \draw[thick,->] (0,0) -- (0,10) node[anchor=south east] {$z$}; \fill (0,0) circle[radius=4pt] node[anchor=north west] {$M$}; \fill (7,0) circle[radius=...


1

The behavior you observed is perfectly normal. To understand it, I suggest you to read section Creating a Picture Using an Environment of the TikZ & PGF Manual (for the manual corresponding to PGF/TikZ 3.1.3 [current], pages 126 and 127 should be most interesting to you). Basically, a tikzpicture environment produces a box for TeX, similar to a ...


1

This will place a node at the middle of the current page (you need to compile twice): \documentclass{article} \usepackage{tikz} \usepackage{lipsum} \begin{document} \lipsum[1] \begin{tikzpicture}[remember picture, overlay] \node[draw] at (current page.center) {Here I am!}; \end{tikzpicture} \lipsum[2] \end{document} Note the that TikZ picture is ...


2

This is an extended comment on Zarko's answer, which I write because we had this discussion several times. I make this a community Wiki to make clear that I am not interested in "stealing reputation points". I am, however, interested in providing the OP with something that follows the rules of the pgfmanual. The pgfmanual says on p. 166. I have not seen as ...


1

with path picture= you can to node with circle shape add desired lines and signs: \documentclass{article} \usepackage{nccmath} \usepackage{tikz} \usetikzlibrary{arrows.meta, % changed calc, chains, % new positioning, % new quotes % new } \newcommand\ppbb{path picture bounding ...


1

I think to have at least partly solved the problems, if not completely. First of all, you cannot expand loops in the way you tried to. The following version of \drawitem defines the loop lists depending on the first argument \newcommand*\drawitem[3]% {% \ifnum#1=0 \edef\mylist{} \else \ifnum#1=1 \edef\mylist{0,1} \else \edef\mylist{1,...,#1} \fi \...


2

\documentclass[tikz,border=3.14mm]{standalone} \usetikzlibrary{angles,quotes,arrows.meta} \begin{document} \begin{tikzpicture}[>={Stealth[length=7pt]},fine dots/.style={dash pattern=on 0.8pt off 0.8pt}] \draw[line width=2pt,gray,-{Stealth[length=10pt,black]}] (0,0) coordinate (O) -- (-10:1.5) node[midway,below,black]{$V$}; \draw[fine dots,->] (O) -- ...


6

Overview You have a brace matching problem, and the divisions on the x and y vectors were written in a way that isn't supported by TikZ. The following works for me. I have removed your +b argument specifier, since you don't use this argument at all. \documentclass{article} \usepackage{graphicx} \usepackage{tikz} \usetikzlibrary{calc} \usepackage{xparse} \...


10

Here are threefour examples of things that are much harder to achieve in the macro approach. The first three examples have been translated to macros in the revised question. \documentclass{article} \usepackage{tikz} \begin{document} \subsection*{Pics can have more complicated constructions} \tikzset{rectanglepath/.pic={\draw (-0.5,-0.5) rectangle ++(1,1); \...


Top 50 recent answers are included