Compiling Latex files to PDF on Linux/Ubuntu

12,473 views
Skip to first unread message

James & Nash

unread,
Jan 7, 2009, 11:53:28 AM1/7/09
to latexus...@googlegroups.com
Hi all,

Does anyone know how I would go about compiling my Latex files under Linux
please, specifically ubuntu. I would if possible like to do this via the
Command Line.

Thank you

James

damian

unread,
Jan 7, 2009, 3:06:14 PM1/7/09
to latexus...@googlegroups.com
Hi James,

I'm not an Ubuntu user, but installing texlive should suffice. Look at
this forum:
http://ubuntuforums.org/showthread.php?t=302415

Apparently there even is a full version of texlive with all the
packages you may need. Although probably the base installation will
work for you.

Once you have installed texlive, you should be able to run
latex somefile.tex

HTH.

James & Nash

unread,
Jan 7, 2009, 3:41:32 PM1/7/09
to latexus...@googlegroups.com
Hi Damian,

Thank you for this. I will check it out.

James

Jon Callas

unread,
Jan 7, 2009, 4:57:58 PM1/7/09
to latexus...@googlegroups.com
On Jan 7, 2009, at 8:53 AM, James & Nash wrote:

Hi all,

Does anyone know how I would go about compiling my Latex files  under Linux
please, specifically ubuntu. I would if possible like to do this via the
Command Line.

Yes.

I'm a Mac person, but on the Mac it's still done through the command line, even in TeXShop (it just forks off a command line command). Also, the Mac also uses texlive, so the core will be identical.

If you want to produce good PDF, here are some guidelines:

* You want to use "pdflatex" to generate them, as opposed to going through a dvi file.

* You want to make sure the "CM Super" fonts are available. If you don't, it'll look like crap either on the screen or in print. The easiest way to deal with this is just to know that if things look like crap, you need the CM Super fonts. I think texlive installs them correctly.

* Your illustrations should be in jpeg, png, or pdf. It's often just fine to use things that are close to pdf like eps or mps. But if you run into problems, retreat back to those three. There are often tools that will do this, you just have to know that they exist. For example, I once had problems with some mps files and learned that there's an "mptopdf" program that will convert an mp/mps to pdf (duh). Similarly, there are pstopdf for postscript and epstopdf to convert an eps to a pdf.

* A corollary to the above is that you're going to see a lot of existing TeX that uses \epsgraphics or something like it, and you just want to use \includegraphics. A problem I have had when I collaborate is that some people will use a tool that will generate an illustration and give it a file name like "foobar.10" and you will need to rename it to "foobar-10.mps" because (I think) \includegraphics requires the proper file type and determines the file type by scanning *forward* to a dot, not backwards. Sigh.

In any event, you can fix your picture-related head-scratchers by picking the right format and making sure you're braindead simple on the file names.

Jon

James & Nash

unread,
Jan 8, 2009, 3:18:08 AM1/8/09
to latexus...@googlegroups.com
Hi Jon,
 
Could you give me instructions on using the CM Super fonts please. I am blind, so i am unable to see the screen at all.
 
Thank you for all your help
 
James
----- Original Message -----
From: Jon Callas
Sent: Wednesday, January 07, 2009 9:57 PM
Subject: Re: Compiling Latex files to PDF on Linux/Ubuntu

James & Nash

unread,
Jan 8, 2009, 3:23:38 AM1/8/09
to latexus...@googlegroups.com
        I have also used a Mac before, in fact I have a first gen Madcbook, but I have found that the level of accessibility that Apple have added thus far while it is a great leap forward is not enough for what I need.
 
But still I like Mac OS X a very good OS isn't it a Unix/Linux based OS? The only resaon I ask is because the terminal commands seem the same. Do you use Latex + filename to generate PDFs of your latex files?
 
Also TexShop is very good. I really liked it.
Thanks
 
James
----- Original Message -----
From: Jon Callas
Sent: Wednesday, January 07, 2009 9:57 PM
Subject: Re: Compiling Latex files to PDF on Linux/Ubuntu

Dr. B. Siva Selvan

unread,
Jan 8, 2009, 3:28:19 AM1/8/09
to latexus...@googlegroups.com
hi
is latex installed? try latex or pdflatex on command line. if it gets back with command not found then its not installed and u ll have to install from the installation cds. if it is installed,
to compile the latex file it is
$latex filename.tex ($  - command prompt)
$dvipdf filename.dvi filename.pdf
 
also $pdflatex filename.tex directly produces the .pdf output. hope this clarifies.
 
regards
sivaselvan

 
--
Dr. B. SIVA SELVAN Ph.D
Assistant Professor
Indian Institute of Information Technology,
Design & Manufacturing
IIITD&M, Kancheepuram
IIT Madras Campus,
Chennai-36

James & Nash

unread,
Jan 8, 2009, 8:21:32 AM1/8/09
to latexus...@googlegroups.com
Hello sivaselvan,
Yes it does tahnk you
 
James
----- Original Message -----
Sent: Thursday, January 08, 2009 8:28 AM
Subject: Re: Compiling Latex files to PDF on Linux/Ubuntu

James & Nash

unread,
Jan 8, 2009, 1:16:38 PM1/8/09
to latexus...@googlegroups.com
Hi list,
 
I know that when I was using Mac OS X, I could have my .tex files anywhere on the system or in my case in folders - I like my PC to be organized :). Anywya, when I tried this on Linux it came back with an Undefined control sequence, but it didn't tell me what the error was, although I suspect that it was my use of:
 
\usepackage[t1]{fontenc} as I did not know what to write after this point. I tried \usepackage{times} and then removed it as it didn't work either way.
 
I used pdflatex file_name.tex to complie straight from source to PDF
 
Thanks for any help you can give
 
James

jon

unread,
Jan 9, 2009, 12:06:39 AM1/9/09
to LaTeX Users Group
On Jan 8, 3:18 am, "James & Nash" <james.austin1...@googlemail.com>
wrote:
> Hi Jon,
>
> Could you give me instructions on using the CM Super fonts please. I am blind, so i am unable to see the screen at all.

to install cm super from the command line, use:

sudo apt-get install cm-super

(there is also cm-super-minimal, but i'm not sure how minimal that
is.)

there is also cm-super-x11, which, conversely, allows you to use cm
fonts with other applications like openoffice.

i think if you have texlive-latex-recommended installed, cm-super is
installed by default, but i'm not sure.

cheers,
jon.

ps. as suggested, pdflatex somefile.tex should work fine if you've
texlive installed (or even tetex, if you've an old system).

christian_yale

unread,
Jan 14, 2009, 2:11:06 PM1/14/09
to LaTeX Users Group
in ubuntu, as in any linux distribution, you can also use Emacs+auctex
in order to compile and edit latex files.
Reply all
Reply to author
Forward
0 new messages