mirror of
https://github.com/curioustorvald/tsvm.git
synced 2026-06-10 15:04:03 +09:00
basic: tex env for typesetting code blocks
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
\begin{verbatim}
|
\begin{lstlisting}
|
||||||
10 REM TERRAN BASIC
|
10 REM TERRAN BASIC
|
||||||
20 REM REFERENCE MANUAL
|
20 REM REFERENCE MANUAL
|
||||||
30 REM For Version 1.0
|
30 REM For Version 1.0
|
||||||
@@ -6,4 +6,4 @@
|
|||||||
100 PRINT "Hello, world!"
|
100 PRINT "Hello, world!"
|
||||||
110 PRINT "Git gud!"
|
110 PRINT "Git gud!"
|
||||||
999 END
|
999 END
|
||||||
\end{verbatim}
|
\end{lstlisting}
|
||||||
|
|||||||
@@ -27,6 +27,8 @@
|
|||||||
\usepackage{soul}
|
\usepackage{soul}
|
||||||
\usepackage{verbatim}
|
\usepackage{verbatim}
|
||||||
\usepackage{etoolbox}
|
\usepackage{etoolbox}
|
||||||
|
\usepackage[most]{tcolorbox}
|
||||||
|
\usepackage{listings}
|
||||||
|
|
||||||
\usepackage{lineno} % debug
|
\usepackage{lineno} % debug
|
||||||
|
|
||||||
@@ -86,7 +88,33 @@
|
|||||||
\end{tabular*}%
|
\end{tabular*}%
|
||||||
}}
|
}}
|
||||||
|
|
||||||
|
\newtcolorbox{lgreybox}[1][]{%
|
||||||
|
breakable,
|
||||||
|
enhanced,
|
||||||
|
colback=lgrey,
|
||||||
|
attach title to upper,
|
||||||
|
fontupper=\monofont,
|
||||||
|
#1
|
||||||
|
}
|
||||||
|
|
||||||
|
\definecolor{sourcecomment}{HTML}{888888}
|
||||||
|
|
||||||
|
\lstset{frame=tb,
|
||||||
|
language=[Visual]Basic,
|
||||||
|
aboveskip=3mm,
|
||||||
|
belowskip=3mm,
|
||||||
|
showstringspaces=false,
|
||||||
|
columns=flexible,
|
||||||
|
basicstyle={\small\ttfamily},
|
||||||
|
numbers=none,
|
||||||
|
numberstyle=\textbf,
|
||||||
|
keywordstyle=,
|
||||||
|
commentstyle=\color{sourcecomment},
|
||||||
|
stringstyle=\textbf,
|
||||||
|
breaklines=true,
|
||||||
|
breakatwhitespace=true,
|
||||||
|
tabsize=3
|
||||||
|
}
|
||||||
|
|
||||||
%\aliaspagestyle{part}{empty}
|
%\aliaspagestyle{part}{empty}
|
||||||
%\aliaspagestyle{chapter}{empty}
|
%\aliaspagestyle{chapter}{empty}
|
||||||
|
|||||||
Reference in New Issue
Block a user