ID番号説明行

ID番号説明行

ID 番号の各部分を次のように記述します。 説明文

どうすればいいでしょうか? tikz を使用して何かを設定できますか? 長さや複雑さが異なる ID を記述できるようにしたいです。できればスクリプトのような機能が必要です。私は LaTeX や tikz の初心者ではありませんが、使い方は常に非常に簡単です。

ありがとう!

編集: この古い問題を再度検討した結果、ようやく満足のいく解決策が見つかりました。そのため、誰かがこれに遭遇して同様の質問がある場合に備えて、以下に投稿します。

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{positioning, arrows}
\begin{document}

\def\myhbar{1mm}
\def\myvbar{.3mm}
\def\myyshift{0mm}
\def\myxshift{0mm}
\pgfmathsetmacro{\myinnersep}{0.5}

\begin{tikzpicture}[auto,node distance=.5mm,font=\tiny\ttfamily, minimum height={height("Ag")+\myinnersep*1mm},inner sep=\myinnersep*1mm]
    \node [] (a1) at(2,0) {-rw-r--r--};
    \foreach [count=\x from 2] \txt in {\phantom{0}6,michael,admins,4096,Apr 25 13:53,some\_file.txt}{
        \pgfmathparse{\x-1}
        \node [right = of a\pgfmathresult] (a\x) {\txt};
    }
    \node [below = -1mm of a1] (b1) {drwxr-xr-x};
    \draw [] ([yshift=\myhbar+\myyshift,xshift=\myvbar]b1.south west) -- ([yshift=\myyshift,xshift=\myvbar]b1.south west) -- ([yshift=\myyshift,xshift=-\myvbar]b1.south east) -- ([yshift=\myhbar+\myyshift,xshift=-\myvbar]b1.south east);
    \foreach [count=\x from 2] \txt in {22,collins,editor,4096,Apr 25 13:53,some\_folder}{
        \pgfmathparse{\x-1}
        \node [right = of b\pgfmathresult] (b\x) {\txt};
        \draw [] ([yshift=\myhbar+\myyshift,xshift=\myvbar]b\x.south west) -- ([yshift=\myyshift,xshift=\myvbar]b\x.south west) -- ([yshift=\myyshift,xshift=-\myvbar]b\x.south east) -- ([yshift=\myhbar+\myyshift,xshift=-\myvbar]b\x.south east);
    }
    \foreach [count=\y from 1] \desc in {file permissions, number of links, user, group, size, date and time, name}{
        \node [anchor=west](c\y) at (0,-\y*2mm-5mm){\desc};
        \draw [<-,arrows={-[}] (c\y.east) -| ([yshift=\myyshift]b\y.south);
     }
\end{tikzpicture}
\end{document}

結果は次のようになります: ここに画像の説明を入力してください

関連情報