I have started going through all of the bookmarked answers on StackExchange that I want to use for examples. I have had success with most of the answers being able to compile within Overleaf. However, I tried importing the code from How do I get a tilted equal sign for an equation? and its answer into Overleaf. Specifically I tried to use:
\documentclass{article}
\usepackage{amsmath}
\usepackage{tikz}
\usetikzlibrary{tikzmark}
\begin{document}
\[\lim_{x\to0}\tikzmarknode{ex}{\mathrm{e}^x}\left(2+4x\right)~=~2\]
\begin{tikzpicture}[overlay,remember picture]
\path[red] ([xshift=1pt,yshift=1pt]ex.north east) -- ++(45:{width("=")*1pt-1pt})
node[midway,sloped]{$=$} node[above right=-2pt]{$1$};
\end{tikzpicture}
\end{document}
When I compile in Overleaf I receive the following two errors:
! Undefined control sequence.
l.6 \[\lim_{x\to0}\tikzmarknode{ex}{\mathrm{e}^x}\left(2+4x\right)~=~2\]
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
! Package pgf Error: No shape named ex is known.
See the pgf package documentation for explanation.
Type H <return> for immediate help.
...
l.8 ...red] ([xshift=1pt,yshift=1pt]ex.north east)
-- ++(45:{width("=")*1pt-...
This error message was generated by an \errmessage
command, so I can't give any explicit help.
Pretend that you're Hercule Poirot: Examine all clues,
and deduce the truth by order and method.
I believe that the second error (No shaped named ex is found) is due to the first error not creating the node.
tikzmarkin Overleaf doesn't have\tikzmarknode. I even used this macro as a test to find out the version oftikzmarkhere. You can copy the code oftikzmarkfrom CTAN and upload it to your project. – Phelype Oleinik Jun 21 '19 at 18:34