On Thu, Nov 3, 2011 at 6:16 PM, Ernesto Posse <[email protected]> wrote:
>> Is there some way of drawing in a LyX document a chain rule diagram?
>> Please, see an example of what I am wanting at:
>>
>> http://tutorial.math.lamar.edu/Classes/CalcIII/ChainRule_files/image001.gif
>
> While there is no direct way of doing that in lyx, there are useful
> alternatives. My favourite is the XY-pic package
> (http://www.tug.org/applications/Xy-pic/), which is useful for all
> kinds of diagrams.
>
> To use it you need to install XY-pic (the 'xy' latex package), and in
> LyX, in the preamble (Documents->Settings->LaTeX preamble) you should
> write
>
> \usepackage[all]{xy}
>
> \newcommand{\pd}[2]{\frac{\partial #1}{\partial #2}} %this line is
> only for your specific diagram
>
> Then in the body, you create an ERT box (Ctrl-L) and inside you can
> put the following:
>
> \[
> \xymatrix{
>  &   &   & z \ar@{-}[dll]_{\pd{z}{x}} \ar@{-}[drr]^{\pd{z}{y}} &   &   &   \\
>  & x \ar@{-}[dl]_{\pd{x}{s}} \ar@{-}[dr]^{\pd{x}{t}} &   &   &   & y
> \ar@{-}[dl]_{\pd{y}{s}} \ar@{-}[dr]^{\pd{y}{t}} &   \\
> s &   & t &   & s &   & t \\
> }
> \]
>
> A first look at this might seem daunting, but once you read the xy
> user's guide it will seem quite straight-forward.

Thanks a lot, Ernesto. That is exactly what I was looking for.

Paul

Reply via email to