Skip to content

Commit

Permalink
fix: fix non-effective listings numbering.
Browse files Browse the repository at this point in the history
  • Loading branch information
fky2015 committed May 17, 2023
1 parent b769a14 commit 4c2757f
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 15 deletions.
8 changes: 5 additions & 3 deletions bithesis.dtx
Original file line number Diff line number Diff line change
Expand Up @@ -3385,9 +3385,11 @@
\cs_set:Npn \theequation {\thechapter\g_@@_label_divide_char_tl\arabic{equation}}

% code snippet
\cs_set:Npn \thelstlisting {\thechapter\g_@@_label_divide_char_tl\arabic{lstlisting}}
\cs_set:Npn \lstlistingname {\c_@@_label_code_tl}
\captionsetup[listing]{font=small,labelsep=space}
\AtBeginDocument{
\cs_gset:Npn \thelstlisting {\thechapter\g_@@_label_divide_char_tl\arabic{lstlisting}}
\cs_gset:Npn \lstlistingname {\c_@@_label_code_tl}
}
\captionsetup[lstlisting]{font=small,labelsep=space}
% \end{macrocode}
% \end{macro}
%
Expand Down
8 changes: 5 additions & 3 deletions templates/graduate-thesis/bithesis.cls
Original file line number Diff line number Diff line change
Expand Up @@ -1020,9 +1020,11 @@

\cs_set:Npn \theequation {\thechapter\g__bithesis_label_divide_char_tl\arabic{equation}}

\cs_set:Npn \thelstlisting {\thechapter\g__bithesis_label_divide_char_tl\arabic{lstlisting}}
\cs_set:Npn \lstlistingname {\c__bithesis_label_code_tl}
\captionsetup[listing]{font=small,labelsep=space}
\AtBeginDocument{
\cs_gset:Npn \thelstlisting {\thechapter\g__bithesis_label_divide_char_tl\arabic{lstlisting}}
\cs_gset:Npn \lstlistingname {\c__bithesis_label_code_tl}
}
\captionsetup[lstlisting]{font=small,labelsep=space}
\tolerance=1
\emergencystretch=\maxdimen
\hyphenpenalty=10000
Expand Down
8 changes: 5 additions & 3 deletions templates/paper-translation/bithesis.cls
Original file line number Diff line number Diff line change
Expand Up @@ -1020,9 +1020,11 @@

\cs_set:Npn \theequation {\thechapter\g__bithesis_label_divide_char_tl\arabic{equation}}

\cs_set:Npn \thelstlisting {\thechapter\g__bithesis_label_divide_char_tl\arabic{lstlisting}}
\cs_set:Npn \lstlistingname {\c__bithesis_label_code_tl}
\captionsetup[listing]{font=small,labelsep=space}
\AtBeginDocument{
\cs_gset:Npn \thelstlisting {\thechapter\g__bithesis_label_divide_char_tl\arabic{lstlisting}}
\cs_gset:Npn \lstlistingname {\c__bithesis_label_code_tl}
}
\captionsetup[lstlisting]{font=small,labelsep=space}
\tolerance=1
\emergencystretch=\maxdimen
\hyphenpenalty=10000
Expand Down
8 changes: 5 additions & 3 deletions templates/undergraduate-thesis-en/bithesis.cls
Original file line number Diff line number Diff line change
Expand Up @@ -1020,9 +1020,11 @@

\cs_set:Npn \theequation {\thechapter\g__bithesis_label_divide_char_tl\arabic{equation}}

\cs_set:Npn \thelstlisting {\thechapter\g__bithesis_label_divide_char_tl\arabic{lstlisting}}
\cs_set:Npn \lstlistingname {\c__bithesis_label_code_tl}
\captionsetup[listing]{font=small,labelsep=space}
\AtBeginDocument{
\cs_gset:Npn \thelstlisting {\thechapter\g__bithesis_label_divide_char_tl\arabic{lstlisting}}
\cs_gset:Npn \lstlistingname {\c__bithesis_label_code_tl}
}
\captionsetup[lstlisting]{font=small,labelsep=space}
\tolerance=1
\emergencystretch=\maxdimen
\hyphenpenalty=10000
Expand Down
8 changes: 5 additions & 3 deletions templates/undergraduate-thesis/bithesis.cls
Original file line number Diff line number Diff line change
Expand Up @@ -1020,9 +1020,11 @@

\cs_set:Npn \theequation {\thechapter\g__bithesis_label_divide_char_tl\arabic{equation}}

\cs_set:Npn \thelstlisting {\thechapter\g__bithesis_label_divide_char_tl\arabic{lstlisting}}
\cs_set:Npn \lstlistingname {\c__bithesis_label_code_tl}
\captionsetup[listing]{font=small,labelsep=space}
\AtBeginDocument{
\cs_gset:Npn \thelstlisting {\thechapter\g__bithesis_label_divide_char_tl\arabic{lstlisting}}
\cs_gset:Npn \lstlistingname {\c__bithesis_label_code_tl}
}
\captionsetup[lstlisting]{font=small,labelsep=space}
\tolerance=1
\emergencystretch=\maxdimen
\hyphenpenalty=10000
Expand Down

0 comments on commit 4c2757f

Please sign in to comment.