Skip to content

Commit

Permalink
Remove prefix and suffix separators in citation
Browse files Browse the repository at this point in the history
  • Loading branch information
zepinglee committed Aug 22, 2024
1 parent 705560a commit fd62d80
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 16 deletions.
10 changes: 2 additions & 8 deletions latex/citation-style-language-cite.sty
Original file line number Diff line number Diff line change
Expand Up @@ -246,21 +246,15 @@
\tl_clear:N \l__csl_cite_prefix_tl
\tl_clear:N \l__csl_cite_suffix_tl
\tl_if_empty:nF {#1}
{
\tl_set:Nn \l__csl_cite_prefix_tl {#1}
\tl_put_right:NV \l__csl_cite_prefix_tl \l__csl_prefix_separator_tl
}
{ \tl_set:Nn \l__csl_cite_prefix_tl {#1} }
\tl_if_empty:nF {#2}
{
\tl_if_in:nnTF {#2} { = }
{ \keys_set:nn { csl / cite-item } {#2} }
{
\regex_match:nnTF { \d+ } {#2}
{ \__csl_set_locator:nn { page } {#2} }
{
\tl_set:Nn \l__csl_cite_suffix_tl {#2}
\tl_put_left:NV \l__csl_cite_suffix_tl \l__csl_suffix_separator_tl
}
{ \tl_set:Nn \l__csl_cite_suffix_tl {#2} }
}
}
% The affixes are treated as cite item affixes in a multi-cite command
Expand Down
8 changes: 0 additions & 8 deletions latex/citation-style-language.sty
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,6 @@
\tl_new:N \l__csl_locale_tl
\bool_new:N \l__csl_back_ref_bool
\str_new:N \l__csl_back_ref_type_str
% Citation formatting
\tl_new:N \l__csl_prefix_separator_tl
\tl_new:N \l__csl_suffix_separator_tl
% Bibliography formatting
\tl_new:N \bibsection
\tl_new:N \l__csl_bib_font_tl
Expand Down Expand Up @@ -105,9 +102,6 @@
backref .choices:nn =
{ true, page, section, false }
{ \exp_args:NV \__csl_set_back_ref:n \l_keys_choice_tl } ,
% Citation formatting
prefix-separator .tl_set:N = \l__csl_prefix_separator_tl ,
suffix-separator .tl_set:N = \l__csl_suffix_separator_tl ,
% Bibliography formatting
bib-section .tl_set:N = \bibsection ,
bib-font .tl_set:N = \l__csl_bib_font_tl ,
Expand Down Expand Up @@ -139,8 +133,6 @@
\keys_set:nn { csl }
{
backref = false ,
prefix-separator = { ~ } ,
suffix-separator = { , ~ } ,
bib-entry-page-break = true ,
bib-par-indent = { \parindent } ,
bib-hang = { 1 em } ,
Expand Down

0 comments on commit fd62d80

Please sign in to comment.