소스 검색

+ Improved typesetting of listings

michael 25 년 전
부모
커밋
6d705a3ca4
1개의 변경된 파일10개의 추가작업 그리고 2개의 파일을 삭제
  1. 10 2
      docs/fpc.sty

+ 10 - 2
docs/fpc.sty

@@ -197,7 +197,13 @@
 % For examples
 %
 \newcommand{\FPCexample}[1]{%
-\latex{\lstinputlisting{\exampledir/#1.pp}}\html{\input{\exampledir/#1.tex}}}
+\latex{\par \file{\textbf{Listing:} \exampledir/#1.pp}%
+\lstinputlisting{\exampledir/#1.pp}}%
+\html{\input{\exampledir/#1.tex}}}
+\newcommand{\Cexample}[1]{%
+\latex{\par \file{\textbf{Listing:} \exampledir/#1.c}%
+\lstinputlisting[language=c]{\exampledir/#1.c}}%
+\html{\input{\exampledir/#1.tex}}}
 \newcommand{\exampledir}{.}
 \newcommand{\FPCexampledir}[1]{\renewcommand{\exampledir}{#1}}
 %
@@ -205,8 +211,10 @@
 %
 \usepackage{listings}%
 \lstset{language=Delphi}%
-\lstset{pre=\sffamily\small}%
+\lstset{basicstyle=\sffamily\small}%
+\lstset{commentstyle=\itshape}%
 \lstset{keywordstyle=\bfseries}%
+\lstset{frame=tb}
 %\lstset{blankstring=true}%
 %
 % Page settings