I use
$s \longarrownot\xrightarrow{exm} s'$
to have a negation arrow (one slash line) with words upon. I hope to have a double negation arrow with words, i.e., there exist two slash lines on the arrow. What command can I use?
My TikZ approach:
\documentclass{article}
\usepackage{amsmath,tikz}
\begin{document}
\[
s\ {\tikz{%
\draw[->](0,0)--(1,0);
\draw(.3,-.1)--(.5,.1);
\draw(.5,-.1)--(.7,.1);
\node at (.5,.25) {exm};
}}\ s'
\]
\end{document}
and its output (zoomed a lot):
This was the source and the inspiration for this answer.
Related
I want to reproduce this equation, but I don't know how to make the highlighted symbol. I checked the Comprehensive LaTeX symbols manual, but couldn't find a similar one.
\documentclass{article}
\usepackage{bbm}
\begin{document}
\[
\mathbbm{I}
\]
\end{document}
I am learning Tikz and hope somebody can help me achieve the following i.e. I want to draw a directed arc between objects in an equation. Below is a picture of what I am trying to achieve.
I have also attached the code I have used so far:
\documentclass{article}
\usepackage{amsmath,amssymb,braket,tikz}
\usetikzlibrary{tikzmark,calc}
\begin{document}
\begin{tikzpicture}
$(x+2)(x+3)$
\end{tikzpicture}
\end{document}
I also suspect that there is a way to specify a line or arc, between elements e.g. numbers and letters, without explicitly stating the coordinates. Is this the case? If it were, it would simplify the things I'm trying to achieve.
Any help would be very much appreciated.
The following solution draws an arc above the formula using arc; the actual angles and lengths may have to be adjusted. To get coordinates relative to the formula, the formula is wrapped into the node formula.
\documentclass{article}
\usepackage{amsmath,amssymb,braket,tikz}
\usetikzlibrary{tikzmark,calc}
\begin{document}
\begin{tikzpicture}
\node (formula) [] {$(x+2)(x+3)$};
\draw[-latex,red] ($(formula.north west)+(.4,0)$) arc
[
start angle=160,
end angle=20,
x radius=0.5cm,
y radius =0.5cm
] ;
\end{tikzpicture}
\end{document}
Output:
Another possibility with the tikzmark library:
\documentclass{article}
\usepackage{amsmath,amssymb,braket,tikz}
\usetikzlibrary{tikzmark,calc}
\begin{document}
\begin{equation}
(\tikzmarknode{a}{x}+2)(\tikzmarknode{b}{x}+3)
\end{equation}
\tikz[remember picture, overlay]{\draw[-latex,red] ([yshift=0.1em]a.north) to[bend left] ([yshift=0.1em]b.north);}
\end{document}
I try to write the following formula in Latex
My question is that how to write the right-hand side formula? How to ensure that the text paragraphs on the right side are consistent in the formula environment?
My code is
$\mathbb{P}[\mbox{there exists a black path from ${0}\times [0,s]$ to $\pho s\mtis [0,s]$ in the rectangle $0,\pho s]\times [0,s]$}]
I suggest:
\documentclass{article}
\usepackage{amsmath}
\begin{document}
Text
\[
f_s(\rho)=\mathrm{P}%
\left[
\begin{array}{l}
\text{there exists a black path from }\{0\}\times [0,s]\text{ to}\\
\{\rho s\}\times [0,s]\text{ in the rectangle }[0,\rho s]\times [0,s]
\end{array}
\right].
\]
Text
\end{document}
giving this output:
Comment if this is ok with your code or not! :)
I put two image.png in my latex documnet using \includegraphics. Now I want to joint two points of these images together by a line. I wonder if it is possible to do so in Latex?
First: no it is impossible: as Gyro Gearloose had said LaTeX has no idea about the content of your png.
Second: sure you can ;-) A little cheat with tikz. You can connect two arbitrary points with an arrow (or a line).
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{lipsum}
\usepackage{pgfplots}
\usepackage{tikz}
\usetikzlibrary{positioning}
\usetikzlibrary{tikzmark} % arrows in tex
\usetikzlibrary{arrows} % arrows in tex
\usetikzlibrary{calc} % (node)+(3cm,2cm)
\tikzstyle{every picture}+=[remember picture]
\begin{document}
\lipsum[1]
\includegraphics[width=0.2\textwidth]{solidtex.png}
{\tikz\node[coordinate](start1){};}
\lipsum[2]
{\tikz\node[coordinate](end1){};}
\includegraphics[width=0.2\textwidth]{solidtex.png}
\lipsum[3]
\begin{tikzpicture}[overlay, remember picture, -latex, color=blue!15!red, yshift=1ex, shorten >=1pt, shorten <=1pt, line width=0.1cm]
\path[->] (start1) edge [out=150, in=240] (end1);
\end{tikzpicture}
\end{document}
But it still connects the corners of the images. To connect points inside the pictures, you have to modify the coordinates manually e.g.:
\path[->] (start1) edge [out=150, in=240] ($(end1)+(2cm,2cm)$);
or pt, ex, mm ect...
If you want line without arrow head, use:
\path[-] (start1) edge [out=150, in=240] (end1);
Note that like labeling and referring figures, you have to run latex (or pdflatex or ...) twice.
Im trying to add a dot like • for a dot product but it always ends up acting like a bullet point creating a new line. I've tried \cdot and \bullet. I think its being treated as a bullet because I'm doing it inside an itemized list. Is there a way to make it just as a dot?
Have you tried :
$\bullet$
Try \cdot in math mode. It is a good way to indicate multiplication:
\documentclass{article}
\begin{document}
Here is a product: $a \cdot b$.
\end{document}
Note that the dollar symbol represents the math mode.
just had the same problem...
Math mode $...$ is not essential for this:
\documentclass{minimal}
\begin{document}
\noindent
Here's an example with $\bullet$ math mode
\newline
And here one in \textbullet text only
\newline
Although you may want to give the last \textbullet \ more spacing
\end{document}
giving: