Community

Want to learn how to tackle those tough AMC/AIME/Olympiad algebra problems? Check out Art of Problem Solving's Intermediate Algebra by Richard Rusczyk and Mathew Crawford. Over 1600 problems!
Login Register Memberlist Search AoPS Blogs Contests Galleries Forum Index
The time now is Mon Nov 23, 2009 11:30 pm
All times are UTC - 8
View posts since last visit
View unanswered posts
Ultimate guide to inserting Pictures in LaTeX
Moderators: fedja, stevem
Post new topic   Reply to topic View previous topicView next topic
23 Posts • Page 1 of 2 • 1, 2 Next
Author Message
Rushil
Navier-Stokes Equations
Navier-Stokes Equations


Offline
Joined: 24 Jun 2005
Posts: 1608
India

To rate posts you must be logged in
#1
 Ultimate guide to inserting Pictures in LaTeX

Making Pictures and Inserting them in Latex
Since a no. of queries have been asked on the topic of adding pictures in Latex, I am posting a topic which lists different programs and methods for inserting different files into Latex. My methods and programs are based on the use of Miktex and Texniccenter in Windows. So I do not know if these will work on your system and software. Please post your queries for your particular system.
Some general documents on inserting images in Latex are available at
1) http://www.artofproblemsolving.com/LaTeX/AoPS_L_PictHow.php
2)http://amath.colorado.edu/documentation/LaTeX/reference/figures.html#pdf
3)http://www.haptonstahl.org/latex/use_insertinggraphics.html
4)http://people.uncw.edu/hermanr/LaTeX/latex.htm


MetaFont

The original creation of the legendary Donald Knuth. It is a command based system rather than a point-and-click program. That is, Metafont is WYWIWYG and NOT WYSIWYG. Through people's recommendations etc, it appears Metafont is very useful for making excellent diagrams though it is a bit tedious. The only problem is that Metafont generates .mf files which are quite difficult to include in Latex. AT least I'm not aware of a simple method.
If you download Miktex, Metafont comes bundled with it. You will find (in the default case) the mf.exe program in C:\texmf\miktex\bin\ A userguide is available at metafont.tutorial.free.fr/. Donald Knuth's book "MetaFont" is available in non-compilable Tex format at www.ctan.org/tex-archive/systems/knuth/mf/mfbook.tex

MetaPost

The problem of inclusion of the excellent metafont files into Latex is solved by Metapost which has the same functionality and method of input as Metafont ; but it produces Postscript files instead of .mf files. These .eps files can then easily be integrated into Latex.
Download available at www.ctan.org/tex-archive/graphics/metapost/
A windows based writer(as compared to a DOS based converter available above) is MPedit available at www.ctan.org/tex-archive/graphics/metapost/contrib/tools/MPEdit/
Documentation is at ftp://ibiblio.org/pub/packages/TeX/graphics/metapost/mpman.pdf


WinGCLC

This is an excellent program. It is not point-and-click but based on commands. However, it doesn't have the functionality of Metapost or Metafont. Nevertheless, it is useful for beginners and gives excellent results. It has options for analytical geometry as well! It can be easily integrated into latex, This is done by putting the gclc.sty (included in download) in .../texmf/tex/latex/gclc . then just use the \input{filename.pic} command in Latex.
It is available(along with documentation) at www.matf.bg.ac.yu/~janicic/gclc/

KSEG

Another good program for creating simple graphics. Not that many options. Could be useful for maybe Physics related uses. Nevertheless, the ability to manipulate geometry pictures by varying points and lengths of lines by clicking is very useful for understanding. it is WYSIWYG . Has an inbuilt .seg to .png converter that makes files easily added to Latex.
Available at www.mit.edu/~ibaran/kseg.html
Advanced Batch converter(trial -- do you know where I can find the full version of a similar program? ) available at www.batchconverter.com can make .eps files from .png that are even easier to put into LAtex. Otherwise , you can always use Adobe Photoshop

Asymptote
This is another command based program that works on the same principle as Metapost. Good. Available at
asymptote.sourceforge.net/
Documentation at same link as above.

While some of the above programs will serve your purpose, other such programs are PStricks, TPX,Jpicedit, TKPaint....
Most of these are simpler but have less feautures than the above. Of course there are many more and just google to find out. If you have any other recommendations, please post along with the appropriate link. If you think I forgot Geometer's Sketchpad, i did'nt include it for it is expensive, not easily available and it's files are difficult to include into LaTeX.
Last edited by Rushil on Sat Oct 01, 2005 8:13 pm; edited 1 time in total 
PostPosted: Sat Sep 24, 2005 6:14 am  Back to top 
  ProfilePMWWW
Valentin Vornicu
Admin
Admin


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

To rate posts you must be logged in
#2
This looks nice, but can use some improvement. I await suggestions from you folks dealing with these problems ...
_________________
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: Sat Sep 24, 2005 6:17 am  Back to top 
  ProfilePMBlogAlbum
sumyki
New Member
New Member

Offline
Joined: 05 Sep 2005
Posts: 8
India

To rate posts you must be logged in
#3
There are some other programs like InkSpace(open source scalable vector graphic editor) which can convert your drawings to directly .eps format and many other formats like latex file with PSTricks and also to .ps format. This program can be downloaded freely from www.inkspace.org. Other programs of this kind but not freeware are Mayura Draw (I think this is Trailware/Shareware), Xara X1(Trailware).

PostPosted: Fri Sep 30, 2005 10:04 am  Back to top 
  ProfilePM
Rushil
Navier-Stokes Equations
Navier-Stokes Equations


Offline
Joined: 24 Jun 2005
Posts: 1608
India

To rate posts you must be logged in
#4
Your link needs to ne corrected . It is www.inkscape.org/. I think the . at the end caused the trouble.

Also, Inkspace has good conversion capabilities and nice options. However, it is NOT a program fro geometry purposes for it does not have options like \perp etc... Anyways, thanks sumyki!!!

PostPosted: Fri Sep 30, 2005 5:32 pm  Back to top 
  ProfilePMWWW
jmerry
Birch & Swinnerton Dyer
Birch & Swinnerton Dyer


Online
Joined: 12 Jun 2004
Posts: 7454
Location: Seattle
United States

To rate posts you must be logged in
#5
I think you need to fix your link too, Rushil: inkscape \neq inkspace.

PostPosted: Fri Sep 30, 2005 9:00 pm  Back to top 
  ProfilePM
Rushil
Navier-Stokes Equations
Navier-Stokes Equations


Offline
Joined: 24 Jun 2005
Posts: 1608
India

To rate posts you must be logged in
#6
I don't understand. My link is working perfectly!

PostPosted: Fri Sep 30, 2005 9:01 pm  Back to top 
  ProfilePMWWW
jmerry
Birch & Swinnerton Dyer
Birch & Swinnerton Dyer


Online
Joined: 12 Jun 2004
Posts: 7454
Location: Seattle
United States

To rate posts you must be logged in
#7
OK- it's actually that the name is wrong in all mentions except that link.

PostPosted: Fri Sep 30, 2005 9:30 pm  Back to top 
  ProfilePM
sumyki
New Member
New Member

Offline
Joined: 05 Sep 2005
Posts: 8
India

To rate posts you must be logged in
#8
That's Correct Rushil! Sorry for the spelling mistake and for the wrong address i have given. Your URL www.inkscape.org/ is correct.

PostPosted: Sat Oct 01, 2005 10:53 pm  Back to top 
  ProfilePM
sonar
Poincare Conjecture
Poincare Conjecture

Offline
Joined: 06 Aug 2004
Posts: 162
Location: Michigan
India

To rate posts you must be logged in
#9
This is my latest method:

KSEG to draw the picture and to export its image as a pdf file

Adobe Acrobat to crop the pdf.

Done Mr. Green

PostPosted: Sun Oct 02, 2005 2:16 pm  Back to top 
  ProfilePMAIM
Rushil
Navier-Stokes Equations
Navier-Stokes Equations


Offline
Joined: 24 Jun 2005
Posts: 1608
India

To rate posts you must be logged in
#10
Are you sure KSEG has an export to pdf option?? Where is it???

PostPosted: Sun Oct 02, 2005 4:12 pm  Back to top 
  ProfilePMWWW
zabelman
Navier-Stokes Equations
Navier-Stokes Equations


Offline
Joined: 18 Jan 2004
Posts: 1086
Location: Texas

To rate posts you must be logged in
#11
Rushil wrote:
Are you sure KSEG has an export to pdf option?? Where is it???

I don't think it does, but you can easily print a KSEG picture to a virtual PDF printer (those are free). That's the easiest way to go KSEG-->PDF.
_________________
~Zach Abel

PostPosted: Sun Oct 02, 2005 7:31 pm  Back to top 
  ProfilePMAIM
Valentin Vornicu
Admin
Admin


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

To rate posts you must be logged in
#12
Actually guys the easiest way to go, without installing any additional virtual printers or programs is the following.

PdfTex knows to include .png directly using the graphicx package. So you just put the .png file in the same directory as your .tex file and it will compile nice and easily.

To make a .png file, if you are working in KSEG just draw the picture, print screen, ctrl-v in paint and then save as PNG, and you're done. If you are working with Geometers' Sketchpad then you can actually select the drawing, ctrl-c (to copy it), ctrl-v to dump it into paint, then save as PNG.
_________________
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: Mon Oct 03, 2005 5:05 am  Back to top 
  ProfilePMBlogAlbum
Esteban8231
New Member
New Member

Offline
Joined: 26 Sep 2006
Posts: 12

To rate posts you must be logged in
#13
are pictures implemented in the forum?

PostPosted: Fri Nov 03, 2006 12:27 pm  Back to top 
  ProfilePM
stevem
Navier-Stokes Equations
Navier-Stokes Equations

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

