LaTeX forum ⇒ 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).
kornaros
Posts: 40
Joined: Wed Nov 30, 2011 12:11 am

How a math delimiter could be placed above baseline?

Postby kornaros » Wed Jan 20, 2016 3:15 pm

I am trying to put \left[ or other well know delimiters in the front of a box something like
  1. baseline \_
  2. $\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)?

Tags:

User avatar
Stefan Kottwitz
Site Admin
Posts: 9019
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Wed Jan 20, 2016 7:49 pm

Hi kornaros,

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

  1. \documentclass{article}
  2. \begin{document}
  3. baseline \_
  4. $\left[ \vcenter{\hbox{\rule[0ex]{3cm}{4cm}}}\right.$
  5. \end{document}


Stefan
Site admin

kornaros
Posts: 40
Joined: Wed Nov 30, 2011 12:11 am

Postby kornaros » Wed Jan 20, 2016 8:02 pm

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

Postby kornaros » Wed Jan 20, 2016 8:20 pm

Another strange result: The \left is not well defined! If one make some experiments with boxes of different heights like
  1. $\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: 9019
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Wed Jan 20, 2016 8:47 pm

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
Site admin

kornaros
Posts: 40
Joined: Wed Nov 30, 2011 12:11 am

Postby kornaros » Wed Jan 20, 2016 10:19 pm

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!


Return to “Math & Science”

Who is online

Users browsing this forum: No registered users and 4 guests