Theses, Books, Title pagesenvironment undefined error

Classicthesis, Bachelor and Master thesis, PhD, Doctoral degree
Post Reply
templateuser
Posts: 679
Joined: Tue Mar 03, 2015 4:01 pm

environment undefined error

Post by templateuser »

I have this code within Chapter2.tex:

Code: Select all

\begin{knitrout}
\definecolor{shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}\begin{kframe}

{\ttfamily\noindent\color{warningcolor}{\#\# Warning: Removed 3 rows containing missing values (geom\_path).}}\end{kframe}
\includegraphics[width=\maxwidth]{figure/my_plot} 

\end{knitrout}

This code is producing this latex error:

Code: Select all

Latex Error: ./Chapters/Chapter2.tex:121 LaTeX Error: Environment knitrout undefined.

Latex Error: ./Chapters/Chapter2.tex:122 LaTeX Error: Undefined color `fgcolor'.

Latex Error: ./Chapters/Chapter2.tex:122 LaTeX Error: Environment kframe undefined.

Latex Error: ./Chapters/Chapter2.tex:125 LaTeX Error: Undefined color `warningcolor'.

Latex Error: ./Chapters/Chapter2.tex:125 LaTeX Error: \begin{document} ended by \end{kframe}.

Latex Error: ./Chapters/Chapter2.tex:126 LaTeX Error: File `figure/my_plot' not found.

Latex Error: ./Chapters/Chapter2.tex:128 LaTeX Error: \begin{document} ended by \end{knitrout}.

Does anyone know why I am getting these errors?

Ross_Ahmed_909

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
Vel
Site Moderator
Posts: 463
Joined: Fri Jun 29, 2012 1:20 am

environment undefined error

Post by Vel »

Hi,

The errors are telling you that you haven't defined the knitrout environment. You need to do this with \newenvironment{knitrout} in your preamble. It also looks like you haven't defined the colors you're using there: fgcolor and warningcolor.

Cheers,
Vel
Founder and administrator of LaTeXTemplates.com and LaTeXTypesetting.com
Post Reply