Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ScalaCode Environment #165

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions dev/latex/hgblistings.sty
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,13 @@ keepspaces=true,%
#1}}%
{}

% Code Enivornmente for Scala
\lstnewenvironment{ScalaCode}[1][]
{\lstset{%
language=Scala,
escapeinside={/+}{+/}, % makes "/+" and "+/" available for Latex escapes (labels etc.)
#1}}%
{}

% Language Definition and Code Environment for Swift
\lstdefinelanguage{Swift}
Expand Down
2 changes: 2 additions & 0 deletions documents/HgbThesisTutorialDE/chapters/abbildungen.tex
Original file line number Diff line number Diff line change
Expand Up @@ -743,6 +743,8 @@ \subsection{Formatierung von Programmcode}
& \verb!...! \verb!\end{PhpCode}! \\
Python: & \verb!\begin{PythonCode}!
& \verb!...! \verb!\end{PythonCode}! \\
Scala: & \verb!\begin{ScalaCode}!
& \verb!...! \verb!\end{ScalaCode}! \\
Swift: & \verb!\begin{SwiftCode}!
& \verb!...! \verb!\end{SwiftCode}! \\
XML: & \verb!\begin{XmlCode}!
Expand Down
2 changes: 2 additions & 0 deletions documents/HgbThesisTutorialEN/chapters/figures.tex
Original file line number Diff line number Diff line change
Expand Up @@ -726,6 +726,8 @@ \subsection{Formatting Program Code}
& \verb!...! \verb!\end{PhpCode}! \\
Python: & \verb!\begin{PythonCode}!
& \verb!...! \verb!\end{PythonCode}! \\
Scala: & \verb!\begin{ScalaCode}!
& \verb!...! \verb!\end{ScalaCode}! \\
Swift: & \verb!\begin{SwiftCode}!
& \verb!...! \verb!\end{SwiftCode}! \\
XML: & \verb!\begin{XmlCode}!
Expand Down
1 change: 1 addition & 0 deletions documents/Manual/main.tex
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@ \subsection{Code environments (\texttt{hgblistings.sty})}
\item \textbf{\texttt{ObjCCode}}: for ObjectiveC,
\item \textbf{\texttt{PhpCode}}: for PHP,
\item \textbf{\texttt{PythonCode}}: for Python,
\item \textbf{\texttt{ScalaCode}}: for Scala,
\item \textbf{\texttt{Swift}}: for Swift,
\item \textbf{\texttt{XmlCode}}: for XML.
\end{itemize}
Expand Down