I am not sure whether there are many people having the same problem with me or not. The thesis includes several of the .tex files as chapters, sections, parts, etc. Now I would like to refine or add some features, I need to load correct packages. But I do not know exactly which the packages loaded already some similar features. I have read a tip that it should add \usepackage{etex}\reserveinserts{28} in the preamble. So my question is How to check and verify which packages are needed to load first others?
For example, below is the collection of packages I am using for my thesis.
%% Language %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{etex}
\reserveinserts{28}
\usepackage[english]{babel} %francais, polish, spanish, ...
\usepackage[T1]{fontenc}
\usepackage[utf8x]{inputenc}
\usepackage{multido}
\usepackage{lmodern} %Type1-font for non-English texts and characters
\usepackage[a4paper]{geometry}
\usepackage{helvet}
%% Packages for Graphics & Figures %%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage[pdftex]{graphicx} %%For loading graphic files
\usepackage{subfig} %%Sub-figures inside a figure
\usepackage{pdflscape}
\usepackage{wrapfig}
\usepackage{tikz} %%Generate vector graphics from within LaTeX
\graphicspath{{images/}} %%Define a source folder of images
%% Math Packages %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{bpchem}
\usepackage{nth}
\usepackage{amsmath}
\numberwithin{equation}{section}
\usepackage{amsthm}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{caption}
\usepackage{sansmath} %% For inserting math formulas into captions //// Notes
\usepackage[algo2e,slide,boxruled,vlined,linesnumbered,algosection]{algorithm2e}
%% Using the option algochapter: algorithms are numbered within chapter numbers.
%% Dung goi nay thi khong can add bang tay cac muc
% \newcommand{\listofalgorithms}{\tocfile{\listalgorithmcfname}{loa}}
% \newlistof{listofalgorithms}{loa}{\listalgorithmcfname}
% \newcommand{\listofalgorithmes}{\tocfile{\listalgorithmcfname}{loa}}
\usepackage{algpseudocode}
%% Other Packages %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{a4wide} % Smaller margins = more text per page.
\usepackage{fancyhdr} % Fancy headings
\usepackage[sectionbib]{chapterbib}
\usepackage{paralist}
\usepackage{url}
\usepackage{array}
\usepackage{rotating}
\usepackage{ucs}
\usepackage[numbers,square,comma,sort&compress]{natbib}
\usepackage{multirow}
\usepackage{booktabs}
\usepackage{pdflscape} %better
\usepackage{colortbl}
\newcommand{\mc}[2]{\multicolumn{#1}{c}{#2}}
\usepackage[dvipsnames]{xcolor}
\usepackage{color}
\usepackage{eqparbox}
\usepackage[breakable]{tcolorbox}
\usepackage{blindtext}
\tcbuselibrary{skins,breakable}
\usepackage{enumerate}
\renewcommand*{\bibnumfmt}[1]{\eqparbox[t]{bblnm}{[#1]}}
\usepackage{pdfpages} %% Pour Include pdf files
\usepackage{makeidx}
\usepackage[explicit]{titlesec}
\usepackage[Lenny]{fncychap}
\usepackage[tight]{minitoc}
\usepackage{titletoc}
\usepackage[subfigure]{tocloft}
\renewcommand{\cftsecfont}{\normalfont}
\usepackage[backref=page]{hyperref} %% [pagebackref] or [backref=page]
\def\backref#1{{\scriptsize [#1]}}
\def\theaipage{\string\hyperpage{\thepage}}
\usepackage{cleveref} % using smart citations
\usepackage{listings} % for formatting source codes
\usepackage{pifont}
\newcommand{\cmark}{\ding{51}}%
\newcommand{\xmark}{\ding{55}}%
%% Line Spacing %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{setspace}
%\setstretch{1.3}
%\singlespacing %% 1-spacing (default)
%\onehalfspacing %% 1,5-spacing
%\doublespacing %% 2-spacing
\usepackage{alltt}
% Using quotations
\usepackage{dirtytalk}
\expandafter\def\expandafter\quote\expandafter{\quote\small\singlespacing}
\usepackage{quoting}
\quotingsetup{vskip=0pt}
%%% Using shading in verbatim
\usepackage{fancyvrb, pstcol,framed}
\definecolor{shadecolor}{rgb}{.9, .9, .9}
\definecolor{timberwolf}{rgb}{0.86, 0.84, 0.82}
\usepackage{changepage} % to use adjustwidth for dedication
\usepackage{floatrow} %no need because of using \captionsetup[table]
\usepackage{textpos}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Options / Modifications
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newtheorem{theorem}{Theorem}[chapter]
\newtheorem{thm}{Theorem}[chapter]
\newtheorem{definition}[theorem]{Definition}
\newtheorem{example}[thm]{Example}
\newtheorem{mydef}{Definition}
\newtheorem{proposition}{Proposition}[chapter]
\makeatother
\makeindex
\usepackage[acronym,toc]{glossaries}
\makeglossaries
\definecolor{SpringGreen}{rgb}{0.0, 1.0, 0.5}
\definecolor{TeaGreen}{rgb}{0.82, 0.94, 0.75}
\definecolor{Gray}{gray}{0.85}
\definecolor{LightCyan}{rgb}{0.88,1,1}
\definecolor{darkblue}{RGB}{25,75,112}
\definecolor{brown}{RGB}{102,0,51}
\definecolor{lightblue}{rgb}{.90,.95,.30}
\DeclareCaptionFont{blue}{\color{blue}}
\DeclareCaptionFormat{listing}{\colorbox{gray}{\parbox{\textwidth}{#1#2#3}}}
\DeclareCaptionFormat{table}{\colorbox{red}{\parbox{\textwidth}{#1#2#3}}}
\definecolor{coolblack}{rgb}{0.0, 0.18, 0.39}
\floatsetup[table]{capposition=top} % ISO7144-1986
\captionsetup{
margin=1cm,
format=hang,
font=footnotesize,
format=plain,
labelfont={bf,up},
labelsep=colon,
width=13cm,
% indention=10pt
}
\usepackage{soul} % using text highlight
\sethlcolor{lightblue}
\usepackage{tabu}
\captionsetup[lstlisting]{
format=listing,
labelfont=white,
textfont=white
}
\lstset{
basicstyle=\footnotesize\ttfamily,
numbers=left,
numberstyle=\tiny,
%stepnumber=2,
numbersep=10pt,
tabsize=1,
extendedchars=true,
breaklines=true,
keywordstyle=\color{red},
frame=b,
stringstyle=\color{blue}\ttfamily,
showspaces=false,
showtabs=false,
xleftmargin=12pt,
framexleftmargin=17pt,
framexrightmargin=5pt,
framexbottommargin=4pt,
backgroundcolor=\color{white},
showstringspaces=false
}
\hypersetup{
pdfauthor={NGUYEN Vu Ngoc Tung},
pdftitle={PhDThesis: Analysis of biochemical reaction graph},
pdfcreator={NGUYEN Vu Ngoc Tung},
colorlinks=true,
citecolor=blue,
linkcolor=blue,
linktoc=all,
urlcolor=blue
}
The reason I have this question is that if I have asked a question of A lot of unexpected spaces between paragraph after inserting colorbox. I appreciate the answer because the result is really efficient. If I add the packages as suggested in the answer, tex gives the error as below.
! No room for a new \write .
\alloc@ ...else \errmessage {No room for a new #2}
\fi \fi
l.161 \listoftables
But I remove those packages, of course tex compile does not understand tcolorbox.
I let here the tex files included in my thesis.
Finally, could you have look my project? The files are organized as follows:
thesis.tex
--- packages.tex
--- chapter1.tex
--- chapter2.tex
The following are contents of the files respectively.
thesis.tex
\documentclass[a4paper,twoside,openright,12pt]{report}
\input{packages}
\begin{document}
\input{chapter1}
\input{chapter2}
\end{document}
packages.tex
It has just mentioned above.chapter1.tex (for example, not real contents)
\subsection{Determining MCSs}
The MCS algorithm devised by Klamt and Gilles relies on the
fact that:
\begin{itemize}
\item any feasible steady state flux distribution in a given network,
expressed by a vector of the net reaction rates, $r$, can be represented by a
non-negative linear combination of EFMs as illustrated in
\Cref{eq:steady-state2} (reused from Klamt2006):
\begin{equation}\label{eq:steady-state2}
r = \sum_{i=1}^{N}\alpha_{i}E_{i}, (\alpha_{i} \geq 0)
\end{equation}
\item where $N$ is the number of EFMs.
\item the removal of reactions from the network results in a new set of EFMs
constituted by those EFMs that do not involve the deleted reactions.
\end{itemize}
\paragraph{}Before MCSs are computed, the set of $EFMs$ is split into
two disjoint sets:
\begin{itemize}
\item the set of target modes ($EFM^t$), i.e., all EFMs ($e^{t,j}$) involving
the objective reactions $t$.
\item the set of non-target modes ($EFM^{nt}$), i.e., EFMs not involving the
objective reaction $nt$.
\end{itemize}
\paragraph{}
\paragraph{}This MCS algorithm can be divided into two phases as follows:
\paragraph{}
\noindent\colorbox{TeaGreen}{%
\begin{minipage}{\dimexpr\textwidth-1\fboxsep}
\paragraph{Preparatory phase}
\small{
\begin{enumerate}[(1)]
\item Calculate the EFMs in the given networks.
\item Define the objective reaction \texttt{obR}.
\item Choose all EFMs where the reaction \texttt{obR} is non-zero and store it
in the binary array \texttt{efms\_obR}.
\item Initialise the arrays \texttt{mcss} and \texttt{precutsets} as follows:\;
Append $\{j\}$ to \texttt{mcss} if the reaction $j$ is essential, otherwise to
\texttt{precutsets}.
\end{enumerate}
}
\paragraph{Main phase}
\small{
\begin{enumerate}[(5)]
\item FOR i = 2 TO MAX\_CUTSETSIZE
\begin{enumerate}[(5.1)]
\item $new\_precutsets = \varnothing $;
\item FOR j = 1 TO q
\begin{enumerate}[(5.2.1)]
\item Remove all sets from \texttt{precutsets} where the reaction
$j$ participates;
\item Find all sets of reactions in \texttt{precutsets} that do not
cover any EFM in \texttt{efms\_obR} where reaction $j$ participates. Combine
each
of these sets with reaction $j$ and store the new preliminary cut sets in
\texttt{temp\_precutsets};
\item Drop all \texttt{temp\_precutsets} which are a superset of any of
the already determined minimal cut sets stored in \texttt{mcss};
\item Find all retained \texttt{temp\_precutsets} which do now cover all
EFMs and append them to \texttt{mcss}. Append all others to
\texttt{new\_precutsets};
\end{enumerate}
\item IF \texttt{isEmpty(new\_precutsets)} BREAK; ELSE \texttt{precutsets} =
\texttt{new\_precutsets};
\end{enumerate}
\begin{enumerate}[(6)]
\item return \texttt{mcss};
\end{enumerate}
\end{enumerate}
}
\end{minipage}
}
chapter2.tex
\begin{table}[htbp]
\caption[EFMs and MCSs of \textit{NetEx}, for the objective reaction
\textit{PSynth}]{\textbf{EFMs and MCSs for the objective reaction
\textit{PSynth}}.
The table shows the EFMs and MCSs of \textit{NetEx}, for the objective reaction
\textit{PSynth}}
\begin{tabular}{lllllllll}
\toprule
& \textbf{R1} & \textbf{R2} & \textbf{R3} & \textbf{R4} & \textbf{R5} &
\textbf{R6} & \textbf{R7} & \textbf{\textit{Psynth}} \\
\midrule
\multicolumn{ 9}{l}{\textbf{Elementary Flux Modes}} \\
\midrule
EFM1 & \multicolumn{1}{r}{0} & \multicolumn{1}{r}{1} & \multicolumn{1}{r}{0}
& \multicolumn{1}{r}{1} & \multicolumn{1}{r}{1} & \multicolumn{1}{r}{0} &
\multicolumn{1}{r}{0} & \multicolumn{1}{r}{0} \\
EFM2 & \multicolumn{1}{r}{1} & \multicolumn{1}{r}{1} & \multicolumn{1}{r}{1}
& \multicolumn{1}{r}{0} & \multicolumn{1}{r}{0} & \multicolumn{1}{r}{1} &
\multicolumn{1}{r}{0} & \multicolumn{1}{r}{1} \\
EFM3 & \multicolumn{1}{r}{1} & \multicolumn{1}{r}{0} & \multicolumn{1}{r}{1}
& \multicolumn{1}{r}{−1} & \multicolumn{1}{r}{−1} & \multicolumn{1}{r}{1} &
\multicolumn{1}{r}{0} & \multicolumn{1}{r}{1} \\
EFM4 & \multicolumn{1}{r}{0} & \multicolumn{1}{r}{1} & \multicolumn{1}{r}{1}
& \multicolumn{1}{r}{0} & \multicolumn{1}{r}{−1} & \multicolumn{1}{r}{0} &
\multicolumn{1}{r}{1} & \multicolumn{1}{r}{1} \\
EFM5 & \multicolumn{1}{r}{0} & \multicolumn{1}{r}{0} & \multicolumn{1}{r}{1}
& \multicolumn{1}{r}{−1} & \multicolumn{1}{r}{−2} & \multicolumn{1}{r}{0} &
\multicolumn{1}{r}{1} & \multicolumn{1}{r}{1} \\
EFM6 & \multicolumn{1}{r}{0} & \multicolumn{1}{r}{2} & \multicolumn{1}{r}{1}
& \multicolumn{1}{r}{1} & \multicolumn{1}{r}{0} & \multicolumn{1}{r}{0} &
\multicolumn{1}{r}{1} & \multicolumn{1}{r}{1} \\
\midrule
\multicolumn{ 9}{l}{\textbf{Minimal Cut Sets}} \\
\midrule
MCS0 & & & & & & & & x \\
MCS1 & & & x & & & & & \\
MCS2 & x & & & & & x & & \\
MCS3 & & & & & & x & x & \\
MCS4 & & x & & x & & & & \\
MCS5 & & x & & & x & & & \\
MCS6 & x & & & x & x & & & \\
MCS7 & & & & x & x & x & & \\
\bottomrule
\end{tabular}
\label{tab:klamt-netex-res-efms-mcss}
\end{table}
It often shows out the error:
! LaTeX Error: Option clash for package xcolor.
See the LaTeX manual or LaTeX Companion for explanation.
Type H for immediate help.
...
l.54 \usepackage
{color}
\paragraph{}to start a new paragraph. (I think that's what you are trying to use it for though I'm not entirely sure.) In fact, you should not use\paragraph{something}for paragraphs at all. To start a new paragraph, leave a blank line. – cfr Dec 26 '14 at 21:31packageAwill loadpackageBifpackageAneedspackageB. In general, then, you do not need to loadpackageBifpackageAneeds it and if you are loadingpackageA. The main thing to say about your preamble is that it looks as if you have little idea what most of it does. There is too much of it and some of it is verging on the contradictory. Do you really want to use Helvetica for your sans-serif font and Latin Modern Roman for serif? That is... an unusual choice. – cfr Dec 26 '14 at 21:34colorif you loadxcolor. As there seems to be a conflict for the xcolor options, this means it's loaded by another package , with another (or no) options In such a case, load the option as a document class option. Also,a4wideshouldn't be used any more (you can see why inl2tabu. You should usesoulutf8instead ofsoulandenumitemrather thanenumerate. – Bernard Dec 27 '14 at 00:26\smallis a *switch*. It does not take an argument. If you want to limit its scope, put it in a group e.g.{\small some small text\par} some normally sized text\par. – cfr Dec 28 '14 at 01:02\makeatotherseems unnecessary; useutf8rather thanutf8x... – cfr Jan 22 '15 at 03:16