It does not compile because of the line 11, uncomment %\usepackage{unicode-math}
and uncomment
%%%%%%%%%%%%%%% BRACES %%%%%%%%%%%%%%%%
%\setmathfont[BoldFont={latinmodern-math.otf}]{latinmodern-math.otf}
%\setmathfont[range=\mathscr,Scale=MatchUppercase]{Asana-Math.otf}
where I don't know anything about the package. Perhaps someone here able to help with it you?
Code Compiling with OSX Texpad 1.4.7 -- this should be the newest so the same as yours
\documentclass{article}
\usepackage{rotating}
\usepackage{pdfpages}
% \usepackage{background}
\usepackage[log-declarations=false]{xparse}
\usepackage{verbatim}
\usepackage{amsmath, amsfonts, amssymb, textcomp, mathtools, xparse}
\usepackage[T4, OT1]{fontenc}
\graphicspath{ {/Users/masi/Dropbox/Patology_and_Biopsy/images/} }
\usepackage{newunicodechar}
%\usepackage{unicode-math}
\usepackage{multirow}
\newcommand{\Int}{\int\limits}
\newunicodechar{ƒ}{{\fontencoding{T4}\fontfamily{cmr}\selectfont\m f}}
\newunicodechar{Ƒ}{{\fontencoding{T4}\fontfamily{cmr}\selectfont\m F}}
\DeclarePairedDelimiter{\abs}{\lvert}{\rvert}
\DeclarePairedDelimiter{\norm}{\lVert}{\rVert}
\newcommand{\eqbreak}[1][2]{\\&\hskip#1em}
\usepackage{color}
\usepackage{hyperref}
\usepackage{Tabbing}
\usepackage{doi, natbib}
\hypersetup{
colorlinks=true,
linkcolor=blue,
citecolor=blue,
allcolors=blue
}
\usepackage{enumerate} % alpha numerical ordering
\usepackage{titling} % Two titles in one document
\usepackage[normalem]{ulem} % underline by \uline{lorem}
\usepackage[affil-it]{authblk}
\usepackage{import}
\usepackage[version=3]{mhchem} % To have chemical symbols like \ce{O2^{.-}}
\usepackage{xcolor,colortbl} % rowcolor for tables
\definecolor{Gray}{gray}{0.85}
\definecolor{LightCyan}{rgb}{0.88,1,1}
\definecolor{colori}{RGB}{0,0,0}
\definecolor{colorii}{RGB}{0,0,0}
\NewDocumentCommand\MyArrow{O{0pt}mmmO{out=150,in=210}}
{%
\begin{tikzpicture}[overlay, remember picture]
\draw [->,thick,line width=4pt,#4]
( $ ({pic cs:#3}|-{pic cs:#2}) + (-#1,1.3ex) $ ) to[#5]
( $ (pic cs:#3) + (-#1,0) $ );
\end{tikzpicture}%
}
%%%%%%%%%%%%%%%%%%%%%%%%%%% Question and Answer %%%%%%%%%%%%%%%%%
\usepackage[framemethod=tikz]{mdframed}
\newtheorem{question}{Question}
\mdfdefinestyle{que}{
% font = \normalfont,
linecolor=cyan,
backgroundcolor=cyan!20,
}
\surroundwithmdframed[style=que]{question}
% Unicode-math bug fix
% http://tex.stackexchange.com/questions/161809/why-is-unicode-math-not-working-with-tikz
\newtheorem{question}{Question}
\let\masiquestion\question
\AtBeginDocument{%
\let\umquestion\question
\let\question\masiquestion
}
\newtheorem{answer_original}{Answer}
\mdfdefinestyle{ans}{
font = \normalfont,
linecolor=cyan,
backgroundcolor=yellow!20
}
\surroundwithmdframed[style=ans]{answer_original}
\makeatletter
\newsavebox{\@my@box}
\newenvironment{answer}%
{%
\noindent
\begin{lrbox}{\@my@box}%
\begin{minipage}[t]{\linewidth}
\begin{answer_original}
}%
{%
\end{answer_original}%
\end{minipage}%
\end{lrbox}%
\rotatebox{0}{\usebox{\@my@box}}
}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%% Smaller things
\newtheorem{sidenote}{Sidenote}
\mdfdefinestyle{que}{
linecolor=cyan,
backgroundcolor=cyan!20,
}
\surroundwithmdframed[style=que]{sidenote}
\newtheorem{case}{Case logic}
\mdfdefinestyle{que}{
linecolor=cyan,
backgroundcolor=cyan!20,
}
\surroundwithmdframed[style=que]{case}
\newtheorem{citation}{Citation}
\mdfdefinestyle{que}{
linecolor=cyan,
backgroundcolor=yellow!20,
}
\surroundwithmdframed[style=que]{citation}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%% BRACES %%%%%%%%%%%%%%%%
%\setmathfont[BoldFont={latinmodern-math.otf}]{latinmodern-math.otf}
%\setmathfont[range=\mathscr,Scale=MatchUppercase]{Asana-Math.otf}
\usepackage{tikz}
\usetikzlibrary{tikzmark,decorations.pathreplacing,calc}
\newcommand\MyText[4][0pt]{%
\begin{tikzpicture}[overlay, remember picture]
\draw [decoration={brace},decorate,thick]
( $ ({pic cs:#3}|-{pic cs:#2}) + (#1,1.3ex) $ ) --
node[anchor=west,xshift=5pt,text width=5cm] {#4}
( $ (pic cs:#3) + (#1,0) $ );
\end{tikzpicture}%
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%% Counter Section %%%%%%%%%%%%%%%%%%%%%%
\makeatletter
\def\@part[#1]#2{%
\ifnum \c@secnumdepth >\m@ne
\refstepcounter{part}%
\fi
\addcontentsline{toc}{part}{#1}%
{\parindent \z@ \raggedright
\interlinepenalty \@M
\normalfont
\LARGE \bfseries #2%
\markboth{}{}\par}%
\nobreak
\vskip 3ex
\@afterheading}
\@addtoreset{section}{part}
\makeatother
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%
\newtheorem{theorem}{Theorem}
\newtheorem{proposition}[theorem]{Proposition}
\newenvironment{definition}[1][Definition]{\begin{trivlist}
\item[\hskip \labelsep {\bfseries #1}] \emph}{\end{trivlist}}
\providecommand{\keywords}[1]{\textbf{Keywords:} #1}
\begin{document} % The error refers here!
\title{Introduction to General Pathology Notes}
Lorem
\end{document}
Most likely you tried \input{texstudio_hy2940}
and that file does not exist and you are running in \batchmode
so TeX can not stop and ask for a different file name.
Look in the log file for the full error message.
The TeXBook says:
Sometimes an error is so bad that TeX is forced to quit prematurely.
For example, if you are running in \batchmode
or \nonstopmode
, TeX
makes an "emergency stop" if it needs input from the terminal; this
happens when a necessary file cannot be opened, or when no \end
command was found in the input document.
Best Answer
I think yo' is right with the comment, that the
.aux
file is truncated:After
pdflatex test.tex
the.aux
file is:Then the
.aux
file is edited in an editor to truncate it to:Running again:
gives the error in the same format as in the question:
The
\@writefile
command starts on line 2 in filetest.aux
, but the error is detected after the file end, thus the file name is shown astest.tex
.Back to the question, the error occurs during the first read of the
.aux
file. The.aux
file is truncated at line 16.Suspicion: The file size of the
.aux
file is just a sector with 512 bytes. Thus the write cache did not get flushed at the probably abnormal end of the previous LaTeX run.Deleting the
.aux
file and running LaTeX again should fix the issue, when the run is not aborted due to a fatal error.