Hot answers tagged

6

It takes just a few minutes into the manual of tikz-cd. Do texdoc tikz-cd or go to http://texdoc.net/texmf-dist/doc/latex/tikz-cd/tikz-cd-doc.pdf \documentclass{article} \usepackage{tikz-cd} \begin{document} \[ \begin{tikzcd}[column sep=small] &&& U \arrow[dl] \arrow[dr] \\ Z \arrow[rr] && X \arrow[rr] && Y \end{tikzcd} \] ...


6

Yo! Ignasi's comment was eye-opening: "The path" is in fact many paths, each of them starting from top to its respective child. Seems obvious if you think about it. Each of them nicely a la chef, but each of them also ruining the one drawn before. Cool, so here's my next take on the problem, throwing \pgfonlayer into the mix, as borrowed from this post on ...


3

The extensible arrows \xleftarrow and \xrightarrow are defined by amsmath. Its extension mathtools defines also the double-headed version \xleftrightarrow. \documentclass{article} \usepackage{mathtools} \begin{document} \[ A \xleftrightarrow{\text{loooong stuff}} B \] \end{document}


3

A nested stack. I introduce \dnAr[<size>]{<label>} to do so, where <size> is stuff like \bigg (the default). In the 2nd example, I exercise the optional argument to \dnAr. \documentclass{report} \usepackage{stackengine,graphicx} \newcommand\dnAr[2][\bigg]{\ensurestackMath{% \stackengine{-0.3pt}{#1\vert}{% ...


3

A Tikz version. Output Code \documentclass{article} \usepackage{tikz} \newcommand\arrd[1]{ \tikz[baseline, inner xsep=-1cm]{ \draw[->] (0,.4) -- (0,-.2) -- (-.1,-.3) node[below, font=\tiny] {#1}; }\ % for spacing } \begin{document} $V_u = V_i \frac{g_m}{1+g_mR_s} \arrd{$id$} R_d \arrd{$V_{R_d}$} (-1) \arrd{$V_u$}$ \end{document} ...


3

Another solution without using TikZ: \vbox{\halign{&\hfil$#$\hfil\cr & \ U \cr \noalign{\kern-.25em} & \swarrow \ \searrow \cr Z \longrightarrow\ & X \longrightarrow Y \cr }} \bye


2

Well, Manuel suggested combining \prec and \succ with \Longleftrightarrow, but the OP was not happy with the appearance of such. I thus took that as a challenge to try to improve the look. I hopefully succeed by stretching the \prec and \succ glyphs horizontally and also trimming off the extra long tips. Then I make it work in all math styles. ...


2

I ended up making my own version (using rotated and shifted versions of \curlywedge) with which I am fairly happy. \documentclass{article} \usepackage{mathrsfs} \usepackage{graphicx} \usepackage{mathabx} \newcommand*\wif{= \joinrel = \joinrel = \mkern-2.3mu \joinrel \mathrel{\raisebox{0.5pt}{\rotatebox[origin=c]{-90}{$\curlywedge$}}} \joinrel ...


2

You can access the point on the edge of a node that is at a specific angle using nodename.angle. See an example below where I've used this. \documentclass[border=5mm]{standalone} \usepackage{tikz} \usetikzlibrary{arrows} \begin{document} \begin{tikzpicture} \tikzset{vertex/.style = {shape=circle,draw,minimum size=1.5em}} \tikzset{edge/.style = {->,> = ...


2

Is this (by any chance) for a chemical reaction? reaction with chemformula: \documentclass{article} \usepackage{chemformula} \begin{document} \ch{ A + B -/> C } \end{document} reaction with chemfig: \documentclass{article} \usepackage{chemfig} \begin{document} \schemestart A \+ B \arrow{-/>} C \schemestop \end{document}


2

Here's a version without mathtools. \documentclass{article} \usepackage{amsmath} \newcommand\xleftrightarrow[1]{% \mathbin{\ooalign{$\,\xrightarrow{#1}$\cr$\xleftarrow{\hphantom{#1}}\,$}} } \begin{document} \[ A \xrightarrow{\varphi} B \xrightarrow{\text{PDQ Bach}} C \] \[ A \xleftrightarrow{\varphi} B \xleftrightarrow{\text{PDQ Bach}} C \] \end{document} ...



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