Sublime Text 2 - 使用排版乳胶而不是pdflatex

Sublime Text 2 - 使用排版乳胶而不是pdflatex

我刚开始使用这个工具,它看起来很棒。但是我开始在 TeXShop 上开始一个项目,并且我一直使用 latex 排版。(我在 OSX 10.9 上)现在当我尝试编译它时它不会!它似乎无法识别 '\include' 命令 (./main.tex:27: 未定义的控制序列。[\include{RL_Standardization}]),但可以与 \input 一起使用。这是由于排版 pdflatex 造成的吗?我怎样才能让 latex 排版工作呢?

我正在使用这个“%!TEX program = ts-latex”,但我不确定我应该在 LaTeX.sublime-build 中更改什么。此外,当我更改它时,文档说:“如果您将默认文件复制到用户目录并对其进行修改,您将无法获得此功能。在这种情况下,将新的默认文件复制到用户并再次应用您的个性化设置。”然而这对我来说并不清楚,我不明白我应该怎么做。

有人可以帮我吗?

主要.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} 

序言.tex

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

\usepackage[top=3cm, bottom=3cm, left=4.5cm, right=3.5cm, headsep=1cm]{geometry}
%\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
 \usepackage[plainpages=false,pdfpagelabels,pageanchor=false, breaklinks]{hyperref} % aktive links
\hypersetup{
  colorlinks = true,
  citecolor=Blue,
  linkcolor=Black,
  urlcolor=Blue,
  citebordercolor=Violet,
  filebordercolor=Red,
  linkbordercolor=Blue
  }


%\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{}
\fancyhead[L]{Top Left}
%\fancyhead[C]{Top Center}
\fancyhead[R]{Services Architectures\draftIntro}
\renewcommand{\headrulewidth}{0.4pt}
\fancyfoot[L]{Bottom Left}
\fancyfoot[R]{\thepage}
%\fancyfoot[R]{Bottom Right}
\renewcommand{\footrulewidth}{0.4pt}

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

\counterwithout{section}{chapter}

当编译这个时我得到:

您的 LaTeX 源代码存在错误

./main.tex:29: 未定义控制序列。[\include{MM_Cloud}] ./main.tex:29: 未定义控制序列。[\include{MM_Cloud}]

也有警告。

./preample.tex:软件包 hyperref 警告:选项pagebordercolor' is not available anymore. ./frontpage.tex:6: LaTeX Font Warning: Font shapeT1/lmr/bx/sc' 未定义(字体)在输入行 6 中改用 'T1/lmr/bx/n'。./main.tex:LaTeX 字体警告:某些字体形状不可用,已用默认值替代。

[完毕!]

答案1

正如 @Manuel 在他的评论中指出的那样,代码而不是配置存在错误,但以防万一有人对原始问题感兴趣:

如何在 SublimeText2 中通过 LaTeXTools 插件使用latex代替pdflatex

以下是操作方法。

  1. 启动 Sublime Text 并转到偏好设置 > 浏览包
  2. 打开LaTeXTools文件夹
  3. 找到并打开LaTeX.sublime-build文件
  4. 此文件包含三个部分,分别对应三个受支持的平台osxwindows并在与您的操作系统相对应的部分中linux找到条目"cmd"
  5. 对于osxlinux(均使用)从列表中latexmk删除参数"-pdf"
  6. 从列表中windows删除该选项。"-p"

相关内容