Editing CommunityData:TeX
From CommunityData
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
In order to write LaTeX documents, there are two main options. The first is to do everything in Overleaf. The second option, which is explained | In order to write LaTeX documents, there are two main options. The first is to do everything in Overleaf. The second option, which is explained in this document, is to install software on your local machine which will compile LaTeX documents. This document explains how to use our lab-created templates. Using other templates may require other steps. | ||
== Installing Dependencies == | |||
=== Debian/Ubuntu Installation Instructions === | |||
First, you'll want to install the following packages: | |||
* rubber | |||
* latexmk | |||
* texlive-latex-recommended | |||
* texlive-latex-extra | |||
* texlive-fonts-extra | |||
* texlive-fonts-recommended | |||
* texlive-bibtex-extra | |||
* moreutils | |||
* gawk | |||
Also, to install Garamond grab and install the font from [http://www.ctan.org/tex-archive/fonts/urw/garamond/ here] through the following complicated process: | |||
* Download the file | |||
* Create ''~/texmf'' if it does not exist yet | |||
* Unzip the file ugm.zip from the garamond.zip file into that ~/texmf/ | |||
* Copy the other font files in the root directory of garamond.zip into ~/texmf/fonts/type1/ | |||
* Run "texhash ~/texmf | |||
Alternatively, if you want to install them system wide and have root credentials, you can also place them in ''/usr/local/share/texmf'' instead. | |||
=== Using MacTeX on OSX === | |||
To install with MacTeX, you need to install the font: | |||
wget http://tug.org/fonts/getnonfreefonts/install-getnonfreefonts | |||
texlua install-getnonfreefonts | |||
sudo getnonfreefonts-sys garamond | |||
== Getting/Installing Templates == | == Getting/Installing Templates == | ||
Line 15: | Line 46: | ||
This code includes a bunch of bash scripts which are used to quickly create a new project. If you want, you can copy the files into your path (e.g., <code>ln -s ~/tex/cdsc_tex/new* ~/bin/</code>); this will allow you to run, for example, <code>new_knitr_document documentname</code> to create a new knitr document from the template. | This code includes a bunch of bash scripts which are used to quickly create a new project. If you want, you can copy the files into your path (e.g., <code>ln -s ~/tex/cdsc_tex/new* ~/bin/</code>); this will allow you to run, for example, <code>new_knitr_document documentname</code> to create a new knitr document from the template. | ||
== Using the | == Using the Templates == | ||
There are quite a number of useful instructions sprinkled throughout the TeX source file in comments. You should pay particular attention to the comments that begin with: | There are quite a number of useful instructions sprinkled throughout the TeX source file in comments. You should pay particular attention to the comments that begin with: | ||
Line 38: | Line 69: | ||
One problem is that that this can be tricky to get to work on Overleaf. This alternative line will just input a timestamp at the build process: | One problem is that that this can be tricky to get to work on Overleaf. This alternative line will just input a timestamp at the build process: | ||
\pagestyle{cdsc-page- | \pagestyle{cdsc-page-sharelatex} | ||
Either approach can be useful for keeping track of which version of a document somebody has. | Either approach can be useful for keeping track of which version of a document somebody has. | ||
Line 44: | Line 76: | ||
The templates themselves use the [http://texdoc.net/texmf-dist/doc/latex/memoir/memman.pdf LaTeX Memoir Class] (warning that link is a ~1000 page PDF and the documentation). | The templates themselves use the [http://texdoc.net/texmf-dist/doc/latex/memoir/memman.pdf LaTeX Memoir Class] (warning that link is a ~1000 page PDF and the documentation). | ||
== Sending Patches == | |||
== Sending Patches | |||
If you want to send patches, these currently should be sent over email to mako. Details on how to do this with the <code>git format-patch</code> command are online here: https://code.communitydata.science/ | If you want to send patches, these currently should be sent over email to mako. Details on how to do this with the <code>git format-patch</code> command are online here: https://code.communitydata.science/ | ||