From c156527946fa71c1f610e139263c08b926552028 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sat, 22 Aug 2015 21:53:51 +0000 Subject: crossrefware (22aug15) git-svn-id: svn://tug.org/texlive/trunk@38181 c570f23f-e606-0410-a88d-b1316a301751 --- .../texmf-dist/scripts/crossrefware/ltx2crossrefxml.pl | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'Master/texmf-dist/scripts') diff --git a/Master/texmf-dist/scripts/crossrefware/ltx2crossrefxml.pl b/Master/texmf-dist/scripts/crossrefware/ltx2crossrefxml.pl index 5ceee5f13df..5824511cdbf 100755 --- a/Master/texmf-dist/scripts/crossrefware/ltx2crossrefxml.pl +++ b/Master/texmf-dist/scripts/crossrefware/ltx2crossrefxml.pl @@ -56,7 +56,7 @@ Boris Veytsman =head1 COPYRIGHT AND LICENSE -Copyright (C) 2012 Boris Veytsman +Copyright (C) 2012-2015 Boris Veytsman This is free software. You may redistribute copies of it under the terms of the GNU General Public License @@ -373,7 +373,18 @@ sub SanitizeText { $string =~ s/\\doi/DOI: /g; $string =~ s/\\\\/ /g; $string =~ s/\$//g; - $string = decode('latex', $string); + # Another bug in decode: it does not understan macrons + $string =~ s/\\=(A|\{A\})/##SANITIZE#MACRON##256;/g; + $string =~ s/\\=(a|\{a\})/##SANITIZE#MACRON##257;/g; + $string =~ s/\\=(E|\{E\})/##SANITIZE#MACRON##274;/g; + $string =~ s/\\=(e|\{e\})/##SANITIZE#MACRON##275;/g; + $string =~ s/\\=(I|\{I\})/##SANITIZE#MACRON##298;/g; + $string =~ s/\\=(i|\{i\})/##SANITIZE#MACRON##299;/g; + $string =~ s/\\=(O|\{O\})/##SANITIZE#MACRON##332;/g; + $string =~ s/\\=(o|\{o\})/##SANITIZE#MACRON##333;/g; + $string =~ s/\\=(U|\{U\})/##SANITIZE#MACRON##362;/g; + $string =~ s/\\=(u|\{u\})/##SANITIZE#MACRON##363;/g; + $string = decode('latex', $string); $string =~ s/\\[a-zA-Z]+/ /g; $string =~ s/\\\\/ /g; $string =~ s/[\[\{\}\]]/ /g; @@ -382,6 +393,7 @@ sub SanitizeText { $string =~ s/amp;//g; $string =~ s/~/ /g; $string =~ s/\s*([\.;,])/$1/g; + $string =~ s/##SANITIZE#MACRON##(\d+);/&#$1;/g; return $string; } -- cgit v1.2.3