Skip to content

Commit 63a2aea

Browse files
committed
minor improvements
1 parent b8b8002 commit 63a2aea

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

styles/listing.sty

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,16 @@ language=bash,%
169169
\gitCode{#1}{#2}{python3 -m latexgit.formatters.python #3}{#4}{#5}{,style=python_style}%
170170
}%
171171
%
172+
%%
173+
%% Use latexgit to place a Bash listing.
174+
%% #1 the git repository
175+
%% #2 the local path
176+
%% #3 the label (lst: will be pre-pended)
177+
%% #4 the caption
178+
\protected\gdef\gitBash#1#2#3#4#5{%
179+
\gitCode{#1}{#2}{}{#3}{#4}{,style=bash_style}%
180+
}%
181+
%
172182
%
173183
%%
174184
%% Load a local listing.

text/back/scripts.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
Nevertheless, the book would be incomplete if these scripts were not provided as well.
66
So we put them here, at the end of the book.%
77
%
8-
\gitCode{\programmingWithPythonCodeRepo}{scripts/mypy.sh}{}{bash:mypy}{%
8+
\gitBash{\programmingWithPythonCodeRepo}{scripts/mypy.sh}{bash:mypy}{%
99
A \bash\ script for executing \mypy, which prints the command line and the exit code.%
10-
}{,style=bash_style}%
10+
}%
1111
%
1212
\endhsection%
1313
%

0 commit comments

Comments
 (0)