Upload
vulien
View
225
Download
0
Embed Size (px)
Citation preview
Using the Penn Biostat LaTeXTemplates
January 4 2018
Sarah J RatcliffeProfessor of Biostatistics
Why LaTeX Itrsquos is a document preparation system for high-quality
typesetting Controls all the page layout fonts formatting for you through
a style file Control over large documents containing sectioning cross-
references tables and figures Typesetting of complex mathematical formulas Advanced typesetting of mathematics with AMS-LaTeX Automatic generation of bibliographies and indexes
Penn Biostat LaTeX Templates Available from Biostat Research Website
bull httpsdbemedupennedubiostat-researchresources-educational Separate zipped bundles for
bull MS Thesisbull PhD Dissertation
Templates created to ensure your submission meets Pennrsquos formatting requirementsbull httpwwwupenneduprovostdissertation_resourcesbull Check requirements havenrsquot changed since last date template updatedbull Word template available from Provostrsquos office
Penn Biostat LaTeX Templates MS bundle contains
bull pennbiostatmssty - style file that controls formattingbull thesisex_2017tex - example LaTeX file to work frombull thesisex_2017pdf - compiled LaTeX documentbull dissertationexbib - example LaTeX bibliography filebull anviljpg - figure used by the example file
PhD bundle containsbull pennbiostat_biblatexsty - style file that controls formattingbull dissertationex2017tex - example LaTeX file to work frombull dissertationex2017pdf - compiled LaTeX documentbull dissertationexbib - example LaTeX bibliography filebull RR1jpg - figure used by the example file
Penn Biostat LaTeX Templates
PhD Dissertation Template ndash ltdissertationex2017texgt
PhD Dissertation Template ndash Preamble
PhD Dissertation Template ndash Preamble
PhD Dissertation Template ndash Main Text
PhD Dissertation Template ndash Main Text Can split document into multiple tex files
beginmainf
includeintroduction - links in file ltintroductiontexgtincludechapter1 - links in file ltchapter1texgtincludechapter2includechapter3includediscussion
endmainf
Allows compiling by file to check for errorsincludeonlychapter1chapter2begindocument
- only include chapters 1 amp 2 when compiling
- must come directly before begindocument
PhD Dissertation Template ndash Appendices
Labels Cross References LaTeX uses cross-references and labels to ensure all
numbering is correctbull Never type a number of a chapter section figure table equation etc
Use label to name parts to cross-referencechptIntroduction labelchptintrocaptionMy figure of the datalabelfigdata
Use ref to cross-reference the number in the textSee chapter refchptintro for more informationshown in Figure reffigdataFigure~reffig1
~ prevents LaTeX wrapping a line between Figure and the number No spaces
References Are controlled using biblatex a bibliography file and citation
commands in the tex file Never manually type a reference in your document BibLaTeX help
bull httpswwwsharelatexcomblog20130731getting-started-with-biblatexhtml
All citations should be placed in a bibliography file (bib) In your tex file use
bull Inline citation citeten2000mix Ten Have et al 2000bull Parenthesized citation
citep[eg][]pin2006eff (eg Pinheiro and Chao 2006)bull Multiple parenthesized citations citepten2000mixpin2006eff
Bibliography File Contains all details for each reference
ARTICLEli2010modauthor = LiY and WileytoE P and HeitjanDtitle = Modeling smoking cessation data with alternating states and
a cure fraction using frailty modelsjournal = Statistics in Medicinevolume = 29pages = 627-638year = 2010
Can contain references you donrsquot use in the tex file bull If not cited they wonrsquot be included in your reference list
Use to maintain capitals in titles Eg HIV
key used in cite commands to link to reference
Bibliography FileCreation of BibTex entries OttoBib - search for books by ISBN Google Scholar - click the ldquoScholar preferencesrdquo link Under
Bibliography Manager select ldquoShow links to import citations into BibTeXrdquo Save preferences
TeXMed ndash converts PubMed Medline entries into BibTex formathttpwwwbioinformaticsorgtexmed
Bibliography FileManaging BibTex entries JabRef
bull httpjabrefsourceforgenetbull Java based graphical front end to manage BibTeX databasesbull Can directly import references from online
Compiling the Dissertation Multiple steps needed to ldquoBuildrdquo1 Run LaTeX -gt PDF2 Run BibTeX - Needed to find references3 Run LaTeX -gt PDF4 Run LaTeX -gt PDF
Depending on build set-up may be able to just run LateX -gt PDF twice
Must run LaTeX at least twice at end to get all numbering correct
LaTeX Overfull hbox Warnings
Your dissertation will be rejected if you dont fix these 1 Formulae LaTeX will not wrap if they go into the margins
bull You will get a warning message but LaTeX will compile normally with the formula even running off the side of the page
2 Long Words Manually help LaTeX hyphenatebull If a long word will just end into the margin and LaTeX is not sure
where to hyphenate to split the word over two lines it may let it run into the margin
bull Control the hyphenation manually to keep within the margins using the hyphenation hints command at the top of the template Example hyphenationrep-re-sent-a-tivematlaber-go-nom-ic
3 Verbatim Use of the verbatim environment removes all of LaTeXs formating controls for that section
bull You must manually add line returns to prevent overflow
Some Useful Packages verbatim
bull Allows you to type exact text bull Great for software output
Matlab
beginboxedverbatim
gtgt A = 4ones(3)
A =
04000 04000 04000
04000 04000 04000
04000 04000 04000
endboxedverbatim
Some useful packages - Tables longtable
bull allows table that extends over multiple pages to be split multirow
bull allows table columns to span multiple rows columns
usepackagemultirow
begintabularcc|c|c|c|c|l
cline3-6
amp amp multicolumn4|c|Primes cline3-6
amp amp 2 amp 3 amp 5 amp 7 cline1-6
multicolumn1|c|multirow2Powers amp
multicolumn1|c|504 amp 3 amp 2 amp 0 amp 1 amp cline2-6
multicolumn1|c| amp
multicolumn1|c|540 amp 2 amp 3 amp 1 amp 0 amp cline1-6
multicolumn1|c|multirow2Powers amp
multicolumn1|c|gcd amp 2 amp 2 amp 0 amp 0 amp min cline2-6
multicolumn1|c| amp
multicolumn1|c|lcm amp 3 amp 3 amp 1 amp 1 amp max cline1-6
endtabular
Some useful packages - Figures wrapfig
bull allows text to wrap around the figure instead of the figure taking up an entire line
subfigbull place several figures (or tables) into one figure (table) with separate
caption options
usepackagesubfig
beginfigure
centering
subfigure[A gull]qquad
subfigure[A tiger]qquad
subfigure[A mouse]
label3figs-c
captionPictures of animalslabel3figs
endfigure
Equations Define complex commonly used symbols at start of document
newcommandvc[1]mboxboldmath$1$
newcommandyijvcy_ij
newcommandbSbvcb^T vcSigma_u vcb
newcommandcovoperatornamecov
newcommandvaroperatornamevar
newcommandtroperatornametr
Reference equations using eqref to automatically get parentheses Egequation eqrefeqintegration equation (12)
EquationsEnvironments in amsmath package align
bull nicer multiline equation alignment
beginalignvcnu^(k+1) amp= vcnu^(k)+(vcX_1E(vcM)^(k)vcX_1)^-1vcX_1E(tildevcY)^(k)halR amp= left( sum_iXRi^TXRi right)^-1Esum_ivcX_2i^T(vcr_i-vc1_n_ivcb^Tui)hb amp= Eleft( sum_in_iuiui^T right)^-1Esum_iuivc1_n_i^T(vcr_i-vcX_2ivcalpha_2)hsigu amp= left(sum_in_iright)^-1Esum_in_iuiui^Thsigb amp= left(sum_in_iright)^-1Esum_ijvcbeta_ijvcbeta_ij^ThsigR amp= left(sum_in_iright)^-1Esum_i(vcr_i-vcX_2ivcalpha_2-vc1_nivcb^Tui)^Tamp qquad times(vcr_i-vcX_2ivcalpha_2-vc1_nivcb^Tui)endalign
EquationsEnvironments alignat
bull align equations at more than one place split
bull use inside equation align etc to split an equation over multiple lines with multiline equation getting only one reference number
beginequationlabelxx
beginsplit
aamp=b+c-d
ampquad +e-f
amp=g+h
amp=i
endsplit
endequation
EquationsEnvironments multline
bull align first line of equation on the left last line on the right and center middle lines
beginmultline
a+b+c+d+e+f
+i+j+k+l+m+n
endmultline
gatherbull center alignment of all equations
Equations
Useful commands in amsmathpackage intertext
bull place correctly formatted lines of text in middle of equation without affecting alignment
The second two simulations were performed assuming the true underlying model was the shared parameter model below with 30 and 50 censoring rates respectivelybeginalignmboxlogit(mu_jkt)=amp-34+23(I_t=2)+2(mboxiron)+01(mboxtime)amp +beta_j1+(mboxtime)beta_j2 qquad qquad t=12log(r_j)=amp12+013(mboxiron)+01(mboxlength of ESRD)amp +beta_j1+01beta_j2+err_j intertextwhere left(beginarraycc beta_j1 beta_j2 endarray right) sim amp N left(left(beginarraycc00 endarray right)left(beginarraycc08 amp0101 amp02endarray right) right) err_j sim amp N(007)endalign
EquationsUseful commands in amsmath package left right
bull used to let LaTeX set deliminator sizes correctly over multiple lines of equations
beginalign
phi(yijamp|xyuivcbeta_ijhatvcvarphi)
amp=
amp times prod_t=2^S-1left(fracmboxexp(alpha_01++alpha_0t+vcx_1ijk^Tvcalpha_1+T
1+mboxexp(alpha_01++alpha_0t+vcx_1ijk^Tvcalpha_1+T right
amp left -fracmboxexp(alpha_01++alpha_0(t-1)+vcx_1ijk^Tvcalpha_1
+T
1+mboxexp(alpha_01++alpha_0(t-1)+vcx_1ijk^Tvcalpha_1+Tright)^y_ijkt
amp
Tamp=
endalign
Equations
Useful commands in amsmath package shoveleft shoveright
bull aligns equation to the left right of the linebeginmultline
A
B
shoverightC
D
endmultline
AB
CD
LaTeX Resources
Good intro to LaTeX atbull httpswwwlatex-projectorgbull httpsenwikibooksorgwikiLaTeX
Booksbull httpswwwlatex-projectorghelpbooksbull Frank Mittelbach Michel Goossens Johannes Braams David Carlisle
Chris Rowley (2004) The LaTeX Companion 2nd edition
Why LaTeX Itrsquos is a document preparation system for high-quality
typesetting Controls all the page layout fonts formatting for you through
a style file Control over large documents containing sectioning cross-
references tables and figures Typesetting of complex mathematical formulas Advanced typesetting of mathematics with AMS-LaTeX Automatic generation of bibliographies and indexes
Penn Biostat LaTeX Templates Available from Biostat Research Website
bull httpsdbemedupennedubiostat-researchresources-educational Separate zipped bundles for
bull MS Thesisbull PhD Dissertation
Templates created to ensure your submission meets Pennrsquos formatting requirementsbull httpwwwupenneduprovostdissertation_resourcesbull Check requirements havenrsquot changed since last date template updatedbull Word template available from Provostrsquos office
Penn Biostat LaTeX Templates MS bundle contains
bull pennbiostatmssty - style file that controls formattingbull thesisex_2017tex - example LaTeX file to work frombull thesisex_2017pdf - compiled LaTeX documentbull dissertationexbib - example LaTeX bibliography filebull anviljpg - figure used by the example file
PhD bundle containsbull pennbiostat_biblatexsty - style file that controls formattingbull dissertationex2017tex - example LaTeX file to work frombull dissertationex2017pdf - compiled LaTeX documentbull dissertationexbib - example LaTeX bibliography filebull RR1jpg - figure used by the example file
Penn Biostat LaTeX Templates
PhD Dissertation Template ndash ltdissertationex2017texgt
PhD Dissertation Template ndash Preamble
PhD Dissertation Template ndash Preamble
PhD Dissertation Template ndash Main Text
PhD Dissertation Template ndash Main Text Can split document into multiple tex files
beginmainf
includeintroduction - links in file ltintroductiontexgtincludechapter1 - links in file ltchapter1texgtincludechapter2includechapter3includediscussion
endmainf
Allows compiling by file to check for errorsincludeonlychapter1chapter2begindocument
- only include chapters 1 amp 2 when compiling
- must come directly before begindocument
PhD Dissertation Template ndash Appendices
Labels Cross References LaTeX uses cross-references and labels to ensure all
numbering is correctbull Never type a number of a chapter section figure table equation etc
Use label to name parts to cross-referencechptIntroduction labelchptintrocaptionMy figure of the datalabelfigdata
Use ref to cross-reference the number in the textSee chapter refchptintro for more informationshown in Figure reffigdataFigure~reffig1
~ prevents LaTeX wrapping a line between Figure and the number No spaces
References Are controlled using biblatex a bibliography file and citation
commands in the tex file Never manually type a reference in your document BibLaTeX help
bull httpswwwsharelatexcomblog20130731getting-started-with-biblatexhtml
All citations should be placed in a bibliography file (bib) In your tex file use
bull Inline citation citeten2000mix Ten Have et al 2000bull Parenthesized citation
citep[eg][]pin2006eff (eg Pinheiro and Chao 2006)bull Multiple parenthesized citations citepten2000mixpin2006eff
Bibliography File Contains all details for each reference
ARTICLEli2010modauthor = LiY and WileytoE P and HeitjanDtitle = Modeling smoking cessation data with alternating states and
a cure fraction using frailty modelsjournal = Statistics in Medicinevolume = 29pages = 627-638year = 2010
Can contain references you donrsquot use in the tex file bull If not cited they wonrsquot be included in your reference list
Use to maintain capitals in titles Eg HIV
key used in cite commands to link to reference
Bibliography FileCreation of BibTex entries OttoBib - search for books by ISBN Google Scholar - click the ldquoScholar preferencesrdquo link Under
Bibliography Manager select ldquoShow links to import citations into BibTeXrdquo Save preferences
TeXMed ndash converts PubMed Medline entries into BibTex formathttpwwwbioinformaticsorgtexmed
Bibliography FileManaging BibTex entries JabRef
bull httpjabrefsourceforgenetbull Java based graphical front end to manage BibTeX databasesbull Can directly import references from online
Compiling the Dissertation Multiple steps needed to ldquoBuildrdquo1 Run LaTeX -gt PDF2 Run BibTeX - Needed to find references3 Run LaTeX -gt PDF4 Run LaTeX -gt PDF
Depending on build set-up may be able to just run LateX -gt PDF twice
Must run LaTeX at least twice at end to get all numbering correct
LaTeX Overfull hbox Warnings
Your dissertation will be rejected if you dont fix these 1 Formulae LaTeX will not wrap if they go into the margins
bull You will get a warning message but LaTeX will compile normally with the formula even running off the side of the page
2 Long Words Manually help LaTeX hyphenatebull If a long word will just end into the margin and LaTeX is not sure
where to hyphenate to split the word over two lines it may let it run into the margin
bull Control the hyphenation manually to keep within the margins using the hyphenation hints command at the top of the template Example hyphenationrep-re-sent-a-tivematlaber-go-nom-ic
3 Verbatim Use of the verbatim environment removes all of LaTeXs formating controls for that section
bull You must manually add line returns to prevent overflow
Some Useful Packages verbatim
bull Allows you to type exact text bull Great for software output
Matlab
beginboxedverbatim
gtgt A = 4ones(3)
A =
04000 04000 04000
04000 04000 04000
04000 04000 04000
endboxedverbatim
Some useful packages - Tables longtable
bull allows table that extends over multiple pages to be split multirow
bull allows table columns to span multiple rows columns
usepackagemultirow
begintabularcc|c|c|c|c|l
cline3-6
amp amp multicolumn4|c|Primes cline3-6
amp amp 2 amp 3 amp 5 amp 7 cline1-6
multicolumn1|c|multirow2Powers amp
multicolumn1|c|504 amp 3 amp 2 amp 0 amp 1 amp cline2-6
multicolumn1|c| amp
multicolumn1|c|540 amp 2 amp 3 amp 1 amp 0 amp cline1-6
multicolumn1|c|multirow2Powers amp
multicolumn1|c|gcd amp 2 amp 2 amp 0 amp 0 amp min cline2-6
multicolumn1|c| amp
multicolumn1|c|lcm amp 3 amp 3 amp 1 amp 1 amp max cline1-6
endtabular
Some useful packages - Figures wrapfig
bull allows text to wrap around the figure instead of the figure taking up an entire line
subfigbull place several figures (or tables) into one figure (table) with separate
caption options
usepackagesubfig
beginfigure
centering
subfigure[A gull]qquad
subfigure[A tiger]qquad
subfigure[A mouse]
label3figs-c
captionPictures of animalslabel3figs
endfigure
Equations Define complex commonly used symbols at start of document
newcommandvc[1]mboxboldmath$1$
newcommandyijvcy_ij
newcommandbSbvcb^T vcSigma_u vcb
newcommandcovoperatornamecov
newcommandvaroperatornamevar
newcommandtroperatornametr
Reference equations using eqref to automatically get parentheses Egequation eqrefeqintegration equation (12)
EquationsEnvironments in amsmath package align
bull nicer multiline equation alignment
beginalignvcnu^(k+1) amp= vcnu^(k)+(vcX_1E(vcM)^(k)vcX_1)^-1vcX_1E(tildevcY)^(k)halR amp= left( sum_iXRi^TXRi right)^-1Esum_ivcX_2i^T(vcr_i-vc1_n_ivcb^Tui)hb amp= Eleft( sum_in_iuiui^T right)^-1Esum_iuivc1_n_i^T(vcr_i-vcX_2ivcalpha_2)hsigu amp= left(sum_in_iright)^-1Esum_in_iuiui^Thsigb amp= left(sum_in_iright)^-1Esum_ijvcbeta_ijvcbeta_ij^ThsigR amp= left(sum_in_iright)^-1Esum_i(vcr_i-vcX_2ivcalpha_2-vc1_nivcb^Tui)^Tamp qquad times(vcr_i-vcX_2ivcalpha_2-vc1_nivcb^Tui)endalign
EquationsEnvironments alignat
bull align equations at more than one place split
bull use inside equation align etc to split an equation over multiple lines with multiline equation getting only one reference number
beginequationlabelxx
beginsplit
aamp=b+c-d
ampquad +e-f
amp=g+h
amp=i
endsplit
endequation
EquationsEnvironments multline
bull align first line of equation on the left last line on the right and center middle lines
beginmultline
a+b+c+d+e+f
+i+j+k+l+m+n
endmultline
gatherbull center alignment of all equations
Equations
Useful commands in amsmathpackage intertext
bull place correctly formatted lines of text in middle of equation without affecting alignment
The second two simulations were performed assuming the true underlying model was the shared parameter model below with 30 and 50 censoring rates respectivelybeginalignmboxlogit(mu_jkt)=amp-34+23(I_t=2)+2(mboxiron)+01(mboxtime)amp +beta_j1+(mboxtime)beta_j2 qquad qquad t=12log(r_j)=amp12+013(mboxiron)+01(mboxlength of ESRD)amp +beta_j1+01beta_j2+err_j intertextwhere left(beginarraycc beta_j1 beta_j2 endarray right) sim amp N left(left(beginarraycc00 endarray right)left(beginarraycc08 amp0101 amp02endarray right) right) err_j sim amp N(007)endalign
EquationsUseful commands in amsmath package left right
bull used to let LaTeX set deliminator sizes correctly over multiple lines of equations
beginalign
phi(yijamp|xyuivcbeta_ijhatvcvarphi)
amp=
amp times prod_t=2^S-1left(fracmboxexp(alpha_01++alpha_0t+vcx_1ijk^Tvcalpha_1+T
1+mboxexp(alpha_01++alpha_0t+vcx_1ijk^Tvcalpha_1+T right
amp left -fracmboxexp(alpha_01++alpha_0(t-1)+vcx_1ijk^Tvcalpha_1
+T
1+mboxexp(alpha_01++alpha_0(t-1)+vcx_1ijk^Tvcalpha_1+Tright)^y_ijkt
amp
Tamp=
endalign
Equations
Useful commands in amsmath package shoveleft shoveright
bull aligns equation to the left right of the linebeginmultline
A
B
shoverightC
D
endmultline
AB
CD
LaTeX Resources
Good intro to LaTeX atbull httpswwwlatex-projectorgbull httpsenwikibooksorgwikiLaTeX
Booksbull httpswwwlatex-projectorghelpbooksbull Frank Mittelbach Michel Goossens Johannes Braams David Carlisle
Chris Rowley (2004) The LaTeX Companion 2nd edition
Penn Biostat LaTeX Templates Available from Biostat Research Website
bull httpsdbemedupennedubiostat-researchresources-educational Separate zipped bundles for
bull MS Thesisbull PhD Dissertation
Templates created to ensure your submission meets Pennrsquos formatting requirementsbull httpwwwupenneduprovostdissertation_resourcesbull Check requirements havenrsquot changed since last date template updatedbull Word template available from Provostrsquos office
Penn Biostat LaTeX Templates MS bundle contains
bull pennbiostatmssty - style file that controls formattingbull thesisex_2017tex - example LaTeX file to work frombull thesisex_2017pdf - compiled LaTeX documentbull dissertationexbib - example LaTeX bibliography filebull anviljpg - figure used by the example file
PhD bundle containsbull pennbiostat_biblatexsty - style file that controls formattingbull dissertationex2017tex - example LaTeX file to work frombull dissertationex2017pdf - compiled LaTeX documentbull dissertationexbib - example LaTeX bibliography filebull RR1jpg - figure used by the example file
Penn Biostat LaTeX Templates
PhD Dissertation Template ndash ltdissertationex2017texgt
PhD Dissertation Template ndash Preamble
PhD Dissertation Template ndash Preamble
PhD Dissertation Template ndash Main Text
PhD Dissertation Template ndash Main Text Can split document into multiple tex files
beginmainf
includeintroduction - links in file ltintroductiontexgtincludechapter1 - links in file ltchapter1texgtincludechapter2includechapter3includediscussion
endmainf
Allows compiling by file to check for errorsincludeonlychapter1chapter2begindocument
- only include chapters 1 amp 2 when compiling
- must come directly before begindocument
PhD Dissertation Template ndash Appendices
Labels Cross References LaTeX uses cross-references and labels to ensure all
numbering is correctbull Never type a number of a chapter section figure table equation etc
Use label to name parts to cross-referencechptIntroduction labelchptintrocaptionMy figure of the datalabelfigdata
Use ref to cross-reference the number in the textSee chapter refchptintro for more informationshown in Figure reffigdataFigure~reffig1
~ prevents LaTeX wrapping a line between Figure and the number No spaces
References Are controlled using biblatex a bibliography file and citation
commands in the tex file Never manually type a reference in your document BibLaTeX help
bull httpswwwsharelatexcomblog20130731getting-started-with-biblatexhtml
All citations should be placed in a bibliography file (bib) In your tex file use
bull Inline citation citeten2000mix Ten Have et al 2000bull Parenthesized citation
citep[eg][]pin2006eff (eg Pinheiro and Chao 2006)bull Multiple parenthesized citations citepten2000mixpin2006eff
Bibliography File Contains all details for each reference
ARTICLEli2010modauthor = LiY and WileytoE P and HeitjanDtitle = Modeling smoking cessation data with alternating states and
a cure fraction using frailty modelsjournal = Statistics in Medicinevolume = 29pages = 627-638year = 2010
Can contain references you donrsquot use in the tex file bull If not cited they wonrsquot be included in your reference list
Use to maintain capitals in titles Eg HIV
key used in cite commands to link to reference
Bibliography FileCreation of BibTex entries OttoBib - search for books by ISBN Google Scholar - click the ldquoScholar preferencesrdquo link Under
Bibliography Manager select ldquoShow links to import citations into BibTeXrdquo Save preferences
TeXMed ndash converts PubMed Medline entries into BibTex formathttpwwwbioinformaticsorgtexmed
Bibliography FileManaging BibTex entries JabRef
bull httpjabrefsourceforgenetbull Java based graphical front end to manage BibTeX databasesbull Can directly import references from online
Compiling the Dissertation Multiple steps needed to ldquoBuildrdquo1 Run LaTeX -gt PDF2 Run BibTeX - Needed to find references3 Run LaTeX -gt PDF4 Run LaTeX -gt PDF
Depending on build set-up may be able to just run LateX -gt PDF twice
Must run LaTeX at least twice at end to get all numbering correct
LaTeX Overfull hbox Warnings
Your dissertation will be rejected if you dont fix these 1 Formulae LaTeX will not wrap if they go into the margins
bull You will get a warning message but LaTeX will compile normally with the formula even running off the side of the page
2 Long Words Manually help LaTeX hyphenatebull If a long word will just end into the margin and LaTeX is not sure
where to hyphenate to split the word over two lines it may let it run into the margin
bull Control the hyphenation manually to keep within the margins using the hyphenation hints command at the top of the template Example hyphenationrep-re-sent-a-tivematlaber-go-nom-ic
3 Verbatim Use of the verbatim environment removes all of LaTeXs formating controls for that section
bull You must manually add line returns to prevent overflow
Some Useful Packages verbatim
bull Allows you to type exact text bull Great for software output
Matlab
beginboxedverbatim
gtgt A = 4ones(3)
A =
04000 04000 04000
04000 04000 04000
04000 04000 04000
endboxedverbatim
Some useful packages - Tables longtable
bull allows table that extends over multiple pages to be split multirow
bull allows table columns to span multiple rows columns
usepackagemultirow
begintabularcc|c|c|c|c|l
cline3-6
amp amp multicolumn4|c|Primes cline3-6
amp amp 2 amp 3 amp 5 amp 7 cline1-6
multicolumn1|c|multirow2Powers amp
multicolumn1|c|504 amp 3 amp 2 amp 0 amp 1 amp cline2-6
multicolumn1|c| amp
multicolumn1|c|540 amp 2 amp 3 amp 1 amp 0 amp cline1-6
multicolumn1|c|multirow2Powers amp
multicolumn1|c|gcd amp 2 amp 2 amp 0 amp 0 amp min cline2-6
multicolumn1|c| amp
multicolumn1|c|lcm amp 3 amp 3 amp 1 amp 1 amp max cline1-6
endtabular
Some useful packages - Figures wrapfig
bull allows text to wrap around the figure instead of the figure taking up an entire line
subfigbull place several figures (or tables) into one figure (table) with separate
caption options
usepackagesubfig
beginfigure
centering
subfigure[A gull]qquad
subfigure[A tiger]qquad
subfigure[A mouse]
label3figs-c
captionPictures of animalslabel3figs
endfigure
Equations Define complex commonly used symbols at start of document
newcommandvc[1]mboxboldmath$1$
newcommandyijvcy_ij
newcommandbSbvcb^T vcSigma_u vcb
newcommandcovoperatornamecov
newcommandvaroperatornamevar
newcommandtroperatornametr
Reference equations using eqref to automatically get parentheses Egequation eqrefeqintegration equation (12)
EquationsEnvironments in amsmath package align
bull nicer multiline equation alignment
beginalignvcnu^(k+1) amp= vcnu^(k)+(vcX_1E(vcM)^(k)vcX_1)^-1vcX_1E(tildevcY)^(k)halR amp= left( sum_iXRi^TXRi right)^-1Esum_ivcX_2i^T(vcr_i-vc1_n_ivcb^Tui)hb amp= Eleft( sum_in_iuiui^T right)^-1Esum_iuivc1_n_i^T(vcr_i-vcX_2ivcalpha_2)hsigu amp= left(sum_in_iright)^-1Esum_in_iuiui^Thsigb amp= left(sum_in_iright)^-1Esum_ijvcbeta_ijvcbeta_ij^ThsigR amp= left(sum_in_iright)^-1Esum_i(vcr_i-vcX_2ivcalpha_2-vc1_nivcb^Tui)^Tamp qquad times(vcr_i-vcX_2ivcalpha_2-vc1_nivcb^Tui)endalign
EquationsEnvironments alignat
bull align equations at more than one place split
bull use inside equation align etc to split an equation over multiple lines with multiline equation getting only one reference number
beginequationlabelxx
beginsplit
aamp=b+c-d
ampquad +e-f
amp=g+h
amp=i
endsplit
endequation
EquationsEnvironments multline
bull align first line of equation on the left last line on the right and center middle lines
beginmultline
a+b+c+d+e+f
+i+j+k+l+m+n
endmultline
gatherbull center alignment of all equations
Equations
Useful commands in amsmathpackage intertext
bull place correctly formatted lines of text in middle of equation without affecting alignment
The second two simulations were performed assuming the true underlying model was the shared parameter model below with 30 and 50 censoring rates respectivelybeginalignmboxlogit(mu_jkt)=amp-34+23(I_t=2)+2(mboxiron)+01(mboxtime)amp +beta_j1+(mboxtime)beta_j2 qquad qquad t=12log(r_j)=amp12+013(mboxiron)+01(mboxlength of ESRD)amp +beta_j1+01beta_j2+err_j intertextwhere left(beginarraycc beta_j1 beta_j2 endarray right) sim amp N left(left(beginarraycc00 endarray right)left(beginarraycc08 amp0101 amp02endarray right) right) err_j sim amp N(007)endalign
EquationsUseful commands in amsmath package left right
bull used to let LaTeX set deliminator sizes correctly over multiple lines of equations
beginalign
phi(yijamp|xyuivcbeta_ijhatvcvarphi)
amp=
amp times prod_t=2^S-1left(fracmboxexp(alpha_01++alpha_0t+vcx_1ijk^Tvcalpha_1+T
1+mboxexp(alpha_01++alpha_0t+vcx_1ijk^Tvcalpha_1+T right
amp left -fracmboxexp(alpha_01++alpha_0(t-1)+vcx_1ijk^Tvcalpha_1
+T
1+mboxexp(alpha_01++alpha_0(t-1)+vcx_1ijk^Tvcalpha_1+Tright)^y_ijkt
amp
Tamp=
endalign
Equations
Useful commands in amsmath package shoveleft shoveright
bull aligns equation to the left right of the linebeginmultline
A
B
shoverightC
D
endmultline
AB
CD
LaTeX Resources
Good intro to LaTeX atbull httpswwwlatex-projectorgbull httpsenwikibooksorgwikiLaTeX
Booksbull httpswwwlatex-projectorghelpbooksbull Frank Mittelbach Michel Goossens Johannes Braams David Carlisle
Chris Rowley (2004) The LaTeX Companion 2nd edition
Penn Biostat LaTeX Templates MS bundle contains
bull pennbiostatmssty - style file that controls formattingbull thesisex_2017tex - example LaTeX file to work frombull thesisex_2017pdf - compiled LaTeX documentbull dissertationexbib - example LaTeX bibliography filebull anviljpg - figure used by the example file
PhD bundle containsbull pennbiostat_biblatexsty - style file that controls formattingbull dissertationex2017tex - example LaTeX file to work frombull dissertationex2017pdf - compiled LaTeX documentbull dissertationexbib - example LaTeX bibliography filebull RR1jpg - figure used by the example file
Penn Biostat LaTeX Templates
PhD Dissertation Template ndash ltdissertationex2017texgt
PhD Dissertation Template ndash Preamble
PhD Dissertation Template ndash Preamble
PhD Dissertation Template ndash Main Text
PhD Dissertation Template ndash Main Text Can split document into multiple tex files
beginmainf
includeintroduction - links in file ltintroductiontexgtincludechapter1 - links in file ltchapter1texgtincludechapter2includechapter3includediscussion
endmainf
Allows compiling by file to check for errorsincludeonlychapter1chapter2begindocument
- only include chapters 1 amp 2 when compiling
- must come directly before begindocument
PhD Dissertation Template ndash Appendices
Labels Cross References LaTeX uses cross-references and labels to ensure all
numbering is correctbull Never type a number of a chapter section figure table equation etc
Use label to name parts to cross-referencechptIntroduction labelchptintrocaptionMy figure of the datalabelfigdata
Use ref to cross-reference the number in the textSee chapter refchptintro for more informationshown in Figure reffigdataFigure~reffig1
~ prevents LaTeX wrapping a line between Figure and the number No spaces
References Are controlled using biblatex a bibliography file and citation
commands in the tex file Never manually type a reference in your document BibLaTeX help
bull httpswwwsharelatexcomblog20130731getting-started-with-biblatexhtml
All citations should be placed in a bibliography file (bib) In your tex file use
bull Inline citation citeten2000mix Ten Have et al 2000bull Parenthesized citation
citep[eg][]pin2006eff (eg Pinheiro and Chao 2006)bull Multiple parenthesized citations citepten2000mixpin2006eff
Bibliography File Contains all details for each reference
ARTICLEli2010modauthor = LiY and WileytoE P and HeitjanDtitle = Modeling smoking cessation data with alternating states and
a cure fraction using frailty modelsjournal = Statistics in Medicinevolume = 29pages = 627-638year = 2010
Can contain references you donrsquot use in the tex file bull If not cited they wonrsquot be included in your reference list
Use to maintain capitals in titles Eg HIV
key used in cite commands to link to reference
Bibliography FileCreation of BibTex entries OttoBib - search for books by ISBN Google Scholar - click the ldquoScholar preferencesrdquo link Under
Bibliography Manager select ldquoShow links to import citations into BibTeXrdquo Save preferences
TeXMed ndash converts PubMed Medline entries into BibTex formathttpwwwbioinformaticsorgtexmed
Bibliography FileManaging BibTex entries JabRef
bull httpjabrefsourceforgenetbull Java based graphical front end to manage BibTeX databasesbull Can directly import references from online
Compiling the Dissertation Multiple steps needed to ldquoBuildrdquo1 Run LaTeX -gt PDF2 Run BibTeX - Needed to find references3 Run LaTeX -gt PDF4 Run LaTeX -gt PDF
Depending on build set-up may be able to just run LateX -gt PDF twice
Must run LaTeX at least twice at end to get all numbering correct
LaTeX Overfull hbox Warnings
Your dissertation will be rejected if you dont fix these 1 Formulae LaTeX will not wrap if they go into the margins
bull You will get a warning message but LaTeX will compile normally with the formula even running off the side of the page
2 Long Words Manually help LaTeX hyphenatebull If a long word will just end into the margin and LaTeX is not sure
where to hyphenate to split the word over two lines it may let it run into the margin
bull Control the hyphenation manually to keep within the margins using the hyphenation hints command at the top of the template Example hyphenationrep-re-sent-a-tivematlaber-go-nom-ic
3 Verbatim Use of the verbatim environment removes all of LaTeXs formating controls for that section
bull You must manually add line returns to prevent overflow
Some Useful Packages verbatim
bull Allows you to type exact text bull Great for software output
Matlab
beginboxedverbatim
gtgt A = 4ones(3)
A =
04000 04000 04000
04000 04000 04000
04000 04000 04000
endboxedverbatim
Some useful packages - Tables longtable
bull allows table that extends over multiple pages to be split multirow
bull allows table columns to span multiple rows columns
usepackagemultirow
begintabularcc|c|c|c|c|l
cline3-6
amp amp multicolumn4|c|Primes cline3-6
amp amp 2 amp 3 amp 5 amp 7 cline1-6
multicolumn1|c|multirow2Powers amp
multicolumn1|c|504 amp 3 amp 2 amp 0 amp 1 amp cline2-6
multicolumn1|c| amp
multicolumn1|c|540 amp 2 amp 3 amp 1 amp 0 amp cline1-6
multicolumn1|c|multirow2Powers amp
multicolumn1|c|gcd amp 2 amp 2 amp 0 amp 0 amp min cline2-6
multicolumn1|c| amp
multicolumn1|c|lcm amp 3 amp 3 amp 1 amp 1 amp max cline1-6
endtabular
Some useful packages - Figures wrapfig
bull allows text to wrap around the figure instead of the figure taking up an entire line
subfigbull place several figures (or tables) into one figure (table) with separate
caption options
usepackagesubfig
beginfigure
centering
subfigure[A gull]qquad
subfigure[A tiger]qquad
subfigure[A mouse]
label3figs-c
captionPictures of animalslabel3figs
endfigure
Equations Define complex commonly used symbols at start of document
newcommandvc[1]mboxboldmath$1$
newcommandyijvcy_ij
newcommandbSbvcb^T vcSigma_u vcb
newcommandcovoperatornamecov
newcommandvaroperatornamevar
newcommandtroperatornametr
Reference equations using eqref to automatically get parentheses Egequation eqrefeqintegration equation (12)
EquationsEnvironments in amsmath package align
bull nicer multiline equation alignment
beginalignvcnu^(k+1) amp= vcnu^(k)+(vcX_1E(vcM)^(k)vcX_1)^-1vcX_1E(tildevcY)^(k)halR amp= left( sum_iXRi^TXRi right)^-1Esum_ivcX_2i^T(vcr_i-vc1_n_ivcb^Tui)hb amp= Eleft( sum_in_iuiui^T right)^-1Esum_iuivc1_n_i^T(vcr_i-vcX_2ivcalpha_2)hsigu amp= left(sum_in_iright)^-1Esum_in_iuiui^Thsigb amp= left(sum_in_iright)^-1Esum_ijvcbeta_ijvcbeta_ij^ThsigR amp= left(sum_in_iright)^-1Esum_i(vcr_i-vcX_2ivcalpha_2-vc1_nivcb^Tui)^Tamp qquad times(vcr_i-vcX_2ivcalpha_2-vc1_nivcb^Tui)endalign
EquationsEnvironments alignat
bull align equations at more than one place split
bull use inside equation align etc to split an equation over multiple lines with multiline equation getting only one reference number
beginequationlabelxx
beginsplit
aamp=b+c-d
ampquad +e-f
amp=g+h
amp=i
endsplit
endequation
EquationsEnvironments multline
bull align first line of equation on the left last line on the right and center middle lines
beginmultline
a+b+c+d+e+f
+i+j+k+l+m+n
endmultline
gatherbull center alignment of all equations
Equations
Useful commands in amsmathpackage intertext
bull place correctly formatted lines of text in middle of equation without affecting alignment
The second two simulations were performed assuming the true underlying model was the shared parameter model below with 30 and 50 censoring rates respectivelybeginalignmboxlogit(mu_jkt)=amp-34+23(I_t=2)+2(mboxiron)+01(mboxtime)amp +beta_j1+(mboxtime)beta_j2 qquad qquad t=12log(r_j)=amp12+013(mboxiron)+01(mboxlength of ESRD)amp +beta_j1+01beta_j2+err_j intertextwhere left(beginarraycc beta_j1 beta_j2 endarray right) sim amp N left(left(beginarraycc00 endarray right)left(beginarraycc08 amp0101 amp02endarray right) right) err_j sim amp N(007)endalign
EquationsUseful commands in amsmath package left right
bull used to let LaTeX set deliminator sizes correctly over multiple lines of equations
beginalign
phi(yijamp|xyuivcbeta_ijhatvcvarphi)
amp=
amp times prod_t=2^S-1left(fracmboxexp(alpha_01++alpha_0t+vcx_1ijk^Tvcalpha_1+T
1+mboxexp(alpha_01++alpha_0t+vcx_1ijk^Tvcalpha_1+T right
amp left -fracmboxexp(alpha_01++alpha_0(t-1)+vcx_1ijk^Tvcalpha_1
+T
1+mboxexp(alpha_01++alpha_0(t-1)+vcx_1ijk^Tvcalpha_1+Tright)^y_ijkt
amp
Tamp=
endalign
Equations
Useful commands in amsmath package shoveleft shoveright
bull aligns equation to the left right of the linebeginmultline
A
B
shoverightC
D
endmultline
AB
CD
LaTeX Resources
Good intro to LaTeX atbull httpswwwlatex-projectorgbull httpsenwikibooksorgwikiLaTeX
Booksbull httpswwwlatex-projectorghelpbooksbull Frank Mittelbach Michel Goossens Johannes Braams David Carlisle
Chris Rowley (2004) The LaTeX Companion 2nd edition
Penn Biostat LaTeX Templates
PhD Dissertation Template ndash ltdissertationex2017texgt
PhD Dissertation Template ndash Preamble
PhD Dissertation Template ndash Preamble
PhD Dissertation Template ndash Main Text
PhD Dissertation Template ndash Main Text Can split document into multiple tex files
beginmainf
includeintroduction - links in file ltintroductiontexgtincludechapter1 - links in file ltchapter1texgtincludechapter2includechapter3includediscussion
endmainf
Allows compiling by file to check for errorsincludeonlychapter1chapter2begindocument
- only include chapters 1 amp 2 when compiling
- must come directly before begindocument
PhD Dissertation Template ndash Appendices
Labels Cross References LaTeX uses cross-references and labels to ensure all
numbering is correctbull Never type a number of a chapter section figure table equation etc
Use label to name parts to cross-referencechptIntroduction labelchptintrocaptionMy figure of the datalabelfigdata
Use ref to cross-reference the number in the textSee chapter refchptintro for more informationshown in Figure reffigdataFigure~reffig1
~ prevents LaTeX wrapping a line between Figure and the number No spaces
References Are controlled using biblatex a bibliography file and citation
commands in the tex file Never manually type a reference in your document BibLaTeX help
bull httpswwwsharelatexcomblog20130731getting-started-with-biblatexhtml
All citations should be placed in a bibliography file (bib) In your tex file use
bull Inline citation citeten2000mix Ten Have et al 2000bull Parenthesized citation
citep[eg][]pin2006eff (eg Pinheiro and Chao 2006)bull Multiple parenthesized citations citepten2000mixpin2006eff
Bibliography File Contains all details for each reference
ARTICLEli2010modauthor = LiY and WileytoE P and HeitjanDtitle = Modeling smoking cessation data with alternating states and
a cure fraction using frailty modelsjournal = Statistics in Medicinevolume = 29pages = 627-638year = 2010
Can contain references you donrsquot use in the tex file bull If not cited they wonrsquot be included in your reference list
Use to maintain capitals in titles Eg HIV
key used in cite commands to link to reference
Bibliography FileCreation of BibTex entries OttoBib - search for books by ISBN Google Scholar - click the ldquoScholar preferencesrdquo link Under
Bibliography Manager select ldquoShow links to import citations into BibTeXrdquo Save preferences
TeXMed ndash converts PubMed Medline entries into BibTex formathttpwwwbioinformaticsorgtexmed
Bibliography FileManaging BibTex entries JabRef
bull httpjabrefsourceforgenetbull Java based graphical front end to manage BibTeX databasesbull Can directly import references from online
Compiling the Dissertation Multiple steps needed to ldquoBuildrdquo1 Run LaTeX -gt PDF2 Run BibTeX - Needed to find references3 Run LaTeX -gt PDF4 Run LaTeX -gt PDF
Depending on build set-up may be able to just run LateX -gt PDF twice
Must run LaTeX at least twice at end to get all numbering correct
LaTeX Overfull hbox Warnings
Your dissertation will be rejected if you dont fix these 1 Formulae LaTeX will not wrap if they go into the margins
bull You will get a warning message but LaTeX will compile normally with the formula even running off the side of the page
2 Long Words Manually help LaTeX hyphenatebull If a long word will just end into the margin and LaTeX is not sure
where to hyphenate to split the word over two lines it may let it run into the margin
bull Control the hyphenation manually to keep within the margins using the hyphenation hints command at the top of the template Example hyphenationrep-re-sent-a-tivematlaber-go-nom-ic
3 Verbatim Use of the verbatim environment removes all of LaTeXs formating controls for that section
bull You must manually add line returns to prevent overflow
Some Useful Packages verbatim
bull Allows you to type exact text bull Great for software output
Matlab
beginboxedverbatim
gtgt A = 4ones(3)
A =
04000 04000 04000
04000 04000 04000
04000 04000 04000
endboxedverbatim
Some useful packages - Tables longtable
bull allows table that extends over multiple pages to be split multirow
bull allows table columns to span multiple rows columns
usepackagemultirow
begintabularcc|c|c|c|c|l
cline3-6
amp amp multicolumn4|c|Primes cline3-6
amp amp 2 amp 3 amp 5 amp 7 cline1-6
multicolumn1|c|multirow2Powers amp
multicolumn1|c|504 amp 3 amp 2 amp 0 amp 1 amp cline2-6
multicolumn1|c| amp
multicolumn1|c|540 amp 2 amp 3 amp 1 amp 0 amp cline1-6
multicolumn1|c|multirow2Powers amp
multicolumn1|c|gcd amp 2 amp 2 amp 0 amp 0 amp min cline2-6
multicolumn1|c| amp
multicolumn1|c|lcm amp 3 amp 3 amp 1 amp 1 amp max cline1-6
endtabular
Some useful packages - Figures wrapfig
bull allows text to wrap around the figure instead of the figure taking up an entire line
subfigbull place several figures (or tables) into one figure (table) with separate
caption options
usepackagesubfig
beginfigure
centering
subfigure[A gull]qquad
subfigure[A tiger]qquad
subfigure[A mouse]
label3figs-c
captionPictures of animalslabel3figs
endfigure
Equations Define complex commonly used symbols at start of document
newcommandvc[1]mboxboldmath$1$
newcommandyijvcy_ij
newcommandbSbvcb^T vcSigma_u vcb
newcommandcovoperatornamecov
newcommandvaroperatornamevar
newcommandtroperatornametr
Reference equations using eqref to automatically get parentheses Egequation eqrefeqintegration equation (12)
EquationsEnvironments in amsmath package align
bull nicer multiline equation alignment
beginalignvcnu^(k+1) amp= vcnu^(k)+(vcX_1E(vcM)^(k)vcX_1)^-1vcX_1E(tildevcY)^(k)halR amp= left( sum_iXRi^TXRi right)^-1Esum_ivcX_2i^T(vcr_i-vc1_n_ivcb^Tui)hb amp= Eleft( sum_in_iuiui^T right)^-1Esum_iuivc1_n_i^T(vcr_i-vcX_2ivcalpha_2)hsigu amp= left(sum_in_iright)^-1Esum_in_iuiui^Thsigb amp= left(sum_in_iright)^-1Esum_ijvcbeta_ijvcbeta_ij^ThsigR amp= left(sum_in_iright)^-1Esum_i(vcr_i-vcX_2ivcalpha_2-vc1_nivcb^Tui)^Tamp qquad times(vcr_i-vcX_2ivcalpha_2-vc1_nivcb^Tui)endalign
EquationsEnvironments alignat
bull align equations at more than one place split
bull use inside equation align etc to split an equation over multiple lines with multiline equation getting only one reference number
beginequationlabelxx
beginsplit
aamp=b+c-d
ampquad +e-f
amp=g+h
amp=i
endsplit
endequation
EquationsEnvironments multline
bull align first line of equation on the left last line on the right and center middle lines
beginmultline
a+b+c+d+e+f
+i+j+k+l+m+n
endmultline
gatherbull center alignment of all equations
Equations
Useful commands in amsmathpackage intertext
bull place correctly formatted lines of text in middle of equation without affecting alignment
The second two simulations were performed assuming the true underlying model was the shared parameter model below with 30 and 50 censoring rates respectivelybeginalignmboxlogit(mu_jkt)=amp-34+23(I_t=2)+2(mboxiron)+01(mboxtime)amp +beta_j1+(mboxtime)beta_j2 qquad qquad t=12log(r_j)=amp12+013(mboxiron)+01(mboxlength of ESRD)amp +beta_j1+01beta_j2+err_j intertextwhere left(beginarraycc beta_j1 beta_j2 endarray right) sim amp N left(left(beginarraycc00 endarray right)left(beginarraycc08 amp0101 amp02endarray right) right) err_j sim amp N(007)endalign
EquationsUseful commands in amsmath package left right
bull used to let LaTeX set deliminator sizes correctly over multiple lines of equations
beginalign
phi(yijamp|xyuivcbeta_ijhatvcvarphi)
amp=
amp times prod_t=2^S-1left(fracmboxexp(alpha_01++alpha_0t+vcx_1ijk^Tvcalpha_1+T
1+mboxexp(alpha_01++alpha_0t+vcx_1ijk^Tvcalpha_1+T right
amp left -fracmboxexp(alpha_01++alpha_0(t-1)+vcx_1ijk^Tvcalpha_1
+T
1+mboxexp(alpha_01++alpha_0(t-1)+vcx_1ijk^Tvcalpha_1+Tright)^y_ijkt
amp
Tamp=
endalign
Equations
Useful commands in amsmath package shoveleft shoveright
bull aligns equation to the left right of the linebeginmultline
A
B
shoverightC
D
endmultline
AB
CD
LaTeX Resources
Good intro to LaTeX atbull httpswwwlatex-projectorgbull httpsenwikibooksorgwikiLaTeX
Booksbull httpswwwlatex-projectorghelpbooksbull Frank Mittelbach Michel Goossens Johannes Braams David Carlisle
Chris Rowley (2004) The LaTeX Companion 2nd edition
PhD Dissertation Template ndash ltdissertationex2017texgt
PhD Dissertation Template ndash Preamble
PhD Dissertation Template ndash Preamble
PhD Dissertation Template ndash Main Text
PhD Dissertation Template ndash Main Text Can split document into multiple tex files
beginmainf
includeintroduction - links in file ltintroductiontexgtincludechapter1 - links in file ltchapter1texgtincludechapter2includechapter3includediscussion
endmainf
Allows compiling by file to check for errorsincludeonlychapter1chapter2begindocument
- only include chapters 1 amp 2 when compiling
- must come directly before begindocument
PhD Dissertation Template ndash Appendices
Labels Cross References LaTeX uses cross-references and labels to ensure all
numbering is correctbull Never type a number of a chapter section figure table equation etc
Use label to name parts to cross-referencechptIntroduction labelchptintrocaptionMy figure of the datalabelfigdata
Use ref to cross-reference the number in the textSee chapter refchptintro for more informationshown in Figure reffigdataFigure~reffig1
~ prevents LaTeX wrapping a line between Figure and the number No spaces
References Are controlled using biblatex a bibliography file and citation
commands in the tex file Never manually type a reference in your document BibLaTeX help
bull httpswwwsharelatexcomblog20130731getting-started-with-biblatexhtml
All citations should be placed in a bibliography file (bib) In your tex file use
bull Inline citation citeten2000mix Ten Have et al 2000bull Parenthesized citation
citep[eg][]pin2006eff (eg Pinheiro and Chao 2006)bull Multiple parenthesized citations citepten2000mixpin2006eff
Bibliography File Contains all details for each reference
ARTICLEli2010modauthor = LiY and WileytoE P and HeitjanDtitle = Modeling smoking cessation data with alternating states and
a cure fraction using frailty modelsjournal = Statistics in Medicinevolume = 29pages = 627-638year = 2010
Can contain references you donrsquot use in the tex file bull If not cited they wonrsquot be included in your reference list
Use to maintain capitals in titles Eg HIV
key used in cite commands to link to reference
Bibliography FileCreation of BibTex entries OttoBib - search for books by ISBN Google Scholar - click the ldquoScholar preferencesrdquo link Under
Bibliography Manager select ldquoShow links to import citations into BibTeXrdquo Save preferences
TeXMed ndash converts PubMed Medline entries into BibTex formathttpwwwbioinformaticsorgtexmed
Bibliography FileManaging BibTex entries JabRef
bull httpjabrefsourceforgenetbull Java based graphical front end to manage BibTeX databasesbull Can directly import references from online
Compiling the Dissertation Multiple steps needed to ldquoBuildrdquo1 Run LaTeX -gt PDF2 Run BibTeX - Needed to find references3 Run LaTeX -gt PDF4 Run LaTeX -gt PDF
Depending on build set-up may be able to just run LateX -gt PDF twice
Must run LaTeX at least twice at end to get all numbering correct
LaTeX Overfull hbox Warnings
Your dissertation will be rejected if you dont fix these 1 Formulae LaTeX will not wrap if they go into the margins
bull You will get a warning message but LaTeX will compile normally with the formula even running off the side of the page
2 Long Words Manually help LaTeX hyphenatebull If a long word will just end into the margin and LaTeX is not sure
where to hyphenate to split the word over two lines it may let it run into the margin
bull Control the hyphenation manually to keep within the margins using the hyphenation hints command at the top of the template Example hyphenationrep-re-sent-a-tivematlaber-go-nom-ic
3 Verbatim Use of the verbatim environment removes all of LaTeXs formating controls for that section
bull You must manually add line returns to prevent overflow
Some Useful Packages verbatim
bull Allows you to type exact text bull Great for software output
Matlab
beginboxedverbatim
gtgt A = 4ones(3)
A =
04000 04000 04000
04000 04000 04000
04000 04000 04000
endboxedverbatim
Some useful packages - Tables longtable
bull allows table that extends over multiple pages to be split multirow
bull allows table columns to span multiple rows columns
usepackagemultirow
begintabularcc|c|c|c|c|l
cline3-6
amp amp multicolumn4|c|Primes cline3-6
amp amp 2 amp 3 amp 5 amp 7 cline1-6
multicolumn1|c|multirow2Powers amp
multicolumn1|c|504 amp 3 amp 2 amp 0 amp 1 amp cline2-6
multicolumn1|c| amp
multicolumn1|c|540 amp 2 amp 3 amp 1 amp 0 amp cline1-6
multicolumn1|c|multirow2Powers amp
multicolumn1|c|gcd amp 2 amp 2 amp 0 amp 0 amp min cline2-6
multicolumn1|c| amp
multicolumn1|c|lcm amp 3 amp 3 amp 1 amp 1 amp max cline1-6
endtabular
Some useful packages - Figures wrapfig
bull allows text to wrap around the figure instead of the figure taking up an entire line
subfigbull place several figures (or tables) into one figure (table) with separate
caption options
usepackagesubfig
beginfigure
centering
subfigure[A gull]qquad
subfigure[A tiger]qquad
subfigure[A mouse]
label3figs-c
captionPictures of animalslabel3figs
endfigure
Equations Define complex commonly used symbols at start of document
newcommandvc[1]mboxboldmath$1$
newcommandyijvcy_ij
newcommandbSbvcb^T vcSigma_u vcb
newcommandcovoperatornamecov
newcommandvaroperatornamevar
newcommandtroperatornametr
Reference equations using eqref to automatically get parentheses Egequation eqrefeqintegration equation (12)
EquationsEnvironments in amsmath package align
bull nicer multiline equation alignment
beginalignvcnu^(k+1) amp= vcnu^(k)+(vcX_1E(vcM)^(k)vcX_1)^-1vcX_1E(tildevcY)^(k)halR amp= left( sum_iXRi^TXRi right)^-1Esum_ivcX_2i^T(vcr_i-vc1_n_ivcb^Tui)hb amp= Eleft( sum_in_iuiui^T right)^-1Esum_iuivc1_n_i^T(vcr_i-vcX_2ivcalpha_2)hsigu amp= left(sum_in_iright)^-1Esum_in_iuiui^Thsigb amp= left(sum_in_iright)^-1Esum_ijvcbeta_ijvcbeta_ij^ThsigR amp= left(sum_in_iright)^-1Esum_i(vcr_i-vcX_2ivcalpha_2-vc1_nivcb^Tui)^Tamp qquad times(vcr_i-vcX_2ivcalpha_2-vc1_nivcb^Tui)endalign
EquationsEnvironments alignat
bull align equations at more than one place split
bull use inside equation align etc to split an equation over multiple lines with multiline equation getting only one reference number
beginequationlabelxx
beginsplit
aamp=b+c-d
ampquad +e-f
amp=g+h
amp=i
endsplit
endequation
EquationsEnvironments multline
bull align first line of equation on the left last line on the right and center middle lines
beginmultline
a+b+c+d+e+f
+i+j+k+l+m+n
endmultline
gatherbull center alignment of all equations
Equations
Useful commands in amsmathpackage intertext
bull place correctly formatted lines of text in middle of equation without affecting alignment
The second two simulations were performed assuming the true underlying model was the shared parameter model below with 30 and 50 censoring rates respectivelybeginalignmboxlogit(mu_jkt)=amp-34+23(I_t=2)+2(mboxiron)+01(mboxtime)amp +beta_j1+(mboxtime)beta_j2 qquad qquad t=12log(r_j)=amp12+013(mboxiron)+01(mboxlength of ESRD)amp +beta_j1+01beta_j2+err_j intertextwhere left(beginarraycc beta_j1 beta_j2 endarray right) sim amp N left(left(beginarraycc00 endarray right)left(beginarraycc08 amp0101 amp02endarray right) right) err_j sim amp N(007)endalign
EquationsUseful commands in amsmath package left right
bull used to let LaTeX set deliminator sizes correctly over multiple lines of equations
beginalign
phi(yijamp|xyuivcbeta_ijhatvcvarphi)
amp=
amp times prod_t=2^S-1left(fracmboxexp(alpha_01++alpha_0t+vcx_1ijk^Tvcalpha_1+T
1+mboxexp(alpha_01++alpha_0t+vcx_1ijk^Tvcalpha_1+T right
amp left -fracmboxexp(alpha_01++alpha_0(t-1)+vcx_1ijk^Tvcalpha_1
+T
1+mboxexp(alpha_01++alpha_0(t-1)+vcx_1ijk^Tvcalpha_1+Tright)^y_ijkt
amp
Tamp=
endalign
Equations
Useful commands in amsmath package shoveleft shoveright
bull aligns equation to the left right of the linebeginmultline
A
B
shoverightC
D
endmultline
AB
CD
LaTeX Resources
Good intro to LaTeX atbull httpswwwlatex-projectorgbull httpsenwikibooksorgwikiLaTeX
Booksbull httpswwwlatex-projectorghelpbooksbull Frank Mittelbach Michel Goossens Johannes Braams David Carlisle
Chris Rowley (2004) The LaTeX Companion 2nd edition
PhD Dissertation Template ndash Preamble
PhD Dissertation Template ndash Preamble
PhD Dissertation Template ndash Main Text
PhD Dissertation Template ndash Main Text Can split document into multiple tex files
beginmainf
includeintroduction - links in file ltintroductiontexgtincludechapter1 - links in file ltchapter1texgtincludechapter2includechapter3includediscussion
endmainf
Allows compiling by file to check for errorsincludeonlychapter1chapter2begindocument
- only include chapters 1 amp 2 when compiling
- must come directly before begindocument
PhD Dissertation Template ndash Appendices
Labels Cross References LaTeX uses cross-references and labels to ensure all
numbering is correctbull Never type a number of a chapter section figure table equation etc
Use label to name parts to cross-referencechptIntroduction labelchptintrocaptionMy figure of the datalabelfigdata
Use ref to cross-reference the number in the textSee chapter refchptintro for more informationshown in Figure reffigdataFigure~reffig1
~ prevents LaTeX wrapping a line between Figure and the number No spaces
References Are controlled using biblatex a bibliography file and citation
commands in the tex file Never manually type a reference in your document BibLaTeX help
bull httpswwwsharelatexcomblog20130731getting-started-with-biblatexhtml
All citations should be placed in a bibliography file (bib) In your tex file use
bull Inline citation citeten2000mix Ten Have et al 2000bull Parenthesized citation
citep[eg][]pin2006eff (eg Pinheiro and Chao 2006)bull Multiple parenthesized citations citepten2000mixpin2006eff
Bibliography File Contains all details for each reference
ARTICLEli2010modauthor = LiY and WileytoE P and HeitjanDtitle = Modeling smoking cessation data with alternating states and
a cure fraction using frailty modelsjournal = Statistics in Medicinevolume = 29pages = 627-638year = 2010
Can contain references you donrsquot use in the tex file bull If not cited they wonrsquot be included in your reference list
Use to maintain capitals in titles Eg HIV
key used in cite commands to link to reference
Bibliography FileCreation of BibTex entries OttoBib - search for books by ISBN Google Scholar - click the ldquoScholar preferencesrdquo link Under
Bibliography Manager select ldquoShow links to import citations into BibTeXrdquo Save preferences
TeXMed ndash converts PubMed Medline entries into BibTex formathttpwwwbioinformaticsorgtexmed
Bibliography FileManaging BibTex entries JabRef
bull httpjabrefsourceforgenetbull Java based graphical front end to manage BibTeX databasesbull Can directly import references from online
Compiling the Dissertation Multiple steps needed to ldquoBuildrdquo1 Run LaTeX -gt PDF2 Run BibTeX - Needed to find references3 Run LaTeX -gt PDF4 Run LaTeX -gt PDF
Depending on build set-up may be able to just run LateX -gt PDF twice
Must run LaTeX at least twice at end to get all numbering correct
LaTeX Overfull hbox Warnings
Your dissertation will be rejected if you dont fix these 1 Formulae LaTeX will not wrap if they go into the margins
bull You will get a warning message but LaTeX will compile normally with the formula even running off the side of the page
2 Long Words Manually help LaTeX hyphenatebull If a long word will just end into the margin and LaTeX is not sure
where to hyphenate to split the word over two lines it may let it run into the margin
bull Control the hyphenation manually to keep within the margins using the hyphenation hints command at the top of the template Example hyphenationrep-re-sent-a-tivematlaber-go-nom-ic
3 Verbatim Use of the verbatim environment removes all of LaTeXs formating controls for that section
bull You must manually add line returns to prevent overflow
Some Useful Packages verbatim
bull Allows you to type exact text bull Great for software output
Matlab
beginboxedverbatim
gtgt A = 4ones(3)
A =
04000 04000 04000
04000 04000 04000
04000 04000 04000
endboxedverbatim
Some useful packages - Tables longtable
bull allows table that extends over multiple pages to be split multirow
bull allows table columns to span multiple rows columns
usepackagemultirow
begintabularcc|c|c|c|c|l
cline3-6
amp amp multicolumn4|c|Primes cline3-6
amp amp 2 amp 3 amp 5 amp 7 cline1-6
multicolumn1|c|multirow2Powers amp
multicolumn1|c|504 amp 3 amp 2 amp 0 amp 1 amp cline2-6
multicolumn1|c| amp
multicolumn1|c|540 amp 2 amp 3 amp 1 amp 0 amp cline1-6
multicolumn1|c|multirow2Powers amp
multicolumn1|c|gcd amp 2 amp 2 amp 0 amp 0 amp min cline2-6
multicolumn1|c| amp
multicolumn1|c|lcm amp 3 amp 3 amp 1 amp 1 amp max cline1-6
endtabular
Some useful packages - Figures wrapfig
bull allows text to wrap around the figure instead of the figure taking up an entire line
subfigbull place several figures (or tables) into one figure (table) with separate
caption options
usepackagesubfig
beginfigure
centering
subfigure[A gull]qquad
subfigure[A tiger]qquad
subfigure[A mouse]
label3figs-c
captionPictures of animalslabel3figs
endfigure
Equations Define complex commonly used symbols at start of document
newcommandvc[1]mboxboldmath$1$
newcommandyijvcy_ij
newcommandbSbvcb^T vcSigma_u vcb
newcommandcovoperatornamecov
newcommandvaroperatornamevar
newcommandtroperatornametr
Reference equations using eqref to automatically get parentheses Egequation eqrefeqintegration equation (12)
EquationsEnvironments in amsmath package align
bull nicer multiline equation alignment
beginalignvcnu^(k+1) amp= vcnu^(k)+(vcX_1E(vcM)^(k)vcX_1)^-1vcX_1E(tildevcY)^(k)halR amp= left( sum_iXRi^TXRi right)^-1Esum_ivcX_2i^T(vcr_i-vc1_n_ivcb^Tui)hb amp= Eleft( sum_in_iuiui^T right)^-1Esum_iuivc1_n_i^T(vcr_i-vcX_2ivcalpha_2)hsigu amp= left(sum_in_iright)^-1Esum_in_iuiui^Thsigb amp= left(sum_in_iright)^-1Esum_ijvcbeta_ijvcbeta_ij^ThsigR amp= left(sum_in_iright)^-1Esum_i(vcr_i-vcX_2ivcalpha_2-vc1_nivcb^Tui)^Tamp qquad times(vcr_i-vcX_2ivcalpha_2-vc1_nivcb^Tui)endalign
EquationsEnvironments alignat
bull align equations at more than one place split
bull use inside equation align etc to split an equation over multiple lines with multiline equation getting only one reference number
beginequationlabelxx
beginsplit
aamp=b+c-d
ampquad +e-f
amp=g+h
amp=i
endsplit
endequation
EquationsEnvironments multline
bull align first line of equation on the left last line on the right and center middle lines
beginmultline
a+b+c+d+e+f
+i+j+k+l+m+n
endmultline
gatherbull center alignment of all equations
Equations
Useful commands in amsmathpackage intertext
bull place correctly formatted lines of text in middle of equation without affecting alignment
The second two simulations were performed assuming the true underlying model was the shared parameter model below with 30 and 50 censoring rates respectivelybeginalignmboxlogit(mu_jkt)=amp-34+23(I_t=2)+2(mboxiron)+01(mboxtime)amp +beta_j1+(mboxtime)beta_j2 qquad qquad t=12log(r_j)=amp12+013(mboxiron)+01(mboxlength of ESRD)amp +beta_j1+01beta_j2+err_j intertextwhere left(beginarraycc beta_j1 beta_j2 endarray right) sim amp N left(left(beginarraycc00 endarray right)left(beginarraycc08 amp0101 amp02endarray right) right) err_j sim amp N(007)endalign
EquationsUseful commands in amsmath package left right
bull used to let LaTeX set deliminator sizes correctly over multiple lines of equations
beginalign
phi(yijamp|xyuivcbeta_ijhatvcvarphi)
amp=
amp times prod_t=2^S-1left(fracmboxexp(alpha_01++alpha_0t+vcx_1ijk^Tvcalpha_1+T
1+mboxexp(alpha_01++alpha_0t+vcx_1ijk^Tvcalpha_1+T right
amp left -fracmboxexp(alpha_01++alpha_0(t-1)+vcx_1ijk^Tvcalpha_1
+T
1+mboxexp(alpha_01++alpha_0(t-1)+vcx_1ijk^Tvcalpha_1+Tright)^y_ijkt
amp
Tamp=
endalign
Equations
Useful commands in amsmath package shoveleft shoveright
bull aligns equation to the left right of the linebeginmultline
A
B
shoverightC
D
endmultline
AB
CD
LaTeX Resources
Good intro to LaTeX atbull httpswwwlatex-projectorgbull httpsenwikibooksorgwikiLaTeX
Booksbull httpswwwlatex-projectorghelpbooksbull Frank Mittelbach Michel Goossens Johannes Braams David Carlisle
Chris Rowley (2004) The LaTeX Companion 2nd edition
PhD Dissertation Template ndash Preamble
PhD Dissertation Template ndash Main Text
PhD Dissertation Template ndash Main Text Can split document into multiple tex files
beginmainf
includeintroduction - links in file ltintroductiontexgtincludechapter1 - links in file ltchapter1texgtincludechapter2includechapter3includediscussion
endmainf
Allows compiling by file to check for errorsincludeonlychapter1chapter2begindocument
- only include chapters 1 amp 2 when compiling
- must come directly before begindocument
PhD Dissertation Template ndash Appendices
Labels Cross References LaTeX uses cross-references and labels to ensure all
numbering is correctbull Never type a number of a chapter section figure table equation etc
Use label to name parts to cross-referencechptIntroduction labelchptintrocaptionMy figure of the datalabelfigdata
Use ref to cross-reference the number in the textSee chapter refchptintro for more informationshown in Figure reffigdataFigure~reffig1
~ prevents LaTeX wrapping a line between Figure and the number No spaces
References Are controlled using biblatex a bibliography file and citation
commands in the tex file Never manually type a reference in your document BibLaTeX help
bull httpswwwsharelatexcomblog20130731getting-started-with-biblatexhtml
All citations should be placed in a bibliography file (bib) In your tex file use
bull Inline citation citeten2000mix Ten Have et al 2000bull Parenthesized citation
citep[eg][]pin2006eff (eg Pinheiro and Chao 2006)bull Multiple parenthesized citations citepten2000mixpin2006eff
Bibliography File Contains all details for each reference
ARTICLEli2010modauthor = LiY and WileytoE P and HeitjanDtitle = Modeling smoking cessation data with alternating states and
a cure fraction using frailty modelsjournal = Statistics in Medicinevolume = 29pages = 627-638year = 2010
Can contain references you donrsquot use in the tex file bull If not cited they wonrsquot be included in your reference list
Use to maintain capitals in titles Eg HIV
key used in cite commands to link to reference
Bibliography FileCreation of BibTex entries OttoBib - search for books by ISBN Google Scholar - click the ldquoScholar preferencesrdquo link Under
Bibliography Manager select ldquoShow links to import citations into BibTeXrdquo Save preferences
TeXMed ndash converts PubMed Medline entries into BibTex formathttpwwwbioinformaticsorgtexmed
Bibliography FileManaging BibTex entries JabRef
bull httpjabrefsourceforgenetbull Java based graphical front end to manage BibTeX databasesbull Can directly import references from online
Compiling the Dissertation Multiple steps needed to ldquoBuildrdquo1 Run LaTeX -gt PDF2 Run BibTeX - Needed to find references3 Run LaTeX -gt PDF4 Run LaTeX -gt PDF
Depending on build set-up may be able to just run LateX -gt PDF twice
Must run LaTeX at least twice at end to get all numbering correct
LaTeX Overfull hbox Warnings
Your dissertation will be rejected if you dont fix these 1 Formulae LaTeX will not wrap if they go into the margins
bull You will get a warning message but LaTeX will compile normally with the formula even running off the side of the page
2 Long Words Manually help LaTeX hyphenatebull If a long word will just end into the margin and LaTeX is not sure
where to hyphenate to split the word over two lines it may let it run into the margin
bull Control the hyphenation manually to keep within the margins using the hyphenation hints command at the top of the template Example hyphenationrep-re-sent-a-tivematlaber-go-nom-ic
3 Verbatim Use of the verbatim environment removes all of LaTeXs formating controls for that section
bull You must manually add line returns to prevent overflow
Some Useful Packages verbatim
bull Allows you to type exact text bull Great for software output
Matlab
beginboxedverbatim
gtgt A = 4ones(3)
A =
04000 04000 04000
04000 04000 04000
04000 04000 04000
endboxedverbatim
Some useful packages - Tables longtable
bull allows table that extends over multiple pages to be split multirow
bull allows table columns to span multiple rows columns
usepackagemultirow
begintabularcc|c|c|c|c|l
cline3-6
amp amp multicolumn4|c|Primes cline3-6
amp amp 2 amp 3 amp 5 amp 7 cline1-6
multicolumn1|c|multirow2Powers amp
multicolumn1|c|504 amp 3 amp 2 amp 0 amp 1 amp cline2-6
multicolumn1|c| amp
multicolumn1|c|540 amp 2 amp 3 amp 1 amp 0 amp cline1-6
multicolumn1|c|multirow2Powers amp
multicolumn1|c|gcd amp 2 amp 2 amp 0 amp 0 amp min cline2-6
multicolumn1|c| amp
multicolumn1|c|lcm amp 3 amp 3 amp 1 amp 1 amp max cline1-6
endtabular
Some useful packages - Figures wrapfig
bull allows text to wrap around the figure instead of the figure taking up an entire line
subfigbull place several figures (or tables) into one figure (table) with separate
caption options
usepackagesubfig
beginfigure
centering
subfigure[A gull]qquad
subfigure[A tiger]qquad
subfigure[A mouse]
label3figs-c
captionPictures of animalslabel3figs
endfigure
Equations Define complex commonly used symbols at start of document
newcommandvc[1]mboxboldmath$1$
newcommandyijvcy_ij
newcommandbSbvcb^T vcSigma_u vcb
newcommandcovoperatornamecov
newcommandvaroperatornamevar
newcommandtroperatornametr
Reference equations using eqref to automatically get parentheses Egequation eqrefeqintegration equation (12)
EquationsEnvironments in amsmath package align
bull nicer multiline equation alignment
beginalignvcnu^(k+1) amp= vcnu^(k)+(vcX_1E(vcM)^(k)vcX_1)^-1vcX_1E(tildevcY)^(k)halR amp= left( sum_iXRi^TXRi right)^-1Esum_ivcX_2i^T(vcr_i-vc1_n_ivcb^Tui)hb amp= Eleft( sum_in_iuiui^T right)^-1Esum_iuivc1_n_i^T(vcr_i-vcX_2ivcalpha_2)hsigu amp= left(sum_in_iright)^-1Esum_in_iuiui^Thsigb amp= left(sum_in_iright)^-1Esum_ijvcbeta_ijvcbeta_ij^ThsigR amp= left(sum_in_iright)^-1Esum_i(vcr_i-vcX_2ivcalpha_2-vc1_nivcb^Tui)^Tamp qquad times(vcr_i-vcX_2ivcalpha_2-vc1_nivcb^Tui)endalign
EquationsEnvironments alignat
bull align equations at more than one place split
bull use inside equation align etc to split an equation over multiple lines with multiline equation getting only one reference number
beginequationlabelxx
beginsplit
aamp=b+c-d
ampquad +e-f
amp=g+h
amp=i
endsplit
endequation
EquationsEnvironments multline
bull align first line of equation on the left last line on the right and center middle lines
beginmultline
a+b+c+d+e+f
+i+j+k+l+m+n
endmultline
gatherbull center alignment of all equations
Equations
Useful commands in amsmathpackage intertext
bull place correctly formatted lines of text in middle of equation without affecting alignment
The second two simulations were performed assuming the true underlying model was the shared parameter model below with 30 and 50 censoring rates respectivelybeginalignmboxlogit(mu_jkt)=amp-34+23(I_t=2)+2(mboxiron)+01(mboxtime)amp +beta_j1+(mboxtime)beta_j2 qquad qquad t=12log(r_j)=amp12+013(mboxiron)+01(mboxlength of ESRD)amp +beta_j1+01beta_j2+err_j intertextwhere left(beginarraycc beta_j1 beta_j2 endarray right) sim amp N left(left(beginarraycc00 endarray right)left(beginarraycc08 amp0101 amp02endarray right) right) err_j sim amp N(007)endalign
EquationsUseful commands in amsmath package left right
bull used to let LaTeX set deliminator sizes correctly over multiple lines of equations
beginalign
phi(yijamp|xyuivcbeta_ijhatvcvarphi)
amp=
amp times prod_t=2^S-1left(fracmboxexp(alpha_01++alpha_0t+vcx_1ijk^Tvcalpha_1+T
1+mboxexp(alpha_01++alpha_0t+vcx_1ijk^Tvcalpha_1+T right
amp left -fracmboxexp(alpha_01++alpha_0(t-1)+vcx_1ijk^Tvcalpha_1
+T
1+mboxexp(alpha_01++alpha_0(t-1)+vcx_1ijk^Tvcalpha_1+Tright)^y_ijkt
amp
Tamp=
endalign
Equations
Useful commands in amsmath package shoveleft shoveright
bull aligns equation to the left right of the linebeginmultline
A
B
shoverightC
D
endmultline
AB
CD
LaTeX Resources
Good intro to LaTeX atbull httpswwwlatex-projectorgbull httpsenwikibooksorgwikiLaTeX
Booksbull httpswwwlatex-projectorghelpbooksbull Frank Mittelbach Michel Goossens Johannes Braams David Carlisle
Chris Rowley (2004) The LaTeX Companion 2nd edition
PhD Dissertation Template ndash Main Text
PhD Dissertation Template ndash Main Text Can split document into multiple tex files
beginmainf
includeintroduction - links in file ltintroductiontexgtincludechapter1 - links in file ltchapter1texgtincludechapter2includechapter3includediscussion
endmainf
Allows compiling by file to check for errorsincludeonlychapter1chapter2begindocument
- only include chapters 1 amp 2 when compiling
- must come directly before begindocument
PhD Dissertation Template ndash Appendices
Labels Cross References LaTeX uses cross-references and labels to ensure all
numbering is correctbull Never type a number of a chapter section figure table equation etc
Use label to name parts to cross-referencechptIntroduction labelchptintrocaptionMy figure of the datalabelfigdata
Use ref to cross-reference the number in the textSee chapter refchptintro for more informationshown in Figure reffigdataFigure~reffig1
~ prevents LaTeX wrapping a line between Figure and the number No spaces
References Are controlled using biblatex a bibliography file and citation
commands in the tex file Never manually type a reference in your document BibLaTeX help
bull httpswwwsharelatexcomblog20130731getting-started-with-biblatexhtml
All citations should be placed in a bibliography file (bib) In your tex file use
bull Inline citation citeten2000mix Ten Have et al 2000bull Parenthesized citation
citep[eg][]pin2006eff (eg Pinheiro and Chao 2006)bull Multiple parenthesized citations citepten2000mixpin2006eff
Bibliography File Contains all details for each reference
ARTICLEli2010modauthor = LiY and WileytoE P and HeitjanDtitle = Modeling smoking cessation data with alternating states and
a cure fraction using frailty modelsjournal = Statistics in Medicinevolume = 29pages = 627-638year = 2010
Can contain references you donrsquot use in the tex file bull If not cited they wonrsquot be included in your reference list
Use to maintain capitals in titles Eg HIV
key used in cite commands to link to reference
Bibliography FileCreation of BibTex entries OttoBib - search for books by ISBN Google Scholar - click the ldquoScholar preferencesrdquo link Under
Bibliography Manager select ldquoShow links to import citations into BibTeXrdquo Save preferences
TeXMed ndash converts PubMed Medline entries into BibTex formathttpwwwbioinformaticsorgtexmed
Bibliography FileManaging BibTex entries JabRef
bull httpjabrefsourceforgenetbull Java based graphical front end to manage BibTeX databasesbull Can directly import references from online
Compiling the Dissertation Multiple steps needed to ldquoBuildrdquo1 Run LaTeX -gt PDF2 Run BibTeX - Needed to find references3 Run LaTeX -gt PDF4 Run LaTeX -gt PDF
Depending on build set-up may be able to just run LateX -gt PDF twice
Must run LaTeX at least twice at end to get all numbering correct
LaTeX Overfull hbox Warnings
Your dissertation will be rejected if you dont fix these 1 Formulae LaTeX will not wrap if they go into the margins
bull You will get a warning message but LaTeX will compile normally with the formula even running off the side of the page
2 Long Words Manually help LaTeX hyphenatebull If a long word will just end into the margin and LaTeX is not sure
where to hyphenate to split the word over two lines it may let it run into the margin
bull Control the hyphenation manually to keep within the margins using the hyphenation hints command at the top of the template Example hyphenationrep-re-sent-a-tivematlaber-go-nom-ic
3 Verbatim Use of the verbatim environment removes all of LaTeXs formating controls for that section
bull You must manually add line returns to prevent overflow
Some Useful Packages verbatim
bull Allows you to type exact text bull Great for software output
Matlab
beginboxedverbatim
gtgt A = 4ones(3)
A =
04000 04000 04000
04000 04000 04000
04000 04000 04000
endboxedverbatim
Some useful packages - Tables longtable
bull allows table that extends over multiple pages to be split multirow
bull allows table columns to span multiple rows columns
usepackagemultirow
begintabularcc|c|c|c|c|l
cline3-6
amp amp multicolumn4|c|Primes cline3-6
amp amp 2 amp 3 amp 5 amp 7 cline1-6
multicolumn1|c|multirow2Powers amp
multicolumn1|c|504 amp 3 amp 2 amp 0 amp 1 amp cline2-6
multicolumn1|c| amp
multicolumn1|c|540 amp 2 amp 3 amp 1 amp 0 amp cline1-6
multicolumn1|c|multirow2Powers amp
multicolumn1|c|gcd amp 2 amp 2 amp 0 amp 0 amp min cline2-6
multicolumn1|c| amp
multicolumn1|c|lcm amp 3 amp 3 amp 1 amp 1 amp max cline1-6
endtabular
Some useful packages - Figures wrapfig
bull allows text to wrap around the figure instead of the figure taking up an entire line
subfigbull place several figures (or tables) into one figure (table) with separate
caption options
usepackagesubfig
beginfigure
centering
subfigure[A gull]qquad
subfigure[A tiger]qquad
subfigure[A mouse]
label3figs-c
captionPictures of animalslabel3figs
endfigure
Equations Define complex commonly used symbols at start of document
newcommandvc[1]mboxboldmath$1$
newcommandyijvcy_ij
newcommandbSbvcb^T vcSigma_u vcb
newcommandcovoperatornamecov
newcommandvaroperatornamevar
newcommandtroperatornametr
Reference equations using eqref to automatically get parentheses Egequation eqrefeqintegration equation (12)
EquationsEnvironments in amsmath package align
bull nicer multiline equation alignment
beginalignvcnu^(k+1) amp= vcnu^(k)+(vcX_1E(vcM)^(k)vcX_1)^-1vcX_1E(tildevcY)^(k)halR amp= left( sum_iXRi^TXRi right)^-1Esum_ivcX_2i^T(vcr_i-vc1_n_ivcb^Tui)hb amp= Eleft( sum_in_iuiui^T right)^-1Esum_iuivc1_n_i^T(vcr_i-vcX_2ivcalpha_2)hsigu amp= left(sum_in_iright)^-1Esum_in_iuiui^Thsigb amp= left(sum_in_iright)^-1Esum_ijvcbeta_ijvcbeta_ij^ThsigR amp= left(sum_in_iright)^-1Esum_i(vcr_i-vcX_2ivcalpha_2-vc1_nivcb^Tui)^Tamp qquad times(vcr_i-vcX_2ivcalpha_2-vc1_nivcb^Tui)endalign
EquationsEnvironments alignat
bull align equations at more than one place split
bull use inside equation align etc to split an equation over multiple lines with multiline equation getting only one reference number
beginequationlabelxx
beginsplit
aamp=b+c-d
ampquad +e-f
amp=g+h
amp=i
endsplit
endequation
EquationsEnvironments multline
bull align first line of equation on the left last line on the right and center middle lines
beginmultline
a+b+c+d+e+f
+i+j+k+l+m+n
endmultline
gatherbull center alignment of all equations
Equations
Useful commands in amsmathpackage intertext
bull place correctly formatted lines of text in middle of equation without affecting alignment
The second two simulations were performed assuming the true underlying model was the shared parameter model below with 30 and 50 censoring rates respectivelybeginalignmboxlogit(mu_jkt)=amp-34+23(I_t=2)+2(mboxiron)+01(mboxtime)amp +beta_j1+(mboxtime)beta_j2 qquad qquad t=12log(r_j)=amp12+013(mboxiron)+01(mboxlength of ESRD)amp +beta_j1+01beta_j2+err_j intertextwhere left(beginarraycc beta_j1 beta_j2 endarray right) sim amp N left(left(beginarraycc00 endarray right)left(beginarraycc08 amp0101 amp02endarray right) right) err_j sim amp N(007)endalign
EquationsUseful commands in amsmath package left right
bull used to let LaTeX set deliminator sizes correctly over multiple lines of equations
beginalign
phi(yijamp|xyuivcbeta_ijhatvcvarphi)
amp=
amp times prod_t=2^S-1left(fracmboxexp(alpha_01++alpha_0t+vcx_1ijk^Tvcalpha_1+T
1+mboxexp(alpha_01++alpha_0t+vcx_1ijk^Tvcalpha_1+T right
amp left -fracmboxexp(alpha_01++alpha_0(t-1)+vcx_1ijk^Tvcalpha_1
+T
1+mboxexp(alpha_01++alpha_0(t-1)+vcx_1ijk^Tvcalpha_1+Tright)^y_ijkt
amp
Tamp=
endalign
Equations
Useful commands in amsmath package shoveleft shoveright
bull aligns equation to the left right of the linebeginmultline
A
B
shoverightC
D
endmultline
AB
CD
LaTeX Resources
Good intro to LaTeX atbull httpswwwlatex-projectorgbull httpsenwikibooksorgwikiLaTeX
Booksbull httpswwwlatex-projectorghelpbooksbull Frank Mittelbach Michel Goossens Johannes Braams David Carlisle
Chris Rowley (2004) The LaTeX Companion 2nd edition
PhD Dissertation Template ndash Main Text Can split document into multiple tex files
beginmainf
includeintroduction - links in file ltintroductiontexgtincludechapter1 - links in file ltchapter1texgtincludechapter2includechapter3includediscussion
endmainf
Allows compiling by file to check for errorsincludeonlychapter1chapter2begindocument
- only include chapters 1 amp 2 when compiling
- must come directly before begindocument
PhD Dissertation Template ndash Appendices
Labels Cross References LaTeX uses cross-references and labels to ensure all
numbering is correctbull Never type a number of a chapter section figure table equation etc
Use label to name parts to cross-referencechptIntroduction labelchptintrocaptionMy figure of the datalabelfigdata
Use ref to cross-reference the number in the textSee chapter refchptintro for more informationshown in Figure reffigdataFigure~reffig1
~ prevents LaTeX wrapping a line between Figure and the number No spaces
References Are controlled using biblatex a bibliography file and citation
commands in the tex file Never manually type a reference in your document BibLaTeX help
bull httpswwwsharelatexcomblog20130731getting-started-with-biblatexhtml
All citations should be placed in a bibliography file (bib) In your tex file use
bull Inline citation citeten2000mix Ten Have et al 2000bull Parenthesized citation
citep[eg][]pin2006eff (eg Pinheiro and Chao 2006)bull Multiple parenthesized citations citepten2000mixpin2006eff
Bibliography File Contains all details for each reference
ARTICLEli2010modauthor = LiY and WileytoE P and HeitjanDtitle = Modeling smoking cessation data with alternating states and
a cure fraction using frailty modelsjournal = Statistics in Medicinevolume = 29pages = 627-638year = 2010
Can contain references you donrsquot use in the tex file bull If not cited they wonrsquot be included in your reference list
Use to maintain capitals in titles Eg HIV
key used in cite commands to link to reference
Bibliography FileCreation of BibTex entries OttoBib - search for books by ISBN Google Scholar - click the ldquoScholar preferencesrdquo link Under
Bibliography Manager select ldquoShow links to import citations into BibTeXrdquo Save preferences
TeXMed ndash converts PubMed Medline entries into BibTex formathttpwwwbioinformaticsorgtexmed
Bibliography FileManaging BibTex entries JabRef
bull httpjabrefsourceforgenetbull Java based graphical front end to manage BibTeX databasesbull Can directly import references from online
Compiling the Dissertation Multiple steps needed to ldquoBuildrdquo1 Run LaTeX -gt PDF2 Run BibTeX - Needed to find references3 Run LaTeX -gt PDF4 Run LaTeX -gt PDF
Depending on build set-up may be able to just run LateX -gt PDF twice
Must run LaTeX at least twice at end to get all numbering correct
LaTeX Overfull hbox Warnings
Your dissertation will be rejected if you dont fix these 1 Formulae LaTeX will not wrap if they go into the margins
bull You will get a warning message but LaTeX will compile normally with the formula even running off the side of the page
2 Long Words Manually help LaTeX hyphenatebull If a long word will just end into the margin and LaTeX is not sure
where to hyphenate to split the word over two lines it may let it run into the margin
bull Control the hyphenation manually to keep within the margins using the hyphenation hints command at the top of the template Example hyphenationrep-re-sent-a-tivematlaber-go-nom-ic
3 Verbatim Use of the verbatim environment removes all of LaTeXs formating controls for that section
bull You must manually add line returns to prevent overflow
Some Useful Packages verbatim
bull Allows you to type exact text bull Great for software output
Matlab
beginboxedverbatim
gtgt A = 4ones(3)
A =
04000 04000 04000
04000 04000 04000
04000 04000 04000
endboxedverbatim
Some useful packages - Tables longtable
bull allows table that extends over multiple pages to be split multirow
bull allows table columns to span multiple rows columns
usepackagemultirow
begintabularcc|c|c|c|c|l
cline3-6
amp amp multicolumn4|c|Primes cline3-6
amp amp 2 amp 3 amp 5 amp 7 cline1-6
multicolumn1|c|multirow2Powers amp
multicolumn1|c|504 amp 3 amp 2 amp 0 amp 1 amp cline2-6
multicolumn1|c| amp
multicolumn1|c|540 amp 2 amp 3 amp 1 amp 0 amp cline1-6
multicolumn1|c|multirow2Powers amp
multicolumn1|c|gcd amp 2 amp 2 amp 0 amp 0 amp min cline2-6
multicolumn1|c| amp
multicolumn1|c|lcm amp 3 amp 3 amp 1 amp 1 amp max cline1-6
endtabular
Some useful packages - Figures wrapfig
bull allows text to wrap around the figure instead of the figure taking up an entire line
subfigbull place several figures (or tables) into one figure (table) with separate
caption options
usepackagesubfig
beginfigure
centering
subfigure[A gull]qquad
subfigure[A tiger]qquad
subfigure[A mouse]
label3figs-c
captionPictures of animalslabel3figs
endfigure
Equations Define complex commonly used symbols at start of document
newcommandvc[1]mboxboldmath$1$
newcommandyijvcy_ij
newcommandbSbvcb^T vcSigma_u vcb
newcommandcovoperatornamecov
newcommandvaroperatornamevar
newcommandtroperatornametr
Reference equations using eqref to automatically get parentheses Egequation eqrefeqintegration equation (12)
EquationsEnvironments in amsmath package align
bull nicer multiline equation alignment
beginalignvcnu^(k+1) amp= vcnu^(k)+(vcX_1E(vcM)^(k)vcX_1)^-1vcX_1E(tildevcY)^(k)halR amp= left( sum_iXRi^TXRi right)^-1Esum_ivcX_2i^T(vcr_i-vc1_n_ivcb^Tui)hb amp= Eleft( sum_in_iuiui^T right)^-1Esum_iuivc1_n_i^T(vcr_i-vcX_2ivcalpha_2)hsigu amp= left(sum_in_iright)^-1Esum_in_iuiui^Thsigb amp= left(sum_in_iright)^-1Esum_ijvcbeta_ijvcbeta_ij^ThsigR amp= left(sum_in_iright)^-1Esum_i(vcr_i-vcX_2ivcalpha_2-vc1_nivcb^Tui)^Tamp qquad times(vcr_i-vcX_2ivcalpha_2-vc1_nivcb^Tui)endalign
EquationsEnvironments alignat
bull align equations at more than one place split
bull use inside equation align etc to split an equation over multiple lines with multiline equation getting only one reference number
beginequationlabelxx
beginsplit
aamp=b+c-d
ampquad +e-f
amp=g+h
amp=i
endsplit
endequation
EquationsEnvironments multline
bull align first line of equation on the left last line on the right and center middle lines
beginmultline
a+b+c+d+e+f
+i+j+k+l+m+n
endmultline
gatherbull center alignment of all equations
Equations
Useful commands in amsmathpackage intertext
bull place correctly formatted lines of text in middle of equation without affecting alignment
The second two simulations were performed assuming the true underlying model was the shared parameter model below with 30 and 50 censoring rates respectivelybeginalignmboxlogit(mu_jkt)=amp-34+23(I_t=2)+2(mboxiron)+01(mboxtime)amp +beta_j1+(mboxtime)beta_j2 qquad qquad t=12log(r_j)=amp12+013(mboxiron)+01(mboxlength of ESRD)amp +beta_j1+01beta_j2+err_j intertextwhere left(beginarraycc beta_j1 beta_j2 endarray right) sim amp N left(left(beginarraycc00 endarray right)left(beginarraycc08 amp0101 amp02endarray right) right) err_j sim amp N(007)endalign
EquationsUseful commands in amsmath package left right
bull used to let LaTeX set deliminator sizes correctly over multiple lines of equations
beginalign
phi(yijamp|xyuivcbeta_ijhatvcvarphi)
amp=
amp times prod_t=2^S-1left(fracmboxexp(alpha_01++alpha_0t+vcx_1ijk^Tvcalpha_1+T
1+mboxexp(alpha_01++alpha_0t+vcx_1ijk^Tvcalpha_1+T right
amp left -fracmboxexp(alpha_01++alpha_0(t-1)+vcx_1ijk^Tvcalpha_1
+T
1+mboxexp(alpha_01++alpha_0(t-1)+vcx_1ijk^Tvcalpha_1+Tright)^y_ijkt
amp
Tamp=
endalign
Equations
Useful commands in amsmath package shoveleft shoveright
bull aligns equation to the left right of the linebeginmultline
A
B
shoverightC
D
endmultline
AB
CD
LaTeX Resources
Good intro to LaTeX atbull httpswwwlatex-projectorgbull httpsenwikibooksorgwikiLaTeX
Booksbull httpswwwlatex-projectorghelpbooksbull Frank Mittelbach Michel Goossens Johannes Braams David Carlisle
Chris Rowley (2004) The LaTeX Companion 2nd edition
PhD Dissertation Template ndash Appendices
Labels Cross References LaTeX uses cross-references and labels to ensure all
numbering is correctbull Never type a number of a chapter section figure table equation etc
Use label to name parts to cross-referencechptIntroduction labelchptintrocaptionMy figure of the datalabelfigdata
Use ref to cross-reference the number in the textSee chapter refchptintro for more informationshown in Figure reffigdataFigure~reffig1
~ prevents LaTeX wrapping a line between Figure and the number No spaces
References Are controlled using biblatex a bibliography file and citation
commands in the tex file Never manually type a reference in your document BibLaTeX help
bull httpswwwsharelatexcomblog20130731getting-started-with-biblatexhtml
All citations should be placed in a bibliography file (bib) In your tex file use
bull Inline citation citeten2000mix Ten Have et al 2000bull Parenthesized citation
citep[eg][]pin2006eff (eg Pinheiro and Chao 2006)bull Multiple parenthesized citations citepten2000mixpin2006eff
Bibliography File Contains all details for each reference
ARTICLEli2010modauthor = LiY and WileytoE P and HeitjanDtitle = Modeling smoking cessation data with alternating states and
a cure fraction using frailty modelsjournal = Statistics in Medicinevolume = 29pages = 627-638year = 2010
Can contain references you donrsquot use in the tex file bull If not cited they wonrsquot be included in your reference list
Use to maintain capitals in titles Eg HIV
key used in cite commands to link to reference
Bibliography FileCreation of BibTex entries OttoBib - search for books by ISBN Google Scholar - click the ldquoScholar preferencesrdquo link Under
Bibliography Manager select ldquoShow links to import citations into BibTeXrdquo Save preferences
TeXMed ndash converts PubMed Medline entries into BibTex formathttpwwwbioinformaticsorgtexmed
Bibliography FileManaging BibTex entries JabRef
bull httpjabrefsourceforgenetbull Java based graphical front end to manage BibTeX databasesbull Can directly import references from online
Compiling the Dissertation Multiple steps needed to ldquoBuildrdquo1 Run LaTeX -gt PDF2 Run BibTeX - Needed to find references3 Run LaTeX -gt PDF4 Run LaTeX -gt PDF
Depending on build set-up may be able to just run LateX -gt PDF twice
Must run LaTeX at least twice at end to get all numbering correct
LaTeX Overfull hbox Warnings
Your dissertation will be rejected if you dont fix these 1 Formulae LaTeX will not wrap if they go into the margins
bull You will get a warning message but LaTeX will compile normally with the formula even running off the side of the page
2 Long Words Manually help LaTeX hyphenatebull If a long word will just end into the margin and LaTeX is not sure
where to hyphenate to split the word over two lines it may let it run into the margin
bull Control the hyphenation manually to keep within the margins using the hyphenation hints command at the top of the template Example hyphenationrep-re-sent-a-tivematlaber-go-nom-ic
3 Verbatim Use of the verbatim environment removes all of LaTeXs formating controls for that section
bull You must manually add line returns to prevent overflow
Some Useful Packages verbatim
bull Allows you to type exact text bull Great for software output
Matlab
beginboxedverbatim
gtgt A = 4ones(3)
A =
04000 04000 04000
04000 04000 04000
04000 04000 04000
endboxedverbatim
Some useful packages - Tables longtable
bull allows table that extends over multiple pages to be split multirow
bull allows table columns to span multiple rows columns
usepackagemultirow
begintabularcc|c|c|c|c|l
cline3-6
amp amp multicolumn4|c|Primes cline3-6
amp amp 2 amp 3 amp 5 amp 7 cline1-6
multicolumn1|c|multirow2Powers amp
multicolumn1|c|504 amp 3 amp 2 amp 0 amp 1 amp cline2-6
multicolumn1|c| amp
multicolumn1|c|540 amp 2 amp 3 amp 1 amp 0 amp cline1-6
multicolumn1|c|multirow2Powers amp
multicolumn1|c|gcd amp 2 amp 2 amp 0 amp 0 amp min cline2-6
multicolumn1|c| amp
multicolumn1|c|lcm amp 3 amp 3 amp 1 amp 1 amp max cline1-6
endtabular
Some useful packages - Figures wrapfig
bull allows text to wrap around the figure instead of the figure taking up an entire line
subfigbull place several figures (or tables) into one figure (table) with separate
caption options
usepackagesubfig
beginfigure
centering
subfigure[A gull]qquad
subfigure[A tiger]qquad
subfigure[A mouse]
label3figs-c
captionPictures of animalslabel3figs
endfigure
Equations Define complex commonly used symbols at start of document
newcommandvc[1]mboxboldmath$1$
newcommandyijvcy_ij
newcommandbSbvcb^T vcSigma_u vcb
newcommandcovoperatornamecov
newcommandvaroperatornamevar
newcommandtroperatornametr
Reference equations using eqref to automatically get parentheses Egequation eqrefeqintegration equation (12)
EquationsEnvironments in amsmath package align
bull nicer multiline equation alignment
beginalignvcnu^(k+1) amp= vcnu^(k)+(vcX_1E(vcM)^(k)vcX_1)^-1vcX_1E(tildevcY)^(k)halR amp= left( sum_iXRi^TXRi right)^-1Esum_ivcX_2i^T(vcr_i-vc1_n_ivcb^Tui)hb amp= Eleft( sum_in_iuiui^T right)^-1Esum_iuivc1_n_i^T(vcr_i-vcX_2ivcalpha_2)hsigu amp= left(sum_in_iright)^-1Esum_in_iuiui^Thsigb amp= left(sum_in_iright)^-1Esum_ijvcbeta_ijvcbeta_ij^ThsigR amp= left(sum_in_iright)^-1Esum_i(vcr_i-vcX_2ivcalpha_2-vc1_nivcb^Tui)^Tamp qquad times(vcr_i-vcX_2ivcalpha_2-vc1_nivcb^Tui)endalign
EquationsEnvironments alignat
bull align equations at more than one place split
bull use inside equation align etc to split an equation over multiple lines with multiline equation getting only one reference number
beginequationlabelxx
beginsplit
aamp=b+c-d
ampquad +e-f
amp=g+h
amp=i
endsplit
endequation
EquationsEnvironments multline
bull align first line of equation on the left last line on the right and center middle lines
beginmultline
a+b+c+d+e+f
+i+j+k+l+m+n
endmultline
gatherbull center alignment of all equations
Equations
Useful commands in amsmathpackage intertext
bull place correctly formatted lines of text in middle of equation without affecting alignment
The second two simulations were performed assuming the true underlying model was the shared parameter model below with 30 and 50 censoring rates respectivelybeginalignmboxlogit(mu_jkt)=amp-34+23(I_t=2)+2(mboxiron)+01(mboxtime)amp +beta_j1+(mboxtime)beta_j2 qquad qquad t=12log(r_j)=amp12+013(mboxiron)+01(mboxlength of ESRD)amp +beta_j1+01beta_j2+err_j intertextwhere left(beginarraycc beta_j1 beta_j2 endarray right) sim amp N left(left(beginarraycc00 endarray right)left(beginarraycc08 amp0101 amp02endarray right) right) err_j sim amp N(007)endalign
EquationsUseful commands in amsmath package left right
bull used to let LaTeX set deliminator sizes correctly over multiple lines of equations
beginalign
phi(yijamp|xyuivcbeta_ijhatvcvarphi)
amp=
amp times prod_t=2^S-1left(fracmboxexp(alpha_01++alpha_0t+vcx_1ijk^Tvcalpha_1+T
1+mboxexp(alpha_01++alpha_0t+vcx_1ijk^Tvcalpha_1+T right
amp left -fracmboxexp(alpha_01++alpha_0(t-1)+vcx_1ijk^Tvcalpha_1
+T
1+mboxexp(alpha_01++alpha_0(t-1)+vcx_1ijk^Tvcalpha_1+Tright)^y_ijkt
amp
Tamp=
endalign
Equations
Useful commands in amsmath package shoveleft shoveright
bull aligns equation to the left right of the linebeginmultline
A
B
shoverightC
D
endmultline
AB
CD
LaTeX Resources
Good intro to LaTeX atbull httpswwwlatex-projectorgbull httpsenwikibooksorgwikiLaTeX
Booksbull httpswwwlatex-projectorghelpbooksbull Frank Mittelbach Michel Goossens Johannes Braams David Carlisle
Chris Rowley (2004) The LaTeX Companion 2nd edition
Labels Cross References LaTeX uses cross-references and labels to ensure all
numbering is correctbull Never type a number of a chapter section figure table equation etc
Use label to name parts to cross-referencechptIntroduction labelchptintrocaptionMy figure of the datalabelfigdata
Use ref to cross-reference the number in the textSee chapter refchptintro for more informationshown in Figure reffigdataFigure~reffig1
~ prevents LaTeX wrapping a line between Figure and the number No spaces
References Are controlled using biblatex a bibliography file and citation
commands in the tex file Never manually type a reference in your document BibLaTeX help
bull httpswwwsharelatexcomblog20130731getting-started-with-biblatexhtml
All citations should be placed in a bibliography file (bib) In your tex file use
bull Inline citation citeten2000mix Ten Have et al 2000bull Parenthesized citation
citep[eg][]pin2006eff (eg Pinheiro and Chao 2006)bull Multiple parenthesized citations citepten2000mixpin2006eff
Bibliography File Contains all details for each reference
ARTICLEli2010modauthor = LiY and WileytoE P and HeitjanDtitle = Modeling smoking cessation data with alternating states and
a cure fraction using frailty modelsjournal = Statistics in Medicinevolume = 29pages = 627-638year = 2010
Can contain references you donrsquot use in the tex file bull If not cited they wonrsquot be included in your reference list
Use to maintain capitals in titles Eg HIV
key used in cite commands to link to reference
Bibliography FileCreation of BibTex entries OttoBib - search for books by ISBN Google Scholar - click the ldquoScholar preferencesrdquo link Under
Bibliography Manager select ldquoShow links to import citations into BibTeXrdquo Save preferences
TeXMed ndash converts PubMed Medline entries into BibTex formathttpwwwbioinformaticsorgtexmed
Bibliography FileManaging BibTex entries JabRef
bull httpjabrefsourceforgenetbull Java based graphical front end to manage BibTeX databasesbull Can directly import references from online
Compiling the Dissertation Multiple steps needed to ldquoBuildrdquo1 Run LaTeX -gt PDF2 Run BibTeX - Needed to find references3 Run LaTeX -gt PDF4 Run LaTeX -gt PDF
Depending on build set-up may be able to just run LateX -gt PDF twice
Must run LaTeX at least twice at end to get all numbering correct
LaTeX Overfull hbox Warnings
Your dissertation will be rejected if you dont fix these 1 Formulae LaTeX will not wrap if they go into the margins
bull You will get a warning message but LaTeX will compile normally with the formula even running off the side of the page
2 Long Words Manually help LaTeX hyphenatebull If a long word will just end into the margin and LaTeX is not sure
where to hyphenate to split the word over two lines it may let it run into the margin
bull Control the hyphenation manually to keep within the margins using the hyphenation hints command at the top of the template Example hyphenationrep-re-sent-a-tivematlaber-go-nom-ic
3 Verbatim Use of the verbatim environment removes all of LaTeXs formating controls for that section
bull You must manually add line returns to prevent overflow
Some Useful Packages verbatim
bull Allows you to type exact text bull Great for software output
Matlab
beginboxedverbatim
gtgt A = 4ones(3)
A =
04000 04000 04000
04000 04000 04000
04000 04000 04000
endboxedverbatim
Some useful packages - Tables longtable
bull allows table that extends over multiple pages to be split multirow
bull allows table columns to span multiple rows columns
usepackagemultirow
begintabularcc|c|c|c|c|l
cline3-6
amp amp multicolumn4|c|Primes cline3-6
amp amp 2 amp 3 amp 5 amp 7 cline1-6
multicolumn1|c|multirow2Powers amp
multicolumn1|c|504 amp 3 amp 2 amp 0 amp 1 amp cline2-6
multicolumn1|c| amp
multicolumn1|c|540 amp 2 amp 3 amp 1 amp 0 amp cline1-6
multicolumn1|c|multirow2Powers amp
multicolumn1|c|gcd amp 2 amp 2 amp 0 amp 0 amp min cline2-6
multicolumn1|c| amp
multicolumn1|c|lcm amp 3 amp 3 amp 1 amp 1 amp max cline1-6
endtabular
Some useful packages - Figures wrapfig
bull allows text to wrap around the figure instead of the figure taking up an entire line
subfigbull place several figures (or tables) into one figure (table) with separate
caption options
usepackagesubfig
beginfigure
centering
subfigure[A gull]qquad
subfigure[A tiger]qquad
subfigure[A mouse]
label3figs-c
captionPictures of animalslabel3figs
endfigure
Equations Define complex commonly used symbols at start of document
newcommandvc[1]mboxboldmath$1$
newcommandyijvcy_ij
newcommandbSbvcb^T vcSigma_u vcb
newcommandcovoperatornamecov
newcommandvaroperatornamevar
newcommandtroperatornametr
Reference equations using eqref to automatically get parentheses Egequation eqrefeqintegration equation (12)
EquationsEnvironments in amsmath package align
bull nicer multiline equation alignment
beginalignvcnu^(k+1) amp= vcnu^(k)+(vcX_1E(vcM)^(k)vcX_1)^-1vcX_1E(tildevcY)^(k)halR amp= left( sum_iXRi^TXRi right)^-1Esum_ivcX_2i^T(vcr_i-vc1_n_ivcb^Tui)hb amp= Eleft( sum_in_iuiui^T right)^-1Esum_iuivc1_n_i^T(vcr_i-vcX_2ivcalpha_2)hsigu amp= left(sum_in_iright)^-1Esum_in_iuiui^Thsigb amp= left(sum_in_iright)^-1Esum_ijvcbeta_ijvcbeta_ij^ThsigR amp= left(sum_in_iright)^-1Esum_i(vcr_i-vcX_2ivcalpha_2-vc1_nivcb^Tui)^Tamp qquad times(vcr_i-vcX_2ivcalpha_2-vc1_nivcb^Tui)endalign
EquationsEnvironments alignat
bull align equations at more than one place split
bull use inside equation align etc to split an equation over multiple lines with multiline equation getting only one reference number
beginequationlabelxx
beginsplit
aamp=b+c-d
ampquad +e-f
amp=g+h
amp=i
endsplit
endequation
EquationsEnvironments multline
bull align first line of equation on the left last line on the right and center middle lines
beginmultline
a+b+c+d+e+f
+i+j+k+l+m+n
endmultline
gatherbull center alignment of all equations
Equations
Useful commands in amsmathpackage intertext
bull place correctly formatted lines of text in middle of equation without affecting alignment
The second two simulations were performed assuming the true underlying model was the shared parameter model below with 30 and 50 censoring rates respectivelybeginalignmboxlogit(mu_jkt)=amp-34+23(I_t=2)+2(mboxiron)+01(mboxtime)amp +beta_j1+(mboxtime)beta_j2 qquad qquad t=12log(r_j)=amp12+013(mboxiron)+01(mboxlength of ESRD)amp +beta_j1+01beta_j2+err_j intertextwhere left(beginarraycc beta_j1 beta_j2 endarray right) sim amp N left(left(beginarraycc00 endarray right)left(beginarraycc08 amp0101 amp02endarray right) right) err_j sim amp N(007)endalign
EquationsUseful commands in amsmath package left right
bull used to let LaTeX set deliminator sizes correctly over multiple lines of equations
beginalign
phi(yijamp|xyuivcbeta_ijhatvcvarphi)
amp=
amp times prod_t=2^S-1left(fracmboxexp(alpha_01++alpha_0t+vcx_1ijk^Tvcalpha_1+T
1+mboxexp(alpha_01++alpha_0t+vcx_1ijk^Tvcalpha_1+T right
amp left -fracmboxexp(alpha_01++alpha_0(t-1)+vcx_1ijk^Tvcalpha_1
+T
1+mboxexp(alpha_01++alpha_0(t-1)+vcx_1ijk^Tvcalpha_1+Tright)^y_ijkt
amp
Tamp=
endalign
Equations
Useful commands in amsmath package shoveleft shoveright
bull aligns equation to the left right of the linebeginmultline
A
B
shoverightC
D
endmultline
AB
CD
LaTeX Resources
Good intro to LaTeX atbull httpswwwlatex-projectorgbull httpsenwikibooksorgwikiLaTeX
Booksbull httpswwwlatex-projectorghelpbooksbull Frank Mittelbach Michel Goossens Johannes Braams David Carlisle
Chris Rowley (2004) The LaTeX Companion 2nd edition
References Are controlled using biblatex a bibliography file and citation
commands in the tex file Never manually type a reference in your document BibLaTeX help
bull httpswwwsharelatexcomblog20130731getting-started-with-biblatexhtml
All citations should be placed in a bibliography file (bib) In your tex file use
bull Inline citation citeten2000mix Ten Have et al 2000bull Parenthesized citation
citep[eg][]pin2006eff (eg Pinheiro and Chao 2006)bull Multiple parenthesized citations citepten2000mixpin2006eff
Bibliography File Contains all details for each reference
ARTICLEli2010modauthor = LiY and WileytoE P and HeitjanDtitle = Modeling smoking cessation data with alternating states and
a cure fraction using frailty modelsjournal = Statistics in Medicinevolume = 29pages = 627-638year = 2010
Can contain references you donrsquot use in the tex file bull If not cited they wonrsquot be included in your reference list
Use to maintain capitals in titles Eg HIV
key used in cite commands to link to reference
Bibliography FileCreation of BibTex entries OttoBib - search for books by ISBN Google Scholar - click the ldquoScholar preferencesrdquo link Under
Bibliography Manager select ldquoShow links to import citations into BibTeXrdquo Save preferences
TeXMed ndash converts PubMed Medline entries into BibTex formathttpwwwbioinformaticsorgtexmed
Bibliography FileManaging BibTex entries JabRef
bull httpjabrefsourceforgenetbull Java based graphical front end to manage BibTeX databasesbull Can directly import references from online
Compiling the Dissertation Multiple steps needed to ldquoBuildrdquo1 Run LaTeX -gt PDF2 Run BibTeX - Needed to find references3 Run LaTeX -gt PDF4 Run LaTeX -gt PDF
Depending on build set-up may be able to just run LateX -gt PDF twice
Must run LaTeX at least twice at end to get all numbering correct
LaTeX Overfull hbox Warnings
Your dissertation will be rejected if you dont fix these 1 Formulae LaTeX will not wrap if they go into the margins
bull You will get a warning message but LaTeX will compile normally with the formula even running off the side of the page
2 Long Words Manually help LaTeX hyphenatebull If a long word will just end into the margin and LaTeX is not sure
where to hyphenate to split the word over two lines it may let it run into the margin
bull Control the hyphenation manually to keep within the margins using the hyphenation hints command at the top of the template Example hyphenationrep-re-sent-a-tivematlaber-go-nom-ic
3 Verbatim Use of the verbatim environment removes all of LaTeXs formating controls for that section
bull You must manually add line returns to prevent overflow
Some Useful Packages verbatim
bull Allows you to type exact text bull Great for software output
Matlab
beginboxedverbatim
gtgt A = 4ones(3)
A =
04000 04000 04000
04000 04000 04000
04000 04000 04000
endboxedverbatim
Some useful packages - Tables longtable
bull allows table that extends over multiple pages to be split multirow
bull allows table columns to span multiple rows columns
usepackagemultirow
begintabularcc|c|c|c|c|l
cline3-6
amp amp multicolumn4|c|Primes cline3-6
amp amp 2 amp 3 amp 5 amp 7 cline1-6
multicolumn1|c|multirow2Powers amp
multicolumn1|c|504 amp 3 amp 2 amp 0 amp 1 amp cline2-6
multicolumn1|c| amp
multicolumn1|c|540 amp 2 amp 3 amp 1 amp 0 amp cline1-6
multicolumn1|c|multirow2Powers amp
multicolumn1|c|gcd amp 2 amp 2 amp 0 amp 0 amp min cline2-6
multicolumn1|c| amp
multicolumn1|c|lcm amp 3 amp 3 amp 1 amp 1 amp max cline1-6
endtabular
Some useful packages - Figures wrapfig
bull allows text to wrap around the figure instead of the figure taking up an entire line
subfigbull place several figures (or tables) into one figure (table) with separate
caption options
usepackagesubfig
beginfigure
centering
subfigure[A gull]qquad
subfigure[A tiger]qquad
subfigure[A mouse]
label3figs-c
captionPictures of animalslabel3figs
endfigure
Equations Define complex commonly used symbols at start of document
newcommandvc[1]mboxboldmath$1$
newcommandyijvcy_ij
newcommandbSbvcb^T vcSigma_u vcb
newcommandcovoperatornamecov
newcommandvaroperatornamevar
newcommandtroperatornametr
Reference equations using eqref to automatically get parentheses Egequation eqrefeqintegration equation (12)
EquationsEnvironments in amsmath package align
bull nicer multiline equation alignment
beginalignvcnu^(k+1) amp= vcnu^(k)+(vcX_1E(vcM)^(k)vcX_1)^-1vcX_1E(tildevcY)^(k)halR amp= left( sum_iXRi^TXRi right)^-1Esum_ivcX_2i^T(vcr_i-vc1_n_ivcb^Tui)hb amp= Eleft( sum_in_iuiui^T right)^-1Esum_iuivc1_n_i^T(vcr_i-vcX_2ivcalpha_2)hsigu amp= left(sum_in_iright)^-1Esum_in_iuiui^Thsigb amp= left(sum_in_iright)^-1Esum_ijvcbeta_ijvcbeta_ij^ThsigR amp= left(sum_in_iright)^-1Esum_i(vcr_i-vcX_2ivcalpha_2-vc1_nivcb^Tui)^Tamp qquad times(vcr_i-vcX_2ivcalpha_2-vc1_nivcb^Tui)endalign
EquationsEnvironments alignat
bull align equations at more than one place split
bull use inside equation align etc to split an equation over multiple lines with multiline equation getting only one reference number
beginequationlabelxx
beginsplit
aamp=b+c-d
ampquad +e-f
amp=g+h
amp=i
endsplit
endequation
EquationsEnvironments multline
bull align first line of equation on the left last line on the right and center middle lines
beginmultline
a+b+c+d+e+f
+i+j+k+l+m+n
endmultline
gatherbull center alignment of all equations
Equations
Useful commands in amsmathpackage intertext
bull place correctly formatted lines of text in middle of equation without affecting alignment
The second two simulations were performed assuming the true underlying model was the shared parameter model below with 30 and 50 censoring rates respectivelybeginalignmboxlogit(mu_jkt)=amp-34+23(I_t=2)+2(mboxiron)+01(mboxtime)amp +beta_j1+(mboxtime)beta_j2 qquad qquad t=12log(r_j)=amp12+013(mboxiron)+01(mboxlength of ESRD)amp +beta_j1+01beta_j2+err_j intertextwhere left(beginarraycc beta_j1 beta_j2 endarray right) sim amp N left(left(beginarraycc00 endarray right)left(beginarraycc08 amp0101 amp02endarray right) right) err_j sim amp N(007)endalign
EquationsUseful commands in amsmath package left right
bull used to let LaTeX set deliminator sizes correctly over multiple lines of equations
beginalign
phi(yijamp|xyuivcbeta_ijhatvcvarphi)
amp=
amp times prod_t=2^S-1left(fracmboxexp(alpha_01++alpha_0t+vcx_1ijk^Tvcalpha_1+T
1+mboxexp(alpha_01++alpha_0t+vcx_1ijk^Tvcalpha_1+T right
amp left -fracmboxexp(alpha_01++alpha_0(t-1)+vcx_1ijk^Tvcalpha_1
+T
1+mboxexp(alpha_01++alpha_0(t-1)+vcx_1ijk^Tvcalpha_1+Tright)^y_ijkt
amp
Tamp=
endalign
Equations
Useful commands in amsmath package shoveleft shoveright
bull aligns equation to the left right of the linebeginmultline
A
B
shoverightC
D
endmultline
AB
CD
LaTeX Resources
Good intro to LaTeX atbull httpswwwlatex-projectorgbull httpsenwikibooksorgwikiLaTeX
Booksbull httpswwwlatex-projectorghelpbooksbull Frank Mittelbach Michel Goossens Johannes Braams David Carlisle
Chris Rowley (2004) The LaTeX Companion 2nd edition
Bibliography File Contains all details for each reference
ARTICLEli2010modauthor = LiY and WileytoE P and HeitjanDtitle = Modeling smoking cessation data with alternating states and
a cure fraction using frailty modelsjournal = Statistics in Medicinevolume = 29pages = 627-638year = 2010
Can contain references you donrsquot use in the tex file bull If not cited they wonrsquot be included in your reference list
Use to maintain capitals in titles Eg HIV
key used in cite commands to link to reference
Bibliography FileCreation of BibTex entries OttoBib - search for books by ISBN Google Scholar - click the ldquoScholar preferencesrdquo link Under
Bibliography Manager select ldquoShow links to import citations into BibTeXrdquo Save preferences
TeXMed ndash converts PubMed Medline entries into BibTex formathttpwwwbioinformaticsorgtexmed
Bibliography FileManaging BibTex entries JabRef
bull httpjabrefsourceforgenetbull Java based graphical front end to manage BibTeX databasesbull Can directly import references from online
Compiling the Dissertation Multiple steps needed to ldquoBuildrdquo1 Run LaTeX -gt PDF2 Run BibTeX - Needed to find references3 Run LaTeX -gt PDF4 Run LaTeX -gt PDF
Depending on build set-up may be able to just run LateX -gt PDF twice
Must run LaTeX at least twice at end to get all numbering correct
LaTeX Overfull hbox Warnings
Your dissertation will be rejected if you dont fix these 1 Formulae LaTeX will not wrap if they go into the margins
bull You will get a warning message but LaTeX will compile normally with the formula even running off the side of the page
2 Long Words Manually help LaTeX hyphenatebull If a long word will just end into the margin and LaTeX is not sure
where to hyphenate to split the word over two lines it may let it run into the margin
bull Control the hyphenation manually to keep within the margins using the hyphenation hints command at the top of the template Example hyphenationrep-re-sent-a-tivematlaber-go-nom-ic
3 Verbatim Use of the verbatim environment removes all of LaTeXs formating controls for that section
bull You must manually add line returns to prevent overflow
Some Useful Packages verbatim
bull Allows you to type exact text bull Great for software output
Matlab
beginboxedverbatim
gtgt A = 4ones(3)
A =
04000 04000 04000
04000 04000 04000
04000 04000 04000
endboxedverbatim
Some useful packages - Tables longtable
bull allows table that extends over multiple pages to be split multirow
bull allows table columns to span multiple rows columns
usepackagemultirow
begintabularcc|c|c|c|c|l
cline3-6
amp amp multicolumn4|c|Primes cline3-6
amp amp 2 amp 3 amp 5 amp 7 cline1-6
multicolumn1|c|multirow2Powers amp
multicolumn1|c|504 amp 3 amp 2 amp 0 amp 1 amp cline2-6
multicolumn1|c| amp
multicolumn1|c|540 amp 2 amp 3 amp 1 amp 0 amp cline1-6
multicolumn1|c|multirow2Powers amp
multicolumn1|c|gcd amp 2 amp 2 amp 0 amp 0 amp min cline2-6
multicolumn1|c| amp
multicolumn1|c|lcm amp 3 amp 3 amp 1 amp 1 amp max cline1-6
endtabular
Some useful packages - Figures wrapfig
bull allows text to wrap around the figure instead of the figure taking up an entire line
subfigbull place several figures (or tables) into one figure (table) with separate
caption options
usepackagesubfig
beginfigure
centering
subfigure[A gull]qquad
subfigure[A tiger]qquad
subfigure[A mouse]
label3figs-c
captionPictures of animalslabel3figs
endfigure
Equations Define complex commonly used symbols at start of document
newcommandvc[1]mboxboldmath$1$
newcommandyijvcy_ij
newcommandbSbvcb^T vcSigma_u vcb
newcommandcovoperatornamecov
newcommandvaroperatornamevar
newcommandtroperatornametr
Reference equations using eqref to automatically get parentheses Egequation eqrefeqintegration equation (12)
EquationsEnvironments in amsmath package align
bull nicer multiline equation alignment
beginalignvcnu^(k+1) amp= vcnu^(k)+(vcX_1E(vcM)^(k)vcX_1)^-1vcX_1E(tildevcY)^(k)halR amp= left( sum_iXRi^TXRi right)^-1Esum_ivcX_2i^T(vcr_i-vc1_n_ivcb^Tui)hb amp= Eleft( sum_in_iuiui^T right)^-1Esum_iuivc1_n_i^T(vcr_i-vcX_2ivcalpha_2)hsigu amp= left(sum_in_iright)^-1Esum_in_iuiui^Thsigb amp= left(sum_in_iright)^-1Esum_ijvcbeta_ijvcbeta_ij^ThsigR amp= left(sum_in_iright)^-1Esum_i(vcr_i-vcX_2ivcalpha_2-vc1_nivcb^Tui)^Tamp qquad times(vcr_i-vcX_2ivcalpha_2-vc1_nivcb^Tui)endalign
EquationsEnvironments alignat
bull align equations at more than one place split
bull use inside equation align etc to split an equation over multiple lines with multiline equation getting only one reference number
beginequationlabelxx
beginsplit
aamp=b+c-d
ampquad +e-f
amp=g+h
amp=i
endsplit
endequation
EquationsEnvironments multline
bull align first line of equation on the left last line on the right and center middle lines
beginmultline
a+b+c+d+e+f
+i+j+k+l+m+n
endmultline
gatherbull center alignment of all equations
Equations
Useful commands in amsmathpackage intertext
bull place correctly formatted lines of text in middle of equation without affecting alignment
The second two simulations were performed assuming the true underlying model was the shared parameter model below with 30 and 50 censoring rates respectivelybeginalignmboxlogit(mu_jkt)=amp-34+23(I_t=2)+2(mboxiron)+01(mboxtime)amp +beta_j1+(mboxtime)beta_j2 qquad qquad t=12log(r_j)=amp12+013(mboxiron)+01(mboxlength of ESRD)amp +beta_j1+01beta_j2+err_j intertextwhere left(beginarraycc beta_j1 beta_j2 endarray right) sim amp N left(left(beginarraycc00 endarray right)left(beginarraycc08 amp0101 amp02endarray right) right) err_j sim amp N(007)endalign
EquationsUseful commands in amsmath package left right
bull used to let LaTeX set deliminator sizes correctly over multiple lines of equations
beginalign
phi(yijamp|xyuivcbeta_ijhatvcvarphi)
amp=
amp times prod_t=2^S-1left(fracmboxexp(alpha_01++alpha_0t+vcx_1ijk^Tvcalpha_1+T
1+mboxexp(alpha_01++alpha_0t+vcx_1ijk^Tvcalpha_1+T right
amp left -fracmboxexp(alpha_01++alpha_0(t-1)+vcx_1ijk^Tvcalpha_1
+T
1+mboxexp(alpha_01++alpha_0(t-1)+vcx_1ijk^Tvcalpha_1+Tright)^y_ijkt
amp
Tamp=
endalign
Equations
Useful commands in amsmath package shoveleft shoveright
bull aligns equation to the left right of the linebeginmultline
A
B
shoverightC
D
endmultline
AB
CD
LaTeX Resources
Good intro to LaTeX atbull httpswwwlatex-projectorgbull httpsenwikibooksorgwikiLaTeX
Booksbull httpswwwlatex-projectorghelpbooksbull Frank Mittelbach Michel Goossens Johannes Braams David Carlisle
Chris Rowley (2004) The LaTeX Companion 2nd edition
Bibliography FileCreation of BibTex entries OttoBib - search for books by ISBN Google Scholar - click the ldquoScholar preferencesrdquo link Under
Bibliography Manager select ldquoShow links to import citations into BibTeXrdquo Save preferences
TeXMed ndash converts PubMed Medline entries into BibTex formathttpwwwbioinformaticsorgtexmed
Bibliography FileManaging BibTex entries JabRef
bull httpjabrefsourceforgenetbull Java based graphical front end to manage BibTeX databasesbull Can directly import references from online
Compiling the Dissertation Multiple steps needed to ldquoBuildrdquo1 Run LaTeX -gt PDF2 Run BibTeX - Needed to find references3 Run LaTeX -gt PDF4 Run LaTeX -gt PDF
Depending on build set-up may be able to just run LateX -gt PDF twice
Must run LaTeX at least twice at end to get all numbering correct
LaTeX Overfull hbox Warnings
Your dissertation will be rejected if you dont fix these 1 Formulae LaTeX will not wrap if they go into the margins
bull You will get a warning message but LaTeX will compile normally with the formula even running off the side of the page
2 Long Words Manually help LaTeX hyphenatebull If a long word will just end into the margin and LaTeX is not sure
where to hyphenate to split the word over two lines it may let it run into the margin
bull Control the hyphenation manually to keep within the margins using the hyphenation hints command at the top of the template Example hyphenationrep-re-sent-a-tivematlaber-go-nom-ic
3 Verbatim Use of the verbatim environment removes all of LaTeXs formating controls for that section
bull You must manually add line returns to prevent overflow
Some Useful Packages verbatim
bull Allows you to type exact text bull Great for software output
Matlab
beginboxedverbatim
gtgt A = 4ones(3)
A =
04000 04000 04000
04000 04000 04000
04000 04000 04000
endboxedverbatim
Some useful packages - Tables longtable
bull allows table that extends over multiple pages to be split multirow
bull allows table columns to span multiple rows columns
usepackagemultirow
begintabularcc|c|c|c|c|l
cline3-6
amp amp multicolumn4|c|Primes cline3-6
amp amp 2 amp 3 amp 5 amp 7 cline1-6
multicolumn1|c|multirow2Powers amp
multicolumn1|c|504 amp 3 amp 2 amp 0 amp 1 amp cline2-6
multicolumn1|c| amp
multicolumn1|c|540 amp 2 amp 3 amp 1 amp 0 amp cline1-6
multicolumn1|c|multirow2Powers amp
multicolumn1|c|gcd amp 2 amp 2 amp 0 amp 0 amp min cline2-6
multicolumn1|c| amp
multicolumn1|c|lcm amp 3 amp 3 amp 1 amp 1 amp max cline1-6
endtabular
Some useful packages - Figures wrapfig
bull allows text to wrap around the figure instead of the figure taking up an entire line
subfigbull place several figures (or tables) into one figure (table) with separate
caption options
usepackagesubfig
beginfigure
centering
subfigure[A gull]qquad
subfigure[A tiger]qquad
subfigure[A mouse]
label3figs-c
captionPictures of animalslabel3figs
endfigure
Equations Define complex commonly used symbols at start of document
newcommandvc[1]mboxboldmath$1$
newcommandyijvcy_ij
newcommandbSbvcb^T vcSigma_u vcb
newcommandcovoperatornamecov
newcommandvaroperatornamevar
newcommandtroperatornametr
Reference equations using eqref to automatically get parentheses Egequation eqrefeqintegration equation (12)
EquationsEnvironments in amsmath package align
bull nicer multiline equation alignment
beginalignvcnu^(k+1) amp= vcnu^(k)+(vcX_1E(vcM)^(k)vcX_1)^-1vcX_1E(tildevcY)^(k)halR amp= left( sum_iXRi^TXRi right)^-1Esum_ivcX_2i^T(vcr_i-vc1_n_ivcb^Tui)hb amp= Eleft( sum_in_iuiui^T right)^-1Esum_iuivc1_n_i^T(vcr_i-vcX_2ivcalpha_2)hsigu amp= left(sum_in_iright)^-1Esum_in_iuiui^Thsigb amp= left(sum_in_iright)^-1Esum_ijvcbeta_ijvcbeta_ij^ThsigR amp= left(sum_in_iright)^-1Esum_i(vcr_i-vcX_2ivcalpha_2-vc1_nivcb^Tui)^Tamp qquad times(vcr_i-vcX_2ivcalpha_2-vc1_nivcb^Tui)endalign
EquationsEnvironments alignat
bull align equations at more than one place split
bull use inside equation align etc to split an equation over multiple lines with multiline equation getting only one reference number
beginequationlabelxx
beginsplit
aamp=b+c-d
ampquad +e-f
amp=g+h
amp=i
endsplit
endequation
EquationsEnvironments multline
bull align first line of equation on the left last line on the right and center middle lines
beginmultline
a+b+c+d+e+f
+i+j+k+l+m+n
endmultline
gatherbull center alignment of all equations
Equations
Useful commands in amsmathpackage intertext
bull place correctly formatted lines of text in middle of equation without affecting alignment
The second two simulations were performed assuming the true underlying model was the shared parameter model below with 30 and 50 censoring rates respectivelybeginalignmboxlogit(mu_jkt)=amp-34+23(I_t=2)+2(mboxiron)+01(mboxtime)amp +beta_j1+(mboxtime)beta_j2 qquad qquad t=12log(r_j)=amp12+013(mboxiron)+01(mboxlength of ESRD)amp +beta_j1+01beta_j2+err_j intertextwhere left(beginarraycc beta_j1 beta_j2 endarray right) sim amp N left(left(beginarraycc00 endarray right)left(beginarraycc08 amp0101 amp02endarray right) right) err_j sim amp N(007)endalign
EquationsUseful commands in amsmath package left right
bull used to let LaTeX set deliminator sizes correctly over multiple lines of equations
beginalign
phi(yijamp|xyuivcbeta_ijhatvcvarphi)
amp=
amp times prod_t=2^S-1left(fracmboxexp(alpha_01++alpha_0t+vcx_1ijk^Tvcalpha_1+T
1+mboxexp(alpha_01++alpha_0t+vcx_1ijk^Tvcalpha_1+T right
amp left -fracmboxexp(alpha_01++alpha_0(t-1)+vcx_1ijk^Tvcalpha_1
+T
1+mboxexp(alpha_01++alpha_0(t-1)+vcx_1ijk^Tvcalpha_1+Tright)^y_ijkt
amp
Tamp=
endalign
Equations
Useful commands in amsmath package shoveleft shoveright
bull aligns equation to the left right of the linebeginmultline
A
B
shoverightC
D
endmultline
AB
CD
LaTeX Resources
Good intro to LaTeX atbull httpswwwlatex-projectorgbull httpsenwikibooksorgwikiLaTeX
Booksbull httpswwwlatex-projectorghelpbooksbull Frank Mittelbach Michel Goossens Johannes Braams David Carlisle
Chris Rowley (2004) The LaTeX Companion 2nd edition
Bibliography FileManaging BibTex entries JabRef
bull httpjabrefsourceforgenetbull Java based graphical front end to manage BibTeX databasesbull Can directly import references from online
Compiling the Dissertation Multiple steps needed to ldquoBuildrdquo1 Run LaTeX -gt PDF2 Run BibTeX - Needed to find references3 Run LaTeX -gt PDF4 Run LaTeX -gt PDF
Depending on build set-up may be able to just run LateX -gt PDF twice
Must run LaTeX at least twice at end to get all numbering correct
LaTeX Overfull hbox Warnings
Your dissertation will be rejected if you dont fix these 1 Formulae LaTeX will not wrap if they go into the margins
bull You will get a warning message but LaTeX will compile normally with the formula even running off the side of the page
2 Long Words Manually help LaTeX hyphenatebull If a long word will just end into the margin and LaTeX is not sure
where to hyphenate to split the word over two lines it may let it run into the margin
bull Control the hyphenation manually to keep within the margins using the hyphenation hints command at the top of the template Example hyphenationrep-re-sent-a-tivematlaber-go-nom-ic
3 Verbatim Use of the verbatim environment removes all of LaTeXs formating controls for that section
bull You must manually add line returns to prevent overflow
Some Useful Packages verbatim
bull Allows you to type exact text bull Great for software output
Matlab
beginboxedverbatim
gtgt A = 4ones(3)
A =
04000 04000 04000
04000 04000 04000
04000 04000 04000
endboxedverbatim
Some useful packages - Tables longtable
bull allows table that extends over multiple pages to be split multirow
bull allows table columns to span multiple rows columns
usepackagemultirow
begintabularcc|c|c|c|c|l
cline3-6
amp amp multicolumn4|c|Primes cline3-6
amp amp 2 amp 3 amp 5 amp 7 cline1-6
multicolumn1|c|multirow2Powers amp
multicolumn1|c|504 amp 3 amp 2 amp 0 amp 1 amp cline2-6
multicolumn1|c| amp
multicolumn1|c|540 amp 2 amp 3 amp 1 amp 0 amp cline1-6
multicolumn1|c|multirow2Powers amp
multicolumn1|c|gcd amp 2 amp 2 amp 0 amp 0 amp min cline2-6
multicolumn1|c| amp
multicolumn1|c|lcm amp 3 amp 3 amp 1 amp 1 amp max cline1-6
endtabular
Some useful packages - Figures wrapfig
bull allows text to wrap around the figure instead of the figure taking up an entire line
subfigbull place several figures (or tables) into one figure (table) with separate
caption options
usepackagesubfig
beginfigure
centering
subfigure[A gull]qquad
subfigure[A tiger]qquad
subfigure[A mouse]
label3figs-c
captionPictures of animalslabel3figs
endfigure
Equations Define complex commonly used symbols at start of document
newcommandvc[1]mboxboldmath$1$
newcommandyijvcy_ij
newcommandbSbvcb^T vcSigma_u vcb
newcommandcovoperatornamecov
newcommandvaroperatornamevar
newcommandtroperatornametr
Reference equations using eqref to automatically get parentheses Egequation eqrefeqintegration equation (12)
EquationsEnvironments in amsmath package align
bull nicer multiline equation alignment
beginalignvcnu^(k+1) amp= vcnu^(k)+(vcX_1E(vcM)^(k)vcX_1)^-1vcX_1E(tildevcY)^(k)halR amp= left( sum_iXRi^TXRi right)^-1Esum_ivcX_2i^T(vcr_i-vc1_n_ivcb^Tui)hb amp= Eleft( sum_in_iuiui^T right)^-1Esum_iuivc1_n_i^T(vcr_i-vcX_2ivcalpha_2)hsigu amp= left(sum_in_iright)^-1Esum_in_iuiui^Thsigb amp= left(sum_in_iright)^-1Esum_ijvcbeta_ijvcbeta_ij^ThsigR amp= left(sum_in_iright)^-1Esum_i(vcr_i-vcX_2ivcalpha_2-vc1_nivcb^Tui)^Tamp qquad times(vcr_i-vcX_2ivcalpha_2-vc1_nivcb^Tui)endalign
EquationsEnvironments alignat
bull align equations at more than one place split
bull use inside equation align etc to split an equation over multiple lines with multiline equation getting only one reference number
beginequationlabelxx
beginsplit
aamp=b+c-d
ampquad +e-f
amp=g+h
amp=i
endsplit
endequation
EquationsEnvironments multline
bull align first line of equation on the left last line on the right and center middle lines
beginmultline
a+b+c+d+e+f
+i+j+k+l+m+n
endmultline
gatherbull center alignment of all equations
Equations
Useful commands in amsmathpackage intertext
bull place correctly formatted lines of text in middle of equation without affecting alignment
The second two simulations were performed assuming the true underlying model was the shared parameter model below with 30 and 50 censoring rates respectivelybeginalignmboxlogit(mu_jkt)=amp-34+23(I_t=2)+2(mboxiron)+01(mboxtime)amp +beta_j1+(mboxtime)beta_j2 qquad qquad t=12log(r_j)=amp12+013(mboxiron)+01(mboxlength of ESRD)amp +beta_j1+01beta_j2+err_j intertextwhere left(beginarraycc beta_j1 beta_j2 endarray right) sim amp N left(left(beginarraycc00 endarray right)left(beginarraycc08 amp0101 amp02endarray right) right) err_j sim amp N(007)endalign
EquationsUseful commands in amsmath package left right
bull used to let LaTeX set deliminator sizes correctly over multiple lines of equations
beginalign
phi(yijamp|xyuivcbeta_ijhatvcvarphi)
amp=
amp times prod_t=2^S-1left(fracmboxexp(alpha_01++alpha_0t+vcx_1ijk^Tvcalpha_1+T
1+mboxexp(alpha_01++alpha_0t+vcx_1ijk^Tvcalpha_1+T right
amp left -fracmboxexp(alpha_01++alpha_0(t-1)+vcx_1ijk^Tvcalpha_1
+T
1+mboxexp(alpha_01++alpha_0(t-1)+vcx_1ijk^Tvcalpha_1+Tright)^y_ijkt
amp
Tamp=
endalign
Equations
Useful commands in amsmath package shoveleft shoveright
bull aligns equation to the left right of the linebeginmultline
A
B
shoverightC
D
endmultline
AB
CD
LaTeX Resources
Good intro to LaTeX atbull httpswwwlatex-projectorgbull httpsenwikibooksorgwikiLaTeX
Booksbull httpswwwlatex-projectorghelpbooksbull Frank Mittelbach Michel Goossens Johannes Braams David Carlisle
Chris Rowley (2004) The LaTeX Companion 2nd edition
Compiling the Dissertation Multiple steps needed to ldquoBuildrdquo1 Run LaTeX -gt PDF2 Run BibTeX - Needed to find references3 Run LaTeX -gt PDF4 Run LaTeX -gt PDF
Depending on build set-up may be able to just run LateX -gt PDF twice
Must run LaTeX at least twice at end to get all numbering correct
LaTeX Overfull hbox Warnings
Your dissertation will be rejected if you dont fix these 1 Formulae LaTeX will not wrap if they go into the margins
bull You will get a warning message but LaTeX will compile normally with the formula even running off the side of the page
2 Long Words Manually help LaTeX hyphenatebull If a long word will just end into the margin and LaTeX is not sure
where to hyphenate to split the word over two lines it may let it run into the margin
bull Control the hyphenation manually to keep within the margins using the hyphenation hints command at the top of the template Example hyphenationrep-re-sent-a-tivematlaber-go-nom-ic
3 Verbatim Use of the verbatim environment removes all of LaTeXs formating controls for that section
bull You must manually add line returns to prevent overflow
Some Useful Packages verbatim
bull Allows you to type exact text bull Great for software output
Matlab
beginboxedverbatim
gtgt A = 4ones(3)
A =
04000 04000 04000
04000 04000 04000
04000 04000 04000
endboxedverbatim
Some useful packages - Tables longtable
bull allows table that extends over multiple pages to be split multirow
bull allows table columns to span multiple rows columns
usepackagemultirow
begintabularcc|c|c|c|c|l
cline3-6
amp amp multicolumn4|c|Primes cline3-6
amp amp 2 amp 3 amp 5 amp 7 cline1-6
multicolumn1|c|multirow2Powers amp
multicolumn1|c|504 amp 3 amp 2 amp 0 amp 1 amp cline2-6
multicolumn1|c| amp
multicolumn1|c|540 amp 2 amp 3 amp 1 amp 0 amp cline1-6
multicolumn1|c|multirow2Powers amp
multicolumn1|c|gcd amp 2 amp 2 amp 0 amp 0 amp min cline2-6
multicolumn1|c| amp
multicolumn1|c|lcm amp 3 amp 3 amp 1 amp 1 amp max cline1-6
endtabular
Some useful packages - Figures wrapfig
bull allows text to wrap around the figure instead of the figure taking up an entire line
subfigbull place several figures (or tables) into one figure (table) with separate
caption options
usepackagesubfig
beginfigure
centering
subfigure[A gull]qquad
subfigure[A tiger]qquad
subfigure[A mouse]
label3figs-c
captionPictures of animalslabel3figs
endfigure
Equations Define complex commonly used symbols at start of document
newcommandvc[1]mboxboldmath$1$
newcommandyijvcy_ij
newcommandbSbvcb^T vcSigma_u vcb
newcommandcovoperatornamecov
newcommandvaroperatornamevar
newcommandtroperatornametr
Reference equations using eqref to automatically get parentheses Egequation eqrefeqintegration equation (12)
EquationsEnvironments in amsmath package align
bull nicer multiline equation alignment
beginalignvcnu^(k+1) amp= vcnu^(k)+(vcX_1E(vcM)^(k)vcX_1)^-1vcX_1E(tildevcY)^(k)halR amp= left( sum_iXRi^TXRi right)^-1Esum_ivcX_2i^T(vcr_i-vc1_n_ivcb^Tui)hb amp= Eleft( sum_in_iuiui^T right)^-1Esum_iuivc1_n_i^T(vcr_i-vcX_2ivcalpha_2)hsigu amp= left(sum_in_iright)^-1Esum_in_iuiui^Thsigb amp= left(sum_in_iright)^-1Esum_ijvcbeta_ijvcbeta_ij^ThsigR amp= left(sum_in_iright)^-1Esum_i(vcr_i-vcX_2ivcalpha_2-vc1_nivcb^Tui)^Tamp qquad times(vcr_i-vcX_2ivcalpha_2-vc1_nivcb^Tui)endalign
EquationsEnvironments alignat
bull align equations at more than one place split
bull use inside equation align etc to split an equation over multiple lines with multiline equation getting only one reference number
beginequationlabelxx
beginsplit
aamp=b+c-d
ampquad +e-f
amp=g+h
amp=i
endsplit
endequation
EquationsEnvironments multline
bull align first line of equation on the left last line on the right and center middle lines
beginmultline
a+b+c+d+e+f
+i+j+k+l+m+n
endmultline
gatherbull center alignment of all equations
Equations
Useful commands in amsmathpackage intertext
bull place correctly formatted lines of text in middle of equation without affecting alignment
The second two simulations were performed assuming the true underlying model was the shared parameter model below with 30 and 50 censoring rates respectivelybeginalignmboxlogit(mu_jkt)=amp-34+23(I_t=2)+2(mboxiron)+01(mboxtime)amp +beta_j1+(mboxtime)beta_j2 qquad qquad t=12log(r_j)=amp12+013(mboxiron)+01(mboxlength of ESRD)amp +beta_j1+01beta_j2+err_j intertextwhere left(beginarraycc beta_j1 beta_j2 endarray right) sim amp N left(left(beginarraycc00 endarray right)left(beginarraycc08 amp0101 amp02endarray right) right) err_j sim amp N(007)endalign
EquationsUseful commands in amsmath package left right
bull used to let LaTeX set deliminator sizes correctly over multiple lines of equations
beginalign
phi(yijamp|xyuivcbeta_ijhatvcvarphi)
amp=
amp times prod_t=2^S-1left(fracmboxexp(alpha_01++alpha_0t+vcx_1ijk^Tvcalpha_1+T
1+mboxexp(alpha_01++alpha_0t+vcx_1ijk^Tvcalpha_1+T right
amp left -fracmboxexp(alpha_01++alpha_0(t-1)+vcx_1ijk^Tvcalpha_1
+T
1+mboxexp(alpha_01++alpha_0(t-1)+vcx_1ijk^Tvcalpha_1+Tright)^y_ijkt
amp
Tamp=
endalign
Equations
Useful commands in amsmath package shoveleft shoveright
bull aligns equation to the left right of the linebeginmultline
A
B
shoverightC
D
endmultline
AB
CD
LaTeX Resources
Good intro to LaTeX atbull httpswwwlatex-projectorgbull httpsenwikibooksorgwikiLaTeX
Booksbull httpswwwlatex-projectorghelpbooksbull Frank Mittelbach Michel Goossens Johannes Braams David Carlisle
Chris Rowley (2004) The LaTeX Companion 2nd edition
LaTeX Overfull hbox Warnings
Your dissertation will be rejected if you dont fix these 1 Formulae LaTeX will not wrap if they go into the margins
bull You will get a warning message but LaTeX will compile normally with the formula even running off the side of the page
2 Long Words Manually help LaTeX hyphenatebull If a long word will just end into the margin and LaTeX is not sure
where to hyphenate to split the word over two lines it may let it run into the margin
bull Control the hyphenation manually to keep within the margins using the hyphenation hints command at the top of the template Example hyphenationrep-re-sent-a-tivematlaber-go-nom-ic
3 Verbatim Use of the verbatim environment removes all of LaTeXs formating controls for that section
bull You must manually add line returns to prevent overflow
Some Useful Packages verbatim
bull Allows you to type exact text bull Great for software output
Matlab
beginboxedverbatim
gtgt A = 4ones(3)
A =
04000 04000 04000
04000 04000 04000
04000 04000 04000
endboxedverbatim
Some useful packages - Tables longtable
bull allows table that extends over multiple pages to be split multirow
bull allows table columns to span multiple rows columns
usepackagemultirow
begintabularcc|c|c|c|c|l
cline3-6
amp amp multicolumn4|c|Primes cline3-6
amp amp 2 amp 3 amp 5 amp 7 cline1-6
multicolumn1|c|multirow2Powers amp
multicolumn1|c|504 amp 3 amp 2 amp 0 amp 1 amp cline2-6
multicolumn1|c| amp
multicolumn1|c|540 amp 2 amp 3 amp 1 amp 0 amp cline1-6
multicolumn1|c|multirow2Powers amp
multicolumn1|c|gcd amp 2 amp 2 amp 0 amp 0 amp min cline2-6
multicolumn1|c| amp
multicolumn1|c|lcm amp 3 amp 3 amp 1 amp 1 amp max cline1-6
endtabular
Some useful packages - Figures wrapfig
bull allows text to wrap around the figure instead of the figure taking up an entire line
subfigbull place several figures (or tables) into one figure (table) with separate
caption options
usepackagesubfig
beginfigure
centering
subfigure[A gull]qquad
subfigure[A tiger]qquad
subfigure[A mouse]
label3figs-c
captionPictures of animalslabel3figs
endfigure
Equations Define complex commonly used symbols at start of document
newcommandvc[1]mboxboldmath$1$
newcommandyijvcy_ij
newcommandbSbvcb^T vcSigma_u vcb
newcommandcovoperatornamecov
newcommandvaroperatornamevar
newcommandtroperatornametr
Reference equations using eqref to automatically get parentheses Egequation eqrefeqintegration equation (12)
EquationsEnvironments in amsmath package align
bull nicer multiline equation alignment
beginalignvcnu^(k+1) amp= vcnu^(k)+(vcX_1E(vcM)^(k)vcX_1)^-1vcX_1E(tildevcY)^(k)halR amp= left( sum_iXRi^TXRi right)^-1Esum_ivcX_2i^T(vcr_i-vc1_n_ivcb^Tui)hb amp= Eleft( sum_in_iuiui^T right)^-1Esum_iuivc1_n_i^T(vcr_i-vcX_2ivcalpha_2)hsigu amp= left(sum_in_iright)^-1Esum_in_iuiui^Thsigb amp= left(sum_in_iright)^-1Esum_ijvcbeta_ijvcbeta_ij^ThsigR amp= left(sum_in_iright)^-1Esum_i(vcr_i-vcX_2ivcalpha_2-vc1_nivcb^Tui)^Tamp qquad times(vcr_i-vcX_2ivcalpha_2-vc1_nivcb^Tui)endalign
EquationsEnvironments alignat
bull align equations at more than one place split
bull use inside equation align etc to split an equation over multiple lines with multiline equation getting only one reference number
beginequationlabelxx
beginsplit
aamp=b+c-d
ampquad +e-f
amp=g+h
amp=i
endsplit
endequation
EquationsEnvironments multline
bull align first line of equation on the left last line on the right and center middle lines
beginmultline
a+b+c+d+e+f
+i+j+k+l+m+n
endmultline
gatherbull center alignment of all equations
Equations
Useful commands in amsmathpackage intertext
bull place correctly formatted lines of text in middle of equation without affecting alignment
The second two simulations were performed assuming the true underlying model was the shared parameter model below with 30 and 50 censoring rates respectivelybeginalignmboxlogit(mu_jkt)=amp-34+23(I_t=2)+2(mboxiron)+01(mboxtime)amp +beta_j1+(mboxtime)beta_j2 qquad qquad t=12log(r_j)=amp12+013(mboxiron)+01(mboxlength of ESRD)amp +beta_j1+01beta_j2+err_j intertextwhere left(beginarraycc beta_j1 beta_j2 endarray right) sim amp N left(left(beginarraycc00 endarray right)left(beginarraycc08 amp0101 amp02endarray right) right) err_j sim amp N(007)endalign
EquationsUseful commands in amsmath package left right
bull used to let LaTeX set deliminator sizes correctly over multiple lines of equations
beginalign
phi(yijamp|xyuivcbeta_ijhatvcvarphi)
amp=
amp times prod_t=2^S-1left(fracmboxexp(alpha_01++alpha_0t+vcx_1ijk^Tvcalpha_1+T
1+mboxexp(alpha_01++alpha_0t+vcx_1ijk^Tvcalpha_1+T right
amp left -fracmboxexp(alpha_01++alpha_0(t-1)+vcx_1ijk^Tvcalpha_1
+T
1+mboxexp(alpha_01++alpha_0(t-1)+vcx_1ijk^Tvcalpha_1+Tright)^y_ijkt
amp
Tamp=
endalign
Equations
Useful commands in amsmath package shoveleft shoveright
bull aligns equation to the left right of the linebeginmultline
A
B
shoverightC
D
endmultline
AB
CD
LaTeX Resources
Good intro to LaTeX atbull httpswwwlatex-projectorgbull httpsenwikibooksorgwikiLaTeX
Booksbull httpswwwlatex-projectorghelpbooksbull Frank Mittelbach Michel Goossens Johannes Braams David Carlisle
Chris Rowley (2004) The LaTeX Companion 2nd edition
Some Useful Packages verbatim
bull Allows you to type exact text bull Great for software output
Matlab
beginboxedverbatim
gtgt A = 4ones(3)
A =
04000 04000 04000
04000 04000 04000
04000 04000 04000
endboxedverbatim
Some useful packages - Tables longtable
bull allows table that extends over multiple pages to be split multirow
bull allows table columns to span multiple rows columns
usepackagemultirow
begintabularcc|c|c|c|c|l
cline3-6
amp amp multicolumn4|c|Primes cline3-6
amp amp 2 amp 3 amp 5 amp 7 cline1-6
multicolumn1|c|multirow2Powers amp
multicolumn1|c|504 amp 3 amp 2 amp 0 amp 1 amp cline2-6
multicolumn1|c| amp
multicolumn1|c|540 amp 2 amp 3 amp 1 amp 0 amp cline1-6
multicolumn1|c|multirow2Powers amp
multicolumn1|c|gcd amp 2 amp 2 amp 0 amp 0 amp min cline2-6
multicolumn1|c| amp
multicolumn1|c|lcm amp 3 amp 3 amp 1 amp 1 amp max cline1-6
endtabular
Some useful packages - Figures wrapfig
bull allows text to wrap around the figure instead of the figure taking up an entire line
subfigbull place several figures (or tables) into one figure (table) with separate
caption options
usepackagesubfig
beginfigure
centering
subfigure[A gull]qquad
subfigure[A tiger]qquad
subfigure[A mouse]
label3figs-c
captionPictures of animalslabel3figs
endfigure
Equations Define complex commonly used symbols at start of document
newcommandvc[1]mboxboldmath$1$
newcommandyijvcy_ij
newcommandbSbvcb^T vcSigma_u vcb
newcommandcovoperatornamecov
newcommandvaroperatornamevar
newcommandtroperatornametr
Reference equations using eqref to automatically get parentheses Egequation eqrefeqintegration equation (12)
EquationsEnvironments in amsmath package align
bull nicer multiline equation alignment
beginalignvcnu^(k+1) amp= vcnu^(k)+(vcX_1E(vcM)^(k)vcX_1)^-1vcX_1E(tildevcY)^(k)halR amp= left( sum_iXRi^TXRi right)^-1Esum_ivcX_2i^T(vcr_i-vc1_n_ivcb^Tui)hb amp= Eleft( sum_in_iuiui^T right)^-1Esum_iuivc1_n_i^T(vcr_i-vcX_2ivcalpha_2)hsigu amp= left(sum_in_iright)^-1Esum_in_iuiui^Thsigb amp= left(sum_in_iright)^-1Esum_ijvcbeta_ijvcbeta_ij^ThsigR amp= left(sum_in_iright)^-1Esum_i(vcr_i-vcX_2ivcalpha_2-vc1_nivcb^Tui)^Tamp qquad times(vcr_i-vcX_2ivcalpha_2-vc1_nivcb^Tui)endalign
EquationsEnvironments alignat
bull align equations at more than one place split
bull use inside equation align etc to split an equation over multiple lines with multiline equation getting only one reference number
beginequationlabelxx
beginsplit
aamp=b+c-d
ampquad +e-f
amp=g+h
amp=i
endsplit
endequation
EquationsEnvironments multline
bull align first line of equation on the left last line on the right and center middle lines
beginmultline
a+b+c+d+e+f
+i+j+k+l+m+n
endmultline
gatherbull center alignment of all equations
Equations
Useful commands in amsmathpackage intertext
bull place correctly formatted lines of text in middle of equation without affecting alignment
The second two simulations were performed assuming the true underlying model was the shared parameter model below with 30 and 50 censoring rates respectivelybeginalignmboxlogit(mu_jkt)=amp-34+23(I_t=2)+2(mboxiron)+01(mboxtime)amp +beta_j1+(mboxtime)beta_j2 qquad qquad t=12log(r_j)=amp12+013(mboxiron)+01(mboxlength of ESRD)amp +beta_j1+01beta_j2+err_j intertextwhere left(beginarraycc beta_j1 beta_j2 endarray right) sim amp N left(left(beginarraycc00 endarray right)left(beginarraycc08 amp0101 amp02endarray right) right) err_j sim amp N(007)endalign
EquationsUseful commands in amsmath package left right
bull used to let LaTeX set deliminator sizes correctly over multiple lines of equations
beginalign
phi(yijamp|xyuivcbeta_ijhatvcvarphi)
amp=
amp times prod_t=2^S-1left(fracmboxexp(alpha_01++alpha_0t+vcx_1ijk^Tvcalpha_1+T
1+mboxexp(alpha_01++alpha_0t+vcx_1ijk^Tvcalpha_1+T right
amp left -fracmboxexp(alpha_01++alpha_0(t-1)+vcx_1ijk^Tvcalpha_1
+T
1+mboxexp(alpha_01++alpha_0(t-1)+vcx_1ijk^Tvcalpha_1+Tright)^y_ijkt
amp
Tamp=
endalign
Equations
Useful commands in amsmath package shoveleft shoveright
bull aligns equation to the left right of the linebeginmultline
A
B
shoverightC
D
endmultline
AB
CD
LaTeX Resources
Good intro to LaTeX atbull httpswwwlatex-projectorgbull httpsenwikibooksorgwikiLaTeX
Booksbull httpswwwlatex-projectorghelpbooksbull Frank Mittelbach Michel Goossens Johannes Braams David Carlisle
Chris Rowley (2004) The LaTeX Companion 2nd edition
Some useful packages - Tables longtable
bull allows table that extends over multiple pages to be split multirow
bull allows table columns to span multiple rows columns
usepackagemultirow
begintabularcc|c|c|c|c|l
cline3-6
amp amp multicolumn4|c|Primes cline3-6
amp amp 2 amp 3 amp 5 amp 7 cline1-6
multicolumn1|c|multirow2Powers amp
multicolumn1|c|504 amp 3 amp 2 amp 0 amp 1 amp cline2-6
multicolumn1|c| amp
multicolumn1|c|540 amp 2 amp 3 amp 1 amp 0 amp cline1-6
multicolumn1|c|multirow2Powers amp
multicolumn1|c|gcd amp 2 amp 2 amp 0 amp 0 amp min cline2-6
multicolumn1|c| amp
multicolumn1|c|lcm amp 3 amp 3 amp 1 amp 1 amp max cline1-6
endtabular
Some useful packages - Figures wrapfig
bull allows text to wrap around the figure instead of the figure taking up an entire line
subfigbull place several figures (or tables) into one figure (table) with separate
caption options
usepackagesubfig
beginfigure
centering
subfigure[A gull]qquad
subfigure[A tiger]qquad
subfigure[A mouse]
label3figs-c
captionPictures of animalslabel3figs
endfigure
Equations Define complex commonly used symbols at start of document
newcommandvc[1]mboxboldmath$1$
newcommandyijvcy_ij
newcommandbSbvcb^T vcSigma_u vcb
newcommandcovoperatornamecov
newcommandvaroperatornamevar
newcommandtroperatornametr
Reference equations using eqref to automatically get parentheses Egequation eqrefeqintegration equation (12)
EquationsEnvironments in amsmath package align
bull nicer multiline equation alignment
beginalignvcnu^(k+1) amp= vcnu^(k)+(vcX_1E(vcM)^(k)vcX_1)^-1vcX_1E(tildevcY)^(k)halR amp= left( sum_iXRi^TXRi right)^-1Esum_ivcX_2i^T(vcr_i-vc1_n_ivcb^Tui)hb amp= Eleft( sum_in_iuiui^T right)^-1Esum_iuivc1_n_i^T(vcr_i-vcX_2ivcalpha_2)hsigu amp= left(sum_in_iright)^-1Esum_in_iuiui^Thsigb amp= left(sum_in_iright)^-1Esum_ijvcbeta_ijvcbeta_ij^ThsigR amp= left(sum_in_iright)^-1Esum_i(vcr_i-vcX_2ivcalpha_2-vc1_nivcb^Tui)^Tamp qquad times(vcr_i-vcX_2ivcalpha_2-vc1_nivcb^Tui)endalign
EquationsEnvironments alignat
bull align equations at more than one place split
bull use inside equation align etc to split an equation over multiple lines with multiline equation getting only one reference number
beginequationlabelxx
beginsplit
aamp=b+c-d
ampquad +e-f
amp=g+h
amp=i
endsplit
endequation
EquationsEnvironments multline
bull align first line of equation on the left last line on the right and center middle lines
beginmultline
a+b+c+d+e+f
+i+j+k+l+m+n
endmultline
gatherbull center alignment of all equations
Equations
Useful commands in amsmathpackage intertext
bull place correctly formatted lines of text in middle of equation without affecting alignment
The second two simulations were performed assuming the true underlying model was the shared parameter model below with 30 and 50 censoring rates respectivelybeginalignmboxlogit(mu_jkt)=amp-34+23(I_t=2)+2(mboxiron)+01(mboxtime)amp +beta_j1+(mboxtime)beta_j2 qquad qquad t=12log(r_j)=amp12+013(mboxiron)+01(mboxlength of ESRD)amp +beta_j1+01beta_j2+err_j intertextwhere left(beginarraycc beta_j1 beta_j2 endarray right) sim amp N left(left(beginarraycc00 endarray right)left(beginarraycc08 amp0101 amp02endarray right) right) err_j sim amp N(007)endalign
EquationsUseful commands in amsmath package left right
bull used to let LaTeX set deliminator sizes correctly over multiple lines of equations
beginalign
phi(yijamp|xyuivcbeta_ijhatvcvarphi)
amp=
amp times prod_t=2^S-1left(fracmboxexp(alpha_01++alpha_0t+vcx_1ijk^Tvcalpha_1+T
1+mboxexp(alpha_01++alpha_0t+vcx_1ijk^Tvcalpha_1+T right
amp left -fracmboxexp(alpha_01++alpha_0(t-1)+vcx_1ijk^Tvcalpha_1
+T
1+mboxexp(alpha_01++alpha_0(t-1)+vcx_1ijk^Tvcalpha_1+Tright)^y_ijkt
amp
Tamp=
endalign
Equations
Useful commands in amsmath package shoveleft shoveright
bull aligns equation to the left right of the linebeginmultline
A
B
shoverightC
D
endmultline
AB
CD
LaTeX Resources
Good intro to LaTeX atbull httpswwwlatex-projectorgbull httpsenwikibooksorgwikiLaTeX
Booksbull httpswwwlatex-projectorghelpbooksbull Frank Mittelbach Michel Goossens Johannes Braams David Carlisle
Chris Rowley (2004) The LaTeX Companion 2nd edition
usepackagemultirow
begintabularcc|c|c|c|c|l
cline3-6
amp amp multicolumn4|c|Primes cline3-6
amp amp 2 amp 3 amp 5 amp 7 cline1-6
multicolumn1|c|multirow2Powers amp
multicolumn1|c|504 amp 3 amp 2 amp 0 amp 1 amp cline2-6
multicolumn1|c| amp
multicolumn1|c|540 amp 2 amp 3 amp 1 amp 0 amp cline1-6
multicolumn1|c|multirow2Powers amp
multicolumn1|c|gcd amp 2 amp 2 amp 0 amp 0 amp min cline2-6
multicolumn1|c| amp
multicolumn1|c|lcm amp 3 amp 3 amp 1 amp 1 amp max cline1-6
endtabular
Some useful packages - Figures wrapfig
bull allows text to wrap around the figure instead of the figure taking up an entire line
subfigbull place several figures (or tables) into one figure (table) with separate
caption options
usepackagesubfig
beginfigure
centering
subfigure[A gull]qquad
subfigure[A tiger]qquad
subfigure[A mouse]
label3figs-c
captionPictures of animalslabel3figs
endfigure
Equations Define complex commonly used symbols at start of document
newcommandvc[1]mboxboldmath$1$
newcommandyijvcy_ij
newcommandbSbvcb^T vcSigma_u vcb
newcommandcovoperatornamecov
newcommandvaroperatornamevar
newcommandtroperatornametr
Reference equations using eqref to automatically get parentheses Egequation eqrefeqintegration equation (12)
EquationsEnvironments in amsmath package align
bull nicer multiline equation alignment
beginalignvcnu^(k+1) amp= vcnu^(k)+(vcX_1E(vcM)^(k)vcX_1)^-1vcX_1E(tildevcY)^(k)halR amp= left( sum_iXRi^TXRi right)^-1Esum_ivcX_2i^T(vcr_i-vc1_n_ivcb^Tui)hb amp= Eleft( sum_in_iuiui^T right)^-1Esum_iuivc1_n_i^T(vcr_i-vcX_2ivcalpha_2)hsigu amp= left(sum_in_iright)^-1Esum_in_iuiui^Thsigb amp= left(sum_in_iright)^-1Esum_ijvcbeta_ijvcbeta_ij^ThsigR amp= left(sum_in_iright)^-1Esum_i(vcr_i-vcX_2ivcalpha_2-vc1_nivcb^Tui)^Tamp qquad times(vcr_i-vcX_2ivcalpha_2-vc1_nivcb^Tui)endalign
EquationsEnvironments alignat
bull align equations at more than one place split
bull use inside equation align etc to split an equation over multiple lines with multiline equation getting only one reference number
beginequationlabelxx
beginsplit
aamp=b+c-d
ampquad +e-f
amp=g+h
amp=i
endsplit
endequation
EquationsEnvironments multline
bull align first line of equation on the left last line on the right and center middle lines
beginmultline
a+b+c+d+e+f
+i+j+k+l+m+n
endmultline
gatherbull center alignment of all equations
Equations
Useful commands in amsmathpackage intertext
bull place correctly formatted lines of text in middle of equation without affecting alignment
The second two simulations were performed assuming the true underlying model was the shared parameter model below with 30 and 50 censoring rates respectivelybeginalignmboxlogit(mu_jkt)=amp-34+23(I_t=2)+2(mboxiron)+01(mboxtime)amp +beta_j1+(mboxtime)beta_j2 qquad qquad t=12log(r_j)=amp12+013(mboxiron)+01(mboxlength of ESRD)amp +beta_j1+01beta_j2+err_j intertextwhere left(beginarraycc beta_j1 beta_j2 endarray right) sim amp N left(left(beginarraycc00 endarray right)left(beginarraycc08 amp0101 amp02endarray right) right) err_j sim amp N(007)endalign
EquationsUseful commands in amsmath package left right
bull used to let LaTeX set deliminator sizes correctly over multiple lines of equations
beginalign
phi(yijamp|xyuivcbeta_ijhatvcvarphi)
amp=
amp times prod_t=2^S-1left(fracmboxexp(alpha_01++alpha_0t+vcx_1ijk^Tvcalpha_1+T
1+mboxexp(alpha_01++alpha_0t+vcx_1ijk^Tvcalpha_1+T right
amp left -fracmboxexp(alpha_01++alpha_0(t-1)+vcx_1ijk^Tvcalpha_1
+T
1+mboxexp(alpha_01++alpha_0(t-1)+vcx_1ijk^Tvcalpha_1+Tright)^y_ijkt
amp
Tamp=
endalign
Equations
Useful commands in amsmath package shoveleft shoveright
bull aligns equation to the left right of the linebeginmultline
A
B
shoverightC
D
endmultline
AB
CD
LaTeX Resources
Good intro to LaTeX atbull httpswwwlatex-projectorgbull httpsenwikibooksorgwikiLaTeX
Booksbull httpswwwlatex-projectorghelpbooksbull Frank Mittelbach Michel Goossens Johannes Braams David Carlisle
Chris Rowley (2004) The LaTeX Companion 2nd edition
Some useful packages - Figures wrapfig
bull allows text to wrap around the figure instead of the figure taking up an entire line
subfigbull place several figures (or tables) into one figure (table) with separate
caption options
usepackagesubfig
beginfigure
centering
subfigure[A gull]qquad
subfigure[A tiger]qquad
subfigure[A mouse]
label3figs-c
captionPictures of animalslabel3figs
endfigure
Equations Define complex commonly used symbols at start of document
newcommandvc[1]mboxboldmath$1$
newcommandyijvcy_ij
newcommandbSbvcb^T vcSigma_u vcb
newcommandcovoperatornamecov
newcommandvaroperatornamevar
newcommandtroperatornametr
Reference equations using eqref to automatically get parentheses Egequation eqrefeqintegration equation (12)
EquationsEnvironments in amsmath package align
bull nicer multiline equation alignment
beginalignvcnu^(k+1) amp= vcnu^(k)+(vcX_1E(vcM)^(k)vcX_1)^-1vcX_1E(tildevcY)^(k)halR amp= left( sum_iXRi^TXRi right)^-1Esum_ivcX_2i^T(vcr_i-vc1_n_ivcb^Tui)hb amp= Eleft( sum_in_iuiui^T right)^-1Esum_iuivc1_n_i^T(vcr_i-vcX_2ivcalpha_2)hsigu amp= left(sum_in_iright)^-1Esum_in_iuiui^Thsigb amp= left(sum_in_iright)^-1Esum_ijvcbeta_ijvcbeta_ij^ThsigR amp= left(sum_in_iright)^-1Esum_i(vcr_i-vcX_2ivcalpha_2-vc1_nivcb^Tui)^Tamp qquad times(vcr_i-vcX_2ivcalpha_2-vc1_nivcb^Tui)endalign
EquationsEnvironments alignat
bull align equations at more than one place split
bull use inside equation align etc to split an equation over multiple lines with multiline equation getting only one reference number
beginequationlabelxx
beginsplit
aamp=b+c-d
ampquad +e-f
amp=g+h
amp=i
endsplit
endequation
EquationsEnvironments multline
bull align first line of equation on the left last line on the right and center middle lines
beginmultline
a+b+c+d+e+f
+i+j+k+l+m+n
endmultline
gatherbull center alignment of all equations
Equations
Useful commands in amsmathpackage intertext
bull place correctly formatted lines of text in middle of equation without affecting alignment
The second two simulations were performed assuming the true underlying model was the shared parameter model below with 30 and 50 censoring rates respectivelybeginalignmboxlogit(mu_jkt)=amp-34+23(I_t=2)+2(mboxiron)+01(mboxtime)amp +beta_j1+(mboxtime)beta_j2 qquad qquad t=12log(r_j)=amp12+013(mboxiron)+01(mboxlength of ESRD)amp +beta_j1+01beta_j2+err_j intertextwhere left(beginarraycc beta_j1 beta_j2 endarray right) sim amp N left(left(beginarraycc00 endarray right)left(beginarraycc08 amp0101 amp02endarray right) right) err_j sim amp N(007)endalign
EquationsUseful commands in amsmath package left right
bull used to let LaTeX set deliminator sizes correctly over multiple lines of equations
beginalign
phi(yijamp|xyuivcbeta_ijhatvcvarphi)
amp=
amp times prod_t=2^S-1left(fracmboxexp(alpha_01++alpha_0t+vcx_1ijk^Tvcalpha_1+T
1+mboxexp(alpha_01++alpha_0t+vcx_1ijk^Tvcalpha_1+T right
amp left -fracmboxexp(alpha_01++alpha_0(t-1)+vcx_1ijk^Tvcalpha_1
+T
1+mboxexp(alpha_01++alpha_0(t-1)+vcx_1ijk^Tvcalpha_1+Tright)^y_ijkt
amp
Tamp=
endalign
Equations
Useful commands in amsmath package shoveleft shoveright
bull aligns equation to the left right of the linebeginmultline
A
B
shoverightC
D
endmultline
AB
CD
LaTeX Resources
Good intro to LaTeX atbull httpswwwlatex-projectorgbull httpsenwikibooksorgwikiLaTeX
Booksbull httpswwwlatex-projectorghelpbooksbull Frank Mittelbach Michel Goossens Johannes Braams David Carlisle
Chris Rowley (2004) The LaTeX Companion 2nd edition
usepackagesubfig
beginfigure
centering
subfigure[A gull]qquad
subfigure[A tiger]qquad
subfigure[A mouse]
label3figs-c
captionPictures of animalslabel3figs
endfigure
Equations Define complex commonly used symbols at start of document
newcommandvc[1]mboxboldmath$1$
newcommandyijvcy_ij
newcommandbSbvcb^T vcSigma_u vcb
newcommandcovoperatornamecov
newcommandvaroperatornamevar
newcommandtroperatornametr
Reference equations using eqref to automatically get parentheses Egequation eqrefeqintegration equation (12)
EquationsEnvironments in amsmath package align
bull nicer multiline equation alignment
beginalignvcnu^(k+1) amp= vcnu^(k)+(vcX_1E(vcM)^(k)vcX_1)^-1vcX_1E(tildevcY)^(k)halR amp= left( sum_iXRi^TXRi right)^-1Esum_ivcX_2i^T(vcr_i-vc1_n_ivcb^Tui)hb amp= Eleft( sum_in_iuiui^T right)^-1Esum_iuivc1_n_i^T(vcr_i-vcX_2ivcalpha_2)hsigu amp= left(sum_in_iright)^-1Esum_in_iuiui^Thsigb amp= left(sum_in_iright)^-1Esum_ijvcbeta_ijvcbeta_ij^ThsigR amp= left(sum_in_iright)^-1Esum_i(vcr_i-vcX_2ivcalpha_2-vc1_nivcb^Tui)^Tamp qquad times(vcr_i-vcX_2ivcalpha_2-vc1_nivcb^Tui)endalign
EquationsEnvironments alignat
bull align equations at more than one place split
bull use inside equation align etc to split an equation over multiple lines with multiline equation getting only one reference number
beginequationlabelxx
beginsplit
aamp=b+c-d
ampquad +e-f
amp=g+h
amp=i
endsplit
endequation
EquationsEnvironments multline
bull align first line of equation on the left last line on the right and center middle lines
beginmultline
a+b+c+d+e+f
+i+j+k+l+m+n
endmultline
gatherbull center alignment of all equations
Equations
Useful commands in amsmathpackage intertext
bull place correctly formatted lines of text in middle of equation without affecting alignment
The second two simulations were performed assuming the true underlying model was the shared parameter model below with 30 and 50 censoring rates respectivelybeginalignmboxlogit(mu_jkt)=amp-34+23(I_t=2)+2(mboxiron)+01(mboxtime)amp +beta_j1+(mboxtime)beta_j2 qquad qquad t=12log(r_j)=amp12+013(mboxiron)+01(mboxlength of ESRD)amp +beta_j1+01beta_j2+err_j intertextwhere left(beginarraycc beta_j1 beta_j2 endarray right) sim amp N left(left(beginarraycc00 endarray right)left(beginarraycc08 amp0101 amp02endarray right) right) err_j sim amp N(007)endalign
EquationsUseful commands in amsmath package left right
bull used to let LaTeX set deliminator sizes correctly over multiple lines of equations
beginalign
phi(yijamp|xyuivcbeta_ijhatvcvarphi)
amp=
amp times prod_t=2^S-1left(fracmboxexp(alpha_01++alpha_0t+vcx_1ijk^Tvcalpha_1+T
1+mboxexp(alpha_01++alpha_0t+vcx_1ijk^Tvcalpha_1+T right
amp left -fracmboxexp(alpha_01++alpha_0(t-1)+vcx_1ijk^Tvcalpha_1
+T
1+mboxexp(alpha_01++alpha_0(t-1)+vcx_1ijk^Tvcalpha_1+Tright)^y_ijkt
amp
Tamp=
endalign
Equations
Useful commands in amsmath package shoveleft shoveright
bull aligns equation to the left right of the linebeginmultline
A
B
shoverightC
D
endmultline
AB
CD
LaTeX Resources
Good intro to LaTeX atbull httpswwwlatex-projectorgbull httpsenwikibooksorgwikiLaTeX
Booksbull httpswwwlatex-projectorghelpbooksbull Frank Mittelbach Michel Goossens Johannes Braams David Carlisle
Chris Rowley (2004) The LaTeX Companion 2nd edition
Equations Define complex commonly used symbols at start of document
newcommandvc[1]mboxboldmath$1$
newcommandyijvcy_ij
newcommandbSbvcb^T vcSigma_u vcb
newcommandcovoperatornamecov
newcommandvaroperatornamevar
newcommandtroperatornametr
Reference equations using eqref to automatically get parentheses Egequation eqrefeqintegration equation (12)
EquationsEnvironments in amsmath package align
bull nicer multiline equation alignment
beginalignvcnu^(k+1) amp= vcnu^(k)+(vcX_1E(vcM)^(k)vcX_1)^-1vcX_1E(tildevcY)^(k)halR amp= left( sum_iXRi^TXRi right)^-1Esum_ivcX_2i^T(vcr_i-vc1_n_ivcb^Tui)hb amp= Eleft( sum_in_iuiui^T right)^-1Esum_iuivc1_n_i^T(vcr_i-vcX_2ivcalpha_2)hsigu amp= left(sum_in_iright)^-1Esum_in_iuiui^Thsigb amp= left(sum_in_iright)^-1Esum_ijvcbeta_ijvcbeta_ij^ThsigR amp= left(sum_in_iright)^-1Esum_i(vcr_i-vcX_2ivcalpha_2-vc1_nivcb^Tui)^Tamp qquad times(vcr_i-vcX_2ivcalpha_2-vc1_nivcb^Tui)endalign
EquationsEnvironments alignat
bull align equations at more than one place split
bull use inside equation align etc to split an equation over multiple lines with multiline equation getting only one reference number
beginequationlabelxx
beginsplit
aamp=b+c-d
ampquad +e-f
amp=g+h
amp=i
endsplit
endequation
EquationsEnvironments multline
bull align first line of equation on the left last line on the right and center middle lines
beginmultline
a+b+c+d+e+f
+i+j+k+l+m+n
endmultline
gatherbull center alignment of all equations
Equations
Useful commands in amsmathpackage intertext
bull place correctly formatted lines of text in middle of equation without affecting alignment
The second two simulations were performed assuming the true underlying model was the shared parameter model below with 30 and 50 censoring rates respectivelybeginalignmboxlogit(mu_jkt)=amp-34+23(I_t=2)+2(mboxiron)+01(mboxtime)amp +beta_j1+(mboxtime)beta_j2 qquad qquad t=12log(r_j)=amp12+013(mboxiron)+01(mboxlength of ESRD)amp +beta_j1+01beta_j2+err_j intertextwhere left(beginarraycc beta_j1 beta_j2 endarray right) sim amp N left(left(beginarraycc00 endarray right)left(beginarraycc08 amp0101 amp02endarray right) right) err_j sim amp N(007)endalign
EquationsUseful commands in amsmath package left right
bull used to let LaTeX set deliminator sizes correctly over multiple lines of equations
beginalign
phi(yijamp|xyuivcbeta_ijhatvcvarphi)
amp=
amp times prod_t=2^S-1left(fracmboxexp(alpha_01++alpha_0t+vcx_1ijk^Tvcalpha_1+T
1+mboxexp(alpha_01++alpha_0t+vcx_1ijk^Tvcalpha_1+T right
amp left -fracmboxexp(alpha_01++alpha_0(t-1)+vcx_1ijk^Tvcalpha_1
+T
1+mboxexp(alpha_01++alpha_0(t-1)+vcx_1ijk^Tvcalpha_1+Tright)^y_ijkt
amp
Tamp=
endalign
Equations
Useful commands in amsmath package shoveleft shoveright
bull aligns equation to the left right of the linebeginmultline
A
B
shoverightC
D
endmultline
AB
CD
LaTeX Resources
Good intro to LaTeX atbull httpswwwlatex-projectorgbull httpsenwikibooksorgwikiLaTeX
Booksbull httpswwwlatex-projectorghelpbooksbull Frank Mittelbach Michel Goossens Johannes Braams David Carlisle
Chris Rowley (2004) The LaTeX Companion 2nd edition
EquationsEnvironments in amsmath package align
bull nicer multiline equation alignment
beginalignvcnu^(k+1) amp= vcnu^(k)+(vcX_1E(vcM)^(k)vcX_1)^-1vcX_1E(tildevcY)^(k)halR amp= left( sum_iXRi^TXRi right)^-1Esum_ivcX_2i^T(vcr_i-vc1_n_ivcb^Tui)hb amp= Eleft( sum_in_iuiui^T right)^-1Esum_iuivc1_n_i^T(vcr_i-vcX_2ivcalpha_2)hsigu amp= left(sum_in_iright)^-1Esum_in_iuiui^Thsigb amp= left(sum_in_iright)^-1Esum_ijvcbeta_ijvcbeta_ij^ThsigR amp= left(sum_in_iright)^-1Esum_i(vcr_i-vcX_2ivcalpha_2-vc1_nivcb^Tui)^Tamp qquad times(vcr_i-vcX_2ivcalpha_2-vc1_nivcb^Tui)endalign
EquationsEnvironments alignat
bull align equations at more than one place split
bull use inside equation align etc to split an equation over multiple lines with multiline equation getting only one reference number
beginequationlabelxx
beginsplit
aamp=b+c-d
ampquad +e-f
amp=g+h
amp=i
endsplit
endequation
EquationsEnvironments multline
bull align first line of equation on the left last line on the right and center middle lines
beginmultline
a+b+c+d+e+f
+i+j+k+l+m+n
endmultline
gatherbull center alignment of all equations
Equations
Useful commands in amsmathpackage intertext
bull place correctly formatted lines of text in middle of equation without affecting alignment
The second two simulations were performed assuming the true underlying model was the shared parameter model below with 30 and 50 censoring rates respectivelybeginalignmboxlogit(mu_jkt)=amp-34+23(I_t=2)+2(mboxiron)+01(mboxtime)amp +beta_j1+(mboxtime)beta_j2 qquad qquad t=12log(r_j)=amp12+013(mboxiron)+01(mboxlength of ESRD)amp +beta_j1+01beta_j2+err_j intertextwhere left(beginarraycc beta_j1 beta_j2 endarray right) sim amp N left(left(beginarraycc00 endarray right)left(beginarraycc08 amp0101 amp02endarray right) right) err_j sim amp N(007)endalign
EquationsUseful commands in amsmath package left right
bull used to let LaTeX set deliminator sizes correctly over multiple lines of equations
beginalign
phi(yijamp|xyuivcbeta_ijhatvcvarphi)
amp=
amp times prod_t=2^S-1left(fracmboxexp(alpha_01++alpha_0t+vcx_1ijk^Tvcalpha_1+T
1+mboxexp(alpha_01++alpha_0t+vcx_1ijk^Tvcalpha_1+T right
amp left -fracmboxexp(alpha_01++alpha_0(t-1)+vcx_1ijk^Tvcalpha_1
+T
1+mboxexp(alpha_01++alpha_0(t-1)+vcx_1ijk^Tvcalpha_1+Tright)^y_ijkt
amp
Tamp=
endalign
Equations
Useful commands in amsmath package shoveleft shoveright
bull aligns equation to the left right of the linebeginmultline
A
B
shoverightC
D
endmultline
AB
CD
LaTeX Resources
Good intro to LaTeX atbull httpswwwlatex-projectorgbull httpsenwikibooksorgwikiLaTeX
Booksbull httpswwwlatex-projectorghelpbooksbull Frank Mittelbach Michel Goossens Johannes Braams David Carlisle
Chris Rowley (2004) The LaTeX Companion 2nd edition
beginalignvcnu^(k+1) amp= vcnu^(k)+(vcX_1E(vcM)^(k)vcX_1)^-1vcX_1E(tildevcY)^(k)halR amp= left( sum_iXRi^TXRi right)^-1Esum_ivcX_2i^T(vcr_i-vc1_n_ivcb^Tui)hb amp= Eleft( sum_in_iuiui^T right)^-1Esum_iuivc1_n_i^T(vcr_i-vcX_2ivcalpha_2)hsigu amp= left(sum_in_iright)^-1Esum_in_iuiui^Thsigb amp= left(sum_in_iright)^-1Esum_ijvcbeta_ijvcbeta_ij^ThsigR amp= left(sum_in_iright)^-1Esum_i(vcr_i-vcX_2ivcalpha_2-vc1_nivcb^Tui)^Tamp qquad times(vcr_i-vcX_2ivcalpha_2-vc1_nivcb^Tui)endalign
EquationsEnvironments alignat
bull align equations at more than one place split
bull use inside equation align etc to split an equation over multiple lines with multiline equation getting only one reference number
beginequationlabelxx
beginsplit
aamp=b+c-d
ampquad +e-f
amp=g+h
amp=i
endsplit
endequation
EquationsEnvironments multline
bull align first line of equation on the left last line on the right and center middle lines
beginmultline
a+b+c+d+e+f
+i+j+k+l+m+n
endmultline
gatherbull center alignment of all equations
Equations
Useful commands in amsmathpackage intertext
bull place correctly formatted lines of text in middle of equation without affecting alignment
The second two simulations were performed assuming the true underlying model was the shared parameter model below with 30 and 50 censoring rates respectivelybeginalignmboxlogit(mu_jkt)=amp-34+23(I_t=2)+2(mboxiron)+01(mboxtime)amp +beta_j1+(mboxtime)beta_j2 qquad qquad t=12log(r_j)=amp12+013(mboxiron)+01(mboxlength of ESRD)amp +beta_j1+01beta_j2+err_j intertextwhere left(beginarraycc beta_j1 beta_j2 endarray right) sim amp N left(left(beginarraycc00 endarray right)left(beginarraycc08 amp0101 amp02endarray right) right) err_j sim amp N(007)endalign
EquationsUseful commands in amsmath package left right
bull used to let LaTeX set deliminator sizes correctly over multiple lines of equations
beginalign
phi(yijamp|xyuivcbeta_ijhatvcvarphi)
amp=
amp times prod_t=2^S-1left(fracmboxexp(alpha_01++alpha_0t+vcx_1ijk^Tvcalpha_1+T
1+mboxexp(alpha_01++alpha_0t+vcx_1ijk^Tvcalpha_1+T right
amp left -fracmboxexp(alpha_01++alpha_0(t-1)+vcx_1ijk^Tvcalpha_1
+T
1+mboxexp(alpha_01++alpha_0(t-1)+vcx_1ijk^Tvcalpha_1+Tright)^y_ijkt
amp
Tamp=
endalign
Equations
Useful commands in amsmath package shoveleft shoveright
bull aligns equation to the left right of the linebeginmultline
A
B
shoverightC
D
endmultline
AB
CD
LaTeX Resources
Good intro to LaTeX atbull httpswwwlatex-projectorgbull httpsenwikibooksorgwikiLaTeX
Booksbull httpswwwlatex-projectorghelpbooksbull Frank Mittelbach Michel Goossens Johannes Braams David Carlisle
Chris Rowley (2004) The LaTeX Companion 2nd edition
EquationsEnvironments alignat
bull align equations at more than one place split
bull use inside equation align etc to split an equation over multiple lines with multiline equation getting only one reference number
beginequationlabelxx
beginsplit
aamp=b+c-d
ampquad +e-f
amp=g+h
amp=i
endsplit
endequation
EquationsEnvironments multline
bull align first line of equation on the left last line on the right and center middle lines
beginmultline
a+b+c+d+e+f
+i+j+k+l+m+n
endmultline
gatherbull center alignment of all equations
Equations
Useful commands in amsmathpackage intertext
bull place correctly formatted lines of text in middle of equation without affecting alignment
The second two simulations were performed assuming the true underlying model was the shared parameter model below with 30 and 50 censoring rates respectivelybeginalignmboxlogit(mu_jkt)=amp-34+23(I_t=2)+2(mboxiron)+01(mboxtime)amp +beta_j1+(mboxtime)beta_j2 qquad qquad t=12log(r_j)=amp12+013(mboxiron)+01(mboxlength of ESRD)amp +beta_j1+01beta_j2+err_j intertextwhere left(beginarraycc beta_j1 beta_j2 endarray right) sim amp N left(left(beginarraycc00 endarray right)left(beginarraycc08 amp0101 amp02endarray right) right) err_j sim amp N(007)endalign
EquationsUseful commands in amsmath package left right
bull used to let LaTeX set deliminator sizes correctly over multiple lines of equations
beginalign
phi(yijamp|xyuivcbeta_ijhatvcvarphi)
amp=
amp times prod_t=2^S-1left(fracmboxexp(alpha_01++alpha_0t+vcx_1ijk^Tvcalpha_1+T
1+mboxexp(alpha_01++alpha_0t+vcx_1ijk^Tvcalpha_1+T right
amp left -fracmboxexp(alpha_01++alpha_0(t-1)+vcx_1ijk^Tvcalpha_1
+T
1+mboxexp(alpha_01++alpha_0(t-1)+vcx_1ijk^Tvcalpha_1+Tright)^y_ijkt
amp
Tamp=
endalign
Equations
Useful commands in amsmath package shoveleft shoveright
bull aligns equation to the left right of the linebeginmultline
A
B
shoverightC
D
endmultline
AB
CD
LaTeX Resources
Good intro to LaTeX atbull httpswwwlatex-projectorgbull httpsenwikibooksorgwikiLaTeX
Booksbull httpswwwlatex-projectorghelpbooksbull Frank Mittelbach Michel Goossens Johannes Braams David Carlisle
Chris Rowley (2004) The LaTeX Companion 2nd edition
EquationsEnvironments multline
bull align first line of equation on the left last line on the right and center middle lines
beginmultline
a+b+c+d+e+f
+i+j+k+l+m+n
endmultline
gatherbull center alignment of all equations
Equations
Useful commands in amsmathpackage intertext
bull place correctly formatted lines of text in middle of equation without affecting alignment
The second two simulations were performed assuming the true underlying model was the shared parameter model below with 30 and 50 censoring rates respectivelybeginalignmboxlogit(mu_jkt)=amp-34+23(I_t=2)+2(mboxiron)+01(mboxtime)amp +beta_j1+(mboxtime)beta_j2 qquad qquad t=12log(r_j)=amp12+013(mboxiron)+01(mboxlength of ESRD)amp +beta_j1+01beta_j2+err_j intertextwhere left(beginarraycc beta_j1 beta_j2 endarray right) sim amp N left(left(beginarraycc00 endarray right)left(beginarraycc08 amp0101 amp02endarray right) right) err_j sim amp N(007)endalign
EquationsUseful commands in amsmath package left right
bull used to let LaTeX set deliminator sizes correctly over multiple lines of equations
beginalign
phi(yijamp|xyuivcbeta_ijhatvcvarphi)
amp=
amp times prod_t=2^S-1left(fracmboxexp(alpha_01++alpha_0t+vcx_1ijk^Tvcalpha_1+T
1+mboxexp(alpha_01++alpha_0t+vcx_1ijk^Tvcalpha_1+T right
amp left -fracmboxexp(alpha_01++alpha_0(t-1)+vcx_1ijk^Tvcalpha_1
+T
1+mboxexp(alpha_01++alpha_0(t-1)+vcx_1ijk^Tvcalpha_1+Tright)^y_ijkt
amp
Tamp=
endalign
Equations
Useful commands in amsmath package shoveleft shoveright
bull aligns equation to the left right of the linebeginmultline
A
B
shoverightC
D
endmultline
AB
CD
LaTeX Resources
Good intro to LaTeX atbull httpswwwlatex-projectorgbull httpsenwikibooksorgwikiLaTeX
Booksbull httpswwwlatex-projectorghelpbooksbull Frank Mittelbach Michel Goossens Johannes Braams David Carlisle
Chris Rowley (2004) The LaTeX Companion 2nd edition
Equations
Useful commands in amsmathpackage intertext
bull place correctly formatted lines of text in middle of equation without affecting alignment
The second two simulations were performed assuming the true underlying model was the shared parameter model below with 30 and 50 censoring rates respectivelybeginalignmboxlogit(mu_jkt)=amp-34+23(I_t=2)+2(mboxiron)+01(mboxtime)amp +beta_j1+(mboxtime)beta_j2 qquad qquad t=12log(r_j)=amp12+013(mboxiron)+01(mboxlength of ESRD)amp +beta_j1+01beta_j2+err_j intertextwhere left(beginarraycc beta_j1 beta_j2 endarray right) sim amp N left(left(beginarraycc00 endarray right)left(beginarraycc08 amp0101 amp02endarray right) right) err_j sim amp N(007)endalign
EquationsUseful commands in amsmath package left right
bull used to let LaTeX set deliminator sizes correctly over multiple lines of equations
beginalign
phi(yijamp|xyuivcbeta_ijhatvcvarphi)
amp=
amp times prod_t=2^S-1left(fracmboxexp(alpha_01++alpha_0t+vcx_1ijk^Tvcalpha_1+T
1+mboxexp(alpha_01++alpha_0t+vcx_1ijk^Tvcalpha_1+T right
amp left -fracmboxexp(alpha_01++alpha_0(t-1)+vcx_1ijk^Tvcalpha_1
+T
1+mboxexp(alpha_01++alpha_0(t-1)+vcx_1ijk^Tvcalpha_1+Tright)^y_ijkt
amp
Tamp=
endalign
Equations
Useful commands in amsmath package shoveleft shoveright
bull aligns equation to the left right of the linebeginmultline
A
B
shoverightC
D
endmultline
AB
CD
LaTeX Resources
Good intro to LaTeX atbull httpswwwlatex-projectorgbull httpsenwikibooksorgwikiLaTeX
Booksbull httpswwwlatex-projectorghelpbooksbull Frank Mittelbach Michel Goossens Johannes Braams David Carlisle
Chris Rowley (2004) The LaTeX Companion 2nd edition
The second two simulations were performed assuming the true underlying model was the shared parameter model below with 30 and 50 censoring rates respectivelybeginalignmboxlogit(mu_jkt)=amp-34+23(I_t=2)+2(mboxiron)+01(mboxtime)amp +beta_j1+(mboxtime)beta_j2 qquad qquad t=12log(r_j)=amp12+013(mboxiron)+01(mboxlength of ESRD)amp +beta_j1+01beta_j2+err_j intertextwhere left(beginarraycc beta_j1 beta_j2 endarray right) sim amp N left(left(beginarraycc00 endarray right)left(beginarraycc08 amp0101 amp02endarray right) right) err_j sim amp N(007)endalign
EquationsUseful commands in amsmath package left right
bull used to let LaTeX set deliminator sizes correctly over multiple lines of equations
beginalign
phi(yijamp|xyuivcbeta_ijhatvcvarphi)
amp=
amp times prod_t=2^S-1left(fracmboxexp(alpha_01++alpha_0t+vcx_1ijk^Tvcalpha_1+T
1+mboxexp(alpha_01++alpha_0t+vcx_1ijk^Tvcalpha_1+T right
amp left -fracmboxexp(alpha_01++alpha_0(t-1)+vcx_1ijk^Tvcalpha_1
+T
1+mboxexp(alpha_01++alpha_0(t-1)+vcx_1ijk^Tvcalpha_1+Tright)^y_ijkt
amp
Tamp=
endalign
Equations
Useful commands in amsmath package shoveleft shoveright
bull aligns equation to the left right of the linebeginmultline
A
B
shoverightC
D
endmultline
AB
CD
LaTeX Resources
Good intro to LaTeX atbull httpswwwlatex-projectorgbull httpsenwikibooksorgwikiLaTeX
Booksbull httpswwwlatex-projectorghelpbooksbull Frank Mittelbach Michel Goossens Johannes Braams David Carlisle
Chris Rowley (2004) The LaTeX Companion 2nd edition
EquationsUseful commands in amsmath package left right
bull used to let LaTeX set deliminator sizes correctly over multiple lines of equations
beginalign
phi(yijamp|xyuivcbeta_ijhatvcvarphi)
amp=
amp times prod_t=2^S-1left(fracmboxexp(alpha_01++alpha_0t+vcx_1ijk^Tvcalpha_1+T
1+mboxexp(alpha_01++alpha_0t+vcx_1ijk^Tvcalpha_1+T right
amp left -fracmboxexp(alpha_01++alpha_0(t-1)+vcx_1ijk^Tvcalpha_1
+T
1+mboxexp(alpha_01++alpha_0(t-1)+vcx_1ijk^Tvcalpha_1+Tright)^y_ijkt
amp
Tamp=
endalign
Equations
Useful commands in amsmath package shoveleft shoveright
bull aligns equation to the left right of the linebeginmultline
A
B
shoverightC
D
endmultline
AB
CD
LaTeX Resources
Good intro to LaTeX atbull httpswwwlatex-projectorgbull httpsenwikibooksorgwikiLaTeX
Booksbull httpswwwlatex-projectorghelpbooksbull Frank Mittelbach Michel Goossens Johannes Braams David Carlisle
Chris Rowley (2004) The LaTeX Companion 2nd edition
beginalign
phi(yijamp|xyuivcbeta_ijhatvcvarphi)
amp=
amp times prod_t=2^S-1left(fracmboxexp(alpha_01++alpha_0t+vcx_1ijk^Tvcalpha_1+T
1+mboxexp(alpha_01++alpha_0t+vcx_1ijk^Tvcalpha_1+T right
amp left -fracmboxexp(alpha_01++alpha_0(t-1)+vcx_1ijk^Tvcalpha_1
+T
1+mboxexp(alpha_01++alpha_0(t-1)+vcx_1ijk^Tvcalpha_1+Tright)^y_ijkt
amp
Tamp=
endalign
Equations
Useful commands in amsmath package shoveleft shoveright
bull aligns equation to the left right of the linebeginmultline
A
B
shoverightC
D
endmultline
AB
CD
LaTeX Resources
Good intro to LaTeX atbull httpswwwlatex-projectorgbull httpsenwikibooksorgwikiLaTeX
Booksbull httpswwwlatex-projectorghelpbooksbull Frank Mittelbach Michel Goossens Johannes Braams David Carlisle
Chris Rowley (2004) The LaTeX Companion 2nd edition
Equations
Useful commands in amsmath package shoveleft shoveright
bull aligns equation to the left right of the linebeginmultline
A
B
shoverightC
D
endmultline
AB
CD
LaTeX Resources
Good intro to LaTeX atbull httpswwwlatex-projectorgbull httpsenwikibooksorgwikiLaTeX
Booksbull httpswwwlatex-projectorghelpbooksbull Frank Mittelbach Michel Goossens Johannes Braams David Carlisle
Chris Rowley (2004) The LaTeX Companion 2nd edition
LaTeX Resources
Good intro to LaTeX atbull httpswwwlatex-projectorgbull httpsenwikibooksorgwikiLaTeX
Booksbull httpswwwlatex-projectorghelpbooksbull Frank Mittelbach Michel Goossens Johannes Braams David Carlisle
Chris Rowley (2004) The LaTeX Companion 2nd edition