basic: tex env for typesetting code blocks

This commit is contained in:
minjaesong
2020-12-17 21:51:09 +09:00
parent e280e4f4c7
commit 0acad8bd2f
2 changed files with 30 additions and 2 deletions

View File

@@ -1,4 +1,4 @@
\begin{verbatim}
\begin{lstlisting}
10 REM TERRAN BASIC
20 REM REFERENCE MANUAL
30 REM For Version 1.0
@@ -6,4 +6,4 @@
100 PRINT "Hello, world!"
110 PRINT "Git gud!"
999 END
\end{verbatim}
\end{lstlisting}

View File

@@ -27,6 +27,8 @@
\usepackage{soul}
\usepackage{verbatim}
\usepackage{etoolbox}
\usepackage[most]{tcolorbox}
\usepackage{listings}
\usepackage{lineno} % debug
@@ -86,7 +88,33 @@
\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{chapter}{empty}