Math & ScienceHow a math delimiter could be placed above baseline?

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
kornaros
Posts: 40
Joined: Wed Nov 30, 2011 12:11 am

How a math delimiter could be placed above baseline?

Post by kornaros »

I am trying to put \left[ or other well know delimiters in the front of a box something like

Code: Select all

baseline \_ 
$\left[ \rule[0ex]{3cm}{4cm}\right.$
As you could see the bracket is far below the box and with different height! Is it possible to find a way so that the delimiters respect the dimensions and the position of the object(image, box, no below baseline etc)?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

How a math delimiter could be placed above baseline?

Post by Stefan Kottwitz »

Hi kornaros,

you could use \vcenter to center the object at the baseline. Then, the delimiters match top and bottom.

Code: Select all

\documentclass{article}
\begin{document}
baseline \_ 
$\left[ \vcenter{\hbox{\rule[0ex]{3cm}{4cm}}}\right.$
\end{document}
Stefan
LaTeX.org admin
kornaros
Posts: 40
Joined: Wed Nov 30, 2011 12:11 am

Re: How a math delimiter could be placed above baseline?

Post by kornaros »

Thank you for your answer! The bracket [ have to respect the position of the box. In otherwords \vcenter centers everything on the middle of the baseline! I just want to put the brackets [ at the right position (at the front of the box...)! Thanks!
kornaros
Posts: 40
Joined: Wed Nov 30, 2011 12:11 am

How a math delimiter could be placed above baseline?

Post by kornaros »

Another strange result: The \left is not well defined! If one make some experiments with boxes of different heights like

Code: Select all

$\left[ \vcenter{\hbox{\rule[0ex]{2cm}{1.89cm}}}\right.$$\left[ \vcenter{\hbox{\rule[0ex]{2cm}{2.4cm}}}\right.$
etc. then the brackets are not fit the boxes with the same accuracy! You could see this by taking many different values of the heights of the boxs. I can not understand the reason...
User avatar
Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

Re: How a math delimiter could be placed above baseline?

Post by Stefan Kottwitz »

Those delimiters are built from symbols, so not perfectly scalable but just near the height as much as available symbol font delimiters and delimiter building pieces allow.

With a drawing package, such as TikZ, brackets or braces can be drawn in an exact way.

Stefan
LaTeX.org admin
kornaros
Posts: 40
Joined: Wed Nov 30, 2011 12:11 am

Re: How a math delimiter could be placed above baseline?

Post by kornaros »

Yes! You are right! TikZ is a very good package but I never studied it in details! If you have time, could you please define a vertical and a horizontal bracket or angle with TikZ ? Or at least could you answer me if it is possible to make lengtly horizontal brackets that respect the end of a line (i.e. they wrap to the next line for the case of a big text underneath) or vertical brackets that respect the page breaks i.e. the continue to the next page? Thank you again for your interest!
Post Reply