From af9fa4d69fd543fa3afcd851962b7fee22cb48e4 Mon Sep 17 00:00:00 2001 From: Gloria Mundi Date: Mon, 26 Feb 2024 20:12:43 +0100 Subject: add srclinks --- README.md | 3 --- latexHeaders/code.sty | 17 +++++++++++++++++ tcr.pdf | Bin 667178 -> 0 bytes tcr.tex | 5 ++++- 4 files changed, 21 insertions(+), 4 deletions(-) delete mode 100644 README.md delete mode 100644 tcr.pdf diff --git a/README.md b/README.md deleted file mode 100644 index 7a518c5..0000000 --- a/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Team Contest Reference -a modified version of the team contest reference for team ChaosKITs from Karlsruhe, Germany. -https://github.com/pjungeblut/ChaosKITs diff --git a/latexHeaders/code.sty b/latexHeaders/code.sty index a889596..987f43d 100644 --- a/latexHeaders/code.sty +++ b/latexHeaders/code.sty @@ -1,3 +1,6 @@ +\usepackage{ocgx2} +\usepackage{fontawesome} + % Colors, used for syntax highlighting. % To print this document, set all colors to black! \usepackage{xcolor} @@ -101,6 +104,20 @@ % \addtocounter{lstnumber}{-1}% %} +\ifthenelse{\isundefined{\srclink}}{}{ + \lst@AddToHook{Init}{% + \ifthenelse{\equal{\lst@name}{}}{}{% + \begin{minipage}[t][0pt]{\linewidth}% + \vspace{0pt}% + \hfill% + \begin{ocg}[printocg=never]{Source links}{srclinks}{1}% + \hfill\href{\srclink{\lst@name}}{\faExternalLink}% + \end{ocg}% + \end{minipage}% + }% + } +} + \newenvironment{btHighlight}[1][] {\begingroup\tikzset{bt@Highlight@par/.style={#1}}\begin{lrbox}{\@tempboxa}} {\end{lrbox}\bt@HL@box[bt@Highlight@par]{\@tempboxa}\endgroup} diff --git a/tcr.pdf b/tcr.pdf deleted file mode 100644 index e7330c0..0000000 Binary files a/tcr.pdf and /dev/null differ diff --git a/tcr.tex b/tcr.tex index 445f8b6..a71fb4d 100644 --- a/tcr.tex +++ b/tcr.tex @@ -3,9 +3,12 @@ \documentclass[a4paper,fontsize=7.8pt]{scrartcl} % General information. -\newcommand{\teamname}{Let's party!} +\newcommand{\teamname}{Infinite Loopers} \newcommand{\university}{Karlsruhe Institute of Technology} +% Source code links (optional) +\newcommand{\srclink}[1]{https://www.gloria-mundi.eu/tcr/#1} + % Options \newif\ifoptional %\optionaltrue -- cgit v1.2.3