Math Is Fun Forum
  Discussion about math, puzzles, games and fun.   Useful symbols: √ ∞ ≠ ≤ ≥ ≈ ⇒ ∈ Δ θ ∴ ∑ ∫ π -

Login

Username

Password

Not registered yet?

#1 2008-07-10 05:27:41

JaneFairfax
Legendary Member

Offline

How to make nested expressions look better in LaTeX

BEFORE:




AFTER:





BEFORE:




AFTER:


Q: Who wrote the novels Mrs Dalloway and To the Lighthouse?

A: Click here for answer.
 

#2 2008-07-10 05:49:02

Ricky
Moderator

Offline

Re: How to make nested expressions look better in LaTeX

MathsIsFun, can you enable the cfrac command?


"In the real world, this would be a problem.  But in mathematics, we can just define a place where this problem doesn't exist.  So we'll go ahead and do that now..."
 

#3 2008-07-10 08:07:58

MathsIsFun
Administrator

Offline

Re: How to make nested expressions look better in LaTeX

If I knew how ... I better start Googling "cfrac", hey?


"The physicists defer only to mathematicians, and the mathematicians defer only to God ..."  - Leon M. Lederman
 

#4 2008-07-10 13:42:38

Ricky
Moderator

Offline

Re: How to make nested expressions look better in LaTeX

Ah, I thought we could only use latex command that you "approve" (or something of the sort).  It should be a standard command... not sure why it doesn't work.


"In the real world, this would be a problem.  But in mathematics, we can just define a place where this problem doesn't exist.  So we'll go ahead and do that now..."
 

#5 2008-07-10 15:40:06

MathsIsFun
Administrator

Offline

Re: How to make nested expressions look better in LaTeX

Examples of "amsmath package" commands:







For some reason cfrac doesn't work ... why?


"The physicists defer only to mathematicians, and the mathematicians defer only to God ..."  - Leon M. Lederman
 

#6 2008-07-10 20:17:18

JaneFairfax
Legendary Member

Offline

Re: How to make nested expressions look better in LaTeX

You dont need \cfrac. Guess what. I just discovered \dfrac! tongue



Does that have the same visual effect as \cfrac? roll

Last edited by JaneFairfax (2008-07-10 20:24:05)


Q: Who wrote the novels Mrs Dalloway and To the Lighthouse?

A: Click here for answer.
 

#7 2008-07-10 21:20:55

MathsIsFun
Administrator

Offline

Re: How to make nested expressions look better in LaTeX

It looks fine to me. And it gets me off the hook smile


"The physicists defer only to mathematicians, and the mathematicians defer only to God ..."  - Leon M. Lederman
 

#8 2008-07-11 02:00:59

Ricky
Moderator

Offline

Re: How to make nested expressions look better in LaTeX

\dfrac is the display style version of \frac.  It is equivalent to doing:

\displaystyle \frac{stuff}{stuff}

Display style is meant for mathematical symbols not to be inlined with text.  \sum with give you a small summation sign about the size of the line, while \displaystyle \sum will give you a much larger one, which the indicies properly underneath and on top instead of the typical subscript and superscript.

If you aren't having it inline with text, then a good idea is to use \begin{equation} ... \end{equation}.  This will not only put you in "displaystyle" mode, but also center everything.

Back on topic... our dfrac is actually cfrac (not sure how that happened...).  Take a look at this link.


"In the real world, this would be a problem.  But in mathematics, we can just define a place where this problem doesn't exist.  So we'll go ahead and do that now..."
 

#9 2008-07-11 08:30:20

MathsIsFun
Administrator

Offline

Re: How to make nested expressions look better in LaTeX

Amazing ... and I don't know why. I just installed the package that was available and it does what it does.


"The physicists defer only to mathematicians, and the mathematicians defer only to God ..."  - Leon M. Lederman
 

#10 2009-07-15 06:01:56

cperrin
Novice

Offline

Re: How to make nested expressions look better in LaTeX

I am working on a LaTeX project in which I need a weird new symbol called a 'mark' or 'cross'. See http://en.wikipedia.org/wiki/Laws_of_Form to see how it looks and how it is used (hit the link for section 5.5.2 Sentential logic).

I'm looking for something that would act much like the square root sign that can easily be done in LaTeX. That is, the \sqrt{} figures out how high the 'checkmark' part should be and how wide the 'overbar' part should be when it is nested, e.g.

\sqrt{\sqrt{A\sqrt{B}}\sqrt{\sqrt{A}B}}

The 'checkmark' on the left of the \sqrt sign should be a simple vertical bar on the right side, with the 'overbar' part the same. Do I need the CODE that makes the \sqrt{} work like it does so I can modify it to this purpose?

 

#11 2009-07-15 10:09:37

soroban
Power Member

Offline

Re: How to make nested expressions look better in LaTeX

I use \dfrac in complex fractions . . .




and \tfrac for smaller fractions . . .

. .




Someone showed me how to insert spaces in an array.

A matrix with fractions often looks very crowded:

\begin{pmatrix}
\frac{1}{4} & \frac{3}{4} \\
\frac{2}{3} & \frac{1}{3}
\end{pmatrix}

.




\begin{pmatrix}
\frac{1}{4} & \frac{3}{4} \\ \\[-3mm]
\frac{2}{3} & \frac{1}{3}
\end{pmatrix}




Evidently the \\ adds another line feed
. . and the [-3mm] makes it "back up" 3 mm.


I've taken an array like this:

. .


and morphed it into this:

. .


.

 

#12 2009-07-16 00:47:19

JaneFairfax
Legendary Member

Offline

Re: How to make nested expressions look better in LaTeX

Thats amazing! up


Q: Who wrote the novels Mrs Dalloway and To the Lighthouse?

A: Click here for answer.
 

#13 2009-07-21 08:45:45

soroban
Power Member

Offline

Re: How to make nested expressions look better in LaTeX

.





. .



. .



. .



. .



. .


.

 

#14 2009-07-22 08:46:56

quittyqat
Super Member

Offline

Re: How to make nested expressions look better in LaTeX


This is easy!

Last edited by quittyqat (2009-07-22 09:52:17)


I'll be here at least once every month. XP
 

#15 2009-07-22 09:06:41

bobbym
Administrator

Offline

Re: How to make nested expressions look better in LaTeX

Nice, how was it done?


In mathematics, you don't understand things. You just get used to them.
I have the result, but I do not yet know how to get it.
All physicists, and a good many quite respectable mathematicians are contemptuous about proof.
 

#16 2009-07-22 09:46:06

quittyqat
Super Member

Offline

Re: How to make nested expressions look better in LaTeX

Click "quote".


I'll be here at least once every month. XP
 

#17 2009-07-23 06:41:13

soroban
Power Member

Offline

Re: How to make nested expressions look better in LaTeX

.

. . . . .



A man with bowtie standing too close
. . . to the front of the elevator



. . . . .


Nude girl hiding in a pile of grapefruit

.

 

#18 2009-07-25 06:46:50

soroban
Power Member

Offline

Re: How to make nested expressions look better in LaTeX




. .




. . . .




. . . . . .


.

 

#19 2009-08-02 05:07:08

soroban
Power Member

Offline

Re: How to make nested expressions look better in LaTeX

.

. . . . . . . .



"So, how's the stress management
. . . . . course working out?"



. . . . . . .


"Okay, the girls have gone by.
. . You can exhale now."

.

 

Board footer

Powered by FluxBB