To rate posts you must be logged in
#14
I presume you mean, can you use LaTeX commands to create pictures on the forum? Yes, but provided you don't use any special packages and stick to the picture environment. For example:
\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}}... or \setlength{\unitlength}{2mm}\begin{picture}(30, 20) \linethickness{0.075mm}\multiput(0, 0)(1, 0){31}{\line(0, 1){20}}\multipu...

PostPosted: Fri Nov 03, 2006 2:08 pm  Back to top 
  ProfilePMWWW
besttate
Poincare Conjecture
Poincare Conjecture


Offline
Joined: 06 Feb 2006
Posts: 182
Location: Winnetka, IL
United States

To rate posts you must be logged in
#15
I recommend the geometry program Cinderella (http://cinderella.de/tiki-index.php), which has a free educational version and can export directly to PNG or PDF.
_________________
What is a hot liquid that commutes?
An Abelian Soup! Smile

PostPosted: Thu Nov 09, 2006 12:47 pm  Back to top 
  ProfilePMAlbum
mysmartmouth
Navier-Stokes Equations
Navier-Stokes Equations


Offline
Joined: 16 Jan 2005
Posts: 2144
Location: Columbia, SC
United States

To rate posts you must be logged in
#16
stevem wrote:
I presume you mean, can you use LaTeX commands to create pictures on the forum? Yes, but provided you don't use any special packages and stick to the picture environment. For example:
\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}}... or \setlength{\unitlength}{2mm}\begin{picture}(30, 20) \linethickness{0.075mm}\multiput(0, 0)(1, 0){31}{\line(0, 1){20}}\multipu...


Nice! Is there a tutorial where I can learn how to do that kind of stuff?
_________________
QED

PostPosted: Thu Nov 09, 2006 2:33 pm  Back to top 
  ProfilePMWWWAIMYMMSNBlogAlbum
stevem
Navier-Stokes Equations
Navier-Stokes Equations

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

To rate posts you must be logged in
#17
Chapter 5 of The Not So Short Introduction To Latex2e should help, as would the book Guide to LaTeX by Kopka & Daly.

Also you could use a program like jPicEdt where you draw the diagram and it generates the LaTeX code for you. Useful for when you get stuck.

PostPosted: Thu Nov 09, 2006 3:50 pm  Back to top 
  ProfilePMWWW
mysmartmouth
Navier-Stokes Equations
Navier-Stokes Equations


Offline
Joined: 16 Jan 2005
Posts: 2144
Location: Columbia, SC
United States

To rate posts you must be logged in
#18
I downloaded jPicEdt, and it is the most useful tool I've ever downloaded. I strongly recommend it. It's 100x easier to draw stuff with than Geometer's Sketchpad, and then it converts it into LaTeX that you can stick straight into TexnicCenter. WOW!
_________________
QED

PostPosted: Thu Nov 09, 2006 5:44 pm  Back to top 
  ProfilePMWWWAIMYMMSNBlogAlbum
lphuff
New Member
New Member

Offline
Joined: 31 Jan 2008
Posts: 1

To rate posts you must be logged in
#19
jPicEdt
drawing pictures in Latex

can anyone give me a detailed description of how to use jPicEdt to get the Latex code for a circle. I am a total beginner. I can draw a picture and then get a code, but I can't copy it.... I don't know what to do with it. Furthermore, what packages do I need in my Latex code??? I thank you in advance.

PostPosted: Thu Jan 31, 2008 11:39 am  Back to top 
  ProfilePM
Potla
Yang-Mills Theory
Yang-Mills Theory


Offline
Joined: 27 Nov 2008
Posts: 503
Location: 22°34' N; 88°30'E
India

To rate posts you must be logged in
#20
Problem
asymptote

I have installed the asymptote and the MikTex 2.7 and also the TeXnic Centre. All was fine when suddenly I had to insert a picture, I used the command:
Code:
\usepackage[pdftex]{graphicx}

and inserted the picture inside the document by the command
Code:
\includegraphics{INCIRCLE.png}

and it worked!
But I want to use asymptote in the latex file, ie I don't want to include graphics from outside. So I did the document as follows:
Code:

\documentclass{article}
\usepackage{asymptote}
\begin{document}
\begin{asy}
draw((0,0)--(100,100))
\end{asy}
HI
\end{document}

But the Texnic centre said , "3 errors, 0 bad boxes....." and when I opened the log file it said:
Quote:
! LaTeX Error: File `asymptote.sty' not found.

Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: sty)

Enter file name:
! Emergency stop.
<read *>

l.3 \begin
{document}

*** (cannot \read from terminal in nonstop modes)

Then I copied the file "asymptote.sty" from the Asymptote setup file but pasted it in "miktex\bin" and some other directories , but IT DID NOT WORK. I don't care
Can anyone please help me?

PostPosted: Mon Apr 13, 2009 8:22 pm  Back to top 
  ProfilePMBlog
Display posts from previous:   Sort by:   
23 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