Skip
repetitive navigational links
L-Soft  -  Home of  the  LISTSERV  mailing list  manager LISTSERV(R) 14.5
Skip repetitive navigational links
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (December 2007)Back to main IVRITEX pageJoin or leave IVRITEXReplyPost a new messageSearchProportional fontNon-proportional fontLog in
Date:         Fri, 28 Dec 2007 13:14:13 +0200
Reply-To:     Hebrew TeX list <[log in to unmask]>
Sender:       Hebrew TeX list <[log in to unmask]>
From:         Guy Rutenberg <[log in to unmask]>
Subject:      Re: Adding explanation to forumulas
In-Reply-To:  <[log in to unmask]>
Content-Type: multipart/alternative;

Hi, I think I've found a better solution for adding explanation to formulas problem, I asked about a month ago. I thought it might be useful to others as well. On Nov 15, 2007 6:36 AM, Eran Tromer <[log in to unmask]> wrote: > Hi Guy, > > 2007-11-14 14:55, Guy Rutenberg wrote: > > I want to add an explanation to a formula/equality (e.g. stating the > > theorem used). I'm looking for something like the second formula in the > > attached image. But the closest I've got is the first formula. The latex > > code for the first formula is: > > > > \[ |a+b|\begin{array}[t]{c}\leq \\\ \uparrow \\\ \textrm{triangle > > inequality}\end{array}|a|+|b| \leq bla bla bla\] > > > > I'm looking for a way to make it look like the second formula (the > > correct way). I know it might be possible to use negative spaces, but > > I'm looking for a cleaner solution. > > > > Try this on: > [...snipped...] > % \explain{foo}{bar} --- puts bar centered below foo with an arrow > pointing up > \newcommand{\explain}[2]{\mathop{\vtop{\m@th\ialign{##\crcr > $\hfil\displaystyle{#1}\hfil$\crcr > $\hfil\displaystyle{\uparrow}\hfil$\crcr > $\hfil\displaystyle{\mathclap{#2}}\hfil$\crcr}}}} [...snipped...] > > Eran \documentclass{article} \usepackage{mathtools} \makeatletter % \explain{foo}{bar} --- puts bar centered below foo with an arrow pointing up \newcommand{\explain}[2]{\underset{\mathclap{\overset{\uparrow}{#2}}}{#1}} \makeatother \begin{document} \[ |a+b| \explain{\leq}{\textrm{triangle inequality}} |a|+|b| \leq bla bla bla \] \end{document} I thing the output looks more correct this way. Also the size of the explanation and the arrow is more suitable. Eran, many thanks for your help. Regards, Guy


[text/html]


Back to: Top of message | Previous page | Main IVRITEX page

LISTSERV.TAU.AC.IL CataList email list search Powered by LISTSERV email list manager