2

I am using a Master/Doctoral Thesis from https://www.latextemplates.com. I have got a very simpel problem which is undefined control sequence \tabhead! Can anybody help me to overcome that?

I will be very pleased.

Best, Pouya

\documentclass[11pt, oneside, english, singlespacing,liststotoc, toctotoc,headsepline,]{MastersDoctoralThesis}

\usepackage[utf8]{inputenc} 
\usepackage[T1]{fontenc} 

\usepackage{mathpazo} 

\usepackage[backend=biber,style=authoryear,natbib=true]{biblatex}

\addbibresource{example.bib}

\usepackage[autostyle=true]{csquotes}
\geometry{
    paper=a4paper,
    inner=2.5cm,
    outer=3.8cm,
    bindingoffset=.5cm, 
    top=1.5cm,
    bottom=1.5cm, 
    %showframe,}

\begin{table}
\caption[Environmental sustainability constraints]{Four set of constraints as environmental sustainability which scale the human economic.}
\label{tab:activities}
\centering
\begin{tabular}{p{0.2\linewidth}p{0.7\linewidth}}
\toprule
\tabhead{Number} & \tabhead{Activity}\\
\midrule
1 \& 2 & The use of renewable and non-renewable resources on the source side\\
3 \& 4 & Pollution and Waste assimilation on the sink side\\
\bottomrule\\
\end{tabular}
\end{table}
\printbibliography[heading=bibintoc]


\end{document}  
1
  • 1
    Neither the documentclass you use nor any of the packages you load defines the command \tabhead which is why you end up with the error message. What do you expect \tabhead to do/result in? Did you read about this command somewhere? If so, where?
    – leandriis
    Jan 6, 2021 at 20:30

1 Answer 1

2

From the website that you mention, download and unpack thesis_1.zip. In the file Chapters/Chapter1.tex, near the top, you will find the following lines:

% Define some commands to keep the formatting separated from the content 
\newcommand{\keyword}[1]{\textbf{#1}}
\newcommand{\tabhead}[1]{\textbf{#1}}
\newcommand{\code}[1]{\texttt{#1}}
\newcommand{\file}[1]{\texttt{\bfseries#1}}
\newcommand{\option}[1]{\texttt{\itshape#1}}

This means: if you want to use the command \tabhead in your document, add a line like the one above to your preamble:

\documentclass[...]{...}
...
\newcommand{\tabhead}[1]{\textbf{#1}}
...
\begin{document}
1
  • thank you very much. You don't know how grateful I am! Jan 7, 2021 at 9:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.