Tag Info

Hot answers tagged

15

Here is something that should get you started on using tikzmark: Notes: This does require two runs. First one to determine the locations, and the second to do the drawing. There probably are easier ways to determine the locations. Code: \documentclass{article} \usepackage{amsmath} \usepackage{tikz} \usetikzlibrary{calc} ...


13

A solution that uses calc to determine the position of the double arrow: \documentclass{article} \usepackage{tikz} \usetikzlibrary{calc} \begin{document} \begin{tikzpicture}[execute at begin node = $\displaystyle, execute at end node = $] \node (eq) {\sqrt{\frac{N}{p(1-p)}}}; \draw[<->] ($(eq.north east)!.3!(eq.south east)$) ...


6

The problem is that \pgfmathsetmacro\ppq{\q-2}; set \ppq to 2.0 and (q2.0) is not the same as (q2). To avoid this you can use \pgfmathsetmacro\ppq{int(\q-2)}; or even better \pgfmathtruncatemacro\ppq{\q-2}; (as suggested by @percusse in the comment). Here is an example of code (not exactly the same as yours): \documentclass[tikz,border=7mm]{standalone} ...


6

I'm sure you'll find some other solutions here. This is one more. It uses a matrix of nodes to declare bit cells. Separation between columns is declared with column sep option, but can be modified with [<increasing distance>] after & in desired column. This possibility has been used in RLCA register to introduce a certain distance between carry ...


5

Here's one possibility using the wonderful interaction between the powerful tcolorbox and listings packages: The code: \documentclass{article} \usepackage[many]{tcolorbox} \tcbuselibrary{listings} \lstset{ basicstyle=\small\ttfamily, columns=fullflexible } \begin{document} \begin{tcblisting}{enhanced,listing only,hbox,remember ...


4

Two possible ways, with mathtools and with chemarrow. The chemarrow spacing is definitely better, but it's necessary to switch again into math mode for the \alpha and \beta ... texts, unless other ways of providing the characters are used. Another method: stackengine package by Steven B. Segletes. \documentclass{article} \usepackage{amssymb} ...


4

You want to put something below the lim operator with its arrow? Then it can/should be done in the math expression, \mathop turns the \underleftarrow expression to a math operator again: \documentclass{article} \usepackage{amsmath} \usepackage{tikz} \usetikzlibrary{matrix} \begin{document} \begin{tikzpicture} \matrix (m) [matrix of math nodes,row ...


4

Use the powerful tikz-cd package: \documentclass{article} \usepackage{amsmath} \usepackage{tikz-cd} \begin{document} \[ \begin{tikzcd} \varprojlim A_i \arrow[d,swap,"\pi_j"] \arrow[dr,"\pi_k"] \\ A_j \arrow[r,swap,"\alpha_j^k"] & A_k \end{tikzcd} \] \end{document} By default, the label is placed on the left of the arrow (like left and right of a ...


3

Since it's a tree, I'd suggest you the forest package (adjust the settings according to your needs): \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{forest} \begin{document} \begin{forest} for tree={ grow'=east, l sep=2cm, child anchor=west, parent anchor=east, edge={->,>=latex}} [E [{Finita (Señal de energía $P=0$)}, ] ...


3

christian hupfer's answer is good, but there's an even more compact version of his second example, that takes advantage of the optional argument to the \x...harpoons construction to insert the "lower limit". i think the "default" arrows are too short, so i've forced them to be longer by adding space around the "upper limit". a \quad is too much, so i've ...


3

The comments have already mentioned \overleftrightarrow. Here is an alternative that tries to make the segment use the same heads as \vec, also shown for comparison. Based on my answer at "Double headed" vector, except that I had to make it extensible to match segments of different sizes. On the left are two \vecs, two \dvecs and on the right ...


3

If you want to get the whole arrow dashed, you will have to switch to tikz-cd: % arara: pdflatex \documentclass{article} \usepackage{tikz-cd} \begin{document} \[ \begin{tikzcd}[every arrow/.append style={dash}] 0 \arrow{dr} & &[.8cm] & 1 \\ & a \arrow{r}[description]{\ldots} & b \arrow{ur}\arrow{dr} & \\ 2 \arrow{ur} & & ...


3

Make a new macro for making vectors, say \newcommand\myvec[1]{\vec{\vphantom{t}#1}}


3

You can also do the following to avoid having to change any of the existing mathematical code. \documentclass[border=5mm]{standalone} \let\nvec\vec \def\vec#1{\nvec{\vphantom t\smash{#1}}} \begin{document} $\vec{t} + \vec{a}$ \end{document} You will have to modify the \def command for the 'tallest' variable used.


3

As you don't want the header of the table to have a shadow, I made two separate tables. One for the heading and one for the table itself. Same as the other tables Use the tikzlibrary shadows and add to drop shadow to the option list of your node. For the \ldots I used a \scalebox. Arrows are positioned using the tikzlibrary calc Code: ...


2

You could accomplish this with tikz: \documentclass{article} \usepackage{tikz} \begin{document} \[ f_n\; \tikz{\draw[dashed, ->] (0,0) -- ++(0.35cm, 0);\draw[->] (0,0.125cm) -- ++(0.35cm,0);}\; f \] \end{document} Or make it a macro: \documentclass{article} \usepackage{tikz} \newcommand{\stackedarrow}{\ensuremath{\;}\tikz{\draw[dashed, ->] ...


2

For MathJax, the following might be useful, \substack puts the symbols over each other, \textstyle enlarges the font, \mathrel fixes the horizontal spacing: f_n\mathrel{\substack{\textstyle\rightarrow\\\textstyle\dashrightarrow}} f Result image from MathJax Live Demo: But it would look quite ugly in LaTeX: \longrightarrow would be better, ...


2

Maybe this? % arara: pdflatex \documentclass[a4paper,12pt]{amsart} \usepackage{tikz-cd} \begin{document} \[ \begin{tikzcd}[row sep=-5pt, column sep=10pt,cells={nodes={draw, circle,font=\tiny, inner sep=2pt, minimum size=24pt}}] 1 \arrow[dash]{dr} \arrow[dashed,bend left=25]{rrr} & &[.8cm] & \ell-1 \arrow[dashed, rounded corners, to ...


1

You did not use the main coordinate that you've set up. To use it add [tdplot_main_coords] after \begin{tikzpicture}: \begin{tikzpicture}[tdplot_main_coords] If you do this, you will get blue rectangle with upward arrow from the center because the first parameter of \tdplotsetmaincoords is the angle (in degrees) through which the coordinate frame is ...


1

A variation on Gonzalo Medina's answer which does not require manually adjusting the horizontal placement of one of the nodes: \documentclass[tikz,border=5pt]{standalone} \usetikzlibrary{arrows.meta} \usepackage[utf8]{inputenc} \usepackage{forest} \begin{document} \begin{forest} for tree={ font=\sffamily, grow'=0, anchor=west, ...



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