3

I have created two custom symbols that I'd like to use like parentheses. It works fine when what is inside is in normal size, but when there is a bigger symbol, it does not scale, even if I use \left and \right.

Here is a minimal example of what I have been able to do.

\documentclass{article}
\newcommand{\ltirarr}{\mathopen{\langle\kern-0.21em\mid}}
\newcommand{\rtirarr}{\mathclose{\mid\kern-0.21em\rangle}}

\begin{document}
Inline: $\ltirarr x \rtirarr$. Display:
\[\ltirarr \sum_{x=1}^n x \rtirarr\]
\end{document}

Which renders this:

enter image description here

Could you help scaling these symbols? (Or maybe find them in a package, I couldn't find them, even non-scaling versions).

1 Answer 1

3

Here, I use the scalerel package to scale the custom symbol, but limiting its overall width to 10pt.

\documentclass{article}
\usepackage{scalerel}
\newcommand{\ltirarr}{\mathopen{\langle\kern-0.21em\mid}}
\newcommand{\rtirarr}{\mathclose{\mid\kern-0.21em\rangle}}

\begin{document}
Inline: $\ltirarr x \rtirarr$. Display:
\[\scaleleftright[10pt]{\ltirarr}{\sum_{x=1}^n x}{\rtirarr}\]
\end{document}

enter image description here

3
  • For some reason, this is not rendered as nicely on mine. The symbols are still too small (they get bigger - and also wider - when I increase the width limit), it also gets very small when using the scaling on normalsize math. Any tips to fix it?
    – ralphS16
    Commented May 21, 2020 at 18:32
  • @jedidreyfus Off the top of my head, the only thing I can think is to check if you have the latest package: ctan.org/pkg/scalerel. Also, i would not use it on normalsize math, unless there is an alternate reason to. Commented May 21, 2020 at 18:36
  • 1
    I fixed it, it was this weird line that was in my preamble for some reason: \setkeys{Gin}{width=\linewidth,totalheight=\textheight,keepaspectratio} \graphicspath{{.}}
    – ralphS16
    Commented May 21, 2020 at 19:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .