[prev in list] [next in list] [prev in thread] [next in thread] 

List:       darcs-users
Subject:    Re: [darcs-users] Shared files
From:       David Roundy <droundy () abridgegame ! org>
Date:       2004-07-08 15:02:43
Message-ID: 20040708150243.GC7772 () abridgegame ! org
[Download RAW message or body]

On Thu, Jul 08, 2004 at 12:29:03PM +0200, Ketil Malde wrote:
> 
> I find that I have files that are shared by projects.  E.g. I have
> multiple LaTeX documents that share a BibTeX file - more or less.  The
> question is: what is the recommended way to organize this?

Mostly I agree with Lele's comments, but figured I'd add a bit more.

> I would like to be able to share the .bib file, so that when I start a
> new project, I can reuse old stuff.  I tried having it as a separate
> project, and just symlinking to it, but the disadvantage is that
> changes to it doesn't get recorded along with corresponding changes to
> the .tex file.

With darcs you either have to share the file manually (as you've been
doing) or you have to record changes to the .bib file separately from the
changes to the .tex file.  You could somewhat alleviate the pain of this by
making the changes to the .tex file depend on the changes to the bib file
(--ask-deps).

> I'm thinking of having the .bib project be the parent of the .tex
> projects, but can I, in an easy way, avoid inadvertently pushing .tex
> changes to the .bib project?  What if I need another such auxilliary
> file? 

This is how I'd do things--that is, having a .bib repository which you pull
from into all your .tex projects.  Hard to do in an easy way.  On the other
hand, if you end up accidentally sticking .tex files in the .bib repo, you
can always unpull them back out again.

I'd probably create the .bib repo with the .bib file either stupidly named
(the_universal_bib_file.bib) or in a uniquely named directory
(my_auxiliary_stuff/paper.bib), to avoid the chance of an accidental
conflict with other files in .tex repos (e.g. if you or a coworker created
a "paper.bib" file and added it to the repo before pulling the standard
bib.  Then you could rename it in each tex repo.

Multiple auxiliary files could either be done in a single repo, or by
having one repo for each (if they aren't really closely related).

You'd have to be careful never to record a change to the bib file and a tex
file together, or such a change couldn't be pulled in to the bib repo
without pulling all earlier changes to that tex file.  So I'd always do a

darcs record -a paper.bib

before recording any other changes.

As a caveat, I've never tried this sort of trick myself, since I haven't
ever had this sort of a situation.  If I did, it would be with a .bib file
and repositories for papers, but my experience with bibtex is recent enough
and my research subjects are varied enough that I haven't really gotten a
good comprehensive bib file going.
-- 
David Roundy
http://www.abridgegame.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic