0

enter image description hereI'm trying to generate this file but I'm getting an error that pdflatex-halt-on-error-inter... I added the package \usepackage{graphicx}, but its not working, any idea?

\documentclass[12pt]{article}
\usepackage{amsmath,amsthm, amssymb, latexsym}
\usepackage{tikz}
\makeatletter
\renewcommand*\env@matrix[1][c]{\hskip -\arraycolsep
\let\@ifnextchar\new@ifnextchar
\array{*\c@MaxMatrixCols #1}}
\makeatother 
\usepackage{moodle}
\usetikzlibrary{external} % set this 
\tikzexternalize          % explicitly
\usepackage{graphicx}

\begin{document} \begin{quiz}{Revisiting Linear Algebra} \begin{multi}[points=2]{Matrix Form of a Linear System} Consider the following system

\begin{tikzpicture} % matrix inside of tikzpicture node \node{ $\begin{matrix}[r] 3.0 x_1 &+2.0 x_2 &+2.0 x_3 & -5.0 x_4 & =8 .0 \ 0.6 x_1 &+ 1.5 x_2 &+1.5 x_3 & -5.4 x_4 & =2.7 \
1.2 x_1 & -0.3 x_2 & -0.3 x_3 & 2.4 x_4 & =2.1 , \
\end{matrix} $}; \end{tikzpicture}

which may be written as a single vector equation; i.e, $\mathbf{AB}=\mathbf{B}$.\ The $\mathbf{A}$ matrix associated with the system is: \item* \begin{tikzpicture} \node{ $ \begin{bmatrix}[r] 3.0 &+2.0 &+2.0 & -5.0 \ 0.6 &+ 1.5 &+1.5 & -5.4 \
1.2 & -0.3 & -0.3 & 2.4 , \
\end{bmatrix} $};\end{tikzpicture} \item\begin{tikzpicture} \node{ $ \begin{bmatrix}[r] 8 .0 \ 2.7 \
2.1 \
\end{bmatrix} $};\end{tikzpicture}
\item \begin{tikzpicture} \node{$ \begin{bmatrix}[r] x_1 &\ x_2& \
x_3 &\
x_4 &\ \end{bmatrix} $};\end{tikzpicture}
\item
\begin{tikzpicture} \node{$ \begin{bmatrix}[r] 3.0 &+2.0 &+2.0 & -5.0 & 8.0 \ 0.6 &+ 1.5 &+1.5 & -5.4 & 2.7 \
1.2 & -0.3 & -0.3 & 2.4 , & 2.1\
\end{bmatrix} $}; \end{tikzpicture}
\end{multi} \end{quiz} \end{document}

Diana
  • 1,285
  • 7
  • 12
  • 1
    tikz loads graphicx already, so \usepackage{graphicx} is actually redundant. – Torbjørn T. Sep 21 '20 at 15:38
  • he needs shell to be enabled, so what dose that mean ? – Diana Sep 21 '20 at 15:39
  • This is "pdflatex-shel-escape", this is part of the error – Diana Sep 21 '20 at 15:41
  • -shell-escape is an option to the pdflatex program allowing it to call other programs. How you enable that depends on which editor you're using. That said, why do you have the matrices in nodes in tikzpictures in the first place? – Torbjørn T. Sep 21 '20 at 15:50
  • I'm using TexMaker, this is a program that I received via this StackExchange, and I'm trying to run it. – Diana Sep 21 '20 at 15:51
  • Right, after reading marjin's answer I understand that. For shell-escape, see if https://tex.stackexchange.com/questions/236641/ helps. If you don't have MikTeX you might need -shell-escape instead of --enable-write18, but otherwise the method should be the same. – Torbjørn T. Sep 21 '20 at 16:17
  • I got an error that its not a known command when I added -shell-escape instead of --enable-write18as the post said – Diana Sep 21 '20 at 16:23
  • I don't really know what's wrong. Can you show a screenshot of the Texmaker settings? Are you using MikTeX? (Texmaker is just the editor, you must have installed a TeX system in addition, which is either MikTeX, MacTeX or TeX Live.) – Torbjørn T. Sep 21 '20 at 16:30

0 Answers0