
特定のドキュメントでは、、、などのpdflatex
拡張子を持つファイルが大量に生成されています。これらの数十のファイルによって作業フォルダが急速に乱雑になり、実際のアセットの場所がわかりにくくなっています。.mlf
.mlt
.mtc
document.mtc
document.mtc1
document.mtc2
私はTeXlipseを使っていますが、通常はこの種のファイルを一時フォルダに保存できます。しかし、これらの特定の拡張機能ではそれができません。おそらく、バグ。
これらのファイルは正確には何ですか? 何らかの方法でそれらの生成を回避することはできますか?
アップデート: コメントで示唆されているように、このドキュメントでは明らかにminitoc
(かなり大規模なテンプレートから開始) が使用されています。目次の直前に次のコマンドがあります。
\dominitoc
\dominilof
\dominilot
minitoc
これらのファイルを消去するか、別の場所に保存するように指示する方法はありますか?
答え1
アップデート別の を使用する小さなハック コードを提供します\jobname
が、これにより、生成されたすべてのファイルが yet で指定されたディレクトリ パスに移動します\minitocpath
。
パッケージminitoc
は、設計されたタスクを実行するために一連のファイルを生成します。
以下の説明では、またはをX
表し、 は文脈に応じて章、部、または節番号のいずれかを意味します。lof
lot
toc
Y
の基本的な概念は、minitoc
章ごとの\tableofcontents
、\listoffigures
およびと\listoftables
呼ばれるコマンドです。\minitoc
\minilof
\minilot
これらの各コマンドは、 および という名前のファイルを章ごとに 1 つ作成します。これらのファイルは\jobname.mtcY
、コマンドが使用されなくても書き込まれます。\jobname.mlfY
\jobname.mltY
\miniX
によって書き込まれたファイルのリストminitoc
も に保存されます\jobname.maf
。
はおよびコマンドminitoc
を提供するため、これらのコマンドはそれぞれ、、、を生成します。これらのコマンドは相互に排他的です。\partX
\sectX
\jobname.ptcY
\jobname.plfY
\jobname.pltY
\jobname.stcY
\jobname.slfY
\jobname.sltY
これらのファイルを のどこかに移動することはminitoc
、少なくとも のコードに変更/パッチを適用しない限りは不可能ですminitoc
。
minitoc
以下は、など\jobname.mtc0
を作成するためのサンプル ファイルです。\jobname.mtc3
\documentclass{book}
\usepackage{blindtext}
% Must be placed before `minitoc` is loaded!
\newcommand{\minitocpath}{%
minitocdump/% Change the name of the directory.
}
\makeatletter
\let\jobname@@orig\jobname
\def\jobname{\minitocpath/\jobname@@orig}
\makeatother
\usepackage{minitoc}
\dominitoc
\dominilof
\dominilot
\begin{document}
\faketableofcontents
\fakelistoffigures
\fakelistoftables
\chapter{First chapter}
\minitoc
\minilof
\minilot
\section{First section}
\blindtext
\begin{figure}
\caption{A local figure}
\end{figure}
\begin{table}
\caption{A local table}
\end{table}
\chapter{Second chapter}
\minitoc
\minilof
\minilot
\section{Second section}
\chapter{Third chapter}
\section{Third section}
\end{document}
\parttoc
... および、その他にも同様のバージョンがあります。
\documentclass{book}
\usepackage{blindtext}
% Must be placed before `minitoc` is loaded!
\newcommand{\minitocpath}{%
minitocdump/% Change the name of the directory.
}
\makeatletter
\let\jobname@@orig\jobname
\def\jobname{\minitocpath/\jobname@@orig}
\makeatother
\usepackage{minitoc}
\doparttoc
\dopartlof
\dopartlot
\begin{document}
\faketableofcontents
\fakelistoffigures
\fakelistoftables
\part{First part}
\parttoc
\partlof
\partlot
\chapter{First chapter}
\section{First section}
\blindtext
\begin{figure}
\caption{A local figure}
\end{figure}
\begin{table}
\caption{A local table}
\end{table}
\blindtext
\begin{figure}
\caption{A local figure}
\end{figure}
\begin{table}
\caption{A local table}
\end{table}
\part{Second part}
\parttoc
\partlof
\partlot
\chapter{Second chapter}
\section{Second section}
\chapter{Third chapter}
\section{Third section}
\blindtext
\begin{figure}
\caption{A local figure}
\end{figure}
\begin{table}
\caption{A local table}
\end{table}
\end{document}