Skip to content

Commit

Permalink
Mejora definición de llaves y links
Browse files Browse the repository at this point in the history
  • Loading branch information
ppizarror committed Aug 23, 2024
1 parent 43888ec commit c54a374
Show file tree
Hide file tree
Showing 9 changed files with 270 additions and 162 deletions.
48 changes: 30 additions & 18 deletions .natnum_source.bst
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,10 @@ FUNCTION {end.entry} {
'skip$
'add.period$
if$
write$ newline$
"\backrefprint\backrefparscantrue" write$ newline$
write$
newline$
"\backrefprint\backrefparscantrue" write$
newline$
}

FUNCTION {field.or.null} {
Expand Down Expand Up @@ -244,8 +246,10 @@ FUNCTION {new.sentence.checka} {

FUNCTION {output.bibitem} {
newline$
"\backrefparscanfalse" write$ newline$
"\bibitem{" write$ cite$ write$ "}" write$ newline$
"\backrefparscanfalse" write$
newline$
"\bibitem{" write$ cite$ write$ "}" write$
newline$
""
before.all 'output.state :=
}
Expand All @@ -256,18 +260,18 @@ FUNCTION {output.links} {
url empty$ {
"" *
}{
", \href{" * url * "}{\nolinkurl{\detokenize{" * url * "}}}" *
", \href{" * url * "} {\nolinkurl{\detokenize{" * url * "}}}" *
urldate empty$ {
"" *
}{
"[VISITED_ON]" * urldate * "[VISITED_ON_LAST]" *
} if$
} if$
}{
", \href{https://arxiv.org/abs/" * arxivId * "}{arXiv:\detokenize{" * arxivId * "}}" *
", \href{https://arxiv.org/abs/" * arxivId * "} {\nolinkurl{arXiv:\detokenize{" * arxivId * "}}}" *
} if$
}{
", \href{https://dx.doi.org/" * doi * "}{\nolinkurl{doi:\detokenize{" * doi * "}}}" *
", \href{https://dx.doi.org/" * doi * "} {\nolinkurl{doi:\detokenize{" * doi * "}}}" *
} if$
}

