Skip to main content
added 357 characters in body
Source Link
Qrrbrbirlbel
  • 130.5k
  • 9
  • 277
  • 524

Here's a quick tikzmark version (though without the library because we don't need any advances techniques it has to offer). 

Change inner ysep and/orthe outer ysep to adjust the white space between the  = and the actual line. (The inner ysep will contribute to the bounder box and might change the vertical placement of lines if it is too big.)

Code

\documentclass[varwidth]{standalone} %\documentclass{article} \usepackage{amsmath, tikz} \usetikzlibrary{tikzmark} \newcommand*\eqlineset{\pgfqkeys{/eqlines}} \eqlineset{ picture/.style={baseline, remember picture}, line/.style={thick, draw=orange, line cap=round}, node/.style={ minimum size=+0pt, inner sep=+0pt, outer ysep=+.3333em, anchor=base, name=tma\thetikzmarkalign}, } \newcounter{tikzmarkalign} \makeatletter \AtBeginEnvironment{align}{% \setcounter{tikzmarkalign}{0}% \newcommand*\noeq{\hphantom{{}={}}}% \newcommand*\eq{ \ifnum\value{tikzmarkalign}=0 \mathrel{\tikzmarknode[\tikz[/eqlines/picture]\node[/eqlines/node]{tma0}{$=$};} \else \mathrel{ \begin{tikzpicture}[baseline, remember [/eqlines/picture] \node[/eqlines/node, anchor=base,node] name=tma\thetikzmarkalign](tma\thetikzmarkalign) {$=$}; \unless\ifmeasuring@   \path[/eqlines/line, overlay] (tma\thetikzmarkalign)   -- (tma\pgfinteval{\thetikzmarkalign-1}); \fi \end{tikzpicture} } \fi \stepcounter{tikzmarkalign} }% } \makeatother \begin{document} \begin{align} Lorem & \eq Ipsum \\ & \eq dolor sit amet,\\ & \noeq + \frac{consetetur sadipscing elitr}{sed diam nonumy} \\ & \eq eirmod tempor invidunt. \end{align} \end{document} 

Output

enter image description here

Here's a quick tikzmark version. Change inner ysep and/or outer ysep to adjust the white space between the  = and the actual line.

Code

\documentclass[varwidth]{standalone} %\documentclass{article} \usepackage{amsmath, tikz} \usetikzlibrary{tikzmark} \newcommand*\eqlineset{\pgfqkeys{/eqlines}} \eqlineset{ line/.style={thick, draw=orange, line cap=round}, node/.style={minimum size=+0pt, inner sep=+0pt, outer ysep=+.3333em}, } \newcounter{tikzmarkalign} \AtBeginEnvironment{align}{% \setcounter{tikzmarkalign}{0}% \newcommand*\noeq{\hphantom{{}={}}}% \newcommand*\eq{ \ifnum\value{tikzmarkalign}=0 \mathrel{\tikzmarknode[/eqlines/node]{tma0}{$=$}} \else \mathrel{ \begin{tikzpicture}[baseline, remember picture] \node[/eqlines/node, anchor=base, name=tma\thetikzmarkalign] {$=$}; \path[/eqlines/line, overlay] (tma\thetikzmarkalign) -- (tma\pgfinteval{\thetikzmarkalign-1}); \end{tikzpicture} } \fi \stepcounter{tikzmarkalign} }% } \begin{document} \begin{align} Lorem & \eq Ipsum \\ & \eq dolor sit amet,\\ & \noeq + \frac{consetetur sadipscing elitr}{sed diam nonumy} \\ & \eq eirmod tempor invidunt. \end{align} \end{document} 

Output

enter image description here

Here's a quick tikzmark version (though without the library because we don't need any advances techniques it has to offer). 

Change the outer ysep to adjust the white space between the = and the actual line. (The inner ysep will contribute to the bounder box and might change the vertical placement of lines if it is too big.)

Code

\documentclass[varwidth]{standalone} %\documentclass{article} \usepackage{amsmath, tikz} \newcommand*\eqlineset{\pgfqkeys{/eqlines}} \eqlineset{ picture/.style={baseline, remember picture}, line/.style={thick, draw=orange, line cap=round}, node/.style={ minimum size=+0pt, inner sep=+0pt, outer ysep=+.3333em, anchor=base, name=tma\thetikzmarkalign}, } \newcounter{tikzmarkalign} \makeatletter \AtBeginEnvironment{align}{% \setcounter{tikzmarkalign}{0}% \newcommand*\noeq{\hphantom{{}={}}}% \newcommand*\eq{ \ifnum\value{tikzmarkalign}=0 \mathrel{\tikz[/eqlines/picture]\node[/eqlines/node]{$=$};} \else \mathrel{ \begin{tikzpicture}[/eqlines/picture] \node[/eqlines/node] (tma\thetikzmarkalign) {$=$}; \unless\ifmeasuring@   \path[/eqlines/line, overlay] (tma\thetikzmarkalign)   -- (tma\pgfinteval{\thetikzmarkalign-1}); \fi \end{tikzpicture} } \fi \stepcounter{tikzmarkalign} }% } \makeatother \begin{document} \begin{align} Lorem & \eq Ipsum \\ & \eq dolor sit amet,\\ & \noeq + \frac{consetetur sadipscing elitr}{sed diam nonumy} \\ & \eq eirmod tempor invidunt. \end{align} \end{document} 

Output

enter image description here

Source Link
Qrrbrbirlbel
  • 130.5k
  • 9
  • 277
  • 524

Here's a quick tikzmark version. Change inner ysep and/or outer ysep to adjust the white space between the = and the actual line.

Code

\documentclass[varwidth]{standalone} %\documentclass{article} \usepackage{amsmath, tikz} \usetikzlibrary{tikzmark} \newcommand*\eqlineset{\pgfqkeys{/eqlines}} \eqlineset{ line/.style={thick, draw=orange, line cap=round}, node/.style={minimum size=+0pt, inner sep=+0pt, outer ysep=+.3333em}, } \newcounter{tikzmarkalign} \AtBeginEnvironment{align}{% \setcounter{tikzmarkalign}{0}% \newcommand*\noeq{\hphantom{{}={}}}% \newcommand*\eq{ \ifnum\value{tikzmarkalign}=0 \mathrel{\tikzmarknode[/eqlines/node]{tma0}{$=$}} \else \mathrel{ \begin{tikzpicture}[baseline, remember picture] \node[/eqlines/node, anchor=base, name=tma\thetikzmarkalign] {$=$}; \path[/eqlines/line, overlay] (tma\thetikzmarkalign) -- (tma\pgfinteval{\thetikzmarkalign-1}); \end{tikzpicture} } \fi \stepcounter{tikzmarkalign} }% } \begin{document} \begin{align} Lorem & \eq Ipsum \\ & \eq dolor sit amet,\\ & \noeq + \frac{consetetur sadipscing elitr}{sed diam nonumy} \\ & \eq eirmod tempor invidunt. \end{align} \end{document} 

Output

enter image description here