Community

Want to learn how to tackle those tough AMC/AIME/Olympiad counting and probability problems? Check out Art of Problem Solving's Intermediate Counting & Probability by David Patrick.
Login Register Memberlist Search AoPS Blogs Contests Galleries Forum Index
The time now is Thu Nov 26, 2009 4:05 am
All times are UTC - 8
View posts since last visit
View unanswered posts
Clever ideas in LaTeX
Moderators: fedja, stevem
Post new topic   Reply to topic View previous topicView next topic
22 Posts • Page 1 of 2 • 1, 2 Next
Author Message
stevem
Navier-Stokes Equations
Navier-Stokes Equations

Offline
Joined: 25 Apr 2004
Posts: 2194
Location: Dorset, UK

To rate posts you must be logged in
#1
Clever ideas in LaTeX

This thread is your chance to show off clever things you've found you can do in LaTeX so that they inspire others to learn more about LaTeX.

I'll start it off with a couple of things that I've already posted in another thread:
\setlength{\unitlength}{0.5cm}\begin{picture}(5,2) \put(5,0){\line(-1,0){5}}\put(0,0){\line(1,1){2}}\put(2,2){\line(3,-2){3}}... and \setlength{\unitlength}{2mm}\begin{picture}(30, 20) \linethickness{0.075mm}\multiput(0, 0)(1, 0){31}{\line(0, 1){20}}\multipu...

OK, over to you. Even if you've already posted something good elsewhere then do repeat it here (hint to i_like_pie Smile)

PostPosted: Mon Dec 04, 2006 8:28 am  Back to top 
  ProfilePMWWW
mgao
Navier-Stokes Equations
Navier-Stokes Equations


Offline
Joined: 06 Mar 2006
Posts: 1465
ChinaUnited States

To rate posts you must be logged in
#2
Re: Clever ideas in LaTeX

Code:
$\setlength{\unitlength}{0.5cm}\begin{picture}(5,2) \put(5,0){\line(-1,0){5}}\put(0,0){\line(1,1){2}}\put(2,2){\line(3,-2){3}}\put(-0.5,-0.1){\small A}\put(1.9,2.1){\small B}\put(5.1,-0.1){\small C}\put(4,0.1){\tiny 30}\qbezier(3.8,0)(3.9,0.55)(4.1,0.55) \put(0.6,1){\footnotesize 2}\put(3.6,1){\footnotesize 3}\put(2.3,-0.6){\footnotesize 5}\put(-1,-0.2){\tiny \shortstack{i\\m\\p\\o\\s\\s\\i\\b\\l\\e}}\put(6,-0.2){\tiny \shortstack{t\\r\\i\\a\\n\\g\\l\\e}}\end{picture}$ and $\setlength{\unitlength}{2mm}\begin{picture}(30, 20) \linethickness{0.075mm}\multiput(0, 0)(1, 0){31}{\line(0, 1){20}}\multiput(0, 0)(0, 1){21}{\line(1, 0){30}}\linethickness{0.15mm}\multiput(0, 0)(5, 0){7}{\line(0, 1){20}}\multiput(0, 0)(0, 5){5}{\line(1, 0){30}}\linethickness{0.3mm}\multiput(5, 0)(10, 0){3}{\line(0, 1){20}}\multiput(0, 5)(0, 10){2}{\line(1, 0){30}}\end{picture}$

So people can see what you wrote...
_________________
The large print giveth, and the fine print taketh away.

PostPosted: Mon Dec 04, 2006 6:30 pm  Back to top 
  ProfilePMBlog
nkouevda
Birch & Swinnerton Dyer
Birch & Swinnerton Dyer

Offline
Joined: 01 Sep 2006
Posts: 2747
Location: Cupertino, CA
Russian FederationUnited States

To rate posts you must be logged in
#3
\setlength{\unitlength}{.5cm}\begin{picture}(2,2) \qbezier(2,1)(2,2)(1,2) \qbezier(1,2)(0,2)(0,1) \qbezier(0,1)(0,0)(1,0) \qb...

Code:
$\setlength{\unitlength}{.5cm}\begin{picture}(2,2) \qbezier(2,1)(2,2)(1,2) \qbezier(1,2)(0,2)(0,1) \qbezier(0,1)(0,0)(1,0) \qbezier(1,0)(2,0)(2,1) \end{picture}$


