summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2014-08-12 21:41:30 +0000
committerKarl Berry <karl@freefriends.org>2014-08-12 21:41:30 +0000
commitca4c4b70f17ec42f8267024b244a185769efd9d1 (patch)
treeaef1aa9175fb3421c081a891378b6fab369e1648
parent666535e53fe160d45e038feb00c7d348809d9a6e (diff)
getmap (12aug14)
git-svn-id: svn://tug.org/texlive/trunk@34917 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Build/source/texk/texlive/linked_scripts/Makefile.am1
-rw-r--r--Build/source/texk/texlive/linked_scripts/Makefile.in1
-rw-r--r--Build/source/texk/texlive/linked_scripts/getmap/gpx2gps40
-rwxr-xr-xBuild/source/texk/texlive/linked_scripts/texlive/updmap.pl89
l---------Master/bin/alpha-linux/gpx2gps1
l---------Master/bin/amd64-freebsd/gpx2gps1
l---------Master/bin/amd64-kfreebsd/gpx2gps1
l---------Master/bin/amd64-netbsd/gpx2gps1
l---------Master/bin/armel-linux/gpx2gps1
l---------Master/bin/armhf-linux/gpx2gps1
l---------Master/bin/i386-cygwin/gpx2gps1
l---------Master/bin/i386-freebsd/gpx2gps1
l---------Master/bin/i386-kfreebsd/gpx2gps1
l---------Master/bin/i386-linux/gpx2gps1
l---------Master/bin/i386-netbsd/gpx2gps1
l---------Master/bin/i386-solaris/gpx2gps1
l---------Master/bin/mipsel-linux/gpx2gps1
l---------Master/bin/powerpc-linux/gpx2gps1
l---------Master/bin/sparc-solaris/gpx2gps1
l---------Master/bin/universal-darwin/gpx2gps1
l---------Master/bin/x86_64-cygwin/gpx2gps1
l---------Master/bin/x86_64-darwin/gpx2gps1
l---------Master/bin/x86_64-linux/gpx2gps1
l---------Master/bin/x86_64-solaris/gpx2gps1
-rw-r--r--Master/texmf-dist/doc/latex/getmap/README14
-rw-r--r--Master/texmf-dist/doc/latex/getmap/getmap.dtx136
-rw-r--r--Master/texmf-dist/doc/latex/getmap/getmap.pdfbin1697615 -> 1764654 bytes
-rwxr-xr-xMaster/texmf-dist/doc/latex/getmap/install.bat3
-rw-r--r--Master/texmf-dist/doc/latex/getmap/makefile5
-rw-r--r--Master/texmf-dist/doc/latex/getmap/manifest.txt1
-rw-r--r--Master/texmf-dist/scripts/getmap/gpx2gps40
-rw-r--r--Master/texmf-dist/tex/latex/getmap/getmap.sty2
-rwxr-xr-xMaster/tlpkg/libexec/ctan2tds6
-rw-r--r--Master/tlpkg/tlpsrc/getmap.tlpsrc1
34 files changed, 291 insertions, 68 deletions
diff --git a/Build/source/texk/texlive/linked_scripts/Makefile.am b/Build/source/texk/texlive/linked_scripts/Makefile.am
index 616d8dece47..302e76b039a 100644
--- a/Build/source/texk/texlive/linked_scripts/Makefile.am
+++ b/Build/source/texk/texlive/linked_scripts/Makefile.am
@@ -51,6 +51,7 @@ texmf_shell_scripts = \
adhocfilelist/adhocfilelist.sh \
bibexport/bibexport.sh \
dtxgen/dtxgen \
+ getmap/gpx2gps \
installfont/installfont-tl \
latexfileversion/latexfileversion \
listbib/listbib \
diff --git a/Build/source/texk/texlive/linked_scripts/Makefile.in b/Build/source/texk/texlive/linked_scripts/Makefile.in
index 0d65fb3c6a2..9b1e3141d64 100644
--- a/Build/source/texk/texlive/linked_scripts/Makefile.in
+++ b/Build/source/texk/texlive/linked_scripts/Makefile.in
@@ -258,6 +258,7 @@ texmf_shell_scripts = \
adhocfilelist/adhocfilelist.sh \
bibexport/bibexport.sh \
dtxgen/dtxgen \
+ getmap/gpx2gps \
installfont/installfont-tl \
latexfileversion/latexfileversion \
listbib/listbib \
diff --git a/Build/source/texk/texlive/linked_scripts/getmap/gpx2gps b/Build/source/texk/texlive/linked_scripts/getmap/gpx2gps
new file mode 100644
index 00000000000..1dc51b23614
--- /dev/null
+++ b/Build/source/texk/texlive/linked_scripts/getmap/gpx2gps
@@ -0,0 +1,40 @@
+#!/bin/bash
+#
+# gpx2gps file.gpx
+#
+# parses file.gpx and outputs a list of
+# geographical coordinates latitude,longitude
+#
+# License: LPPL
+#
+filename="$1"
+version="v1.0 (12/08/2014)"
+#
+usage()
+{
+ echo -e "Usage: `basename $0` file.gpx"
+ echo -e "Version: $version"
+ exit 1
+}
+#
+if [ -z "$filename" ]
+then
+ usage
+fi
+if [ "$filename" = "-h" ]
+then
+ usage
+fi
+if [ ! -e "$filename" ]
+then
+ echo -e "File $filename does not exist!"
+ exit 2
+fi
+#
+for line in `grep -e "<trkpt" $filename | tr ' ' '+'`
+do
+ latitude=`echo "$line" | sed -e 's#.*lat="\(.*\)".*#\1#' -e 's#".*$##'`
+ longitude=`echo "$line" | sed -e 's#.*lon="\(.*\)".*#\1#' -e 's#".*$##'`
+ echo "$latitude,$longitude"
+done
+exit 0
diff --git a/Build/source/texk/texlive/linked_scripts/texlive/updmap.pl b/Build/source/texk/texlive/linked_scripts/texlive/updmap.pl
index af1bc017906..6f397a60c4e 100755
--- a/Build/source/texk/texlive/linked_scripts/texlive/updmap.pl
+++ b/Build/source/texk/texlive/linked_scripts/texlive/updmap.pl
@@ -1,5 +1,5 @@
#!/usr/bin/env perl
-# $Id: updmap.pl 33988 2014-05-12 06:39:32Z preining $
+# $Id: updmap.pl 34884 2014-08-09 12:20:53Z preining $
# updmap - maintain map files for outline fonts.
# (Maintained in TeX Live:Master/texmf-dist/scripts/texlive.)
#
@@ -24,7 +24,7 @@ BEGIN {
$^W=1;
$TEXMFROOT = `kpsewhich -var-value=TEXMFROOT`;
if ($?) {
- print STDERR "updmap: Cannot find TEXMFROOT, aborting!\n";
+ print_error("Cannot find TEXMFROOT, aborting!\n");
exit 1;
}
chomp($TEXMFROOT);
@@ -32,11 +32,11 @@ BEGIN {
}
-my $svnid = '$Id: updmap.pl 33988 2014-05-12 06:39:32Z preining $';
-my $lastchdate = '$Date: 2014-05-12 08:39:32 +0200 (Mon, 12 May 2014) $';
+my $svnid = '$Id: updmap.pl 34884 2014-08-09 12:20:53Z preining $';
+my $lastchdate = '$Date: 2014-08-09 14:20:53 +0200 (Sat, 09 Aug 2014) $';
$lastchdate =~ s/^\$Date:\s*//;
$lastchdate =~ s/ \(.*$//;
-my $svnrev = '$Revision: 33988 $';
+my $svnrev = '$Revision: 34884 $';
$svnrev =~ s/^\$Revision:\s*//;
$svnrev =~ s/\s*\$$//;
my $version = "svn$svnrev ($lastchdate)";
@@ -182,7 +182,7 @@ sub main {
# and if, then switch to sys mode (with a warning)
if (($TEXMFSYSCONFIG eq $TEXMFCONFIG) && ($TEXMFSYSVAR eq $TEXMFVAR)) {
if (!$opts{'sys'}) {
- warning("$prg: hidden sys mode found, switching to sys mode.\n");
+ print_warning("hidden sys mode found, switching to sys mode.\n");
$opts{'sys'} = 1;
}
}
@@ -197,12 +197,12 @@ sub main {
if ($opts{'dvipdfmoutputdir'} && !defined($opts{'dvipdfmxoutputdir'})) {
$opts{'dvipdfmxoutputdir'} = $opts{'dvipdfmoutputdir'};
- printf STDERR "Using --dvipdfmoutputdir options for dvipdfmx, but please use --dvipdfmxoutputdir\n";
+ print_warning("Using --dvipdfmoutputdir options for dvipdfmx, but please use --dvipdfmxoutputdir\n");
}
if ($opts{'dvipdfmoutputdir'} && $opts{'dvipdfmxoutputdir'} &&
$opts{'dvipdfmoutputdir'} ne $opts{'dvipdfmxoutputdir'}) {
- printf STDERR "Options for --dvipdfmoutputdir and --dvipdfmxoutputdir do not agree\nplease use only --dvipdfmxoutputdir. Exiting.\n";
+ print_error("Options for --dvipdfmoutputdir and --dvipdfmxoutputdir do not agree\nplease use only --dvipdfmxoutputdir. Exiting.\n");
exit(1);
}
@@ -226,10 +226,10 @@ sub main {
} elsif ($settings{$o}{'type'} eq "any") {
print "(any string)\n";
} else {
- print "strange: unknown type of option $o\nplease report\n";
+ print_warning("strange: unknown type of option $o\nplease report\n");
}
} else {
- print "$prg: unknown option: $o\n";
+ print_warning("unknown option: $o\n");
}
}
exit 0;
@@ -283,11 +283,11 @@ sub main {
#
# at least check for old updmap-local.cfg and warn!
if (-r "$TMLabs/web2c/updmap-local.cfg") {
- warning("=============================\n");
- warning("Old configuration file\n $TMLabs/web2c/updmap-local.cfg\n");
- warning("found! This file is *not* evaluated anymore, please move the information\n");
- warning("to the file $TMLabs/updmap.cfg!\n");
- warning("=============================\n");
+ print_warning("=============================\n");
+ print_warning("Old configuration file\n $TMLabs/web2c/updmap-local.cfg\n");
+ print_warning("found! This file is *not* evaluated anymore, please move the information\n");
+ print_warning("to the file $TMLabs/updmap.cfg!\n");
+ print_warning("=============================\n");
}
}
#
@@ -355,7 +355,7 @@ sub main {
$v = "\"$v\"" if ($v =~ m/\s/);
print "$o=$v ($vo)\n";
} else {
- printf STDERR "$prg: unknown option: $o\n";
+ print_warning("unknown option: $o\n");
}
}
exit 0;
@@ -409,7 +409,7 @@ sub main {
my $cmd;
if ($opts{'edit'}) {
if ($opts{"dry-run"}) {
- printf STDERR "No, are you joking, you want to edit with --dry-run?\n";
+ print_error("No, are you joking, you want to edit with --dry-run?\n");
exit 1;
}
# it's not a good idea to edit updmap.cfg manually these days,
@@ -455,14 +455,14 @@ sub main {
merge_settings_replace_kanji();
my @missing = read_map_files();
if (@missing) {
- print STDERR "\nERROR: The following map file(s) couldn't be found:\n";
+ print_error("The following map file(s) couldn't be found:\n");
for my $m (@missing) {
my $orig = $alldata->{'maps'}{$m}{'origin'};
- print STDERR "\t$m (in $orig)\n";
+ print_error("\t$m (in $orig)\n");
}
- print STDERR "\n\tDid you run mktexlsr?\n\n" .
+ print_error("Did you run mktexlsr?\n\n" .
"\tYou can disable non-existent map entries using the option\n".
- "\t --syncwithtrees.\n\n";
+ "\t --syncwithtrees.\n\n");
exit 1;
}
merge_data();
@@ -507,7 +507,7 @@ sub getFonts {
if (defined($alldata->{'maps'}{$m}{'fonts'}{$k})) {
push @lines, "$k " . $alldata->{'maps'}{$m}{'fonts'}{$k};
} else {
- print "undefined fonts for $k in $m ?!?!?\n";
+ print_warning("undefined fonts for $k in $m ?!?!?\n");
}
print LOG "$k\n" unless $opts{'dry-run'};
}
@@ -873,8 +873,8 @@ sub cidx2dvips {
# now we have the following format
# <word> <word> <word> some options like -e or -s
if ($_ !~ m/([^ ][^ ]*) ([^ ][^ ]*) ([^ ][^ ]*)( (.*))?$/) {
- print STDERR "cidx2dvips warning: Cannot translate font line:\n==> $l\n";
- print STDERR "Current translation status: ==>$_==\n";
+ print_warning("cidx2dvips warning: Cannot translate font line:\n==> $l\n");
+ print_warning("Current translation status: ==>$_==\n");
next;
}
my $tfmname = $1;
@@ -896,7 +896,7 @@ sub cidx2dvips {
if ($italicmax > 0) {
# we have already a definition of SlantFont via ,Italic or ,BoldItalic
# warn the user that larger one is kept
- print STDERR "cidx2dvips warning: Double slant specified via Italic and -s:\n==> $l\n==> Using only the biggest slant value.\n";
+ print_warning("cidx2dvips warning: Double slant specified via Italic and -s:\n==> $l\n==> Using only the biggest slant value.\n");
}
$italicmax = $1 if ($1 > $italicmax);
$opts =~ s/-s ([.0-9-][.0-9-]*)//;
@@ -1235,8 +1235,8 @@ sub mkMaps {
print_and_log ("\n");
}
} else {
- print STDERR "$prg: Warning: File $d/$f doesn't exist.\n";
- print LOG "Warning: File $d/$f doesn't exist.\n"
+ print_warning("File $d/$f doesn't exist.\n");
+ print LOG "Warning: File $d/$f doesn't exist.\n"
unless $opts{'dry-run'};
}
}
@@ -1511,7 +1511,7 @@ sub disable_map {
} else {
# disable a Map type that might be activated in a lower ranked updmap.cfg
if (!defined($alldata->{'maps'}{$map})) {
- warning("$prg: map file not present, nothing to disable: $map\n");
+ print_warning("map file not present, nothing to disable: $map\n");
return;
}
my $orig = $alldata->{'maps'}{$map}{'origin'};
@@ -1878,7 +1878,7 @@ sub merge_settings_replace_kanji {
$alldata->{'updmap'}{$l}{'maps'}{$m}{'line'};
$alldata->{'updmap'}{$l}{'maps'}{$newm}{'original'} = $m;
} else {
- print "$prg: generated map $newm (from $m) does not exists, not activating it!\n";
+ print_warning("generated map $newm (from $m) does not exists, not activating it!\n");
}
# in any case delete the @kanji...@ entry line, such a map will
# never exist
@@ -1930,10 +1930,10 @@ sub read_updmap_file {
if ($b eq "Map" || $b eq "MixedMap" || $b eq "KanjiMap") {
my $c = shift @rest;
if (!defined($c)) {
- warning("$prg: apparently not a real disable line, ignored: $_\n");
+ print_warning("apparently not a real disable line, ignored: $_\n");
} else {
if (defined($data{'maps'}{$c})) {
- warning("$prg: double mention of $c in $fn\n");
+ print_warning("double mention of $c in $fn\n");
}
$data{'maps'}{$c}{'status'} = 'disabled';
$data{'maps'}{$c}{'type'} = $b;
@@ -1943,25 +1943,25 @@ sub read_updmap_file {
next;
}
if (@rest) {
- warning("$prg: line $i in $fn contains a syntax error, more than two words!\n");
+ print_warning("line $i in $fn contains a syntax error, more than two words!\n");
}
if (defined($settings{$a})) {
if (check_option($a, $b)) {
$data{'setting'}{$a}{'val'} = $b;
$data{'setting'}{$a}{'line'} = $i;
} else {
- warning("$prg: unknown setting for $a: $b, ignored!\n");
+ print_warning("unknown setting for $a: $b, ignored!\n");
}
} elsif ($a eq "Map" || $a eq "MixedMap" || $a eq "KanjiMap") {
if (defined($data{'maps'}{$b}) && $data{'maps'}{$b}{'type'} ne $a) {
- warning("$prg: double mention of $b with conflicting types in $fn\n");
+ print_warning("double mention of $b with conflicting types in $fn\n");
} else {
$data{'maps'}{$b}{'type'} = $a;
$data{'maps'}{$b}{'status'} = 'enabled';
$data{'maps'}{$b}{'line'} = $i;
}
} else {
- warning("$prg: unrecognized line $i in $fn: $_\n");
+ print_warning("unrecognized line $i in $fn: $_\n");
}
}
return \%data;
@@ -2045,11 +2045,11 @@ sub read_map_files {
} else {
$maporig = "from " . $alldata->{'maps'}{$fontorig}{'origin'};
}
- warning("$prg: font $font is defined multiple times:\n");
- warning("$prg: $fontorig ($maporig)\n");
- warning("$prg: $m (from $f) (used)\n");
+ print_warning("font $font is defined multiple times:\n");
+ print_warning(" $fontorig ($maporig)\n");
+ print_warning(" $m (from $f) (used)\n");
} else {
- warning("$prg: font $font is multiply defined in $m, using an arbitrary instance!\n");
+ print_warning("font $font is multiply defined in $m, using an arbitrary instance!\n");
}
}
$alldata->{'fonts'}{$font}{'origin'} = $m;
@@ -2137,21 +2137,24 @@ sub reset_root_home {
my (undef,undef,undef,undef,undef,undef,undef,$roothome) = getpwuid(0);
if (defined($roothome)) {
if ($envhome ne $roothome) {
- warning("$prg: resetting \$HOME value (was $envhome) to root's "
+ print_warning("resetting \$HOME value (was $envhome) to root's "
. "actual home ($roothome).\n");
$ENV{'HOME'} = $roothome;
} else {
# envhome and roothome do agree, nothing to do, that is the good case
}
} else {
- warning("$prg: home of root not defined, strange!\n");
+ print_warning("home of root not defined, strange!\n");
}
}
}
}
-sub warning {
- print STDERR @_;
+sub print_warning {
+ print STDERR "$prg [WARNING]: ", @_ if (!$opts{'quiet'})
+}
+sub print_error {
+ print STDERR "$prg [ERROR]: ", @_;
}
diff --git a/Master/bin/alpha-linux/gpx2gps b/Master/bin/alpha-linux/gpx2gps
new file mode 120000
index 00000000000..0dd49f63eb1
--- /dev/null
+++ b/Master/bin/alpha-linux/gpx2gps
@@ -0,0 +1 @@
+../../texmf-dist/scripts/getmap/gpx2gps \ No newline at end of file
diff --git a/Master/bin/amd64-freebsd/gpx2gps b/Master/bin/amd64-freebsd/gpx2gps
new file mode 120000
index 00000000000..0dd49f63eb1
--- /dev/null
+++ b/Master/bin/amd64-freebsd/gpx2gps
@@ -0,0 +1 @@
+../../texmf-dist/scripts/getmap/gpx2gps \ No newline at end of file
diff --git a/Master/bin/amd64-kfreebsd/gpx2gps b/Master/bin/amd64-kfreebsd/gpx2gps
new file mode 120000
index 00000000000..0dd49f63eb1
--- /dev/null
+++ b/Master/bin/amd64-kfreebsd/gpx2gps
@@ -0,0 +1 @@
+../../texmf-dist/scripts/getmap/gpx2gps \ No newline at end of file
diff --git a/Master/bin/amd64-netbsd/gpx2gps b/Master/bin/amd64-netbsd/gpx2gps
new file mode 120000
index 00000000000..0dd49f63eb1
--- /dev/null
+++ b/Master/bin/amd64-netbsd/gpx2gps
@@ -0,0 +1 @@
+../../texmf-dist/scripts/getmap/gpx2gps \ No newline at end of file
diff --git a/Master/bin/armel-linux/gpx2gps b/Master/bin/armel-linux/gpx2gps
new file mode 120000
index 00000000000..0dd49f63eb1
--- /dev/null
+++ b/Master/bin/armel-linux/gpx2gps
@@ -0,0 +1 @@
+../../texmf-dist/scripts/getmap/gpx2gps \ No newline at end of file
diff --git a/Master/bin/armhf-linux/gpx2gps b/Master/bin/armhf-linux/gpx2gps
new file mode 120000
index 00000000000..0dd49f63eb1
--- /dev/null
+++ b/Master/bin/armhf-linux/gpx2gps
@@ -0,0 +1 @@
+../../texmf-dist/scripts/getmap/gpx2gps \ No newline at end of file
diff --git a/Master/bin/i386-cygwin/gpx2gps b/Master/bin/i386-cygwin/gpx2gps
new file mode 120000
index 00000000000..0dd49f63eb1
--- /dev/null
+++ b/Master/bin/i386-cygwin/gpx2gps
@@ -0,0 +1 @@
+../../texmf-dist/scripts/getmap/gpx2gps \ No newline at end of file
diff --git a/Master/bin/i386-freebsd/gpx2gps b/Master/bin/i386-freebsd/gpx2gps
new file mode 120000
index 00000000000..0dd49f63eb1
--- /dev/null
+++ b/Master/bin/i386-freebsd/gpx2gps
@@ -0,0 +1 @@
+../../texmf-dist/scripts/getmap/gpx2gps \ No newline at end of file
diff --git a/Master/bin/i386-kfreebsd/gpx2gps b/Master/bin/i386-kfreebsd/gpx2gps
new file mode 120000
index 00000000000..0dd49f63eb1
--- /dev/null
+++ b/Master/bin/i386-kfreebsd/gpx2gps
@@ -0,0 +1 @@
+../../texmf-dist/scripts/getmap/gpx2gps \ No newline at end of file
diff --git a/Master/bin/i386-linux/gpx2gps b/Master/bin/i386-linux/gpx2gps
new file mode 120000
index 00000000000..0dd49f63eb1
--- /dev/null
+++ b/Master/bin/i386-linux/gpx2gps
@@ -0,0 +1 @@
+../../texmf-dist/scripts/getmap/gpx2gps \ No newline at end of file
diff --git a/Master/bin/i386-netbsd/gpx2gps b/Master/bin/i386-netbsd/gpx2gps
new file mode 120000
index 00000000000..0dd49f63eb1
--- /dev/null
+++ b/Master/bin/i386-netbsd/gpx2gps
@@ -0,0 +1 @@
+../../texmf-dist/scripts/getmap/gpx2gps \ No newline at end of file
diff --git a/Master/bin/i386-solaris/gpx2gps b/Master/bin/i386-solaris/gpx2gps
new file mode 120000
index 00000000000..0dd49f63eb1
--- /dev/null
+++ b/Master/bin/i386-solaris/gpx2gps
@@ -0,0 +1 @@
+../../texmf-dist/scripts/getmap/gpx2gps \ No newline at end of file
diff --git a/Master/bin/mipsel-linux/gpx2gps b/Master/bin/mipsel-linux/gpx2gps
new file mode 120000
index 00000000000..0dd49f63eb1
--- /dev/null
+++ b/Master/bin/mipsel-linux/gpx2gps
@@ -0,0 +1 @@
+../../texmf-dist/scripts/getmap/gpx2gps \ No newline at end of file
diff --git a/Master/bin/powerpc-linux/gpx2gps b/Master/bin/powerpc-linux/gpx2gps
new file mode 120000
index 00000000000..0dd49f63eb1
--- /dev/null
+++ b/Master/bin/powerpc-linux/gpx2gps
@@ -0,0 +1 @@
+../../texmf-dist/scripts/getmap/gpx2gps \ No newline at end of file
diff --git a/Master/bin/sparc-solaris/gpx2gps b/Master/bin/sparc-solaris/gpx2gps
new file mode 120000
index 00000000000..0dd49f63eb1
--- /dev/null
+++ b/Master/bin/sparc-solaris/gpx2gps
@@ -0,0 +1 @@
+../../texmf-dist/scripts/getmap/gpx2gps \ No newline at end of file
diff --git a/Master/bin/universal-darwin/gpx2gps b/Master/bin/universal-darwin/gpx2gps
new file mode 120000
index 00000000000..0dd49f63eb1
--- /dev/null
+++ b/Master/bin/universal-darwin/gpx2gps
@@ -0,0 +1 @@
+../../texmf-dist/scripts/getmap/gpx2gps \ No newline at end of file
diff --git a/Master/bin/x86_64-cygwin/gpx2gps b/Master/bin/x86_64-cygwin/gpx2gps
new file mode 120000
index 00000000000..0dd49f63eb1
--- /dev/null
+++ b/Master/bin/x86_64-cygwin/gpx2gps
@@ -0,0 +1 @@
+../../texmf-dist/scripts/getmap/gpx2gps \ No newline at end of file
diff --git a/Master/bin/x86_64-darwin/gpx2gps b/Master/bin/x86_64-darwin/gpx2gps
new file mode 120000
index 00000000000..0dd49f63eb1
--- /dev/null
+++ b/Master/bin/x86_64-darwin/gpx2gps
@@ -0,0 +1 @@
+../../texmf-dist/scripts/getmap/gpx2gps \ No newline at end of file
diff --git a/Master/bin/x86_64-linux/gpx2gps b/Master/bin/x86_64-linux/gpx2gps
new file mode 120000
index 00000000000..0dd49f63eb1
--- /dev/null
+++ b/Master/bin/x86_64-linux/gpx2gps
@@ -0,0 +1 @@
+../../texmf-dist/scripts/getmap/gpx2gps \ No newline at end of file
diff --git a/Master/bin/x86_64-solaris/gpx2gps b/Master/bin/x86_64-solaris/gpx2gps
new file mode 120000
index 00000000000..0dd49f63eb1
--- /dev/null
+++ b/Master/bin/x86_64-solaris/gpx2gps
@@ -0,0 +1 @@
+../../texmf-dist/scripts/getmap/gpx2gps \ No newline at end of file
diff --git a/Master/texmf-dist/doc/latex/getmap/README b/Master/texmf-dist/doc/latex/getmap/README
index ecc89af94ff..a11a0068849 100644
--- a/Master/texmf-dist/doc/latex/getmap/README
+++ b/Master/texmf-dist/doc/latex/getmap/README
@@ -8,17 +8,15 @@ use this script also from the command line.
License: LPPL
-Changes in v1.4:
+Changes in v1.5:
-- added new options in gm mode
+- added gpx2gps bash file
- * language (language of map labels)
- * markers (set marker on map)
- * visible (ensure locations to be on the map)
- * path (draw pathes and routes)
- * pathfile (load complicated encoded polylines (routes))
+ transforms a gpx file (exported route) into a plain list
+ of geographical coordinates (latitude,longitude) to create
+ an encoded polyline (route) for the map
-- added more examples to the documentation
+- updated documentation
INSTALL
===========
diff --git a/Master/texmf-dist/doc/latex/getmap/getmap.dtx b/Master/texmf-dist/doc/latex/getmap/getmap.dtx
index 1ec2fec9715..ab20a47c83a 100644
--- a/Master/texmf-dist/doc/latex/getmap/getmap.dtx
+++ b/Master/texmf-dist/doc/latex/getmap/getmap.dtx
@@ -14,17 +14,15 @@ use this script also from the command line.
License: LPPL
-Changes in v1.4:
+Changes in v1.5:
-- added new options in gm mode
+- added gpx2gps bash file
- * language (language of map labels)
- * markers (set marker on map)
- * visible (ensure locations to be on the map)
- * path (draw pathes and routes)
- * pathfile (load complicated encoded polylines (routes))
-
-- added more examples to the documentation
+ transforms a gpx file (exported route) into a plain list
+ of geographical coordinates (latitude,longitude) to create
+ an encoded polyline (route) for the map
+
+- updated documentation
INSTALL
@@ -90,6 +88,13 @@ download getmap.dtx and makefile (Linux) or install.bat (Windows)
title = {{Static Map Service: Standard Icons}},
year = {2014},
}
+
+@misc{bib:mapquestopenlatlngencdec,
+ author = {{MapQuest, Inc}},
+ note = {\href{http://open.mapquestapi.com/common/encodedecode.html}{http://open.mapquestapi.com/common/encodedecode.html}},
+ title = {{Compressed Lat/Lng Encoding/Decoding}},
+ year = {2014},
+ }
@misc{bib:googlemapsapi,
author = {{Google, Inc.}},
@@ -119,6 +124,13 @@ download getmap.dtx and makefile (Linux) or install.bat (Windows)
year = {2014},
}
+@misc{bib:orsorg,
+ author = {{OpenRouteService.org}},
+ note = {\href{http://openrouteservice.org}{http://openrouteservice.org}},
+ title = {{Routing with user-generated, collaboratively collected free geodata.}},
+ year = {2014},
+ }
+
%</bibfile>
%<*luafile>
#!/usr/bin/env texlua
@@ -653,8 +665,51 @@ getmap.sty
getmap.cfg
getmap-example.tex
getmapdl.lua
+gpx2gps
manifest.txt
%</manifest>
+%<*gpx2gps>
+#!/bin/bash
+#
+# gpx2gps file.gpx
+#
+# parses file.gpx and outputs a list of
+# geographical coordinates latitude,longitude
+#
+# License: LPPL
+#
+filename="$1"
+version="v1.0 (12/08/2014)"
+#
+usage()
+{
+ echo -e "Usage: `basename $0` file.gpx"
+ echo -e "Version: $version"
+ exit 1
+}
+#
+if [ -z "$filename" ]
+then
+ usage
+fi
+if [ "$filename" = "-h" ]
+then
+ usage
+fi
+if [ ! -e "$filename" ]
+then
+ echo -e "File $filename does not exist!"
+ exit 2
+fi
+#
+for line in `grep -e "<trkpt" $filename | tr ' ' '+'`
+do
+ latitude=`echo "$line" | sed -e 's#.*lat="\(.*\)".*#\1#' -e 's#".*$##'`
+ longitude=`echo "$line" | sed -e 's#.*lon="\(.*\)".*#\1#' -e 's#".*$##'`
+ echo "$latitude,$longitude"
+done
+exit 0
+%</gpx2gps>
%<*internal>
\fi
\def\nameofplainTeX{plain}
@@ -721,6 +776,9 @@ This work consists of all files listed in manifest.txt.
\generate{
\file{getmapdl.lua}{\from{\jobname.dtx}{luafile}}
}
+\generate{
+ \file{gpx2gps.sh}{\from{\jobname.dtx}{gpx2gps}}
+}
\ifx\fmtname\nameofplainTeX
\expandafter\endbatchfile
\else
@@ -858,7 +916,6 @@ emph={}}
\gdef\and{\unskip{}, }%
\newcommand\doubledash{-\kern0.5pt-}
\def\enoteformat{\rightskip\z@ \leftskip\z@ \parindent=1em\leavevmode\llap{\makeenmark}}
-\def\filename{logicpuzzle.sty}%
\def\XeLaTeX{Xe\LaTeX}%
%
\newenvironment{optionlist}
@@ -1127,7 +1184,7 @@ visible={Brandenburger Tor, Berlin|Reichstagsufer 1, Berlin}]{}
%</example>
% \fi
% \subsubsection{\texttt{path}}
-% With this option you can define one or more pathes! It expects one or more URL parameters like:
+% With this option you can define one or more paths! It expects one or more URL parameters like:
%
% \texttt{\&path=weight:5\textbar{}color:orange\textbar{}loc1\textbar{}loc2\textbar{}...}
%
@@ -1161,7 +1218,7 @@ path={&path=weight:5|color:orange|Bode Museum, Berlin|%
% Weinmeisterstraße 6, Berlin}]{}
% \includegraphics[width=10cm]{bmus3}
%
-% You can also use \texttt{fillcolor} to mark areas! In pathes, you
+% You can also use \texttt{fillcolor} to mark areas! In paths, you
% can also specify RGB32 colors, in which the last byte defines opacity,
% e.g. 55 (33\%).
%
@@ -1226,6 +1283,58 @@ pathfile={muc.epl}]{}
%</example>
% \fi
%
+% You can also use an OpenStreetMap based route service\footnote{\href{http://openrouteservice.org}{http://openrouteservice.org}}
+% to create your route and export it to a \texttt{gpx} file\footnote{This also means that you can visualize your own routes tracked with hardware or a software app!}.
+% It's basically a xml-packaged list of geographical coordinates.
+% You can use the following one liner\footnote{The attached \texttt{gpx2gps} \texttt{bash} script does the same in a more general way} to clean the file:
+% \clearpage
+% \iffalse
+%<*example>
+% \fi
+\begin{lstlisting}
+grep -e 'trkpt' file.gpx | sed -e 's/^.*lon="//' -e 's/" lat="/,/'
+-e 's#"/>##' | sed -e 's/^\([^,]*\),\([^,]*\)/\2,\1/' >file.txt
+\end{lstlisting}
+% \iffalse
+%</example>
+% \fi
+% First, we grep the track point lines, clean the xml parts and finally
+% change the order of latitude and longitude.
+% Thus, you have a clean list of geographical coordinates, which you can
+% copy and paste into this
+% \href{http://open.mapquestapi.com/common/encodedecode.html}{Mapquest web service}\footnote{\href{http://open.mapquestapi.com/common/encodedecode.html}{http://open.mapquestapi.com/common/encodedecode.html}}
+% to get an encoded polyline!
+%
+% \begin{filecontents*}{berlin.epl}
+% &path=weight:5|color:purple|enc:_xq_IcgrpA?AFE@?^BFE@A^U@CLQXEZU?gCR?B?DBF@@?vA?D?D?BAHE@JBN@JLGFCG[DC~C?@?F?R?vA?p@iB@i@Fe@JWRSTOf@Gh@C^A?e@?gE?w@r@?lB@hA?`@??M?aA?]dI??O?O?Cn@cBfBeF|AeEHNVNBc@H@H_AEwA?OAMNA@N
+% \end{filecontents*}
+% \getmap[file=berlin, mode=gm, language=de, xsize=400, ysize=600,
+% markers={&markers=size:mid|label:H|color:green|Berlin, Hbf
+% &markers=label:B|color:blue|Brandenburger Tor, Berlin},
+% pathfile={berlin.epl}]{}
+% \includegraphics[width=6cm]{berlin}
+% \iffalse
+%<*example>
+% \fi
+\begin{lstlisting}
+\begin{filecontents*}{berlin.epl}
+&path=weight:5|color:purple|enc:_xq_IcgrpA?AFE@?^BFE@A^U@CLQXEZU?%
+gCR?B?DBF@@?vA?D?D?BAHE@JBN@JLGFCG[DC~C?@?F?R?vA?p@iB@i@Fe@JWRSTO%
+f@Gh@C^A?e@?gE?w@r@?lB@hA?`@??M?aA?]dI??O?O?Cn@cBfBeF|AeEHNVNBc@H%
+@H_AEwA?OAMNA@N
+\end{filecontents*}
+\getmap[file=berlin, mode=gm, language=de, xsize=400, ysize=600,
+markers={&markers=size:mid|label:H|color:green|Berlin, Hbf
+ &markers=label:B|color:blue|Brandenburger Tor, Berlin},
+pathfile={berlin.epl}]{}
+\includegraphics[width=6cm]{berlin}
+\end{lstlisting}
+% \iffalse
+%</example>
+% \fi
+%
+% Please note that the length of the URL is limited to 2048 bytes. So, there's
+% no way to support extreme long paths!
% \subsection{\texttt{gsv} mode}
% \subsubsection[\texttt{xsize}]{\texttt{xsize (\underline{600})}}
% This option specifies the width of the map in pixels. (max: 640)
@@ -1367,13 +1476,14 @@ pathfile={muc.epl}]{}
% \changes{v1.2}{2014/07/11}{renamed osmimage.lua to getmapdl.lua}
% \changes{v1.3}{2014/07/19}{added support for Google Street View}
% \changes{v1.4}{2014/07/25}{added options language, markers, visible, path and pathfile in gm mode}
+% \changes{v1.5}{2014/08/12}{added \texttt{gpx2gps} \texttt{bash} script}
% \begin{macrocode}
%<*package>
% \end{macrocode}
% First, we provide the \LaTeX\ package \package{getmap}.
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}%
-\ProvidesPackage{getmap}[2014/07/25 v1.4 getmap.sty - Josef Kleber (C) 2014]%
+\ProvidesPackage{getmap}[2014/08/12 v1.5 getmap.sty - Josef Kleber (C) 2014]%
% \end{macrocode}
% We need a few packages!
% \begin{macrocode}
diff --git a/Master/texmf-dist/doc/latex/getmap/getmap.pdf b/Master/texmf-dist/doc/latex/getmap/getmap.pdf
index ebcc99dd173..c50734cdcf3 100644
--- a/Master/texmf-dist/doc/latex/getmap/getmap.pdf
+++ b/Master/texmf-dist/doc/latex/getmap/getmap.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/getmap/install.bat b/Master/texmf-dist/doc/latex/getmap/install.bat
index d9c5fb9092e..e767153359b 100755
--- a/Master/texmf-dist/doc/latex/getmap/install.bat
+++ b/Master/texmf-dist/doc/latex/getmap/install.bat
@@ -19,9 +19,11 @@ makeindex -q -s gind.ist %pckname% >nul
makeindex -q -s gglo.ist %pckname%.glo -o %pckname%.gls >nul
pdflatex %pckname%.dtx >nul
ren README.txt README >nul
+ren gpx2gps.sh gpx2gps >nul
echo Copying files to %texmfpath%
md %texmfpath%\scripts\%pckname% >nul
copy getmapdl.lua %texmfpath%\scripts\%pckname%\ >nul
+copy gpx2gps %texmfpath%\scripts\%pckname%\ >nul
md %texmfpath%\tex\latex\%pckname% >nul
copy *.sty %texmfpath%\tex\latex\%pckname% >nul
copy *.cfg %texmfpath%\tex\latex\%pckname% >nul
@@ -55,6 +57,7 @@ del *.png
del *.jpg
del *.epl
del getmapdl.lua
+del gpx2gps
del README
del getmap.pdf
echo Create getmapdl.exe
diff --git a/Master/texmf-dist/doc/latex/getmap/makefile b/Master/texmf-dist/doc/latex/getmap/makefile
index 322429c3e0d..f5ebcf3f64a 100644
--- a/Master/texmf-dist/doc/latex/getmap/makefile
+++ b/Master/texmf-dist/doc/latex/getmap/makefile
@@ -21,6 +21,7 @@ $(PKGNAME).pdf:
package:
pdftex $(PKGNAME).dtx
mv README.txt README
+ mv gpx2gps.sh gpx2gps
install: doc
mkdir -p ${TEXMF}/doc/latex/${PKGNAME}
@@ -34,6 +35,7 @@ install: doc
cp *.cfg ${TEXMF}/tex/latex/${PKGNAME}/
mkdir -p ${TEXMF}/scripts/${PKGNAME}
cp getmapdl.lua ${TEXMF}/scripts/${PKGNAME}/
+ cp gpx2gps ${TEXMF}/scripts/${PKGNAME}/
texhash
chmod 0755 ${TEXMF}/scripts/${PKGNAME}/getmapdl.lua
ln -s ${TEXMF}/scripts/${PKGNAME}/getmapdl.lua ${BINDIR}/getmapdl
@@ -50,6 +52,7 @@ styles: package
git: package
cp getmapdl.lua ./../dev/scripts/getmap/getmapdl.lua
+ cp gpx2gps ./../dev/scripts/getmap/gpx2gps
cp getmap.sty ./../dev/tex/latex/getmap/getmap.sty
cp getmap.cfg ./../dev/tex/latex/getmap/getmap.cfg
@@ -62,7 +65,7 @@ clean:
*.bbl *.blg *.ins *.txt *.bib *.epl
cleanall: clean
- $(RM) getmapdl.lua *.sty *.png *.jpg\
+ $(RM) getmapdl.lua gpx2gps *.sty *.png *.jpg\
*.cfg *.tex README getmap.pdf
.PHONY: all doc package install uninstall styles git ctan clean cleanall
diff --git a/Master/texmf-dist/doc/latex/getmap/manifest.txt b/Master/texmf-dist/doc/latex/getmap/manifest.txt
index b7f6f9043b6..c7b1b61918b 100644
--- a/Master/texmf-dist/doc/latex/getmap/manifest.txt
+++ b/Master/texmf-dist/doc/latex/getmap/manifest.txt
@@ -12,4 +12,5 @@ getmap.sty
getmap.cfg
getmap-example.tex
getmapdl.lua
+gpx2gps
manifest.txt
diff --git a/Master/texmf-dist/scripts/getmap/gpx2gps b/Master/texmf-dist/scripts/getmap/gpx2gps
new file mode 100644
index 00000000000..1dc51b23614
--- /dev/null
+++ b/Master/texmf-dist/scripts/getmap/gpx2gps
@@ -0,0 +1,40 @@
+#!/bin/bash
+#
+# gpx2gps file.gpx
+#
+# parses file.gpx and outputs a list of
+# geographical coordinates latitude,longitude
+#
+# License: LPPL
+#
+filename="$1"
+version="v1.0 (12/08/2014)"
+#
+usage()
+{
+ echo -e "Usage: `basename $0` file.gpx"
+ echo -e "Version: $version"
+ exit 1
+}
+#
+if [ -z "$filename" ]
+then
+ usage
+fi
+if [ "$filename" = "-h" ]
+then
+ usage
+fi
+if [ ! -e "$filename" ]
+then
+ echo -e "File $filename does not exist!"
+ exit 2
+fi
+#
+for line in `grep -e "<trkpt" $filename | tr ' ' '+'`
+do
+ latitude=`echo "$line" | sed -e 's#.*lat="\(.*\)".*#\1#' -e 's#".*$##'`
+ longitude=`echo "$line" | sed -e 's#.*lon="\(.*\)".*#\1#' -e 's#".*$##'`
+ echo "$latitude,$longitude"
+done
+exit 0
diff --git a/Master/texmf-dist/tex/latex/getmap/getmap.sty b/Master/texmf-dist/tex/latex/getmap/getmap.sty
index 977db82ab20..7d1d54e6f27 100644
--- a/Master/texmf-dist/tex/latex/getmap/getmap.sty
+++ b/Master/texmf-dist/tex/latex/getmap/getmap.sty
@@ -27,7 +27,7 @@
%% This work consists of all files listed in manifest.txt.
%%
\NeedsTeXFormat{LaTeX2e}%
-\ProvidesPackage{getmap}[2014/07/25 v1.4 getmap.sty - Josef Kleber (C) 2014]%
+\ProvidesPackage{getmap}[2014/08/12 v1.5 getmap.sty - Josef Kleber (C) 2014]%
\RequirePackage{xkeyval}%
\RequirePackage{stringenc}%
\RequirePackage{ifthen}%
diff --git a/Master/tlpkg/libexec/ctan2tds b/Master/tlpkg/libexec/ctan2tds
index 737813ec892..70de9b8772f 100755
--- a/Master/tlpkg/libexec/ctan2tds
+++ b/Master/tlpkg/libexec/ctan2tds
@@ -2481,6 +2481,7 @@ $standardxmt='\.xmt';
'spelling' => '\.lua$',
);
+
# scripts that should end up in $bindir too.
%specialscripts_bin = (
'a2ping' => '\.pl$',
@@ -2505,7 +2506,7 @@ $standardxmt='\.xmt';
'findhyph' => 'findhyph$',
'fragmaster' => 'fragmaster\.pl$',
'fontools' => '(afm2afm|autoinst|ot2kpx)$',
- 'getmap', => 'getmapdl.lua',
+ 'getmap', => 'getmapdl.lua|gpx2gps',
'installfont' => 'installfont-tl',
'kotex-utils' => '\.pl',
'latex-git-log' => 'latex-git-log$',
@@ -3297,7 +3298,8 @@ sub doscripts {
#
# We need to change this to match texmf_dist_shell_scripts in
# linked_scripts/Makefile.am.
- next if $s =~ /dtx(file)?gen|latexfileversion|ltxfileinfo|osmimage$/;
+ next if $s =~ /dtx(file)?gen|gpx2gps/;
+ next if $s =~ /latexfileversion|ltxfileinfo$/;
#
if ($s eq "lua2dox_filter") { # handwritten .bat
&SYSTEM ("$MV $s.bat $platdir/");
diff --git a/Master/tlpkg/tlpsrc/getmap.tlpsrc b/Master/tlpkg/tlpsrc/getmap.tlpsrc
index c4d3d434322..f2f54c62777 100644
--- a/Master/tlpkg/tlpsrc/getmap.tlpsrc
+++ b/Master/tlpkg/tlpsrc/getmap.tlpsrc
@@ -1 +1,2 @@
binpattern f bin/${ARCH}/getmapdl
+binpattern f bin/${ARCH}/gpx2gps