
Estoy intentando crear un esquema lógico pero tengo un problema con el comando \path
del tikzpicture
entorno. No sé por qué, pero no puedo crear conexiones entre nodos. Probé todo tipo de comandos ( ,,,, \path
etc. ) pero cuando compilo LateX dice que es un archivo . Vea mi código a continuación.\path{draw}
\draw
\path[->]
Undefined control sequence
Si comento las líneas con \path...
el código funcionan bien, pero obviamente los cuadros no están vinculados por ninguna flecha.
¿Qué estoy haciendo mal?
PD: estoy usando Win7, MikTeX 2.9 de 64 bits con TeXnicCenter
\documentclass[a4paper,twoside,openright,11pt]{report}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{graphicx}
\usepackage{caption}
\usepackage{subfig}
\usepackage{booktabs}
\usepackage{float}
\usepackage{amsmath}
\usepackage{siunitx}
\usepackage{bbding}
\usepackage{geometry}
\usepackage{xcolor}
\usepackage{pgfplots}
\pgfplotsset{compat=1.11}
\usepackage{tikz}
\usetikzlibrary{arrows,snakes,backgrounds}
\usetikzlibrary{shapes.geometric}
\usetikzlibrary{intersections}
\usepackage{listings}
\lstset{basicstyle=\small\ttfamily}
\lstset{language=Matlab}
\addto\captionsenglish{\renewcommand{\bibname}{References}}
\begin{document}
[...]
\begin{tikzpicture}[auto]
\tikzstyle{block1} = [rectangle, draw=blue, thick, fill=blue!20,
text width=80mm, text centered, rounded corners, minimum width=80mm,
inner sep=2mm]
\tikzstyle{block2} = [rectangle, draw=red, thin, fill=red!20,
text width=80mm, text centered, sharp corners, minimum width=60mm, inner sep=2mm]
\tikzstyle{line} = [draw, thick, -latex’,shorten >=0pt];
\matrix [column sep=5mm,row sep=7mm]
{
% row 1
\node [block1] (init) {
\large{\lstinline$startup.m$}
\footnotesize{
\begin{itemize}
\item geometry file name
\item fluid and thermodynamic library settings
\item \textit{``Error\_report.txt''} initialization
\end{itemize}
}
}; \\
% row 2
\node [block1] (main) {
\large{\lstinline$turbine_calculation_singlepoint.m$}
\footnotesize{
\begin{itemize}
\item thermodynamic boundary conditions settings
\item load geometry
\end{itemize}
}
}; \\
% row 3
\node [block2] (turb_calc) {
\large{\lstinline$turbine_calculation.m$}
}; \\
% row 4
\node [block2] (1st_calc) {
First stage calculation with \lstinline$stage_calculation.m$
}; \\
% row 5
};
\tikzstyle{every path}=[line];
\path (init) -- (main);
\path (main) -- (turb_calc);
\path (turb_calc) -- (1st_calc);
\end{tikzpicture}
[...]
\end{document}
Respuesta1
El código original contenía ’
( RIGHT SINGLE QUOTATION MARK
en Unicode) en lugar de '
( APOSTROPHE
en Unicode) en
\tikzstyle{line} = [draw, thick, -latex’,shorten >=0pt];
Con el consejo correcto, el código se compila bien: