I'm using the dot2texi package to draw some graphs on my beamer presentation, but I can't figure out how to make it work with the outputdir option.
Here is my directory structure:
├── biblio.bib
├── build
├── img
│ └── logo.eps
└── main.tex
I'm using latexmk and here is my configuration file:
$pdf_mode = 1;
$recorder = 1;
$pdf_previewer = 'evince';
$pdf_update_method = 0;
$pdflatex = 'xelatex -interaction=nonstopmode -shell-escape -output-directory=build';
@default_files = ("main");
$out_dir = './build';
$biber = 'biber --output-safechars';
$bibtex_use = 1;
$cleanup_mode = 2;
$clean_ext = ('%R.tdo %R.bbl');
$latex_silent_switch = "-interaction=batchmode -c-style-errors";
$silent = 1;
And here is my document main.tex:
% warns when you accidentally use deprecated LaTeX constructs from l2tabu
\RequirePackage[l2tabu,orthodox]{nag}
\documentclass[final, 11pt, aspectratio=1610, xcolor=table, hyperref={bookmarks,hidelinks}]{beamer}
\usetheme[block=fill,progressbar=foot]{metropolis}
%\usetheme{sthlm}
%\usecolortheme{sthlmv42}
\usepackage{ifxetex}
\ifxetex
% XeLaTeX
\usepackage{polyglossia}
\setmainlanguage{brazil}
\usepackage{fontspec}
% \setmainfont{⟨font name⟩}[⟨font features⟩] % This is the normal font used in most of the document
% \setsansfont{⟨font name⟩}[⟨font features⟩] % The elements that require a sans font
% \setmonofont{⟨font name⟩}[⟨font features⟩] % Everithing that must be formatted with a Typewritter font in your document
% \setmathrm{⟨font name⟩}[⟨font features⟩]
% \setmathsf{⟨font name⟩}[⟨font features⟩]
% \setmathtt{⟨font name⟩}[⟨font features⟩]
% \setboldmathrm{⟨font name⟩}[⟨font features⟩]
% \setmainfont{Cardo}
% \setsansfont{Linux Libertine}
% \setmonofont{Fira Code}
% \setmathrm{XITS Math}
%\usepackage{unicode-math}
\else
% default: pdfLaTeX
\usepackage[brazilian]{babel} % language of the document, activate the appropriate hyphenation rules
\usepackage[utf8]{inputenc} % input character encoding
\usepackage[T1]{fontenc} % output character encoding: accented characters, hypernations
\usepackage{lmodern} % latin modern font
%\usepackage[sfdefault,semibold]{FiraSans}
%\usepackage{FiraMono}
\fi
% Conctrols shrinking and stretching of the fonts and with the extent to which text protrudes into the margins in a way that yields results that look better, that have fewer instances of hyphenation, and fewer overfull hboxes.
\usepackage[stretch=10]{microtype}
\usepackage{relsize} % Set the font size relative to the current font size
% references
\usepackage[
backend=biber,
style=numeric,
citestyle=numeric-comp
]{biblatex}
% layout
\usepackage{parskip} % helo find best places for page breaks and skip between lists
\usepackage{lscape} % long tables and landscape pictures
\usepackage{setspace} % space between lines
\usepackage{float} % Graphics, tables placement
\usepackage{adjustbox} % adjust boxed content (tables)
\usepackage{geometry}
% graphics
\usepackage{graphicx} % manage pictures
\usepackage{tikz}
\usetikzlibrary {positioning,arrows,shapes,shadows}
\usepackage{moreverb}
\usepackage{xkeyval}
\usepackage[autosize,outputdir={build/},debug]{dot2texi}
% math
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{calrsfs} % Copperplate calligraphic letters
\usepackage{amsfonts} % extended set of fonts for use in mathematics
\usepackage{bbm} % double-striked left side and normal right side fonts
% pseudocode
\usepackage{algorithm}
\usepackage[noend]{algpseudocode}
% code
\usepackage[outputdir=\detokenize{./build}]{minted}
% tables
\usepackage{booktabs}
\usepackage{array}
% misc
\usepackage[small]{caption} % customize caption in float environments
\usepackage[subrefformat=parens,labelformat=parens]{subcaption} % caption for subfigures
\usepackage{color}
% \usepackage{xkeyval}
\usepackage[portuguese,colorinlistoftodos]{todonotes}
\usepackage[inline, shortlabels]{enumitem} % inline enumerate
\usepackage{csquotes} % quotations
\usepackage{appendixnumberbeamer} % appendix on beamer
\usepackage{url}
\usepackage{multicol}
% cross-refs
\usepackage{hypcap} % anchors links to the beginning of floats
%\usepackage{cleveref}
% macros
\floatplacement{figure}{H}
\hypersetup{colorlinks=false}
% Resetting mathcal font to default
% https://tex.stackexchange.com/questions/67881/resetting-mathcal-font-to-default
\DeclareMathAlphabet{\mathcal}{OMS}{cmsy}{m}{n}
\setbeamertemplate{note page}[plain]
% http://tex.stackexchange.com/questions/124256/how-do-i-get-numbered-entries-in-a-beamer-bibliography
\setbeamertemplate{bibliography item}{\insertbiblabel}
% show notes
%\setbeameroption{show notes}
%\setbeameroption{show notes on second screen=right}
\presetkeys{todonotes}{fancyline,inline}{}
\newcommand{\fittable}[1]{\begin{adjustbox}{max width=\textwidth}#1\end{adjustbox}}
\setminted{linenos=true,autogobble=true,breakautoindent=true,breaklines=true}
% personalize line numbers
\renewcommand{\theFancyVerbLine}{\sffamily\textcolor[rgb]{0.5,0.5,1.0}{\scriptsize\oldstylenums{\arabic{FancyVerbLine}}}}
\addbibresource{biblio.bib}
\graphicspath{{./img/}}
\title{\textbf{Tile}}
\author{Authot}
\institute{Institute}
\titlegraphic{
\tikz[overlay,remember picture]
\node[at=(current page.south), anchor=south] {
\includegraphics[scale=0.15]{logo}
};
}
\date{\today}
\begin{document}
\maketitle
\begin{frame}
\begin{dot2tex}[neato,mathmode]
digraph G {
node [shape="circle"];
a_1 -> a_2 -> a_3 -> a_4 -> a_1;
}
\end{dot2tex}
\end{frame}
\end{document}
This is the error that latexmk shows:
Latexmk: ====== There were problems writing to----- 'main-dot2tex-fig1.dot' in './build/build'.
----- But this is not the standard situation of
----- aux file to subdir of output directory, with
----- non-existent subdir
main.log section:
! I can't write on file `build/main-dot2tex-fig1.dot'.
\dottotexverbatimwrite ...penout \verbatim@out #1
\BeforeStream \let \do \@m...
l.2 \begin{dot2tex}[neato,mathmode]
(Press Enter to retry, or Control-D to exit; default file extension is `.tex')
Please type another output file name
! Emergency stop.
\dottotexverbatimwrite ...penout \verbatim@out #1
\BeforeStream \let \do \@m...
l.2 \begin{dot2tex}[neato,mathmode]
*** (job aborted, file error in nonstop mode)
Seems like the dot2texi is appending the build name twice in the path (latexmk error output), but I don't know why.
Anyone can help me?
\usepackage{graphicx},\usepackage{color},\usepackage{multicol},\floatplacement{figure}{H}and probably some more as they are either already provided by beamer or don't make sense to use with beamer. – samcarter_is_at_topanswers.xyz Feb 13 '17 at 10:46