This is the repository containing the configuration files for reports in the style of the Grattan Institute, Melbourne.
See https://github.com/grattan/grattex/blob/master/doc/grattexDocumentation.pdf for the documentation.
Staff starting a new report need to "clone the grattex
repository on Github" (copy the report template) and "import the repository to edit in Overleaf" (open the template in Overleaf). This can be done using the following steps.
If you do not have a Github account that is connected to the Grattan organisation:
If you do not have an Overleaf account:
@grattaninstitute
email address. https://github.com/grattan/grattex
Use this template
(the green button on the top-right of the panel)grattan
. Give your new repository a name that will clearly identify the project now and in the future. A good example is Energy-2018-stranded-assets
. A bad example is health-report
.Private
, and make sure the Include all branches
is unchecked.Create repository from template
. This will take a minute to copy.grattex
repository (copied the report template). You can find it at https://github.com/grattan/[your-repository-name]
. Now it's time to open and edit it in Overleaf.New Project > Import from GitHub
.Import to Overleaf
.Share
and:
Anyone with this link can edit the project
link and paste it just under \documentclass{grattan}
as a comment, i.e.: \documentclass{grattan}
% Anyone with this link can edit the project:
% https://www.overleaf.com/abcdefghi12345
so that your coauthors can also invite people to edit the document in your absence
You can get a long way in Latex using Overleaf's 'Rich Text' editor. When you open an Overleaf project and select a file ending in .tex
from the left sidebar, code will appear in the centre panel of the screen. At the top left of the code is a toggle button, allowing you to see the file as 'Source' code (which looks code-ish) or 'Rich Text' (which looks a bit more like Microsoft Word, including buttons you can click for section heading or bold text).
Now you can write almost as easily as you would in more user-friendly text editors like Word.
For anything more advanced (footnotes, referencing, tables, figures and other miscellaneous troubleshooting), there are three resources that might help.
Grattan Team > Templates > LaTeX > grattexDocumentation.pdf
. While super helpful and comprehensive, the document is very long -- the best strategy is to ctrl+F
for whatever you need assistance with.The purpose of using LaTeX is to improve the quality of our final publications. One of the main ways this happens is by running the document through a series of checks. Here's how it works:
For associates, once you've told your team that you're going to check the report (so that they stop editing it), the process of checking the document is as follows:
grattanReporter
package by running the following code:
install.packages('devtools') # Only if you don't already have the devtools package
devtools::install_github('grattan/grattanReporter')
library(grattanReporter)
https://www.overleaf.com/project
, find your project in the list, and click on the download button on the right side of the screen..zip
file will appear in your Downloads
folder. Open the file (it will unzip into a folder).setwd('/Users/myusername/Downloads/MyUnzippedOverleafProject')
. On a PC, your path may look different.checkGrattanReport()
. This will kick off a series of tests and will run until it encounters an error. The checks include:
\@.
in LaTeX (i.e. I went to the USA\@.
)Report.tex
% may_be_left_unreferenced: fig:label_of_thing_i_dont_want_referenced
)checkGrattanReport()
has found something for you to fix. It should say what the error is, the file where it occurred, the line where it happened, and possibly even what you should do to fix it. In the folder you downloaded, make the necessary change, save it, and run the check again. If you're not sure how to resolve an error, consult grattexDocumentation.pdf
or chat to a Latexnician.checkGrattanReport(compile = TRUE)
until there are no further issues (this performs some additional checks, like making sure your references aren't broken/missing).Releasing a report involves adding the front cover, updating the logos/affiliates on page 2, adding the ISBN and report number, and running the report through checkGrattanReport
again -- but this time with some extra checks.
FrontPage
, which must contain the front cover as a PDF with the name FrontPage.pdf
. In Report.tex
, change the first line of code from \documentclass[embargoed]{grattan}
to \documentclass[FrontPage]{grattan}
.Report.tex
with the correct one.checkGrattanReport()
, ensuring that your team is not trying to make any final changes to the document.This time, however, we're going to add some extra arguments to checkGrattanReport()
. These extra arguments will check that \CenturyFootnote
is used correctly (see grattexDocumentation.pdf
), and will build the final PDF for us.
# To update affiliates/logos, you need to update the 'classfile'. Here's how:
checkGrattanReport(update_grattan.cls = TRUE)
# Final release checks are included with the following argument
checkGrattanReport(compile = TRUE, pre_release = TRUE)
# And a publication-ready pdf will be built with the following:
checkGrattanReport(compile = TRUE, pre_release = TRUE, release = TRUE)
RELEASE
, and inside will be a PDF of your report. This is what you will send to Central Services so that they can upload it to the Grattan website in time for its 9pm publication.And if something goes badly wrong -- you can't get checkGrattanReport()
to make you a PDF, and no Latexnician is available -- rest assured that you can always use the PDF that Overleaf compiles as a workaround. However, it may not have the updated affiliates, and there's a greater risk of bugs in the document if it hasn't passed checkGrattanReport()
. But at least you'll have a usable document, and you can talk to a Latexnician on Monday to fix anything outstanding.
Ibid. (<page ref>)
resulted in the p
being uppercase (PR #114). Thanks to JD for filing.\note(s)withsource(s)
permutations. Closes #81centredsmallbox
..log
\Chapref
and friends for neater hyperlinks to chapters\ie
\eg
\etc
macros.\doublecolumnfigure
now used #46./doc/
New features:
New option embargoed
enables a command \EmbargoDate
which prints an Embargo mark on the title page and in the headers #32
Patched bug in cleveref
where varioref
's phrase ``on the previous page'' is never used. #39
[t]
floats have captions aligned with the baseline. 076df622e7fec025382b804e1b809319aef2fe11
KOMA-warnings' advice about footheight
, headheight
etc has been accepted. #40
Glue component of space between footnote area and text has been reduced to 14pt (which is closer to the current leading). aec03a693b0aad85daa03ceef16316ef855b5b4a
Manual specification of \textfloatsep
has now been dropped in favour of the default
Allow citations in acknowledgements #37