11
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

ディレクトリ構成図をlatexで作成する方法

Last updated at Posted at 2019-01-04

以下のようなディレクトリ構成図を作成したい。
キャプチャ.JPG

  1. ここからdirtreeをダウンロードします。https://ctan.org/tex-archive/macros/generic/dirtree

  2. dirtree.styファイルが含まれてないので、コマンドプロンプトを開きdirtree.styを作成します。

    $ cd C:\w32tex\share\texmf-dist\tex\latex\dirtree
    $ latex diretree.ins
    
  3. dire.pngとして以下のアイコンを作業環下に保存します。
    dire.png

  4. latexで以下のように記述します。

\usepackage{dirtree}
\begin{document}
\renewcommand\DTstyle{\ttfamily}
\dirtree{%
 .1 \makebox[2ex][r]{\includegraphics[width=0.25cm]{dire.png} myapp}.
 .2 \includegraphics[width=0.25cm]{dire.png} app.
 .3 \includegraphics[width=0.25cm]{dire.png} assets.
 .3 \includegraphics[width=0.25cm]{dire.png} config.
 .3 \includegraphics[width=0.25cm]{dire.png} images.
 .3 \includegraphics[width=0.25cm]{dire.png} javascripts.
 .3 \includegraphics[width=0.25cm]{dire.png} stylesheets.
}
\end{document}
11
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
11
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?