# Tag Info

2

For your image you not to need define their coordinates separately: \documentclass[tikz,border=5pt]{standalone} \begin{document} \begin{tikzpicture} \node (a) [circle,draw] at ( 0, 0) {a}; \node (b) [circle,draw] at (-1,-1) {b}; \node (c) [circle,draw] at ( 1,-1) {c}; \draw[-] (a) to (b); \draw[-] (a) to (c); \end{tikzpicture} \end{document} If ...

1

You can define the background color in the options for the tikzcd environment. This color will then be used for crossing over. As you did not provide a minimal working example, I use the example from the documentation of the tikz-cd package: \documentclass[border=1mm]{standalone} \usepackage{tikz-cd} \pagecolor{yellow} \begin{document} \begin{tikzcd}[row ...

0

I think you will have to fiddle at least a bit with the coordinates, as you have to tell your red line that the grid has a line width of 1pt: \documentclass{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture} \draw[line width=1pt, step=1, line cap=rect] (1,1) grid (4,2); \draw[line width=2pt,red,yshift=2,shorten >=-0.5pt,shorten <=-...

1

As daleif already stated in his (several) comments: After removing all the (spelling) errors, the MWE works as expected ... % used PGFPlots v1.16 \begin{filecontents*}{HeightsAndWeights.csv} Peter, 150, 45 Jason, 134, 39 Stefan, 139, 41 Noa, 132, 38 Liv, 137, 36 Beti 135, 34 \end{filecontents*} \...

2

Compute the function value at 2-adic fractions. You can do this by the following: f(1/2) = a do induction on n: for 0 ≤ k < 2^{n-1}: f(k/2^n) = f(k/2^{n-1})*a for 2^{n-1} ≤ k < 2^n: f(k/2^n) = f((k-2^{n-1})/2^{n-1})*(1-a)+a So you got the following tex code. The \pgfkeys here acts as data array. The \pgfpath part plot the data ...

1

A straightforward way of doint this would be to provide a table (instead of coordinates) and add another column with the stuff you want to show in the nodes near coords. For details please have a look at the comments in the code. % used PGFPlots v1.16 \documentclass[border=5pt]{standalone} \usepackage{pgfplots} \pgfplotsset{ % use this compat ...

2

Here's a solution using the sagetex package, which gives you access to a computer algebra system and Python programming. \documentclass{article} \usepackage{sagetex} \usepackage[usenames,dvipsnames]{xcolor} \usepackage{pgfplots} \pgfplotsset{compat=1.15} \begin{document} \begin{sagesilent} def LSF(binexp): a = .6666 L = [0] U = [1] M = [1] ...

3

You can do coordinate calculations with the calc library (not package). That way you do not need to store the coordinates in macros, you can always extract them if you have named the coordinates or nodes. Repeating actions can be stored in a pic. \documentclass[aps,pra,reprint,superscriptaddress, usenames,dvipsnames]{revtex4-1} % \usepackage{tikz} % TikZ ...

0

I mixed answer by Schrödinger's cat and response in similar question This gives: \documentclass[tikz]{standalone} % BEGIN section 1 \usepackage{tikz} \usetikzlibrary{calc, positioning,fit,decorations.pathreplacing} % END section 1 \begin{document} % BEGIN section 2 \begin{tikzpicture}[scale=1] \tikzset{ pics/circle vertically split/.style 2 args = { ...

7

Add \coordinate (a) at (2,\pgfkeysvalueof{/pgfplots/ymax}); in the first axis environment and \coordinate (b) at (2,\pgfkeysvalueof{/pgfplots/ymin}); in the second. Then after the last \end{scope}, add \draw [dashed] (a) -- (b);. As a sidenote, you might be interested in the groupplots library for aligned axes like this. \documentclass[12pt,a4paper]{...

2

How about this? \documentclass[tikz,border=3.14mm]{standalone} \usetikzlibrary{arrows.meta,bending,calc} \begin{document} \begin{tikzpicture}[lbl/.style={circle,draw,inner sep=1pt},>={Latex[bend]}] \draw[dashed,thick] (0,2.5) coordinate(T) (-1,0) coordinate(BL) -- (0,0.5) coordinate(B) edge (T) -- (1,0) coordinate(BR); \draw[<-] ($(T)!0.5!(BL)$) ...

0

Consider using sane_tikz. See below for the code. import sane_tikz as stz label_spacing = 0.25 tick_label_spacing = 0.25 tick_length = 0.25 segment_spacing = 0.6 length_multiplier = 0.8 def segment(length, label_str, left_tick_label_str, right_tick_label_str): seg = stz.line_segment([0, 0], [length, 0]) left_tick = stz....

2

All of them work (in the sense that there are no error messages) if you add the missing semicolons to terminate the paths. You need a semicolon since \pic starts a path, and in TikZ paths are to be terminated by a ;. %%%%%%%%%%%%%%%%%% INTRODUCTION %%%%%%%%%%%%%%%%%% \documentclass[border=10pt]{standalone} %%%%%%%%%%%%%%%%%% PACKAGE %%%%%%%%%%%%%%%%%% \...

3

Welcome! You can switch the 0\pi off as follows. \documentclass[tikz, border=5mm]{standalone} \usetikzlibrary{datavisualization.formats.functions, arrows} \def\mytypesetter#1{ \pgfkeys{/pgf/number format/precision=2} \pgfmathparse{#1/pi} \pgfmathroundtozerofill{\pgfmathresult} \pgfmathifisint{\pgfmathresult}{\pgfmathtruncatemacro{\itest}{\...

2

You can reuse Schrödinger's cat's style for bent arrows. This style gives good results even on curved paths and accepts an optional argument, defaulting to 0.5 (= middle), to indicate where the arrow should lie on the path on which it is placed. With this style, the arrow can be drawn with simply: \draw[attach arrow] (a2) -- (a5); You may specify attach ...

1

Use tikz-euclide package. \documentclass[a4paper,12pt]{article} \usepackage{amsfonts} %\usepackage{amsbsy} \usepackage{amssymb} \usepackage{amsmath} %\usepackage[a4paper, total={6in, 8in}]{geometry} \usepackage{graphics} \usepackage{tikz} \usepackage{tkz-euclide}% Newly added package \usepackage{amsthm} \usepackage{hyperref} \usetikzlibrary{decorations....

5

You're almost there; you just need to add \raggedright and \\. \documentclass[]{article} \usepackage{tikz} \usepackage{setspace} \usetikzlibrary{positioning} \begin{document} \thispagestyle{empty} \begin{center} \begin{tikzpicture}[x=1.0cm, y=1.0cm] \node[circle, draw=red] (aa) at (0,0) {}; \def\myreference{References: \\ {\centering Kim, ...

6

This defines such shapes. Note that I did not really simplify positioning too much because probably you want some macros for the dialogue. They can take care of that. The following code is based on the newly added routines of your question. However, rather than defining many macros, it uses pgf keys. For instance, instead of \MeStart{\blindtext[1]\\ Text} ...

5

Something like this? \documentclass[]{article} \usepackage{tikz} \usetikzlibrary{positioning} \begin{document} \thispagestyle{empty} \begin{center} \begin{tikzpicture}[x=1.0cm, y=1.0cm] \node[circle, draw=red] (aa) at (0,0) {}; \def\myreference{References: \\\hfill Kim, et. al., May 2019\hfill\mbox{}} \node[align=left, draw=...

2

One way is to use titlesec. That way you can use ordinary \section commands for that purpose. This has various advantages (table of contents, hyperlinks, ...). You then only need to type \section{I am a cat} Example \newpage \section{You are a duck} Another example in the body of your document. \documentclass{article} \usepackage[a4paper,margin=1in,...

1

The distance is different because the last bent arrow connects to a coordinate while the others connect to nodes with a nontrivial inner sep (and outer sep). The perhaps easiest way to rectify this is to give the node also a name, and use it (rather the coordinate) in the arc path: \coordinate (label_for_ellipses) at ($(first_ellipses) +(0,-0.25)$); \node[...

3

Your pics nest tikzpictures, i.e. if you define a pic you no longer need \begin{tikzpicture} and \end{tikzpicture}. In fact, if you keep them, you may get to see uncontrollable side effects. On way of arranging these three root lattices and the text in a table is to use a built-in matrix (which does not require the library of the same name). \documentclass[...

3

There are many ways of doing this. Some want to define pics to avoid some of the repetition. \documentclass{article} \usepackage[margin=1in]{geometry} \usepackage{amsmath} \usepackage{subcaption} \usepackage{tikz} \usetikzlibrary{calc,matrix,fit} \tikzset{pics/grid/.style={code={\tikzset{wonderich/.cd,#1} \def\pv##1{\pgfkeysvalueof{/tikz/wonderich/##1}}...

5

Before \end{tikzpicture} insert the following: \node[draw, text width=0.25\linewidth,inner sep=2mm,align=left, below left] at (current bounding box.north east) {In each step of the expanding simple graphs, the vertices are labeled with a fraction and an \textit{a}-label. The fraction is a Farey Fraction; it is typeset above each vertex. }; ...

4

Here is a very simple approach: \documentclass{article} \usepackage[a4paper,margin=1in,footskip=0.25in]{geometry} \usepackage{tikz} \usepackage{fancyhdr} \pagestyle{fancy} \fancyhf{} \rfoot{ \begin{tikzpicture}[remember picture,overlay] % From https://tex.stackexchange.com/a/443744/152550 \fill[black] (current page.south west) rectangle ...

6

How about \documentclass{article} \usepackage[a4paper,margin=1in,footskip=0.25in]{geometry} \usepackage{tikz} \usepackage{fancyhdr} \pagestyle{fancy} \fancyhf{} \rfoot{ \begin{tikzpicture}[remember picture,overlay] \fill[black] (current page.south west) rectangle ++(\paperwidth,1.5cm) node[midway,align=center,font=\LARGE\bfseries,text=...

4

Here is a solution with the text effects along path option of the decorations.text library. I increased the gap, you can manage it by changing the character widths={inner xsep=1pt} option. \documentclass[border=2mm,tikz]{standalone} \usetikzlibrary{arrows, decorations.text} \tikzset{>=latex} \begin{document} \begin{tikzpicture}[decoration={ ...

3

I will add the worst answer here because I don't like diagrams with many curved arrows or that g_2 is so close to g_3. \documentclass{article} \usepackage{mathtools} \usepackage{amssymb} \usepackage{tikz-cd} \begin{document} \begin{tikzcd} & \mathbb{R}^3\\ W\ar{ru}{g_1}\ar[dashed]{r}[description]{g}\ar{rd}[swap]{g_2}\ar[out=270,in=270]{rrr} & \...

4

As supplement to @Schrödinger's cat's answer. Added are vertical lines labeled P_{r_1} and P_{r_2} (which are shown in OP image but not in his answer) and made some small changes in image code: \documentclass[margin=3mm,varwidth]{standalone} \usepackage{tikz-cd} \usepackage{amssymb} \begin{document} \[ \begin{tikzcd}[row sep=huge, /tikz/column 2/.style=...

6

This is a small variation of this answer. One thing that requires a bit attention is the left-aligned column, which one gets with /tikz/column 2/.style={nodes={align=left,text width={width("$\realR^3=\realR\times\realR\times\realR$")}}} Code (with two different double-stroke R's) \documentclass{article} \usepackage{amsmath} \usepackage{amsfonts} \...

2


2

Here is the code I wrote in Asymptote language. size(200); int L = 12; int H = 5; picture picGuide; picture picNormal; picture picModify; guide g = (0,0){right}..(4,2){right}..(7,2){right}..(11,0){right}; real lengthOfGuide = length(g); draw(picGuide, g, red); pair NoTransform(pair p) { return p; } pair MyTransform(pair p) { pair offset = point(...

Top 50 recent answers are included