Work
From ILabWiki
This section covers help for users in using the shared work SVN mechanism at iLab.
| Table of contents |
Shared Work Repository: your papers
iLab.usc.edu runs an SVN repository which is dedicated to shared work. Typical uses are for writing papers with several co-authors, writing reports, possibly creating figures. The repository is setup so that any authorized user (full-time iLab PhD students and above) can checkout a local copy of any part of the repository. So be careful not to include confidential or sensitive information in here.
- Please follow this basic structure:
trunk/<username>/papers/<200x_Journal>/paper.tex
for example,
trunk/itti/papers/2007_Scholarpedia/paper.tex
- Please use LaTeX as much as possible.
- Please name your main file paper.tex. There is no need to give it a unique name since it is in a uniquely-named directory already. This will just simplify it for others to find your main tex file for that paper.
- Please only add the following to the SVN repository:
.tex (LaTeX source files) .bib (bibliography databases) .bst (bibliography styles) .sty (style files) .cls (style/macro files) .ai or .eps or .png or .fig (Commit ONE format only for each figure file) Makefile (if your build process is complicated)
- DO NOT svn add the following files:
.dvi (The compiled paper; people can generate it any time they want by just running LaTeX) .ps (The compiled paper; people can generate it any time they want by just running LaTeX) .pdf (Idem, can be recreated) .tar (Don't store archives of stuff here, just papers) Several formats for a given figure (e.g., both .ai and .eps) as this will get confusing. Anything else that is the output of running some program.
Think of your papers being made of a bunch of source files (.tex and such) which then you will compile (by running LaTeX) and how in our source code repository we only store the source files, but not the compiled executables, because those executables can be re-created by each user on his/her own machine.
Here is a simple cleanup script that will delete intermediary files generated by LaTeX (put this in your .bashrc, then open a new shell and just type 'clean'):
alias clean='/bin/rm *~ *% *.log *.aux *.dvi *.bak *.bbl *.blg *.lof *.lot *.toc'
The only thing that you will then additionally need to remove is the .ps and possibly .pdf of your paper, and you will be doen to a clean directory ready to be added to the SVN repository.
- Figures: if possible name your figures FIGxxxx.ai, so that when people list the files they clearly see all figures grouped together.
- Think carefully before adding files and remember that files can never be deleted from the repository. So if you just add by mistake a 2GB junk file (like a .pdf or a .dvi or whatever data), then even if you svn remove it a few minutes later, that 2GB of disk space will be wasted forever on the server, and will slow everybody down by making the database accesses slower, etc.
Checking out
To get a local copy of your own directory in the repository, just do
svn co svn://ilab.usc.edu:3691/trunk/<yourname>/<whatyouwant>
For example, here is how I get a copy of my papers:
cd svn co svn://ilab.usc.edu:3691/trunk/itti/papers
so that the papers are in ~/papers/
Ask Laurent for which password to use.
Creating entries
If you are a new user and you do not yet have a directory in your name in the repository, you will need to ask Laurent to create a password for you, and then he will do (listed here just for sysadmin purposes, normal users should not typically do that):
su -l <user> svn co svn://ilab.usc.edu:3691/trunk # (needs lots of disk space and time) cd trunk mkdir <user> mkdir <user>/papers mkdir <user>/whateverelse svn add <user> svn commit -m"created <user>" <user>
Adding new papers
Once you have checked out a copy of your own repository as explained in 'Checking Out,' you can just use mkdir, svn add, and so on in there, and then svn commit your changes.
Getting a co-author's paper
Here is how you would check out someone else's paper so that you can view it and edit it in a collaborative manner:
cd mkdir collaborations cd collaborations svn co svn://ilab.usc.edu:3691/trunk/<coauthor>/papers/<200x_Journal>
Usually, your co-author will tell you what the exact svn:// URL should be.
Once you have your checked-out copy, you can edit the paper and commit your changes.
Adding new 'root-level' directories
Ask laurent to add directories at the root level (like bibliography/ described below), don't do that yourself.
If you want another directory under your own name's folder, however, you can try to do that yourself as follows, or ask Laurent for assistance. For example, let's say that user Lior wants to share some of his cool perl scripts with everyone (again, don't share big files here or things that don't need to be under revision control, like image databases or data; use the iLab Raid for that instead):
cd mkdir junk cd junk svn co svn://ilab.usc.edu:3691/trunk/lior cd lior mkdir perlscripts svn add perlscripts svn commit -m"created repository for perl scripts" cd rm -rf junk svn co svn://ilab.usc.edu:3691/trunk/lior/perlscripts
So now Lior has a new directory that is under SVN control called ~/perlscripts; he can copy his scripts in there and then svn add and svn commit them.
Shared bibliography
A directory in the repository called trunk/bibliography contains shared BibTeX files.
To get your copy, just do:
cd svn co svn://ilab.usc.edu:3691/trunk/bibliography
and you will have the files in ~/bibliography
To use these, just do this in your LaTeX files:
\bibliography{../../bibliography/master}
assuming that you have checked out your papers into ~/papers as explained above.
Please consider the following:
- Feel free to add more entries into master.bib which you think will be useful for several papers and/or several people. Make sure those entries are completely clean, though, so that other lab members don't get disappointed when they try to also rely on them. Typically, that means that you should get your entries using med2bib (http://ilab.usc.edu/bibTOhtml) and make sure you follow the entry naming conventions explained on the med2bib web page. med2bib is installed in:
/lab/local/bin/med2bib
along with the medref and medkey scripts.
- You can also create additional bib files which may contain references you will will not be of general use, then just place those files in the directory of your paper.
- You can also create additional shared bib files, for example organized by theme, then put them in the shared bibliography directory.
Web Interface
You can browse the repository and look at various versions of the files through this web interface:
http://ilab.usc.edu/cgi-bin/secure2/viewcvs.cgi
You do not need a password if accessing it from inside the lab. For outside access, ask Laurent for what username and password to use.
