Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I receive errors in log file while trying to compile the following code:

\documentclass{article}

\usepackage{tikz}
\usetikzlibrary{shapes,arrows}
\usepackage{dot2texi}

\begin{document}
  \begin{dot2tex}[neato,options=-tmath]
    digraph G {
      node [shape="circle"];
      a_1 -> a_2 -> a_3 -> a_4 -> a_1;
 }
\end{dot2tex}
\end{document}

It is an example from dot2tex website. An example of the error is:

Undefined control sequence \begin{dot2tex}[neato,options=-tmath]

The author of the package suggests on this link, that you should define

\@ifundefined{verbatim@out}{\newwrite\verbatim@out}{}%

inside your package, but I still cannot understand where should I put this command, because I am TeX-newbee.

FIX: I have put \@ifundefined{verbatim@out}{\newwrite\verbatim@out}{}% into dot2texi.sty right in the beginning:

\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesPackage{dot2texi}[2008/05/07 v3.0 Run dot2tex from LaTeX]
\RequirePackage{moreverb}
\RequirePackage{xkeyval}[2005/02/22]

\@ifundefined{verbatim@out}{\newwrite\verbatim@out}{}% 

\newif\ifdtt@ShellEscape
%\newif\ifmiktex \miktexfalse
share|improve this question
    
Modifying style files is usually not a good idea. I suppose that writing the line between \makeatletter and \makeatother just after \usepackage{dot2texi} would be good as well. –  egreg Apr 15 '12 at 22:28
    
@egreg, I have done that because it was recommended by the author of dot2tex(i). Thank you, your fix also works. –  GKalnytskyi Apr 16 '12 at 7:56

1 Answer 1

up vote 3 down vote accepted

Modifying style files is usually not a good idea. Writing the line between \makeatletter and \makeatother just after \usepackage{dot2texi} would be good as well:

\usepackage{tikz}
\usetikzlibrary{shapes,arrows}
\usepackage{dot2texi}
\makeatletter
\@ifundefined{verbatim@out}{\newwrite\verbatim@out}{}
\makeatother
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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