summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/dbshow
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2022-01-06 21:07:47 +0000
committerKarl Berry <karl@freefriends.org>2022-01-06 21:07:47 +0000
commit2847c629f1a7b0032ace17d02dea127721d967a4 (patch)
treea0e043808361f7f2f4edbc9a8be3dcad817b38df /Master/texmf-dist/tex/latex/dbshow
parente7f43a7dce3e1260163ed2a5f83289a656435264 (diff)
dbshow (6jan22)
git-svn-id: svn://tug.org/texlive/trunk@61513 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/dbshow')
-rw-r--r--Master/texmf-dist/tex/latex/dbshow/dbshow.sty22
1 files changed, 18 insertions, 4 deletions
diff --git a/Master/texmf-dist/tex/latex/dbshow/dbshow.sty b/Master/texmf-dist/tex/latex/dbshow/dbshow.sty
index 6e51f048a45..0b02c20311e 100644
--- a/Master/texmf-dist/tex/latex/dbshow/dbshow.sty
+++ b/Master/texmf-dist/tex/latex/dbshow/dbshow.sty
@@ -14,8 +14,8 @@
% The Current Maintainer of this work is Li Changkai.
%
% This work consists of the files dbshow.sty, dbshow-doc.tex.
-\def\myfileversion{1.0}
-\def\myfiledate{2022/01/02}
+\def\myfileversion{1.1}
+\def\myfiledate{2022/01/07}
\RequirePackage{expl3, xparse}
\RequirePackage[calc]{datetime2}
\ProvidesExplPackage
@@ -444,7 +444,6 @@
\tl_gset_eq:cN { g__dbshow_filter_bool_tl_#1_#2 } \l_tmpa_tl
}
-\cs_generate_variant:Nn \regex_replace_all:nnN { nnc }
% #1 database #2 content
\NewDocumentEnvironment { dbFilters } { m +b } {
\seq_gclear_new:c { g__dbshow_cond_list_#1 }
@@ -488,12 +487,19 @@
}
}
+\int_gzero_new:N \g__dbshow_raw_filter_int
% #1 style name #2 database name
\cs_new_protected:Nn \dbshow_new_database_style:nn {
\dbshow_check_database:n { #2 }
\keys_define:nn { dbshow/style/#1 } {
filter .tl_gset:c = { g__dbshow_filter_#1_#2 },
filter .initial:n = -none-,
+ raw-filter .code:n = {
+ \int_gincr:N \g__dbshow_raw_filter_int
+ \str_set:Nx \l_tmpa_str { -raw\int_use:N \g__dbshow_raw_filter_int - }
+ \exp_args:NnV \tl_gset:cn { g__dbshow_filter_#1_#2 } \l_tmpa_str
+ \exp_args:NnV \dbshow_combine_conditional:nnn { #2 } \l_tmpa_str { ##1 }
+ },
sort .clist_gset:c = { g__dbshow_sort_#1_#2 },
before-code .tl_gset:c = { g__dbshow_style_before_#1_#2 },
before-code .initial:n = ,
@@ -604,7 +610,16 @@
{ \dbshow_sort:nNn { #2 } \l_index { #1 } }
% ##1 index
+ \int_zero_new:N \l_counter_int
\cs_set:Nn \dbshow_iter:n {
+ \int_incr:N \l_counter_int
+ \tl_set:Nx \dbalph { \int_to_alph:n { \l_counter_int } }
+ \tl_set:Nx \dbAlph { \int_to_Alph:n { \l_counter_int } }
+ \tl_set:Nx \dbarabic { \int_to_arabic:n { \l_counter_int } }
+ \tl_set:Nx \dbRoman { \int_to_Roman:n { \l_counter_int } }
+ \tl_set:Nx \dbroman { \int_to_roman:n { \l_counter_int } }
+ \tl_set:Nn \dbIndex { ##1 }
+
% ####1 attr
\cs_set:Npn \dbuse ####1 {
\dbshow_check_attr:nn { #2 } { ####1 }
@@ -614,7 +629,6 @@
{ g__dbshow_style_item_before_#1_#2_####1 }
\tl_set_eq:Nc \l_style_item_after_code
{ g__dbshow_style_item_after_#1_#2_####1 }
- \tl_set:Nn \dbIndex { ##1 }
\prop_get:cnN { g__dbshow_type_map_#2 } { ####1 } \l_tmp_type
% \tl_show:N \l_tmp_type