Expand All @@ -280,12 +284,14 @@ FUNCTION {output.nonnull} {
" " * write$
}{
output.state after.block = {
add.period$ write$ newline$
add.period$ write$
newline$
"\newblock " write$
}{
output.state before.all = 'write$ {
output.state after.quoted.block = {
write$ newline$
write$
newline$
"\newblock " write$
}{
add.period$ " " * write$
Expand Down Expand Up @@ -372,7 +378,7 @@ FUNCTION {format.article.crossref} {
"[ERROR_FORMAT_ARTICLE_CROSSREF_1]" cite$ * "[ERROR_FORMAT_ARTICLE_CROSSREF_2]" * crossref * warning$
""
}{
"[IN_OBJECT]{" journal * "\/}" *
"[IN_OBJECT]{" journal * "}" *
} if$
}{
"[IN_OBJECT]" key *
Expand Down Expand Up @@ -419,7 +425,7 @@ FUNCTION {format.book.crossref} {
"[ERROR_FORMAT_BOOK_CROSSREF_3]" cite$ * "[ERROR_FORMAT_BOOK_CROSSREF_2]" * crossref * warning$
"" *
}{
"{" * series * "\/}" *
"{" * series * "}" *
} if$
}{
key *
Expand Down Expand Up @@ -530,7 +536,7 @@ FUNCTION {format.incoll.inproc.crossref} {
"[ERROR_FORMAT_INCOLL_INPROC_CROSSREF_1]" cite$ * "[ERROR_FORMAT_INCOLL_INPROC_CROSSREF_2]" * crossref * warning$
""
}{
"[IN_OBJECT]{" booktitle * "\/}" *
"[IN_OBJECT]{" booktitle * "}" *
} if$
}{
"[IN_OBJECT]" key *
Expand Down Expand Up @@ -925,12 +931,17 @@ FUNCTION {unpublished} {

FUNCTION {begin.bib} {
preamble$ empty$ 'skip$ {
preamble$ write$ newline$
preamble$ write$
newline$
} if$
"\begin{thebibliography}{" longest.label * "}" * write$ newline$
" \providecommand\backrefparscanfalse{}" write$ newline$
" \providecommand\backrefparscantrue{}" write$ newline$
" \providecommand\backrefprint{}" write$ newline$
"\begin{thebibliography}{" longest.label * "}" * write$
newline$
" \providecommand\backrefparscanfalse{}" write$
newline$
" \providecommand\backrefparscantrue{}" write$
newline$
" \providecommand\backrefprint{}" write$
newline$
}

FUNCTION {default.type} {
Expand All @@ -939,7 +950,8 @@ FUNCTION {default.type} {

FUNCTION {end.bib} {
newline$
"\end{thebibliography}" write$ newline$
"\end{thebibliography}" write$
newline$
}

READ
Expand Down
48 changes: 30 additions & 18 deletions elsartnum.bst
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,10 @@ FUNCTION {end.entry} {
'skip$
'add.period$
if$
write$ newline$
"\backrefprint\backrefparscantrue" write$ newline$
write$
newline$
"\backrefprint\backrefparscantrue" write$
newline$
}

FUNCTION {field.or.null} {
Expand Down Expand Up @@ -244,8 +246,10 @@ FUNCTION {new.sentence.checka} {

FUNCTION {output.bibitem} {
newline$
"\backrefparscanfalse" write$ newline$
"\bibitem{" write$ cite$ write$ "}" write$ newline$
"\backrefparscanfalse" write$
newline$
"\bibitem{" write$ cite$ write$ "}" write$
newline$
""
before.all 'output.state :=
}
Expand All @@ -256,18 +260,18 @@ FUNCTION {output.links} {
url empty$ {
"" *
}{
", \href{" * url * "}{\nolinkurl{\detokenize{" * url * "}}}" *
", \href{" * url * "} {\nolinkurl{\detokenize{" * url * "}}}" *
urldate empty$ {
"" *
}{
". Visitado el " * urldate * "." *
} if$
} if$
}{
", \href{https://arxiv.org/abs/" * arxivId * "}{arXiv:\detokenize{" * arxivId * "}}" *
", \href{https://arxiv.org/abs/" * arxivId * "} {\nolinkurl{arXiv:\detokenize{" * arxivId * "}}}" *
} if$
}{
", \href{https://dx.doi.org/" * doi * "}{\nolinkurl{doi:\detokenize{" * doi * "}}}" *
", \href{https://dx.doi.org/" * doi * "} {\nolinkurl{doi:\detokenize{" * doi * "}}}" *
} if$
}

Expand All @@ -280,12 +284,14 @@ FUNCTION {output.nonnull} {
" " * write$
}{
output.state after.block = {
add.period$ write$ newline$
add.period$ write$
newline$
"\newblock " write$
}{
output.state before.all = 'write$ {
output.state after.quoted.block = {
write$ newline$
write$
newline$
"\newblock " write$
}{
add.period$ " " * write$
Expand Down Expand Up @@ -372,7 +378,7 @@ FUNCTION {format.article.crossref} {
"se necesita key o journal en " cite$ * " para validar crossref " * crossref * warning$
""
}{
"en {" journal * "\/}" *
"en {" journal * "}" *
} if$
}{
"en " key *
Expand Down Expand Up @@ -419,7 +425,7 @@ FUNCTION {format.book.crossref} {
"se necesita editor, key o series en " cite$ * "para validar crossref " * crossref * warning$
"" *
}{
"{" * series * "\/}" *
"{" * series * "}" *
} if$
}{
key *
Expand Down Expand Up @@ -530,7 +536,7 @@ FUNCTION {format.incoll.inproc.crossref} {
"se necesita editor, key o booktitle en " cite$ * " para validar crossref " * crossref * warning$
""
}{
"en {" booktitle * "\/}" *
"en {" booktitle * "}" *
} if$
}{
"en " key *
Expand Down Expand Up @@ -911,12 +917,17 @@ FUNCTION {unpublished} {

FUNCTION {begin.bib} {
preamble$ empty$ 'skip$ {
preamble$ write$ newline$
preamble$ write$
newline$
} if$
"\begin{thebibliography}{" longest.label * "}" * write$ newline$
" \providecommand\backrefparscanfalse{}" write$ newline$
" \providecommand\backrefparscantrue{}" write$ newline$
" \providecommand\backrefprint{}" write$ newline$
"\begin{thebibliography}{" longest.label * "}" * write$
newline$
" \providecommand\backrefparscanfalse{}" write$
newline$
" \providecommand\backrefparscantrue{}" write$
newline$
" \providecommand\backrefprint{}" write$
newline$
}

FUNCTION {default.type} {
Expand All @@ -925,7 +936,8 @@ FUNCTION {default.type} {

FUNCTION {end.bib} {
newline$
"\end{thebibliography}" write$ newline$
"\end{thebibliography}" write$
newline$
}

READ
Expand Down
48 changes: 30 additions & 18 deletions elsartnum_en.bst
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,10 @@ FUNCTION {end.entry} {
'skip$
'add.period$
if$
write$ newline$
"\backrefprint\backrefparscantrue" write$ newline$
write$
newline$
"\backrefprint\backrefparscantrue" write$
newline$
}

FUNCTION {field.or.null} {
Expand Down Expand Up @@ -244,8 +246,10 @@ FUNCTION {new.sentence.checka} {

FUNCTION {output.bibitem} {
newline$
"\backrefparscanfalse" write$ newline$
"\bibitem{" write$ cite$ write$ "}" write$ newline$
"\backrefparscanfalse" write$
newline$
"\bibitem{" write$ cite$ write$ "}" write$
newline$
""
before.all 'output.state :=
}
Expand All @@ -256,18 +260,18 @@ FUNCTION {output.links} {
url empty$ {
"" *
}{
", \href{" * url * "}{\nolinkurl{\detokenize{" * url * "}}}" *
", \href{" * url * "} {\nolinkurl{\detokenize{" * url * "}}}" *
urldate empty$ {
"" *
}{
". Accessed " * urldate * "." *
} if$
} if$
}{
", \href{https://arxiv.org/abs/" * arxivId * "}{arXiv:\detokenize{" * arxivId * "}}" *
", \href{https://arxiv.org/abs/" * arxivId * "} {\nolinkurl{arXiv:\detokenize{" * arxivId * "}}}" *
} if$
}{
", \href{https://dx.doi.org/" * doi * "}{\nolinkurl{doi:\detokenize{" * doi * "}}}" *
", \href{https://dx.doi.org/" * doi * "} {\nolinkurl{doi:\detokenize{" * doi * "}}}" *
} if$
}

Expand All @@ -280,12 +284,14 @@ FUNCTION {output.nonnull} {
" " * write$
}{
output.state after.block = {
add.period$ write$ newline$
add.period$ write$
newline$
"\newblock " write$
}{
output.state before.all = 'write$ {
output.state after.quoted.block = {
write$ newline$
write$
newline$
"\newblock " write$
}{
add.period$ " " * write$
Expand Down Expand Up @@ -372,7 +378,7 @@ FUNCTION {format.article.crossref} {
"need key or journal for " cite$ * " to crossref " * crossref * warning$
""
}{
"in {" journal * "\/}" *
"in {" journal * "}" *
} if$
}{
"in " key *
Expand Down Expand Up @@ -419,7 +425,7 @@ FUNCTION {format.book.crossref} {
"need editor, key, or series for " cite$ * " to crossref " * crossref * warning$
"" *
}{
"{" * series * "\/}" *
"{" * series * "}" *
} if$
}{
key *
Expand Down Expand Up @@ -530,7 +536,7 @@ FUNCTION {format.incoll.inproc.crossref} {
"need editor, key, or booktitle for " cite$ * " to crossref " * crossref * warning$
""
}{
"in {" booktitle * "\/}" *
"in {" booktitle * "}" *
} if$
}{
"in " key *
Expand Down Expand Up @@ -911,12 +917,17 @@ FUNCTION {unpublished} {

FUNCTION {begin.bib} {
preamble$ empty$ 'skip$ {
preamble$ write$ newline$
preamble$ write$
newline$
} if$
"\begin{thebibliography}{" longest.label * "}" * write$ newline$
" \providecommand\backrefparscanfalse{}" write$ newline$
" \providecommand\backrefparscantrue{}" write$ newline$
" \providecommand\backrefprint{}" write$ newline$
"\begin{thebibliography}{" longest.label * "}" * write$
newline$
" \providecommand\backrefparscanfalse{}" write$
newline$
" \providecommand\backrefparscantrue{}" write$
newline$
" \providecommand\backrefprint{}" write$
newline$
}

FUNCTION {default.type} {
Expand All @@ -925,7 +936,8 @@ FUNCTION {default.type} {

FUNCTION {end.bib} {
newline$
"\end{thebibliography}" write$ newline$
"\end{thebibliography}" write$
newline$
}

READ
Expand Down
Loading

0 comments on commit c54a374

Please sign in to comment.