Math Is Fun Forum

  Discussion about math, puzzles, games and fun.   Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ -¹ ² ³ °

You are not logged in.

#1 2008-07-09 07:27:41

JaneFairfax
Member
Registered: 2007-02-23
Posts: 6,868

How to make nested expressions look better in LaTeX

BEFORE:


AFTER:



BEFORE:


AFTER:

Offline

#2 2008-07-09 07:49:02

Ricky
Moderator
Registered: 2005-12-04
Posts: 3,791

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..."

Offline

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

MathsIsFun
Administrator
Registered: 2005-01-21
Posts: 7,711

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

Offline

#4 2008-07-09 15:42:38

Ricky
Moderator
Registered: 2005-12-04
Posts: 3,791

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..."

Offline

#5 2008-07-09 17:40:06

MathsIsFun
Administrator
Registered: 2005-01-21
Posts: 7,711

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

Offline

#6 2008-07-09 22:17:18

JaneFairfax
Member
Registered: 2007-02-23
Posts: 6,868

Re: How to make nested expressions look better in LaTeX

You don’t 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-09 22:24:05)

Offline

#7 2008-07-09 23:20:55

MathsIsFun
Administrator
Registered: 2005-01-21
Posts: 7,711

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

Offline

#8 2008-07-10 04:00:59

Ricky
Moderator
Registered: 2005-12-04
Posts: 3,791

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..."

Offline

#9 2008-07-10 10:30:20

MathsIsFun
Administrator
Registered: 2005-01-21
Posts: 7,711

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

Offline

#10 2009-07-14 08:01:56

cperrin
Member
Registered: 2009-07-14
Posts: 1

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?

Offline

#11 2009-07-14 12:09:37

soroban
Member
Registered: 2007-03-09
Posts: 452

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:

. .

.

Offline

#12 2009-07-15 02:47:19

JaneFairfax
Member
Registered: 2007-02-23
Posts: 6,868

Re: How to make nested expressions look better in LaTeX

That’s amazing! up

Offline

#13 2009-07-20 10:45:45

soroban
Member
Registered: 2007-03-09
Posts: 452

Re: How to make nested expressions look better in LaTeX

.



. .


. .


. .


. .


. .



.

Offline

#14 2009-07-21 10:46:56

quittyqat
Member
Registered: 2009-04-08
Posts: 1,215

Re: How to make nested expressions look better in LaTeX


This is easy!

Last edited by quittyqat (2009-07-21 11:52:17)


I'll be here at least once every decade.

Offline

#15 2009-07-21 11:06:41

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

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.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#16 2009-07-21 11:46:06

quittyqat
Member
Registered: 2009-04-08
Posts: 1,215

Re: How to make nested expressions look better in LaTeX

Click "quote".


I'll be here at least once every decade.

Offline

#17 2009-07-22 08:41:13

soroban
Member
Registered: 2007-03-09
Posts: 452

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

.

Offline

#18 2009-07-24 08:46:50

soroban
Member
Registered: 2007-03-09
Posts: 452

Re: How to make nested expressions look better in LaTeX


. .



. . . .



. . . . . .

.

Offline

#19 2009-08-01 07:07:08

soroban
Member
Registered: 2007-03-09
Posts: 452

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."

.

Offline

Board footer

Powered by FluxBB