TikZ
- Graphing a system of inequalities in 3 dimensionsby Henry Timmons on April 11, 2026 at 2:14 pm
I am trying to graph a system of 3 inequalities in 3 dimensions. These ineuqalities are: y-z>=1/2x, x-z>=0, and x+y>=3z. Currently I am struggling to get even a basic output. My input is: \documentclass[12pt, a4paper]{article} \usepackage{float, ulem, amsmath, amsthm, amssymb, pgfplots, tikz} \pgfplotsset{width=10cm,compat=1.9} \usepgfplotslibrary{external, fillbetween} \tikzexternalize \begin{document} \begin{tikzpicture} \begin{axis}[domain=0:10,y domain=0:10] \addplot3[surf] {y-(\frac{1}{2}*x)}; \addplot3[surf] {x}; \addplot3[surf] {\frac{x+y}{3}}; \end{axis} \end{tikzpicture} \end{document} I am getting the error: "Package tikz Error: Sorry, the system call 'pdflatex -shell-escape - halt-on-error -interaction=batchmode -jobname "output-figure0" "\def\tikzexternalrealjob{output}\input{output}"' did NOT result in a usable output file 'output-figure0' (expected one of .pdf:.jpg:.jpeg:.png:). Please verify that you have enabled system calls. For pdflatex, this is 'pdflatex -shell-escape'. Sometimes it is also named 'write 18' or something like that. Or maybe the command simply failed? Error messages can be found in 'output-figure0.log'."
- I am trying to typeset a solution for finding the next number in a series using TiKZby Brion on April 9, 2026 at 6:30 pm
The following code snippet works, but I'm looking for a more elegant solution. Perhaps one using an inverse tree environment. \documentclass[12pt]{article} \usepackage{tikz} \begin{document} Problem: Find the next number in the following sequence:\\ 7 \quad 10 \quad 15 \quad 22 \quad 31...\\ Solution:\\ \begin{tikzpicture} \node (a) at (0,0) { 7}; \node (b) at (0:0.75) {10}; \node (c) at (0:1.50) {15}; \node (d) at (0:2.25) {22}; \node (e) at (0:3.00) {31}; \node [red] (f) at (0:3.75) {42}; \node (g) at (0.50,-1) { 3} edge [<-] (a) edge [<-] (b); \node (h) at (1.25,-1) { 5} edge [<-] (b) edge [<-] (c); \node (i) at (2.00,-1) { 7} edge [<-] (c) edge [<-] (d); \node (j) at (2.75,-1) { 9} edge [<-] (d) edge [<-] (e); \node [red] (k) at (3.50,-1) {11} edge [red] [<-] (e) edge [red] [->] (f); \node (l) at (1.00,-2) {2} edge [<-] (g) edge [<-] (h); \node (m) at (1.75,-2) {2} edge [<-] (h) edge [<-] (i); \node (n) at (2.50,-2) {2} edge [<-] (i) edge [<-] (j); \node [red] (o) at (3.25,-2) {2} edge [red] [<-] (j) edge [red] [->] (k); \node (p) at (5,-3.5) {}; \draw [->,red] (0,-3.5) .. controls +(up:1cm) and +(left:1.5cm) .. node {}(g); \end{tikzpicture} \setlength{\parskip}{0pt} \setlength{\parindent}{0pt} Compute the difference between each pair of numbers in the list.\\ Observe the pattern (every odd number beginning with 3, in this case.) \end{document}
- Tizk and circuitikz How to put frame around collection of commands inside?by Nasser on April 9, 2026 at 9:36 am
I am using circuitikz to make 2 small diagrams with spring mass. I'd like to put a frame around each. I tried many things, such as using \fbox and \node[draw=black, inner sep=5pt]{...}; but nothing works. I keep getting errors. Below is what I have as MWE \documentclass[tikz, border=2mm]{standalone} \usepackage{circuitikz} \usetikzlibrary{calc} \usepackage{amsmath} \usetikzlibrary{patterns,hobby,decorations.pathmorphing} \usetikzlibrary{fit} \begin{document} \begin{circuitikz}[remember picture, overlay] %\draw[step=1cm, gray, very thin] (current page.south west) grid (current page.north east); \coordinate (A) at (3,-.5); \coordinate (B) at (12,-.5); %ground %\node[draw=black, inner sep=5pt]{ %does not work \pattern[pattern=north east lines] (A) rectangle ($(A)+(4,0.15)$); \draw[thick] (A) -- ($(A)+(4,0)$); \draw ($(A)+(1.5,0)$) to[spring, l_=$k$] ($(A)+(1.5,-2)$); \draw ($(A)+(2.5,0)$) to[damper, l=$c$] ($(A)+(2.5,-2)$); \draw[fill=gray!30] ($(A)+(1,-2)$) rectangle ($(A)+(3,-3)$); \node[font=\Large] at ($(A)+(2,-2.5)$) {$m$}; \draw[thin,dashed] ($(A)+(3.25,-2.5)$) -- ($(A)+(4.5,-2.5)$); \node[align=left,font=\small] at ($(A)+(5.25,-2.5)$) {equilibrium\\position}; \draw[thin, ->] ($(A)+(4,-2.5)$) -- ($(A)+(4,-3)$); \node at ($(A)+(4,-3.2)$) {$x$}; \node at ($(A)+(2,-4)$) {$\boxed{m x'' + c x' + k x = 0}$}; %}; %does not work %------------------------------------ %\fbox{ %does not work \pattern[pattern=north east lines] (B) rectangle ($(B)+(4,0.15)$); \draw[thick] (B) -- ($(B)+(4,0)$); \draw ($(B)+(2,0)$) to[spring, l_=$k$] ($(B)+(2,-2)$); \draw[fill=gray!30] ($(B)+(1,-2)$) rectangle ($(B)+(3,-3)$); \node[font=\Large] at ($(B)+(2,-2.5)$) {$m$}; \draw[thin,dashed] ($(B)+(3.25,-2.5)$) -- ($(B)+(4.5,-2.5)$); \node[align=left,font=\small] at ($(B)+(5.25,-2.5)$) {equilibrium\\position}; \draw[thin, ->] ($(B)+(4,-2.5)$) -- ($(B)+(4,-3)$); \node at ($(B)+(4,-3.2)$) {$x$}; \draw[thick, ->] ($(B)+(2,-3)$) -- ($(B)+(2,-3.5)$); \node at ($(B)+(2,-3.75)$) {$F_0 \cos(\varpi)$}; \node at ($(B)+(2,-4.5)$) {$\boxed{m x'' + k x = F_0 \cos(\varpi)}$}; %} %does not work \end{circuitikz} \end{document} Compiling with lualatex gives this I'd like to make it look like this I do not want to make 2 separate \begin{circuitikz} and put fbox or frame outside each. But want just one \begin{circuitikz} as above, and inside it, put a frame around any collection of commands I want. Is this possible to do? All examples I saw says to put frame around the whole tikz picture. But that is not what I want. May be \node[draw=black, inner sep=5pt]{...}; does not work inside circuitik?
- Issue with \only in beamer with Tikz and fragile is being used [duplicate]by Fractal20 on April 8, 2026 at 9:39 pm
I'm having an issue with specific Tikz pictures in beamer when using \only, even when including the [fragile] in the Beamer frame creation. I have a minimal example below. If the \only is removed, it compiles fine. As is, it gives an illegal parameter error. I haven't had issues with other tikz pictures so I think it might be coming from some of the set up. Any ideas? \documentclass{beamer} \usepackage{tikz} \usetikzlibrary{matrix, positioning,decorations.pathreplacing} \begin{document} \begin{frame}[fragile] \only<1>{ \begin{tikzpicture}[scale=1,b/.style={draw, minimum size=5mm, fill=black},w/.style={draw, minimum size=5mm, fill=white}, m/.style={matrix of nodes, column sep=1pt, row sep=1pt, draw=none, label=below:#1}, node distance=1pt] \node[] (A1) at (0,0) {}; \matrix (A2) [m=, right=of A1]{ 1&0&1\\ }; \end{tikzpicture} } \end{frame} \end{document}
- Improvements to code used for a special headingby yannisl on April 8, 2026 at 11:51 am
The following code snippet draws a box in box for a heading. I would like some help to improve the code so that only the top right corner of the bottom box is rounded. Most of the values are currently hardcoded, as this forms part of a larger code that calls the macro \tikzspecial defines keys that are passed as options. The height of the blue top box should be 3cm, I seem to be about a couple of mm out, any help with that I would also appreciate. \documentclass[10pt,twoside]{book} \usepackage[bottom=2cm,top=2cm, left=3cm, right=4cm,showframe]{geometry} \usepackage{tikz} \usepackage{kantlipsum} \ExplSyntaxOn \makeatletter \NewDocumentCommand{\tikzspecial}{s O +m}{ %% First band \begin{tikzpicture}[remember~picture,overlay,inner~sep=0pt,outer~sep=0pt] \draw[draw=none,fill=cyan,outer~sep=0pt,inner~sep=0pt, xshift={-2cm},yshift=-\dimexpr3cm+10pt] (current~page.north~west) rectangle (\paperwidth,2.5cm); \end{tikzpicture} %% Second band with rounded corners \begin{tikzpicture}[remember~picture,overlay] \node~at~(current~page.north~west)~[yshift=-\dimexpr3cm+5.4pt,xshift=-10pt,%.3 klls corners on left anchor=south~west,inner~sep=10pt, outer~sep=0,white,fill=black, draw=none,rounded~corners=10pt,align=left, text~width=\textwidth]{\leftskip10pt \large \sffamily\LARGE\bfseries \IfBooleanTF{#1}{}{\thechapter.\space} #3\par }; \end{tikzpicture} \vspace*{4\baselineskip} \par \@afterindentfalse \@afterheading } \makeatother \ExplSyntaxOff \begin{document} \parindent=2em % simulate chapter \stepcounter{chapter} \tikzspecial*{Some Special Layout\\ Format} \kant[1-9] \end{document}
- 3d Tikz Graph highlighting a specific interp line and axis problemby FishDrowned on April 7, 2026 at 2:43 pm
I'm currently trying to graphically represent Feynman's technique. Specifically, I have the function rad(atan(sqrt(2-x*x)))/(1+x*x) which is being parametrized as rad(atan(t*sqrt(2-x*x)))/(1+x*x). I managed to create the graph for the function, \documentclass{standalone} \usepackage{tikz,pgfplots} \pgfplotsset{compat=1.18} \begin{document} \begin{tikzpicture} \begin{axis}[ axis lines = center, axis on top, view={50}{30}, xlabel={$x$}, ylabel={$t$}, zlabel={}, xmin=-2, xmax=2, ymin=-2, ymax=2, zmin=-2, zmax=2, tick label style={font=\tiny} ] \addplot3[ surf, shader=faceted interp, faceted color=black!60, opacity=0.85, samples=22, samples y=18, domain=-1.4:1.4, domain y=-2:2, ] {rad(atan(y*sqrt(2-x*x)))/(1+x*x)}; \end{axis} \end{tikzpicture} \end{document} But I'm having trouble figuring out how to a) highlight the specific line along the function that represents rad(atan(sqrt(2-x*x)))/(1+x*x) and b) getting the axis lines to be above and below the 3d surface when the surface is above and below.
- How to plot y = x^{2/3} + 0.8 cos(kx) √(3-x²) in LaTeX TikZby hola on April 7, 2026 at 1:45 pm
I would like to plot the following function in LaTeX using TikZ or pgfplots: \[ y = x^{2/3} + 0.8 \cdot \cos(kx) \cdot \sqrt{3 - x^2} \] The domain is \( - \sqrt{3} \leq x \leq \sqrt{3} \). I need to create a nice graph where: The curve looks smooth I can easily change the value of \( k \) (number of oscillations) The modulated amplitude (the \( \sqrt{3-x^2} \) part) is clearly visible I have tried basic \addplot but I have problems with the fractional power \( x^{2/3} \) and with making the cosine oscillation look good. MWE (Minimal Working Example): \documentclass{article} \usepackage{pgfplots} \pgfplotsset{compat=1.18} \begin{document} \begin{tikzpicture} \begin{axis} \addplot {x^(2/3)}; % this part works, but adding the rest is difficult \end{axis} \end{tikzpicture} \end{document} pgfplots tikz-pgf plot functions graphics
- pgf-PeriodicTable: monochrome (black/white) Periodic table - problem with radiation symbol and 'Ra' shorthandby cis on April 4, 2026 at 6:57 am
I want to create a perfect monochrome Periodic table (for black and white printing, etc.). 1/2. Instead of the colored "radioactive symbol" (which seems to be set hard-coded by the package), I'd like to use an asterisk '*' or a simple text character. 2/2. Secondly, the term 'Ra' in the legend must also be replaced by the star (or the other symbol used). Note: The aforementioned "radioactive symbol" seems to be (hard-coded) retrieved from the file /texmf-dist/tex/latex/pgf-periodictable/pgfPT_radio_symbol.pdf → which is located near the package file. One could therefore "hack" the problem by placing a PDF file with the same name in one's working directory. However, I'm wondering if there's a more elegant solution. PS: Since I'm not yet very familiar with the package, general suggestions for improvement are welcome. My progress so far: \documentclass[paper=a4, paper=landscape]{scrarticle} \usepackage[margin=11mm,showframe=false,]{geometry} \usepackage{lmodern} \usepackage{pgf-PeriodicTable} \begin{document} \pgfPT[ cell font=\sffamily,% normal LaTeX font (avoids font warnings of pgf-PeriodicTable) csSolid, show title=false, %Z list={1,...,36,87,88},% test Z backcolor=white, Z color=black, Z font=\footnotesize\bfseries, %CS render mode=fill and outline,% default CS outline color=black,% Outline always black CS solid=black, % Solid: black CS liquid=gray,% Liquid: gray CS synt=white,% Synthetic: white ("inline color") CS gas=lightgray,% Gaseous: white (only outline visible) light gray name color=black, name font=\fontsize{5.125pt}{6.125pt}\selectfont,% default: \tiny but seems to large Ar color=black, capitalize element names=true,% please! period label color=black,% Color of period numbers (left) group label color=black,% Color of group numbers (top) %legend radio color=red,% test MNM line width=1.4pt,% default: 0.8pt MNM line color=black,% default: red!80!black %show MNM line=false,% alternative ] \end{document} PPS: The star for "radioactive" is not that unusual.
- How to create lines perfectly lie on a circle shape with TikZ?by user516076 on March 12, 2026 at 6:49 am
It's very difficult to make a perfect line that lies on exact circle. This is my full work: \documentclass[tikz,border=1pt]{standalone} \usepackage{tikz} \usepackage{calligra} \usepackage[T1]{fontenc} \begin{document} \begin{tikzpicture}[line width=1pt] \path[use as bounding box] (-5.6,-1.2) rectangle (6.4,7.2); % Circle \draw (2.6,3.0) circle (3.1); % Secant line P-T-U \draw (-5.0,0.1) -- (4.7,5.6); % Chords \draw (2.6,2.3) -- (1.2,1.7); % short chord near S \draw (1.2,1.7) -- (4.0,1.4); % S to V \draw (4.0,1.4) -- (4.7,5.6); % V to U % Angle at S \draw (1.2,1.7) ++(0.55,0) arc[start angle=0,end angle=123,radius=0.55]; % Angle at V \draw (4.0,1.4) ++(-0.55,0) arc[start angle=180,end angle=95,radius=0.55]; % Labels \node[font=\fontsize{34}{34}\selectfont] at (-5.0,-0.4) {$P$}; \node[font=\fontsize{34}{34}\selectfont] at (0.2,2.9) {$T$}; \node[font=\fontsize{34}{34}\selectfont] at (5.2,5.9) {$U$}; \node[font=\fontsize{34}{34}\selectfont] at (4.3,0.4) {$V$}; \node[font=\fontsize{34}{34}\selectfont] at (0.9,0.7) {$S$}; % Angle labels \node[font=\fontsize{28}{28}\selectfont] at (2.0,2.5) {$123^\circ$}; \node[font=\fontsize{28}{28}\selectfont] at (3.6,2.0) {$85^\circ$}; \end{tikzpicture} \end{document} and this is the result: What I want: Please along with full MWE ready to copy paste, could you explain, what the trick is and what to add and where to add, so that I can also learn? T.I.A.
- tiered list with a heading with tree-like |- line connectors that enumerate itemsby Mampac on March 1, 2026 at 4:08 pm
how do i get a list that has a heading (in this example, "Deep Learning Methods" as the heading), from which level-2 entries are connected with solid lines? so far i draw the connector lines with tikz like this: which looks fine except for the extra-bolded trunk of the tree due to multiple retracing of the same connector path in my current implementation. it is super-subtle, but when you zoom out of the PDF file, you can see marginal pixel strips lacking at the upper part of the tree trunk where it's thinner than the rest. the MRE is as follows: \documentclass{article} \usepackage{tikz} \usetikzlibrary{tikzmark,calc} \tikzset{ taxonomy/.style={ overlay, remember picture } } \newcommand{\subcatindent}{1.3em} \newcommand{\methodsindent}{2.3em} \begin{document} unrelated text\\ \textbf{\tikzmarknode{dl}{\underline{Deep Learning Methods}}}\\ \hspace*{\subcatindent}\textbf{\tikzmarknode{dl_convo}{Convolution}}\\ \hspace*{\methodsindent}AE-based\\ \hspace*{\subcatindent}\textbf{\tikzmarknode{dl_ae}{Autoencoders}}\\ \hspace*{\methodsindent}Method D2\\ \hspace*{\subcatindent}\textbf{\tikzmarknode{dl_gan}{GANs}}\\ \hspace*{\methodsindent}Method D3\\ \hspace*{\subcatindent}\textbf{\tikzmarknode{dl_diff}{Diffusion}}\\ \hspace*{\methodsindent}Method D3\\ \hspace*{\subcatindent}\textbf{\tikzmarknode{dl_att}{Attention-Driven}}\\ \hspace*{\methodsindent}Method D3\\ \hspace*{\subcatindent}\textbf{\tikzmarknode{dl_ens}{Ensemble}}\\ \hspace*{\methodsindent}Method D3 \begin{tikzpicture}[taxonomy] \newcommand{\srcOffsetX}{+0.3em} \newcommand{\srcOffsetY}{-1.0ex} \coordinate (dl_start) at ($(dl.south west)+(\srcOffsetX,\srcOffsetY + 0.3ex)$); \coordinate (dl_lowest) at (dl_ens.west); \coordinate (dl_trunk) at ($(dl_start |- dl_lowest)$); \draw (dl_start) -- (dl_trunk); \draw (dl_trunk) |- (dl_convo.west); \draw (dl_trunk) |- (dl_ae.west); \draw (dl_trunk) |- (dl_gan.west); \draw (dl_trunk) |- (dl_diff.west); \draw (dl_trunk) |- (dl_att.west); \draw (dl_trunk) |- (dl_ens.west); \end{tikzpicture} \end{document} is there a way to dynamically and systematically implement this so that the connectors are drawn exactly at the place where the previous one turned 90 degrees to the right? ideally, i could turn this in a custom list environment, but so far i don't see a clear way of solving the retracing problem.
- Putting two flowcharts on the same page side by side in Latexby Destr on January 31, 2026 at 12:27 pm
So i have the following code in latex and i'm trying to put these two flowcharts side by side, for some reason i cant do that and instead one is on top of the other , i can't understand what i do wrong. Below is the code and here is the resulting image \documentclass{article} \usepackage[dvipsnames]{xcolor} \usepackage{tikz} \usetikzlibrary{arrows.meta, positioning, calc} \usepackage{xcolor} \usepackage{graphicx} \usetikzlibrary{shapes.geometric, arrows.meta, positioning,calc} \usepackage{algorithm} \usepackage{algorithmic} \begin{document} \begin{figure}[ht] \centering % ================= LEFT DIAGRAM ================= \begin{minipage}[t]{0.30\textwidth} \centering \begin{tikzpicture}[ scale=0.75, transform shape, node distance=1cm, every node/.style={font=\scriptsize}, block/.style={rectangle, draw, rounded corners, minimum width=2.6cm, minimum height=0.7cm, align=center}, adder/.style={circle, draw, minimum size=0.45cm, inner sep=0pt}, arrow/.style={->, thick} ] \tikzset{ inputoutput/.style={block, fill=cyan!40}, linear/.style={block, fill=green!40}, mixup/.style={block, fill=BrickRed!40}, penc/.style={block, fill=purple!40}, cmamba/.style={block, fill=red!40}, rms/.style={block, fill=yellow!40} } \node[inputoutput] (input) {Input}; \node[mixup, above=of input] (mixup) {Channel Mixup}; \node[linear, above=of mixup] (lin1) {Linear}; \node[penc, above=of lin1] (penc) {Positional Encoding}; \node[adder, above=of penc] (add) {$+$}; \node[cmamba, above=of add] (cmamba) {CMamba}; \node[rms, above=of cmamba] (rms) {RMS Norm}; \node[linear, above=of rms] (lin2) {Linear}; \node[inputoutput, above=of lin2] (output) {Output}; \draw[arrow] (input) -- (mixup); \draw[arrow] (mixup) -- (lin1); \draw[arrow] (lin1) -- (penc); \draw[arrow] (penc) -- (add); \draw[arrow] (add) -- (cmamba); \draw[arrow] (cmamba) -- (rms); \draw[arrow] (rms) -- (lin2); \draw[arrow] (lin2) -- (output); \draw[arrow] (input.east) -- ++(1.2,0) |- (add.east); \end{tikzpicture} \caption*{(a) Overall Architecture} \end{minipage} \hfill % ================= RIGHT DIAGRAM ================= \begin{minipage}[t]{0.30\textwidth} \centering \begin{tikzpicture}[ scale=0.7, transform shape, node distance=0.45cm, every node/.style={font=\scriptsize}, block/.style={rectangle, draw, rounded corners, minimum width=3.2cm, minimum height=0.7cm, align=center}, mult/.style={circle, draw, minimum size=0.45cm, inner sep=0pt}, arrow/.style={->, thick} ] \node[block, fill=green!40] (linL) {Linear}; \node[block, fill=RoyalBlue!40, above=of linL] (conv) {Conv1D}; \node[block, fill=magenta!40, above=of conv] (siluL) {SiLU}; \node[block, fill=red!40, above=of siluL] (ssm) {SSM}; \node[block, fill=green!40, right=0.8cm of linL] (linR) {Linear}; \node[block, fill=magenta!40, above=of linR] (siluR) {SiLU}; \node[mult] (mult) at ($(ssm.north)!0.5!(siluR.north) + (0,2cm)$) {$\times$}; \draw[arrow] (linL) -- (conv); \draw[arrow] (conv) -- (siluL); \draw[arrow] (siluL) -- (ssm); \draw[arrow] (linR) -- (siluR); \draw[arrow] (ssm.north) |- (mult.west); \draw[arrow] (siluR.north) |- (mult.east); \node[block, fill=yellow!40, above=0.4cm of mult] (rms2) {RMS Norm}; \draw[arrow] (mult) -- (rms2); \end{tikzpicture} \caption*{(b) CMamba Block (Expanded)} \end{minipage} \caption{Overview of the model architecture and the internal structure of the CMamba block.} \label{fig:cmamba_combined} \end{figure} \end{document}
- How to avoid duplicate chapter title and absolutely position chapter title with TikZby Chen Mortenfeld on June 12, 2025 at 7:50 pm
I'm customizing chapter titles in my book using the titlesec and tikz packages. For special chapters like the "Preface", I want to: Show a custom TikZ-styled title box that is positioned exactly \TitleBoxOffset below the top of the page (absolute positioning, not relative). Avoid having the chapter title (e.g., "Preface") appear twice on the page — once inside my TikZ box and once from LaTeX's default chapter title mechanism. So basically "Preface" appears twice, and the location is set manually. Here's my code in the .sty file: \usepackage[explicit]{titlesec} \usepackage{tikz} \usepackage{xcolor} \usepackage{etoolbox} % for \IfStrEq \newcommand{\CurrentChapterTitle}{} \newlength{\ChapterTopSkip} \newcommand{\ChapterHook}[1]{% \renewcommand{\CurrentChapterTitle}{#1}% \IfStrEq{#1}{Preface}{% \titleformat{\chapter} [block] {\centering} {} % no label {0pt} {% \begin{tikzpicture} \node[ draw=lightblue, line width=1pt, rounded corners=10pt, minimum width=0.8\linewidth, minimum height=2cm, align=center, fill=white, fill opacity=1, text opacity=1 ] {\scalebox{1.4}{\textcolor{lightblue}{\Huge{#1}}}}; \end{tikzpicture} } % \titlespacing*{\chapter}{0pt}{-\topskip}{20pt} \titlespacing*{\chapter}{0pt}{-95pt}{20pt} } {% \titleformat{\chapter}[block] {\normalfont\scshape\Huge\centering} {\fontsize{140pt}{140pt}\selectfont\thechapter\\} {0pt} {\normalfont\scshape\Huge\centering #1} }% } % % Patch \chapter to call ChapterHook \let\oldchapter\chapter \renewcommand{\chapter}[1]{% \ChapterHook{#1}% \oldchapter{#1}% } % Suppress LaTeX’s default \@makechapterhead \makeatletter \renewcommand{\@makechapterhead}[1]{} \makeatother Update: I updated the code block to include the packages. Thanks to the comments, I managed to make the word "Preface" appear only once, by using: \usepackage[explicit]{titlesec} see the update code. Now my only issue is the position of the title that I define manually — I want it to be at position 0 relative to the page boundaries, and then I’ll subtract a fixed predefined offset from it. Thank you!
- How to align text with graphs and add a bracket with Tikz?by hana on November 11, 2024 at 4:56 pm
Could anyone help align the text and the graphs as shown in the right figure? Also, could you help with adding the brackets? By bracket, I mean to say that the values in YY column can form tuples of graphs from each row. For example, YY1 is the combination of the first graph from each row. Please suggest if you know a better way than using brackets. \documentclass[conference]{IEEEtran} \IEEEoverridecommandlockouts \usepackage{cite} \usepackage{amsmath,amssymb,amsfonts} \usepackage{algorithmic} \usepackage{graphicx} \usepackage{textcomp} \usepackage{xcolor} \usepackage{booktabs} \usepackage{tikz} \usepackage{lipsum} \def\BibTeX{{\rm B\kern-.05em{\sc i\kern-.025em b}\kern-.08em T\kern-.1667em\lower.7ex\hbox{E}\kern-.125emX}} \begin{document} \lipsum[1] % Define the side length, horizontal distance, and circle size as global variables \def\sideLength{0.5} % You can change this value \def\hDistance{1} % You can change this value \def\circleSize{1.5pt} % Circle size for the vertices \begin{table}[h!] \centering \caption{Sample Table with Graphs Using TikZ} \label{tab:sample_table} \begin{tabular}{cccc} % 4 columns \toprule No. & XX & Graph & YY \\ % Header row \midrule 1 & Value 1 & \begin{tikzpicture} \fill[red] (0,0) circle (\circleSize); % Draw and fill Vertex A \node at (0,-0.2) {A}; % Label A \end{tikzpicture} & Value YY1 \\ 2 & Value 2 & \begin{tikzpicture} % Draw the edge between A and B \draw[black] (0,0) -- (\sideLength,0); % Edge between A and B % Now fill the vertices \fill[red] (0,0) circle (\circleSize); % Vertex A (filled) \node at (0,-0.2) {A}; \fill[red] (\sideLength,0) circle (\circleSize); % Vertex B (filled) \node at (\sideLength,-0.2) {B}; \end{tikzpicture} & Value YY2 \\ 3 & Value 3 & \begin{tikzpicture} % Draw the edges for the first graph (equilateral triangle) \draw[black] (0,0) -- (\sideLength,0); % Edge A-B \draw[black] (\sideLength,0) -- (\sideLength/2,{\sideLength*sqrt(3)/2}); % Edge B-C \draw[black] (\sideLength/2,{\sideLength*sqrt(3)/2}) -- (0,0); % Edge C-A % Fill the vertices \fill[red] (0,0) circle (\circleSize); % Vertex A \node at (0,-0.2) {A}; \fill[red] (\sideLength,0) circle (\circleSize); % Vertex B \node at (\sideLength,-0.2) {B}; \fill[red] (\sideLength/2,{\sideLength*sqrt(3)/2}) circle (\circleSize); % Vertex C \node at (\sideLength/2,{\sideLength*sqrt(3)/2+0.2}) {C}; % Second graph (path: edges between A-B and B-C) \begin{scope}[xshift=\hDistance cm] \draw[black] (0,0) -- (\sideLength,0); % Edge A-B \draw[black] (\sideLength,0) -- (\sideLength/2,{\sideLength*sqrt(3)/2}); % Edge B-C \fill[red] (0,0) circle (\circleSize); % Vertex A \node at (0,-0.2) {A}; \fill[red] (\sideLength,0) circle (\circleSize); % Vertex B \node at (\sideLength,-0.2) {B}; \fill[red] (\sideLength/2,{\sideLength*sqrt(3)/2}) circle (\circleSize); % Vertex C \node at (\sideLength/2,{\sideLength*sqrt(3)/2+0.2}) {C}; \end{scope} % Third graph (star: edges from C to A and B) \begin{scope}[xshift=2*\hDistance cm] \draw[black] (\sideLength/2,{\sideLength*sqrt(3)/2}) -- (0,0); % Edge C-A \draw[black] (\sideLength/2,{\sideLength*sqrt(3)/2}) -- (\sideLength,0); % Edge C-B \fill[red] (0,0) circle (\circleSize); % Vertex A \node at (0,-0.2) {A}; \fill[red] (\sideLength,0) circle (\circleSize); % Vertex B \node at (\sideLength,-0.2) {B}; \fill[red] (\sideLength/2,{\sideLength*sqrt(3)/2}) circle (\circleSize); % Vertex C \node at (\sideLength/2,{\sideLength*sqrt(3)/2+0.2}) {C}; \end{scope} % Fourth graph (V-shape: edges from A to C, and A to B) \begin{scope}[xshift=3*\hDistance cm] \draw[black] (0,0) -- (\sideLength/2,{\sideLength*sqrt(3)/2}); % Edge A-C \draw[black] (0,0) -- (\sideLength,0); % Edge A-B (corrected) \fill[red] (0,0) circle (\circleSize); % Vertex A \node at (0,-0.2) {A}; \fill[red] (\sideLength,0) circle (\circleSize); % Vertex B \node at (\sideLength,-0.2) {B}; \fill[red] (\sideLength/2,{\sideLength*sqrt(3)/2}) circle (\circleSize); % Vertex C \node at (\sideLength/2,{\sideLength*sqrt(3)/2+0.2}) {C}; \end{scope} \end{tikzpicture} & Value YY3 \\ 4 & Value 4 & ... & Value YY4 \\ \bottomrule \end{tabular} \end{table} \end{document}
- how can draw conical helix with latex tikz picture?by Samia Rani on August 30, 2024 at 12:10 pm
I am not much better at mathematics equations, but I need to draw some graphs in latex. I tried this one but it's not look exactly the same as shown in the image. Please I will be very grateful if anyone can help regarding this. \documentclass[tikz, border=1pt]{standalone} \usetikzlibrary{arrows.meta, ext.topaths.arcthrough, decorations.markings} \usetikzlibrary{math} \usepackage{pgfplots} \pgfplotsset{compat=1.18} \begin{document} \begin{tikzpicture} \begin{axis}[ hide axis, % Hide the axis lines, labels, and ticks view={45}{45}, axis equal, grid=none, samples=50, domain=0:7*pi, ] % First helix shifted upwards \addplot3[black, smooth] ({x*cos(deg(x))}, {x*sin(deg(x))}, {x + 1}); % Second helix shifted downwards \addplot3[black, smooth] ({-x*cos(deg(x))}, {-x*sin(deg(x))}, {-x - 1}); \end{axis} \end{tikzpicture} \end{document}
- Tikz symbols over colors in tableby David Moldes on November 14, 2023 at 1:53 pm
I am using the tikz package to create checkmarks and crosses, but if I color the rows, then they are only partially seen. Here is a minimal working example: \documentclass[table]{article} \usepackage{graphicx, xcolor} % Required for inserting images \usepackage{tabularx,booktabs} \usepackage{amsmath,amsfonts,amssymb,amscd,amsthm} \usepackage{multirow} \usepackage{array} \usepackage{multicol} \definecolor{DarkGreen}{rgb}{0.0, 0.5, 0.0} \definecolor{DarkRed}{rgb}{0.76, 0.13, 0.28} \definecolor{lavender}{rgb}{0.9, 0.9, 0.98} \usepackage{tikz} \def\checkmark{\color{DarkGreen}\tikz\fill[scale=0.4](0,.35) -- (.25,0) -- (1,.7) -- (.25,.15) -- cycle;} \def\cross{\color{DarkRed}$\mathbin{\tikz [x=1.4ex,y=1.4ex,line width=.2ex, red] \draw (0,0) -- (1,1) (0,1) -- (1,0);}$} \begin{document} \begin{table}[] \begin{tabular}{lccccc} \toprule & \multicolumn{3}{c}{\textbf{Proteins}} & \textbf{CHs} & \multicolumn{1}{l}{} \\ \cline{2-5} \multicolumn{1}{c}{\textbf{DES}} & \textit{BCA Microplate} & \textit{BCA 1 mL} & \textit{Bradford} & \textit{Dubois} & \textit{\textbf{Apt?}} \\ \toprule \rowcolor{lavender} \textit{ChCl:Lactic acid} & -22,6\% & 13,2\% & 15,0\% & 4,3\% & \multirow{2}{*}{\checkmark} \\ \rowcolor{lavender} \textit{ChCl:Lactic acid} & -32,0\% & 6,3\% & -7,5\% & 12,9\% & \\ \textit{ChCl:2Lactic acid} & -43,6\% & 8,3\% & 10,8\% & 11,9\% & \multirow{2}{*}{\checkmark} \\ \textit{ChCl:2Lactic acid} & -46,7\% & -2,0\% & -3,1\% & 20,8\% & \\ \rowcolor{lavender} \textit{ChCl:3Lactic Acid} & -41,7\% & 6,4\% & 5,9\% & 12,9\% & \multirow{2}{*}{\checkmark} \\ \rowcolor{lavender} \textit{ChCl:3Lactic Acid} & -51,1\% & -1,6\% & 3,9\% & 35,1\% & \\ \textit{ChCl:6Lactic Acid} & -57,3\% & -3,3\% & 3,1\% & 42,9\% & \multirow{2}{*}{\cross} \\ \textit{ChCl:6Lactic Acid} & -54,6\% & -1,1\% & 6,4\% & 28,0\% & \\ \bottomrule \end{tabular} \end{table} \end{document}
- Animated Brownian motion with fadingby JeT on June 9, 2023 at 8:28 am
I try to reproduce this interesting visual on brownian motion and to make an animation out of it. \documentclass[10pt]{standalone} \usepackage{tikz} \usetikzlibrary{fadings} \begin{document} \begin{tikzpicture} \foreach \Y in {1,...,10} {\draw[path fading=west] (3*rnd,1-2*rnd) foreach \X in {1,...,100} {-- ++ (0.05,0.2-0.4*rnd)}; } \end{tikzpicture} \end{document} This is only the first step to get an Animation I have no idea on how to move forward though :/ Source. BrownianMotion
- TikZ: add the rotation arms of a Roulette Wheelby cis on May 13, 2023 at 2:24 pm
How could I add a thing in the middle like this here \documentclass[margin=5mm]{standalone} \usepackage{tikz} \usetikzlibrary{shapes.geometric} \begin{document} \begin{tikzpicture}[font=\tiny\sffamily, thin] % Roulette Wheel \pgfmathtruncatemacro\s{36} \pgfmathsetmacro\R{1.7}% Outer Radius Number \pgfmathsetmacro\r{1.4}% Inner Radius Number \pgfmathsetmacro\Radius{0.5*(\R+\r)}% Fill-Radius Number \pgfmathsetlengthmacro\LW{1cm*(\R-\r)}% Line Width of Fill \pgfmathsetmacro\rT{1.0}% Inner Radius Wheel \pgfmathsetmacro\rA{2.3}% Outer Radius Wheel \pgfmathsetmacro\rD{0.5*(\rA+\R)-0.025}% Radius of Diamonds \pgfmathsetmacro\wM{360/(\s+1)}% Middle Point Angle % List of Numbers \def\RLT{0, 32, 15, 19, 4, 21, 2, 25, 17, 34, 6, 27, 13, 36, 11, 30, 8, 23, 10, 5, 24, 16, 33, 1, 20, 14, 31, 9, 22, 18, 29, 7, 28, 12, 35, 3, 26} % Array of List \def\RLTa{{\RLT}} \foreach \Place in {0,...,\s}{%% \pgfmathsetmacro\wStart{90-0.5*\wM-\Place*\wM}% Startangle \pgfmathsetmacro\wEnd{\wStart+\wM}% Endangle \pgfmathsetmacro\wMiddle{\wStart+0.5*\wM)}% % Fill Number Areas \pgfmathsetmacro\rscolor{mod(\Place,2)==0 ? 1 : 0} \ifnum\Place=0 \colorlet{rscolor}{green!66!black} \else% \ifnum\rscolor=1 \colorlet{rscolor}{black} \else \colorlet{rscolor}{red}% \fi\fi% \path[draw=rscolor, line width=\LW, ] ([shift=(\wStart:\Radius)]0,0) arc[start angle=\wStart, end angle=\wEnd, radius=\Radius]; % Write Numbers \path[draw=none] (\wMiddle:\r) -- (\wMiddle:\R) node[inner sep=0pt, midway, rotate={-\Place*\wM}, text=white, ]{\pgfmathprint{\RLTa[\Place]}}; % Poches \draw[] (\wStart:\rT) -- (\wStart:\R); }%% % Circles \draw[] circle[radius=\R]; \draw[] circle[radius=\r]; \draw[] circle[radius=\rT]; \draw[double,double distance=0.4pt] circle[radius=\rA]; % Diamonds \foreach \w in {60, 120,...,360}{%% \node[shape=diamond, draw, inner sep=0pt, minimum width=1mm, minimum height=2.5mm, very thin, rotate=\w, ] at (\w:\rD){}; }%% \foreach \w in {30, 90,...,330}{%% \node[shape=diamond, draw, inner sep=0pt, minimum width=2mm, minimum height=1mm, very thin, rotate=\w, ] at (\w:\rD){}; }%% \end{tikzpicture} \end{document}
- Tikz: Align Text Within Each Sector of A Circleby Daniel James on June 11, 2022 at 11:13 am
What I Want I want the texts to be within each sector and not beyond. I want the texts to align at the top and not at the centre. What I Have Here is \documentclass[border=1cm]{standalone} \usepackage[dvipsnames]{xcolor} \usepackage{newtxtext} \usepackage{tikz} \usetikzlibrary{decorations.text, fadings} \tikzfading[name=fade out, inner color=transparent!0, outer color=transparent!5] \tikzset{ figNode/.style={ path picture={ \node at (path picture bounding box.center) {#1};}} } \usepackage[OT2, OT1]{fontenc} \begin{document} \pgfmathsetmacro\Nsector{15} \pgfmathsetmacro\Asector{360/\Nsector} \pgfmathsetmacro\Aorig{30} \begin{tikzpicture}[font=\large, main/.style = {draw, circle, text=black, preaction={draw, ultra thick, transform canvas={yshift=-0.2ex}, path fading=fuzzy ring 100 percent, opacity=0.25} }] \foreach[count=\xi] \dpt/\c/\uI in {% Human Resurce Mgt/Cyan!70!ForestGreen!40!/App Pro \& Disc\\Training \& Welfare, Gen. Service/Cyan!70!Magenta!40!/Gen. Service\\ Maintainance, Finance/Cyan!70!ForestGreen!40!/Exp\\ Budget\\ Revenue\\ Financial \& Fiscal Reporting, Legal Services \& Board Affair/Cyan!40!YellowOrange!70!/Legal Services\\Board Affairs, Comm \& Public Relation/Magenta!70!ForestGreen!40!/Communication\\ Public Affairs, Information Communication Tech/Cyan!70!ForestGreen!40!/Sys Prog \& Magtm\\Data Processing \& Analysis\\ Hardware \& Networking, Feild Services \& and Method./Cyan!40!ForestGreen!70!/Feild Services\\Methodology, National Acc Energy \& Environment/Cyan!70!ForestGreen!40!/National Account\\ Energy \& Environment, Corperate Planning \& Statistical Coordination/Cyan!70!/Corperate Planning \\ Statistical Coordination, Agric \& Biz Enter/Cyan!30!/Agric Statistics\\Biz Enterprice, Trade \& Prices/Cyan!130!/Trade\\Prices, Gender \& Social Stat/ForestGreen!30!/Gender \& Social Inclusion\\Social Stat, Intl Statistical Devpt/Cyan!70!YellowOrange!30!/Donor Coordination\\Intl Action Plan, Demo \& HH Stat/Cyan!30!YellowOrange!70!/Demographics\\Household, Procurement/Cyan!30!ForestGreen!30!YellowOrange!30!/Procurement Plans\\Tender Advertisement } {\draw[draw=white, fill = \c,thin] (\Aorig-\xi*\Asector:3cm)-- (\Aorig-\xi*\Asector:10cm) arc (\Aorig-\xi*\Asector:\Aorig-\xi*\Asector-\Asector:10) -- (\Aorig-\xi*\Asector-\Asector:3cm) arc (\Aorig-\xi*\Asector-\Asector:\Aorig-\xi*\Asector:3); \draw[decoration={text along path, text={|\bfseries\large|{\parbox{4em}{\centering{\large\color{red} \dpt}\\ \uI}}},text align={center}, raise=-1.2cm}, decorate] (\Aorig-\xi*\Asector:10cm) arc (\Aorig-\xi*\Asector:\Aorig-\xi*\Asector-\Asector:10); % or with %\node [align=center] at (\Aorig-\xi*\Asector-.5*\Asector:6.5cm){\dpt\\ \uI}; } % inner circle \draw[draw=white,fill = gray!10,thick] circle[radius = 2.8cm]; \draw[draw=white,fill = gray!40,thick] circle[radius = 2.3cm]; \draw[draw=white,fill = gray!10,thick] circle[radius = 2cm]; \pgfmathsetmacro\uAAAangle{90} \coordinate (uAAA) at (\uAAAangle:2.2cm); \draw[decoration={text along path, text={|\bfseries\large|Internal Audit},text align={center}, raise=0.2cm}, decorate] (uAAA) arc (\uAAAangle:\uAAAangle-180:2.2); %%Label2 \draw[decoration={text along path, text={|\bfseries\large|Economic Intelligence Unit},text align={center}, raise=0.2cm}, decorate] (\uAAAangle-180:2.2cm) arc (\uAAAangle-180:\uAAAangle-360:2.2); \end{tikzpicture} \end{document}
- How to change the color and arrow of the circular diagram of the smartdiagram [closed]by user12585 on July 18, 2021 at 12:17 pm
https://texdoc.org/serve/smartdiagram/0 page 4 has a basic circular diagram. \begin{center} \smartdiagram[circular diagram]{Set up,Run,Analyse,Modify~/ Add} \end{center} I want to set each box shape rectangle without any shades each box has no filling color (transparent) arrow color black and a direct edge Please advise.
- How do I make a multiedge/tree-edge from a node to a box in latex-tikz?by notSpock on November 30, 2020 at 8:13 pm
I have to draw a graph in LaTeX and I have to draw an edge from a node to a rectangle as seen here. (image description: there is a node on the left and a box on the right, with multiple straight lines going from the node to the box, all having different angles, the endpoints form a straight line) I haven't found an answer yet and would rather avoid making a ton of small edges, especially since I need to make such an edge multiple times and in different directions. I am using tikz with calc library. \documentclass{scrreprt} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{graphicx} \usepackage{subfigure} \usepackage[ngerman]{babel} \usepackage{tikz} \usetikzlibrary{calc} \usetikzlibrary{decorations.markings} \begin{document} \begin{tikzpicture} %big box \coordinate (lowleftbox) at (1,0); \coordinate (uprightbox) at (9.5,10.5); \draw[] (lowleftbox) rectangle (uprightbox); %vertices \coordinate (v1) at (0,5.5); \coordinate (v2) at (0.5,5.5); \fill (v1) circle[radius=3pt]; \fill (v2) circle[radius=3pt]; %edge between them \draw[] (v1) to (v2); %edge to box, manually, the code I want to improve \draw[] (v2) to (1,5.5); \draw[] (v2) to (1,5.6); \draw[] (v2) to (1,5.7); \draw[] (v2) to (1,5.8); \draw[] (v2) to (1,5.9); \draw[] (v2) to (1,6); \draw[] (v2) to (1,5.4); \draw[] (v2) to (1,5.3); \draw[] (v2) to (1,5.2); \draw[] (v2) to (1,5.1); \draw[] (v2) to (1,5.0); \end{tikzpicture} \end{document} I would be grateful for any tips regarding this. Thank you!
- Problem with TikZ and pause/onlside in beamer [duplicate]by Alexander Härtel on September 30, 2020 at 9:24 am
i have some problems with tikz and pause in beamer. The graphic crashes every time after the second frame. I have already tried onslide, pasue and only. Without pause etc. the TikZ picture works... Can anyone help me here? best regards Alex Sorry for the chaotic code \documentclass[aspectratio=169,xcolor=table]{beamer} % Define block styles \usepackage[ngerman]{babel} \usetikzlibrary{shapes.geometric, arrows} \usetikzlibrary{shapes.geometric}% für Ellipse \usetikzlibrary{calc} \tikzset{ pfeil/.style={stealth-}, beschr/.style={remember picture,overlay,font=\small}} \usepackage{tikz} \usetikzlibrary{shapes.geometric, arrows} \usepackage{tikz} \usetikzlibrary{snakes} \begin{document} \begin{frame} \usetikzlibrary{arrows, arrows.meta, calc, positioning, shapes} \tikzstyle{block} = [rectangle, draw, fill=white!20, text width=3cm, text centered, rounded corners, minimum height=2.1cm] \tikzstyle{block1} = [rectangle, draw, fill=gray!10, text width=3.2cm, text centered, rounded corners, minimum height=2.1cm] \tikzstyle{block2} = [rectangle, draw, fill=gray!20, text width=3.2cm, text centered, rounded corners, minimum height=2.1cm] \tikzstyle{block3} = [rectangle, draw, fill=gray!25, text width=3.4cm, text centered, rounded corners, minimum height=2.1cm] \tikzstyle{line} = [draw, -latex'] \centering {\begin{tikzpicture}[node distance = 0.4cm, auto] \footnotesize % Place nodes \only<1>{ \node [block] (Messdaten) {\textbf{Start: ..}}; } \only<1-2>{ \node [block1, right =of Messdaten] (Maxima) {Unterteilung...}; \path [line] (Messdaten.east) -- (Maxima); } \only<1-3>{ \node [block2, right =of Maxima] (SdkF) {Summe der kleinsten Fehlerquadrate....}; \path [line] (Maxima.east) -- (SdkF); } \only<1-4>{ \node [block3, right =of SdkF] (BSpline) {\textit{B-Spline Approximation}}; \path [line] (SdkF.east) -- (BSpline); } \only<1-5>{ \node [block2, below =of Messdaten] (Phasenv) {Elimination}; \path [line] (BSpline.south) -- ++(0,-5.5pt) -| (Phasenv); } \only<1-6>{ \node [block1, right =of Phasenv] (Aufsp) {Unterteilung ..}; \path [line] (Phasenv.east) -- (Aufsp); } \only<1-7>{ \node [block1, right =of Aufsp] (Minima) {Suche ..}; \path [line] (Aufsp.east) -- (Minima); } \only<1-8>{ \node [block, right =of Minima] (Rissschl) {\textbf{Ende..}}; \path [line] (Minima.east) -- (Rissschl); } \end{tikzpicture} } \end{frame} \end{document}
- Remove Zero as Chapter Number in Header Using scrlayer-scrpageby Echo on April 9, 2020 at 7:16 pm
I am currently working on a layout for a document (based on this post and this), using scrbook with scrlayer-scrpage. After a long struggle to get lines with rounded corners in the header and footer, everything works as expected -- except the numbering of the table of contents in the header. For some reason that I do not understand (I am sure because lack of basic knowledge) it gets a chapter number 0 and section number 0.0, instead of an empty field, which is the desired output for unnumbered chapters. When I compile my document with the slightly modified original code for the header no numbers are given for the table of contents. Based on this, my idea was to use \ifnumbered{chapter}{THEN}{ELSE}, either by redefining \chaptermarkformat and \sectionmarkformat (IDEA 1) or by changing the output for \lehead{} (and \rohead{} IDEA 2). What am I missing? Any help is much appreciated. Thank you in advance. Here is the code containing my approaches and the modified original code for the header and footer for camparison: \documentclass[12pt,paper=a4,DIV=calc,parskip=off,numbers=noenddot,chapterprefix=false]{scrbook} \usepackage[utf8]{inputenc} \usepackage{lmodern} \usepackage[ngerman]{babel} \usepackage[T1]{fontenc} \usepackage{calc} \usepackage[dvipsnames]{xcolor} \usepackage[inner=1.5cm,outer=3.0cm,top=1.5cm,bottom=2cm,headheight=8mm,headsep=1cm,footskip=1cm,includeheadfoot]{geometry} % ,showframe \setlength{\marginparwidth}{2.77cm} \setlength{\marginparsep}{.2cm} \usepackage[onehalfspacing]{setspace} % Chapter Title Layout ------------------------------------------------- % BASED ON: https://tex.stackexchange.com/questions/423091/chapter-heading-designs-in-koma-script \usepackage{tikz} \usetikzlibrary{positioning, backgrounds} \usepackage[outline]{contour} \contourlength{1.25pt} \usepackage{tikzpagenodes} \renewcommand\raggedchapter{\raggedright} \setkomafont{chapter}{\Huge} \setkomafont{chapterprefix}{\LARGE} \newkomafont{chapternumber}{\bfseries\fontsize{75pt}{75pt}\selectfont} \tikzset{ headings/base/.style = { outer sep = 0pt, inner sep = 0pt, %draw, rectangle % just for testing purposes }, headings/chapterbackground/.style = { headings/base, % if shades are to be used (gave ugly results for the shading): % shade, % left color = white, % right color = black, % without shades: color = black }, headings/chapapp/.style = { headings/base, text = black, font = \usekomafont{chapterprefix} }, headings/chapternumber/.style= { headings/base, text = black, font = \usekomafont{chapternumber} } } \makeatletter \renewcommand*\chapterlinesformat[3]{% \ifstr{#1}{chapter}{% \begin{tikzpicture}[baseline=(title.base)] \node[headings/base,anchor=center](title){% \parbox[t]{\dimexpr\textwidth\relax} {\parbox[t][\height]{\dimexpr\textwidth\relax}{\raggedchapter{#3}}\strut}% {\raggedchapter{\leavevmode\vphantom{\textbf{Ôp'}}#3}} //orig: {\raggedchapter #3} }; % chapter number \ifstr{#2}{} { % a phantom chapternumber is set to achieve the same vertical spacing for toc and other unnumbered chapters as for numbered chapters \node(chapternumber)[anchor=south west,headings/chapternumber] at([yshift=-14.5pt] title.north east){\leavevmode\vphantom{88}};% \fill[headings/base,anchor=north west,rounded corners=2.5 pt] ([xshift=4 pt]chapternumber.north west) rectangle ([yshift=-7 pt,xshift=.33\marginparwidth+4 pt]chapternumber.north west);% \fill[headings/base,color=black!85,anchor=north west,rounded corners=2.5 pt] ([yshift=-9 pt,xshift=5.5pt]chapternumber.north west) rectangle ([yshift=-16 pt,xshift=.33\marginparwidth+5.5pt]chapternumber.north west);% \fill[headings/base,color=black!70,anchor=north west,rounded corners=2.5 pt] ([yshift=-18 pt,xshift=9pt]chapternumber.north west) rectangle ([yshift=-25 pt,xshift=.33\marginparwidth+9pt]chapternumber.north west);% \fill[headings/base,color=black!50,anchor=north west,rounded corners=2.5 pt] ([yshift=-27 pt,xshift=16.5pt]chapternumber.north west) rectangle ([yshift=-34 pt,xshift=.33\marginparwidth+16.5pt]chapternumber.north west);% \fill[headings/base,color=black!20,anchor=north west,rounded corners=2.5 pt] ([yshift=-36 pt,xshift=30pt]chapternumber.north west) rectangle ([yshift=-43 pt,xshift=.33\marginparwidth+30pt]chapternumber.north west);% \fill[headings/base,color=black!10,anchor=north west,rounded corners=2.5 pt] ([yshift=-45 pt,xshift=52pt]chapternumber.north west) rectangle ([yshift=-52 pt,xshift=.33\marginparwidth+52pt]chapternumber.north west);% } { % number definition for numbered chapters \node(chapternumber)[anchor=south west,headings/chapternumber] at([yshift=-14.5pt] title.north east){#2};% } % decorative element(s) \ifstr{#2}{}{}{ \fill[headings/chapterbackground,anchor=east,rounded corners=1 pt] ([yshift=11.5 pt]title.north east) rectangle ([yshift=13.5 pt,xshift=4.2 cm]title.north);% } % chapter prefix \node(chapapp)[headings/chapapp,anchor=north east] at (chapternumber.north west){\ifstr{#2}{}{\leavevmode\vphantom{\contour{white}\chapapp}}{\contour{white}\chapapp}\strut};% \end{tikzpicture} \par }{% \@hangfrom{#2}{#3}% other section levels using style=chapter }% } \makeatother % Header and Footer Layout -------------------------------- \usepackage[automark]{scrlayer-scrpage} \setkomafont{pageheadfoot}{\footnotesize} \setkomafont{pagehead}{\sffamily\normalsize} \setkomafont{pagenumber}{\sffamily\large} \clearpairofpagestyles \newlength{\vrulewidth} \setlength{\vrulewidth}{1.25 pt} \renewcommand\chaptermark[1]{% \markboth{\ifnumbered{chapter}{#1}{#1}}{\ifnumbered{chapter}{#1}{#1}}% } % IDEA 1: Supposed to remove chapternumber from header in table of contents -- does not % \renewcommand*{\chaptermarkformat}{% % \ifnumbered{chapter}{\chapappifchapterprefix{\ }\thechapter\autodot\enskip}{}% taken from scrguide % } \renewcommand\sectionmark[1]{% \markright{\ifnumbered{section}{#1}{#1}}% } % IDEA 1 (part 2): Supposed to remove sectionumber from header in table of contents -- does not % \renewcommand*{\sectionmarkformat}{% % \ifnumbered{section}{\thesection\autodot\enskip}{}% taken from scrguide % } \lehead{% % \ifnumbered{chapter}{% IDEA 2: Supposed to remove chapternumber from header in table of contents -- does not \begin{tikzpicture}[overlay,remember picture] \fill[headings/base,color=black,anchor=south east,rounded corners=0.5\vrulewidth] ([xshift=-\marginparsep+.5\vrulewidth] current page header area.south west) rectangle ([xshift=-\marginparsep-.5\vrulewidth,yshift=\baselineskip] current page header area.south west); \node[headings/base,anchor=south east] at ([xshift=-2\marginparsep] current page header area.south west){\ifnumbered{chapter}{\leavevmode\vphantom{\headmark\strut}\chaptermarkformat}{\leavevmode\vphantom{\headmark\strut}}}; \node[headings/base,anchor=south west] at (current page header area.south west){\headmark\strut}; \end{tikzpicture} % }% IDEA 2 (part 2) % {% % \begin{tikzpicture}[overlay,remember picture] % \fill[headings/base,color=black,anchor=south east,rounded corners=0.5\vrulewidth] % ([xshift=-\marginparsep+.5\vrulewidth] current page header area.south west) % rectangle % ([xshift=-\marginparsep-.5\vrulewidth,yshift=\baselineskip] current page header area.south west); %% \node[headings/base,anchor=south east] at ([xshift=-2\marginparsep] current page header area.south west){\ifnumbered{chapter}{\leavevmode\vphantom{\headmark\strut}\chaptermarkformat}{\leavevmode\vphantom{\headmark\strut}}}; % \node[headings/base,anchor=south west] at (current page header area.south west){\headmark\strut}; % \end{tikzpicture} % } } \rohead{% (IDEA 2 did not work for \lehead) \begin{tikzpicture}[overlay,remember picture] \fill[headings/base,color=black,anchor=south west,rounded corners=0.5\vrulewidth] ([xshift=\marginparsep-.5\vrulewidth] current page header area.south east) rectangle ([xshift=\marginparsep+.5\vrulewidth,yshift=\baselineskip] current page header area.south east); \node[headings/base,anchor=south west] at ([xshift=2\marginparsep] current page header area.south east){\ifnumbered{section}{\leavevmode\vphantom{\headmark\strut}\sectionmarkformat}{\leavevmode\vphantom{\headmark\strut}}}; \node[headings/base,anchor=south east] at (current page header area.south east){\headmark\strut}; \end{tikzpicture} } \lefoot*{% \begin{tikzpicture}[overlay,remember picture] \fill[headings/base,color=black,anchor=south east,rounded corners=0.5\vrulewidth] ([xshift=-\marginparsep+.5\vrulewidth] current page footer area.south west) rectangle ([xshift=-\marginparsep-.5\vrulewidth,yshift=-3\baselineskip] current page footer area.south west); \node[headings/base,anchor=south east] at ([xshift=-2\marginparsep,yshift=-3\baselineskip] current page footer area.south west){\pagemark\strut}; \end{tikzpicture}% } \rofoot*{% funktioniert ohne * nur auf nicht chapter-Seiten \begin{tikzpicture}[overlay,remember picture] \fill[headings/base,color=black,anchor=south west,rounded corners=0.5\vrulewidth] ([xshift=\marginparsep-.5\vrulewidth] current page footer area.south east) rectangle ([xshift=\marginparsep+.5\vrulewidth,yshift=-3\baselineskip] current page footer area.south east); \node[headings/base,anchor=south west] at ([xshift=2\marginparsep,yshift=-3\baselineskip] current page footer area.south east){\pagemark\strut}; \end{tikzpicture}% } % https://tex.stackexchange.com/questions/272824/pagenumbers-headers-with-vertical-lines-style %% here there are no numbers for the table of contents in the headings -- numbering in TOC as desired % \renewcommand*{\chaptermark}[1]{% % \markboth{% % \makebox[0pt][r]{% % \ifnumbered{chapter}{% % \chaptermarkformat% Kapitelnummer % %\enskip% Abstand -- wird zu groß, wenn nicht auskommentiert % \rule[-\dp\strutbox]{\vrulewidth}{\baselineskip}% Linie -- Offset,Breite,Höhe % \hspace*{\marginparsep}% Abstand % }{}% % }% % #1% Text % }{% % #1%Text % \makebox[0pt][l]{% % \hspace*{\marginparsep}% Abstand % \ifnumbered{chapter}{% % \rule[-\dp\strutbox]{\vrulewidth}{\baselineskip}% Linie -- Offset,Breite,Höhe % \enskip% Abstand % \chaptermarkformat% Kapitelnummer % }{}% % }% % }% % } % \renewcommand*{\sectionmark}[1]{% % \markright{% % #1%Text % \makebox[0pt][l]{% % \ifnumbered{section}{% % \hspace{\marginparsep}% Abstand % \rule[-\dp\strutbox]{\vrulewidth}{\baselineskip}% Linie -- Offset,Breite,Höhe % \enskip% Abstand % \sectionmarkformat% Abschnittsnummer % }{}% % }% % }% % } % \ohead{\headmark} % \rofoot*{% % \makebox[0pt][l]{% % \hspace{\marginparsep}% % \raisebox{0pt}[\ht\strutbox][\dp\strutbox]{% % \rule[-\dp\strutbox]{\vrulewidth}{2\baselineskip}% Linie -- Offset,Breite,Höhe % }% % \enskip % \pagemark % }% % } % \lefoot*{% % \makebox[0pt][r]{% % \pagemark % \enskip % \raisebox{0pt}[\ht\strutbox][\dp\strutbox]{% % \rule[-\dp\strutbox]{\vrulewidth}{2\baselineskip}% Linie -- Offset,Breite,Höhe % }% % \hspace{\marginparsep}% % }% % } \usepackage{blindtext} \usepackage[raiselinks,colorlinks,bookmarks,pageanchor,hyperindex]{hyperref} \hypersetup{linkcolor=RoyalBlue} \begin{document} \markboth{Inhaltsverzeichnis}{Inhaltsverzeichnis} \setcounter{page}{1} \pagenumbering{Roman} \tableofcontents \setcounter{tocdepth}{3} \clearpage \setcounter{page}{1} \pagenumbering{arabic} \Blinddocument \Blinddocument \Blinddocument \Blinddocument \Blinddocument \Blinddocument \Blinddocument \Blinddocument \Blinddocument \appendix \Blinddocument \end{document} Edit: here are some images to visualize the differences: EDIT: I just figured out (here) that the problem is that \ifnumbered{chapter} checks the value of secnumdepth which is not altered in the header, as far as I understood, and a redefinition of chaptermark is needed. My redefinition is obviously not enough for the intended result.
- Dowsing chart book with Tikz with full circle (2)by zaord on March 18, 2020 at 9:49 pm
I works between science and geobiology in France and I would like to create custom dowsing charts which would looks like the exemples above : Those charts are for longer text and they have to be in the axis of each portion of circle and starting from the outer side of the center for the left half center and staring from the center for the right half center to be readeable... If you have any idea for this, it could be really good ! On the left side, there is some index for dowsing from a dowsing chart to one other and a title permit to have some reference to link those chart together. Actually I am not really skilled in programming and I am a simple user of latex, so i might need help to start with this. Maybe anyone have in mind some clues / exemples to look on to get this working with TikZ. In my mind I would like to enter a list of terms, and that the TikZ script automatic split into angle angle sections with automation. Thanks a lot !
- Annotating a table with arrowsby Maryà on August 12, 2019 at 6:40 am
I want to recreate the following table on latex Here is my MWE \documentclass{article} \usepackage{colortbl} \begin{document} \begin{table}[h] \begin{tabular}{|>{\columncolor[gray]{.8}}c|m{1cm}|m{1cm}|m{1cm}|m{1cm}|m{1cm}|m{1cm}|m{1cm}|} \hline \footnotesize{ $x$ } & 0.900 & 0.990 & 0.999 & 1.000 & 1.001 & 1.010 & 1.100 \\ \hline \footnotesize{ $f(x)$} & 1.810 & 1.980 & 1.998 & 2.000 & 2.002 & 2.020 & 2.210 \\ \hline \end{tabular} \end{table} \end{document}
- Draw circle with three colours in tikzby whatamess on May 8, 2017 at 2:15 pm
I would like to have a circle where the circumference is coloured with three different colours, something like the following but a line and with only three colours: I initially tried \documentclass{article} \usepackage{amsmath} \usepackage{tikz} \pagestyle{empty} \begin{document} \begin{tikzpicture} \draw [red] (0,0) arc [radius=1, start angle=0, end angle=120]; \draw [green] (1,0) arc [radius=1, start angle=120, end angle=240]; \draw [blue] (0,0) arc [radius=1, start angle=240, end angle=360]; \end{tikzpicture} \end{document} but this does not give the right result, and the arguments of the function are such that it's quite difficult to make what I have in mind.
- Aligning text along a sector of a circleby lexxie on May 23, 2016 at 1:52 pm
How can I align text along the circumference of a circle like this using TikZ? Please ignore the icons. I tried using paths and decorations, but I don't know how to constrain the text to each sector. This is the code I used to draw the circles and the sectors \begin{tikzpicture} \draw[thick] (0cm,0cm) circle(3cm); \foreach \x in {0,45,...,360} { % lines from center to point \draw[black] (0cm,0cm) -- (\x:3cm); } \end{tikzpicture}
- Beginner: Drawing using Tikzby Sooraj on July 15, 2014 at 6:15 am
I was quite impressed by the figures generated by TikZ and wanted to try TikZ to generate a few figures (please see the attached image drawn using an external WYSWYG program). When I tried to reproduce the figures myself using TikZ I found it very difficult to control the shapes in required positions. What is the simplest method to draw!these figures using TikZ?
- PGF/TikZ Clipping & Drawing: How to customize lines?by Mohammed on January 29, 2012 at 8:51 pm
I have gotten some undesirable behavior with PGF/TikZ related to clipping and drawing paths with different color, say gray. So I tried with no success to exchange between \clip[draw=gray], \draw[clip,gray] or \path[draw=gray, clip] or maybe using indirectly styles, the Emacs' output throws a TeX error message: Extra options not allowed for clipping path command... the only way to do so is by using scopes: \begin{scope}[draw=gray] ... \end{scope} Unfortunately, this technique requires that all the scoped objects' lines should be switched to black. So is there a trickery way to achieve this without passing by scope environment?
- Write inside divided circleby Nicolas on October 24, 2011 at 1:35 pm
At this address Label Points in a circle in tikz you can see the code to divide a circle into x cells. How to write a phrase into each cell of the divided circle?
- Molecular orbital diagrams in LaTeX?by Richard Terrett on March 19, 2011 at 8:04 am
Update 2026: mohelper This new package comes with a webhelper. You can edit your diagrams there and insert the tex output into your projects. However (!), please view the repo and read the manual (you can find it on ctan or from the repo). This question led to a new package: modiagram I'm wondering if anyone has seen a package for drawing (qualitative) molecular orbital splitting diagrams in LaTeX? Or if there exist any packages that can be easily re-purposed to this task? Otherwise, I think I'll have a go at it in TikZ. Example (Cropped from a graphic on Wikipedia by 'orci' - I suspect it was drawn manually due to the slight misalignment of various elements) Having a go at it in TikZ I decided to try doing this in TikZ and have prepared a MO diagram for dioxygen (prior attempt at much simpler dihydrogen below) - this is the kind of scheme I'm going for. There are at least three problems with this approach: It's not very general and I don't know any strategies to make it arbitrarily extensible (e.g. stacking energy levels etc like in the example diagram.) Partially addressed The H, H_{2} labels are not aligned at the baseline of each H, so the H_{2} is slightly higher than the other two. Solved, thanks @Matthew Leingang The coordinates, whilst text-proportionate, are all hard coded and I would like to know how to make this diagram scalable in terms of a total width, total height and separation of the split levels. Addressed using (probably too many) variables and in-coordinate calculation Please help me improve this probably pretty naive approach. Specification MO diagrams can be drawn in a variety of different ways. In the simplest case, such as for either O2 or H2 here, the left column represents the orbitals of one atom as horizontal lines, arranged vertically in order of their relative energies. The right column does the same for the other atom. In this case the example picture represents orbitals as boxes for clarity as several orbitals can have the same energy, which is what occurs in the case of the 3x 2p orbitals and the pi_x, pi_y orbitals. In this situation they are shown side by side. Orbitals may have zero, one or two (antiparallel) electrons. It is fairly common to simply see orbitals represented as horizontal lines rather than boxes. Lines connect the orbitals to indicate the contribution of the atomic orbitals to a molecular orbital. The center column shows the molecular orbitals generated from the combination of the atomic orbitals, which can either be additive (in which case the relative energy drops, giving a bonding orbital) or subtractive (in which case the relative energy increases with respect to the atomic orbitals, i.e. an antibonding orbital). As this diagram is qualitative only, the splitting can be treated as symmetric. Source \documentclass{article} \usepackage{tikz} \usepackage{textcomp} \usepackage[version=3]{mhchem} \newcommand{\moup}{\textuparrow} \newcommand{\modown}{\textdownarrow} \newcommand{\moupdown}{\textuparrow\textdownarrow} \begin{document} \begin{tikzpicture}[scale=1] \def\sbaseline{0em}; \def\pbaseline{14em}; \def\ssplit{6em}; \def\psplit{12em}; \def\pextend{5em}; \def\psso{4em}; \def\pxyoffset{1em}; \def\mwidth{3em}; \def\hsep{2em}; \tikzstyle{split} = [densely dashed,draw=gray] \tikzstyle{orbital} = [rectangle, rounded corners, fill=white, draw=black, minimum width=3.5ex, minimum height=3.5ex] \tikzstyle{label} = [rectangle, minimum width=3.5ex, node distance=3.5ex] %1s splitting \draw (\mwidth/-2-\hsep*2,\sbaseline) -- (\mwidth/-2-\hsep ,\sbaseline); \draw[split] (\mwidth/-2-\hsep ,\sbaseline) -- (\mwidth/-2 ,\sbaseline+\ssplit/2); \draw (\mwidth/-2 ,\sbaseline+\ssplit/2) -- (\mwidth/2 ,\sbaseline+\ssplit/2); \draw[split] (\mwidth/2 ,\sbaseline+\ssplit/2) -- (\mwidth/2+\hsep ,\sbaseline); \draw (\mwidth/2+\hsep ,\sbaseline) -- (\mwidth/+2+\hsep*2,\sbaseline); \draw[split] (\mwidth/-2-\hsep ,\sbaseline) -- (\mwidth/-2 ,\sbaseline+\ssplit/-2); \draw (\mwidth/-2 ,\sbaseline+\ssplit/-2) -- (\mwidth/2 ,\sbaseline+\ssplit/-2); \draw[split] (\mwidth/2 ,\sbaseline+\ssplit/-2) -- (\mwidth/2+\hsep ,\sbaseline); %left 1s \draw[] (-\mwidth-\hsep,0em) node[orbital] (l1s) {\moupdown}; \node[label, below of=l1s] (l1sl) {$2s$}; %right 1s \draw[] (\mwidth+\hsep,0em) node[orbital] (r1s) {\moupdown}; \node[label, below of=r1s] (r1sl) {$2s$}; %sigma bonding \draw[] (0em,\ssplit/-2) node[orbital] (sb) {\moupdown}; \node[label, below of=sb] (sbl) {$\sigma$}; \node[label, left of=sb, node distance = 9ex] {\tiny{\color{gray}{$\Psi_{a}+\Psi_{b}$}}}; %sigma antibonding \draw[] (0em,\ssplit/2) node[orbital] (sa) {\moupdown}; \node[label, below of=sa] (sal) {$\sigma^{*}$}; \node[label, left of=sa, node distance = 9ex] {\tiny{\color{gray}{$\Psi_{a}-\Psi_{b}$}}}; %orbital labels \node[label, below of=l1sl, node distance=6em] (a) {\smash[b]{\ce{O_{a}}}}; \node[label, right of=a , node distance=\mwidth+\hsep] (ab) {\smash[b]{\ce{{O2}}}}; \node[label, right of=a , node distance=\mwidth*2+\hsep*2] (b) {\smash[b]{\ce{O_{b}}}}; %Title \node[label, below of=ab , node distance=3em] (desc) {Dioxygen ($|S|=1$)}; %2p splitting \draw (\mwidth/-2-\hsep*2-\pextend,\pbaseline) -- (\mwidth/-2-\hsep ,\pbaseline); \draw[split] (\mwidth/-2-\hsep ,\pbaseline) -- (\mwidth/-2 ,\pbaseline+\psplit/2); \draw (\mwidth/-2 ,\pbaseline+\psplit/2) -- (\mwidth/2 ,\pbaseline+\psplit/2); \draw[split] (\mwidth/2 ,\pbaseline+\psplit/2) -- (\mwidth/2+\hsep ,\pbaseline); \draw (\mwidth/2+\hsep ,\pbaseline) -- (\mwidth/+2+\hsep*2+\pextend,\pbaseline); \draw[split] (\mwidth/-2-\hsep ,\pbaseline) -- (\mwidth/-2 ,\pbaseline+\psplit/-2); \draw (\mwidth/-2 ,\pbaseline+\psplit/-2) -- (\mwidth/2 ,\pbaseline+\psplit/-2); \draw[split] (\mwidth/2 ,\pbaseline+\psplit/-2) -- (\mwidth/2+\hsep ,\pbaseline); \draw[split] (\mwidth/-2-\hsep ,\pbaseline) -- (\mwidth/-2 ,\pbaseline-\psso+\psplit/2); \draw (\mwidth/-2 ,\pbaseline-\psso+\psplit/2) -- (\mwidth/2 ,\pbaseline-\psso+\psplit/2); \draw[split] (\mwidth/2 ,\pbaseline-\psso+\psplit/2) -- (\mwidth/2+\hsep ,\pbaseline); \draw[split] (\mwidth/-2-\hsep ,\pbaseline) -- (\mwidth/-2 ,\pbaseline+\psso+\psplit/-2); \draw (\mwidth/-2 ,\pbaseline+\psso+\psplit/-2) -- (\mwidth/2 ,\pbaseline+\psso+\psplit/-2); \draw[split] (\mwidth/2 ,\pbaseline+\psso+\psplit/-2) -- (\mwidth/2+\hsep ,\pbaseline); %left 2p \draw[] (-\mwidth-\hsep,\pbaseline) node[orbital] (l2pa) {\moupdown}; \node[orbital, left of=l2pa] (l2pb) {\moup}; \node[orbital, left of=l2pb] (l2pc) {\moup}; \node[label, below of=l2pb] (l2pl) {$2p$}; %right 2p \draw[] (\mwidth+\hsep,\pbaseline) node[orbital] (r2pa) {\moupdown}; \node[orbital, right of=r2pa] (r2pb) {\moup}; \node[orbital, right of=r2pb] (r2pc) {\moup}; \node[label, below of=r2pb] (r2pl) {$2p$}; %sigmap bonding \draw[] (0em,\pbaseline+\psplit/-2) node[orbital] (spb) {\moupdown}; \node[label, below of=spb] (spbl) {$\sigma$}; %sigmap antibonding \draw[] (0em,\pbaseline+\psplit/2) node[orbital] (spab) {}; \node[label, below of=spab] (spabl) {$\sigma^{*}$}; %pi antibonding levels \draw[] (-\pxyoffset,\pbaseline+\psso-\psplit/2) node[orbital] (ppabx) {\moupdown}; \node[label, below of=ppabx] (ppabxl) {$\pi_{x}$}; \draw[] (+\pxyoffset,\pbaseline+\psso-\psplit/2) node[orbital] (ppaby) {\moupdown}; \node[label, below of=ppaby] (ppabyl) {$\pi_{y}$}; %pi antibonding levels \draw[] (-\pxyoffset,\pbaseline-\psso+\psplit/2) node[orbital] (ppbx) {\moup}; \node[label, below of=ppbx] (ppbxl) {$\pi^{*}_{x}$}; \draw[] (+\pxyoffset,\pbaseline-\psso+\psplit/2) node[orbital] (ppby) {\moup}; \node[label, below of=ppby] (ppbyl) {$\pi^{*}_{y}$}; \end{tikzpicture} \end{document}