Skip to content

Paper Writing

Pooyan Jamshidi edited this page Aug 14, 2023 · 18 revisions

Reproducibility

Cheecklist

LaTeX/BibTeX

If you do not know latex, you will have to eventually learn it. We write all papers in latex/pdftex.

I recommend creating and curating a single BibTeX file that you can use up to your thesis, look at mine here as an example. Whenever you add an entry to the BibTeX file, ensure its completeness and consistency (e.g., use a consistent style to name and abbreviate conference proceedings). I recommend using string constants for conference names and publishers. I also recommend providing consistent keys that you can remember or that follow specific patterns; I use ABC:CONF12, where ABC is the first letter of all last names of all authors, and CONF12 is the abbreviation for the conference/journal and year. I learned it from my advisor Christian Kaestner (CMU).

Sublime Text has a decent editor for Mac and other platforms (look at instructions on how to use forward and backward navigation between Tex file and PDF). I recommend using Overleaf to share the draft of your papers with me.

Modular LaTeX projects: paper, thesis

Please structure your documents like this:

 ./main.tex
 ./mystyle.sty
 ./tex/
 ./img/
 ./data/

LaTeX tools

Plots

Writing

Please read the following book:

  • The Elements of Style
  • Dreyer’s English: An Utterly Correct Guide to Clarity and Style

Writing tips (read these!!)

Make sure you are aware of the current utilities I keep here.

Other tools

Be open to learning new programming languages (e.g., try functional programming).

Google Docs is great for drafts and collaborative editing.

Project website

I would strongly suggest, for each of your projects, you should create a website, e.g., Athena. There are tools for this, such as Jekyll and templates:

Here are some good examples:

Response letter (for journal revisions)

Rebuttal advise

Tips (paper writing and polishing)

Homepage

All Ph.D. students should have a nice homepage, here are some useful templates:

Grammar Checking

Latexdiff

If you are asked to submit a revised version of a paper with marked changes. Latexdiff is a great choice.

Here is a workable scenario to generate a PDF with changes being marked using Overleaf and latexdiff.

1. Backup the original version

Backup the version before you are making any changes (say, study_draft.tex).

2. Make changes

Make whatever changes (say, in the study.tex).

3. Generate the diff file

When you get a revision, you can generate a diff TeX file via either of the following scenarios.

3.1 Online latexdiff

  1. Open this link in your browser.
  2. Follow the instruction to paste your old and new versions into the right places.
  3. Click the Generate LaTex document showing difference button.
  4. Copy and paste the outputs to the tex file (e.g., study.tex) you are revising on the overleaf.

3.2 local latexdiff

  1. Follow this guide to install Perl and latexdiff if you have not.
  2. Put the draft and revision tex files in your local machine.
  3. Run the following script to generate the diff tex file.
latexdiff <path_to_the_draft>/study_draft.tex <path_to_the_revision>/study.tex > <path_to_the_diff>/study_diff.tex
  1. Copy whatever in the diff tex and paste them into the tex file (e.g., study.tex) you are revising on the overleaf.

4. Generate a PDF with marks

4.1 Preamble for latexdiff

!!Important!! Copy and paste the following scripts in the preamble of your main.tex to avoid the "Undefined control sequence." errors when trying to generate a PDF.

%DIF PREAMBLE EXTENSION ADDED BY LATEXDIFF
%DIF UNDERLINE PREAMBLE %DIF PREAMBLE
\RequirePackage[normalem]{ulem} %DIF PREAMBLE
\RequirePackage{color}\definecolor{RED}{rgb}{1,0,0}\definecolor{BLUE}{rgb}{0,0,1} %DIF PREAMBLE
\providecommand{\DIFadd}[1]{{\protect\color{blue}\uwave{#1}}} %DIF PREAMBLE
\providecommand{\DIFdel}[1]{{\protect\color{red}\sout{#1}}}                      %DIF PREAMBLE
%DIF SAFE PREAMBLE %DIF PREAMBLE
\providecommand{\DIFaddbegin}{} %DIF PREAMBLE
\providecommand{\DIFaddend}{} %DIF PREAMBLE
\providecommand{\DIFdelbegin}{} %DIF PREAMBLE
\providecommand{\DIFdelend}{} %DIF PREAMBLE
%DIF FLOATSAFE PREAMBLE %DIF PREAMBLE
\providecommand{\DIFaddFL}[1]{\DIFadd{#1}} %DIF PREAMBLE
\providecommand{\DIFdelFL}[1]{\DIFdel{#1}} %DIF PREAMBLE
\providecommand{\DIFaddbeginFL}{} %DIF PREAMBLE
\providecommand{\DIFaddendFL}{} %DIF PREAMBLE
\providecommand{\DIFdelbeginFL}{} %DIF PREAMBLE
\providecommand{\DIFdelendFL}{} %DIF PREAMBLE
%DIF END PREAMBLE EXTENSION ADDED BY LATEXDIFF

4.2 Click the Recompile button

Then you will see the marked changes in the PDF preview.

Clone this wiki locally