\setlength{\unitlength}{.5cm}\begin{picture}(5,4) \put(.5,.5){\line(5,0){5}}\put(.5,.5){\line(0,3){3}}\put(.5,3.5){\line(5,-3...

Code:
$\setlength{\unitlength}{.5cm}\begin{picture}(5,4) \put(.5,.5){\line(5,0){5}} \put(.5,.5){\line(0,3){3}} \put(.5,3.5){\line(5,-3){5}} \put(1,.5){\line(0,1){0.5}} \put(.5,1){\line(1,0){0.5}} \put(-.1,3.5){A} \put(-.1,0){B} \put(5.5,0){C} \put(2.75,0){a} \put(3,2.1){b}  \put(0,1.75){c} \end{picture}$


Should I do some complicated stuff?

PostPosted: Mon Dec 04, 2006 9:33 pm  Back to top 
  ProfilePMWWWAIMYMMSNBlog
stevem
Navier-Stokes Equations
Navier-Stokes Equations

Offline
Joined: 25 Apr 2004
Posts: 2194
Location: Dorset, UK

To rate posts you must be logged in
#4
i_like_pie wrote:
Should I do some complicated stuff?
Yes, if you think it will be helpful to others and perhaps inspire them.

PostPosted: Tue Dec 05, 2006 3:45 am  Back to top 
  ProfilePMWWW
#H34N1
Birch & Swinnerton Dyer
Birch & Swinnerton Dyer


Offline
Joined: 03 Jun 2005
Posts: 4449
SwedenUnited States

To rate posts you must be logged in
#5
How did you guys learn that stuff?
_________________
I lost. Why do I lose so much?
Latest stupid mistake(s): 2^4\neq 8.
More combo help please kkthx[url]. Epic fail.....

PostPosted: Thu Dec 07, 2006 7:48 pm  Back to top 
  ProfilePMWWWBlogAlbum
stevem
Navier-Stokes Equations
Navier-Stokes Equations

Offline
Joined: 25 Apr 2004
Posts: 2194
Location: Dorset, UK

To rate posts you must be logged in
#6
Lots of reading - see LaTeX How-Tos for where to find the information

PostPosted: Fri Dec 08, 2006 3:04 am  Back to top 
  ProfilePMWWW
nkouevda
Birch & Swinnerton Dyer
Birch & Swinnerton Dyer

Offline
Joined: 01 Sep 2006
Posts: 2747
Location: Cupertino, CA
Russian FederationUnited States

To rate posts you must be logged in
#7
anirudh wrote:
How did you guys learn that stuff?

http://tobi.oetiker.ch/lshort/lshort.pdf

Graphics is Chapter 5 (page 105).

PostPosted: Fri Dec 08, 2006 6:44 pm  Back to top 
  ProfilePMWWWAIMYMMSNBlog
nkouevda
Birch & Swinnerton Dyer
Birch & Swinnerton Dyer

Offline
Joined: 01 Sep 2006
Posts: 2747
Location: Cupertino, CA
Russian FederationUnited States

To rate posts you must be logged in
#8
\\\setlength{\unitlength}{.5cm}\begin{picture}(6,2) \qbezier(0,0)(0,2)(2,2) \qbezier(2,2)(4,2)(4,0) \qbezier(2,0)(2,2)(4,2) \...

Code:
\\\setlength{\unitlength}{.5cm} \begin{picture}(6,2) \qbezier(0,0)(0,2)(2,2) \qbezier(2,2)(4,2)(4,0) \qbezier(2,0)(2,2)(4,2) \qbezier(4,2)(6,2)(6,0) \put(0,0){\line(6,0){6}} \put(2.75,0.6){A} \put(0.9,0.1){\small{x}} \put(4.85,0.1){\small{x}} \end{picture}\\\\ A=\frac{x^{2}\left(4\pi-3\sqrt{3}\right)}{6}


\setlength{\unitlength}{.5cm}\begin{picture}(10,10) \put(2,2){\line(0,2){2}}\put(2,6){\line(0,2){2}}\put(2,8){\line(2,0){2}}\...

Code:
\setlength{\unitlength}{.5cm}\begin{picture}(10,10) \put(2,2){\line(0,2){2}} \put(2,6){\line(0,2){2}} \put(2,8){\line(2,0){2}} \put(6,8){\line(2,0){2}} \put(2,2){\line(2,0){2}} \put(6,2){\line(2,0){2}} \put(8,2){\line(0,2){2}} \put(8,6){\line(0,2){2}} \put(0,4){\line(2,0){2}} \put(0,4){\line(0,2){2}} \put(0,6){\line(2,0){2}} \put(4,8){\line(0,2){2}} \put(4,10){\line(2,0){2}} \put(6,8){\line(0,2){2}} \put(8,4){\line(2,0){2}} \put(10,4){\line(0,2){2}} \put(8,6){\line(2,0){2}} \put(4,0){\line(0,2){2}} \put(4,0){\line(2,0){2}} \put(6,0){\line(0,2){2}} \qbezier(0,6)(0,10)(4,10) \qbezier(6,10)(10,10)(10,6) \qbezier(10,4)(10,0)(6,0) \qbezier(4,0)(0,0)(0,4) \qbezier(2,2)(5,5)(2,8) \qbezier(2,8)(5,5)(8,8) \qbezier(8,8)(5,5)(8,2) \qbezier(8,2)(5,5)(2,2) \qbezier(3.5,5)(3.5,6.5)(5,6.5) \qbezier(5,6.5)(6.5,6.5)(6.5,5) \qbezier(6.5,5)(6.5,3.5)(5,3.5) \qbezier(5,3.5)(3.5,3.5)(3.5,5) \end{picture}


PostPosted: Fri Dec 08, 2006 8:19 pm  Back to top 
  ProfilePMWWWAIMYMMSNBlog
roadnottaken
Yang-Mills Theory
Yang-Mills Theory


Offline
Joined: 27 Nov 2006
Posts: 551
Location: I'm a figment of my own imagination.

To rate posts you must be logged in
#9
Note that if you hold the cursor over a \LaTeX image, the source code will be displayed in a box. I realize that this is not quite as easy to read, but it is something to keep in mind.
_________________
Two roads diverged in a wood, and I-
I took the one less traveled by,
And that has made all the difference.

PostPosted: Sat Dec 09, 2006 2:19 pm  Back to top 
  ProfilePMWWW
nkouevda
Birch & Swinnerton Dyer
Birch & Swinnerton Dyer

Offline
Joined: 01 Sep 2006
Posts: 2747
Location: Cupertino, CA
Russian FederationUnited States

To rate posts you must be logged in
#10
roadnottaken wrote:
Note that if you hold the cursor over a \LaTeX image, the source code will be displayed in a box. I realize that this is not quite as easy to read, but it is something to keep in mind.

I noticed that, too, but it only displays the first line or so.

To get the entire code, you can do one of two things:

1. Quote the post and copy the code.
2. If the topic is locked (you can't quote anymore), right-click the image and click Properties. The code is in Miscellaneous Properties.

PostPosted: Sat Dec 09, 2006 3:08 pm  Back to top 
  ProfilePMWWWAIMYMMSNBlog
#H34N1
Birch & Swinnerton Dyer
Birch & Swinnerton Dyer


Offline
Joined: 03 Jun 2005
Posts: 4449
SwedenUnited States

To rate posts you must be logged in
#11
Doesn't it take a looooong time to type that all up...

Isn' it faster to do with Geometer's sketchpad? Huh?
_________________
I lost. Why do I lose so much?
Latest stupid mistake(s): 2^4\neq 8.
More combo help please kkthx[url]. Epic fail.....

PostPosted: Wed Dec 13, 2006 5:50 pm  Back to top 
  ProfilePMWWWBlogAlbum
chess64
Birch & Swinnerton Dyer
Birch & Swinnerton Dyer


Offline
Joined: 20 Feb 2005
Posts: 4872
PakistanUnited States

To rate posts you must be logged in
#12
anirudh wrote:
Doesn't it take a looooong time to type that all up...

Isn' it faster to do with Geometer's sketchpad? Huh?


Eww, geometer's sketchpad is so ugly. Besides you can't even export it to TeX or ps.

PostPosted: Wed Dec 13, 2006 6:54 pm  Back to top 
  ProfilePMBlogAlbum
solafidefarms
Birch & Swinnerton Dyer
Birch & Swinnerton Dyer


Offline
Joined: 11 Feb 2004
Posts: 2716
Location: South Metro Atlanta
United States

To rate posts you must be logged in
#13
chess64 wrote:
anirudh wrote:
Doesn't it take a looooong time to type that all up...

Isn' it faster to do with Geometer's sketchpad? Huh?


Eww, geometer's sketchpad is so ugly. Besides you can't even export it to TeX or ps.


If you're going to use a geometry program to do that stuff try Kig (http://edu.kde.org/kig/) I think with enough work you can make KDE and thus kig run under Windows.
_________________
Rom8:35,37 Who shall separate us from the love of Christ? shall tribulation, or distress, or persecution, or famine, or nakedness, or peril, or sword? ...Nay, in all these things we are more than conquerors through him that lo

PostPosted: Thu Dec 14, 2006 1:29 pm  Back to top 
  ProfilePMBlogAlbum
chess64
Birch & Swinnerton Dyer
Birch & Swinnerton Dyer


Offline
Joined: 20 Feb 2005
Posts: 4872
PakistanUnited States

To rate posts you must be logged in
#14
Here are some cool title pages.

PostPosted: Thu Dec 21, 2006 9:24 am  Back to top 
  ProfilePMBlogAlbum
stevem
Navier-Stokes Equations
Navier-Stokes Equations

Offline
Joined: 25 Apr 2004
Posts: 2194
Location: Dorset, UK

To rate posts you must be logged in
#15
There's some stunning stuff at The TeX showcase

PostPosted: Thu Dec 21, 2006 9:41 am  Back to top 
  ProfilePMWWW
chess64
Birch & Swinnerton Dyer
Birch & Swinnerton Dyer


Offline
Joined: 20 Feb 2005
Posts: 4872
PakistanUnited States

To rate posts you must be logged in
#16
Anyone know how to \renewcommand{\today} so that you can get a date like 21.12.2006?

Edit: \renewcommand{\today}{\number\day.\number\month.\number\year}

PostPosted: Thu Dec 21, 2006 10:14 am  Back to top 
  ProfilePMBlogAlbum
n0vad3m0n
Navier-Stokes Equations
Navier-Stokes Equations


Offline
Joined: 13 Oct 2006
Posts: 2236
Location: Maryland
Taiwan, Province of ChinaUnited States

To rate posts you must be logged in
#17
i_like_pie wrote:
\setlength{\unitlength}{.5cm}\begin{picture}(2,2) \qbezier(2,1)(2,2)(1,2) \qbezier(1,2)(0,2)(0,1) \qbezier(0,1)(0,0)(1,0) \qb...

Code:
$\setlength{\unitlength}{.5cm}\begin{picture}(2,2) \qbezier(2,1)(2,2)(1,2) \qbezier(1,2)(0,2)(0,1) \qbezier(0,1)(0,0)(1,0) \qbezier(1,0)(2,0)(2,1) \end{picture}$


\setlength{\unitlength}{.5cm}\begin{picture}(5,4) \put(.5,.5){\line(5,0){5}}\put(.5,.5){\line(0,3){3}}\put(.5,3.5){\line(5,-3...

Code:
$\setlength{\unitlength}{.5cm}\begin{picture}(5,4) \put(.5,.5){\line(5,0){5}} \put(.5,.5){\line(0,3){3}} \put(.5,3.5){\line(5,-3){5}} \put(1,.5){\line(0,1){0.5}} \put(.5,1){\line(1,0){0.5}} \put(-.1,3.5){A} \put(-.1,0){B} \put(5.5,0){C} \put(2.75,0){a} \put(3,2.1){b}  \put(0,1.75){c} \end{picture}$


Should I do some complicated stuff?




yeah for trig questions put angle degrees and stuff like that in Ninja
_________________
~[柯俊榕] Henry Ko I don't care

PostPosted: Thu Dec 21, 2006 5:01 pm  Back to top 
  ProfilePMAIMBlogAlbum
Valentin Vornicu
Admin
Admin


Offline
Joined: 03 Feb 2003
Posts: 7080
Location: California, US
RomaniaUnited States

To rate posts you must be logged in
#18
I do hope that we'll soon have available on the server Asymptote.
_________________
We all use math everyday: to forecast weather, to tell time, to handle money; we also use math to analyze crime, reveal patterns, predict behavior. Using numbers we can solve the biggest mysteries we know.

PostPosted: Sun Apr 15, 2007 7:29 pm  Back to top 
  ProfilePMBlogAlbum
h.lam
New Member
New Member

Offline
Joined: 14 Sep 2008
Posts: 16
Hong KongAustralia

To rate posts you must be logged in
#19
Image

Uses pstricks, pst-math, pst-eucl.

Code:

\def\Func{x 3 exp x 2 exp -3 mul add x -9 mul add 1 add}
\psset{yunit=0.12cm,xunit=0.71cm}
\begin{pspicture}(-3,-30)(7,14)
\psaxes[arrows=->,ticks=none,labels=none](0,0)(-3,-30)(6,10)
\psplot[linewidth=1.15pt,linecolor=blue!50,arrows=<->]{-3}{5}{\Func}
\psyTick(-26){$-26$}
\psyTick(-10){$-10$}
\psyTick(6){}   \uput{1.5\pslabelsep}[0](0,6){$6$}
\psxTick(3){}   \uput{1.5\pslabelsep}[90](3,0){$3$}
\psxTick(-1){$-1$}
\psxTick(1){}   \uput{1.5\pslabelsep}[90](1,0){$1$}
\multido{\iA=-1+2}{3}{
    \pnode(!\iA\space /x \iA\space def \Func){A\iA}
    \psline[linecolor=gray,linestyle=dashed,dash=1mm 0.75mm](A\iA|0,0)(A\iA)(0,0|A\iA)
}
\psdot[dotstyle=|,dotangle=45,dotscale=3](A1)
\uput{\pslabelsep}[120](!5 /x 5 def \Func){$y = x^3 - 3x^2 - 9x + 1$}
\uput{6.5\psxunit}[0](0,0){$x$}
\uput{12\psyunit}[90](0,0){$y$}
\end{pspicture}


PostPosted: Sun Sep 14, 2008 3:53 am  Back to top 
  ProfilePM
h.lam
New Member
New Member

Offline
Joined: 14 Sep 2008
Posts: 16
Hong KongAustralia

To rate posts you must be logged in
#20
Here is a Table of Variations -- uses the package "tableau" by N. Kisselhoff (http://melusine.eu.org/syracuse/exemples/tarass/tableau/). Under CTAN its name is "tableaux"

The package is a PSTricks implementation of the vast array of packages written to draw these tables. Unfortunately the documentation is written in French, and to learn this package I had to spend most of my Saturday translating it back to English using Google Translate Blush Blush Blush I hope to submit an English doc within this year -- I think so far this is the best package to draw these tables without having to resort to MetaPost (for somebody who has no more time to learn a new language!)

Image

Code:

\setlength{\TabTitreL}{0.8cm}
\begin{MonTableau}{3}{5}{0.8}
\TabTitreFerme \TabEfface{2}
\TabFerme
\TabNewCol{0}
    \rTabPut{Bc}{-0.4}{0.4}{$x$}
    \rTabPut{Bc}{-0.4}{0.5}{$\frac{dy}{dx}$}
    \rTabPut{Bc}{-0.4}{0}{$y$}
\TabNewCol{0}
    \rTabPut{Bc}{0}{0}{}
    \rTabPut{Bc}{0}{0}{}
    \rTabPut{Bc}{0}{0}{}
    \rTabPut{Bl}{0.05}{0.2}{$-\infty$}
\TabNewCol{0.166}
    \rTabPut{Bc}{0}{0}{}
    \rTabPut{Bc}{0}{0.5}{$+$}
\TabNewCol{0.333}
    \rTabPut{Bc}{0}{0.4}{$-1$}
    \rTabPut[2]{Bc}{0}{0.5}{\TabZ}
    \rTabPut{Bc}{0}{0.3}{$4$}
    \TabFleche{B3}{D2}
\TabNewCol{0.5}
    \rTabPut{Bc}{0}{0}{}
    \rTabPut{Bc}{0}{0.5}{$-$}
\TabNewCol{0.667}
    \rTabPut{Bc}{0}{0.4}{$2$}
    \rTabPut[2]{Bc}{0}{0.5}{\TabZ}
    \rTabPut{Bc}{0}{-0.6}{$-11$}
    \TabFleche{D2}{F2}
\TabNewCol{0.833}
    \rTabPut{Bc}{0}{0}{}
    \rTabPut{Bc}{0}{0.5}{$-$}
\TabNewCol{0.99}
    \rTabPut{Bc}{0}{0.4}{}
    \rTabPut{Bc}{0}{0.5}{}
    \rTabPut{Bc}{-0.2}{0.75}{$\infty$}
    \TabFleche{F2}{H2}
\end{MonTableau}


PostPosted: Sat Oct 04, 2008 10:51 pm  Back to top 
  ProfilePM
Display posts from previous:   Sort by:   
22 Posts • Page 1 of 2 • 1, 2 Next
Post new topic   Reply to topic View previous topicView next topic
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum
You cannot post calendar events in this forum


© Copyright 2008 AoPS Incorporated. All Rights Reserved. • FoundationPrivacyContact Us