<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">%begin of varsfromjobname.sty
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{varsfromjobname}[2017/05/07 v. 1.0 extracts tokens from jobname]
\RequirePackage{ifthen}
\RequirePackage{currfile}

% Author: Uwe Ziegenhagen
% based on code supplied by Friedrich Vosberg and Markus Kohm
% help by Rolf Niepraschk and Sven Naumann, Ulrich Schwarz 
% and Andreas Mathias was greatly appreciated
% see posting &lt;3983639.NRU96H2Y1Y@ID-107054.user.dfncis.de&gt;
% requires the filename to be of the following form
% itemone-itemtwo-itemthree- ... -itemnine.tex

\makeatletter

\newcommand*{\getonefromjobname}{%
  \expandafter\@getonefromfilename\jobname--------\@nil%
}

\newcommand*{\gettwofromjobname}{%
  \expandafter\@gettwofromfilename\jobname--------\@nil%
}

\newcommand*{\getthreefromjobname}{%
  \expandafter\@getthreefromfilename\jobname--------\@nil%
}

\newcommand*{\getfourfromjobname}{%
  \expandafter\@getfourfromfilename\jobname--------\@nil%
}

\newcommand*{\getfivefromjobname}{%
  \expandafter\@getfivefromfilename\jobname--------\@nil%
}

\newcommand*{\getsixfromjobname}{%
  \expandafter\@getsixfromfilename\jobname--------\@nil%
}

\newcommand*{\getsevenfromjobname}{%
  \expandafter\@getsevenfromfilename\jobname--------\@nil%
}

\newcommand*{\geteightfromjobname}{%
  \expandafter\@geteightfromfilename\jobname--------\@nil%
}

\newcommand*{\getninefromjobname}{%
  \expandafter\@getninefromfilename\jobname\@nil%
}

\newcommand*\@getonefromfilename{}
\def\@getonefromfilename#1-#2-#3-#4-#5-#6-#7-#8-#9\@nil{%
#1%
}

\newcommand*\@gettwofromfilename{}
\def\@gettwofromfilename#1-#2-#3-#4-#5-#6-#7-#8-#9\@nil{%
#2%
}

\newcommand*\@getthreefromfilename{}
\def\@getthreefromfilename#1-#2-#3-#4-#5-#6-#7-#8-#9\@nil{%
#3%
}

\newcommand*\@getfourfromfilename{}
\def\@getfourfromfilename#1-#2-#3-#4-#5-#6-#7-#8-#9\@nil{%
#4%
}

\newcommand*\@getfivefromfilename{}
\def\@getfivefromfilename#1-#2-#3-#4-#5-#6-#7-#8-#9\@nil{%
#5%
}

\newcommand*\@getsixfromfilename{}
\def\@getsixfromfilename#1-#2-#3-#4-#5-#6-#7-#8-#9\@nil{%
#6%
}

\newcommand*\@getsevenfromfilename{}
\def\@getsevenfromfilename#1-#2-#3-#4-#5-#6-#7-#8-#9\@nil{%
#7%
}

\newcommand*\@geteightfromfilename{}
\def\@geteightfromfilename#1-#2-#3-#4-#5-#6-#7-#8-#9\@nil{%
#8%
}

\newcommand*\@getninefromfilename{}
\def\@getninefromfilename#1-#2-#3-#4-#5-#6-#7-#8-#9\@nil{%
#9%
}

% as proposed by egreg, 
% https://tex.stackexchange.com/questions/212169/qr-code-from-jobname
\newcommand{\getfromjobname}[1]{%
  \ifcase#1 \or%
    \getonefromjobname\or%
    \gettwofromjobname\or%
    \getthreefromjobname\or%
    \getfourfromjobname\or%
    \getfivefromjobname\or%
    \getsixfromjobname\or%
    \getsevenfromjobname\or%
    \geteightfromjobname\or%
    \getninefromjobname%
  \fi%
}

% for the currfilebase version

\newcommand*{\getonefromcurrfilename}{%
  \expandafter\@getonefromfilename\currfilebase--------\@nil%
}

\newcommand*{\gettwofromcurrfilename}{%
  \expandafter\@gettwofromfilename\currfilebase--------\@nil%
}

\newcommand*{\getthreefromcurrfilename}{%
  \expandafter\@getthreefromfilename\currfilebase--------\@nil%
}

\newcommand*{\getfourfromcurrfilename}{%
  \expandafter\@getfourfromfilename\currfilebase--------\@nil%
}

\newcommand*{\getfivefromcurrfilename}{%
  \expandafter\@getfivefromfilename\currfilebase--------\@nil%
}

\newcommand*{\getsixfromcurrfilename}{%
  \expandafter\@getsixfromfilename\currfilebase--------\@nil%
}

\newcommand*{\getsevenfromcurrfilename}{%
  \expandafter\@getsevenfromfilename\currfilebase--------\@nil%
}

\newcommand*{\geteightfromcurrfilename}{%
  \expandafter\@geteightfromfilename\currfilebase--------\@nil%
}

\newcommand*{\getninefromcurrfilename}{%
  \expandafter\@getninefromfilename\currfilebase\@nil%
}

\newcommand{\getfromcurrfilename}[1]{%
  \ifcase#1 \or%
    \getonefromcurrfilename\or%
    \gettwofromcurrfilename\or%
    \getthreefromcurrfilename\or%
    \getfourfromcurrfilename\or%
    \getfivefromcurrfilename\or%
    \getsixfromcurrfilename\or%
    \getsevenfromcurrfilename\or%
    \geteightfromcurrfilename\or%
    \getninefromcurrfilename%
  \fi%
}

\makeatother
% end of jobdate.sty</pre></body></html>