[comp.text.tex] Defining new Delimiters in LaTeX math?

raan@TAURUS.BITNET (03/06/91)

Is there a way to define new delimiters in LaTeX math mode,
other than the existing () {} <> | etc.?

What I am after is a the semantics meaning delimiters, which
look something like this:

=======                   =======
|  |                         |  |
|  |                         |  |
|  |                         |  |
|  |                         |  |
|  |      Expression         |  |
|  |                         |  |
|  |                         |  |
|  |                         |  |
|  |                         |  |
|  |                         |  |
=======                   =======

Of course, I want it to change size in accordance with the size
of the expression, as \{ Expression \} would.

Thanks

-- Ran

ogawa@orion.arc.nasa.gov (Arthur Ogawa) (03/06/91)

In article <2402@taurus.BITNET> raan%math.tau.ac.il@CUNYVM.CUNY.EDU (Ran Ever-Hadani) writes:
|Is there a way to define new delimiters in LaTeX math mode,
|other than the existing () {} <> | etc.?
|
|What I am after is a the semantics meaning delimiters, which
|look something like this:
|
|	=======                   =======
|	|  |                         |  |
|	|  |                         |  |
|	|  |                         |  |
|	|  |                         |  |
|	|  |      Expression         |  |
|	|  |                         |  |
|	|  |                         |  |
|	|  |                         |  |
|	|  |                         |  |
|	|  |                         |  |
|	=======                   =======
|
|Of course, I want it to change size in accordance with the size
|of the expression, as \{ Expression \} would.

Here's my best shot:

 \documentstyle{book}

\def\Lmeaning{\left[\![}%
\def\Rmeaning{\right]\!]}%

\begin{document}
\[
\Lmeaning
Expression
\Rmeaning
\]
\end{document}

You must use these delimiters in pairs because of the \left and \right.

fj@iesd.auc.dk (Frank Jensen) (03/07/91)

In article <1991Mar6.021200.28755@news.arc.nasa.gov> ogawa@orion.arc.nasa.gov (Arthur Ogawa) writes:

   In article <2402@taurus.BITNET> raan%math.tau.ac.il@CUNYVM.CUNY.EDU (Ran Ever-Hadani) writes:
   |Is there a way to define new delimiters in LaTeX math mode,
   |other than the existing () {} <> | etc.?
   |
   |What I am after is a the semantics meaning delimiters, which
   |look something like this:
   |
   |	=======                   =======
   |	|  |                         |  |
   |	|  |                         |  |
   |	|  |                         |  |
   |	|  |                         |  |
   |	|  |      Expression         |  |
   |	|  |                         |  |
   |	|  |                         |  |
   |	|  |                         |  |
   |	|  |                         |  |
   |	|  |                         |  |
   |	=======                   =======
   |
   |Of course, I want it to change size in accordance with the size
   |of the expression, as \{ Expression \} would.

   Here's my best shot:

    \documentstyle{book}

   \def\Lmeaning{\left[\![}%
   \def\Rmeaning{\right]\!]}%

I'm quite sure this will look funny.  You probably meant

\def\Lmeaning{\left[\!\left[}%
\def\Rmeaning{\right]\!\right]}%

Still, I suspect that the negative skip is only adequate i some cases.

   \begin{document}
   \[
   \Lmeaning
   Expression
   \Rmeaning
   \]
   \end{document}

   You must use these delimiters in pairs because of the \left and \right.

--
Frank Jensen
Department of Mathematics and Computer Science
Aalborg University
DENMARK

jeffrey@cs.chalmers.se (Alan Jeffrey) (03/07/91)

In article <2402@taurus.BITNET> raan%math.tau.ac.il@CUNYVM.CUNY.EDU (Ran Ever-Hadani) writes:
>Is there a way to define new delimiters in LaTeX math mode,
>other than the existing () {} <> | etc.?

If you want `growing' delimiters, then the answer is no, not really.
Growing delimiters keep the information about how to stick the large
versions together in the font, so you have to stick a new font
together if you want a new growing delimiter.  However, in your
particular case (wanting [[x]]) I can help you, as I have a delimiter
font (cspex10) which contains [[, ]], \bigsqcap, and a few other bits
and bobs.  Metafont code is available.  I also have a blackboard bold
font, which contains normal-size versions of [[ and ]], along with
lots of other `useful' features as bbold greek, bbold punctuation, and
lots of other things you'll never need.

Cheers,

Alan.
Alan Jeffrey         Tel: +46 31 72 10 98         jeffrey@cs.chalmers.se
Department of Computer Sciences, Chalmers University, Gothenburg, Sweden

ogawa@orion.arc.nasa.gov (Arthur Ogawa) (03/08/91)

In article <FJ.91Mar7142304@indigo.iesd.auc.dk> fj@iesd.auc.dk (Frank Jensen) writes:
|In article <1991Mar6.021200.28755@news.arc.nasa.gov> ogawa@orion.arc.nasa.gov (Arthur Ogawa) writes:
|
|   In article <2402@taurus.BITNET> raan%math.tau.ac.il@CUNYVM.CUNY.EDU (Ran Ever-Hadani) writes:
|   |Is there a way to define new delimiters in LaTeX math mode,
|   |other than the existing () {} <> | etc.?
|   |
|   |What I am after is a the semantics meaning delimiters, which
|   |look something like this:
|   |
|   |	=======                   =======
|   |	|  |                         |  |
|   |	|  |                         |  |
|   |	|  |                         |  |
|   |	|  |                         |  |
|   |	|  |      Expression         |  |
|   |	|  |                         |  |
|   |	|  |                         |  |
|   |	|  |                         |  |
|   |	|  |                         |  |
|   |	|  |                         |  |
|   |	=======                   =======
|   |
|   |Of course, I want it to change size in accordance with the size
|   |of the expression, as \{ Expression \} would.
|
|   Here's my best shot:
|
|    \documentstyle{book}
|
|   \def\Lmeaning{\left[\![}%
|   \def\Rmeaning{\right]\!]}%
|
|I'm quite sure this will look funny.  You probably meant

I'm not sure what you mean by "look funny"; humor was certainly not
the intention ;-). 

|\def\Lmeaning{\left[\!\left[}%
|\def\Rmeaning{\right]\!\right]}%

There is no need to double up the \left and \right, as you have done here.
If I am wrong in this, I am open to correction.

|Still, I suspect that the negative skip is only adequate in some cases.

I am eager to find the cases where the single \! is inadequate. It
certainly is so for the simple test case; I mean certain in the sense
of producing correct print output.

Anyone who actually uses my solution, please post results/corrections
to me; I will summarize to the net.