# Tag Info

8

Here, I use \stretchleftright{|}{...}{|} to achieve it. \documentclass{article} \usepackage{scalerel,amsmath} \begin{document} $\cos\phi=\stretchleftright{|}{\frac{ \begin{pmatrix}1\\1\\1\end{pmatrix} \circ \begin{pmatrix}1\\2\\3\end{pmatrix} }{ \sqrt3\cdot\sqrt{1^2+2^2+3^2} }}{|}$ \end{document}

7

I'd like to suggest a solution that's different from either of your preferred choices. \documentclass{article} \usepackage{mathtools} % for '\DeclarePairedDelimiter' macro \DeclarePairedDelimiter{\abs}{\lvert}{\rvert} \begin{document} \[ \cos\phi= \frac{1}{\sqrt3 \cdot\sqrt{1^2+2^2+3^2}} \abs*{\begin{pmatrix}1\\1\\1\end{pmatrix}\circ ...

6

The braces work in math mode, generally conforming to the size of the content by way of \left\{<content>\right. for only an opening brace (or \left.<content>\right\} for only a closing brace). The slight "break" in the brace of the OP's image is an on-screen artifact associated with the magnification level (it's not really there). With ...

5


1

Another fix: While latex is looking for the optional argument of the outer command stop (]) it finds the square bracket of the second (inner) command and stops there... This is happening because it works with similar way of my first definitions (see \def commands) that contains something like \@ifnextchar[ and ends at the first ] ... By defining the \@lp (...

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