Git Product home page Git Product logo

paper-skeleton's Introduction

Paper Skeleton and Editing Process

Overview

A minimal latex paper skeleton file for writing conference papers. The Makefile requires "rubber", but you can easily change this to build with "pdflatex" instead.

GitHub

Overview. The preferred method for authoring papers in our group is with Github. There are many advantages to doing so, most notably:

  • Every edit is version controlled. With pull requests, every edit is reviewed by one other person than the person who made the edit.
  • Issues with the project and paper can be tracked with the Github issue tracker and managed via pull requests. Discussions can be easily organized and tracked by issue.
  • Issues can be assigned to specific people, who can easily then find their tasks.
  • It is useful pedagogically, and it also avoids needless back-and-forth: While someone can simply push edits into master, it is easy to miss edits someone else might be making. Seeing other people's edits can be a useful learning experience, and if you see one of your edits changed or reverted, you can ask why. Maybe people have different style conventions (title case or sentence case? punctuation inside or outside of the quote? let's talk about it...).
  • Slack integration allows collaborators to easily be notified of any changes. (recommended Slack integration: /github subscribe <repo> issues pulls commits releases deployments comments reviews branches commits:*
  • It reduces chaos. It might seem "faster" to have everyone simultaneously editing everything in a Google doc or and Overleaf doc. But, the editing process is much less methodical (see above), thus resulting in chaos, an inconsistent end-product, and general stress, since nobody really has a complete view of the paper. The process below ensures that edits are methodical, track issues that collaborators have all discussed and seen, and are reviewed by the group (which is good for cohesion, consensus, and avoiding introduction of errors into the process with hasty editing).
  • In the event you are a computer scientist, you should know how to use version control anyway, and doing so with paper editing reinforces good habits. You wouldn't write your code or do your analysis using concurrent editing processes without testing, version, control, and review (I hope!). You should want to learn a methodical process and apply the same approach to all aspects of your project.

Editing. Here is the rough process for editing via Github.

  1. Create an issue on Github indicating the nature of your edit (e.g., "reorganize introduction", "align figures", "copy edit pass").
  2. On the Github issue, create a branch associated with the issue under "Development".
  3. Check out the branch you just created (e.g., locally to your machine via git fetch; git checkout <branch>)
  4. As you edit, try to make each commit readable by someone else:
  • Make your edits in your local branch.
  • Commit your edits to your local branch.
  • Push your edits to the upstream branch.
  1. When you are done making edits associated with the issue (perhaps multiple commits), create a new pull request on Github from your branch to the main branch.
  2. Ask someone (e.g., the primary author) to review and merge your pull request into main. You can do this in several ways: (1) assign a reviewer to your PR; (2) '@' them in Slack, or in a Github comment (or both).
  3. Delete the local and remote branch. Whoever merges your PR can delete the branch on Github once it is merged; merging will automatically close the issue, as well. You can delete your local branch with git branch -d <branch>. To avoid warnings, you might want to git checkout main and git pull into main before deleting the local branch.

Reviewing. You can review another pull request on the Github website. It can also be handy to have a local copy, because the command line tools are more powerful, and sometimes it may be more efficient to simply commit a small edit to the branch than to ask someone else to make the change.

  • The easiest way to review a PR is on the website. From the PR itself, you can click on any commit and read it. You can also open a review and/or directly comment on the PR, either though a general comment, or on a specific line.
  • If the PR is complicated or if you want to make direct edits and commit them back (instead of commenting), you may want a local copy. You can get one by git fetch; git checkout <branch>. Then you can edit in the branch, commit, and push as normal. Your commits and pushes should track the remote branch on the Github website.
  • Diffs can be handy and make for more efficient review. With text, people often word-wrap differently, which makes a standard diff like the one on the website a bit complicated. Some useful commands for quick review:
    • git diff -p --word-diff master..<branch> - will give you a nice redline of the branch you are in against the main branch. (You can compare any two branches this way.)
    • git whatchanged -p --word-diff - will give you a "timeline" of the redline, in case you just want to see what was committed in the branch, instead of a diff against main. You can specify specific files or groups of files with this command, as well (e.g., *.tex).

Overleaf

First Rule: Don't use it.

Let's first talk about why you should avoid using Overleaf. Why avoid Overleaf?

  • The web-based editor is highly sub-optimal compared to full-featured text editors (which you can customize to your liking), and you're much better off learning to use a real editor on your local machine. Plus, you'll be able to edit offline when you're traveling, when network connectivity fails, or when Overleaf invariably goes offline hours before a deadline.
  • The version control is far less good than what git can offer. The ability to get quick redline (e.g., git whatchanged -p --word-diff), integrate git commits with Slack and quickly peruse edits, revert changes, avoid gigantic blobs of commented-out latex, etc. is far superior to anything you can do in Overleaf. Spend some time sharpening your paper-writing axe and you'll be able to chop down a lot more trees in the long run.

Second Rule: If you have to use it, at least sync it with Github.

The second rule is: If you have to use Overleaf (e.g., because you're a glutton for punishment, because a collaborator is unenlightened, etc.), always sync overleaf to a GitHub repo since many people don't use Overleaf. People who have sane processes should not have to suffer because you have chosen to use an inferior tool.

Note that there is a copy of this paper skeleton template already as an Overleaf document. We strongly prefer git to Overleaf, but if you must start with an Overleaf skeleton, at least start with a good one.

Option 1: Git Bridge Synchronization

This option is preferred if you are a Github user who is trying to collaborate with someone who insists on using overleaf.

These instructions assume that you have (or create) a Github repository first and want to merge it into an Overleaf project.

  1. Create a github repository for your paper as normal.
  2. Import your github repository into Overleaf. Note: Because github now uses "main" instead of "master" for default, and there is no way to change Overleaf's branch name (which is "master"), these instructions are slightly broken. You will have to modify these instructions slightly: In the last step, instead type git push overleaf main:master.
  3. I recommend creating an "overleaf" branch that you can pull Overleaf edits into separately, and then merging with your local main branch. Example:
  • git checkout -b overleaf (create a separate branch for overleaf)
  • git merge origin main (merge the main from the remote origin into your local overleaf branch)
  • git push -u overleaf overleaf:master (push the local overleaf branch to Overleaf, and have your local overleaf branch track edits on Overleaf.)
  1. You can set up your main branch to track a Github remote:
  • git checkout main
  • git push -u origin main

Now you have a local branch overleaf that tracks and pushes to Overleaf, and a local branch main that you can use as normal. You can of course do this with a single local branch, but because Overleaf edits are constant, and non-atomic, it's possible and likely that your pull from overleaf at your moment of choosing is unlikely to compile. You may thus find it easier to simply keep the branches separate and occasionally merge in the Overleaf branch, as in the above instructions.

Option 2: Github Synchronization

This option is probably the way to go if you have to collaborate with someone who is using Overleaf as the primary document.

  1. Create a github repository from Overleaf. Make sure the repo is private

  2. Once you have a repository sync'd to an Overleaf project, Overleaf's menu->github->push/pull will allow you to use overleaf to push/pull to GitHub. (Note that you have to manually do this. Before adding new content to your Overleaf document, don't forget to always check if there is new content to pull. When overleaf pulls changes from GitHub, it automatically does a merge with whatever is in Overleaf. Consequently, merge conflicts can occur. I find the simplest way to fix an overleaf/GitHub merge conflict is to just go to the repo in GitHub and use the web interface to fix all the merges (https://docs.github.com/en/free-pro-team@latest/github/collaborating-with-issues-and-pull-requests/resolving-a-merge-conflict-on-github)

  3. Make sure your Overleaf document will actually compile with a real Latex compiler. Overleaf handles compile errors differently than other LaTeX compilers. To ensure you have no compile errors you want the "logs and outputs" icon (next to the Green Recompile button) to not be red. Orange is okay. If it is red, non-overleaf people will be unable to compile your work.

  4. Once you are done, always push your changes back into the github repository, so that people working from git have your latest edits.

Style Conventions

To be written.

paper-skeleton's People

Contributors

feamster avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

paper-skeleton's Issues

Unable to compile USENIX template

I was unable to compile the USENIX LaTex template using the Makefile.

Specifically, I did the following:

  1. Create a new directory.
  2. Download the style file and template file from https://www.usenix.org/conferences/author-resources/paper-templates into the directory.
  3. Rename the template file from usenix2019_v3.1.tex to paper.tex.
  4. Clone the Makefile from this repo to the directory created in Step 1.
  5. Run make, which produces the following error:
$ make
latexmk -latexoption="-file-line-error -8bit" -xelatex paper.tex
Latexmk: This is Latexmk, John Collins, 17 Jan. 2018, version: 4.55.
Latexmk: applying rule 'xelatex'...
Rule 'xelatex': File changes, etc:
   Non-existent destination files:
      'paper.xdv'
------------
Run number 1 of rule 'xelatex'
------------
------------
Running 'xelatex -no-pdf  -file-line-error -8bit -recorder  "paper.tex"'
------------
This is XeTeX, Version 3.14159265-2.6-0.99999 (TeX Live 2018) (preloaded format=xelatex)
 restricted \write18 enabled.
entering extended mode
(./paper.tex
LaTeX2e <2018-04-01> patch level 2
Babel <3.18> and hyphenation patterns for 84 language(s) loaded.
(/usr/local/texlive/2018/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/usr/local/texlive/2018/texmf-dist/tex/latex/base/size10.clo))
(./usenix2019_v3.sty
(/usr/local/texlive/2018/texmf-dist/tex/latex/psnfss/mathptmx.sty)
(/usr/local/texlive/2018/texmf-dist/tex/latex/base/fontenc.sty
(/usr/local/texlive/2018/texmf-dist/tex/latex/base/t1enc.def)
(/usr/local/texlive/2018/texmf-dist/tex/latex/lm/t1lmr.fd))
(/usr/local/texlive/2018/texmf-dist/tex/latex/base/inputenc.sty

Package inputenc Warning: inputenc package ignored with utf8 based engines.

) (/usr/local/texlive/2018/texmf-dist/tex/latex/pslatex/pslatex.sty)
(/usr/local/texlive/2018/texmf-dist/tex/latex/microtype/microtype.sty
(/usr/local/texlive/2018/texmf-dist/tex/latex/graphics/keyval.sty)
(/usr/local/texlive/2018/texmf-dist/tex/latex/microtype/microtype-xetex.def)
(/usr/local/texlive/2018/texmf-dist/tex/latex/microtype/microtype.cfg))
(/usr/local/texlive/2018/texmf-dist/tex/latex/sttools/flushend.sty
(/usr/local/texlive/2018/texmf-dist/tex/latex/etoolbox/etoolbox.sty))
(/usr/local/texlive/2018/texmf-dist/tex/latex/cite/cite.sty)
(/usr/local/texlive/2018/texmf-dist/tex/latex/breakurl/breakurl.sty
(/usr/local/texlive/2018/texmf-dist/tex/latex/xkeyval/xkeyval.sty
(/usr/local/texlive/2018/texmf-dist/tex/generic/xkeyval/xkeyval.tex
(/usr/local/texlive/2018/texmf-dist/tex/generic/xkeyval/xkvutils.tex)))
(/usr/local/texlive/2018/texmf-dist/tex/generic/oberdiek/ifpdf.sty)

/usr/local/texlive/2018/texmf-dist/tex/latex/breakurl/breakurl.sty:62: Package
breakurl Error: The breakurl depends on hyperref package.

See the breakurl package documentation for explanation.
Type  H <return>  for immediate help.
 ...

l.62 }

?

USENIX format looks incorrect

The USENIX paper format compiled from this repo looks different from that from the official style file.

Here's how to reproduce the error:

  1. Clone this repo.
  2. Edit paper.tex and change the first line into \documentclass[conference=usenix]{confpaper}.
  3. (Optionally) Add \usepackage{times} to paper.tex.
  4. Run make.

The resultant PDF uses the LaTex font, rather than Times, and the section format looks different from the official template.

Here's the official template: https://www.usenix.org/sites/default/files/usenix2019_v3.1.pdf

Here's what the compiled PDF looks like using the paper skeleton:

Screen Shot 2019-07-12 at 1 52 35 PM

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.