Requirements for building the manual?


#1

Is there a wiki or doc anywhere describing the dependencies (presumably some set of latex packages) for building the manual to pdf?


#2

navigate to the top-level stan directory and run the following command:

make docs

Rob


#3

Yup, but then I get build errors indicating missing latex packages. I can iterate through, installing what comes up as missing as I encounter errors, but thought I’d check if there was a list somewhere to save time.


#4

Nevermind. I’m on arch & ended up downloading all the tex-related packages that seemed possibly pertinent, and it built thereafter. Here’s what I installed, there’s probably unnecessary stuff in there:

texlive-genericextra
texlive-science
texlive-fontsextra
texlive-publishers
texlive-latexextra
texlive-plainextra
texlive-formatsextra

#5

There’s a single style file with all the package includes. So you can get the list from there.


#6

Let me be a little more precise.

/cmdstan/stan(develop)$ grep package src/docs/stan-reference/stan-manuals.sty 
  \usepackage[
  \usepackage{times}
  \usepackage{amssymb}
\usepackage{makeidx}
% \usepackage{index}
\usepackage[T1]{fontenc} % needed for |
\usepackage{amsmath}
\usepackage{xspace}
\usepackage{fancyvrb}
%\usepackage{fancyhdr}
\usepackage{titlesec}
\usepackage{graphicx}
\usepackage{natbib}
\usepackage{url}
\usepackage{changebar}
\usepackage{upquote}
\usepackage{alltt}
\usepackage{lscape}
\usepackage{relsize} % defines \mathlarger
\usepackage[titles]{tocloft}
\usepackage{xcolor}
\usepackage[pagebackref,pdfpagelabels,plainpages=false,hypertexnames=true,colorlinks=true,linkcolor=linkcolor,anchorcolor=linkcolor,citecolor=linkcolor,filecolor=linkcolor,menucolor=linkcolor,runcolor=linkcolor,urlcolor=linkcolor,pdfborder={0 0 0}]{hyperref}
\usepackage[final,author=]{fixme}

and that dangling thing at the top is a conditional test for the font we use (the defaults are terrible for code):

\IfFileExists{lucimatx.sty}{
  % ----- if Lucida availalable------------------
  \usepackage[
    scale=0.875,
    stdmathitalics=true,
    stdmathdigits=true]{lucimatx}
 \linespread{1.02}
}{
  % ------ if Lucida not available --------------
  \usepackage{times}
  \usepackage{amssymb}
}

so that’s either lucimatx or times and amssymb.


#7

I just tried to build the manual on my machine and got it working with texlive by installing

texlive-latex-extra
and
texlive-fonts-recommended .

Thought I’d post it here in case someone else is struggling to build it.


#8

Does that bring in a Lucida fonts installation? The problem with the manual up to now is that the nice fonts are proprietary, so I always wind up building it. I’m about to move everything over to bookdown format, so that’ll just require R.