summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/getmap
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/getmap')
-rw-r--r--Master/texmf-dist/tex/latex/getmap/getmap.sty167
1 files changed, 167 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/getmap/getmap.sty b/Master/texmf-dist/tex/latex/getmap/getmap.sty
new file mode 100644
index 00000000000..fd25b08c1d8
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/getmap/getmap.sty
@@ -0,0 +1,167 @@
+%%
+%% This is file `getmap.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% getmap.dtx (with options: `package')
+%%
+%% Copyright (C) 2014 by:
+%% Josef Kleber
+%% <josef.kleber@gmx.de>
+%%
+%% This file may be distributed and/or modified under the conditions of
+%% the LaTeX Project Public License, either version 1.3 of this license
+%% or (at your option) any later version. The latest version of this
+%% license is in:
+%%
+%% http://www.latex-project.org/lppl.txt
+%%
+%% and version 1.3 or later is part of all distributions of LaTeX version
+%% 2003/12/01 or later.
+%%
+%% This work has the LPPL maintenance status "author-maintained".
+%%
+%% The Current Maintainer of this work is Josef Kleber.
+%%
+%% This work consists of all files listed in manifest.txt.
+%%
+\NeedsTeXFormat{LaTeX2e}%
+\ProvidesPackage{getmap}[2014/06/24 v1.1 getmap.sty - Josef Kleber (C) 2014]%
+\RequirePackage{xkeyval}%
+\RequirePackage{stringenc}%
+\RequirePackage{ifthen}%
+\newcommand*\GM@JK@define@key[4]%
+{%
+ \expandafter\gdef\csname#1@#3\endcsname{#4}%
+ \define@key{#2.sty}{#3}[#4]%
+ {%
+ \expandafter\gdef\csname#1@#3\endcsname{##1}%
+ }%
+ \define@key{#2}{#3}%
+ {%
+ \expandafter\def\csname#1@#3\endcsname{##1}%
+ }%
+}%
+\GM@JK@define@key{GM@JK}{getmap}{key}{Kmjtd|luu7n162n1,22=o5-h61wh}%
+\GM@JK@define@key{GM@JK}{getmap}{xsize}{800}%
+\GM@JK@define@key{GM@JK}{getmap}{ysize}{400}%
+\GM@JK@define@key{GM@JK}{getmap}{scale}{3385}%
+\GM@JK@define@key{GM@JK}{getmap}{zoom}{}%
+\GM@JK@define@key{GM@JK}{getmap}{type}{map}%
+\GM@JK@define@key{GM@JK}{getmap}{imagetype}{png}%
+\GM@JK@define@key{GM@JK}{getmap}{color}{yellow_1}%
+\GM@JK@define@key{GM@JK}{getmap}{number}{1}%
+\GM@JK@define@key{GM@JK}{getmap}{file}{osmimage}%
+\GM@JK@define@key{GM@JK}{getmap}{inputencoding}{}%
+\GM@JK@define@key{GM@JK}{getmap}{overwrite}{true}%
+\gdef\GM@JK@overwrite{false}%
+\@ifpackageloaded{inputenc}%
+{%
+ \gdef\GM@JK@inputencoding{\inputencodingname}%
+}%
+{%
+ \gdef\GM@JK@inputencoding{utf8}%
+}%
+\newif\ifGM@JK@writexviii\GM@JK@writexviiifalse%
+\ExecuteOptionsX{key,xsize,ysize,scale,zoom,type,imagetype,color,number,file}%
+\ProcessOptionsX\relax%
+\ltx@IfUndefined{pdf@shellescape}%
+{%
+ \PackageInfo{getmap}{\pdf@shellescape is undefined}%
+ \PackageInfo{getmap}{can not test if \write18 is available}%
+ \GM@JK@writexviiitrue%
+}%
+{%
+ \PackageInfo{getmap}{\pdf@shellescape is available}%
+ \ifnum\pdf@shellescape=1\relax%
+ \PackageInfo{getmap}{\write18 enabled}%
+ \GM@JK@writexviiitrue%
+ \else%
+ \GM@JK@writexviiifalse%
+ \fi%
+}%
+\newcommand*\GM@JK@shellescape%
+{%
+ \ifGM@JK@writexviii%
+ \ifthenelse{\equal{\GM@JK@zoom}{}}%
+ {%
+ \immediate\write18{osmimage \space-l\space "\GM@JK@location@string"%
+ \space-k\space "\GM@JK@key@string"%
+ \space-x\space \GM@JK@xsize%
+ \space-y\space \GM@JK@ysize%
+ \space-s\space \GM@JK@scale%
+ \space-t\space \GM@JK@type%
+ \space-i\space \GM@JK@imagetype%
+ \space-c\space "\GM@JK@color"%
+ \space-n\space \GM@JK@number%
+ \space-o\space \GM@JK@file}%
+ }%
+ {%
+ \immediate\write18{osmimage \space-l\space "\GM@JK@location@string"%
+ \space-k\space "\GM@JK@key@string%
+ \space-x\space \GM@JK@xsize%
+ \space-y\space \GM@JK@ysize%
+ \space-z\space \GM@JK@zoom%
+ \space-t\space \GM@JK@type%
+ \space-i\space \GM@JK@imagetype%
+ \space-c\space "\GM@JK@color"%
+ \space-n\space \GM@JK@number%
+ \space-o\space \GM@JK@file}%
+ }%
+ \else%
+ \PackageError{getmap}{\write18 disabled}
+ {\write18 disabled\MessageBreak%
+ Use -shell-escape (TeXLive)\MessageBreak%
+ or\space\space--enable-write18 (MiKTeX)}%
+ \fi%
+}%
+\newcommand*\getmap[2][]%
+{%
+ \begingroup%
+ \setkeys{getmap}{#1}%
+ \PackageInfo{getmap}{using \GM@JK@inputencoding\space encoding}%
+ \def\GM@JK@location{#2}%
+ \StringEncodingConvert%
+ {\GM@JK@location@string}%
+ {\detokenize\expandafter{\GM@JK@location}}%
+ {\GM@JK@inputencoding}{utf-8}%
+ \StringEncodingSuccessFailure%
+ {%
+ %success
+ }%
+ {% failure
+ \errmessage{Converting to UTF-8 failed}%
+ }%
+ \StringEncodingConvert%
+ {\GM@JK@key@string}%
+ {\detokenize\expandafter{\GM@JK@key}}%
+ {\GM@JK@inputencoding}{utf-8}%
+ \StringEncodingSuccessFailure%
+ {%
+ %success
+ }%
+ {% failure
+ \errmessage{Converting to UTF-8 failed}%
+ }%
+ \ifthenelse{\equal{\GM@JK@overwrite}{true}}%
+ {%
+ \GM@JK@shellescape%
+ }%
+ {%
+ \IfFileExists{\GM@JK@file.\GM@JK@imagetype}%
+ {%
+ \PackageInfo{getmap}{overwrite=false; (\GM@JK@file.\GM@JK@imagetype)%
+ using existing file!}%
+ }%
+ {%
+ \PackageInfo{getmap}{overwrite=false; (\GM@JK@file.\GM@JK@imagetype)%
+ file does not exist! downloading ...}%
+ \GM@JK@shellescape%
+ }%
+ }%
+ \endgroup%
+}%
+\endinput
+%%
+%% End of file `getmap.sty'.