diff options
author | Norbert Preining <norbert@preining.info> | 2023-08-23 03:01:02 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2023-08-23 03:01:02 +0000 |
commit | 76d75859475de5b0b64017c9dfc11644a2ece537 (patch) | |
tree | e2f334df5d811d8fe54215e0591eaf227de58fe0 /support/bibtexperllibs | |
parent | cf3e954514eb50bea0335bdc97d6b76f80f5d03e (diff) |
CTAN sync 202308230300
Diffstat (limited to 'support/bibtexperllibs')
35 files changed, 1730 insertions, 2642 deletions
diff --git a/support/bibtexperllibs/BibTeX-Parser/Changes b/support/bibtexperllibs/BibTeX-Parser/Changes index addfd59900..da5c2afb8e 100644 --- a/support/bibtexperllibs/BibTeX-Parser/Changes +++ b/support/bibtexperllibs/BibTeX-Parser/Changes @@ -1,4 +1,10 @@ -Revision history for BibTeX-Parser +Revision history for BibTeX::Parser + +1.04 2023-08-20 New release + +1.03 2022-11-06 + Avoid extra spaces with von part. (Author.pm) + Add ' to re_namechar. (Parser.pm) 1.02 2018-04-29 03:19:56 +0000 Corrected the bug when Jr is not accompanied by von. diff --git a/support/bibtexperllibs/BibTeX-Parser/LICENSE b/support/bibtexperllibs/BibTeX-Parser/LICENSE index 3f09c94f5c..1a50e57d4d 100644 --- a/support/bibtexperllibs/BibTeX-Parser/LICENSE +++ b/support/bibtexperllibs/BibTeX-Parser/LICENSE @@ -1,4 +1,4 @@ -This software is copyright (c) 2013-2016 by Gerhard Gossen and Boris Veytsman +This software is copyright (c) 2013-2022 by Gerhard Gossen and Boris Veytsman and Karl Berry This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. diff --git a/support/bibtexperllibs/BibTeX-Parser/MANIFEST b/support/bibtexperllibs/BibTeX-Parser/MANIFEST index ec2f7719ea..032eea6a15 100644 --- a/support/bibtexperllibs/BibTeX-Parser/MANIFEST +++ b/support/bibtexperllibs/BibTeX-Parser/MANIFEST @@ -1,44 +1,44 @@ -Changes LICENSE +Changes MANIFEST -META.yml -Makefile.PL -README -dist.ini -lib/BibTeX/Parser.pm -lib/BibTeX/Parser/Author.pm -lib/BibTeX/Parser/Entry.pm -notes -t/00-load.t +t/pod.t +t/cleaned_field.t +t/release-pod-coverage.t +t/bug67419.t +t/09-complex.t +t/bug66325.t +t/07-parse_englishbib.t +t/13_output.t t/01-parse.t -t/02-parse_string.t -t/03-parse_entry.t -t/04-entry.t +t/14-extratext.t t/05-author.t -t/06-parse_complex.t -t/07-parse_englishbib.t t/08-parse_large.t -t/09-complex.t -t/10-funnyname.t -t/11-split_braced.t +t/release-pod-syntax.t t/12-von_token.t -t/13_output.t -t/14-extratext.t -t/15-capitalization.t -t/bibs/01.bib -t/bibs/06.bib -t/bibs/09-complex.bib +t/00-load.t +t/11-split_braced.t +t/02-parse_string.t +t/04-entry.t +t/03-parse_entry.t +t/bibs/mathscinet.txt t/bibs/10-funnyname.bib -t/bibs/14-extratext.bib +t/bibs/english.bib t/bibs/braces.bib t/bibs/endnote.txt +t/bibs/14-extratext.bib +t/bibs/01.bib t/bibs/engineering_village.txt -t/bibs/english.bib -t/bibs/mathscinet.txt -t/bug66325.t -t/bug67419.t -t/cleaned_field.t +t/bibs/09-complex.bib +t/bibs/06.bib t/pod-coverage.t -t/pod.t -t/release-pod-coverage.t -t/release-pod-syntax.t +t/10-funnyname.t +t/15-capitalization.t +t/06-parse_complex.t +README +notes +lib/BibTeX/Parser/Author.pm +lib/BibTeX/Parser/Entry.pm +lib/BibTeX/Parser.pm +Makefile.PL +Makefile.TDS +dist.ini diff --git a/support/bibtexperllibs/BibTeX-Parser/META.yml b/support/bibtexperllibs/BibTeX-Parser/META.yml deleted file mode 100644 index ea5508c50b..0000000000 --- a/support/bibtexperllibs/BibTeX-Parser/META.yml +++ /dev/null @@ -1,23 +0,0 @@ ---- -abstract: 'A pure perl BibTeX parser' -author: - - 'Gerhard Gossen <gerhard.gossen@googlemail.com>' - - 'Boris Veytsman <borisv@lk.net>' -build_requires: - Test::More: 0.88 -configure_requires: - ExtUtils::MakeMaker: 6.30 -dynamic_config: 0 -generated_by: 'Dist::Zilla version 4.300037, CPAN::Meta::Converter version 2.120921' -license: perl -meta-spec: - url: http://module-build.sourceforge.net/META-spec-v1.4.html - version: 1.4 -name: BibTeX-Parser -requires: - File::Spec: 0 - IO::File: 0 - IO::String: 0 - LaTeX::ToUnicode: 0.02 - Test::More: 0 -version: 1.02 diff --git a/support/bibtexperllibs/BibTeX-Parser/MYMETA.json b/support/bibtexperllibs/BibTeX-Parser/MYMETA.json deleted file mode 100644 index 8034a7d557..0000000000 --- a/support/bibtexperllibs/BibTeX-Parser/MYMETA.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "abstract" : "A pure perl BibTeX parser", - "author" : [ - "Gerhard Gossen <gerhard.gossen@googlemail.com>", - "Boris Veytsman <borisv@lk.net>" - ], - "dynamic_config" : 0, - "generated_by" : "Dist::Zilla version 4.300037, CPAN::Meta::Converter version 2.120921, CPAN::Meta::Converter version 2.133380", - "license" : [ - "perl_5" - ], - "meta-spec" : { - "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", - "version" : "2" - }, - "name" : "BibTeX-Parser", - "prereqs" : { - "build" : { - "requires" : {} - }, - "configure" : { - "requires" : { - "ExtUtils::MakeMaker" : "6.30" - } - }, - "runtime" : { - "requires" : { - "File::Spec" : "0", - "IO::File" : "0", - "IO::String" : "0", - "LaTeX::ToUnicode" : "0.02", - "Test::More" : "0" - } - }, - "test" : { - "requires" : { - "Test::More" : "0.88" - } - } - }, - "release_status" : "stable", - "version" : "1.02" -} diff --git a/support/bibtexperllibs/BibTeX-Parser/MYMETA.yml b/support/bibtexperllibs/BibTeX-Parser/MYMETA.yml deleted file mode 100644 index d74d83d026..0000000000 --- a/support/bibtexperllibs/BibTeX-Parser/MYMETA.yml +++ /dev/null @@ -1,23 +0,0 @@ ---- -abstract: 'A pure perl BibTeX parser' -author: - - 'Gerhard Gossen <gerhard.gossen@googlemail.com>' - - 'Boris Veytsman <borisv@lk.net>' -build_requires: - Test::More: 0.88 -configure_requires: - ExtUtils::MakeMaker: 6.30 -dynamic_config: 0 -generated_by: 'Dist::Zilla version 4.300037, CPAN::Meta::Converter version 2.120921, CPAN::Meta::Converter version 2.133380' -license: perl -meta-spec: - url: http://module-build.sourceforge.net/META-spec-v1.4.html - version: 1.4 -name: BibTeX-Parser -requires: - File::Spec: 0 - IO::File: 0 - IO::String: 0 - LaTeX::ToUnicode: 0.02 - Test::More: 0 -version: 1.02 diff --git a/support/bibtexperllibs/BibTeX-Parser/Makefile b/support/bibtexperllibs/BibTeX-Parser/Makefile deleted file mode 100644 index 1603937555..0000000000 --- a/support/bibtexperllibs/BibTeX-Parser/Makefile +++ /dev/null @@ -1,892 +0,0 @@ -# This Makefile is for the BibTeX::Parser extension to perl. -# -# It was generated automatically by MakeMaker version -# 6.66 (Revision: 66600) from the contents of -# Makefile.PL. Don't edit this file, edit Makefile.PL instead. -# -# ANY CHANGES MADE HERE WILL BE LOST! -# -# MakeMaker ARGV: () -# - -# MakeMaker Parameters: - -# ABSTRACT => q[A pure perl BibTeX parser] -# AUTHOR => [q[Gerhard Gossen <gerhard.gossen@googlemail.com> and Boris Veytsman <boris@varphi.com>]] -# BUILD_REQUIRES => { } -# CONFIGURE_REQUIRES => { ExtUtils::MakeMaker=>q[6.30] } -# DISTNAME => q[BibTeX-Parser] -# EXE_FILES => [] -# LICENSE => q[perl] -# NAME => q[BibTeX::Parser] -# PREREQ_PM => { IO::File=>q[0], Test::More=>q[0.88], IO::String=>q[0], LaTeX::ToUnicode=>q[0.02], File::Spec=>q[0] } -# TEST_REQUIRES => { Test::More=>q[0.88] } -# VERSION => q[1.02] -# test => { TESTS=>q[t/*.t] } - -# --- MakeMaker post_initialize section: - - -# --- MakeMaker const_config section: - -# These definitions are from config.sh (via /System/Library/Perl/5.18/darwin-thread-multi-2level/Config.pm). -# They may have been overridden via Makefile.PL or on the command line. -AR = ar -CC = cc -CCCDLFLAGS = -CCDLFLAGS = -DLEXT = bundle -DLSRC = dl_dlopen.xs -EXE_EXT = -FULL_AR = /usr/bin/ar -LD = cc -mmacosx-version-min=10.12.6 -LDDLFLAGS = -arch x86_64 -arch i386 -bundle -undefined dynamic_lookup -fstack-protector -LDFLAGS = -arch x86_64 -arch i386 -fstack-protector -LIBC = -LIB_EXT = .a -OBJ_EXT = .o -OSNAME = darwin -OSVERS = 16.0 -RANLIB = /usr/bin/ar s -SITELIBEXP = /Library/Perl/5.18 -SITEARCHEXP = /Library/Perl/5.18/darwin-thread-multi-2level -SO = dylib -VENDORARCHEXP = /Network/Library/Perl/5.18/darwin-thread-multi-2level -VENDORLIBEXP = /Network/Library/Perl/5.18 - - -# --- MakeMaker constants section: -AR_STATIC_ARGS = cr -DIRFILESEP = / -DFSEP = $(DIRFILESEP) -NAME = BibTeX::Parser -NAME_SYM = BibTeX_Parser -VERSION = 1.02 -VERSION_MACRO = VERSION -VERSION_SYM = 1_02 -DEFINE_VERSION = -D$(VERSION_MACRO)=\"$(VERSION)\" -XS_VERSION = 1.02 -XS_VERSION_MACRO = XS_VERSION -XS_DEFINE_VERSION = -D$(XS_VERSION_MACRO)=\"$(XS_VERSION)\" -INST_ARCHLIB = blib/arch -INST_SCRIPT = blib/script -INST_BIN = blib/bin -INST_LIB = blib/lib -INST_MAN1DIR = blib/man1 -INST_MAN3DIR = blib/man3 -MAN1EXT = 1 -MAN3EXT = 3pm -INSTALLDIRS = site -DESTDIR = -PREFIX = $(SITEPREFIX) -PERLPREFIX = / -SITEPREFIX = /usr/local -VENDORPREFIX = /usr/local -INSTALLPRIVLIB = /Library/Perl/Updates/5.18.2 -DESTINSTALLPRIVLIB = $(DESTDIR)$(INSTALLPRIVLIB) -INSTALLSITELIB = /Library/Perl/5.18 -DESTINSTALLSITELIB = $(DESTDIR)$(INSTALLSITELIB) -INSTALLVENDORLIB = /Network/Library/Perl/5.18 -DESTINSTALLVENDORLIB = $(DESTDIR)$(INSTALLVENDORLIB) -INSTALLARCHLIB = /Library/Perl/Updates/5.18.2/darwin-thread-multi-2level -DESTINSTALLARCHLIB = $(DESTDIR)$(INSTALLARCHLIB) -INSTALLSITEARCH = /Library/Perl/5.18/darwin-thread-multi-2level -DESTINSTALLSITEARCH = $(DESTDIR)$(INSTALLSITEARCH) -INSTALLVENDORARCH = /Network/Library/Perl/5.18/darwin-thread-multi-2level -DESTINSTALLVENDORARCH = $(DESTDIR)$(INSTALLVENDORARCH) -INSTALLBIN = /usr/bin -DESTINSTALLBIN = $(DESTDIR)$(INSTALLBIN) -INSTALLSITEBIN = /usr/local/bin -DESTINSTALLSITEBIN = $(DESTDIR)$(INSTALLSITEBIN) -INSTALLVENDORBIN = /usr/local/bin -DESTINSTALLVENDORBIN = $(DESTDIR)$(INSTALLVENDORBIN) -INSTALLSCRIPT = /usr/bin -DESTINSTALLSCRIPT = $(DESTDIR)$(INSTALLSCRIPT) -INSTALLSITESCRIPT = /usr/local/bin -DESTINSTALLSITESCRIPT = $(DESTDIR)$(INSTALLSITESCRIPT) -INSTALLVENDORSCRIPT = /usr/local/bin -DESTINSTALLVENDORSCRIPT = $(DESTDIR)$(INSTALLVENDORSCRIPT) -INSTALLMAN1DIR = /usr/share/man/man1 -DESTINSTALLMAN1DIR = $(DESTDIR)$(INSTALLMAN1DIR) -INSTALLSITEMAN1DIR = /usr/local/share/man/man1 -DESTINSTALLSITEMAN1DIR = $(DESTDIR)$(INSTALLSITEMAN1DIR) -INSTALLVENDORMAN1DIR = /usr/local/share/man/man1 -DESTINSTALLVENDORMAN1DIR = $(DESTDIR)$(INSTALLVENDORMAN1DIR) -INSTALLMAN3DIR = /usr/share/man/man3 -DESTINSTALLMAN3DIR = $(DESTDIR)$(INSTALLMAN3DIR) -INSTALLSITEMAN3DIR = /usr/local/share/man/man3 -DESTINSTALLSITEMAN3DIR = $(DESTDIR)$(INSTALLSITEMAN3DIR) -INSTALLVENDORMAN3DIR = /usr/local/share/man/man3 -DESTINSTALLVENDORMAN3DIR = $(DESTDIR)$(INSTALLVENDORMAN3DIR) -PERL_LIB = /System/Library/Perl/5.18 -PERL_ARCHLIB = /System/Library/Perl/5.18/darwin-thread-multi-2level -LIBPERL_A = libperl.a -FIRST_MAKEFILE = Makefile -MAKEFILE_OLD = Makefile.old -MAKE_APERL_FILE = Makefile.aperl -PERLMAINCC = $(CC) -PERL_INC = /System/Library/Perl/5.18/darwin-thread-multi-2level/CORE -PERL = /usr/bin/perl -FULLPERL = /usr/bin/perl -ABSPERL = $(PERL) -PERLRUN = $(PERL) -FULLPERLRUN = $(FULLPERL) -ABSPERLRUN = $(ABSPERL) -PERLRUNINST = $(PERLRUN) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)" -FULLPERLRUNINST = $(FULLPERLRUN) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)" -ABSPERLRUNINST = $(ABSPERLRUN) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)" -PERL_CORE = 0 -PERM_DIR = 755 -PERM_RW = 644 -PERM_RWX = 755 - -MAKEMAKER = /System/Library/Perl/5.18/ExtUtils/MakeMaker.pm -MM_VERSION = 6.66 -MM_REVISION = 66600 - -# FULLEXT = Pathname for extension directory (eg Foo/Bar/Oracle). -# BASEEXT = Basename part of FULLEXT. May be just equal FULLEXT. (eg Oracle) -# PARENT_NAME = NAME without BASEEXT and no trailing :: (eg Foo::Bar) -# DLBASE = Basename part of dynamic library. May be just equal BASEEXT. -MAKE = make -FULLEXT = BibTeX/Parser -BASEEXT = Parser -PARENT_NAME = BibTeX -DLBASE = $(BASEEXT) -VERSION_FROM = -OBJECT = -LDFROM = $(OBJECT) -LINKTYPE = dynamic -BOOTDEP = - -# Handy lists of source code files: -XS_FILES = -C_FILES = -O_FILES = -H_FILES = -MAN1PODS = -MAN3PODS = lib/BibTeX/Parser.pm \ - lib/BibTeX/Parser/Author.pm \ - lib/BibTeX/Parser/Entry.pm - -# Where is the Config information that we are using/depend on -CONFIGDEP = $(PERL_ARCHLIB)$(DFSEP)Config.pm $(PERL_INC)$(DFSEP)config.h - -# Where to build things -INST_LIBDIR = $(INST_LIB)/BibTeX -INST_ARCHLIBDIR = $(INST_ARCHLIB)/BibTeX - -INST_AUTODIR = $(INST_LIB)/auto/$(FULLEXT) -INST_ARCHAUTODIR = $(INST_ARCHLIB)/auto/$(FULLEXT) - -INST_STATIC = -INST_DYNAMIC = -INST_BOOT = - -# Extra linker info -EXPORT_LIST = -PERL_ARCHIVE = -PERL_ARCHIVE_AFTER = - - -TO_INST_PM = lib/BibTeX/Parser.pm \ - lib/BibTeX/Parser/Author.pm \ - lib/BibTeX/Parser/Entry.pm - -PM_TO_BLIB = lib/BibTeX/Parser/Entry.pm \ - blib/lib/BibTeX/Parser/Entry.pm \ - lib/BibTeX/Parser.pm \ - blib/lib/BibTeX/Parser.pm \ - lib/BibTeX/Parser/Author.pm \ - blib/lib/BibTeX/Parser/Author.pm - - -# --- MakeMaker platform_constants section: -MM_Unix_VERSION = 6.66 -PERL_MALLOC_DEF = -DPERL_EXTMALLOC_DEF -Dmalloc=Perl_malloc -Dfree=Perl_mfree -Drealloc=Perl_realloc -Dcalloc=Perl_calloc - - -# --- MakeMaker tool_autosplit section: -# Usage: $(AUTOSPLITFILE) FileToSplit AutoDirToSplitInto -AUTOSPLITFILE = $(ABSPERLRUN) -e 'use AutoSplit; autosplit($$$$ARGV[0], $$$$ARGV[1], 0, 1, 1)' -- - - - -# --- MakeMaker tool_xsubpp section: - - -# --- MakeMaker tools_other section: -SHELL = /bin/sh -CHMOD = chmod -CP = cp -MV = mv -NOOP = $(TRUE) -NOECHO = @ -RM_F = rm -f -RM_RF = rm -rf -TEST_F = test -f -TOUCH = touch -UMASK_NULL = umask 0 -DEV_NULL = > /dev/null 2>&1 -MKPATH = $(ABSPERLRUN) -MExtUtils::Command -e 'mkpath' -- -EQUALIZE_TIMESTAMP = $(ABSPERLRUN) -MExtUtils::Command -e 'eqtime' -- -FALSE = false -TRUE = true -ECHO = echo -ECHO_N = echo -n -UNINST = 0 -VERBINST = 0 -MOD_INSTALL = $(ABSPERLRUN) -MExtUtils::Install -e 'install([ from_to => {@ARGV}, verbose => '\''$(VERBINST)'\'', uninstall_shadows => '\''$(UNINST)'\'', dir_mode => '\''$(PERM_DIR)'\'' ]);' -- -DOC_INSTALL = $(ABSPERLRUN) -MExtUtils::Command::MM -e 'perllocal_install' -- -UNINSTALL = $(ABSPERLRUN) -MExtUtils::Command::MM -e 'uninstall' -- -WARN_IF_OLD_PACKLIST = $(ABSPERLRUN) -MExtUtils::Command::MM -e 'warn_if_old_packlist' -- -MACROSTART = -MACROEND = -USEMAKEFILE = -f -FIXIN = $(ABSPERLRUN) -MExtUtils::MY -e 'MY->fixin(shift)' -- - - -# --- MakeMaker makemakerdflt section: -makemakerdflt : all - $(NOECHO) $(NOOP) - - -# --- MakeMaker dist section: -TAR = COPY_EXTENDED_ATTRIBUTES_DISABLE=1 COPYFILE_DISABLE=1 tar -TARFLAGS = cvf -ZIP = zip -ZIPFLAGS = -r -COMPRESS = gzip --best -SUFFIX = .gz -SHAR = shar -PREOP = $(NOECHO) $(NOOP) -POSTOP = $(NOECHO) $(NOOP) -TO_UNIX = $(NOECHO) $(NOOP) -CI = ci -u -RCS_LABEL = rcs -Nv$(VERSION_SYM): -q -DIST_CP = best -DIST_DEFAULT = tardist -DISTNAME = BibTeX-Parser -DISTVNAME = BibTeX-Parser-1.02 - - -# --- MakeMaker macro section: - - -# --- MakeMaker depend section: - - -# --- MakeMaker cflags section: - - -# --- MakeMaker const_loadlibs section: - - -# --- MakeMaker const_cccmd section: - - -# --- MakeMaker post_constants section: - - -# --- MakeMaker pasthru section: - -PASTHRU = LIBPERL_A="$(LIBPERL_A)"\ - LINKTYPE="$(LINKTYPE)"\ - PREFIX="$(PREFIX)" - - -# --- MakeMaker special_targets section: -.SUFFIXES : .xs .c .C .cpp .i .s .cxx .cc $(OBJ_EXT) - -.PHONY: all config static dynamic test linkext manifest blibdirs clean realclean disttest distdir - - - -# --- MakeMaker c_o section: - - -# --- MakeMaker xs_c section: - - -# --- MakeMaker xs_o section: - - -# --- MakeMaker top_targets section: -all :: pure_all manifypods - $(NOECHO) $(NOOP) - - -pure_all :: config pm_to_blib subdirs linkext - $(NOECHO) $(NOOP) - -subdirs :: $(MYEXTLIB) - $(NOECHO) $(NOOP) - -config :: $(FIRST_MAKEFILE) blibdirs - $(NOECHO) $(NOOP) - -help : - perldoc ExtUtils::MakeMaker - - -# --- MakeMaker blibdirs section: -blibdirs : $(INST_LIBDIR)$(DFSEP).exists $(INST_ARCHLIB)$(DFSEP).exists $(INST_AUTODIR)$(DFSEP).exists $(INST_ARCHAUTODIR)$(DFSEP).exists $(INST_BIN)$(DFSEP).exists $(INST_SCRIPT)$(DFSEP).exists $(INST_MAN1DIR)$(DFSEP).exists $(INST_MAN3DIR)$(DFSEP).exists - $(NOECHO) $(NOOP) - -# Backwards compat with 6.18 through 6.25 -blibdirs.ts : blibdirs - $(NOECHO) $(NOOP) - -$(INST_LIBDIR)$(DFSEP).exists :: Makefile.PL - $(NOECHO) $(MKPATH) $(INST_LIBDIR) - $(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_LIBDIR) - $(NOECHO) $(TOUCH) $(INST_LIBDIR)$(DFSEP).exists - -$(INST_ARCHLIB)$(DFSEP).exists :: Makefile.PL - $(NOECHO) $(MKPATH) $(INST_ARCHLIB) - $(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_ARCHLIB) - $(NOECHO) $(TOUCH) $(INST_ARCHLIB)$(DFSEP).exists - -$(INST_AUTODIR)$(DFSEP).exists :: Makefile.PL - $(NOECHO) $(MKPATH) $(INST_AUTODIR) - $(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_AUTODIR) - $(NOECHO) $(TOUCH) $(INST_AUTODIR)$(DFSEP).exists - -$(INST_ARCHAUTODIR)$(DFSEP).exists :: Makefile.PL - $(NOECHO) $(MKPATH) $(INST_ARCHAUTODIR) - $(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_ARCHAUTODIR) - $(NOECHO) $(TOUCH) $(INST_ARCHAUTODIR)$(DFSEP).exists - -$(INST_BIN)$(DFSEP).exists :: Makefile.PL - $(NOECHO) $(MKPATH) $(INST_BIN) - $(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_BIN) - $(NOECHO) $(TOUCH) $(INST_BIN)$(DFSEP).exists - -$(INST_SCRIPT)$(DFSEP).exists :: Makefile.PL - $(NOECHO) $(MKPATH) $(INST_SCRIPT) - $(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_SCRIPT) - $(NOECHO) $(TOUCH) $(INST_SCRIPT)$(DFSEP).exists - -$(INST_MAN1DIR)$(DFSEP).exists :: Makefile.PL - $(NOECHO) $(MKPATH) $(INST_MAN1DIR) - $(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_MAN1DIR) - $(NOECHO) $(TOUCH) $(INST_MAN1DIR)$(DFSEP).exists - -$(INST_MAN3DIR)$(DFSEP).exists :: Makefile.PL - $(NOECHO) $(MKPATH) $(INST_MAN3DIR) - $(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_MAN3DIR) - $(NOECHO) $(TOUCH) $(INST_MAN3DIR)$(DFSEP).exists - - - -# --- MakeMaker linkext section: - -linkext :: $(LINKTYPE) - $(NOECHO) $(NOOP) - - -# --- MakeMaker dlsyms section: - - -# --- MakeMaker dynamic section: - -dynamic :: $(FIRST_MAKEFILE) $(INST_DYNAMIC) $(INST_BOOT) - $(NOECHO) $(NOOP) - - -# --- MakeMaker dynamic_bs section: - -BOOTSTRAP = - - -# --- MakeMaker dynamic_lib section: - - -# --- MakeMaker static section: - -## $(INST_PM) has been moved to the all: target. -## It remains here for awhile to allow for old usage: "make static" -static :: $(FIRST_MAKEFILE) $(INST_STATIC) - $(NOECHO) $(NOOP) - - -# --- MakeMaker static_lib section: - - -# --- MakeMaker manifypods section: - -POD2MAN_EXE = $(PERLRUN) "-MExtUtils::Command::MM" -e pod2man "--" -POD2MAN = $(POD2MAN_EXE) - - -manifypods : pure_all \ - lib/BibTeX/Parser/Entry.pm \ - lib/BibTeX/Parser.pm \ - lib/BibTeX/Parser/Author.pm - $(NOECHO) $(POD2MAN) --section=3 --perm_rw=$(PERM_RW) \ - lib/BibTeX/Parser/Entry.pm $(INST_MAN3DIR)/BibTeX::Parser::Entry.$(MAN3EXT) \ - lib/BibTeX/Parser.pm $(INST_MAN3DIR)/BibTeX::Parser.$(MAN3EXT) \ - lib/BibTeX/Parser/Author.pm $(INST_MAN3DIR)/BibTeX::Parser::Author.$(MAN3EXT) - - - - -# --- MakeMaker processPL section: - - -# --- MakeMaker installbin section: - - -# --- MakeMaker subdirs section: - -# none - -# --- MakeMaker clean_subdirs section: -clean_subdirs : - $(NOECHO) $(NOOP) - - -# --- MakeMaker clean section: - -# Delete temporary files but do not touch installed files. We don't delete -# the Makefile here so a later make realclean still has a makefile to use. - -clean :: clean_subdirs - - $(RM_F) \ - core.[0-9][0-9][0-9][0-9] $(BASEEXT).exp \ - mon.out $(BOOTSTRAP) \ - *$(OBJ_EXT) pm_to_blib.ts \ - MYMETA.json lib$(BASEEXT).def \ - core.[0-9] blibdirs.ts \ - perlmain.c $(BASEEXT).def \ - so_locations core \ - perl perl.exe \ - core.[0-9][0-9][0-9][0-9][0-9] core.*perl.*.? \ - $(INST_ARCHAUTODIR)/extralibs.ld $(INST_ARCHAUTODIR)/extralibs.all \ - tmon.out $(MAKE_APERL_FILE) \ - $(BASEEXT).x *$(LIB_EXT) \ - core.[0-9][0-9] core.[0-9][0-9][0-9] \ - MYMETA.yml $(BASEEXT).bso \ - pm_to_blib *perl.core \ - perl$(EXE_EXT) - - $(RM_RF) \ - blib - - $(MV) $(FIRST_MAKEFILE) $(MAKEFILE_OLD) $(DEV_NULL) - - -# --- MakeMaker realclean_subdirs section: -realclean_subdirs : - $(NOECHO) $(NOOP) - - -# --- MakeMaker realclean section: -# Delete temporary files (via clean) and also delete dist files -realclean purge :: clean realclean_subdirs - - $(RM_F) \ - $(FIRST_MAKEFILE) $(MAKEFILE_OLD) - - $(RM_RF) \ - $(DISTVNAME) - - -# --- MakeMaker metafile section: -metafile : create_distdir - $(NOECHO) $(ECHO) Generating META.yml - $(NOECHO) $(ECHO) '---' > META_new.yml - $(NOECHO) $(ECHO) 'abstract: '\''A pure perl BibTeX parser'\''' >> META_new.yml - $(NOECHO) $(ECHO) 'author:' >> META_new.yml - $(NOECHO) $(ECHO) ' - '\''Gerhard Gossen <gerhard.gossen@googlemail.com> and Boris Veytsman <boris@varphi.com>'\''' >> META_new.yml - $(NOECHO) $(ECHO) 'build_requires:' >> META_new.yml - $(NOECHO) $(ECHO) ' Test::More: 0.88' >> META_new.yml - $(NOECHO) $(ECHO) 'configure_requires:' >> META_new.yml - $(NOECHO) $(ECHO) ' ExtUtils::MakeMaker: 6.30' >> META_new.yml - $(NOECHO) $(ECHO) 'dynamic_config: 1' >> META_new.yml - $(NOECHO) $(ECHO) 'generated_by: '\''ExtUtils::MakeMaker version 6.66, CPAN::Meta::Converter version 2.133380'\''' >> META_new.yml - $(NOECHO) $(ECHO) 'license: perl' >> META_new.yml - $(NOECHO) $(ECHO) 'meta-spec:' >> META_new.yml - $(NOECHO) $(ECHO) ' url: http://module-build.sourceforge.net/META-spec-v1.4.html' >> META_new.yml - $(NOECHO) $(ECHO) ' version: 1.4' >> META_new.yml - $(NOECHO) $(ECHO) 'name: BibTeX-Parser' >> META_new.yml - $(NOECHO) $(ECHO) 'no_index:' >> META_new.yml - $(NOECHO) $(ECHO) ' directory:' >> META_new.yml - $(NOECHO) $(ECHO) ' - t' >> META_new.yml - $(NOECHO) $(ECHO) ' - inc' >> META_new.yml - $(NOECHO) $(ECHO) 'requires:' >> META_new.yml - $(NOECHO) $(ECHO) ' File::Spec: 0' >> META_new.yml - $(NOECHO) $(ECHO) ' IO::File: 0' >> META_new.yml - $(NOECHO) $(ECHO) ' IO::String: 0' >> META_new.yml - $(NOECHO) $(ECHO) ' LaTeX::ToUnicode: 0.02' >> META_new.yml - $(NOECHO) $(ECHO) ' Test::More: 0' >> META_new.yml - $(NOECHO) $(ECHO) 'version: 1.02' >> META_new.yml - -$(NOECHO) $(MV) META_new.yml $(DISTVNAME)/META.yml - $(NOECHO) $(ECHO) Generating META.json - $(NOECHO) $(ECHO) '{' > META_new.json - $(NOECHO) $(ECHO) ' "abstract" : "A pure perl BibTeX parser",' >> META_new.json - $(NOECHO) $(ECHO) ' "author" : [' >> META_new.json - $(NOECHO) $(ECHO) ' "Gerhard Gossen <gerhard.gossen@googlemail.com> and Boris Veytsman <boris@varphi.com>"' >> META_new.json - $(NOECHO) $(ECHO) ' ],' >> META_new.json - $(NOECHO) $(ECHO) ' "dynamic_config" : 1,' >> META_new.json - $(NOECHO) $(ECHO) ' "generated_by" : "ExtUtils::MakeMaker version 6.66, CPAN::Meta::Converter version 2.133380",' >> META_new.json - $(NOECHO) $(ECHO) ' "license" : [' >> META_new.json - $(NOECHO) $(ECHO) ' "perl_5"' >> META_new.json - $(NOECHO) $(ECHO) ' ],' >> META_new.json - $(NOECHO) $(ECHO) ' "meta-spec" : {' >> META_new.json - $(NOECHO) $(ECHO) ' "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",' >> META_new.json - $(NOECHO) $(ECHO) ' "version" : "2"' >> META_new.json - $(NOECHO) $(ECHO) ' },' >> META_new.json - $(NOECHO) $(ECHO) ' "name" : "BibTeX-Parser",' >> META_new.json - $(NOECHO) $(ECHO) ' "no_index" : {' >> META_new.json - $(NOECHO) $(ECHO) ' "directory" : [' >> META_new.json - $(NOECHO) $(ECHO) ' "t",' >> META_new.json - $(NOECHO) $(ECHO) ' "inc"' >> META_new.json - $(NOECHO) $(ECHO) ' ]' >> META_new.json - $(NOECHO) $(ECHO) ' },' >> META_new.json - $(NOECHO) $(ECHO) ' "prereqs" : {' >> META_new.json - $(NOECHO) $(ECHO) ' "build" : {' >> META_new.json - $(NOECHO) $(ECHO) ' "requires" : {' >> META_new.json - $(NOECHO) $(ECHO) ' "Test::More" : "0.88"' >> META_new.json - $(NOECHO) $(ECHO) ' }' >> META_new.json - $(NOECHO) $(ECHO) ' },' >> META_new.json - $(NOECHO) $(ECHO) ' "configure" : {' >> META_new.json - $(NOECHO) $(ECHO) ' "requires" : {' >> META_new.json - $(NOECHO) $(ECHO) ' "ExtUtils::MakeMaker" : "6.30"' >> META_new.json - $(NOECHO) $(ECHO) ' }' >> META_new.json - $(NOECHO) $(ECHO) ' },' >> META_new.json - $(NOECHO) $(ECHO) ' "runtime" : {' >> META_new.json - $(NOECHO) $(ECHO) ' "requires" : {' >> META_new.json - $(NOECHO) $(ECHO) ' "File::Spec" : "0",' >> META_new.json - $(NOECHO) $(ECHO) ' "IO::File" : "0",' >> META_new.json - $(NOECHO) $(ECHO) ' "IO::String" : "0",' >> META_new.json - $(NOECHO) $(ECHO) ' "LaTeX::ToUnicode" : "0.02",' >> META_new.json - $(NOECHO) $(ECHO) ' "Test::More" : "0"' >> META_new.json - $(NOECHO) $(ECHO) ' }' >> META_new.json - $(NOECHO) $(ECHO) ' }' >> META_new.json - $(NOECHO) $(ECHO) ' },' >> META_new.json - $(NOECHO) $(ECHO) ' "release_status" : "stable",' >> META_new.json - $(NOECHO) $(ECHO) ' "version" : "1.02"' >> META_new.json - $(NOECHO) $(ECHO) '}' >> META_new.json - -$(NOECHO) $(MV) META_new.json $(DISTVNAME)/META.json - - -# --- MakeMaker signature section: -signature : - cpansign -s - - -# --- MakeMaker dist_basics section: -distclean :: realclean distcheck - $(NOECHO) $(NOOP) - -distcheck : - $(PERLRUN) "-MExtUtils::Manifest=fullcheck" -e fullcheck - -skipcheck : - $(PERLRUN) "-MExtUtils::Manifest=skipcheck" -e skipcheck - -manifest : - $(PERLRUN) "-MExtUtils::Manifest=mkmanifest" -e mkmanifest - -veryclean : realclean - $(RM_F) *~ */*~ *.orig */*.orig *.bak */*.bak *.old */*.old - - - -# --- MakeMaker dist_core section: - -dist : $(DIST_DEFAULT) $(FIRST_MAKEFILE) - $(NOECHO) $(ABSPERLRUN) -l -e 'print '\''Warning: Makefile possibly out of date with $(VERSION_FROM)'\''' \ - -e ' if -e '\''$(VERSION_FROM)'\'' and -M '\''$(VERSION_FROM)'\'' < -M '\''$(FIRST_MAKEFILE)'\'';' -- - -tardist : $(DISTVNAME).tar$(SUFFIX) - $(NOECHO) $(NOOP) - -uutardist : $(DISTVNAME).tar$(SUFFIX) - uuencode $(DISTVNAME).tar$(SUFFIX) $(DISTVNAME).tar$(SUFFIX) > $(DISTVNAME).tar$(SUFFIX)_uu - -$(DISTVNAME).tar$(SUFFIX) : distdir - $(PREOP) - $(TO_UNIX) - $(TAR) $(TARFLAGS) $(DISTVNAME).tar $(DISTVNAME) - $(RM_RF) $(DISTVNAME) - $(COMPRESS) $(DISTVNAME).tar - $(POSTOP) - -zipdist : $(DISTVNAME).zip - $(NOECHO) $(NOOP) - -$(DISTVNAME).zip : distdir - $(PREOP) - $(ZIP) $(ZIPFLAGS) $(DISTVNAME).zip $(DISTVNAME) - $(RM_RF) $(DISTVNAME) - $(POSTOP) - -shdist : distdir - $(PREOP) - $(SHAR) $(DISTVNAME) > $(DISTVNAME).shar - $(RM_RF) $(DISTVNAME) - $(POSTOP) - - -# --- MakeMaker distdir section: -create_distdir : - $(RM_RF) $(DISTVNAME) - $(PERLRUN) "-MExtUtils::Manifest=manicopy,maniread" \ - -e "manicopy(maniread(),'$(DISTVNAME)', '$(DIST_CP)');" - -distdir : create_distdir distmeta - $(NOECHO) $(NOOP) - - - -# --- MakeMaker dist_test section: -disttest : distdir - cd $(DISTVNAME) && $(ABSPERLRUN) Makefile.PL - cd $(DISTVNAME) && $(MAKE) $(PASTHRU) - cd $(DISTVNAME) && $(MAKE) test $(PASTHRU) - - - -# --- MakeMaker dist_ci section: - -ci : - $(PERLRUN) "-MExtUtils::Manifest=maniread" \ - -e "@all = keys %{ maniread() };" \ - -e "print(qq{Executing $(CI) @all\n}); system(qq{$(CI) @all});" \ - -e "print(qq{Executing $(RCS_LABEL) ...\n}); system(qq{$(RCS_LABEL) @all});" - - -# --- MakeMaker distmeta section: -distmeta : create_distdir metafile - $(NOECHO) cd $(DISTVNAME) && $(ABSPERLRUN) -MExtUtils::Manifest=maniadd -e 'exit unless -e q{META.yml};' \ - -e 'eval { maniadd({q{META.yml} => q{Module YAML meta-data (added by MakeMaker)}}) }' \ - -e ' or print "Could not add META.yml to MANIFEST: $$$${'\''@'\''}\n"' -- - $(NOECHO) cd $(DISTVNAME) && $(ABSPERLRUN) -MExtUtils::Manifest=maniadd -e 'exit unless -f q{META.json};' \ - -e 'eval { maniadd({q{META.json} => q{Module JSON meta-data (added by MakeMaker)}}) }' \ - -e ' or print "Could not add META.json to MANIFEST: $$$${'\''@'\''}\n"' -- - - - -# --- MakeMaker distsignature section: -distsignature : create_distdir - $(NOECHO) cd $(DISTVNAME) && $(ABSPERLRUN) -MExtUtils::Manifest=maniadd -e 'eval { maniadd({q{SIGNATURE} => q{Public-key signature (added by MakeMaker)}}) } ' \ - -e ' or print "Could not add SIGNATURE to MANIFEST: $$$${'\''@'\''}\n"' -- - $(NOECHO) cd $(DISTVNAME) && $(TOUCH) SIGNATURE - cd $(DISTVNAME) && cpansign -s - - - -# --- MakeMaker install section: - -install :: pure_install doc_install - $(NOECHO) $(NOOP) - -install_perl :: pure_perl_install doc_perl_install - $(NOECHO) $(NOOP) - -install_site :: pure_site_install doc_site_install - $(NOECHO) $(NOOP) - -install_vendor :: pure_vendor_install doc_vendor_install - $(NOECHO) $(NOOP) - -pure_install :: pure_$(INSTALLDIRS)_install - $(NOECHO) $(NOOP) - -doc_install :: doc_$(INSTALLDIRS)_install - $(NOECHO) $(NOOP) - -pure__install : pure_site_install - $(NOECHO) $(ECHO) INSTALLDIRS not defined, defaulting to INSTALLDIRS=site - -doc__install : doc_site_install - $(NOECHO) $(ECHO) INSTALLDIRS not defined, defaulting to INSTALLDIRS=site - -pure_perl_install :: all - $(NOECHO) $(MOD_INSTALL) \ - read $(PERL_ARCHLIB)/auto/$(FULLEXT)/.packlist \ - write $(DESTINSTALLARCHLIB)/auto/$(FULLEXT)/.packlist \ - $(INST_LIB) $(DESTINSTALLPRIVLIB) \ - $(INST_ARCHLIB) $(DESTINSTALLARCHLIB) \ - $(INST_BIN) $(DESTINSTALLBIN) \ - $(INST_SCRIPT) $(DESTINSTALLSCRIPT) \ - $(INST_MAN1DIR) $(DESTINSTALLMAN1DIR) \ - $(INST_MAN3DIR) $(DESTINSTALLMAN3DIR) - $(NOECHO) $(WARN_IF_OLD_PACKLIST) \ - $(SITEARCHEXP)/auto/$(FULLEXT) - - -pure_site_install :: all - $(NOECHO) $(MOD_INSTALL) \ - read $(SITEARCHEXP)/auto/$(FULLEXT)/.packlist \ - write $(DESTINSTALLSITEARCH)/auto/$(FULLEXT)/.packlist \ - $(INST_LIB) $(DESTINSTALLSITELIB) \ - $(INST_ARCHLIB) $(DESTINSTALLSITEARCH) \ - $(INST_BIN) $(DESTINSTALLSITEBIN) \ - $(INST_SCRIPT) $(DESTINSTALLSITESCRIPT) \ - $(INST_MAN1DIR) $(DESTINSTALLSITEMAN1DIR) \ - $(INST_MAN3DIR) $(DESTINSTALLSITEMAN3DIR) - $(NOECHO) $(WARN_IF_OLD_PACKLIST) \ - $(PERL_ARCHLIB)/auto/$(FULLEXT) - -pure_vendor_install :: all - $(NOECHO) $(MOD_INSTALL) \ - read $(VENDORARCHEXP)/auto/$(FULLEXT)/.packlist \ - write $(DESTINSTALLVENDORARCH)/auto/$(FULLEXT)/.packlist \ - $(INST_LIB) $(DESTINSTALLVENDORLIB) \ - $(INST_ARCHLIB) $(DESTINSTALLVENDORARCH) \ - $(INST_BIN) $(DESTINSTALLVENDORBIN) \ - $(INST_SCRIPT) $(DESTINSTALLVENDORSCRIPT) \ - $(INST_MAN1DIR) $(DESTINSTALLVENDORMAN1DIR) \ - $(INST_MAN3DIR) $(DESTINSTALLVENDORMAN3DIR) - -doc_perl_install :: all - $(NOECHO) $(ECHO) Appending installation info to $(DESTINSTALLARCHLIB)/perllocal.pod - -$(NOECHO) $(MKPATH) $(DESTINSTALLARCHLIB) - -$(NOECHO) $(DOC_INSTALL) \ - "Module" "$(NAME)" \ - "installed into" "$(INSTALLPRIVLIB)" \ - LINKTYPE "$(LINKTYPE)" \ - VERSION "$(VERSION)" \ - EXE_FILES "$(EXE_FILES)" \ - >> $(DESTINSTALLARCHLIB)/perllocal.pod - -doc_site_install :: all - $(NOECHO) $(ECHO) Appending installation info to $(DESTINSTALLARCHLIB)/perllocal.pod - -$(NOECHO) $(MKPATH) $(DESTINSTALLARCHLIB) - -$(NOECHO) $(DOC_INSTALL) \ - "Module" "$(NAME)" \ - "installed into" "$(INSTALLSITELIB)" \ - LINKTYPE "$(LINKTYPE)" \ - VERSION "$(VERSION)" \ - EXE_FILES "$(EXE_FILES)" \ - >> $(DESTINSTALLARCHLIB)/perllocal.pod - -doc_vendor_install :: all - $(NOECHO) $(ECHO) Appending installation info to $(DESTINSTALLARCHLIB)/perllocal.pod - -$(NOECHO) $(MKPATH) $(DESTINSTALLARCHLIB) - -$(NOECHO) $(DOC_INSTALL) \ - "Module" "$(NAME)" \ - "installed into" "$(INSTALLVENDORLIB)" \ - LINKTYPE "$(LINKTYPE)" \ - VERSION "$(VERSION)" \ - EXE_FILES "$(EXE_FILES)" \ - >> $(DESTINSTALLARCHLIB)/perllocal.pod - - -uninstall :: uninstall_from_$(INSTALLDIRS)dirs - $(NOECHO) $(NOOP) - -uninstall_from_perldirs :: - $(NOECHO) $(UNINSTALL) $(PERL_ARCHLIB)/auto/$(FULLEXT)/.packlist - -uninstall_from_sitedirs :: - $(NOECHO) $(UNINSTALL) $(SITEARCHEXP)/auto/$(FULLEXT)/.packlist - -uninstall_from_vendordirs :: - $(NOECHO) $(UNINSTALL) $(VENDORARCHEXP)/auto/$(FULLEXT)/.packlist - - -# --- MakeMaker force section: -# Phony target to force checking subdirectories. -FORCE : - $(NOECHO) $(NOOP) - - -# --- MakeMaker perldepend section: - - -# --- MakeMaker makefile section: -# We take a very conservative approach here, but it's worth it. -# We move Makefile to Makefile.old here to avoid gnu make looping. -$(FIRST_MAKEFILE) : Makefile.PL $(CONFIGDEP) - $(NOECHO) $(ECHO) "Makefile out-of-date with respect to $?" - $(NOECHO) $(ECHO) "Cleaning current config before rebuilding Makefile..." - -$(NOECHO) $(RM_F) $(MAKEFILE_OLD) - -$(NOECHO) $(MV) $(FIRST_MAKEFILE) $(MAKEFILE_OLD) - - $(MAKE) $(USEMAKEFILE) $(MAKEFILE_OLD) clean $(DEV_NULL) - $(PERLRUN) Makefile.PL - $(NOECHO) $(ECHO) "==> Your Makefile has been rebuilt. <==" - $(NOECHO) $(ECHO) "==> Please rerun the $(MAKE) command. <==" - $(FALSE) - - - -# --- MakeMaker staticmake section: - -# --- MakeMaker makeaperl section --- -MAP_TARGET = perl -FULLPERL = /usr/bin/perl - -$(MAP_TARGET) :: static $(MAKE_APERL_FILE) - $(MAKE) $(USEMAKEFILE) $(MAKE_APERL_FILE) $@ - -$(MAKE_APERL_FILE) : $(FIRST_MAKEFILE) pm_to_blib - $(NOECHO) $(ECHO) Writing \"$(MAKE_APERL_FILE)\" for this $(MAP_TARGET) - $(NOECHO) $(PERLRUNINST) \ - Makefile.PL DIR= \ - MAKEFILE=$(MAKE_APERL_FILE) LINKTYPE=static \ - MAKEAPERL=1 NORECURS=1 CCCDLFLAGS= - - -# --- MakeMaker test section: - -TEST_VERBOSE=0 -TEST_TYPE=test_$(LINKTYPE) -TEST_FILE = test.pl -TEST_FILES = t/*.t -TESTDB_SW = -d - -testdb :: testdb_$(LINKTYPE) - -test :: $(TEST_TYPE) subdirs-test - -subdirs-test :: - $(NOECHO) $(NOOP) - - -test_dynamic :: pure_all - PERL_DL_NONLAZY=1 $(FULLPERLRUN) "-MExtUtils::Command::MM" "-e" "test_harness($(TEST_VERBOSE), '$(INST_LIB)', '$(INST_ARCHLIB)')" $(TEST_FILES) - -testdb_dynamic :: pure_all - PERL_DL_NONLAZY=1 $(FULLPERLRUN) $(TESTDB_SW) "-I$(INST_LIB)" "-I$(INST_ARCHLIB)" $(TEST_FILE) - -test_ : test_dynamic - -test_static :: test_dynamic -testdb_static :: testdb_dynamic - - -# --- MakeMaker ppd section: -# Creates a PPD (Perl Package Description) for a binary distribution. -ppd : - $(NOECHO) $(ECHO) '<SOFTPKG NAME="$(DISTNAME)" VERSION="$(VERSION)">' > $(DISTNAME).ppd - $(NOECHO) $(ECHO) ' <ABSTRACT>A pure perl BibTeX parser</ABSTRACT>' >> $(DISTNAME).ppd - $(NOECHO) $(ECHO) ' <AUTHOR>Gerhard Gossen <gerhard.gossen@googlemail.com> and Boris Veytsman <boris@varphi.com></AUTHOR>' >> $(DISTNAME).ppd - $(NOECHO) $(ECHO) ' <IMPLEMENTATION>' >> $(DISTNAME).ppd - $(NOECHO) $(ECHO) ' <REQUIRE NAME="File::Spec" />' >> $(DISTNAME).ppd - $(NOECHO) $(ECHO) ' <REQUIRE NAME="IO::File" />' >> $(DISTNAME).ppd - $(NOECHO) $(ECHO) ' <REQUIRE NAME="IO::String" />' >> $(DISTNAME).ppd - $(NOECHO) $(ECHO) ' <REQUIRE NAME="LaTeX::ToUnicode" VERSION="0.02" />' >> $(DISTNAME).ppd - $(NOECHO) $(ECHO) ' <REQUIRE NAME="Test::More" />' >> $(DISTNAME).ppd - $(NOECHO) $(ECHO) ' <ARCHITECTURE NAME="darwin-thread-multi-2level-5.18" />' >> $(DISTNAME).ppd - $(NOECHO) $(ECHO) ' <CODEBASE HREF="" />' >> $(DISTNAME).ppd - $(NOECHO) $(ECHO) ' </IMPLEMENTATION>' >> $(DISTNAME).ppd - $(NOECHO) $(ECHO) '</SOFTPKG>' >> $(DISTNAME).ppd - - -# --- MakeMaker pm_to_blib section: - -pm_to_blib : $(FIRST_MAKEFILE) $(TO_INST_PM) - $(NOECHO) $(ABSPERLRUN) -MExtUtils::Install -e 'pm_to_blib({@ARGV}, '\''$(INST_LIB)/auto'\'', q[$(PM_FILTER)], '\''$(PERM_DIR)'\'')' -- \ - lib/BibTeX/Parser/Entry.pm blib/lib/BibTeX/Parser/Entry.pm \ - lib/BibTeX/Parser.pm blib/lib/BibTeX/Parser.pm \ - lib/BibTeX/Parser/Author.pm blib/lib/BibTeX/Parser/Author.pm - $(NOECHO) $(TOUCH) pm_to_blib - - -# --- MakeMaker selfdocument section: - - -# --- MakeMaker postamble section: - - -# End. diff --git a/support/bibtexperllibs/BibTeX-Parser/Makefile.PL b/support/bibtexperllibs/BibTeX-Parser/Makefile.PL index 1deb311e4b..e095f253b0 100644 --- a/support/bibtexperllibs/BibTeX-Parser/Makefile.PL +++ b/support/bibtexperllibs/BibTeX-Parser/Makefile.PL @@ -10,10 +10,10 @@ use ExtUtils::MakeMaker 6.30; my %WriteMakefileArgs = ( "ABSTRACT" => "A pure perl BibTeX parser", - "AUTHOR" => "Gerhard Gossen <gerhard.gossen\@googlemail.com> and Boris Veytsman <boris\@varphi.com>", + "AUTHOR" => 'Gerhard Gossen <gerhard.gossen@googlemail.com> and Boris Veytsman <boris@varphi.com> and Karl Berry <karl@freefriends.org', "BUILD_REQUIRES" => {}, "CONFIGURE_REQUIRES" => { - "ExtUtils::MakeMaker" => "6.30" + "ExtUtils::MakeMaker" => "6.31" }, "DISTNAME" => "BibTeX-Parser", "EXE_FILES" => [], @@ -23,13 +23,13 @@ my %WriteMakefileArgs = ( "File::Spec" => 0, "IO::File" => 0, "IO::String" => 0, - "LaTeX::ToUnicode" => "0.02", - "Test::More" => 0 + "LaTeX::ToUnicode" => "0.52", + "Test::More" => "0.88" }, "TEST_REQUIRES" => { "Test::More" => "0.88" }, - "VERSION" => "1.02", + 'VERSION_FROM' => 'lib/BibTeX/Parser.pm', "test" => { "TESTS" => "t/*.t" } diff --git a/support/bibtexperllibs/BibTeX-Parser/Makefile.TDS b/support/bibtexperllibs/BibTeX-Parser/Makefile.TDS new file mode 100644 index 0000000000..4bda690035 --- /dev/null +++ b/support/bibtexperllibs/BibTeX-Parser/Makefile.TDS @@ -0,0 +1,33 @@ +# This is Makefile for TDS-compliant TeX distributions +# Written by Boris Veytsman, boris@varphi.com +# +# This file is in public domain +# +PREFIX = /usr/local + +LIBDIR = $(PREFIX)/scripts/bibtexperllibs + +DOCDIR = $(PREFIX)/doc/bibtex/bibtexperllibs + +all: + +install: + mkdir -p $(LIBDIR) + cp -r lib/* $(LIBDIR) + mkdir -p $(DOCDIR) + cp -r man/man3/* $(DOCDIR) + +check test: Makefile +# need bash pipefail so exit status is from the make, not the tr. +# the -f Makefile is because of possible GNUmakefile -> Makefile.TDS symlink. + bash -c "set -o pipefail; \ + env PERL5LIB=../LaTeX-ToUnicode/lib \ + make -f Makefile test | tr '\r' '\n'" + +Makefile MYMETA.json MYMeta.yml: Makefile.PL force + perl Makefile.PL || rm -f $@ + +clean distclean: + rm -rf Makefile MYMETA.* blib pm_to_blib + +force: diff --git a/support/bibtexperllibs/BibTeX-Parser/README b/support/bibtexperllibs/BibTeX-Parser/README index bbaac1e9db..cb6f19b576 100644 --- a/support/bibtexperllibs/BibTeX-Parser/README +++ b/support/bibtexperllibs/BibTeX-Parser/README @@ -1,9 +1,8 @@ -This archive contains the distribution BibTeX-Parser, -version 1.02: +This is the BibTeX::Parser Perl package: - A pure perl BibTeX parser + A pure Perl BibTeX parser -This software is copyright (c) 2013--2017 by Gerhard Gossen and Boris Veytsman +Copyright 2013--2023 Gerhard Gossen, Boris Veytsman, Karl Berry This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. diff --git a/support/bibtexperllibs/BibTeX-Parser/dist.ini b/support/bibtexperllibs/BibTeX-Parser/dist.ini index b615101f91..bc60ca9352 100644 --- a/support/bibtexperllibs/BibTeX-Parser/dist.ini +++ b/support/bibtexperllibs/BibTeX-Parser/dist.ini @@ -1,8 +1,8 @@ name = BibTeX-Parser -version = 1.02 -author = Gerhard Gossen <gerhard.gossen@googlemail.com> and Boris Veytsman <boris@varphi.com> +version = 1.04 +author = Gerhard Gossen <gerhard.gossen@googlemail.com> and Boris Veytsman <boris@varphi.com> and Karl Berry <karl@freefriends.org> license = Perl_5 -copyright_holder = Gerhard Gossen and Boris Veytsman +copyright_holder = Gerhard Gossen and Boris Veytsman and Karl Berry [@Classic] @@ -16,7 +16,7 @@ Test::More = 0 IO::String = 0 IO::File = 0 File::Spec = 0 -LaTeX::ToUnicode = 0.02 +LaTeX::ToUnicode = 0.11 [Prereqs / TestRequires] Test::More = 0.88 ; for done_testing diff --git a/support/bibtexperllibs/BibTeX-Parser/lib/BibTeX/Parser.pm b/support/bibtexperllibs/BibTeX-Parser/lib/BibTeX/Parser.pm index 2eac696a04..2897d8495d 100644 --- a/support/bibtexperllibs/BibTeX-Parser/lib/BibTeX/Parser.pm +++ b/support/bibtexperllibs/BibTeX-Parser/lib/BibTeX/Parser.pm @@ -1,6 +1,6 @@ package BibTeX::Parser; { - $BibTeX::Parser::VERSION = '1.02'; + $BibTeX::Parser::VERSION = '1.04'; } # ABSTRACT: A pure perl BibTeX parser use warnings; @@ -9,7 +9,7 @@ use strict; use BibTeX::Parser::Entry; -my $re_namechar = qr/[a-zA-Z0-9\!\$\&\*\+\-\.\/\:\;\<\>\?\[\]\^\_\`\|]/o; +my $re_namechar = qr/[a-zA-Z0-9\!\$\&\*\+\-\.\/\:\;\<\>\?\[\]\^\_\`\|\']/o; my $re_name = qr/$re_namechar+/o; @@ -50,6 +50,7 @@ sub _parse_next { until (/@/m) { my $line = $self->{fh}->getline; return 0 unless defined $line; + $line =~ s/^%.*$//; $_ .= $line; } @@ -345,17 +346,18 @@ L<BibTeX::Parser::Author> =head1 VERSION -version 1.02 +version 1.04 =head1 AUTHOR Gerhard Gossen <gerhard.gossen@googlemail.com> and -Boris Veytsman <boris@varphi.com> +Boris Veytsman <boris@varphi.com> and +Karl Berry <karl@freefriends.org> =head1 COPYRIGHT AND LICENSE -This software is copyright (c) 2013-2016 by Gerhard Gossen and Boris Veytsman +This software is copyright (c) 2013-2023 by Gerhard Gossen and Boris Veytsman and Karl Berry. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. diff --git a/support/bibtexperllibs/BibTeX-Parser/lib/BibTeX/Parser/Author.pm b/support/bibtexperllibs/BibTeX-Parser/lib/BibTeX/Parser/Author.pm index 7d5274d1d7..a35e2073a6 100644 --- a/support/bibtexperllibs/BibTeX-Parser/lib/BibTeX/Parser/Author.pm +++ b/support/bibtexperllibs/BibTeX-Parser/lib/BibTeX/Parser/Author.pm @@ -1,6 +1,6 @@ package BibTeX::Parser::Author; { - $BibTeX::Parser::Author::VERSION = '1.02'; + $BibTeX::Parser::Author::VERSION = '1.04'; } use warnings; @@ -258,15 +258,31 @@ sub _get_single_author_from_tokens { - +# The goal is to return a name in form +# von Last, Jr, First +# where any of the parts except Last may be empty. +# sub to_string { my $self = shift; - if ($self->jr) { - return ($self->von ? $self->von . " " : '') . " " . $self->last . ", " . $self->jr . ", " . $self->first; - } else { - return ($self->von ? $self->von . " " : '') . $self->last . ($self->first ? ", " . $self->first : ''); - } + my $last = $self->last; # assume always present + my $first = $self->first ? (", " . $self->first) : ''; # ", first" + my $von = $self->von ? ($self->von . " ") : ''; # "von " + my $jr = $self->jr ? (", " . $self->jr ) : ''; # ", jr" + # + my $ret = "${von}${last}${jr}${first}"; + #warn "returning name: $ret\n"; + return $ret; + +# original code, which introduced a spurious space with a von part. +# https://github.com/borisveytsman/crossrefware/issues/11 +# +# if ($self->jr) { +# return () . " " . $self->last . ", " . $self->jr . ", " . $self->first; +# } else { +# return ($self->von ? $self->von . " " : '') . $self->last . ($self->first ? ", " . $self->first : ''); +# } +# } @@ -393,17 +409,18 @@ the following token is not: C<{von}> =head1 VERSION -version 1.02 +version 1.04 =head1 AUTHOR Gerhard Gossen <gerhard.gossen@googlemail.com> and -Boris Veytsman <boris@varphi.com> +Boris Veytsman <boris@varphi.com> and +Karl Berry <karl@freefriends.org> =head1 COPYRIGHT AND LICENSE -This software is copyright (c) 2013--2016 by Gerhard Gossen and Boris Veytsman. +This software is copyright (c) 2013--2023 by Gerhard Gossen and Boris Veytsman and Karl Berry. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. diff --git a/support/bibtexperllibs/BibTeX-Parser/lib/BibTeX/Parser/Entry.pm b/support/bibtexperllibs/BibTeX-Parser/lib/BibTeX/Parser/Entry.pm index 7f5c721e34..d0bc9cc80b 100644 --- a/support/bibtexperllibs/BibTeX-Parser/lib/BibTeX/Parser/Entry.pm +++ b/support/bibtexperllibs/BibTeX-Parser/lib/BibTeX/Parser/Entry.pm @@ -1,6 +1,6 @@ package BibTeX::Parser::Entry; { - $BibTeX::Parser::Entry::VERSION = '1.02'; + $BibTeX::Parser::Entry::VERSION = '1.04'; } use warnings; @@ -416,16 +416,17 @@ Can take values 'Uppercase' (the default), 'Lowercase' or 'Titlecase' =head1 VERSION -version 1.02 +version 1.04 =head1 AUTHOR Gerhard Gossen <gerhard.gossen@googlemail.com> and -Boris Veytsman <boris@varphi.com> +Boris Veytsman <boris@varphi.com> and +Karl Berry <karl@freefriends.org> =head1 COPYRIGHT AND LICENSE -This software is copyright (c) 2013-2016 by Gerhard Gossen and Boris Veytsman +This software is copyright (c) 2013-2023 by Gerhard Gossen and Boris Veytsman and Karl Berry This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. diff --git a/support/bibtexperllibs/BibTeX-Parser/t/bibs/endnote.txt b/support/bibtexperllibs/BibTeX-Parser/t/bibs/endnote.txt index b74621354e..e75f1d2050 100644 --- a/support/bibtexperllibs/BibTeX-Parser/t/bibs/endnote.txt +++ b/support/bibtexperllibs/BibTeX-Parser/t/bibs/endnote.txt @@ -1,6 +1,6 @@ -@article{
- volume = {59},
- number = {6},
- year = {1999}
-}
-
+@article{ + volume = {59}, + number = {6}, + year = {1999} +} + diff --git a/support/bibtexperllibs/BibTeX-Parser/t/bibs/engineering_village.txt b/support/bibtexperllibs/BibTeX-Parser/t/bibs/engineering_village.txt index 09763e928c..256f5a853d 100644 --- a/support/bibtexperllibs/BibTeX-Parser/t/bibs/engineering_village.txt +++ b/support/bibtexperllibs/BibTeX-Parser/t/bibs/engineering_village.txt @@ -1,24 +1,24 @@ -@inproceedings{1997493856789 ,
-language = {English},
-year = {1997},
-}
-
-
-@inproceedings{1998043944915 ,
-language = {English},
-year = {1997},
-}
-
-
-@article{2003137419501 ,
-language = {English},
-year = {2002},
-}
-
-
-@inproceedings{2002367072517 ,
-language = {English},
-year = {2002},
-}
-
-
+@inproceedings{1997493856789 , +language = {English}, +year = {1997}, +} + + +@inproceedings{1998043944915 , +language = {English}, +year = {1997}, +} + + +@article{2003137419501 , +language = {English}, +year = {2002}, +} + + +@inproceedings{2002367072517 , +language = {English}, +year = {2002}, +} + + diff --git a/support/bibtexperllibs/BibTeX-Parser/t/bibs/mathscinet.txt b/support/bibtexperllibs/BibTeX-Parser/t/bibs/mathscinet.txt index acf4457b95..eea5a05a70 100644 --- a/support/bibtexperllibs/BibTeX-Parser/t/bibs/mathscinet.txt +++ b/support/bibtexperllibs/BibTeX-Parser/t/bibs/mathscinet.txt @@ -1,40 +1,40 @@ -MathSciNet </mathscinet/index.html>
-
- *
- Clipboard </mathscinet/clipboard.html>
- * Home </mathscinet/index.html>
- * Preferences </mathscinet/preferences.html>
- * Help </mathscinet/help/headline_review_help_full.html>
- * Support Mail </mathscinet/support_mail.html>
- * Terms of Use </mathscinet/help/mathscinet_terms_of_use.html>
- * University of Southampton
-
-@article {MR2254280,
- VOLUME = {23},
- YEAR = {2006},
-}
-
-
-@article {MR2254274,
- VOLUME = {23},
- YEAR = {2006},
-}
-
-
-@article {MR2248052,
- VOLUME = {23},
- YEAR = {2006},
-}
-
-
-*Matches:* 3
-Mirror Sites
-
-
-© Copyright 2011, American Mathematical Society
-<http://www.ams.org/ams/copyright.html>
-Privacy Statement <http://www.ams.org/ams/privacy.html>
-American Mathematical Society <http://www.ams.org>
-American Mathematical Society
-201 Charles Street
-Providence, RI 02904-2294
+MathSciNet </mathscinet/index.html> + + * + Clipboard </mathscinet/clipboard.html> + * Home </mathscinet/index.html> + * Preferences </mathscinet/preferences.html> + * Help </mathscinet/help/headline_review_help_full.html> + * Support Mail </mathscinet/support_mail.html> + * Terms of Use </mathscinet/help/mathscinet_terms_of_use.html> + * University of Southampton + +@article {MR2254280, + VOLUME = {23}, + YEAR = {2006}, +} + + +@article {MR2254274, + VOLUME = {23}, + YEAR = {2006}, +} + + +@article {MR2248052, + VOLUME = {23}, + YEAR = {2006}, +} + + +*Matches:* 3 +Mirror Sites + + +© Copyright 2011, American Mathematical Society +<http://www.ams.org/ams/copyright.html> +Privacy Statement <http://www.ams.org/ams/privacy.html> +American Mathematical Society <http://www.ams.org> +American Mathematical Society +201 Charles Street +Providence, RI 02904-2294 diff --git a/support/bibtexperllibs/BibTeX-Parser/t/cleaned_field.t b/support/bibtexperllibs/BibTeX-Parser/t/cleaned_field.t index 33a38784cd..980fb1d60d 100644 --- a/support/bibtexperllibs/BibTeX-Parser/t/cleaned_field.t +++ b/support/bibtexperllibs/BibTeX-Parser/t/cleaned_field.t @@ -53,6 +53,7 @@ sub new_entry { done_testing; __DATA__ +\# # \& & {\`a} à {\^a} â @@ -118,7 +119,7 @@ __DATA__ {\sl L'Informatique Nouvelle} L’Informatique Nouvelle {\small and} and {\ss} ß -{\TeX} TEX +{\TeX} TeX {\TM} ™ {\tt awk} awk {\^u} û diff --git a/support/bibtexperllibs/LaTeX-ToUnicode/Changes b/support/bibtexperllibs/LaTeX-ToUnicode/Changes index 4c75337353..0f74583693 100644 --- a/support/bibtexperllibs/LaTeX-ToUnicode/Changes +++ b/support/bibtexperllibs/LaTeX-ToUnicode/Changes @@ -1,5 +1,11 @@ Changes for LaTeX::ToUnicode +0.53 2023-08-20 Tests fixed, new release + +0.52 2022-11-07 Support many more control sequences, \kern removal, + \<newline>, etc. Add ltxunitxt script to access functionality + from command line. + 0.11 2020-12-12 Updates and cleaing 0.05 2016-11-23 02:28:35+00:00 diff --git a/support/bibtexperllibs/LaTeX-ToUnicode/LICENSE b/support/bibtexperllibs/LaTeX-ToUnicode/LICENSE index 2bf757fccf..9b0800f949 100644 --- a/support/bibtexperllibs/LaTeX-ToUnicode/LICENSE +++ b/support/bibtexperllibs/LaTeX-ToUnicode/LICENSE @@ -1,4 +1,4 @@ -This software is copyright (c) 2010-2016 by Gerhard Gossen and Boris Veytsman +Copyright 2010-2021 Gerhard Gossen, Boris Veytsman, Karl Berry This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. @@ -12,8 +12,6 @@ b) the "Artistic License" --- The GNU General Public License, Version 1, February 1989 --- -This software is copyright (c) 2010-2016 by Gerhard Gossen and Boris Veytsman - This is free software, licensed under: The GNU General Public License, Version 1, February 1989 diff --git a/support/bibtexperllibs/LaTeX-ToUnicode/MANIFEST b/support/bibtexperllibs/LaTeX-ToUnicode/MANIFEST index 4724db7c70..04539213d5 100644 --- a/support/bibtexperllibs/LaTeX-ToUnicode/MANIFEST +++ b/support/bibtexperllibs/LaTeX-ToUnicode/MANIFEST @@ -1,16 +1,18 @@ -Changes LICENSE +Changes MANIFEST -META.yml -Makefile.PL -README -dist.ini -lib/LaTeX/ToUnicode.pm -lib/LaTeX/ToUnicode/Tables.pm -script/UnicodeData.txt -script/convert.pl -t/convert.t t/release-pod-coverage.t t/release-pod-syntax.t +t/convert.t t/release-synopsis.t +README +script/ltx2unitxt +script/convert.pl +script/UnicodeData.txt +lib/LaTeX/ToUnicode/Tables.pm +lib/LaTeX/ToUnicode.pm +Makefile.PL +head.ltx +Makefile.TDS weaver.ini +dist.ini diff --git a/support/bibtexperllibs/LaTeX-ToUnicode/META.yml b/support/bibtexperllibs/LaTeX-ToUnicode/META.yml deleted file mode 100644 index 725fef07da..0000000000 --- a/support/bibtexperllibs/LaTeX-ToUnicode/META.yml +++ /dev/null @@ -1,19 +0,0 @@ ---- -abstract: 'Convert LaTeX commands to Unicode' -author: - - 'Gerhard Gossen <gerhard.gossen@googlemail.com>' -build_requires: {} -configure_requires: - ExtUtils::MakeMaker: 6.31 -dynamic_config: 0 -generated_by: 'Dist::Zilla version 4.102342, CPAN::Meta::Converter version 2.101670' -license: perl -meta-spec: - url: http://module-build.sourceforge.net/META-spec-v1.4.html - version: 1.4 -name: LaTeX-ToUnicode -requires: - perl: 5.8.0 -resources: - repository: http://github.com/gerhardgossen/latex-tounicode -version: 0.11 diff --git a/support/bibtexperllibs/LaTeX-ToUnicode/MYMETA.json b/support/bibtexperllibs/LaTeX-ToUnicode/MYMETA.json deleted file mode 100644 index 15c23a32e8..0000000000 --- a/support/bibtexperllibs/LaTeX-ToUnicode/MYMETA.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "abstract" : "Convert LaTeX commands to Unicode", - "author" : [ - "Gerhard Gossen <gerhard.gossen@googlemail.com>" - ], - "dynamic_config" : 0, - "generated_by" : "Dist::Zilla version 4.102342, CPAN::Meta::Converter version 2.101670, CPAN::Meta::Converter version 2.150010", - "license" : [ - "perl_5" - ], - "meta-spec" : { - "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", - "version" : 2 - }, - "name" : "LaTeX-ToUnicode", - "prereqs" : { - "build" : { - "requires" : {} - }, - "configure" : { - "requires" : { - "ExtUtils::MakeMaker" : "6.31" - } - }, - "runtime" : { - "requires" : {} - } - }, - "release_status" : "stable", - "resources" : { - "repository" : { - "url" : "http://github.com/gerhardgossen/latex-tounicode" - } - }, - "version" : "0.11", - "x_serialization_backend" : "JSON::PP version 4.04" -} diff --git a/support/bibtexperllibs/LaTeX-ToUnicode/MYMETA.yml b/support/bibtexperllibs/LaTeX-ToUnicode/MYMETA.yml deleted file mode 100644 index 818dc9bc1e..0000000000 --- a/support/bibtexperllibs/LaTeX-ToUnicode/MYMETA.yml +++ /dev/null @@ -1,19 +0,0 @@ ---- -abstract: 'Convert LaTeX commands to Unicode' -author: - - 'Gerhard Gossen <gerhard.gossen@googlemail.com>' -build_requires: {} -configure_requires: - ExtUtils::MakeMaker: '6.31' -dynamic_config: 0 -generated_by: 'Dist::Zilla version 4.102342, CPAN::Meta::Converter version 2.101670, CPAN::Meta::Converter version 2.150010' -license: perl -meta-spec: - url: http://module-build.sourceforge.net/META-spec-v1.4.html - version: '1.4' -name: LaTeX-ToUnicode -requires: {} -resources: - repository: http://github.com/gerhardgossen/latex-tounicode -version: '0.11' -x_serialization_backend: 'CPAN::Meta::YAML version 0.018' diff --git a/support/bibtexperllibs/LaTeX-ToUnicode/Makefile b/support/bibtexperllibs/LaTeX-ToUnicode/Makefile deleted file mode 100644 index b8279d35d5..0000000000 --- a/support/bibtexperllibs/LaTeX-ToUnicode/Makefile +++ /dev/null @@ -1,899 +0,0 @@ -# This Makefile is for the LaTeX::ToUnicode extension to perl. -# -# It was generated automatically by MakeMaker version -# 7.44 (Revision: 74400) from the contents of -# Makefile.PL. Don't edit this file, edit Makefile.PL instead. -# -# ANY CHANGES MADE HERE WILL BE LOST! -# -# MakeMaker ARGV: () -# - -# MakeMaker Parameters: - -# ABSTRACT => q[Convert LaTeX commands to Unicode] -# AUTHOR => [q[Gerhard Gossen <gerhard.gossen@googlemail.com> and Boris Veytsman <boris@varphi.com>]] -# BUILD_REQUIRES => { } -# CONFIGURE_REQUIRES => { ExtUtils::MakeMaker=>q[6.31] } -# DISTNAME => q[LaTeX-ToUnicode] -# EXE_FILES => [] -# LICENSE => q[perl] -# NAME => q[LaTeX::ToUnicode] -# PREREQ_PM => { } -# TEST_REQUIRES => { } -# VERSION => q[0.11] -# test => { TESTS=>q[t/*.t] } - -# --- MakeMaker post_initialize section: - - -# --- MakeMaker const_config section: - -# These definitions are from config.sh (via /usr/local/Cellar/perl/5.32.0/lib/perl5/5.32.0/darwin-thread-multi-2level/Config.pm). -# They may have been overridden via Makefile.PL or on the command line. -AR = ar -CC = cc -CCCDLFLAGS = -CCDLFLAGS = -DLEXT = bundle -DLSRC = dl_dlopen.xs -EXE_EXT = -FULL_AR = /usr/bin/ar -LD = cc -LDDLFLAGS = -mmacosx-version-min=10.15 -bundle -undefined dynamic_lookup -L/usr/local/lib -fstack-protector-strong -LDFLAGS = -mmacosx-version-min=10.15 -fstack-protector-strong -L/usr/local/lib -LIBC = -LIB_EXT = .a -OBJ_EXT = .o -OSNAME = darwin -OSVERS = 19.5.0 -RANLIB = ranlib -SITELIBEXP = /usr/local/Cellar/perl/5.32.0/lib/perl5/site_perl/5.32.0 -SITEARCHEXP = /usr/local/Cellar/perl/5.32.0/lib/perl5/site_perl/5.32.0/darwin-thread-multi-2level -SO = dylib -VENDORARCHEXP = -VENDORLIBEXP = - - -# --- MakeMaker constants section: -AR_STATIC_ARGS = cr -DIRFILESEP = / -DFSEP = $(DIRFILESEP) -NAME = LaTeX::ToUnicode -NAME_SYM = LaTeX_ToUnicode -VERSION = 0.11 -VERSION_MACRO = VERSION -VERSION_SYM = 0_11 -DEFINE_VERSION = -D$(VERSION_MACRO)=\"$(VERSION)\" -XS_VERSION = 0.11 -XS_VERSION_MACRO = XS_VERSION -XS_DEFINE_VERSION = -D$(XS_VERSION_MACRO)=\"$(XS_VERSION)\" -INST_ARCHLIB = blib/arch -INST_SCRIPT = blib/script -INST_BIN = blib/bin -INST_LIB = blib/lib -INST_MAN1DIR = blib/man1 -INST_MAN3DIR = blib/man3 -MAN1EXT = 1 -MAN3EXT = 3 -MAN1SECTION = 1 -MAN3SECTION = 3 -INSTALLDIRS = site -DESTDIR = -PREFIX = $(SITEPREFIX) -PERLPREFIX = /usr/local/Cellar/perl/5.32.0 -SITEPREFIX = /usr/local/Cellar/perl/5.32.0 -VENDORPREFIX = -INSTALLPRIVLIB = /usr/local/Cellar/perl/5.32.0/lib/perl5/5.32.0 -DESTINSTALLPRIVLIB = $(DESTDIR)$(INSTALLPRIVLIB) -INSTALLSITELIB = /usr/local/Cellar/perl/5.32.0/lib/perl5/site_perl/5.32.0 -DESTINSTALLSITELIB = $(DESTDIR)$(INSTALLSITELIB) -INSTALLVENDORLIB = -DESTINSTALLVENDORLIB = $(DESTDIR)$(INSTALLVENDORLIB) -INSTALLARCHLIB = /usr/local/Cellar/perl/5.32.0/lib/perl5/5.32.0/darwin-thread-multi-2level -DESTINSTALLARCHLIB = $(DESTDIR)$(INSTALLARCHLIB) -INSTALLSITEARCH = /usr/local/Cellar/perl/5.32.0/lib/perl5/site_perl/5.32.0/darwin-thread-multi-2level -DESTINSTALLSITEARCH = $(DESTDIR)$(INSTALLSITEARCH) -INSTALLVENDORARCH = -DESTINSTALLVENDORARCH = $(DESTDIR)$(INSTALLVENDORARCH) -INSTALLBIN = /usr/local/Cellar/perl/5.32.0/bin -DESTINSTALLBIN = $(DESTDIR)$(INSTALLBIN) -INSTALLSITEBIN = /usr/local/Cellar/perl/5.32.0/bin -DESTINSTALLSITEBIN = $(DESTDIR)$(INSTALLSITEBIN) -INSTALLVENDORBIN = -DESTINSTALLVENDORBIN = $(DESTDIR)$(INSTALLVENDORBIN) -INSTALLSCRIPT = /usr/local/Cellar/perl/5.32.0/bin -DESTINSTALLSCRIPT = $(DESTDIR)$(INSTALLSCRIPT) -INSTALLSITESCRIPT = /usr/local/Cellar/perl/5.32.0/bin -DESTINSTALLSITESCRIPT = $(DESTDIR)$(INSTALLSITESCRIPT) -INSTALLVENDORSCRIPT = -DESTINSTALLVENDORSCRIPT = $(DESTDIR)$(INSTALLVENDORSCRIPT) -INSTALLMAN1DIR = /usr/local/Cellar/perl/5.32.0/share/man/man1 -DESTINSTALLMAN1DIR = $(DESTDIR)$(INSTALLMAN1DIR) -INSTALLSITEMAN1DIR = /usr/local/Cellar/perl/5.32.0/share/man/man1 -DESTINSTALLSITEMAN1DIR = $(DESTDIR)$(INSTALLSITEMAN1DIR) -INSTALLVENDORMAN1DIR = -DESTINSTALLVENDORMAN1DIR = $(DESTDIR)$(INSTALLVENDORMAN1DIR) -INSTALLMAN3DIR = /usr/local/Cellar/perl/5.32.0/share/man/man3 -DESTINSTALLMAN3DIR = $(DESTDIR)$(INSTALLMAN3DIR) -INSTALLSITEMAN3DIR = /usr/local/Cellar/perl/5.32.0/share/man/man3 -DESTINSTALLSITEMAN3DIR = $(DESTDIR)$(INSTALLSITEMAN3DIR) -INSTALLVENDORMAN3DIR = -DESTINSTALLVENDORMAN3DIR = $(DESTDIR)$(INSTALLVENDORMAN3DIR) -PERL_LIB = /usr/local/Cellar/perl/5.32.0/lib/perl5/5.32.0 -PERL_ARCHLIB = /usr/local/Cellar/perl/5.32.0/lib/perl5/5.32.0/darwin-thread-multi-2level -PERL_ARCHLIBDEP = /usr/local/Cellar/perl/5.32.0/lib/perl5/5.32.0/darwin-thread-multi-2level -LIBPERL_A = libperl.a -FIRST_MAKEFILE = Makefile -MAKEFILE_OLD = Makefile.old -MAKE_APERL_FILE = Makefile.aperl -PERLMAINCC = $(CC) -PERL_INC = /usr/local/Cellar/perl/5.32.0/lib/perl5/5.32.0/darwin-thread-multi-2level/CORE -PERL_INCDEP = /usr/local/Cellar/perl/5.32.0/lib/perl5/5.32.0/darwin-thread-multi-2level/CORE -PERL = "/usr/local/Cellar/perl/5.32.0/bin/perl" -FULLPERL = "/usr/local/Cellar/perl/5.32.0/bin/perl" -ABSPERL = $(PERL) -PERLRUN = $(PERL) -FULLPERLRUN = $(FULLPERL) -ABSPERLRUN = $(ABSPERL) -PERLRUNINST = $(PERLRUN) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)" -FULLPERLRUNINST = $(FULLPERLRUN) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)" -ABSPERLRUNINST = $(ABSPERLRUN) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)" -PERL_CORE = 0 -PERM_DIR = 755 -PERM_RW = 644 -PERM_RWX = 755 - -MAKEMAKER = /usr/local/Cellar/perl/5.32.0/lib/perl5/5.32.0/ExtUtils/MakeMaker.pm -MM_VERSION = 7.44 -MM_REVISION = 74400 - -# FULLEXT = Pathname for extension directory (eg Foo/Bar/Oracle). -# BASEEXT = Basename part of FULLEXT. May be just equal FULLEXT. (eg Oracle) -# PARENT_NAME = NAME without BASEEXT and no trailing :: (eg Foo::Bar) -# DLBASE = Basename part of dynamic library. May be just equal BASEEXT. -MAKE = make -FULLEXT = LaTeX/ToUnicode -BASEEXT = ToUnicode -PARENT_NAME = LaTeX -DLBASE = $(BASEEXT) -VERSION_FROM = -OBJECT = -LDFROM = $(OBJECT) -LINKTYPE = dynamic -BOOTDEP = - -# Handy lists of source code files: -XS_FILES = -C_FILES = -O_FILES = -H_FILES = -MAN1PODS = -MAN3PODS = lib/LaTeX/ToUnicode.pm \ - lib/LaTeX/ToUnicode/Tables.pm - -# Where is the Config information that we are using/depend on -CONFIGDEP = $(PERL_ARCHLIBDEP)$(DFSEP)Config.pm $(PERL_INCDEP)$(DFSEP)config.h - -# Where to build things -INST_LIBDIR = $(INST_LIB)/LaTeX -INST_ARCHLIBDIR = $(INST_ARCHLIB)/LaTeX - -INST_AUTODIR = $(INST_LIB)/auto/$(FULLEXT) -INST_ARCHAUTODIR = $(INST_ARCHLIB)/auto/$(FULLEXT) - -INST_STATIC = -INST_DYNAMIC = -INST_BOOT = - -# Extra linker info -EXPORT_LIST = -PERL_ARCHIVE = -PERL_ARCHIVEDEP = -PERL_ARCHIVE_AFTER = - - -TO_INST_PM = lib/LaTeX/ToUnicode.pm \ - lib/LaTeX/ToUnicode/Tables.pm - - -# --- MakeMaker platform_constants section: -MM_Unix_VERSION = 7.44 -PERL_MALLOC_DEF = -DPERL_EXTMALLOC_DEF -Dmalloc=Perl_malloc -Dfree=Perl_mfree -Drealloc=Perl_realloc -Dcalloc=Perl_calloc - - -# --- MakeMaker tool_autosplit section: -# Usage: $(AUTOSPLITFILE) FileToSplit AutoDirToSplitInto -AUTOSPLITFILE = $(ABSPERLRUN) -e 'use AutoSplit; autosplit($$$$ARGV[0], $$$$ARGV[1], 0, 1, 1)' -- - - - -# --- MakeMaker tool_xsubpp section: - - -# --- MakeMaker tools_other section: -SHELL = /bin/sh -CHMOD = chmod -CP = cp -MV = mv -NOOP = $(TRUE) -NOECHO = @ -RM_F = rm -f -RM_RF = rm -rf -TEST_F = test -f -TOUCH = touch -UMASK_NULL = umask 0 -DEV_NULL = > /dev/null 2>&1 -MKPATH = $(ABSPERLRUN) -MExtUtils::Command -e 'mkpath' -- -EQUALIZE_TIMESTAMP = $(ABSPERLRUN) -MExtUtils::Command -e 'eqtime' -- -FALSE = false -TRUE = true -ECHO = echo -ECHO_N = echo -n -UNINST = 0 -VERBINST = 0 -MOD_INSTALL = $(ABSPERLRUN) -MExtUtils::Install -e 'install([ from_to => {@ARGV}, verbose => '\''$(VERBINST)'\'', uninstall_shadows => '\''$(UNINST)'\'', dir_mode => '\''$(PERM_DIR)'\'' ]);' -- -DOC_INSTALL = $(ABSPERLRUN) -MExtUtils::Command::MM -e 'perllocal_install' -- -UNINSTALL = $(ABSPERLRUN) -MExtUtils::Command::MM -e 'uninstall' -- -WARN_IF_OLD_PACKLIST = $(ABSPERLRUN) -MExtUtils::Command::MM -e 'warn_if_old_packlist' -- -MACROSTART = -MACROEND = -USEMAKEFILE = -f -FIXIN = $(ABSPERLRUN) -MExtUtils::MY -e 'MY->fixin(shift)' -- -CP_NONEMPTY = $(ABSPERLRUN) -MExtUtils::Command::MM -e 'cp_nonempty' -- - - -# --- MakeMaker makemakerdflt section: -makemakerdflt : all - $(NOECHO) $(NOOP) - - -# --- MakeMaker dist section: -TAR = COPY_EXTENDED_ATTRIBUTES_DISABLE=1 COPYFILE_DISABLE=1 tar -TARFLAGS = cvf -ZIP = zip -ZIPFLAGS = -r -COMPRESS = gzip --best -SUFFIX = .gz -SHAR = shar -PREOP = $(NOECHO) $(NOOP) -POSTOP = $(NOECHO) $(NOOP) -TO_UNIX = $(NOECHO) $(NOOP) -CI = ci -u -RCS_LABEL = rcs -Nv$(VERSION_SYM): -q -DIST_CP = best -DIST_DEFAULT = tardist -DISTNAME = LaTeX-ToUnicode -DISTVNAME = LaTeX-ToUnicode-0.11 - - -# --- MakeMaker macro section: - - -# --- MakeMaker depend section: - - -# --- MakeMaker cflags section: - - -# --- MakeMaker const_loadlibs section: - - -# --- MakeMaker const_cccmd section: - - -# --- MakeMaker post_constants section: - - -# --- MakeMaker pasthru section: - -PASTHRU = LIBPERL_A="$(LIBPERL_A)"\ - LINKTYPE="$(LINKTYPE)"\ - PREFIX="$(PREFIX)"\ - PASTHRU_DEFINE='$(DEFINE) $(PASTHRU_DEFINE)'\ - PASTHRU_INC='$(INC) $(PASTHRU_INC)' - - -# --- MakeMaker special_targets section: -.SUFFIXES : .xs .c .C .cpp .i .s .cxx .cc $(OBJ_EXT) - -.PHONY: all config static dynamic test linkext manifest blibdirs clean realclean disttest distdir pure_all subdirs clean_subdirs makemakerdflt manifypods realclean_subdirs subdirs_dynamic subdirs_pure_nolink subdirs_static subdirs-test_dynamic subdirs-test_static test_dynamic test_static - - - -# --- MakeMaker c_o section: - - -# --- MakeMaker xs_c section: - - -# --- MakeMaker xs_o section: - - -# --- MakeMaker top_targets section: -all :: pure_all manifypods - $(NOECHO) $(NOOP) - -pure_all :: config pm_to_blib subdirs linkext - $(NOECHO) $(NOOP) - - $(NOECHO) $(NOOP) - -subdirs :: $(MYEXTLIB) - $(NOECHO) $(NOOP) - -config :: $(FIRST_MAKEFILE) blibdirs - $(NOECHO) $(NOOP) - -help : - perldoc ExtUtils::MakeMaker - - -# --- MakeMaker blibdirs section: -blibdirs : $(INST_LIBDIR)$(DFSEP).exists $(INST_ARCHLIB)$(DFSEP).exists $(INST_AUTODIR)$(DFSEP).exists $(INST_ARCHAUTODIR)$(DFSEP).exists $(INST_BIN)$(DFSEP).exists $(INST_SCRIPT)$(DFSEP).exists $(INST_MAN1DIR)$(DFSEP).exists $(INST_MAN3DIR)$(DFSEP).exists - $(NOECHO) $(NOOP) - -# Backwards compat with 6.18 through 6.25 -blibdirs.ts : blibdirs - $(NOECHO) $(NOOP) - -$(INST_LIBDIR)$(DFSEP).exists :: Makefile.PL - $(NOECHO) $(MKPATH) $(INST_LIBDIR) - $(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_LIBDIR) - $(NOECHO) $(TOUCH) $(INST_LIBDIR)$(DFSEP).exists - -$(INST_ARCHLIB)$(DFSEP).exists :: Makefile.PL - $(NOECHO) $(MKPATH) $(INST_ARCHLIB) - $(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_ARCHLIB) - $(NOECHO) $(TOUCH) $(INST_ARCHLIB)$(DFSEP).exists - -$(INST_AUTODIR)$(DFSEP).exists :: Makefile.PL - $(NOECHO) $(MKPATH) $(INST_AUTODIR) - $(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_AUTODIR) - $(NOECHO) $(TOUCH) $(INST_AUTODIR)$(DFSEP).exists - -$(INST_ARCHAUTODIR)$(DFSEP).exists :: Makefile.PL - $(NOECHO) $(MKPATH) $(INST_ARCHAUTODIR) - $(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_ARCHAUTODIR) - $(NOECHO) $(TOUCH) $(INST_ARCHAUTODIR)$(DFSEP).exists - -$(INST_BIN)$(DFSEP).exists :: Makefile.PL - $(NOECHO) $(MKPATH) $(INST_BIN) - $(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_BIN) - $(NOECHO) $(TOUCH) $(INST_BIN)$(DFSEP).exists - -$(INST_SCRIPT)$(DFSEP).exists :: Makefile.PL - $(NOECHO) $(MKPATH) $(INST_SCRIPT) - $(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_SCRIPT) - $(NOECHO) $(TOUCH) $(INST_SCRIPT)$(DFSEP).exists - -$(INST_MAN1DIR)$(DFSEP).exists :: Makefile.PL - $(NOECHO) $(MKPATH) $(INST_MAN1DIR) - $(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_MAN1DIR) - $(NOECHO) $(TOUCH) $(INST_MAN1DIR)$(DFSEP).exists - -$(INST_MAN3DIR)$(DFSEP).exists :: Makefile.PL - $(NOECHO) $(MKPATH) $(INST_MAN3DIR) - $(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_MAN3DIR) - $(NOECHO) $(TOUCH) $(INST_MAN3DIR)$(DFSEP).exists - - - -# --- MakeMaker linkext section: - -linkext :: dynamic - $(NOECHO) $(NOOP) - - -# --- MakeMaker dlsyms section: - - -# --- MakeMaker dynamic_bs section: - -BOOTSTRAP = - - -# --- MakeMaker dynamic section: - -dynamic :: $(FIRST_MAKEFILE) config $(INST_BOOT) $(INST_DYNAMIC) - $(NOECHO) $(NOOP) - - -# --- MakeMaker dynamic_lib section: - - -# --- MakeMaker static section: - -## $(INST_PM) has been moved to the all: target. -## It remains here for awhile to allow for old usage: "make static" -static :: $(FIRST_MAKEFILE) $(INST_STATIC) - $(NOECHO) $(NOOP) - - -# --- MakeMaker static_lib section: - - -# --- MakeMaker manifypods section: - -POD2MAN_EXE = $(PERLRUN) "-MExtUtils::Command::MM" -e pod2man "--" -POD2MAN = $(POD2MAN_EXE) - - -manifypods : pure_all config \ - lib/LaTeX/ToUnicode.pm \ - lib/LaTeX/ToUnicode/Tables.pm - $(NOECHO) $(POD2MAN) --section=$(MAN3SECTION) --perm_rw=$(PERM_RW) -u \ - lib/LaTeX/ToUnicode.pm $(INST_MAN3DIR)/LaTeX::ToUnicode.$(MAN3EXT) \ - lib/LaTeX/ToUnicode/Tables.pm $(INST_MAN3DIR)/LaTeX::ToUnicode::Tables.$(MAN3EXT) - - - - -# --- MakeMaker processPL section: - - -# --- MakeMaker installbin section: - - -# --- MakeMaker subdirs section: - -# none - -# --- MakeMaker clean_subdirs section: -clean_subdirs : - $(NOECHO) $(NOOP) - - -# --- MakeMaker clean section: - -# Delete temporary files but do not touch installed files. We don't delete -# the Makefile here so a later make realclean still has a makefile to use. - -clean :: clean_subdirs - - $(RM_F) \ - $(BASEEXT).bso $(BASEEXT).def \ - $(BASEEXT).exp $(BASEEXT).x \ - $(BOOTSTRAP) $(INST_ARCHAUTODIR)/extralibs.all \ - $(INST_ARCHAUTODIR)/extralibs.ld $(MAKE_APERL_FILE) \ - *$(LIB_EXT) *$(OBJ_EXT) \ - *perl.core MYMETA.json \ - MYMETA.yml blibdirs.ts \ - core core.*perl.*.? \ - core.[0-9] core.[0-9][0-9] \ - core.[0-9][0-9][0-9] core.[0-9][0-9][0-9][0-9] \ - core.[0-9][0-9][0-9][0-9][0-9] lib$(BASEEXT).def \ - mon.out perl \ - perl$(EXE_EXT) perl.exe \ - perlmain.c pm_to_blib \ - pm_to_blib.ts so_locations \ - tmon.out - - $(RM_RF) \ - blib - $(NOECHO) $(RM_F) $(MAKEFILE_OLD) - - $(MV) $(FIRST_MAKEFILE) $(MAKEFILE_OLD) $(DEV_NULL) - - -# --- MakeMaker realclean_subdirs section: -# so clean is forced to complete before realclean_subdirs runs -realclean_subdirs : clean - $(NOECHO) $(NOOP) - - -# --- MakeMaker realclean section: -# Delete temporary files (via clean) and also delete dist files -realclean purge :: realclean_subdirs - - $(RM_F) \ - $(FIRST_MAKEFILE) $(MAKEFILE_OLD) - - $(RM_RF) \ - $(DISTVNAME) - - -# --- MakeMaker metafile section: -metafile : create_distdir - $(NOECHO) $(ECHO) Generating META.yml - $(NOECHO) $(ECHO) '---' > META_new.yml - $(NOECHO) $(ECHO) 'abstract: '\''Convert LaTeX commands to Unicode'\''' >> META_new.yml - $(NOECHO) $(ECHO) 'author:' >> META_new.yml - $(NOECHO) $(ECHO) ' - '\''Gerhard Gossen <gerhard.gossen@googlemail.com> and Boris Veytsman <boris@varphi.com>'\''' >> META_new.yml - $(NOECHO) $(ECHO) 'build_requires: {}' >> META_new.yml - $(NOECHO) $(ECHO) 'configure_requires:' >> META_new.yml - $(NOECHO) $(ECHO) ' ExtUtils::MakeMaker: '\''6.31'\''' >> META_new.yml - $(NOECHO) $(ECHO) 'dynamic_config: 1' >> META_new.yml - $(NOECHO) $(ECHO) 'generated_by: '\''ExtUtils::MakeMaker version 7.44, CPAN::Meta::Converter version 2.150010'\''' >> META_new.yml - $(NOECHO) $(ECHO) 'license: perl' >> META_new.yml - $(NOECHO) $(ECHO) 'meta-spec:' >> META_new.yml - $(NOECHO) $(ECHO) ' url: http://module-build.sourceforge.net/META-spec-v1.4.html' >> META_new.yml - $(NOECHO) $(ECHO) ' version: '\''1.4'\''' >> META_new.yml - $(NOECHO) $(ECHO) 'name: LaTeX-ToUnicode' >> META_new.yml - $(NOECHO) $(ECHO) 'no_index:' >> META_new.yml - $(NOECHO) $(ECHO) ' directory:' >> META_new.yml - $(NOECHO) $(ECHO) ' - t' >> META_new.yml - $(NOECHO) $(ECHO) ' - inc' >> META_new.yml - $(NOECHO) $(ECHO) 'requires: {}' >> META_new.yml - $(NOECHO) $(ECHO) 'version: '\''0.11'\''' >> META_new.yml - $(NOECHO) $(ECHO) 'x_serialization_backend: '\''CPAN::Meta::YAML version 0.018'\''' >> META_new.yml - -$(NOECHO) $(MV) META_new.yml $(DISTVNAME)/META.yml - $(NOECHO) $(ECHO) Generating META.json - $(NOECHO) $(ECHO) '{' > META_new.json - $(NOECHO) $(ECHO) ' "abstract" : "Convert LaTeX commands to Unicode",' >> META_new.json - $(NOECHO) $(ECHO) ' "author" : [' >> META_new.json - $(NOECHO) $(ECHO) ' "Gerhard Gossen <gerhard.gossen@googlemail.com> and Boris Veytsman <boris@varphi.com>"' >> META_new.json - $(NOECHO) $(ECHO) ' ],' >> META_new.json - $(NOECHO) $(ECHO) ' "dynamic_config" : 1,' >> META_new.json - $(NOECHO) $(ECHO) ' "generated_by" : "ExtUtils::MakeMaker version 7.44, CPAN::Meta::Converter version 2.150010",' >> META_new.json - $(NOECHO) $(ECHO) ' "license" : [' >> META_new.json - $(NOECHO) $(ECHO) ' "perl_5"' >> META_new.json - $(NOECHO) $(ECHO) ' ],' >> META_new.json - $(NOECHO) $(ECHO) ' "meta-spec" : {' >> META_new.json - $(NOECHO) $(ECHO) ' "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",' >> META_new.json - $(NOECHO) $(ECHO) ' "version" : 2' >> META_new.json - $(NOECHO) $(ECHO) ' },' >> META_new.json - $(NOECHO) $(ECHO) ' "name" : "LaTeX-ToUnicode",' >> META_new.json - $(NOECHO) $(ECHO) ' "no_index" : {' >> META_new.json - $(NOECHO) $(ECHO) ' "directory" : [' >> META_new.json - $(NOECHO) $(ECHO) ' "t",' >> META_new.json - $(NOECHO) $(ECHO) ' "inc"' >> META_new.json - $(NOECHO) $(ECHO) ' ]' >> META_new.json - $(NOECHO) $(ECHO) ' },' >> META_new.json - $(NOECHO) $(ECHO) ' "prereqs" : {' >> META_new.json - $(NOECHO) $(ECHO) ' "build" : {' >> META_new.json - $(NOECHO) $(ECHO) ' "requires" : {}' >> META_new.json - $(NOECHO) $(ECHO) ' },' >> META_new.json - $(NOECHO) $(ECHO) ' "configure" : {' >> META_new.json - $(NOECHO) $(ECHO) ' "requires" : {' >> META_new.json - $(NOECHO) $(ECHO) ' "ExtUtils::MakeMaker" : "6.31"' >> META_new.json - $(NOECHO) $(ECHO) ' }' >> META_new.json - $(NOECHO) $(ECHO) ' },' >> META_new.json - $(NOECHO) $(ECHO) ' "runtime" : {' >> META_new.json - $(NOECHO) $(ECHO) ' "requires" : {}' >> META_new.json - $(NOECHO) $(ECHO) ' }' >> META_new.json - $(NOECHO) $(ECHO) ' },' >> META_new.json - $(NOECHO) $(ECHO) ' "release_status" : "stable",' >> META_new.json - $(NOECHO) $(ECHO) ' "version" : "0.11",' >> META_new.json - $(NOECHO) $(ECHO) ' "x_serialization_backend" : "JSON::PP version 4.04"' >> META_new.json - $(NOECHO) $(ECHO) '}' >> META_new.json - -$(NOECHO) $(MV) META_new.json $(DISTVNAME)/META.json - - -# --- MakeMaker signature section: -signature : - cpansign -s - - -# --- MakeMaker dist_basics section: -distclean :: realclean distcheck - $(NOECHO) $(NOOP) - -distcheck : - $(PERLRUN) "-MExtUtils::Manifest=fullcheck" -e fullcheck - -skipcheck : - $(PERLRUN) "-MExtUtils::Manifest=skipcheck" -e skipcheck - -manifest : - $(PERLRUN) "-MExtUtils::Manifest=mkmanifest" -e mkmanifest - -veryclean : realclean - $(RM_F) *~ */*~ *.orig */*.orig *.bak */*.bak *.old */*.old - - - -# --- MakeMaker dist_core section: - -dist : $(DIST_DEFAULT) $(FIRST_MAKEFILE) - $(NOECHO) $(ABSPERLRUN) -l -e 'print '\''Warning: Makefile possibly out of date with $(VERSION_FROM)'\''' \ - -e ' if -e '\''$(VERSION_FROM)'\'' and -M '\''$(VERSION_FROM)'\'' < -M '\''$(FIRST_MAKEFILE)'\'';' -- - -tardist : $(DISTVNAME).tar$(SUFFIX) - $(NOECHO) $(NOOP) - -uutardist : $(DISTVNAME).tar$(SUFFIX) - uuencode $(DISTVNAME).tar$(SUFFIX) $(DISTVNAME).tar$(SUFFIX) > $(DISTVNAME).tar$(SUFFIX)_uu - $(NOECHO) $(ECHO) 'Created $(DISTVNAME).tar$(SUFFIX)_uu' - -$(DISTVNAME).tar$(SUFFIX) : distdir - $(PREOP) - $(TO_UNIX) - $(TAR) $(TARFLAGS) $(DISTVNAME).tar $(DISTVNAME) - $(RM_RF) $(DISTVNAME) - $(COMPRESS) $(DISTVNAME).tar - $(NOECHO) $(ECHO) 'Created $(DISTVNAME).tar$(SUFFIX)' - $(POSTOP) - -zipdist : $(DISTVNAME).zip - $(NOECHO) $(NOOP) - -$(DISTVNAME).zip : distdir - $(PREOP) - $(ZIP) $(ZIPFLAGS) $(DISTVNAME).zip $(DISTVNAME) - $(RM_RF) $(DISTVNAME) - $(NOECHO) $(ECHO) 'Created $(DISTVNAME).zip' - $(POSTOP) - -shdist : distdir - $(PREOP) - $(SHAR) $(DISTVNAME) > $(DISTVNAME).shar - $(RM_RF) $(DISTVNAME) - $(NOECHO) $(ECHO) 'Created $(DISTVNAME).shar' - $(POSTOP) - - -# --- MakeMaker distdir section: -create_distdir : - $(RM_RF) $(DISTVNAME) - $(PERLRUN) "-MExtUtils::Manifest=manicopy,maniread" \ - -e "manicopy(maniread(),'$(DISTVNAME)', '$(DIST_CP)');" - -distdir : create_distdir distmeta - $(NOECHO) $(NOOP) - - - -# --- MakeMaker dist_test section: -disttest : distdir - cd $(DISTVNAME) && $(ABSPERLRUN) Makefile.PL - cd $(DISTVNAME) && $(MAKE) $(PASTHRU) - cd $(DISTVNAME) && $(MAKE) test $(PASTHRU) - - - -# --- MakeMaker dist_ci section: -ci : - $(ABSPERLRUN) -MExtUtils::Manifest=maniread -e '@all = sort keys %{ maniread() };' \ - -e 'print(qq{Executing $(CI) @all\n});' \ - -e 'system(qq{$(CI) @all}) == 0 or die $$!;' \ - -e 'print(qq{Executing $(RCS_LABEL) ...\n});' \ - -e 'system(qq{$(RCS_LABEL) @all}) == 0 or die $$!;' -- - - -# --- MakeMaker distmeta section: -distmeta : create_distdir metafile - $(NOECHO) cd $(DISTVNAME) && $(ABSPERLRUN) -MExtUtils::Manifest=maniadd -e 'exit unless -e q{META.yml};' \ - -e 'eval { maniadd({q{META.yml} => q{Module YAML meta-data (added by MakeMaker)}}) }' \ - -e ' or die "Could not add META.yml to MANIFEST: $${'\''@'\''}"' -- - $(NOECHO) cd $(DISTVNAME) && $(ABSPERLRUN) -MExtUtils::Manifest=maniadd -e 'exit unless -f q{META.json};' \ - -e 'eval { maniadd({q{META.json} => q{Module JSON meta-data (added by MakeMaker)}}) }' \ - -e ' or die "Could not add META.json to MANIFEST: $${'\''@'\''}"' -- - - - -# --- MakeMaker distsignature section: -distsignature : distmeta - $(NOECHO) cd $(DISTVNAME) && $(ABSPERLRUN) -MExtUtils::Manifest=maniadd -e 'eval { maniadd({q{SIGNATURE} => q{Public-key signature (added by MakeMaker)}}) }' \ - -e ' or die "Could not add SIGNATURE to MANIFEST: $${'\''@'\''}"' -- - $(NOECHO) cd $(DISTVNAME) && $(TOUCH) SIGNATURE - cd $(DISTVNAME) && cpansign -s - - - -# --- MakeMaker install section: - -install :: pure_install doc_install - $(NOECHO) $(NOOP) - -install_perl :: pure_perl_install doc_perl_install - $(NOECHO) $(NOOP) - -install_site :: pure_site_install doc_site_install - $(NOECHO) $(NOOP) - -install_vendor :: pure_vendor_install doc_vendor_install - $(NOECHO) $(NOOP) - -pure_install :: pure_$(INSTALLDIRS)_install - $(NOECHO) $(NOOP) - -doc_install :: doc_$(INSTALLDIRS)_install - $(NOECHO) $(NOOP) - -pure__install : pure_site_install - $(NOECHO) $(ECHO) INSTALLDIRS not defined, defaulting to INSTALLDIRS=site - -doc__install : doc_site_install - $(NOECHO) $(ECHO) INSTALLDIRS not defined, defaulting to INSTALLDIRS=site - -pure_perl_install :: all - $(NOECHO) $(MOD_INSTALL) \ - read "$(PERL_ARCHLIB)/auto/$(FULLEXT)/.packlist" \ - write "$(DESTINSTALLARCHLIB)/auto/$(FULLEXT)/.packlist" \ - "$(INST_LIB)" "$(DESTINSTALLPRIVLIB)" \ - "$(INST_ARCHLIB)" "$(DESTINSTALLARCHLIB)" \ - "$(INST_BIN)" "$(DESTINSTALLBIN)" \ - "$(INST_SCRIPT)" "$(DESTINSTALLSCRIPT)" \ - "$(INST_MAN1DIR)" "$(DESTINSTALLMAN1DIR)" \ - "$(INST_MAN3DIR)" "$(DESTINSTALLMAN3DIR)" - $(NOECHO) $(WARN_IF_OLD_PACKLIST) \ - "$(SITEARCHEXP)/auto/$(FULLEXT)" - - -pure_site_install :: all - $(NOECHO) $(MOD_INSTALL) \ - read "$(SITEARCHEXP)/auto/$(FULLEXT)/.packlist" \ - write "$(DESTINSTALLSITEARCH)/auto/$(FULLEXT)/.packlist" \ - "$(INST_LIB)" "$(DESTINSTALLSITELIB)" \ - "$(INST_ARCHLIB)" "$(DESTINSTALLSITEARCH)" \ - "$(INST_BIN)" "$(DESTINSTALLSITEBIN)" \ - "$(INST_SCRIPT)" "$(DESTINSTALLSITESCRIPT)" \ - "$(INST_MAN1DIR)" "$(DESTINSTALLSITEMAN1DIR)" \ - "$(INST_MAN3DIR)" "$(DESTINSTALLSITEMAN3DIR)" - $(NOECHO) $(WARN_IF_OLD_PACKLIST) \ - "$(PERL_ARCHLIB)/auto/$(FULLEXT)" - -pure_vendor_install :: all - $(NOECHO) $(MOD_INSTALL) \ - read "$(VENDORARCHEXP)/auto/$(FULLEXT)/.packlist" \ - write "$(DESTINSTALLVENDORARCH)/auto/$(FULLEXT)/.packlist" \ - "$(INST_LIB)" "$(DESTINSTALLVENDORLIB)" \ - "$(INST_ARCHLIB)" "$(DESTINSTALLVENDORARCH)" \ - "$(INST_BIN)" "$(DESTINSTALLVENDORBIN)" \ - "$(INST_SCRIPT)" "$(DESTINSTALLVENDORSCRIPT)" \ - "$(INST_MAN1DIR)" "$(DESTINSTALLVENDORMAN1DIR)" \ - "$(INST_MAN3DIR)" "$(DESTINSTALLVENDORMAN3DIR)" - - -doc_perl_install :: all - $(NOECHO) $(ECHO) Appending installation info to "$(DESTINSTALLARCHLIB)/perllocal.pod" - -$(NOECHO) $(MKPATH) "$(DESTINSTALLARCHLIB)" - -$(NOECHO) $(DOC_INSTALL) \ - "Module" "$(NAME)" \ - "installed into" "$(INSTALLPRIVLIB)" \ - LINKTYPE "$(LINKTYPE)" \ - VERSION "$(VERSION)" \ - EXE_FILES "$(EXE_FILES)" \ - >> "$(DESTINSTALLARCHLIB)/perllocal.pod" - -doc_site_install :: all - $(NOECHO) $(ECHO) Appending installation info to "$(DESTINSTALLARCHLIB)/perllocal.pod" - -$(NOECHO) $(MKPATH) "$(DESTINSTALLARCHLIB)" - -$(NOECHO) $(DOC_INSTALL) \ - "Module" "$(NAME)" \ - "installed into" "$(INSTALLSITELIB)" \ - LINKTYPE "$(LINKTYPE)" \ - VERSION "$(VERSION)" \ - EXE_FILES "$(EXE_FILES)" \ - >> "$(DESTINSTALLARCHLIB)/perllocal.pod" - -doc_vendor_install :: all - $(NOECHO) $(ECHO) Appending installation info to "$(DESTINSTALLARCHLIB)/perllocal.pod" - -$(NOECHO) $(MKPATH) "$(DESTINSTALLARCHLIB)" - -$(NOECHO) $(DOC_INSTALL) \ - "Module" "$(NAME)" \ - "installed into" "$(INSTALLVENDORLIB)" \ - LINKTYPE "$(LINKTYPE)" \ - VERSION "$(VERSION)" \ - EXE_FILES "$(EXE_FILES)" \ - >> "$(DESTINSTALLARCHLIB)/perllocal.pod" - - -uninstall :: uninstall_from_$(INSTALLDIRS)dirs - $(NOECHO) $(NOOP) - -uninstall_from_perldirs :: - $(NOECHO) $(UNINSTALL) "$(PERL_ARCHLIB)/auto/$(FULLEXT)/.packlist" - -uninstall_from_sitedirs :: - $(NOECHO) $(UNINSTALL) "$(SITEARCHEXP)/auto/$(FULLEXT)/.packlist" - -uninstall_from_vendordirs :: - $(NOECHO) $(UNINSTALL) "$(VENDORARCHEXP)/auto/$(FULLEXT)/.packlist" - - -# --- MakeMaker force section: -# Phony target to force checking subdirectories. -FORCE : - $(NOECHO) $(NOOP) - - -# --- MakeMaker perldepend section: - - -# --- MakeMaker makefile section: -# We take a very conservative approach here, but it's worth it. -# We move Makefile to Makefile.old here to avoid gnu make looping. -$(FIRST_MAKEFILE) : Makefile.PL $(CONFIGDEP) - $(NOECHO) $(ECHO) "Makefile out-of-date with respect to $?" - $(NOECHO) $(ECHO) "Cleaning current config before rebuilding Makefile..." - -$(NOECHO) $(RM_F) $(MAKEFILE_OLD) - -$(NOECHO) $(MV) $(FIRST_MAKEFILE) $(MAKEFILE_OLD) - - $(MAKE) $(USEMAKEFILE) $(MAKEFILE_OLD) clean $(DEV_NULL) - $(PERLRUN) Makefile.PL - $(NOECHO) $(ECHO) "==> Your Makefile has been rebuilt. <==" - $(NOECHO) $(ECHO) "==> Please rerun the $(MAKE) command. <==" - $(FALSE) - - - -# --- MakeMaker staticmake section: - -# --- MakeMaker makeaperl section --- -MAP_TARGET = perl -FULLPERL = "/usr/local/Cellar/perl/5.32.0/bin/perl" -MAP_PERLINC = "-Iblib/arch" "-Iblib/lib" "-I/usr/local/Cellar/perl/5.32.0/lib/perl5/5.32.0/darwin-thread-multi-2level" "-I/usr/local/Cellar/perl/5.32.0/lib/perl5/5.32.0" - -$(MAP_TARGET) :: $(MAKE_APERL_FILE) - $(MAKE) $(USEMAKEFILE) $(MAKE_APERL_FILE) $@ - -$(MAKE_APERL_FILE) : static $(FIRST_MAKEFILE) pm_to_blib - $(NOECHO) $(ECHO) Writing \"$(MAKE_APERL_FILE)\" for this $(MAP_TARGET) - $(NOECHO) $(PERLRUNINST) \ - Makefile.PL DIR="" \ - MAKEFILE=$(MAKE_APERL_FILE) LINKTYPE=static \ - MAKEAPERL=1 NORECURS=1 CCCDLFLAGS= - - -# --- MakeMaker test section: -TEST_VERBOSE=0 -TEST_TYPE=test_$(LINKTYPE) -TEST_FILE = test.pl -TEST_FILES = t/*.t -TESTDB_SW = -d - -testdb :: testdb_$(LINKTYPE) - $(NOECHO) $(NOOP) - -test :: $(TEST_TYPE) - $(NOECHO) $(NOOP) - -# Occasionally we may face this degenerate target: -test_ : test_dynamic - $(NOECHO) $(NOOP) - -subdirs-test_dynamic :: dynamic pure_all - -test_dynamic :: subdirs-test_dynamic - PERL_DL_NONLAZY=1 $(FULLPERLRUN) "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness($(TEST_VERBOSE), '$(INST_LIB)', '$(INST_ARCHLIB)')" $(TEST_FILES) - -testdb_dynamic :: dynamic pure_all - PERL_DL_NONLAZY=1 $(FULLPERLRUN) $(TESTDB_SW) "-I$(INST_LIB)" "-I$(INST_ARCHLIB)" $(TEST_FILE) - -subdirs-test_static :: static pure_all - -test_static :: subdirs-test_static - PERL_DL_NONLAZY=1 $(FULLPERLRUN) "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness($(TEST_VERBOSE), '$(INST_LIB)', '$(INST_ARCHLIB)')" $(TEST_FILES) - -testdb_static :: static pure_all - PERL_DL_NONLAZY=1 $(FULLPERLRUN) $(TESTDB_SW) "-I$(INST_LIB)" "-I$(INST_ARCHLIB)" $(TEST_FILE) - - - -# --- MakeMaker ppd section: -# Creates a PPD (Perl Package Description) for a binary distribution. -ppd : - $(NOECHO) $(ECHO) '<SOFTPKG NAME="LaTeX-ToUnicode" VERSION="0.11">' > LaTeX-ToUnicode.ppd - $(NOECHO) $(ECHO) ' <ABSTRACT>Convert LaTeX commands to Unicode</ABSTRACT>' >> LaTeX-ToUnicode.ppd - $(NOECHO) $(ECHO) ' <AUTHOR>Gerhard Gossen <gerhard.gossen@googlemail.com> and Boris Veytsman <boris@varphi.com></AUTHOR>' >> LaTeX-ToUnicode.ppd - $(NOECHO) $(ECHO) ' <IMPLEMENTATION>' >> LaTeX-ToUnicode.ppd - $(NOECHO) $(ECHO) ' <ARCHITECTURE NAME="darwin-thread-multi-2level-5.32" />' >> LaTeX-ToUnicode.ppd - $(NOECHO) $(ECHO) ' <CODEBASE HREF="" />' >> LaTeX-ToUnicode.ppd - $(NOECHO) $(ECHO) ' </IMPLEMENTATION>' >> LaTeX-ToUnicode.ppd - $(NOECHO) $(ECHO) '</SOFTPKG>' >> LaTeX-ToUnicode.ppd - - -# --- MakeMaker pm_to_blib section: - -pm_to_blib : $(FIRST_MAKEFILE) $(TO_INST_PM) - $(NOECHO) $(ABSPERLRUN) -MExtUtils::Install -e 'pm_to_blib({@ARGV}, '\''$(INST_LIB)/auto'\'', q[$(PM_FILTER)], '\''$(PERM_DIR)'\'')' -- \ - 'lib/LaTeX/ToUnicode.pm' 'blib/lib/LaTeX/ToUnicode.pm' \ - 'lib/LaTeX/ToUnicode/Tables.pm' 'blib/lib/LaTeX/ToUnicode/Tables.pm' - $(NOECHO) $(TOUCH) pm_to_blib - - -# --- MakeMaker selfdocument section: - -# here so even if top_targets is overridden, these will still be defined -# gmake will silently still work if any are .PHONY-ed but nmake won't - -static :: - $(NOECHO) $(NOOP) - -dynamic :: - $(NOECHO) $(NOOP) - -config :: - $(NOECHO) $(NOOP) - - -# --- MakeMaker postamble section: - - -# End. diff --git a/support/bibtexperllibs/LaTeX-ToUnicode/Makefile.PL b/support/bibtexperllibs/LaTeX-ToUnicode/Makefile.PL index 6b30688882..b5f558136d 100644 --- a/support/bibtexperllibs/LaTeX-ToUnicode/Makefile.PL +++ b/support/bibtexperllibs/LaTeX-ToUnicode/Makefile.PL @@ -10,17 +10,17 @@ use ExtUtils::MakeMaker 6.31; my %WriteMakefileArgs = ( 'ABSTRACT' => 'Convert LaTeX commands to Unicode', - 'AUTHOR' => 'Gerhard Gossen <gerhard.gossen@googlemail.com> and Boris Veytsman <boris@varphi.com>', + 'AUTHOR' => 'Gerhard Gossen <gerhard.gossen@googlemail.com> and Boris Veytsman <boris@varphi.com> and Karl Berry <karl@freefriends.com>', 'BUILD_REQUIRES' => {}, 'CONFIGURE_REQUIRES' => { 'ExtUtils::MakeMaker' => '6.31' }, 'DISTNAME' => 'LaTeX-ToUnicode', - 'EXE_FILES' => [], + 'EXE_FILES' => ['script/ltx2unitxt'], 'LICENSE' => 'perl', 'NAME' => 'LaTeX::ToUnicode', 'PREREQ_PM' => {}, - 'VERSION' => '0.11', + 'VERSION_FROM' => 'lib/LaTeX/ToUnicode.pm', 'test' => { 'TESTS' => 't/*.t' } diff --git a/support/bibtexperllibs/LaTeX-ToUnicode/Makefile.TDS b/support/bibtexperllibs/LaTeX-ToUnicode/Makefile.TDS new file mode 100644 index 0000000000..64faeebae9 --- /dev/null +++ b/support/bibtexperllibs/LaTeX-ToUnicode/Makefile.TDS @@ -0,0 +1,44 @@ +# +# This is Makefile for TDS-compliant TeX distributions +# Written by Boris Veytsman, boris@varphi.com +# +# This file is in public domain +# +PREFIX = /usr/local + +LIBDIR = $(PREFIX)/scripts/bibtexperllibs + +DOCDIR = $(PREFIX)/doc/bibtex/bibtexperllibs + +all: + +latex-tounicode.pdf: latex-tounicode.tex ltx2unitxt.pdf + texfot pdflatex $< || { rm -f $@; exit 1; } + +ToUnicode = lib/LaTeX/ToUnicode +latex-tounicode.tex: $(ToUnicode).pm $(ToUnicode)/Tables.pm + pod2latex -modify -full -prefile head.ltx -out $@ $^ +latex-tounicode.tex: head.ltx +# unfortunately pod2latex doesn't recognize =encoding, so there +# are two warnings of "Command encoding not recognised ...". Oh well. + +ltx2unitxt.1: script/ltx2unitxt +# don't run --version since the --help message includes --version output. + help2man --no-info --version-string=" " \ +--name="convert LaTeX source fragment to plain (Unicode) text or simple html" \ + $< >$@ \ + || { rm -f $@; exit 1; } +ltx2unitxt.pdf: ltx2unitxt.1 + sed 's/^Releases:/\nReleases:/' $< | groff -man -t -rS11 - | ps2pdf - $@ + +force: + +install: + mkdir -p $(LIBDIR) + cp -r lib/* $(LIBDIR) + mkdir -p $(DOCDIR) + cp -r man/man3/* $(DOCDIR) + +clean: + +distclean: clean diff --git a/support/bibtexperllibs/LaTeX-ToUnicode/README b/support/bibtexperllibs/LaTeX-ToUnicode/README index 0d1117f9ee..1f241e3979 100644 --- a/support/bibtexperllibs/LaTeX-ToUnicode/README +++ b/support/bibtexperllibs/LaTeX-ToUnicode/README @@ -1,13 +1,13 @@ +This is the LaTeX::ToUnicode Perl package: + Convert LaTeX source fragments to Unicode plain text or simple html -This archive contains the distribution LaTeX-ToUnicode, -version 0.11: +Dev sources, bug tracker: https://github.com/borisveytsman/bibtexperllibs +Releases: https://ctan.org/pkg/bibtexperllibs - Convert LaTeX commands to Unicode - -This software is copyright (c) 2010-2020 by Gerhard Gossen, Boris Veytsman, and Karl Berry +Copyright 2010-2022 Gerhard Gossen, Boris Veytsman, Karl Berry This is free software; you can redistribute it and/or modify it under -the same terms as the Perl 5 programming language system itself. +the same terms as the Perl5 programming language system itself. diff --git a/support/bibtexperllibs/LaTeX-ToUnicode/head.ltx b/support/bibtexperllibs/LaTeX-ToUnicode/head.ltx new file mode 100644 index 0000000000..3f946fcba0 --- /dev/null +++ b/support/bibtexperllibs/LaTeX-ToUnicode/head.ltx @@ -0,0 +1,28 @@ +% documentation for LaTeX::ToUnicode. +% head.ltx file public domain. +% +\documentclass[11pt]{article} +\usepackage{fullpage,pdfpages} +\usepackage[hidelinks]{hyperref} +\let\printindex=\empty % index is not useful +\sloppy \hbadness=3000 % not aiming for good typesetting + +% Silence useless font warning about braces in cmsy instead of cmtt: +\makeatletter\def\@font@warning#1{}\makeatother + +% https://tex.stackexchange.com/questions/68272 +\newcommand\invisiblesection[1]{% + \refstepcounter{section}% + \addcontentsline{toc}{section}{\protect\numberline{\thesection}#1}% + \sectionmark{#1}% +} + +\begin{document} +\title{\texttt{LaTeX::ToUnicode} documentation} +\author{Boris Veytsman\thanks{borisv@lk.net}} +\maketitle +\tableofcontents + +\invisiblesection{ltx2unitxt---convert \LaTeX\ source fragments} + +\includepdf[pages=-]{ltx2unitxt} diff --git a/support/bibtexperllibs/LaTeX-ToUnicode/lib/LaTeX/ToUnicode.pm b/support/bibtexperllibs/LaTeX-ToUnicode/lib/LaTeX/ToUnicode.pm index 50ae29399a..173db38b02 100644 --- a/support/bibtexperllibs/LaTeX-ToUnicode/lib/LaTeX/ToUnicode.pm +++ b/support/bibtexperllibs/LaTeX-ToUnicode/lib/LaTeX/ToUnicode.pm @@ -2,52 +2,357 @@ use strict; use warnings; package LaTeX::ToUnicode; BEGIN { - $LaTeX::ToUnicode::VERSION = '0.11'; + $LaTeX::ToUnicode::VERSION = '0.53'; } #ABSTRACT: Convert LaTeX commands to Unicode (simplistically) - require Exporter; our @ISA = qw(Exporter); -our @EXPORT_OK = qw( convert ); +our @EXPORT_OK = qw( convert debuglevel $endcw ); use utf8; +use Encode; use LaTeX::ToUnicode::Tables; +# Terminating a control word (not symbol) the way TeX does: at the +# boundary between a letter (lookbehind) and a nonletter (lookahead), +# and then ignore any following whitespace. +our $endcw = qr/(?<=[a-zA-Z])(?=[^a-zA-Z]|$)\s*/; + +# all we need for is debugging being on and off. And it's pretty random +# what gets output. +my $debug = 0; +sub debuglevel { $debug = shift; } +sub _debug { + return unless $debug; + my ($pkgname,$filename,$line,$subr) = caller(1); + warn @_, " at $filename:$line (${pkgname}::$subr)\n"; +} +# The main conversion function. +# sub convert { - my ( $string, %options ) = @_; - $string = _convert_commands( $string ); - $string = _convert_accents( $string ); - $string = _convert_german( $string ) if $options{german}; - $string = _convert_symbols( $string ); - $string = _convert_specials( $string ); - $string = _convert_ligatures( $string ); - $string = _convert_markups( $string ); - $string =~ s/{(\w*)}/$1/g; + my ($string, %options) = @_; + #warn debug_hash_as_string("starting with: $string", %options); + + # First, remove leading and trailing horizontal whitespace + # on each line of the possibly-multiline string we're given. + $string =~ s/^[ \t]*//m; + $string =~ s/[ \t]*$//m; + + # For HTML output, must convert special characters that were in the + # TeX text (&<>) to their entities to avoid misparsing. We want to + # do this first, because conversion of the markup commands might + # output HTML tags like <tt>, and we don't want to convert those <>. + # Although <tt> works, better to keep the output HTML as + # human-readable as we can. + # + if ($options{html}) { + $string =~ s/([^\\]|^)&/$1&/g; + $string =~ s/</</g; + $string =~ s/>/>/g; + } + + my $user_hook = $options{hook}; + if ($user_hook) { + $string = &$user_hook($string, \%options); + _debug("after user hook: $string"); + } + + # Convert general commands that take arguments, since (1) they might + # insert TeX commands that need to be converted, and (2) because + # their arguments could well contain constructs that will map to a + # Perl string \x{nnnn} for Unicode character nnnn; those Perl braces + # for the \x will confuse further parsing of the TeX. + # + $string = _convert_commands_with_arg($string); + _debug("after commands with arg: $string"); + + # Convert markups (\texttt, etc.); they have the same brace-parsing issue. + $string = _convert_markups($string, \%options); + _debug("after markups: $string"); + + # And urls, a special case of commands with arguments. + $string = _convert_urls($string, \%options); + _debug("after urls: $string"); + + $string = _convert_control_words($string); + _debug("after control words: $string"); + + $string = _convert_control_symbols($string); + _debug("after control symbols: $string"); + + $string = _convert_accents($string); + $string = _convert_german($string) if $options{german}; + $string = _convert_symbols($string); + $string = _convert_ligatures($string); + + # Let's handle ties here, after all the other conversions, since + # they don't fit well with any of the tables. + # + # /~, or ~ at the beginning of a line, is probably part of a url or + # path, not a tie. Otherwise, consider it a space, since a no-break + # spot in TeX is most likely fine to break in text or HTML. + # + $string =~ s,([^/])~,$1 ,g; + + # Remove kerns. Clearly needs generalizing/sharpening to recognize + # dimens better, and plenty of other commands could use it. + #_debug("before kern: $string"); + my $dimen_re = qr/[-+]?[0-9., ]+[a-z][a-z]\s*/; + $string =~ s!\\kern${endcw}${dimen_re}!!g; + + # What the heck, let's do \hfuzz and \vfuzz too. They come up pretty + # often and practically the same thing (plus ignore optional =).. + $string =~ s!\\[hv]fuzz${endcw}=?\s*${dimen_re}!!g; + + # After all the conversions, $string contains \x{....} constructs + # (Perl Unicode characters) where translations have happened. Change + # those to the desired output format. Thus we assume that the + # Unicode \x{....}'s are not themselves involved in further + # translations, which is, so far, true. + # + if (! $options{entities}) { + # Convert our \x strings from Tables.pm to the binary characters. + # Assume no more than four hex digits. + $string =~ s/\\x\{(.{1,4})\}/ pack('U*', hex($1))/eg; + + } elsif ($options{entities}) { + # Convert the XML special characters that appeared in the input, + # e.g., from a TeX \&. Unless we're generating HTML output, in + # which case they have already been converted. + if (! $options{html}) { + $string =~ s/&/&/g; + $string =~ s/</</g; + $string =~ s/>/>/g; + } + + # Our values in Tables.pm are simple ASCII strings \x{....}, + # so we can replace them with hex entities with no trouble. + # Fortunately TeX does not have a standard \x control sequence. + $string =~ s/\\x\{(....)\}/&#x$1;/g; + + # The rest of the job is about binary Unicode characters in the + # input. We want to transform them into entities also. As always + # in Perl, there's more than one way to do it, and several are + # described here, just for the fun of it. + my $ret = ""; + # + # decode_utf8 is described in https://perldoc.perl.org/Encode. + # Without the decode_utf8, all of these methods output each byte + # separately; apparently $string is a byte string at this point, + # not a Unicode string. I don't know why that is. + $ret = decode_utf8($string); + # + # Transform everything that's not printable ASCII or newline into + # entities. + $ret =~ s/([^ -~\n])/ sprintf("&#x%04x;", ord($1)) /eg; + # + # This method leaves control characters as literal; doesn't matter + # for XML output, since control characters aren't allowed, but + # let's use the regexp method anyway. + #$ret = encode("ascii", decode_utf8($string), Encode::FB_XMLCREF); + # + # The nice_string function from perluniintro also works. + # + # This fails, just outputs numbers (that is, ord values): + # foreach my $c (unpack("U*", $ret)) { + # + # Without the decode_utf8, outputs each byte separately. + # With the decode_utf8, works, but the above seems cleaner. + #foreach my $c (split(//, $ret)) { + # if (ord($c) <= 31 || ord($c) >= 128) { + # $ret .= sprintf("&#x%04x;", ord($c)); + # } else { + # $ret .= $c; + # } + #} + # + $string = $ret; # assigned from above. + } + + if ($string =~ /\\x\{/) { + warn "LaTeX::ToUnicode::convert: untranslated \\x remains: $string\n"; + warn "LaTeX::ToUnicode::convert: please report as bug.\n"; + } + + # Drop all braces. + $string =~ s/[{}]//g; + + # Backslashes might remain. Don't remove them, as it makes for a + # useful way to find unhandled commands. + + # leave newlines alone, but trim spaces and tabs. + $string =~ s/^[ \t]+//s; # remove leading whitespace + $string =~ s/[ \t]+$//s; # remove trailing whitespace + $string =~ s/[ \t]+/ /gs; # collapse all remaining whitespace to one space + $string; } -sub _convert_commands { +# Convert commands that take a single braced argument. The table +# defines text we're supposed to insert before and after the argument. +# We let future processing handle conversion of both the inserted text +# and the argument. +# +sub _convert_commands_with_arg { my $string = shift; - foreach my $command ( keys %LaTeX::ToUnicode::Tables::COMMANDS ) { - $string =~ s/\{\\$command\}/$LaTeX::ToUnicode::Tables::COMMANDS{$command}/g; - $string =~ s/\\$command(?=\s|\b)/$LaTeX::ToUnicode::Tables::COMMANDS{$command}/g; + foreach my $cmd ( keys %LaTeX::ToUnicode::Tables::ARGUMENT_COMMANDS ) { + my $repl = $LaTeX::ToUnicode::Tables::ARGUMENT_COMMANDS{$cmd}; + my $lft = $repl->[0]; # ref to two-element list + my $rht = $repl->[1]; + # \cmd{foo} -> LFT foo RHT + $string =~ s/\\$cmd${endcw}\{(.*?)\}/$lft$1$rht/g; + #warn "replaced arg $cmd, yielding $string\n"; + } + + $string; +} + +# Convert url commands in STRING. This is a special case of commands +# with arguments: \url{u} and \href{u}{desc text}. The HTML output +# (generated if $OPTIONS{html} is set) is just too special to be handled +# in a table; further, \href is the only two-argument command we are +# currently handling. +# +sub _convert_urls { + my ($string,$options) = @_; + + if ($options->{html}) { + # HTML output. + # \url{URL} -> <a href="URL">URL</a> + $string =~ s,\\url$endcw\{([^}]*)\} + ,<a href="$1">$1</a>,gx; + # + # \href{URL}{TEXT} -> <a href="URL">TEXT</a> + $string =~ s,\\href$endcw\{([^}]*)\}\s*\{([^}]*)\} + ,<a href="$1">$2</a>,gx; + + } else { + # plain text output. + # \url{URL} -> URL + $string =~ s/\\url$endcw\{([^}]*)\}/$1/g; + # + # \href{URL}{TEXT} -> TEXT (URL) + # but, as a special case, if URL ends with TEXT, just output URL, + # as in: + # \href{https://doi.org/10/fjzzc8}{10/fjzzc8} + # -> + # https://doi.org/10/fjzzc8 + # + # Yet more specialness: the TEXT might have extra braces, as in + # \href{https://doi.org/10/fjzzc8}{{10/fjzzc8}} + # left over from previous markup commands (\path) which got + # removed. We want to accept and ignore such extra braces, + # hence the \{+ ... \}+ in recognizing TEXT. + # +#warn "txt url: starting with $string\n"; + if ($string =~ m/\\href$endcw\{([^}]*)\}\s*\{+([^}]*)\}+/) { + my $url = $1; + my $text = $2; +#warn " url: $url\n"; +#warn " text: $text\n"; + my $repl = ($url =~ m!$text$!) ? $url : "$text ($url)"; +#warn " repl: $repl\n"; + $string =~ s/\\href$endcw\{([^}]*)\}\s*\{+([^}]*)\}+/$repl/; +#warn " str: $string\n"; + } + } + + $string; +} + +# Convert control words (not symbols), that is, a backslash and an +# alphabetic sequence of characters terminated by a non-alphabetic +# character. Following whitespace is ignored. +# +sub _convert_control_words { + my $string = shift; + + foreach my $command ( keys %LaTeX::ToUnicode::Tables::CONTROL_WORDS ) { + my $repl = $LaTeX::ToUnicode::Tables::CONTROL_WORDS{$command}; + # replace {\CMD}, whitespace ignored after \CMD. + $string =~ s/\{\\$command$endcw\}/$repl/g; + + # replace \CMD, preceded by not-consumed non-backslash. + $string =~ s/(?<=[^\\])\\$command$endcw/$repl/g; + + # replace \CMD at beginning of whole string, which otherwise + # wouldn't be matched. Two separate regexps to avoid + # variable-length lookbehind. + $string =~ s/^\\$command$endcw/$repl/g; } $string; } +# Convert control symbols, other than accents. Much simpler than +# control words, since are self-delimiting, don't take arguments, and +# don't consume any following text. +# +sub _convert_control_symbols { + my $string = shift; + + foreach my $symbol ( keys %LaTeX::ToUnicode::Tables::CONTROL_SYMBOLS ) { + my $repl = $LaTeX::ToUnicode::Tables::CONTROL_SYMBOLS{$symbol}; + + # because these are not alphabetic, we can quotemeta them, + # and we need to because "\" is one of the symbols. + my $rx = quotemeta($symbol); + + # the preceding character must not be a backslash, else "\\ " + # could have the "\ " seen first as a control space, leaving + # a spurious \ behind. Don't consume the preceding. + # Or it could be at the beginning of a line. + # + $string =~ s/(^|(?<=[^\\]))\\$rx/$repl/g; + #warn "after sym $symbol (\\$rx -> $repl), have: $string\n"; + } + + $string; +} + +# Convert accents. +# sub _convert_accents { my $string = shift; - $string =~ s/(\{\\(.)\{(\\?\w{1,2})\}\})/$LaTeX::ToUnicode::Tables::ACCENTS{$2}{$3} || $1/eg; # {\"{a}} - $string =~ s/(\{\\(.)(\\?\w{1,2})\})/$LaTeX::ToUnicode::Tables::ACCENTS{$2}{$3} || $1/eg; # {\"a} - $string =~ s/(\\(.)(\\?\w{1,2}))/$LaTeX::ToUnicode::Tables::ACCENTS{$2}{$3} || $1/eg; # \"a - $string =~ s/(\\(.)\{(\\?\w{1,2})\})/$LaTeX::ToUnicode::Tables::ACCENTS{$2}{$3} || $1/eg; # \"{a} + + # first the non-alphabetic accent commands, like \". + my %tbl = %LaTeX::ToUnicode::Tables::ACCENT_SYMBOLS; + $string =~ s/(\{\\(.)\s*\{(\\?\w{1,2})\}\})/$tbl{$2}{$3} || $1/eg; #{\"{a}} + $string =~ s/(\{\\(.)\s*(\\?\w{1,2})\})/ $tbl{$2}{$3} || $1/eg; # {\"a} + $string =~ s/(\\(.)\s*(\\?\w{1,1}))/ $tbl{$2}{$3} || $1/eg; # \"a + $string =~ s/(\\(.)\s*\{(\\?\w{1,2})\})/ $tbl{$2}{$3} || $1/eg; # \"{a} + + # second the alphabetic commands, like \c. They have be handled + # differently because \cc is not \c{c}! The only difference in the + # regular expressions is using $endcw instead of just \s*. + # + %tbl = %LaTeX::ToUnicode::Tables::ACCENT_LETTERS; + $string =~ s/(\{\\(.)$endcw\{(\\?\w{1,2})\}\})/$tbl{$2}{$3} || $1/eg; #{\"{a}} + $string =~ s/(\{\\(.)$endcw(\\?\w{1,2})\})/ $tbl{$2}{$3} || $1/eg; # {\"a} + $string =~ s/(\\(.)$endcw(\\?\w{1,1}))/ $tbl{$2}{$3} || $1/eg; # \"a + $string =~ s/(\\(.)$endcw\{(\\?\w{1,2})\})/ $tbl{$2}{$3} || $1/eg; # \"{a} + + + # The argument is just one \w character for the \"a case, not two, + # because otherwise we might consume a following character that is + # not part of the accent, e.g., a backslash (\"a\'e). + # + # Others can be two because of the \t tie-after accent. Even {\t oo} is ok. + # + # Allow whitespace after the \CMD in all cases, e.g., "\c c". Even + # for the control symbols, it turns out spaces are ignored there + # (as in \" o), unlike the usual syntax. + # + # Some non-word constituents would work, but in practice we hope + # everyone just uses letters. + $string; } +# For the [n]german package. sub _convert_german { my $string = shift; @@ -57,26 +362,28 @@ sub _convert_german { $string; } +# Control words that produce printed symbols (and letters in languages +# other than English), that is. +# sub _convert_symbols { my $string = shift; foreach my $symbol ( keys %LaTeX::ToUnicode::Tables::SYMBOLS ) { - $string =~ s/{\\$symbol}/$LaTeX::ToUnicode::Tables::SYMBOLS{$symbol}/g; - $string =~ s/\\$symbol\b/$LaTeX::ToUnicode::Tables::SYMBOLS{$symbol}/g; + my $repl = $LaTeX::ToUnicode::Tables::SYMBOLS{$symbol}; + # preceded by a (non-consumed) non-backslash, + # usual termination for a control word. + # These commands don't take arguments. + $string =~ s/(?<=[^\\])\\$symbol$endcw/$repl/g; + + # or the beginning of the whole string: + $string =~ s/^\\$symbol$endcw/$repl/g; } $string; } -# Replace \<specialchar> with <specialchar>. -sub _convert_specials { - my $string = shift; - my $specials = join( '|', @LaTeX::ToUnicode::Tables::SPECIALS ); - my $pattern = qr/\\($specials)/o; - $string =~ s/$pattern/$1/g; - $string =~ s/\\\$/\$/g; - $string; -} - +# Special character sequences, not \commands. They aren't all +# technically ligatures, but no matter. +# sub _convert_ligatures { my $string = shift; @@ -91,40 +398,117 @@ sub _convert_ligatures { } # +# Convert LaTeX markup commands in STRING like \textbf{...} and +# {\bfshape ...} and {\bf ...}. +# +# If we're aiming for plain text output, they are just cleared away (the +# braces are not removed). +# +# If we're generating HTML output ("html" key is set in $OPTIONS hash +# ref), we use the value in the hash, so that \textbf{foo} becomes +# <b>foo</b>. Nested markup doesn't work. +# sub _convert_markups { - my $string = shift; - my $orig_string = $string; + my ($string, $options) = @_; - my $markups = join( '|', @LaTeX::ToUnicode::Tables::MARKUPS ); + # HTML is different. + return _convert_markups_html($string) if $options->{html}; + # Ok, we'll "convert" to plain text by removing the markup commands. + + # we can do all markup commands at once. + my $markups = join('|', keys %LaTeX::ToUnicode::Tables::MARKUPS); # Remove \textMARKUP{...}, leaving just the {...} - $string =~ s/\\text($markups)\b\s*//g; - - # Remove braces and \command in: {... \command ...} - $string =~ s/(\{[^{}]+)\\(?:$markups)\s+([^{}]+\})/$1$2/g; - # - # Remove braces and \command in: {\command ...} - $string =~ s/\{\\(?:$markups)\s+([^{}]*)\}/$1/g; - # - # Remove: {\command + $string =~ s/\\text($markups)$endcw//g; + + # Similarly remove \MARKUPshape. + $string =~ s/\\($markups)shape$endcw//g; + + # Remove braces and \command in: {... \MARKUP ...} + $string =~ s/(\{[^{}]+)\\(?:$markups)$endcw([^{}]+\})/$1$2/g; + + # Remove braces and \command in: {\MARKUP ...} + $string =~ s/\{\\(?:$markups)$endcw([^{}]*)\}/$1/g; + + # Remove: {\MARKUP # Although this will leave unmatched } chars behind, there's no # alternative without full parsing, since the bib entry will often # look like: {\em {The TeX{}book}}. Also might, in principle, be # at the end of a line. - $string =~ s/\{\\(?:$markups)\b\s*//g; + $string =~ s/\{\\(?:$markups)$endcw//g; # Ultimately we remove all braces in ltx2crossrefxml SanitizeText fns, - # so the unmatched braces don't matter ... that code should be moved here. + # so the unmatched braces don't matter ... that code should be moved. $string; } +# Convert \markup in STRING to html. We can't always figure out where to +# put the end tag, but we always put it somewhere. We don't even attempt +# to handle nested markup. +# +sub _convert_markups_html { + my ($string) = @_; + + my %MARKUPS = %LaTeX::ToUnicode::Tables::MARKUPS; + # have to consider each markup \command separately. + for my $markup (keys %MARKUPS) { + my $hcmd = $MARKUPS{$markup}; # some TeX commands don't translate + my $tag = $hcmd ? "<$hcmd>" : ""; + my $end_tag = $hcmd ? "</$hcmd>" : ""; + + # The easy one: \textMARKUP{...} + $string =~ s/\\text$markup$endcw\{(.*?)\}/$tag$1$end_tag/g; + + # {x\MARKUP(shape) y} -> x<mk>y</mk> (leave out braces) + $string =~ s/\{([^{}]+)\\$markup(shape)?$endcw([^{}]+)\} + /$1$tag$3$end_tag/gx; + + # {\MARKUP(shape) y} -> <mk>y</mk>. Same as previous but without + # the x part. Could do it in one regex but this seems clearer. + $string =~ s/\{\\$markup(shape)?$endcw([^{}]+)\} + /$tag$2$end_tag/gx; + + # for {\MARKUP(shape) ... with no matching brace, we don't know + # where to put the end tag, so seems best to do nothing. + } + + $string; +} + + +############################################################## +# debug_hash_as_string($LABEL, HASH) +# +# Return LABEL followed by HASH elements, followed by a newline, as a +# single string. If HASH is a reference, it is followed (but no recursive +# derefencing). +############################################################### +sub debug_hash_as_string { + my ($label) = shift; + my (%hash) = (ref $_[0] && $_[0] =~ /.*HASH.*/) ? %{$_[0]} : @_; + + my $str = "$label: {"; + my @items = (); + for my $key (sort keys %hash) { + my $val = $hash{$key}; + $val = ".undef" if ! defined $val; + $key =~ s/\n/\\n/g; + $val =~ s/\n/\\n/g; + push (@items, "$key:$val"); + } + $str .= join (",", @items); + $str .= "}"; + + return "$str\n"; +} + 1; __END__ =pod -=encoding utf-8 +=encoding UTF-8 =head1 NAME @@ -132,68 +516,242 @@ LaTeX::ToUnicode - Convert LaTeX commands to Unicode =head1 VERSION -version 0.11 +version 0.53 =head1 SYNOPSIS - use LaTeX::ToUnicode qw( convert ); + use LaTeX::ToUnicode qw( convert debuglevel $endcw ); - convert( '{\"a}' ) eq 'ä'; # true - convert( '"a', german => 1 ) eq 'ä'; # true, `german' package syntax - convert( '"a', ) eq '"a'; # not enabled by default + # simple examples: + convert( '{\"a}' ) eq 'ä'; # true + convert( '{\"a}', entities=>1 ) eq '�EF;'; # true + convert( '"a', german=>1 ) eq 'ä'; # true, `german' package syntax + convert( '"a', ) eq '"a'; # false, not enabled by default # more generally: my $latexstr; - my $unistr = convert($latexstr); - -=head1 DESCRIPTION + my $unistr = convert($latexstr); # get literal (binary) Unicode characters -This module provides a method to convert LaTeX-style markups for accents etc. -into their Unicode equivalents. It translates commands for special characters -or accents into their Unicode equivalents and removes formatting commands. -It is not at all bulletproof or complete. + my $entstr = convert($latexstr, entities=>1); # get &#xUUUU; + + my $htmstr = convert($latexstr, entities=>1, html=>1); # also html markup + + my $unistr = convert($latexstr, hook=>\&my_hook); # user-defined hook + + # if nonzero, dumps various info; perhaps other levels in the future. + LaTeX::ToUnicode::debuglevel($verbose); -This module converts values from BibTeX files into plain text. If your -use case is different, YMMV. + # regexp for terminating TeX control words, e.g., in hooks. + my $endcw = $LaTeX::ToUnicode::endcw; + $string =~ s/\\newline$endcw/ /g; # translate \newline to space + +=head1 DESCRIPTION -In contrast to L<TeX::Encode>, this module does not create HTML of any -kind, including for HTML/XML metacharacters such as E<lt>, E<gt>, C<&>, -which can appear literally in the output. Entities are other handling -for these has to happen at another level, if need be. +This module provides a method to convert LaTeX markups for accents etc. +into their Unicode equivalents. It translates some commands for special +characters or accents into their Unicode (or HTML) equivalents and +removes formatting commands. It is not at all bulletproof or complete. + +This module is intended to convert fragments of LaTeX source, such as +bibliography entries and abstracts, into plain text (or, optionally, +simplistic HTML). It is not a document conversion system. Math, tables, +figures, sectioning, etc., are not handled in any way, and mostly left +in their TeX form in the output. The translations assume standard LaTeX +meanings for characters and control sequences; macros in the input are +not considered. + +The aim for all the output is utter simplicity and minimalism, not +faithful translation. For example, although Unicode has a code point for +a thin space, the LaTeX C<\thinspace> (etc.) command is translated to +the empty string; such spacing refinements desirable in the TeX output +are, in our experience, generally not desired in the HTML output from +this tool. + +As another example, TeX C<%> comments are not removed, even on lines by +themselves, because they may be inside verbatim blocks, and we don't +attempt to keep any such context. In practice, TeX comments are rare in +the text fragments intended to be handled, so removing them in advance +has not been a great burden. + +As another example, LaTeX ties, C<~> characters, are replaced with +normal spaces (exception: unless they follow a C</> character or at the +beginning of a line, when they're assumed to be part of a url or a +pathname), rather than a no-break space character, because in our +experience most ties intended for the TeX output would just cause +trouble in plain text or HTML. + +Regarding normal whitespace: all leading and trailing horizontal +whitespace (that is, SPC and TAB) is removed. All internal horizontal +whitespace sequences are collapsed to a single space. + +After the conversions, all brace characters (C<{}>) are simply removed +from the returned string. This turns out to be a significant convenience +in practice, since many LaTeX commands which take arguments don't need +to do anything for our purposes except output the argument. + +On the other hand, backslashes are not removed. This is so the caller +can check for C<\\> and thus discover untranslated commands. Of course +there are many other constructs that might not be translated, or +translated wrongly. There is no escaping the need to carefully look at +the output. + +Suggestions and bug reports are welcome for practical needs; we know +full well that there are hundreds of commands not handled that could be. +Virtually all the behavior mentioned here would be easily made +customizable, if there is a need to do so. =head1 FUNCTIONS =head2 convert( $latex_string, %options ) -Convert the text in C<$string> that contains LaTeX into a plain(er) -Unicode string. All escape sequences for accented and special characters -(e.g., \i, \"a, ...) are converted. Basic formatting commands (e.g. {\it -...}) are removed. +Convert the text in C<$latex_string> into a plain(er) Unicode string. +Escape sequences for accented and special characters (e.g., C<\i>, +C<\"a>, ...) are converted. A few basic formatting commands (e.g., +C<{\it ...}>) are removed. See the L<LaTeX::ToUnicode::Tables> submodule +for the full conversion tables. -C<%options> allows you to enable additional translations. These keys are -recognized: +These keys are recognized in C<%options>: =over +=item C<entities> + +Output C<&#xUUUU;> entities (valid in XML); in this case, also convert +the E<lt>, E<gt>, C<&> metacharacters to entities. Recognized non-ASCII +Unicode characters in the original input are also converted to entities, +not only the translations from TeX commands. + +The default is to output literal (binary) Unicode characters, and +not change any metacharacters. + =item C<german> If this option is set, the commands introduced by the package `german' (e.g. C<"a> eq C<ä>, note the missing backslash) are also handled. +=item C<html> + +If this option is set, the output is simplistic html rather than plain +text. This affects only a few things: S<1) the> output of urls from +C<\url> and C<\href>; S<2) the> output of markup commands like +C<\textbf> (but nested markup commands don't work); S<3) two> other +random commands, C<\enquote> and C<\path>, because they are needed. + +=item C<hook> + +The value must be a function that takes two arguments and returns a +string. The first argument is the incoming string (may be multiple +lines), and the second argument is a hash reference of options, exactly +what was passed to this C<convert> function. Thus the hook can detect +whether html is needed. + +The hook is called (almost) right away, before any of the other +conversions have taken place. That way the hook can make use of the +predefined conversions instead of repeating them. The only changes made +to the input string before the hook is called are trivial: leading and +trailing whitespace (space and tab) on each line are removed, and, for +HTML output, incoming ampersand, less-than, and greater-than characters +are replaced with their entities. + +Any substitutions that result in Unicode code points must use +C<\\x{nnnn}> on the right hand side: that's two backslashes and a +four-digit hex number. + +As an example, here is a skeleton of the hook function for TUGboat: + + sub LaTeX_ToUnicode_convert_hook { + my ($string,$options) = @_; + + my $endcw = $LaTeX::ToUnicode::endcw; + die "no endcw regexp in LaTeX::ToUnicode??" if ! $endcw; + + ... + $string =~ s/\\newline$endcw/ /g; + + # TUB's \acro{} takes an argument, but we do nothing with it. + # The braces will be removed by convert(). + $string =~ s/\\acro$endcw//g; + ... + $string =~ s/\\CTAN$endcw/CTAN/g; + $string =~ s/\\Dash$endcw/\\x{2014}/g; # em dash; replacement is string + ... + + # ignore \begin{abstract} and \end{abstract} commands. + $string =~ s,\\(begin|end)$endcw\{abstract\}\s*,,g; + + # Output for our url abbreviations, and other commands, depends on + # whether we're generating plain text or HTML. + if ($options->{html}) { + # HTML. + # \tbsurl{URLBASE} -> <a href="https://URLBASE">URLBASE</a> + $string =~ s,\\tbsurl$endcw\{([^}]*)\} + ,<a href="https://$1">$1</a>,gx; + ... + # varepsilon, and no line break at hyphen. + $string =~ s,\\eTeX$endcw,\\x{03B5}<nobr>-</nobr>TeX,g; + + } else { + # for plain text, we can just prepend the protocol://. + $string =~ s,\\tbsurl$endcw,https://,g; + ... + $string =~ s,\\eTeX$endcw,\\x{03B5}-TeX,g; + } + ... + return $string; + } + +As shown here for C<\eTeX> (an abbreviation macro defined in the +TUGboat style files), if markup is desired in the output, the +substitutions must be different for HTML and plain text. Otherwise, the +desired HTML markup is transliterated as if it were plain text. Or else +the translations must be extended so that TeX markup can be used on the +rhs to be replaced with the desired HTML (C<<nobr>> in this case). + +For the full definition (and plenty of additional information), +see the file C<ltx2crossrefxml-tugboat.cfg> in the TUGboat source +repository at +<https://github.com/TeXUsersGroup/tugboat/tree/trunk/capsules/crossref>. + +The hook function is specified in the C<convert()> call like this: + + LaTeX::ToUnicode::convert(..., { hook => \&LaTeX_ToUnicode_convert_hook }) + =back +=head2 debuglevel( $level ) + +Output debugging information if C<$level> is nonzero. + +=head2 $endcw + +A predefined regexp for terminating TeX control words (not control +symbols!). Can be used in, for example, hook functions: + + my $endcw = $LaTeX::ToUnicode::endcw; + $string =~ s/\\newline$endcw/ /g; # translate \newline to space + +It's defined as follows: + + our $endcw = qr/(?<=[a-zA-Z])(?=[^a-zA-Z]|$)\s*/; + +That is, look behind for an alphabetic character, then look ahead for a +non-alphabetic character (or end of line), then consume whitespace. +Fingers crossed. + =head1 AUTHOR -Gerhard Gossen <gerhard.gossen@googlemail.com> and -Boris Veytsman <boris@varphi.com> +Gerhard Gossen <gerhard.gossen@googlemail.com>, +Boris Veytsman <boris@varphi.com>, +Karl Berry <karl@freefriends.org> + L<https://github.com/borisveytsman/bibtexperllibs> =head1 COPYRIGHT AND LICENSE -This software is copyright (c) 2010-2020 by Gerhard Gossen and Boris Veytsman +Copyright 2010-2023 Gerhard Gossen, Boris Veytsman, Karl Berry This is free software; you can redistribute it and/or modify it under -the same terms as the Perl 5 programming language system itself. +the same terms as the Perl5 programming language system itself. =cut diff --git a/support/bibtexperllibs/LaTeX-ToUnicode/lib/LaTeX/ToUnicode/Tables.pm b/support/bibtexperllibs/LaTeX-ToUnicode/lib/LaTeX/ToUnicode/Tables.pm index a9aef54834..fd82b3ea7c 100644 --- a/support/bibtexperllibs/LaTeX-ToUnicode/lib/LaTeX/ToUnicode/Tables.pm +++ b/support/bibtexperllibs/LaTeX-ToUnicode/lib/LaTeX/ToUnicode/Tables.pm @@ -1,449 +1,585 @@ package LaTeX::ToUnicode::Tables; BEGIN { - $LaTeX::ToUnicode::Tables::VERSION = '0.11'; + $LaTeX::ToUnicode::Tables::VERSION = '0.53'; } use strict; use warnings; #ABSTRACT: Character tables for LaTeX::ToUnicode -use utf8; - +use utf8; # just for the german support # Technically not all of these are ligatures, but close enough. # Order is important, so has to be a list, not a hash. +# our @LIGATURES = ( - "---" => "\x{2014}", # em dash - "--" => "\x{2013}", # en dash - "!`" => "\x{00A1}", # inverted exclam - "?`" => "\x{00A1}", # inverted question - "``" => "\x{201c}", # left double - "''" => "\x{201d}", # right double - "`" => "\x{2018}", # left single - "'" => "\x{2019}", # right single + "---" => '\x{2014}', # em dash + "--" => '\x{2013}', # en dash + "!`" => '\x{00A1}', # inverted exclam + "?`" => '\x{00A1}', # inverted question + "``" => '\x{201c}', # left double + "''" => '\x{201d}', # right double + "`" => '\x{2018}', # left single + "'" => '\x{2019}', # right single +); +# test text: em---dash, en--dash, exc!`am, quest?`ion, ``ld, rd'', `ls, rs'. +# +# Some additional ligatures supported in T1 encoding, but we won't (from +# tex-text.map): +# U+002C U+002C <> U+201E ; ,, -> DOUBLE LOW-9 QUOTATION MARK +# U+003C U+003C <> U+00AB ; << -> LEFT POINTING GUILLEMET +# U+003E U+003E <> U+00BB ; >> -> RIGHT POINTING GUILLEMET + +# for {\MARKUP(shape) ...} and \textMARKUP{...}; although not all +# command names are defined in LaTeX for all markups, we translate them +# anyway. Also, LaTeX has more font axes not included here: md, ulc, sw, +# ssc, etc. See ltfntcmd.dtx and ltfssaxes.dtx if we ever want to try +# for completeness. +# +our %MARKUPS = ( + 'bf' => 'b', + 'cal' => '', + 'em' => 'em', + 'it' => 'i', + 'rm' => '', + 'sc' => '', # qqq should uppercasify + 'sf' => '', + 'sl' => 'i', + 'small' => '', + 'subscript' => 'sub', + 'superscript' => 'sup', + 'tt' => 'tt', +); + +# More commands taking arguments that we want to handle. +# +our %ARGUMENT_COMMANDS = ( + 'emph' => ['\textem{', '}'], # \textem doesn't exist, but is processed + 'enquote' => ["`", "'"], + 'path' => ['\texttt{', '}'], # ugh, might not be a braced argument ); -# test text: em---dash, en---dash, exc!`am, quest?`ion, ``ld, rd'', `ls, rs'. - -# additions supported in T1 encoding, but we won't (from tex-text.map): -# U+002C U+002C <> U+201E ; ,, -> DOUBLE LOW-9 QUOTATION MARK -# U+003C U+003C <> U+00AB ; << -> LEFT POINTING GUILLEMET -# U+003E U+003E <> U+00BB ; >> -> RIGHT POINTING GUILLEMET - - -our @SPECIALS = ( qw( $ % & _ { } ), '#' ); - -our %COMMANDS = ( - 'LaTeX' => 'LaTeX', - 'TeX' => 'TeX', - ' ' => ' ', # control space - '-' => '', # hyphenation - '/' => '', # italic correction - 'dag' => "\x{2020}", - 'ddag' => "\x{2021}", - 'bullet' => "\x{2022}", - 'dots' => "\x{2026}", - 'ldots' => "\x{2026}", - 'epsilon' => "\x{03F5}", - 'varepsilon' => "\x{03B5}", - 'Omega' => "\x{03A9}", - 'omega' => "\x{03C9}", - 'hookrightarrow' => "\x{2194}", - 'log' => 'log', + +# Non-alphabetic \COMMANDs, other than accents and special cases. +# +our %CONTROL_SYMBOLS = ( + ' ' => ' ', # control space + "\t" => ' ', # control space + "\n" => '\x{0020}', # control space; use entity to avoid being trimmed + '!' => '', # negative thin space + # " umlaut + '#' => '#', # sharp sign + '$' => '$', # dollar sign + '%' => '%', # percent sign + '&' => '\x{0026}', # ampersand, entity to avoid html conflict + # ' acute accent + '(' => '', # start inline math + ')' => '', # end inline math + '*' => '', # discretionary multiplication + '+' => '', # tabbing: tab stop to right + ',' => '', # thin space + '-' => '', # discretionary hyphenation + # . overdot accent + '/' => '', # italic correction + # 0..9 undefined + ':' => '', # medium space + ';' => ' ', # thick space + '<' => '', # tabbing: text to left of margin + # = macron accent + '>' => '', # tabbing: next tab stop + # ? undefined + '@' => '#', # end of sentence + # A..Z control words, not symbols + '[' => '', # start display math + '\\' => ' ', # line break + ']' => '', # end display math + # ^ circumflex accent + '_' => '_', # underscore + # ` grave accent + # a..z control words, not symbols + '{' => '\x{007b}', # lbrace + '|' => '\x{2225}', # parallel + '}' => '\x{007d}', # rbrace + # ~ tilde accent +); + +# Alphabetic \COMMANDs that map to nothing. This is simply +# interpolated into %CONTROL_WORDS (next), not used directly, so we +# redundantly specify the '' on every line. +# +our %CONTROL_WORDS_EMPTY = ( + 'begingroup' => '', + 'bgroup' => '', + 'checkcomma' => '', + #'cite' => '', # keep \cite undefined since it needs manual work + 'clearpage' => '', + 'doi' => '', + 'egroup' => '', + 'endgroup' => '', + 'hbox' => '', + 'ignorespaces' => '', + 'mbox' => '', + 'medspace' => '', + 'negmedspace' => '', + 'negthickspace' => '', + 'negthinspace' => '', + 'newblock' => '', + 'newpage' => '', + 'noindent' => '', + 'nolinkurl' => '', + 'oldstylenums' => '', + 'pagebreak' => '', + 'protect' => '', + 'raggedright' => '', + 'relax' => '', + 'thinspace' => '', + 'unskip' => '', + 'urlprefix' => '', ); +# Alphabetic commands, that expand to nothing (above) and to +# something (below). +# +our %CONTROL_WORDS = ( + %CONTROL_WORDS_EMPTY, + 'BibLaTeX' => 'BibLaTeX', + 'BibTeX' => 'BibTeX', + 'LaTeX' => 'LaTeX', + 'LuaLaTeX' => 'LuaLaTeX', + 'LuaTeX' => 'LuaTeX', + 'MF' => 'Metafont', + 'MP' => 'MetaPost', + 'Omega' => '\x{03A9}', + 'TeX' => 'TeX', + 'XeLaTeX' => 'XeLaTeX', + 'XeTeX' => 'XeTeX', + 'bullet' => '\x{2022}', + 'dag' => '\x{2020}', + 'ddag' => '\x{2021}', + 'dots' => '\x{2026}', + 'epsilon' => '\x{03F5}', + 'hookrightarrow' => '\x{2194}', + 'ldots' => '\x{2026}', + 'log' => 'log', + 'omega' => '\x{03C9}', + 'par' => "\n\n", + 'qquad' => ' ', # 2em space + 'quad' => ' ', # em space + 'textbackslash' => '\x{005C}', # entities so \ in output indicates + # untranslated TeX source + 'textbraceleft' => '\x{007B}', # entities so our bare-brace removal + 'textbraceright' => '\x{007D}', # skips them + 'textgreater' => '\x{003E}', + 'textless' => '\x{003C}', + 'textquotedbl' => '"', + 'thickspace' => ' ', + 'varepsilon' => '\x{03B5}', +); +# Control words (not symbols) that generate various non-English +# letters and symbols. Lots more could be added. +# our %SYMBOLS = ( # Table 3.2 in Lamport, plus more - 'AA' => "\x{00C5}", # A with ring - 'aa' => "\x{00E5}", - 'AE' => "\x{00C6}", # AE - 'ae' => "\x{00E6}", - 'DH' => "\x{00D0}", # ETH - 'dh' => "\x{00F0}", - 'DJ' => "\x{0110}", # D with stroke - 'dj' => "\x{0111}", - 'i' => "\x{0131}", # small dotless i - 'L' => "\x{0141}", # L with stroke - 'l' => "\x{0142}", - 'NG' => "\x{014A}", # ENG - 'ng' => "\x{014B}", - 'OE' => "\x{0152}", # OE - 'oe' => "\x{0153}", - 'O' => "\x{00D8}", # O with stroke - 'o' => "\x{00F8}", + 'AA' => '\x{00C5}', # A with ring + 'aa' => '\x{00E5}', + 'AE' => '\x{00C6}', # AE + 'ae' => '\x{00E6}', + 'DH' => '\x{00D0}', # ETH + 'dh' => '\x{00F0}', + 'DJ' => '\x{0110}', # D with stroke + 'dj' => '\x{0111}', + 'i' => '\x{0131}', # small dotless i + 'L' => '\x{0141}', # L with stroke + 'l' => '\x{0142}', + 'NG' => '\x{014A}', # ENG + 'ng' => '\x{014B}', + 'OE' => '\x{0152}', # OE + 'oe' => '\x{0153}', + 'O' => '\x{00D8}', # O with stroke + 'o' => '\x{00F8}', 'SS' => 'SS', # lately also U+1E9E, but SS seems good enough - 'ss' => "\x{00DF}", - 'TH' => "\x{00DE}", # THORN - 'th' => "\x{00FE}", - 'TM' => "\x{2122}", # trade mark sign + 'ss' => '\x{00DF}', + 'TH' => '\x{00DE}', # THORN + 'textordfeminine' => '\x{00AA}', + 'textordmasculine' => '\x{00BA}', + 'textregistered' => '\x{00AE}', + 'th' => '\x{00FE}', + 'TM' => '\x{2122}', # trade mark sign ); - -our %ACCENTS = ( - "\"" => { # with diaresis - A => "\x{00C4}", - E => "\x{00CB}", - H => "\x{1E26}", - I => "\x{00CF}", - O => "\x{00D6}", - U => "\x{00DC}", - W => "\x{1E84}", - X => "\x{1E8c}", - Y => "\x{0178}", - "\\I" => "\x{00CF}", - "\\i" => "\x{00EF}", - a => "\x{00E4}", - e => "\x{00EB}", - h => "\x{1E27}", - i => "\x{00EF}", - o => "\x{00F6}", - t => "\x{1E97}", - u => "\x{00FC}", - w => "\x{1E85}", - x => "\x{1E8d}", - y => "\x{00FF}", +# Accent commands that are not alphabetic. +# +our %ACCENT_SYMBOLS = ( + "\"" => { # with diaresis + A => '\x{00C4}', + E => '\x{00CB}', + H => '\x{1E26}', + I => '\x{00CF}', + O => '\x{00D6}', + U => '\x{00DC}', + W => '\x{1E84}', + X => '\x{1E8c}', + Y => '\x{0178}', + "\\I" => '\x{00CF}', + "\\i" => '\x{00EF}', + a => '\x{00E4}', + e => '\x{00EB}', + h => '\x{1E27}', + i => '\x{00EF}', + o => '\x{00F6}', + t => '\x{1E97}', + u => '\x{00FC}', + w => '\x{1E85}', + x => '\x{1E8d}', + y => '\x{00FF}', }, - "'" => { # with acute - A => "\x{00C1}", - AE => "\x{01FC}", - C => "\x{0106}", - E => "\x{00C9}", - G => "\x{01F4}", - I => "\x{00CD}", - K => "\x{1E30}", - L => "\x{0139}", - M => "\x{1E3E}", - N => "\x{0143}", - O => "\x{00D3}", - P => "\x{1E54}", - R => "\x{0154}", - S => "\x{015A}", - U => "\x{00DA}", - W => "\x{1E82}", - Y => "\x{00DD}", - Z => "\x{0179}", - "\\I" => "\x{00CD}", - "\\i" => "\x{00ED}", - a => "\x{00E1}", - ae => "\x{01FD}", - c => "\x{0107}", - e => "\x{00E9}", - g => "\x{01F5}", - i => "\x{00ED}", - k => "\x{1E31}", - l => "\x{013A}", - m => "\x{1E3f}", - n => "\x{0144}", - o => "\x{00F3}", - p => "\x{1E55}", - r => "\x{0155}", - s => "\x{015B}", - u => "\x{00FA}", - w => "\x{1E83}", - y => "\x{00FD}", - z => "\x{017A}", + "'" => { # with acute + A => '\x{00C1}', + AE => '\x{01FC}', + C => '\x{0106}', + E => '\x{00C9}', + G => '\x{01F4}', + I => '\x{00CD}', + K => '\x{1E30}', + L => '\x{0139}', + M => '\x{1E3E}', + N => '\x{0143}', + O => '\x{00D3}', + P => '\x{1E54}', + R => '\x{0154}', + S => '\x{015A}', + U => '\x{00DA}', + W => '\x{1E82}', + Y => '\x{00DD}', + Z => '\x{0179}', + "\\I" => '\x{00CD}', + "\\i" => '\x{00ED}', + a => '\x{00E1}', + ae => '\x{01FD}', + c => '\x{0107}', + e => '\x{00E9}', + g => '\x{01F5}', + i => '\x{00ED}', + k => '\x{1E31}', + l => '\x{013A}', + m => '\x{1E3f}', + n => '\x{0144}', + o => '\x{00F3}', + p => '\x{1E55}', + r => '\x{0155}', + s => '\x{015B}', + u => '\x{00FA}', + w => '\x{1E83}', + y => '\x{00FD}', + z => '\x{017A}', }, - "." => { # with dot above - A => "\x{0226}", - B => "\x{1E02}", - C => "\x{010A}", - D => "\x{1E0A}", - E => "\x{0116}", - F => "\x{1E1E}", - G => "\x{0120}", - H => "\x{1E22}", - I => "\x{0130}", - M => "\x{1E40}", - N => "\x{1E44}", - O => "\x{022E}", - P => "\x{1E56}", - R => "\x{1E58}", - S => "\x{1E60}", - T => "\x{1E6a}", - W => "\x{1E86}", - X => "\x{1E8A}", - Y => "\x{1E8E}", - Z => "\x{017B}", - "\\I" => "\x{0130}", - a => "\x{0227}", - b => "\x{1E03}", - c => "\x{010B}", - d => "\x{1E0B}", - e => "\x{0117}", - f => "\x{1e1f}", - g => "\x{0121}", - h => "\x{1E23}", - m => "\x{1E41}", - n => "\x{1E45}", - o => "\x{022F}", - p => "\x{1E57}", - r => "\x{1E59}", - s => "\x{1E61}", - t => "\x{1E6b}", - w => "\x{1E87}", - x => "\x{1E8b}", - y => "\x{1E8f}", - z => "\x{017C}", + "^" => { # with circumflex + A => '\x{00C2}', + C => '\x{0108}', + E => '\x{00CA}', + G => '\x{011C}', + H => '\x{0124}', + I => '\x{00CE}', + J => '\x{0134}', + O => '\x{00D4}', + R => 'R\x{0302}', + S => '\x{015C}', + U => '\x{00DB}', + W => '\x{0174}', + Y => '\x{0176}', + Z => '\x{1E90}', + "\\I" => '\x{00CE}', + "\\J" => '\x{0134}', + "\\i" => '\x{00EE}', + "\\j" => '\x{0135}', + a => '\x{00E2}', + c => '\x{0109}', + e => '\x{00EA}', + g => '\x{011D}', + h => '\x{0125}', + i => '\x{00EE}', + j => '\x{0135}', + o => '\x{00F4}', + s => '\x{015D}', + u => '\x{00FB}', + w => '\x{0175}', + y => '\x{0177}', + z => '\x{1E91}', }, - '=' => { # with macron - A => "\x{0100}", - AE => "\x{01E2}", - E => "\x{0112}", - G => "\x{1E20}", - I => "\x{012A}", - O => "\x{014C}", - U => "\x{016A}", - Y => "\x{0232}", - "\\I" => "\x{012A}", - "\\i" => "\x{012B}", - a => "\x{0101}", - ae => "\x{01E3}", - e => "\x{0113}", - g => "\x{1E21}", - i => "\x{012B}", - o => "\x{014D}", - u => "\x{016B}", - y => "\x{0233}", + "`" => { # with grave + A => '\x{00C0}', + E => '\x{00C8}', + I => '\x{00CC}', + N => '\x{01F8}', + O => '\x{00D2}', + U => '\x{00D9}', + W => '\x{1E80}', + Y => '\x{1Ef2}', + "\\I" => '\x{00CC}', + "\\i" => '\x{00EC}', + a => '\x{00E0}', + e => '\x{00E8}', + i => '\x{00EC}', + n => '\x{01F9}', + o => '\x{00F2}', + u => '\x{00F9}', + w => '\x{1E81}', + y => '\x{1EF3}', }, - "H" => { # with double acute - O => "\x{0150}", - U => "\x{0170}", - o => "\x{0151}", - u => "\x{0171}", + "." => { # with dot above + A => '\x{0226}', + B => '\x{1E02}', + C => '\x{010A}', + D => '\x{1E0A}', + E => '\x{0116}', + F => '\x{1E1E}', + G => '\x{0120}', + H => '\x{1E22}', + I => '\x{0130}', + M => '\x{1E40}', + N => '\x{1E44}', + O => '\x{022E}', + P => '\x{1E56}', + R => '\x{1E58}', + S => '\x{1E60}', + T => '\x{1E6a}', + W => '\x{1E86}', + X => '\x{1E8A}', + Y => '\x{1E8E}', + Z => '\x{017B}', + "\\I" => '\x{0130}', + a => '\x{0227}', + b => '\x{1E03}', + c => '\x{010B}', + d => '\x{1E0B}', + e => '\x{0117}', + f => '\x{1e1f}', + g => '\x{0121}', + h => '\x{1E23}', + m => '\x{1E41}', + n => '\x{1E45}', + o => '\x{022F}', + p => '\x{1E57}', + r => '\x{1E59}', + s => '\x{1E61}', + t => '\x{1E6b}', + w => '\x{1E87}', + x => '\x{1E8b}', + y => '\x{1E8f}', + z => '\x{017C}', }, - "^" => { # with circumflex - A => "\x{00C2}", - C => "\x{0108}", - E => "\x{00CA}", - G => "\x{011C}", - H => "\x{0124}", - I => "\x{00CE}", - J => "\x{0134}", - O => "\x{00D4}", - S => "\x{015C}", - U => "\x{00DB}", - W => "\x{0174}", - Y => "\x{0176}", - Z => "\x{1E90}", - "\\I" => "\x{00CE}", - "\\J" => "\x{0134}", - "\\i" => "\x{00EE}", - "\\j" => "\x{0135}", - a => "\x{00E2}", - c => "\x{0109}", - e => "\x{00EA}", - g => "\x{011D}", - h => "\x{0125}", - i => "\x{00EE}", - j => "\x{0135}", - o => "\x{00F4}", - s => "\x{015D}", - u => "\x{00FB}", - w => "\x{0175}", - y => "\x{0177}", - z => "\x{1E91}", + '=' => { # with macron + A => '\x{0100}', + AE => '\x{01E2}', + E => '\x{0112}', + G => '\x{1E20}', + I => '\x{012A}', + O => '\x{014C}', + U => '\x{016A}', + Y => '\x{0232}', + "\\I" => '\x{012A}', + "\\i" => '\x{012B}', + a => '\x{0101}', + ae => '\x{01E3}', + e => '\x{0113}', + g => '\x{1E21}', + i => '\x{012B}', + o => '\x{014D}', + u => '\x{016B}', + y => '\x{0233}', }, - "`" => { # with grave - A => "\x{00C0}", - E => "\x{00C8}", - I => "\x{00CC}", - N => "\x{01F8}", - O => "\x{00D2}", - U => "\x{00D9}", - W => "\x{1E80}", - Y => "\x{1Ef2}", - "\\I" => "\x{00CC}", - "\\i" => "\x{00EC}", - a => "\x{00E0}", - e => "\x{00E8}", - i => "\x{00EC}", - n => "\x{01F9}", - o => "\x{00F2}", - u => "\x{00F9}", - w => "\x{1E81}", - y => "\x{1EF3}", + "~" => { # with tilde + A => '\x{00C3}', + E => '\x{1EBC}', + I => '\x{0128}', + N => '\x{00D1}', + O => '\x{00D5}', + U => '\x{0168}', + V => '\x{1E7C}', + Y => '\x{1EF8}', + "\\I" => '\x{0128}', + "\\i" => '\x{0129}', + a => '\x{00E3}', + e => '\x{1EBD}', + i => '\x{0129}', + n => '\x{00F1}', + o => '\x{00F5}', + u => '\x{0169}', + v => '\x{1E7D}', + y => '\x{1EF9}', }, - "c" => { # with cedilla - C => "\x{00C7}", - D => "\x{1E10}", - E => "\x{0228}", - G => "\x{0122}", - H => "\x{1E28}", - K => "\x{0136}", - L => "\x{013B}", - N => "\x{0145}", - R => "\x{0156}", - S => "\x{015E}", - T => "\x{0162}", - c => "\x{00E7}", - d => "\x{1E11}", - e => "\x{0229}", - g => "\x{0123}", - h => "\x{1E29}", - k => "\x{0137}", - l => "\x{013C}", - n => "\x{0146}", - r => "\x{0157}", - s => "\x{015F}", - t => "\x{0163}", +); + +# Accent commands that are alphabetic. +# +our %ACCENT_LETTERS = ( + "H" => { # with double acute + O => '\x{0150}', + U => '\x{0170}', + o => '\x{0151}', + u => '\x{0171}', }, - "d" => { # with dot below - A => "\x{1EA0}", - B => "\x{1E04}", - D => "\x{1E0C}", - E => "\x{1EB8}", - H => "\x{1E24}", - I => "\x{1ECA}", - K => "\x{1E32}", - L => "\x{1E36}", - M => "\x{1E42}", - N => "\x{1E46}", - O => "\x{1ECC}", - R => "\x{1E5A}", - S => "\x{1E62}", - T => "\x{1E6C}", - U => "\x{1EE4}", - V => "\x{1E7E}", - W => "\x{1E88}", - Y => "\x{1Ef4}", - Z => "\x{1E92}", - "\\I" => "\x{1ECA}", - "\\i" => "\x{1ECB}", - a => "\x{1EA1}", - b => "\x{1E05}", - d => "\x{1E0D}", - e => "\x{1EB9}", - h => "\x{1E25}", - i => "\x{1ECB}", - k => "\x{1E33}", - l => "\x{1E37}", - m => "\x{1E43}", - n => "\x{1E47}", - o => "\x{1ECD}", - r => "\x{1E5b}", - s => "\x{1E63}", - t => "\x{1E6D}", - u => "\x{1EE5}", - v => "\x{1E7F}", - w => "\x{1E89}", - y => "\x{1EF5}", - z => "\x{1E93}", + "c" => { # with cedilla + C => '\x{00C7}', + D => '\x{1E10}', + E => '\x{0228}', + G => '\x{0122}', + H => '\x{1E28}', + K => '\x{0136}', + L => '\x{013B}', + N => '\x{0145}', + R => '\x{0156}', + S => '\x{015E}', + T => '\x{0162}', + c => '\x{00E7}', + d => '\x{1E11}', + e => '\x{0229}', + g => '\x{0123}', + h => '\x{1E29}', + k => '\x{0137}', + l => '\x{013C}', + n => '\x{0146}', + r => '\x{0157}', + s => '\x{015F}', + t => '\x{0163}', }, - "h" => { # with hook above - A => "\x{1EA2}", - E => "\x{1EBA}", - I => "\x{1EC8}", - O => "\x{1ECe}", - U => "\x{1EE6}", - Y => "\x{1EF6}", - "\\I" => "\x{1EC8}", - "\\i" => "\x{1EC9}", - a => "\x{1EA3}", - e => "\x{1EBB}", - i => "\x{1EC9}", - o => "\x{1ECF}", - u => "\x{1EE7}", - y => "\x{1EF7}", + "d" => { # with dot below + A => '\x{1EA0}', + B => '\x{1E04}', + D => '\x{1E0C}', + E => '\x{1EB8}', + H => '\x{1E24}', + I => '\x{1ECA}', + K => '\x{1E32}', + L => '\x{1E36}', + M => '\x{1E42}', + N => '\x{1E46}', + O => '\x{1ECC}', + R => '\x{1E5A}', + S => '\x{1E62}', + T => '\x{1E6C}', + U => '\x{1EE4}', + V => '\x{1E7E}', + W => '\x{1E88}', + Y => '\x{1Ef4}', + Z => '\x{1E92}', + "\\I" => '\x{1ECA}', + "\\i" => '\x{1ECB}', + a => '\x{1EA1}', + b => '\x{1E05}', + d => '\x{1E0D}', + e => '\x{1EB9}', + h => '\x{1E25}', + i => '\x{1ECB}', + k => '\x{1E33}', + l => '\x{1E37}', + m => '\x{1E43}', + n => '\x{1E47}', + o => '\x{1ECD}', + r => '\x{1E5b}', + s => '\x{1E63}', + t => '\x{1E6D}', + u => '\x{1EE5}', + v => '\x{1E7F}', + w => '\x{1E89}', + y => '\x{1EF5}', + z => '\x{1E93}', }, - "k" => { # with ogonek - A => "\x{0104}", - E => "\x{0118}", - I => "\x{012E}", - O => "\x{01EA}", - U => "\x{0172}", - "\\I" => "\x{012E}", - "\\i" => "\x{012F}", - a => "\x{0105}", - e => "\x{0119}", - i => "\x{012F}", - o => "\x{01EB}", - u => "\x{0173}", + "h" => { # with hook above + A => '\x{1EA2}', + E => '\x{1EBA}', + I => '\x{1EC8}', + O => '\x{1ECe}', + U => '\x{1EE6}', + Y => '\x{1EF6}', + "\\I" => '\x{1EC8}', + "\\i" => '\x{1EC9}', + a => '\x{1EA3}', + e => '\x{1EBB}', + i => '\x{1EC9}', + o => '\x{1ECF}', + u => '\x{1EE7}', + y => '\x{1EF7}', }, - "r" => { # with ring above - A => "\x{00C5}", - U => "\x{016E}", - a => "\x{00E5}", - u => "\x{016F}", - w => "\x{1E98}", - y => "\x{1E99}", + "k" => { # with ogonek + A => '\x{0104}', + E => '\x{0118}', + I => '\x{012E}', + O => '\x{01EA}', + U => '\x{0172}', + "\\I" => '\x{012E}', + "\\i" => '\x{012F}', + a => '\x{0105}', + e => '\x{0119}', + i => '\x{012F}', + o => '\x{01EB}', + u => '\x{0173}', }, - "u" => { # with breve - A => "\x{0102}", - E => "\x{0114}", - G => "\x{011E}", - I => "\x{012C}", - O => "\x{014E}", - U => "\x{016C}", - "\\I" => "\x{012C}", - "\\i" => "\x{012D}", - a => "\x{0103}", - e => "\x{0115}", - g => "\x{011F}", - i => "\x{012D}", - o => "\x{014F}", - u => "\x{016D}", + "r" => { # with ring above + A => '\x{00C5}', + U => '\x{016E}', + a => '\x{00E5}', + u => '\x{016F}', + w => '\x{1E98}', + y => '\x{1E99}', }, - "v" => { # with caron - A => "\x{01CD}", - C => "\x{010C}", - D => "\x{010E}", - DZ => "\x{01C4}", - E => "\x{011A}", - G => "\x{01E6}", - H => "\x{021E}", - I => "\x{01CF}", - K => "\x{01E8}", - L => "\x{013D}", - N => "\x{0147}", - O => "\x{01D1}", - R => "\x{0158}", - S => "\x{0160}", - T => "\x{0164}", - U => "\x{01D3}", - Z => "\x{017D}", - "\\I" => "\x{01CF}", - "\\i" => "\x{01D0}", - "\\j" => "\x{01F0}", - a => "\x{01CE}", - c => "\x{010D}", - d => "\x{010F}", - dz => "\x{01C6}", - e => "\x{011B}", - g => "\x{01E7}", - h => "\x{021F}", - i => "\x{01D0}", - j => "\x{01F0}", - k => "\x{01E9}", - l => "\x{013E}", - n => "\x{0148}", - o => "\x{01D2}", - r => "\x{0159}", - s => "\x{0161}", - t => "\x{0165}", - u => "\x{01D4}", - z => "\x{017E}", + "u" => { # with breve + A => '\x{0102}', + E => '\x{0114}', + G => '\x{011E}', + I => '\x{012C}', + O => '\x{014E}', + U => '\x{016C}', + "\\I" => '\x{012C}', + "\\i" => '\x{012D}', + a => '\x{0103}', + e => '\x{0115}', + g => '\x{011F}', + i => '\x{012D}', + o => '\x{014F}', + u => '\x{016D}', }, - "~" => { # with tilde - A => "\x{00C3}", - E => "\x{1EBC}", - I => "\x{0128}", - N => "\x{00D1}", - O => "\x{00D5}", - U => "\x{0168}", - V => "\x{1E7C}", - Y => "\x{1EF8}", - "\\I" => "\x{0128}", - "\\i" => "\x{0129}", - a => "\x{00E3}", - e => "\x{1EBD}", - i => "\x{0129}", - n => "\x{00F1}", - o => "\x{00F5}", - u => "\x{0169}", - v => "\x{1E7D}", - y => "\x{1EF9}", + "v" => { # with caron + A => '\x{01CD}', + C => '\x{010C}', + D => '\x{010E}', + DZ => '\x{01C4}', + E => '\x{011A}', + G => '\x{01E6}', + H => '\x{021E}', + I => '\x{01CF}', + K => '\x{01E8}', + L => '\x{013D}', + N => '\x{0147}', + O => '\x{01D1}', + R => '\x{0158}', + S => '\x{0160}', + T => '\x{0164}', + U => '\x{01D3}', + Z => '\x{017D}', + "\\I" => '\x{01CF}', + "\\i" => '\x{01D0}', + "\\j" => '\x{01F0}', + a => '\x{01CE}', + c => '\x{010D}', + d => '\x{010F}', + dz => '\x{01C6}', + e => '\x{011B}', + g => '\x{01E7}', + h => '\x{021F}', + i => '\x{01D0}', + j => '\x{01F0}', + k => '\x{01E9}', + l => '\x{013E}', + n => '\x{0148}', + o => '\x{01D2}', + r => '\x{0159}', + s => '\x{0161}', + t => '\x{0165}', + u => '\x{01D4}', + z => '\x{017E}', }, ); - +# our %GERMAN = ( # for package `german'/`ngerman' '"a' => 'ä', '"A' => 'Ä', @@ -465,9 +601,9 @@ our %GERMAN = ( # for package `german'/`ngerman' "\"'" => '“', '"<' => '«', '">' => '»', - '"-' => "\x{AD}", # soft hyphen - '""' => "\x{200B}", # zero width space - '"~' => "\x{2011}", # non-breaking hyphen + '"-' => '\x{AD}', # soft hyphen + '""' => '\x{200B}', # zero width space + '"~' => '\x{2011}', # non-breaking hyphen '"=' => '-', '\glq' => '‚', # left german single quote '\grq' => '‘', # right german single quote @@ -476,17 +612,12 @@ our %GERMAN = ( # for package `german'/`ngerman' '\dq' => '"', ); - -# for {\MARKUP ...} and \textMARKUP{...} -our @MARKUPS = ( qw( bf cal em it rm sc sl small tt ) ); - - 1; __END__ =pod -=encoding utf-8 +=encoding UTF-8 =head1 NAME @@ -494,7 +625,7 @@ LaTeX::ToUnicode::Tables - Character tables for LaTeX::ToUnicode =head1 VERSION -version 0.11 +version 0.53 =head1 CONSTANTS @@ -503,29 +634,70 @@ version 0.11 Standard TeX character sequences (not \commands) which need to be replaced: C<---> with U+2014 (em dash), etc. Includes: em dash, en dash, inverted exclamation, inverted question, left double quote, right -double quote, left single quote, right single quote. +double quote, left single quote, right single quote. They are replaced +in that order. + +=head2 %MARKUPS + +Hash where keys are the names of formatting commands like C<\tt>, +without the backslash, namely: C<bf cal em it rm sc sf sl small tt>. Values +are the obvious HTML equivalent where one exists, given as the tag name +without the angle brackets: C<b em i tt>. Otherwise the value is the empty +string. + +=head2 %ARGUMENT_COMMANDS + +Hash where keys are the names of TeX commands taking arguments that we +handle, without the backslash, such as C<enquote>. Each value is a +reference to a list of two strings, the first being the text to insert +before the argument, the second being the text to insert after. For +example, for C<enquote> the value is C<["`", "'"]>. The inserted text is +subject to further replacements. + +Only three such commands are currently handled: C<\emph>, C<\enquote>, +and C<\path>. + +=head2 %CONTROL_SYMBOLS -=head2 @SPECIALS +A hash where the keys are non-alphabetic C<\command>s (without the +backslash), other than accents and special cases. These don't take +arguments. Although some of these have Unicode equivalents, such as the +C<\,> thin space, it seems better to keep the output as simple as +possible; spacing tweaks in the TeX aren't usually desirable in plain +text or HTML. -Most of TeX's metacharacters, i.e., those for which C<\I<char>> typesets -I<char>: C<$ % & _ { } #>. TeX has other special characters which are not -included here, for instance: C<\ ^ ~>. +The values are single-quoted strings C<'\x{...}'>, not double-quoted +literal characters <"\x{...}">, to ease future parsing of the +TeX/text/HTML. -=head2 %COMMANDS +This hash is necessary because TeX's parsing rules for control symbols +are different from control words: no space or other token is needed to +terminate control symbols. -Names of argument-less commands like C<\LaTeX> as keys. -Values are the replacements. +=head2 %CONTROL_WORDS + +Keys are names of argument-less commands, such as C<\LaTeX> (without the +backslash). Values are the replacements, often the empty string. =head2 %SYMBOLS -Predefined escape commands for extended characters. +Keys are the commands for extended characters, such as C<\AA> (without +the backslash.) + +=head2 %ACCENT_SYMBOLS + +Two-level hash of accented characters like C<\'{a}>. The keys of this +hash are the accent symbols (without the backslash), such as C<`> and +C<'>. The corresponding values are hash references where the keys are +the base letters and the values are single-quoted C<'\x{....}'> strings. + +=head2 %ACCENT_LETTERS -=head2 %ACCENTS +Same as %ACCENT_SYMBOLS, except the keys are accents that are +alphabetic, such as C<\c> (without the backslash as always). -Two-level hash of accented characters like C<\'{a}>. The keys of this hash -are the accent symbols, e.g C<`>, C<"> or C<'>. The corresponding values are -references to hashes, where the keys are the base letters and the values are -the decoded characters. As an example, C<< $ACCENTS{'`'}->{a} eq 'à' >>. +As with control sequences, it's necessary to distinguish symbols and +alphabetic commands because of the different parsing rules. =head2 %GERMAN @@ -535,22 +707,19 @@ or C<"`"> (german left quote). Note the missing backslash. The keys of this hash are the literal character sequences. -=head2 @MARKUPS - -Command names of formatting commands like C<\tt>, namely: -C<bf cal em it rm sc sl small tt>. - =head1 AUTHOR -Gerhard Gossen <gerhard.gossen@googlemail.com> and -Boris Veytsman <boris@varphi.com> +Gerhard Gossen <gerhard.gossen@googlemail.com>, +Boris Veytsman <boris@varphi.com>, +Karl Berry <karl@freefriends.org> + L<https://github.com/borisveytsman/bibtexperllibs> =head1 COPYRIGHT AND LICENSE -This software is copyright (c) 2010-2015 by Gerhard Gossen and Boris Veytsman +Copyright 2010-2023 Gerhard Gossen, Boris Veytsman, Karl Berry This is free software; you can redistribute it and/or modify it under -the same terms as the Perl 5 programming language system itself. +the same terms as the Perl5 programming language system itself. =cut diff --git a/support/bibtexperllibs/LaTeX-ToUnicode/script/ltx2unitxt b/support/bibtexperllibs/LaTeX-ToUnicode/script/ltx2unitxt new file mode 100755 index 0000000000..661ea40417 --- /dev/null +++ b/support/bibtexperllibs/LaTeX-ToUnicode/script/ltx2unitxt @@ -0,0 +1,169 @@ +#!/usr/bin/env perl +# Use the LaTeX::ToUnicode module (also in the bibtexperllibs +# repository/package, like this script) to convert LaTeX to Unicode. +# +# We work on fragments of text, not whole documents, the goal being to +# replace LaTeX commands and syntax with obvious plain text equivalents, +# or remove them. + +use strict; +use warnings; + +use Cwd; +use File::Basename; +use File::Spec; + +BEGIN { + # find files relative to our installed location within TeX Live + chomp(my $TLMaster = `kpsewhich -var-value=SELFAUTOPARENT`); # TL root + if (length($TLMaster)) { + unshift @INC, "$TLMaster/texmf-dist/scripts/bibtexperllibs"; + } + # find development bibtexperllibs in sibling checkout to this script, + # even if $0 is a symlink. Irrelevant when using from an installation. + my $real0 = Cwd::abs_path($0); + my $scriptdir = File::Basename::dirname($real0); + my $dev_btxperllibs = Cwd::abs_path("$scriptdir/../.."); + + # we need the lib/ subdirectories inside ... + unshift (@INC, glob ("$dev_btxperllibs/*/lib")) if -d $dev_btxperllibs; + +} + +use LaTeX::ToUnicode; + +our %opts; +local *OUT; # output filehandle + +exit(main()); + +sub main { + init(); + + # by paragraph? + while (<>) { + print OUT (convert($_)); + } + + return 0; +} + +sub convert { + my ($in) = @_; + + my @args = (); # what we'll pass to the convert() fn. + # + if (defined(&{"LaTeX_ToUnicode_convert_hook"})) { + push (@args, "hook" => \&LaTeX_ToUnicode_convert_hook); } + if ($opts{e}) { push (@args, "entities" => 1); } + if ($opts{g}) { push (@args, "german" => 1); } + if ($opts{h}) { push (@args, "html" => 1); } + + LaTeX::ToUnicode::debuglevel($opts{v}); + my $out = LaTeX::ToUnicode::convert($in, @args); + + #warn "out=$out"; + return $out; +} + + +# Command line options, etc. +# +sub init { + my $USAGE = <<END; +Usage: $0 [-c CONFIG] [-o OUTPUT] [--html] [...] [INFILE]... + +Convert the LaTeX source in INFILE (or standard input) to plain text +using Unicode code points for accents and other special characters; or, +optionally, output HTML with simple translations for font changes and url +commands. + +Common accent sequences, special characters, and simple markup commands +are translated, but there is no attempt at completeness. Math, tables, +figures, sectioning, etc., are not handled in any way, and mostly left +in their TeX form in the output. The translations assume standard LaTeX +meanings for characters and control sequences; macros in the input are +not considered. + +The input can be a fragment of text, not a full document, as the purpose +of this script was to handle bibliography entries and abstracts (for the +ltx2crossrefxml script that is part of the crossrefware package). +Patches to extend this script are welcome. It uses the LaTeX::ToUnicode +Perl library for the conversion; see its documentation for details. + +Conversion is currently done line by line, so TeX constructs that cross +multiple lines are not handled properly. If it turns out to be useful, +conversion could be done by paragraph instead. + +The config file is read as a Perl source file. It can define a function +`LaTeX_ToUnicode_convert_hook()' which will be called early; the value +it returns (which must be a string) will then be subject to the standard +conversion. + +For an example of using this script and associated code, see the TUGboat +processing at +https://github.com/TeXUsersGroup/tugboat/tree/trunk/capsules/crossref. + +Options: + -c, --config=FILE read (Perl) config FILE for a hook, as explained above + -e, --entities output entities &#xNNNN; instead of literal characters + -g, --german handle some features of the german package + -h, --html output simplistic HTML instead of plain text + -o, --output=FILE output to FILE instead of stdout + -v, --verbose be verbose + -V, --version output version information and exit + -?, --help display this help and exit + +Options can be abbreviated unambiguously, and start with either - or --. + +Dev sources, bug tracker: https://github.com/borisveytsman/bibtexperllibs +Releases: https://ctan.org/pkg/bibtexperllibs +END + + my $VERSION = <<END; +ltx2unitxt (bibtexperllibs) 0.51 +Copyright 2023 Karl Berry. +This is free software: you can redistribute it and/or +modify it under the same terms as Perl itself. +END + + use Getopt::Long qw(:config no_ignore_case); # otherwise v|V is the same + + GetOptions( + "config|c=s" => \($opts{c}), + "entities|e" => \($opts{e}), + "german|g" => \($opts{g}), + "html|h" => \($opts{h}), + "output|o=s" => \($opts{o}), + "verbose|v" => \($opts{v}), + "version|V" => \($opts{V}), + "help|?" => \($opts{help})) + || die "Try $0 --help for more information.\n"; + + if ($opts{help}) { print "$USAGE\n$VERSION"; exit 0; } + if ($opts{V}) { print $VERSION; exit 0; } + + binmode(STDOUT, ":utf8"); + *OUT = *STDOUT; + + if (defined($opts{o})) { + open(OUT, ">$opts{o}") || die "open(>$opts{o}) failed: $!\n"; + binmode(OUT, ":utf8") + } + + if ($opts{c}) { + if (-r $opts{c}) { + # if config arg is absolute, fine; if not, prepend "./" as slightly + # less troublesome than putting "." in the @INC path. + my $rel = (File::Spec->file_name_is_absolute($opts{c}) ? "" : "./"); + my $cnffile = "$rel$opts{c}"; + verbose("requiring config file: $cnffile"); + require $cnffile; + } else { + die "open config file ($opts{c}) for reading failed: $!\n"; + } + } +} + + +sub verbose { print @_ if $::opts{v}; } diff --git a/support/bibtexperllibs/LaTeX-ToUnicode/t/convert.t b/support/bibtexperllibs/LaTeX-ToUnicode/t/convert.t index 9bd7a4f3d4..03cbc20331 100644 --- a/support/bibtexperllibs/LaTeX-ToUnicode/t/convert.t +++ b/support/bibtexperllibs/LaTeX-ToUnicode/t/convert.t @@ -9,7 +9,7 @@ BEGIN{ use_ok( 'LaTeX::ToUnicode', qw( convert ) ); } binmode( STDOUT, ':utf8' ); my @tests = ( [ '\LaTeX' => 'LaTeX' ], - [ '\$ \% \& \_ \{ \} \#' => '$ % & _ { } #' ], + [ '\$ \% \& \_ \#' => '$ % & _ #' ], [ '{\"{a}}' => 'ä' ], [ '{\"a}' => 'ä' ], [ '{\`{a}}' => 'à' ], diff --git a/support/bibtexperllibs/Makefile b/support/bibtexperllibs/Makefile index 6e7d5b4755..c80e99f49b 100644 --- a/support/bibtexperllibs/Makefile +++ b/support/bibtexperllibs/Makefile @@ -19,4 +19,4 @@ install: for dir in ${DIRS}; do (cd $$dir && ${MAKE} -f Makefile.TDS install); done archive: - COPYFILE_DISABLE=1 tar -czvf $(PACKAGE).tgz -C .. --exclude '*~' --exclude '*.tgz' --exclude CVS --exclude .git --exclude .gitignore --exclude blib --exclude "*.tar.gz" $(PACKAGE) + COPYFILE_DISABLE=1 tar -czvf $(PACKAGE).tgz -C .. --exclude '*~' --exclude '*.tgz' --exclude CVS --exclude .git --exclude .gitignore --exclude blib --exclude "*.tar.gz" --exclude pm_to_blib $(PACKAGE) diff --git a/support/bibtexperllibs/README b/support/bibtexperllibs/README index 4a09e6dd2e..bd28a138c9 100644 --- a/support/bibtexperllibs/README +++ b/support/bibtexperllibs/README @@ -1,24 +1,34 @@ BibTeX Perl Libs - Version 1.6 - Gerhard Gossen, Boris Veytsman and Karl Berry + Version 1.8 + Gerhard Gossen, Boris Veytsman, Karl Berry -This package provides BibTeX related Perl libraries by Gerhard Gossen, +This package provides BibTeX-related Perl libraries by Gerhard Gossen, maintained and repackaged by Boris Veytsman for TeX Live and other TDS-compliant distributions. The libraries are written in pure Perl, so shoud work out of the box on any architecture. To use them in your scripts, add to the @INC variable the directory -scripts/bibtexperllibs inside your TeX distribution. +scripts/bibtexperllibs inside your TeX distribution. A script ltx2unitxt +packages the conversion libraries for use from the command line. Bug reports, source code: https://github.com/borisveytsman/bibtexperllibs Releases: https://ctan.org/pkg/bibtexperllibs +For an example of using the LaTeX::ToUnicode module, see the +crossrefware package (which is also the reason for continued development). + Changes: - Version 1.6 2020-12-10 LaTeX::ToUnicode 0.11 for more ltx2crossrefxml support. - (No changes to BibTeX::Parser.) + version 1.8 2023-08-20 Tests updates, timestamp updates. + + version 1.7 2021-01-20 LaTeX::ToUnicode 0.51 for still more + ltx2crossrefxml support, including simple html output. + (No changes to BibTeX::Parser.) + + version 1.6 2020-12-10 LaTeX::ToUnicode 0.11 for more ltx2crossrefxml + support. (No changes to BibTeX::Parser.) - version 1.5 Upgraded BibTeX::Parser to 1.02 (bugfixes) + version 1.5 Upgraded BibTeX::Parser to 1.02 (bugfixes) version 1.4 Upgraded BibTeX::Parser to 1.01 |