# Sublime Text 2 - use typeset latex instead of pdflatex

I just started using this tool and it looks awesome. However I started working on a project I started in TeXShop and I have always used latex typesetting. (I'm on OSX 10.9) Now when I try to compile it won't! it looks like it doesn't recognize the '\include' command (./main.tex:27: Undefined control sequence. [\include{RL_Standardization}]) , but works with \input. is this due to the typesetting pdflatex? How can I make the latex typeset work instead?

I am using this "%!TEX program = ts-latex" but I am not sure what I should change in the LaTeX.sublime-build.. Also when I change it the documentation says: "If you copied the default file to the User directory and modified it, you will not get this functionality. In this case, copy the new default file to User and apply your personalizations again." However this is not clear to me, I don't understand what I should do with this.

Can someone help me out?

main.tex:

\input{preample}% in directory above current

% Continue on Errors
\nonstopmode

\begin{document}

\OnehalfSpacing

\frontmatter%
\include{frontpage}
%\include{abstract}
%\tableofcontents*
%\vspace{1cm}%
%\listoffigures*%
%\vspace{1cm}%
%\listoftables*%
%\vspace{1cm}%
\frontmatter % roman page numbering
\mainmatter%

%\begingroup
%\let\clearpage\relax

%\include{KK_SA}
%\include{RL_Standardization}
%\include{LK_SOA}
%\include{TG_Stakeholders}
\include{MM_Cloud}

%\bibliographystyle{apalike}
%\bibliography{bibliography}

% Style 2
%\bibliographystyle{plain}
%\printbibliography

%\input{appendix}
%\endgroup
%\backmatter
\end{document}


preamble.tex

\documentclass[11pt,article, twoside,openany]{memoir}

%\usepackage[,]{geometry}

%\usepackage[latin1]{inputenc} % danske bogstaver
\usepackage[applemac]{inputenc}  % use applemac
%\usepackage[UKenglish]{babel} % hvis danske overskrifter brug danish istedet for UKenglish
\usepackage{varioref}
\usepackage{lmodern} % vector based Computer Modern font
\usepackage[T1]{fontenc} % fonte (output)
\usepackage{graphicx} % inds¾ttelse af billeder
\usepackage{wrapfig}
\usepackage[svgnames]{xcolor} % enables us to use normal names for colors in links and so on.
\usepackage{cite}

\usepackage{graphics} % rotation af tekst i gnuplots pŒ y-axis

\graphicspath{{./figures/}} % path to figures and images
\usepackage{amssymb}%til gunplay

\usepackage{colortbl} %til farver i tabeller
\usepackage[final]{pdfpages} % allows for adding pdf's to the finished doc. i.e adding an A3 pdf to a A4 project
\usepackage{sistyle,amsmath,amssymb,amsthm}
% verbatim: allows for latex to put text exactly as it looks.. making it like a typewriter.
\usepackage{verbatim} % usage: \begin{verbatim} PUT TEXT HERE \end{verbatim}

\usepackage{epic,eepic,color} % inkludering af Xfig-figur

\pretolerance=2500 % h¿jt tal, mindre orddeling og mere space mellem ord.
% 3000 er okey, 1000 er for lidt, 5000 i overkanten, 8000 er for meget..

\usepackage{amsmath}
\usepackage{mathtools}
\usepackage{float}

\setcounter{maxsecnumdepth}{5}
\setcounter{tocdepth}{2}
\setcounter{topnumber}{2}
\setcounter{bottomnumber}{2}
\setcounter{totalnumber}{2}     % 2 may work better
%\renewcommand{\topfraction}{0.9}?  % max fraction of floats at top
%\renewcommand{\bottomfraction}{0.8}?  % max fraction of floats at bottom
\hypersetup{
citecolor=Blue,
urlcolor=Blue,
citebordercolor=Violet,
filebordercolor=Red,
}

%\setlength{\intextsep}{10pt plus 2pt minus 2pt}
\usepackage{longtable}
\usepackage{lscape}%Landsscape mode in a file \begin{landscape}...\end{landscape}
\usepackage{hyperref}
\hypersetup{ %
pdftitle={Smart Homes for the elderly},
pdfauthor={Manuel Maestrini, Lasse Kabell, Robert Lapins, Florin Timotei Ghiurau, Katharina Kluge},
bookmarksopen=true,
citebordercolor={1 0.1 0}, % 0 1 0 The color of the box around citations
linkbordercolor={0 0.1 1}, % 1 0 0 The color of the box around normal links
pagebordercolor={0 0.1 1}, % 1 1 0 The color of the box around links to pages
urlbordercolor={0 0.1 1}, % 0 1 1 The color of the box around links to URLs
%Note that the color of link borders can be specified only as 3
%numbers in the range 0..1, giving an RGB color. You cannot use colors defined in TEX.
}

\usepackage{memhfixc} % fjerner problem med hyperref og "to<kapitelnummer>" i bookmarks i acrobat reader.

\hyphenation{}
\DisemulatePackage{setspace}
\usepackage{setspace}
\usepackage{parskip}
\usepackage{lipsum}
\usepackage[colorinlistoftodos]{todonotes}

\let\footruleskip\undefined
\usepackage{fancyhdr}

\pagestyle{fancy}
\fancyhf{}
\fancyfoot[L]{Bottom Left}
\fancyfoot[R]{\thepage}
%\fancyfoot[R]{Bottom Right}
\renewcommand{\footrulewidth}{0.4pt}

\fancyfoot[L]{Aalborg University. Copenhagen, Denmark. December, 2013\draftIntro}

\counterwithout{section}{chapter}


When compile this I get:

There were errors in your LaTeX source

./main.tex:29: Undefined control sequence. [\include{MM_Cloud}] ./main.tex:29: Undefined control sequence. [\include{MM_Cloud}]

There were also warnings.

./preample.tex: Package hyperref Warning: Option pagebordercolor' is not available anymore. ./frontpage.tex:6: LaTeX Font Warning: Font shapeT1/lmr/bx/sc' undefined(Font) using T1/lmr/bx/n' instead on input line 6. ./main.tex: LaTeX Font Warning: Some font shapes were not available, defaults substituted.

[Done!]

• I want to add that I just tried to comment out all my include documents and I left only the \include{frontpage} and that builds without errors.The only thing I can think of is that I am using fancyhdr that I do not use in the frontpage! But this is due to the type set ( I tried pdflatex, lualatex and xelatex, but none works). In texshop i use simply "latex". Is there a way to tell sublime text to use the same and make it work? – Manuel Maestrini Nov 17 '13 at 14:53
• Welcome to TeX.SX! Please add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – Mike Renfro Nov 17 '13 at 15:05
• Thank you Mike! I have my main.tex that looks like this: \input{preample} \nonstopmode \begin{document} \OnehalfSpacing \frontmatter% \include{frontpage} \frontmatter % roman page numbering \mainmatter \include{MM_Cloud} \end{document} The preamble.tex has quite a bit of stuff, which I cannot post, but mainly: \documentclass[11pt,article, twoside,openany]{memoir} \usepackage[top=3cm, bottom=3cm, left=4.5cm, right=3.5cm, headsep=1cm]{geometry} \usepackage{fancyhdr} – Manuel Maestrini Nov 17 '13 at 16:22
• All right, I just removed all the fancyhdr related code and the \include works (im using pdflatex). However I still would like someone to let me know how can I use latex typeset instead? Because I would like to use fancyhdr and whatever else I have been used to use in TeXShop. Is it possible? what typeset do people usually suggest? – Manuel Maestrini Nov 17 '13 at 16:30
• I don't think there's a non-PDF TeX on OS X at all. latex, pdflatex, etc. all point to the same binary. lualatex and xelatex are different. The MWE I asked for needs to be a bit more than what you've posted, and also needs to exclude any extraneous content. For example, you need to literally insert the content of preamble instead of leaving it as an \input. If the problem persists when you comment out \include{frontpage}, then remove that line entirely. Eventually, you'll come down to a few (dozen?) lines that exhibit the problem. Edit your question to include all those lines. – Mike Renfro Nov 17 '13 at 16:36

how to use latex instead of pdflatex in SublimeText2 with the LaTeXTools plugin
2. Open the LaTeXTools folder
3. Locate and open the LaTeX.sublime-build file
4. This file contains three sections corresponding to the three supported platforms osx, windows and linux, locate the "cmd" entry in the section corresponding to your operating system
5. For osx and linux (both using latexmk) remove the argument "-pdf" from the list
6. For windows remove the "-p"` option from the list.