diff options
author | Karl Berry <karl@freefriends.org> | 2023-09-18 20:07:06 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2023-09-18 20:07:06 +0000 |
commit | 64fb9a735879cbc1eb894261f88232cfdfeaa59f (patch) | |
tree | ce154d481070339e6e1fea7830aebf42f2418b00 /Build/source/texk | |
parent | 33e9ca7bacfbfbe757fe7d87bc630bf7b91a065a (diff) |
ctanbib (18sep23)
git-svn-id: svn://tug.org/texlive/trunk@68315 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk')
-rwxr-xr-x | Build/source/texk/texlive/linked_scripts/ctanbib/ctanbib | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/Build/source/texk/texlive/linked_scripts/ctanbib/ctanbib b/Build/source/texk/texlive/linked_scripts/ctanbib/ctanbib index 0242c235de4..a97819ab86b 100755 --- a/Build/source/texk/texlive/linked_scripts/ctanbib/ctanbib +++ b/Build/source/texk/texlive/linked_scripts/ctanbib/ctanbib @@ -1,7 +1,7 @@ #!/usr/bin/env texlua kpse.set_program_name("luatex") -- ctanbib -- export ctan entries to bib format --- Copyright: Michal Hoftich <michal.h21@gmail.com> (2014-2021) +-- Copyright: Michal Hoftich <michal.h21@gmail.com> (2014-2023) -- -- This work may be distributed and/or modified under the -- conditions of the LaTeX Project Public License, either version 1.3 @@ -27,6 +27,7 @@ Available options: -C,--ctanpath Use package's CTAN path as URL -e,--entrytype (default manual) Change entry type -h,--help Print this message + -p,--pkgname Put the package name in a \ctanbibpkgname command -v,--version Print version info ]] local args = lapp(msg) @@ -34,7 +35,7 @@ if args.help then print(msg) os.exit(0) elseif args.version then - print "ctanbib version 0.2b" + print "ctanbib version 0.2c" os.exit(0) elseif args.ctan then pkgurl = true @@ -74,6 +75,13 @@ version = {$version}, } ]] +if args.pkgname then + titleformat = "The \\ctanbibpkgname{%s} package" + preamble = [[@preamble{ "\providecommand\ctanbibpkgname[1]{\textsl{#1}}" } +]] + bibtexformat = preamble .. bibtexformat +end + local dom = require('luaxml-domobject') local load_xml = function(url, verification) @@ -158,7 +166,8 @@ local get_title = function(record) local title = record:query_selector("name")[1] if title then title = title:get_text() - title = title:gsub("^(.)", function(a) return unicode.utf8.upper(a) end) + -- don't uppercase package name, as suggested by Karl Berry and Boris Veytsman + -- title = title:gsub("^(.)", function(a) return unicode.utf8.upper(a) end) else title = pkgname end |