From 9658b61375125f538733a0d53696a6b1b9c33228 Mon Sep 17 00:00:00 2001 From: Bastien Dumont Date: Wed, 16 Nov 2022 09:24:02 +0100 Subject: [PATCH] Updated from tcrfenum to crossrefenum in \*TeX output --- text-crossrefs.lua | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/text-crossrefs.lua b/text-crossrefs.lua index d17a15d..46cd595 100644 --- a/text-crossrefs.lua +++ b/text-crossrefs.lua @@ -95,7 +95,7 @@ local config = { default_reftype = 'page', default_prefixref = 'yes', filelabel_ref_separator = '::', - range_delim_tcrfenum = ' to ', + range_delim_crossrefenum = ' to ', additional_types = {} } @@ -376,18 +376,18 @@ end -- Formatting references as raw inlines. -local function make_tcrfenum_first_arg(ref_type) +local function make_crossrefenum_first_arg(ref_type) local ref_type_is_explicit = ref_type ~= config.default_reftype - local tcrfenum_first_arg = '' + local crossrefenum_first_arg = '' if ref_type_is_explicit then - tcrfenum_first_arg = '[' .. ref_type .. ']' + crossrefenum_first_arg = '[' .. ref_type .. ']' end - return tcrfenum_first_arg + return crossrefenum_first_arg end -local function make_tcrfenum_second_arg(is_prefixed) +local function make_crossrefenum_second_arg(is_prefixed) local is_prefixed_is_explicit = is_prefixed ~= (config.default_prefixref == 'yes') - local tcrfenum_second_arg = '' + local crossrefenum_second_arg = '' local is_prefixed_string = '' if is_prefixed_is_explicit then if is_prefixed then @@ -395,13 +395,13 @@ local function make_tcrfenum_second_arg(is_prefixed) else is_prefixed_string = 'noprefix' end - tcrfenum_second_arg = '[' .. is_prefixed_string .. ']' + crossrefenum_second_arg = '[' .. is_prefixed_string .. ']' end - return tcrfenum_second_arg + return crossrefenum_second_arg end -local function make_tcrfenum_references_list(refs, ref_type) - local tcrfenum_references_list = '' +local function make_crossrefenum_references_list(refs, ref_type) + local crossrefenum_references_list = '' for i = 1, #refs do local ref = refs[i] local anchor = ref.anchor @@ -412,20 +412,20 @@ local function make_tcrfenum_references_list(refs, ref_type) end local texified_ref = '{' .. anchor if ref.end_of_range then - texified_ref = texified_ref .. config.range_delim_tcrfenum .. ref.end_of_range + texified_ref = texified_ref .. config.range_delim_crossrefenum .. ref.end_of_range end texified_ref = texified_ref .. '}' - tcrfenum_references_list = tcrfenum_references_list .. texified_ref + crossrefenum_references_list = crossrefenum_references_list .. texified_ref end - return tcrfenum_references_list + return crossrefenum_references_list end local function make_raw_content_tex(refs, ref_type, is_prefixed) local texified_references = '' - texified_references = '\\tcrfenum' - .. make_tcrfenum_first_arg(ref_type) - .. make_tcrfenum_second_arg(is_prefixed) - .. '{' .. make_tcrfenum_references_list(refs, ref_type) .. '}' + texified_references = '\\crossrefenum' + .. make_crossrefenum_first_arg(ref_type) + .. make_crossrefenum_second_arg(is_prefixed) + .. '{' .. make_crossrefenum_references_list(refs, ref_type) .. '}' return texified_references end