summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2023-04-05 20:01:20 +0000
committerKarl Berry <karl@freefriends.org>2023-04-05 20:01:20 +0000
commit609c33069313159275d5ca40618aecdace382e2c (patch)
treee8ff66ae6e4a8d5ddcf7f7a3a209aace17ab0e8f /Master/texmf-dist/tex
parent4e2ef99b906502fbcb098bc6c1f487657ee43b58 (diff)
osda (5apr23)
git-svn-id: svn://tug.org/texlive/trunk@66774 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/latex/osda/osda.sty352
1 files changed, 352 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/osda/osda.sty b/Master/texmf-dist/tex/latex/osda/osda.sty
new file mode 100644
index 00000000000..c7f20dd87e6
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/osda/osda.sty
@@ -0,0 +1,352 @@
+%%
+%% This is file `osda.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% osda.dtx (with options: `package')
+%%
+%% This is a generated file.
+%%
+%% Copyright (C) 2023 by Christian Krieg <christian@osda.ws>
+%%
+%% This work (excluding the OSDA logo) 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 2005/12/01 or later.
+%%
+%% The OSDA logo is a trademark of Christian Krieg and may only be used and/or
+%% distributed in order to refer to the Workshop on Open-Source Design Automation.
+%% Any other use is subject to prior written permission.
+%%
+\NeedsTeXFormat{LaTeX2e}[1999/12/01]
+\ProvidesPackage{osda}
+ [2023/04/03 v1.2.0 OSDA copyright notice generator]
+
+
+\RequirePackage[hang,flushmargin]{footmisc}%
+\RequirePackage{flushend}%
+\RequirePackage{ifthen}%
+\RequirePackage{qrcode}%
+\RequirePackage{xcolor}%
+\RequirePackage{hyperref}%
+\hypersetup{%
+colorlinks = true,%
+allcolors = black,%
+}%
+\RequirePackage{tikz}%
+\RequirePackage{pgfopts}%
+
+\newcommand{\osdaset}[1]{\pgfkeys{/osda/.cd,#1}}
+
+%%
+%% Specify booleans
+%%
+\newif\ifosda@auto
+%%
+%% Define keys to manage package and command options
+%%
+\pgfkeys {
+ /osda/.cd,
+ paper/url/.store in = \osda@paper@url,
+ url/.forward to = /osda/paper/url,
+ paper/doi/.store in = \osda@paper@doi,
+ doi/.forward to = /osda/paper/doi,
+ license/version/.store in = \osda@license@version,
+ license/url/.store in = \osda@license@url,
+ license/long/.store in = \osda@license@long,
+ license/short/.store in = \osda@license@short,
+ proceedings/title/.store in = \osda@proceedings@title,
+ proceedings/startpage/.store in = \osda@proceedings@startpage,
+ proceedings/endpage/.store in = \osda@proceedings@endpage,
+ pages/.code 2 args={\osdaset{proceedings/startpage=#1,proceedings/endpage=#2}},
+ workshop/counter/.store in = \osda@workshop@counter,
+ workshop/longname/.store in = \osda@workshop@longname,
+ workshop/acronym/.store in = \osda@workshop@acronym,
+ location/city/.store in = \osda@location@city,
+ location/country/.store in = \osda@location@country,
+ date/month/.store in = \osda@date@month,
+ date/day/.store in = \osda@date@day,
+ date/year/.store in = \osda@date@year,
+ hostconference/longname/.store in = \osda@hostconference@longname,
+ hostconference/acronym/.store in = \osda@hostconference@acronym,
+}
+%%
+%% Set boolean flags
+%%
+\pgfkeys {
+ /osda/.cd,
+ auto/.is if=osda@auto,
+}
+%%
+%% Specify default values
+%%
+\pgfkeys {
+ /osda/.cd,
+ auto = true,
+ license/version = ,
+ license/url = ,
+ license/long = \textbf{\textcolor{red}{{Please specify a license}}},
+ license/short = ,
+ proceedings/startpage = ,
+ proceedings/endpage = ,
+ paper/url = https://please.specify.the/url/here,
+ paper/doi = ,
+}
+%%
+%% Define some useful styles
+%%
+\pgfkeys {
+ /osda/.cd,
+ %
+ % Default values for specific editions of OSDA
+ %
+ 2023/.style={
+ proceedings/title = Proceedings of the 3rd Workshop on Open-Source Design Automation (OSDA),
+ workshop/counter = 3rd,
+ workshop/longname = Workshop on Open-Source Design Automation,
+ workshop/acronym = OSDA,
+ location/city = Antwerp,
+ location/country = Belgium,
+ date/month = April,
+ date/day = 17,
+ date/year = 2023,
+ hostconference/longname = {Design, Automation, and Test in Europe Conference},
+ hostconference/acronym = DATE,
+ },
+ %
+ % Licenses
+ %
+ cc-by/.style={
+ license/version = 4.0,
+ license/url = https://creativecommons.org/licenses/by/4.0,
+ license/long = Creative Commons Attribution license,
+ license/short = CC BY,
+ },
+ cc-by-sa/.style={
+ license/version = 4.0,
+ license/url = https://creativecommons.org/licenses/by-sa/4.0,
+ license/long = Creative Commons Attribution-ShareAlike license,
+ license/short = CC BY-SA,
+ },
+ cc-by-nc-sa/.style={
+ license/version = 4.0,
+ license/url = https://creativecommons.org/licenses/by-nc-sa/4.0,
+ license/long = Creative Commons Attribution-Noncommercial-ShareAlike license,
+ license/short = CC BY-NC-SA,
+ },
+ cc-by-nc-nd/.style={
+ license/version = 4.0,
+ license/url = https://creativecommons.org/licenses/by-nc-nd/4.0,
+ license/long = Creative Commons Attribution-Noncommercial-NoDerivatives license,
+ license/short = CC BY-NC-ND,
+ },
+ arXiv/.style={
+ license/version = 1.0,
+ license/url = https://arxiv.org/licenses/nonexclusive-distrib/1.0,
+ license/long = {arXiv.org perpetual, non-exclusive license},
+ license/short =,
+ },
+ cc0/.style={
+ license/version =,
+ license/url = https://creativecommons.org/share-your-work/public-domain/cc0,
+ license/long = Public Domain license,
+ license/short = CC0,
+ },
+}
+%%
+%% We now process the options passed to the package.
+%%
+\ProcessPgfOptions{/osda}
+%%
+%% The margin defines the space between the logo's right/QR code's left side and
+%% the text of the copyright notice
+%%
+\newlength{\osda@margin}
+%%
+%% |\WrapLR|
+%%
+%% Command to place two figures wrapped around text; we use it here for the OSDA
+%% logo and the QR code that links to the paper in the acknowledgments box in the
+%% footnote of the title page
+%%
+%% Usage:
+%%
+%% \WrapLR{\includegraphics[height=1.2in]{example-image-a}}%
+%% {\includegraphics[height=1.2in]{example-image-b}}%
+%% {\noindent Text to wrap around images}
+%%
+%% Adapted from: https://tex.stackexchange.com/a/455612
+%%
+%%
+\newcommand*{\WrapLR}[3]% #1=left image, #2=right image, #3=text (1 paragraph)
+{\bgroup
+ \sbox0{\raisebox{-\height}{#1}}% align tops
+ \sbox1{\raisebox{-\height}{#2}}% measure width and height (depth)
+ \sbox2{\raisebox{\depth}{\makebox[\columnwidth]{\usebox0\hfill\usebox1}}}% total height
+ \par\noindent\usebox2\vspace{\dimexpr \ht\strutbox-\ht2-\baselineskip-\parskip}\par% overlay pictures
+ \setlength{\osda@margin}{2ex}
+ \dimen0=\dimexpr \wd0+.5\osda@margin\relax% indent
+ \dimen1=\dimexpr \columnwidth-\wd0-\wd1-\osda@margin\relax% width
+ \edef\shape{\the\dimen0 \the\dimen1}% set up \parshape arguments in loop
+ \dimen2=\ht\strutbox
+ \dimen4=\dimexpr \ht2-.5\baselineskip\relax
+ \count1=2
+ \loop\ifdim\dimen2<\dimen4
+ \advance\dimen2 by \baselineskip
+ \ifdim\dimen2>\dp0\relax% end of left image
+ \dimen0=0pt
+ \dimen1=\dimexpr \columnwidth-\wd1-.5\osda@margin\relax
+ \fi
+ \ifdim\dimen2>\dp1\relax% end of right image
+ \dimen1=\dimexpr \columnwidth-\wd0-.5\osda@margin\relax
+ \fi
+ \advance\count1 by 1
+ \edef\shape{\shape\space\the\dimen0 \the\dimen1}%
+ \repeat
+ \edef\shape{\the\count1 \space\shape\space 0pt \the\columnwidth}%
+ \parshape=\shape
+ #3\par
+\egroup}
+%% |\blfootnote|
+%%
+%% Set footnotes without marks
+%%
+%% Usage:
+%%
+%% |\blfootnote{footnotetext}|
+%%
+%% From: https://tex.stackexchange.com/a/30726
+%%
+\newcommand\blfootnote[1]{%
+ \begingroup
+ \renewcommand\thefootnote{}\footnote{#1}%
+ \addtocounter{footnote}{-1}%
+ \endgroup
+}
+%%
+%% |\osdalogo|
+%%
+%% Draws the OSDA logo at a given height
+%%
+%% Usage:
+%%
+%% |\osdalogo{height}|
+%%
+%% Example:
+%%
+%% |\osdalogo{2\baselineskip}|
+%%
+\usetikzlibrary{svg.path}
+\newcommand{\osdalogo}[1]{\scalebox{1}[-1]{\resizebox*{!}{#1}{%
+\begin{tikzpicture}%
+ \pgfpathsvg{m 41.493525,114.88969 c -4.235403,-0.0951 -5.244524,4.38987 -4.853967,7.74446 0.06465,11.92294 -0.129872,23.85884 0.09828,35.77361 0.660896,3.83742 4.80625,4.07909 7.908947,3.87335 36.559883,0 73.119765,0 109.679645,0 4.2354,0.0951 5.24452,-4.38987 4.85397,-7.74445 -0.0647,-11.92294 0.12987,-23.85884 -0.0983,-35.77361 -0.6609,-3.83742 -4.80625,-4.07909 -7.90895,-3.87336 -36.55988,0 -73.119759,0 -109.679642,0 z m 15.406294,9.3338 c 7.083699,-0.16814 13.650363,5.59034 14.408423,12.6354 0.773555,-7.32725 7.848415,-13.19963 15.192447,-12.61203 5.305345,0.24729 10.291595,3.68656 12.407418,8.55802 -4.449622,-0.0531 -9.052306,0.10604 -13.406456,-0.0794 -0.839139,-2.90692 -5.235964,-3.40946 -6.707523,-0.76424 -1.678739,2.40924 0.506129,6.05789 3.422128,5.71655 1.497283,-0.0812 2.873132,-1.15803 3.311785,-2.59192 4.718573,0 9.43715,0 14.155724,0 0.08339,-2.35529 -0.165262,-4.8569 0.121518,-7.12255 5.339507,-5.05446 14.506947,-4.9329 19.710957,0.26069 2.32206,2.20209 3.8742,5.19535 4.33608,8.36202 0.90939,-7.27195 8.02238,-12.99336 15.31906,-12.32891 7.37799,0.33186 13.674,7.07245 13.50245,14.45591 0.0496,5.18443 -2.94531,10.24647 -7.51324,12.69897 -1.2907,-3.10635 -2.86729,-6.27677 -3.98135,-9.34353 2.57226,-2.09161 1.63297,-6.69649 -1.5515,-7.61542 -3.0763,-1.19911 -6.61783,1.86093 -5.86635,5.08096 0.22078,1.22057 0.97501,2.33122 2.02814,2.98654 -1.33651,3.06304 -2.67302,6.12607 -4.00953,9.18911 -4.21173,-2.03739 -7.27498,-6.23733 -7.9282,-10.87014 -0.9141,7.33051 -8.13486,13.07383 -15.48271,12.31672 -3.21287,-0.24801 -6.32487,-1.6114 -8.68532,-3.8051 0,-2.30873 0,-4.61746 0,-6.92619 -1.727782,7.19313 -9.563391,12.09549 -16.787442,10.50764 -4.612862,-0.86727 -8.678534,-4.13841 -10.513216,-8.45867 4.434157,0.0533 9.021826,-0.10629 13.360463,0.0794 0.820198,2.82501 5.042639,3.41435 6.604149,0.92056 1.808231,-2.33495 -0.226145,-6.10845 -3.171246,-5.87992 -1.550448,0.0211 -3.007434,1.11568 -3.459292,2.59898 -4.701352,0 -9.402702,0 -14.104054,0 -0.258707,-1.27682 -0.309266,-2.11823 -0.532659,-0.32786 -1.436394,7.22593 -9.014468,12.43124 -16.274501,11.17924 -7.328434,-0.91683 -13.068091,-8.13653 -12.311164,-15.48257 0.464997,-7.3576 7.032469,-13.43953 14.405011,-13.33826 z m 52.620561,9.99112 c -0.96292,0.0502 -2.60046,0.17595 -2.09755,1.57043 0.0567,2.29818 -0.11186,4.73381 0.0816,6.94851 2.876,1.60884 6.79391,-0.92082 6.51013,-4.20444 -0.0576,-2.3593 -2.13312,-4.35301 -4.49417,-4.3145 z m -52.58387,5.3e-4 c -3.299763,-0.14891 -5.665574,3.88662 -3.923721,6.69319 1.479497,2.95488 6.158026,3.05141 7.757886,0.15973 1.863071,-2.9074 -0.372921,-6.91859 -3.834165,-6.85292 z}%
+ \pgfusepath{fill}%
+ \pgfusepath{stroke}%
+\end{tikzpicture}%
+}}}
+%%
+%% |\osdanotice|
+%%
+%% This command sets the OSDA copyright notice, taking a URL as argument to set
+%% links to the paper's web page, and to create a QR code from.
+%%
+%% Usage:
+%%
+%% |\osdanotice{url}|
+%%
+%% Example:
+%%
+%% |\osdanotice{https://osda.ws}|
+%%
+\newcommand{\osdanotice}[1][]{
+\osdaset{#1}
+\WrapLR%
+ {\href{\osda@paper@url}{\osdalogo{1.8\baselineskip}}}
+ {\qrcode[height=3.8\baselineskip,level=L,version=1]{\osda@paper@url}}
+ {\noindent%
+ This work was presented at the \emph{\osda@workshop@counter{}
+ \osda@workshop@longname{} (\osda@workshop@acronym) \osda@date@year{}},
+ \ifthenelse{\isundefined{\osda@hostconference@longname}}{%
+ }{%
+ co-hosted with \emph{\osda@hostconference@longname} %
+ \ifthenelse{\isundefined{\osda@hostconference@acronym}}{%
+ }{%
+ \emph{(\osda@hostconference@acronym)}
+ }%
+ \ifthenelse{\isundefined{\osda@date@year}}{%
+ }{%
+ \emph{\osda@date@year}
+ }%
+ }%
+ in \osda@location@city{}, \osda@location@country{}, on
+ \osda@date@month{} \osda@date@day{}, \osda@date@year{}. For further
+ information and material, please visit the paper's web page on the
+ workshop website at \href{\osda@paper@url}{\textbf{\osda@paper@url}}
+ (just scan the QR code on the right).
+ %
+ % Copyright and license information
+ %
+ The copyright is retained by the authors.
+ This work is licensed under the terms of the
+ \osda@license@long
+ \ifthenelse{\isundefined{\osda@license@short} \or \equal{\osda@license@short}{}}{%
+ }{ %
+ (\osda@license@short)%
+ }%
+ \ifthenelse{\isundefined{\osda@license@version} \or \equal{\osda@license@version}{}}{%
+ }{, %
+ version \osda@license@version%
+ }%
+ \ifthenelse{\isundefined{\osda@license@url} \or \equal{\osda@license@url}{}}{%
+ }{, %
+ see \href{\osda@license@url}{\osda@license@url}%
+ }%
+ %
+ .
+ \emph{\osda@proceedings@title},
+ Pages \osda@proceedings@startpage--\osda@proceedings@endpage, \osda@date@year.
+ \ifthenelse{\isundefined{\osda@paper@doi} \or \equal{\osda@paper@doi}{}}{%
+ }{%
+ DOI: \href{https://doi.org/\osda@paper@doi}{\osda@paper@doi}%
+ }%
+ }%
+}
+%%
+%% |\osdafootnote|
+%%
+%% This command sets the OSDA copyright notice in an un-numbered footnote.
+%%
+%% Usage:
+%%
+%% |\osdafootnote{url}|
+%%
+%% Example:
+%%
+%% |\osdafootnote{https://osda.ws}|
+%%
+\newcommand{\osdafootnote}[1][]{
+ \osdaset{#1}
+ \blfootnote{\osdanotice\vspace{-1.5\baselineskip}}%
+
+}
+%%
+%% |\maketitle|
+%%
+%% Re-defining the \maketitle command to automatically place the copyright notice
+%% once the paper title is generated
+%%
+\let\maketitle@orig\maketitle
+\renewcommand{\maketitle}{%
+ \ifosda@auto%
+ \maketitle@orig\osdafootnote%
+ \else%
+ \maketitle@orig%
+ \fi%
+}
+\endinput
+%%
+%% End of file `osda.sty'.