You are not logged in.
Hi guys
Can anybody tell me something about creating LaTeX documents?
Here lies the reader who will never open this book. He is forever dead.
Taking a new step, uttering a new word, is what people fear most. ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.
Offline
Hi, anonimnystefy, what exactly would you like to know? I remember we talked about this once before, last summer, didn't we? What is it that you're looking for? Perhaps I can be of a little more help this time
Offline
Hi Au101
I would like to start with the basics first. I want to start writing something I will need at the end of 12th grade.
Here lies the reader who will never open this book. He is forever dead.
Taking a new step, uttering a new word, is what people fear most. ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.
Offline
Hi,
I use geany + geany-latex plugin . You can find those in ubuntu software repository. Install texlive-latex-base first.
"Believe nothing, no matter where you read it, or who said it, no matter if I have said it, unless it agrees with your own reason and your own common sense" - Buddha?
"Data! Data! Data!" he cried impatiently. "I can't make bricks without clay."
Offline
Hi gAr
That is exacly what a friend of mine td me to do. But that doesn't help to actually do something. I need to know how to use packages and stuff.
Here lies the reader who will never open this book. He is forever dead.
Taking a new step, uttering a new word, is what people fear most. ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.
Offline
Hi anonimnystefy,
Are you telling you want to know how to install packages from repository?
Are you stuck with something?
"Believe nothing, no matter where you read it, or who said it, no matter if I have said it, unless it agrees with your own reason and your own common sense" - Buddha?
"Data! Data! Data!" he cried impatiently. "I can't make bricks without clay."
Offline
Hi
For full details, there is a very good manual here: http://en.wikibooks.org/wiki/LaTeX
If you want to use LaTeX just for doing maths homework or something, you can pick up the commands quite easily and be very happy, but if you want to branch out into writing large documents and day-to-day use, it's important to be prepared to look things up. You can quite easily spend as much time looking up how to typeset something as you can writing it in the first place! For me, this is all part of the fun and I have argued at length that LaTeX really does make life easier, more fun and gives much better results, but it takes time and it won't always work out first time
But, to get you off the ground, first you will need what we call a 'preamble', here you call all of the packages you want to use and set-up your document. Let me give you an example:
\documentclass[12pt]{article}
\pagestyle{plain}
\usepackage[margin=1.8cm]{geometry}
\geometry{a4paper}
\usepackage[parfill]{parskip}
\usepackage{amsmath}
\usepackage{amssymb}
This is a simple preamble that I use.
\documentclass[12pt]{article}
The documentclass is very important. There are plenty to choose from and they include lots of default settings, they define how your chapters, sections, subsections, etc. will look, how your table of contents will look, what will go in your margins, that sort of thing. They also give you the ability to specify various options, such as the font size. In square brackets I have specified 12pt, the default is 10pt. The documentclass is like a sort of template, it comes with all your basic settings thrown in, so you don't have to set it all up yourself. Article is designed for writing small, well, articles, for individual pieces of work. report is an example of a class designed for much bigger projects - such as reports! You may like to try looking out how titles, chapters and sections look in each one.
\pagestyle{plain}
This is just a little bit of set-up, it's not essential, this just specifies my headers and footers. With this option, each page is numbered in the centre at the bottom. empty, for example, would give me completely clear headers and footers.
\usepackage[margin=1.8cm]{geometry}
\geometry{a4paper}
These two, together, specify that I will be using A4 paper, as opposed to letter paper, or A3 paper for example and it sets-up the margins nicely for me. By default, all of the text is put in a small box in the middle and there are very large margins. Note also that this is the first time I have called a package. A package - as you may well already know - provides extra commands, it extends the basic functionality of LaTeX by essentially teaching it new things. We call packages with \usepackage{'nameofpackage'} where 'nameofpackage' is - well - the name of the package. So if you wanted to use package.sty you would write \usepackage{package}. In the []s we can specify various options that may be provided by the package. Package specific details will always be provided in the manual, usually with nice, detailed instructions and examples, but it depends on the manual
\usepackage[parfill]{parskip}
This simply creates a clear line between successive paragraphs, as opposed to indenting new paragraphs without a linebreak.
\usepackage{amsmath}
\usepackage{amssymb}
These two packages give you access to the vast majority of commands for mathematics. amsmath provides most of the normal commands you will need and amssymb is particularly useful as it provides \therefore which produces ∴
Now, you're ready, if you have everything installed, you should be able to try:
\documentclass[12pt]{article}
\pagestyle{plain}
\usepackage[margin=1.8cm]{geometry}
\geometry{a4paper}
\usepackage[parfill]{parskip}
\usepackage{amsmath}
\usepackage{amssymb}
\begin{document}
Hello world! Let's see how we handle mathematics:
$\begin{displaystyle}
e^{x} = \sum^{\infty}_{n=0} \frac{x^{n}}{n!} = 1 + x + \frac{x^{2}}{2!} + \frac{x^{3}}{3!} + \dots \quad \text{ for all } x
\end{displaystyle}$
\end{document}
By the way, am I to gather that you're a linux user?
Last edited by Au101 (2012-07-04 21:51:47)
Offline
That is exactly what I need! Thank you.
Yes, I am a Linux user
Here lies the reader who will never open this book. He is forever dead.
Taking a new step, uttering a new word, is what people fear most. ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.
Offline
Okay, I thought you had trouble compiling the tex files.
Thanks to D.E.Knuth for this awesome typesetting system!
"Believe nothing, no matter where you read it, or who said it, no matter if I have said it, unless it agrees with your own reason and your own common sense" - Buddha?
"Data! Data! Data!" he cried impatiently. "I can't make bricks without clay."
Offline
Yup! I love using it. It is fun.
Here lies the reader who will never open this book. He is forever dead.
Taking a new step, uttering a new word, is what people fear most. ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.
Offline
I prefer to use TeXstudio: http://texstudio.sourceforge.net/ for actual typing of tex document. It has a lot of features and (very important to me) it looks and works very-very similar on both Linux and Windows.
In addition to the Au101's template I also always have the next two commands before \begin{document} and one command after:
\title{My School\\ My Class\\ Homework \#1}
\author{Name \texttt{(email)}}
\begin{document}
\maketitle
And all my homework files have a package:
\usepackage{tikz}
for all graphics needs. The PGF/TikZ is actually a system which consists of a simple drawing engine and a lot of sub-packages built on top of it. Sometimes I feel that PGF/TikZ is as complicated as TeX itself, but it really is fun to use
You can check this website: http://www.texample.net/tikz/examples/ for examples of what can be drawn and how it was done.
Almost always, I also use tablists . It is an addition for standard enumeration environment, which allows to put items into columns. Something like:
\begin{enumerate} % default
\item A
\item B
\end{enumerate}
\begin{tebenum} % from tablists
\item C
\item D
\end{tabenum}
This will produce
1. A
2. B
1. C 2. D
If you need to add pieces of code in some program language (C, Java, Basic, etc ) you can look at the listings package. It generates teletype-like text, with ability to number each line and it can emphasize key-words of the language. It already knows more then 40 languages.
And I would add my thumbs up for: http://en.wikibooks.org/wiki/LaTeX
It will give you the documentation on all "standard" TeX.
For help on packages you have to remember just one command: texdoc <package_name> Use it in the terminal and it will automatically find html/pdf/dvi/anything else which contains documentation for the selected package.
And if you ever forget how to
Offline
You're quite welcome
As far as choice of editor goes, that's really up to you. Personally I run vim from the terminal for most things, unless I want to use unicode in my .tex file - vim doesn't really do unicode - when I use emacs. I could say many things in their favour, but largely, if you've found an editor you like then you may as well stick with it - and learning to use either vim or emacs means learning things on top of the LaTeX! White_Owl's advice is very good too and there are loads and loads of packages out there - there really is very little worth doing that nobody's attempted to write a package for and if you really want to you can have a go at writing one yourself - although, even after all these years, I haven't quite got the hang of that, but then, I haven't devoted too much attention to it. My advice, if you want to do that, would be to invest in Leslie Lamport's book which contains all the instructions for that.
P.S. Nice to hear you're a linux user If nothing else, if you do have trouble with rendering or where to put your packages, I'll be a lot more help than I would be with Windows
Offline
Hi Au101
Ok. I will try writing up a basic document today.
Hi White_Owl
Thank you for the response. I will try out your suggestions.
Here lies the reader who will never open this book. He is forever dead.
Taking a new step, uttering a new word, is what people fear most. ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.
Offline
I don't know much about LaTex or what's the difference btweeen camera ready pdf and normal pdf?But you can try this way anyway, just save your office word to pdf as normal word to pdf conversion. By the way, which office version are you using? As different office versions have different solutions.If office 2010, there is a built-in add-on named Save as PDF/XPS, and you can directly save office to pdf with it; if office 2007, you need to download the add-on from Microsoft then save office to pdf with it; but the add-on doesn't support office 2003, and you have to use another third party software like simpo pdf creator lite.After converting word to pdf, you can try to transfer the pdf to LaTex? Maybe this way is workable. Good luck.
Hi Sharini
MS Office is not available for Linux users.
Here lies the reader who will never open this book. He is forever dead.
Taking a new step, uttering a new word, is what people fear most. ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.
Offline
Hi Sharini,
Thank you for your kind attempt to help, but - although MS Word to LaTeX converters do exist (I believe, I have never tried one and really wouldn't recommend it myself) - it would not be possible to work with a pdf file in this way to the best of my knowledge, I'm afraid.
anonimnystefy - did you have any luck with that basic document?
Offline
Hi Au101
Didn't have much time. I will try it now.
Here lies the reader who will never open this book. He is forever dead.
Taking a new step, uttering a new word, is what people fear most. ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.
Offline
Oh, no no, that's alright - I just thought I'd see how you were getting on
Offline
Hi Au101
It is working!
Here lies the reader who will never open this book. He is forever dead.
Taking a new step, uttering a new word, is what people fear most. ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.
Offline
Glad to hear it
Offline
I will soon start typing a file for my final year on generating functions. I need to check with my prof first, though, to make sure that is a valid topic.
Here lies the reader who will never open this book. He is forever dead.
Taking a new step, uttering a new word, is what people fear most. ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.
Offline
I am not sure the PDF could read your PDF file.But for the word to pdf conversion, you just need to derictly save as PDF format in the MS Word 2007 or above version.
I do not have Word.
Here lies the reader who will never open this book. He is forever dead.
Taking a new step, uttering a new word, is what people fear most. ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.
Offline
Ooooh good luck with that! What level is that for?
Offline
Level? I will need it for the end of 12th grade. There is not so much time left as some tthink. I am starting grade 11 next September.
Here lies the reader who will never open this book. He is forever dead.
Taking a new step, uttering a new word, is what people fear most. ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.
Offline