4

I need to type \big( but with a vertical line in it, either in the middle, or end-to-end (would prefer having both options). To clarify, I need something along the lines of \llparenthesis (package stmaryrd), but of exact size \big(. For some obscure reason about delimiters \big\llparenthesis fails to work, but \bigllbracket does work. I did find a temporary work-around using \scaleobj{1.1}{\llparenthesis} (package scalerel), which is visibly smaller in height than \big(. To summarize, below is a picture showing how things are, and how I want them to be. Obviously I need a right-parenthesis version as well. Thanks, Piotr. enter image description here

1 Answers1

5

Updated 2: This solution is meant to be used with Computer Modern and Latin Modern math fonts only.

\documentclass[12pt]{article}

\newcommand{\lstruck}{\mathopen{\Big(\kern-.475ex\Big\vert}} \newcommand{\rstruck}{\mathclose{\Big\vert\kern-.475ex\Big)}} \newcommand{\parstruck}[1]{\lstruck #1\rstruck}

\newcommand{\lmstruck}{\mathopen{\Big(\kern-.8ex\big\vert}} \newcommand{\rmstruck}{\mathclose{\big\vert\kern-.8ex\Big)}} \newcommand{\nparstruck}[1]{\lmstruck #1\rmstruck}

\begin{document} \phantom{\texttt{n}}\verb|\parstruck|: $\parstruck{aBf(x)g}$

\verb|\nparstruck|: $\nparstruck{aBf(x)g}$ \end{document}

enter image description here


Updated 1


This is an improved of my previous answer:

\documentclass[a4paper,12pt]{article}
\usepackage{amsmath,amssymb}

\newcommand{\lstruck}{\Bigl(\mkern-4mu{\Big\lvert}} \newcommand{\rstruck}{{\Big\rvert}\mkern-4mu\Bigr)} \newcommand{\lmstruck}{\Bigl(\mkern-7.1mu{\bigl\lvert}} \newcommand{\rmstruck}{{\bigr\rvert}\mkern-7.1mu\Bigr)} \newcommand{\parstruck}[1]{{\lstruck{\mathbin #1}\rstruck}} \newcommand{\nparstruck}[1]{{\lmstruck{\mathbin #1}\rmstruck}}

\begin{document}

\verb|\parstruck{...}| direct command where has been used \verb|\mathbin| for the first type of brackets:

[\parstruck{aBf(x)g}]

\verb|\nparstruck{...}| direct command where has been used \verb|\mathbin| for the second type of brackets:

[\nparstruck{rsg(x)hp}]

Classic \verb|\parstruck{...}| commands without \verb|\mathbin|:

[\lstruck pQr \rstruck, , \lmstruck pQr \rmstruck]

\end{document}

enter image description here


Just as an exercise. You can create himself your parentesis.

\documentclass[a4paper,12pt]{article}
\usepackage{amsmath,amssymb}

\newcommand{\lstruck}{\Bigl(\mkern-4mu{\Big\lvert}} \newcommand{\rstruck}{{\Big\rvert}\mkern-4mu\Bigr)} \newcommand{\lmstruck}{\Bigl(\mkern-7.1mu{\bigl\lvert}} \newcommand{\rmstruck}{{\bigr\rvert}\mkern-7.1mu\Bigr)} \begin{document} [\lstruck pQr \rstruck]

[\lmstruck pQr \rmstruck]

\end{document}

enter image description here

Sebastiano
  • 54,118
  • Excellent, Thank You for taking your time to answer! You're right, I'd gladly learn and draw these myself as an exercise, but the time is not on my side here. Besides, LaTeX drawing / transform commands, for me at least, are too obscure, feel very artificial, and, to put it mildly, do not spark joy. – Piotr Tarasov Aug 26 '20 at 04:24
  • 1
    @PiotrTarasov Excellent not really ahahah. I have been using LaTeX since 2002 and have always loved it. What I have done for you has been a pleasure and I always thank many users of this site who have teaching me so much. I wanted to remind you that the brackets are the classic amsmath brackets and like the vertical bars. The latter are not very thick and I wanted to use \mathbin with other commands. Maybe it will be inspiration for other very good users. Always a pleasure and my best regards. – Sebastiano Aug 26 '20 at 08:22
  • 1
    @PiotrTarasov Hi, I have improved my answer to give a possibility to write fastely your brackets. – Sebastiano Aug 26 '20 at 11:27
  • 1
    I edited your answer a bit to get more of what I need: \newcommand{\llmparen}{\big(\mkern-5mu{\lvert}} and \newcommand{\rrmparen}{{\rvert}\mkern-5mu\big)}. You see, I was aiming more at \big(, rather than \Bigl(. A similar mod applies to get (| and |) for \big( and \big) respectively. – Piotr Tarasov Aug 26 '20 at 13:02
  • 1
    Note that {\mathbin #1} isn't doing anything. The first token in the argument #1 becomes \mathbin, but this becomes immediately \mathord because of the usual rules. The whole construction is within a group and is turned into a \mathord anyway. – campa Aug 26 '20 at 14:24
  • @campa I will try to do my best. I will change the answer to have equal space on both the right and left of the brackets. Thank you for your suggestion. Best regards. – Sebastiano Aug 26 '20 at 18:44