Skip to content

Commit b92d299

Browse files
committed
Agrega soporte citeauthoryear para referencias
1 parent 4b61503 commit b92d299

10 files changed

Lines changed: 479 additions & 99 deletions

.natnum_source.bst

Lines changed: 53 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
%% Template: Template LaTeX
22
%% Documento: [NATNUM_DESCRIPTION]
3-
%% Versión: 1.6
3+
%% Versión: 1.7
44
%% Codificación: UTF-8
55
%%
66
%% Autor: Pablo Pizarro R.
@@ -66,6 +66,7 @@ STRINGS {
6666
longest.label
6767
s
6868
t
69+
shortlabel
6970
}
7071

7172
% -----------------------------------------------------------------------------
@@ -244,16 +245,6 @@ FUNCTION {new.sentence.checka} {
244245
if$
245246
}
246247

247-
FUNCTION {output.bibitem} {
248-
newline$
249-
"\backrefparscanfalse" write$
250-
newline$
251-
"\bibitem{" write$ cite$ write$ "}" write$
252-
newline$
253-
""
254-
before.all 'output.state :=
255-
}
256-
257248
FUNCTION {output.links} {
258249
doi empty$ {
259250
arxivId empty$ {
@@ -516,6 +507,57 @@ FUNCTION {format.editors} {
516507
} if$
517508
}
518509

510+
FUNCTION {shortlabel.build} {
511+
author empty$ {
512+
editor empty$ {
513+
"" 'shortlabel :=
514+
}{
515+
editor num.names$ 'numnames :=
516+
numnames #1 = {
517+
editor #1 "{vv~}{ll}" format.name$ 'shortlabel :=
518+
}{
519+
numnames #2 = {
520+
editor #1 "{vv~}{ll}" format.name$ 't :=
521+
editor #2 "{vv~}{ll}" format.name$ 's :=
522+
t "[LANG_AND_SHORT]" * s * 'shortlabel :=
523+
}{
524+
editor #1 "{vv~}{ll}" format.name$ " {\em [LANG_ET_AL]}" * 'shortlabel :=
525+
} if$
526+
} if$
527+
} if$
528+
}{
529+
author num.names$ 'numnames :=
530+
numnames #1 = {
531+
author #1 "{vv~}{ll}" format.name$ 'shortlabel :=
532+
}{
533+
numnames #2 = {
534+
author #1 "{vv~}{ll}" format.name$ 't :=
535+
author #2 "{vv~}{ll}" format.name$ 's :=
536+
t "[LANG_AND_SHORT]" * s * 'shortlabel :=
537+
}{
538+
author #1 "{vv~}{ll}" format.name$ " {\em [LANG_ET_AL]}" * 'shortlabel :=
539+
} if$
540+
} if$
541+
} if$
542+
}
543+
544+
FUNCTION {output.bibitem} {
545+
newline$
546+
"\backrefparscanfalse" write$
547+
newline$
548+
shortlabel.build
549+
"\bibitem[" write$
550+
"\protect\citeauthoryear{" write$
551+
shortlabel write$
552+
"}{" write$
553+
year empty$ { "" write$ } { year write$ } if$
554+
"}]" write$
555+
"{" write$ cite$ write$ "}" write$
556+
newline$
557+
""
558+
before.all 'output.state :=
559+
}
560+
519561
FUNCTION {format.in.ed.booktitle} {
520562
booktitle empty$ {
521563
""

compile_natnumurl.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
'[IN_OBJECT]': 'in ',
3131
'[IN]': ' in ',
3232
'[LANG_AND]': ' and ',
33+
'[LANG_AND_SHORT]': ' and ',
3334
'[LANG_ET_AL]': 'et~al.',
3435
'[MSC_THESIS]': 'Master\'s thesis',
3536
'[NO._IN]': 'No.~',
@@ -73,6 +74,7 @@
7374
'[IN_OBJECT]': 'en ',
7475
'[IN]': ' en ',
7576
'[LANG_AND]': ' y ',
77+
'[LANG_AND_SHORT]': ' y ',
7678
'[LANG_ET_AL]': 'et~al.',
7779
'[MSC_THESIS]': 'Tesis M.Sc.',
7880
'[NO._IN]': 'No.~',

elsartnum.bst

Lines changed: 53 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
%% Template: Template LaTeX
22
%% Documento: Estilo elsarticle numerado [es]
3-
%% Versión: 1.6 (23/08/2024)
3+
%% Versión: 1.7 (06/11/2025)
44
%% Codificación: UTF-8
55
%%
66
%% Autor: Pablo Pizarro R.
@@ -66,6 +66,7 @@ STRINGS {
6666
longest.label
6767
s
6868
t
69+
shortlabel
6970
}
7071

7172
% -----------------------------------------------------------------------------
@@ -244,16 +245,6 @@ FUNCTION {new.sentence.checka} {
244245
if$
245246
}
246247

247-
FUNCTION {output.bibitem} {
248-
newline$
249-
"\backrefparscanfalse" write$
250-
newline$
251-
"\bibitem{" write$ cite$ write$ "}" write$
252-
newline$
253-
""
254-
before.all 'output.state :=
255-
}
256-
257248
FUNCTION {output.links} {
258249
doi empty$ {
259250
arxivId empty$ {
@@ -516,6 +507,57 @@ FUNCTION {format.editors} {
516507
} if$
517508
}
518509

510+
FUNCTION {shortlabel.build} {
511+
author empty$ {
512+
editor empty$ {
513+
"" 'shortlabel :=
514+
}{
515+
editor num.names$ 'numnames :=
516+
numnames #1 = {
517+
editor #1 "{vv~}{ll}" format.name$ 'shortlabel :=
518+
}{
519+
numnames #2 = {
520+
editor #1 "{vv~}{ll}" format.name$ 't :=
521+
editor #2 "{vv~}{ll}" format.name$ 's :=
522+
t " y " * s * 'shortlabel :=
523+
}{
524+
editor #1 "{vv~}{ll}" format.name$ " {\em et~al.}" * 'shortlabel :=
525+
} if$
526+
} if$
527+
} if$
528+
}{
529+
author num.names$ 'numnames :=
530+
numnames #1 = {
531+
author #1 "{vv~}{ll}" format.name$ 'shortlabel :=
532+
}{
533+
numnames #2 = {
534+
author #1 "{vv~}{ll}" format.name$ 't :=
535+
author #2 "{vv~}{ll}" format.name$ 's :=
536+
t " y " * s * 'shortlabel :=
537+
}{
538+
author #1 "{vv~}{ll}" format.name$ " {\em et~al.}" * 'shortlabel :=
539+
} if$
540+
} if$
541+
} if$
542+
}
543+
544+
FUNCTION {output.bibitem} {
545+
newline$
546+
"\backrefparscanfalse" write$
547+
newline$
548+
shortlabel.build
549+
"\bibitem[" write$
550+
"\protect\citeauthoryear{" write$
551+
shortlabel write$
552+
"}{" write$
553+
year empty$ { "" write$ } { year write$ } if$
554+
"}]" write$
555+
"{" write$ cite$ write$ "}" write$
556+
newline$
557+
""
558+
before.all 'output.state :=
559+
}
560+
519561
FUNCTION {format.in.ed.booktitle} {
520562
booktitle empty$ {
521563
""

elsartnum_en.bst

Lines changed: 53 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
%% Template: Template LaTeX
22
%% Documento: Estilo elsarticle numerado [en]
3-
%% Versión: 1.6 (23/08/2024)
3+
%% Versión: 1.7 (06/11/2025)
44
%% Codificación: UTF-8
55
%%
66
%% Autor: Pablo Pizarro R.
@@ -66,6 +66,7 @@ STRINGS {
6666
longest.label
6767
s
6868
t
69+
shortlabel
6970
}
7071

7172
% -----------------------------------------------------------------------------
@@ -244,16 +245,6 @@ FUNCTION {new.sentence.checka} {
244245
if$
245246
}
246247

247-
FUNCTION {output.bibitem} {
248-
newline$
249-
"\backrefparscanfalse" write$
250-
newline$
251-
"\bibitem{" write$ cite$ write$ "}" write$
252-
newline$
253-
""
254-
before.all 'output.state :=
255-
}
256-
257248
FUNCTION {output.links} {
258249
doi empty$ {
259250
arxivId empty$ {
@@ -516,6 +507,57 @@ FUNCTION {format.editors} {
516507
} if$
517508
}
518509

510+
FUNCTION {shortlabel.build} {
511+
author empty$ {
512+
editor empty$ {
513+
"" 'shortlabel :=
514+
}{
515+
editor num.names$ 'numnames :=
516+
numnames #1 = {
517+
editor #1 "{vv~}{ll}" format.name$ 'shortlabel :=
518+
}{
519+
numnames #2 = {
520+
editor #1 "{vv~}{ll}" format.name$ 't :=
521+
editor #2 "{vv~}{ll}" format.name$ 's :=
522+
t " and " * s * 'shortlabel :=
523+
}{
524+
editor #1 "{vv~}{ll}" format.name$ " {\em et~al.}" * 'shortlabel :=
525+
} if$
526+
} if$
527+
} if$
528+
}{
529+
author num.names$ 'numnames :=
530+
numnames #1 = {
531+
author #1 "{vv~}{ll}" format.name$ 'shortlabel :=
532+
}{
533+
numnames #2 = {
534+
author #1 "{vv~}{ll}" format.name$ 't :=
535+
author #2 "{vv~}{ll}" format.name$ 's :=
536+
t " and " * s * 'shortlabel :=
537+
}{
538+
author #1 "{vv~}{ll}" format.name$ " {\em et~al.}" * 'shortlabel :=
539+
} if$
540+
} if$
541+
} if$
542+
}
543+
544+
FUNCTION {output.bibitem} {
545+
newline$
546+
"\backrefparscanfalse" write$
547+
newline$
548+
shortlabel.build
549+
"\bibitem[" write$
550+
"\protect\citeauthoryear{" write$
551+
shortlabel write$
552+
"}{" write$
553+
year empty$ { "" write$ } { year write$ } if$
554+
"}]" write$
555+
"{" write$ cite$ write$ "}" write$
556+
newline$
557+
""
558+
before.all 'output.state :=
559+
}
560+
519561
FUNCTION {format.in.ed.booktitle} {
520562
booktitle empty$ {
521563
""

elsartnumurl.bst

Lines changed: 53 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
%% Template: Template LaTeX
22
%% Documento: Estilo elsarticle numerado + url (doi, arxivId) [es]
3-
%% Versión: 1.6 (23/08/2024)
3+
%% Versión: 1.7 (06/11/2025)
44
%% Codificación: UTF-8
55
%%
66
%% Autor: Pablo Pizarro R.
@@ -66,6 +66,7 @@ STRINGS {
6666
longest.label
6767
s
6868
t
69+
shortlabel
6970
}
7071

7172
% -----------------------------------------------------------------------------
@@ -244,16 +245,6 @@ FUNCTION {new.sentence.checka} {
244245
if$
245246
}
246247

247-
FUNCTION {output.bibitem} {
248-
newline$
249-
"\backrefparscanfalse" write$
250-
newline$
251-
"\bibitem{" write$ cite$ write$ "}" write$
252-
newline$
253-
""
254-
before.all 'output.state :=
255-
}
256-
257248
FUNCTION {output.links} {
258249
doi empty$ {
259250
arxivId empty$ {
@@ -516,6 +507,57 @@ FUNCTION {format.editors} {
516507
} if$
517508
}
518509

510+
FUNCTION {shortlabel.build} {
511+
author empty$ {
512+
editor empty$ {
513+
"" 'shortlabel :=
514+
}{
515+
editor num.names$ 'numnames :=
516+
numnames #1 = {
517+
editor #1 "{vv~}{ll}" format.name$ 'shortlabel :=
518+
}{
519+
numnames #2 = {
520+
editor #1 "{vv~}{ll}" format.name$ 't :=
521+
editor #2 "{vv~}{ll}" format.name$ 's :=
522+
t " y " * s * 'shortlabel :=
523+
}{
524+
editor #1 "{vv~}{ll}" format.name$ " {\em et~al.}" * 'shortlabel :=
525+
} if$
526+
} if$
527+
} if$
528+
}{
529+
author num.names$ 'numnames :=
530+
numnames #1 = {
531+
author #1 "{vv~}{ll}" format.name$ 'shortlabel :=
532+
}{
533+
numnames #2 = {
534+
author #1 "{vv~}{ll}" format.name$ 't :=
535+
author #2 "{vv~}{ll}" format.name$ 's :=
536+
t " y " * s * 'shortlabel :=
537+
}{
538+
author #1 "{vv~}{ll}" format.name$ " {\em et~al.}" * 'shortlabel :=
539+
} if$
540+
} if$
541+
} if$
542+
}
543+
544+
FUNCTION {output.bibitem} {
545+
newline$
546+
"\backrefparscanfalse" write$
547+
newline$
548+
shortlabel.build
549+
"\bibitem[" write$
550+
"\protect\citeauthoryear{" write$
551+
shortlabel write$
552+
"}{" write$
553+
year empty$ { "" write$ } { year write$ } if$
554+
"}]" write$
555+
"{" write$ cite$ write$ "}" write$
556+
newline$
557+
""
558+
before.all 'output.state :=
559+
}
560+
519561
FUNCTION {format.in.ed.booktitle} {
520562
booktitle empty$ {
521563
""

0 commit comments

Comments
 (0)