Help

Revision 19 as of 2010-01-05 14:12:47

Clear message

Ubuntu Manual Technical Help

How to use LaTeX

The main LaTeX package you need to install is called texlive-full. This should install all the required LaTeX packages.

A LaTeX file is essentially a plain text file with a few commands added in. The way our latex files are set up, there is a master latex file in the root directory of the ubuntu-manual called main.tex. In that file a whole bunch of things are defined and just generally set up for you. Don't touch any of that stuff as it might break something. Later on in the document it includes 10 files, one for each chapter. These are located at chapter1/chapter1.tex, chapter2/chapter2.tex, etc. Those are the files that you should be editing.

To build the PDF, run

make

in the top level directory of the source. This will build a main.dvi file, a main.ps file and a main.pdf file.

To build the PDF and open it in a PDF viewer, run

make show

This will generate a lot of other files; these are included in the .bzrignore file and are best to leave in place to avoid having to build from scratch every time. They are analogous to the .o files produced when compiling C. If you do want to get rid of all generated files, run:

make clean

It's recommended to run "make clean" before syncing with the branch, either pushing or pulling.

Basics of Latex

Latex is pretty much a programming in itself and can be extended to do a lot of things, but to write basic documentation, you only need to know a few things. To edit Latex files you only need a text editor, but there are graphical editors such as lyx.

Latex Structure

Latex, for our purposes uses sections to define the structure. There are three main section types, sections, subsections, and subsubsections. All of them are created by typing a line such as

 \section{Title of Section} 

That can be  \section ,  \subsection  or  \subsubsection  You can go ahead and play around with that to see what they do. Section should only be used to start chapters, subsection and subsubsection can (and should) be used to separate up your writing. The best part of Latex is that it will create the Table of Contents with the various section and subsection headings for you!

Fonts and Text

If there is any text you don't want to show up in the actual document, but want for commenting purposes preface it with the % character. For example %This is a comment

The font is automatically set to helvetica 10 pt font, but it is possible that you would want to change the font, add italics or bold. Below is a table of things you can do

Italic

\textit{words in italics}

Slanted

\textsl{words in slanted}

Small Capitals

\textsc{words in small capitals}

Bold

\textbf{words in bold}

Lists

There are two main forms of lists, numbered and bulleted. To create a bulleted list type:

\begin{itemize}
\item Text of item number 1
\end{itemize}

For a numbered list type:

\begin{enumerate}
\item Text of item number 1
\end{enumerate}

Of course you can have as many \items as you would like as long as they are in between the \begin and \end. Last, you can have multiple layers of lists so if you wanted for example this:

  • Item 1
    • Item 2

You would type (the indents are just to make it easier to read):

\begin{itemize}
  \item Item 1
  \begin{itemize}
    \item Item 2
  \end{itemize}
\end{itemize}

I will be adding ability to include screenshots soon to the latex template, if you have any questions find jmburgess on IRC or email me at joemburgess@gmail.com

See https://help.ubuntu.com/community/LaTeX or http://www.andy-roberts.net/misc/latex/ for more info.

There's actually an awesome LaTeX documentation page here: http://en.wikibooks.org/wiki/LaTeX/

Section on LaTeX written by Joe Burgess.

Using bzr

First, you'll need to make sure you have a Launchpad account, are a member of the Project and the Team, and also have registered an SSH key for your computer.

bzr, or Bazaar is the system we use to push and pull branches. It is pretty intelligent and can see what changes have been made. Here's how to use it:

Open up a new Terminal.

Install bzr:

sudo apt-get install bzr

Tell bzr your name and email address:

bzr whoami "Joe Bloggs <bloggs@example.com>"

Get the bzr branch:

bzr branch lp:ubuntu-manual <optional directory to save in, else ./ubuntu-manual>

Add the files to bzr:

bzr add

That should add all files in your working directory to bzr.

Now you need to see the differences (there will be none if you have got the branch for the first time):

bzr diff

Then commit it:

bzr commit -m "What you've changed"

So for example:

bzr commit -m "Fixed some spelling mistakes in chapter 6"

After it has said "committed revision X" you should be able to push it through to main:

bzr push lp:ubuntu-manual

Now go to Launchpad and check that it has indeed been pushed up to the next revision.

To get each new revision if someone else has made changes, then just use:

bzr pull lp:ubuntu-manual

Remember all bzr commands must be in the root directory of ubuntu-manual, where your branch is registered.

If you have created a new folder or new files (ie, not edited an existing one) then you will need to run

bzr add

again to add these new files/folders to the bzr branch, then you'll need to run bzr diff to check they've been added, and then the commit line shown above. Then finally push it through, once you've made sure no one else has pushed through something in the few minutes since you last checked!

How to make changes

  • Firstly, make sure you have the latest revision by going here

  • Run bzr diff when you've got the latest revision, to see what changes someone else has made
  • Make your own changes
  • Run bzr diff again to confirm them
  • Commit them with a good description. Not word-for-word changes, but specific enough for someone to easily find again
  • Push them through to main, and then check the Launchpad page to see it's gone up to the next revision.

Translations

Currently we have no infastructure in place to handle translations - LaTeX doesn't play nice with the Launchpad rosetta system, so we have to figure out another way to support translations - possibly using separate branches.

Another problem we have is that LaTeX doesn't have good UTF-8 support, so it's very hard for special characters such as in the Arabic and Chinese languages to be used under LaTeX.

We are thinking of possibly leaving translations until after the alpha release.

For the meantime, if you are interested in translating then by all means get the latest branch through bzr and start translating the first few chapters into a plain text file. That way, when we do get the necessary infrastructure in place, it will be easy to just transfer what you've done - and it will give you something to do in the meantime.