Tag Info

Hot answers tagged

12

Just playing around without really knowing what I am doing... \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} \filldraw[fill=orange,line width=1pt] (0,0) -- (1,1) -- (1.05,.7) -- (7.5,0) -- (1.3,-.7) -- (1.35,-1) -- cycle; \filldraw[fill=orange,line width=1pt] (12.1,-.7) -- (11.85,.7) -- (4.7,.4) -- cycle; ...


10

Here are two different solutions. The first solution uses a tabular environment and \tikzmark to control the position of where the arrows should go: \documentclass{article} \usepackage[margin=0.5in]{geometry} \usepackage{tikz} \usetikzlibrary{calc,tikzmark} \usetikzlibrary{arrows.meta} \tikzset{%% my dot/.style={fill,circle,inner sep=1.5pt}, ...


6

You can use a distance modifier ($(A)!1cm!(B)$) This needs \usetikzlibrary{calc} Code: \documentclass{article} \usepackage{tikz} \usetikzlibrary{calc} \begin{document} %% --- start tikz --- \begin{tikzpicture}[x=1cm,y=1cm] % create two nodes \node[draw=black,circle] (A) at (0,0) {A}; \node[draw=black,circle] (B) at (3,4) {B}; % ...


5

A solution with tikz-cd \documentclass{article} \usepackage{tikz-cd} \newcommand{\ket}[1]{\mathopen{|}#1\rangle} \begin{document} \[ \begin{tikzcd} \ket{\vec{\mu}-\vec{\alpha}} \arrow[r,bend left,"E^{+}", start anchor={[yshift=1.5pt]real east},end anchor={[yshift=1.5pt]real west}] & \ket{\vec{\mu}} \arrow[l,bend left,"E^{-}", start ...


4

I think that you should use the \xrightarrow macro and the rcases environment of the mathtools package. Using these you can produce using the relatively simple code \documentclass{article} \usepackage{mathtools} \begin{document} \[ x\notin f(C)\xrightarrow{C\cap f^{-1}(D)\subseteq C} \begin{rcases} & x\notin f\big(C\cap f^{-1}(D)\big)\\ ...


4

This is a possible solution where intersection point of unit circle (with name path=curve) and line A-B (with name path=line) is found. However, the red arrow of 2cm is used for demonstration. One may change the macro \dist value for other possibilities. Code \documentclass{article} \usepackage{tikz} \usetikzlibrary{positioning,intersections,calc} ...


3

The approach suggested by @Jake is the right direction. Unfortunately, -{Latex[width=...]} causes strange problems when used insided of every arrow. It appears that this kind of arrow key reconfiguration is unsupported. I will look into it eventually, sounds like some incompatibility between the arrows.meta library and pgfplots. But it works if you use ...


3

Would this be fair for a start... The proposal starts with a couple of style definitions, then place the various nodes cetering the polygon via above left, below right etc, etc., lastly, connect the nodes with lines that also has a style definition. Reference: Is it possible to change the size of an arrowhead in TikZ/PGF? Code ...


3

If you want to consider using pstricks, it can be done with the psmatrix environment. I add the nccmath package, to have medium-sized formulae, esvectfor better looking vector arrows, and mathtools to define the pair of | … > delimiters. Alternatively, you can use the braket package, but you then lose the possibility (not used here) of fine-tuning the size ...


3

Taking all the best from the prior answers, I've got your desired result here: % arara: pdflatex \documentclass{article} \usepackage{tikz-cd} \usetikzlibrary{decorations.markings} \tikzset{middleArrowHead/.style={decoration={markings, mark= at position #1 with \arrow{>}}, postaction=decorate}} \usepackage{braket} % defines \ket and \bra ...


3

There is a separate command for using \ce in equation environments that allows using ampersands (&) for alignment: \cee So, no need to work around an make things less readable: \documentclass{article} \usepackage[version=3]{mhchem} \begin{document} \begin{align} \cee{CH3COOH + NaOH &<=> CH3COONa + H2O} \\ \cee{H2O &<=> H^{+}_{(aq)} ...


3

The problem with the code is that you are using an older version of the 3dplotpackage. It has been replaced with tikz-3dplot which has the functionality you are looking for. Hence the fix is very simple. \documentclass{article} \usepackage{tikz} % \usepackage{3dplot} % old package \usepackage{tikz-3dplot} % new package ...


2

You can also use tikz for the overkill solution, but gives you a lot of flexibility in terms of the arrow tip, line thickness and color: Code: \documentclass{article} \usepackage{mathtools} \usepackage{tikz} \makeatletter \newcommand*{\MyArrow}[2][]{% \mathbin{% \tikz[baseline,remember picture] \node[above, inner sep=1pt, #1, draw=none] (X) ...


2

I have not seen such arrows (and was not able to find them via detexify), so here is a tikz way to create them: Depending on the actual application, there may be a better way to draw these. Code: \documentclass{article} \usepackage{tikz} \newcommand{\ArcDistance}{0.2cm}% \newcommand{\BaseDist}{0.15cm}% \newcommand{\RightUp}[1][]{\tikz[thick, baseline] ...


2

The hooked arrow in xy is one of the ugly parts of this package. It just looks wrong. You could write this issue to the maintainer (if still active) or you switch to the more modern and much easier (to read) tikz-cd. In my MWE I am showing both in order to show the difference between their hooked arrows: % arara: pdflatex \documentclass{article} ...


1

A solution with xy: % arara: pdflatex \documentclass{article} \usepackage[all,cmtip]{xy} \begin{document} \fbox{\begin{xy} (-1,-1)="a",(2,2)="b" \ar@{>->}@/_3px/ "a";"b" \end{xy}} \fbox{\begin{xy} (-1,-1)="a",(2,2)="b" \ar@{>->}@/^3px/ "a";"b" \end{xy}} \fbox{\begin{xy} (-1,2)="a",(2,-1)="b" \ar@{>->}@/_3px/ "a";"b" \end{xy}} ...


1

Here is an illustration of how to use \tikz and \tikzmark to add arrows between specific points int he document. You mark the positions with \tikzmark and then invoke the \DrawArrow macro to connect each of the points. Notes: This is intended only to show you how to draw the arrows as I did not pay much attention to the text placement (which does not ...


1

You can also try with a tree. Next example is done with forest package \documentclass[tikz,border=2mm]{standalone} \usepackage{forest} \usepackage{lipsum} \begin{document} \begin{forest} for tree={grow'=0,l=2cm, anchor=west, child anchor=west, edge=->}, for descendants={node options={text width=8cm,align=left}} [root ...


1

You can get the arrows to be at the same vertical height it you apply a \vphantom{<text>} with <text> being the tallest content, and if you want them to be the same width you can typeset the content into a fixed width \makebox. In this case x^2 is the tallest content, so we get: In the above, I fixed the width of the \makebox to be 2.0em. ...



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