2

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.

4
  • I wouldn't use commath Apr 2 '17 at 10:34
  • What would you use to get a similar result?
    – God bless
    Apr 2 '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 2 '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 2 '17 at 10:48
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

4
  • Wow, thank you. I wanted to ask how to accomodate the moustache height, but you answered before I could even pose my question. Thank you very much!
    – God bless
    Apr 2 '17 at 12:29
  • Nice! But how did you figure out which codes to use (E6/E7/EC/ED)?
    – Clément
    Feb 24 at 14:38
  • 1
    @Clément texdoc stix2 has a table of codes.
    – egreg
    Feb 24 at 14:49
  • Wonderful, thanks a lot! Oh, and searching around, I saw that unicode-math-table.tex also does.
    – Clément
    Feb 25 at 4:52
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}
5
  • 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 2 '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? Apr 2 '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 2 '17 at 12:27
  • 1
    I have always used emacs Apr 2 '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 2 '17 at 16:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.