Latex

Edit PDF

sudo apt-get install gs

gs -dNOPAUSE -sDEVICE=pdfwrite -sOUTPUTFILE=combinedpdf.pdf -dBATCH 1.pdf 2.pdf 3.pdf #merge pdf

gs -dNOPAUSE -sDEVICE=pdfwrite -sOUTPUTFILE=combinedpdf.pdf -dBATCH *pdf #merge pdf

gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=out.pdf file1.pdf file2.pdf #merge pdf

sudo apt-get install pdftk

pdftk 1.pdf 2.pdf 3.pdf cat output merged.pdf #merge pdf

pdftk *.pdf cat output merged.pdf #merge pdf

pdftk A=1.pdf B=2.pdf cat A B output 12.pdf #merge pdf

pdftk A=one.pdf B=two.pdf cat A1-7 B1-5 A8 output combined.pdf #merge pdf

pdftk mydoc.pdf output mydoc.128.pdf owner_pw PASS_WORD #encrypt

pdftk mydoc.pdf output mydoc.128.pdf owner_pw PASS_WORD1 user_pw PASS_WORD2 #encrypt

pdftk mydoc.pdf output mydoc.128.pdf owner_pw PASS_WORD1 user_pw PASS_WORD2 allow printing #encrypt

pdftk secured.pdf input_pw foopass output unsecured.pdf #decrypt

pdftk A=secured.pdf mydoc.pdf input_pw A=PASS_WORD cat output combined.pdf

pdftk mydoc.pdf output mydoc.clear.pdf uncompress

pdftk broken.pdf output fixed.pdf

pdftk mydoc.pdf burst #split into separate page

pdftk mydoc.pdf dump_data output report.txt

\usepackage[pdftex]{graphicx}

\usepackage[cmex10]{amsmath}

\usepackage{algorithm}

\usepackage{algorithmic}

\usepackage{url}

\usepackage{multirow}

\usepackage{color}

\definecolor{orange}{RGB}{255,127,0}

\pagecolor{orange}

\usepackage{utopia}--------------The "Utopia" font

\usepackage{charter}--------------The "charter" font

\usepackage{textcomp}--------------Allows the use of extra characters

\usepackage{verbatim, amsmath, amsfonts, amssymb, amsthm}--------------For code environment and math support

\usepackage{makeidx} --------------robustindex / Indexing

\usepackage[british]{babel} -------------- For british english hyphenation patterns

\usepackage[final]{graphicx} --------------draft -------------- To include graphics

\usepackage{booktabs,longtable,rotating} -------------- long tables are split to other lines %for rotating tables

\usepackage{array,warpcol} -------------- Alignment on decimal point entries in tables

\usepackage{multirow} -------------- muli rows (merge) in tables

\usepackage{fixme} --------------

\usepackage[section,verbose]{placeins} -------------- Keeps floats `in their place', preventing them from floating past a "\FloatBarrier" command into another section

\usepackage[width=11cm,font=footnotesize,labelfont=bf, format=default,justification=centerlast]{caption} --------------Captions

\usepackage{fancyhdr} -------------- Change caption style; changes headers and page styles etc.

\usepackage{sectsty} -------------- Changing section headinds

\usepackage{setspace} -------------- For changing line spacing

\usepackage{gensymb,units}

\usepackage{url}--------------Formatting for URL's i.e. http://www.rhizobia.co.nz

\usepackage{natbib} -------------- The best package for bibliographies

\usepackage{appendix} -------------- Makes appendices

\usepackage{cclicenses} -------------- Creative commons

\usepackage{afterpage} -------------- Makes appendices

\usepackage{microtype} -------------- makes pdf look better

\usepackage{lineno} -------------- Line numbering [pagewise]

\usepackage[nottoc]{tocbibind}-------------- Table of contents

\usepackage{texshade} -------------- Fancy DNA sequences

embedd fonts in pdf

ps2pdf14 -dEmbedAllFonts=true -dPDFSETTINGS=/prepress %.ps

Spell Check

detex sect1.tex | spell

ispell paper1.tex

  • Plain user of the package:
    • \usepackage[a4paper=true,ps2pdf=true,pagebackref=true]{hyperref}
    • This will add commands into the PDF to create a linked table of contents, as well as links for the cross-references such as calls to figure and page numbers
    • The a4paper option is easy to understand.
    • ps2pdf=true tells the compiler that you'll use ps2pdf to create the PDF output.
    • pagebackref=true is a great option, it adds page numbers in the bibliography and links to the positions in the document where you actually cite them.
  • One can also add information about you document:
    • \hypersetup{
    • pdftitle = The title of my PDF,
    • pdfauthor = My name,
    • pdfsubject= The subject,
    • pdfkeywords = keyword1 keyword2 keyword3
    • }
  • Finally, colors can be used:
      • \hypersetup{
      • colorlinks = true,
      • linkcolor = red,
      • anchorcolor = red,
      • citecolor = blue,
      • filecolor = red,
      • pagecolor = red,
      • urlcolor = red
      • }
    • That will put some colors in the PDF documents to make the links more obvious to the reader.
  • Remove color box around links
      • \hypersetup{colorlinks=false, pdfborder={0 0 0},}