Using bzr with LaTeX
Ramon Diaz-Uriarte
rdiaz02 at gmail.com
Fri Dec 15 00:08:00 GMT 2006
On 12/14/06, John Arbash Meinel <john at arbash-meinel.com> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Wouter van Heyst wrote:
> > On Wed, Dec 13, 2006 at 05:35:38PM -0600, John Arbash Meinel wrote:
> >> t u wrote:
> >>> Hi,
> >>>
> >>> I am brand new to both LaTeX and bzr and it's kinda hard to learn both
> >>> at the same time.
But both are really worth it! And "at the same time" should not mean
"during the very same minute".
> >>>
> >>> I was wondering whether you have any pointers for tips and tricks on
> >>> using bzr along with LaTeX for people who write articles (instead of code).
> >>>
> >>> Any pointer you could think of (except from http://bazaar-vcs.org/ -I
> >>> checked that out) would do.
> >>>
> >>> What I am looking for is ways to efficiently use bzr to track changes to
> >>> a sociology article I'm writing in LaTeX.
> >>>
> >>> Thanks a lot :)
> >>>
> >>> PS. please CC me on your replies, I am not subscribed. Also, please do
> >>> not "snip" this part of the email in your replies. Thanks.
> >> There isn't a whole lot that you need to do to get bzr and LaTeX to work
> >> together nicely.
> >>
> >> The biggest thing that I've run run into when using bzr + LaTeX is that
> >> you want to try to break your paragraphs up a little bit more than you
> >> might otherwise.
> >
> > The only thing that comes to mind for LaTeX specifically is to be sure
> > to ignore the generated files it produces. But as soon as you understand
> > `bzr ignore *.log` the learning curve is done again.
> >
I often ignore a bunch of other files that are intermediate
by-products. *.log, *.aux, and the *.dvi, *.ps, *.pdf (since ---except
for rare cases--- I can recreate the dvi, ps, and pdf from the
original latex, I just ignore them). Its like code: the, say, *.c file
is what you'll edit. The *.so or *.o, well, those you don't want
versioned because they'll get recreated whenever you compile (in your
case, whenever you do the latex, dvips or dvipdf or pdflatex, or
whatever).
If you have bibliography (and you mention writing papers, so I guess
you do), you probably want to keep you *.bib under bzr's control, as
well as your *.sty (if you hand-craft them). However, unless you need
to modify your bbl by hand, the bbl files can also be excluded from
versioning.
What I often do is just add (bzr add) the files I specifically want
(e.g., the *.tex and *.bib, figures if there are some, etc). However,
having a .bzrignore file (with the caveats mentioned) might be simpler
(no need to filter usless stuff when you do "bzr status").
Figures are an interesting part: I often use eps figures. But rarely I
do any editing of those. So if I keep them under version control is to
make my life simpler. Although, in purity, for the eps all I'd need to
keep under version control would be whatever code I used to generate
the figure, if I were to do this, it would be a big pain to, say, get
to work and just run "latex", because the eps would be missing. But,
of course, if you keep fig1.eps under bzr, and later change fig1.eps,
and you look at the diffs... well, they are unlikely to be very
helpful. So of course keep the source to create the figures under bzr
too.
A few final comments to preach the choir: a) using bzr for papers has
been _great_ for my working habits because I no longer keep extremely
long tex files filled with "%%" (comments) of things from previous
writings because of the "just in case": if the file was under bzr, and
that revision was saved, I can always recover it if I want, so I can
delete long chuncks of commented out text. b) bzr makes collaboration
very simple; it is as simple as saying "I worked on the paper last
night; grab my latest changes from the repository"; c) being bzr
distributed I can, say, edit and work while commuting, keeping all the
history in my laptop, and then sync with my coauthors' changes when I
get to work.
Best,
R.
> > Wouter van Heyst
>
> Well, and distinguishing that from 'bzr ignore "*.log'.
>
> bzr ignore *.log
> is expanded by the shell, and will ignore whatever specific files exist
> right now.
>
> bzr ignore "*.log"
> gets recorded as a wildcard ignore, and will ignore any future .log
> files. (As well as .log files in subdirectories).
>
> John
> =:->
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.3 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFFgKqzJdeBCYSNAAMRAhD4AJ9OJcaLe145kaAhuG5JGL6F3UJ9zQCgp0W+
> euVBTvUbP6VddCw3Cxvt9UU=
> =J5a7
> -----END PGP SIGNATURE-----
>
>
--
Ramon Diaz-Uriarte
Statistical Computing Team
Structural Biology and Biocomputing Programme
Spanish National Cancer Centre (CNIO)
http://ligarto.org/rdiaz
More information about the bazaar
mailing list