LaTeX在列表中添加垂直标题

时间:2017-04-09 15:44:19

标签: latex

有没有办法可以在LaTeX中添加listings的垂直标题作为TC1,如下所示:

enter image description here

我做的是:

\definecolor{dkgreen}{rgb}{0,0.6,0}
\definecolor{gray}{rgb}{0.5,0.5,0.5}
\definecolor{mauve}{rgb}{0.58,0,0.82}

\lstset{frame=tb,
    language=Java,
    aboveskip=3mm,
    belowskip=3mm,
    showstringspaces=false,
    columns=flexible,
    basicstyle={\fontsize{7}{8}\ttfamily},
    numbers=left,
    stepnumber=1,
    numberstyle=\tiny\color{gray},
    keywordstyle=\color{blue},
    commentstyle=\color{dkgreen},
    stringstyle=\color{mauve},
    breaklines=true,
    breakatwhitespace=true,
    tabsize=3
}

\lstinputlisting[language=Java]{./TC1.java}

如何在列表中添加TC1?

0 个答案:

没有答案