3

I was just working on my LaTeX skills so I don't forget, so I went on this site and started replicating the most complex stuff I found. At first I thought it would be a piece of cake, but then I wrote this code and was absolutely perplexed.

\documentclass{article}

\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{fullpage}
\usepackage{commath}

\begin{document}

\[
\iiiint \limits_{\mathcal{Q}} f(w,x,y,z) \; \mathrm{d}w \; \mathrm{d}x \; \mathrm{d}y \; \mathrm{d}z \leq \oint_{\partial Q} f' \left( \max \left\{ \frac{\norm{w}}{|w^2 + x^2|} ; \frac{\norm{z}}{|y^2 + z^2|} ; \frac{\norm{w \oplus z}}{\norm{x \oplus y}} \right\} \right) \precapprox \biguplus_{\mathbb{Q} \Subset \bar{Q}} \left[ f^* \left( \frac{\lmoustache \mathbb{Q}(t)\rmoustache}{\sqrt{1 - t^2}} \right) \right]^{t=9}_{t=\alpha}
\]

\end{document}

At the first glance everything seems normal, but if you carefully look inspect the end of the line (the part with Q(t)) you figure out that the \lmoustache and \rmoustache are cropped out, disfigured. Here is a picture supporting my description.

enter image description here

I removed all of the non-vital packages so I made sure there was no redefinition issue or a clash of packages. Then, I tried to check if it wasn't an encoding problem by scaling \lmoustache and \rmoustache down with \scalebox. The result was the same, just a smaller "tail". So I am curious how to slove this problem and make my compilation identical to that included in the cited site.

Thank you in advance.

God bless
  • 1,767
  • I wouldn't use commath – David Carlisle Apr 02 '17 at 10:34
  • What would you use to get a similar result? – God bless Apr 02 '17 at 10:36
  • As far as I can see, you're using just \norm from commath. There are much better ways for defining it, see the documentation of mathtools. By the way, you should do \newcommand{\diff}{\mathop{}\!\mathrm{d}} and use \diff x rather than \;\mathrm{d}x – egreg Apr 02 '17 at 10:44
  • Thank you for additional information. They really are a treasure when writing a PhD. Any advice on the latter? – God bless Apr 02 '17 at 10:48

2 Answers2

4

the moustache are not really fully defined symbols they are just re-constructed bits of large braces, so are only available in large sizes, not normal size.

enter image description here

\documentclass{article}

\usepackage{amsmath}

\begin{document}

\[
\lmoustache Q \rmoustache
\left\lmoustache Q \right\rmoustache
\]

\end{document}
David Carlisle
  • 757,742
  • Thank you so much! I am quite uncomfortable with Texstudio's tags being so misleading. All of my praise to you, kind sir. – God bless Apr 02 '17 at 10:36
  • @GregorPerčič I have no idea what a texstudio tag is I don't use that editor. some kind of help system? – David Carlisle Apr 02 '17 at 11:38
  • Yes, it displays the most commonly used symbols and their unicode equivalent. That's why I think a fully displayed moustache and a mismatching command is a misledaing thing. By the way, which editor do you use? – God bless Apr 02 '17 at 12:27
  • 1
    I have always used emacs – David Carlisle Apr 02 '17 at 15:44
  • Oh, thank you. I will surely consider using it (since it suffices for such a veteran as you are). – God bless Apr 02 '17 at 16:01
2

You can import the delimiters from another font family, I chose stix.

I also add some improvements, particularly \diff for the differential and omitting commath.

\documentclass{article}

\usepackage{amsmath,mathtools}
\usepackage{amssymb}
\usepackage{fullpage}

%% moustaches from STIX
\let\lmoustache\relax \let\rmoustache\relax
\DeclareFontEncoding{LS2}{}{}
\DeclareFontSubstitution{LS2}{stix}{m}{n}
\DeclareSymbolFont{stixlargesymbols}{LS2}{stixex}{m}{n}
\SetSymbolFont{stixlargesymbols}{bold}{LS2}{stixex}{b}{n}
\DeclareMathDelimiter{\lmoustache}{\mathopen} {stixlargesymbols}{"E6}{stixlargesymbols}{"EC}
\DeclareMathDelimiter{\rmoustache}{\mathclose}{stixlargesymbols}{"E7}{stixlargesymbols}{"ED}

%% \abs and \norm
\DeclarePairedDelimiter{\abs}{\lvert}{\rvert}
\DeclarePairedDelimiter{\norm}{\lVert}{\rVert}

%% differential
\newcommand{\diff}{\mathop{}\!\mathrm{d}}

\begin{document}

\begin{equation*}
\begin{aligned}
\iiiint_{\mathcal{Q}} f(w,x,y,z) \diff w \diff x \diff y \diff z 
&\leq 
\oint_{\partial Q} f'
  \left(
    \max \left\{ \frac{\norm{w}}{\abs{w^2 + x^2}} ; 
    \frac{\norm{z}}{\abs{y^2 + z^2}} ;
    \frac{\norm{w \oplus z}}{\norm{x \oplus y}} \right\}
  \right)
\\
&\precapprox
\biguplus_{\mathbb{Q} \Subset \bar{Q}}
  \left[ f^* \left(
    \frac{\lmoustache \mathbb{Q}(t)\rmoustache}{\sqrt{1 - t^2}}
  \right) \right]^{t=9}_{t=\alpha}
\end{aligned}
\end{equation*}

\begin{equation*}
\left\lmoustache\frac{a}{b}\right\rmoustache
\end{equation*}

\end{document}

enter image description here

About not using commath, see

https://tex.stackexchange.com/a/135985/4427

https://tex.stackexchange.com/a/123408/4427

https://tex.stackexchange.com/a/265987/4427

https://tex.stackexchange.com/a/325341/4427

https://tex.stackexchange.com/a/297273/4427

https://tex.stackexchange.com/a/89470/4427

egreg
  • 1,121,712