\documentclass[12pt]{article} \usepackage{swungdash} \usepackage{xcolor} \usepackage{fontspec}\definecolor{darkspringgreen}{rgb}{0.09, 0.45, 0.27} \usepackage{titlesec} \titleformat{\subsection} {\bfseries}{\thesection.\thesubsection}{1em}{\normalfont\bfseries} \usepackage[hidelinks]{hyperref} \usepackage{hologo} \usepackage[british]{babel} \usepackage[useregional]{datetime2} \DTMlangsetup[en-GB]{ord=omit} \definecolor{LightGray}{gray}{0.9} %\usepackage{mathpazo} \IfFontExistsTF{Palatine Parliamentary}{\setromanfont[RawFeature={+calt,+hlig,+liga,+dlig,+onum,+pnum}, BoldFont={Palatine Parliamentary Bold}, ItalicFont={Palatine Parliamentary Italic} ]{Palatine Parliamentary Regular} }{\setromanfont[RawFeature={+onum,+pnum}]{TeX Gyre PagellaX}} \setmonofont[Scale=.9,BoldFont=Source Code Pro Bold]{Source Code Pro} \usepackage{minted} \date{\today\\\smallskip\ttfamily Version \swungdashversionnumber} \author{Elijah Z Granet\thanks{e-mail: \href{mailto:me@ezgra.net}{\ttfamily me@ezgra.net}}} \title{\texttt{swungdash}:\\A package for a swung dash} \begin{document} \maketitle \tableofcontents \clearpage \section{Overview} The `swung dash' (\swungdash) is a rare but very useful mark of punctuation used in typesetting dictionaries and reference works as a stand in to avoid repeating the defined term in examples or definitions, and thus to save space. For example, a quoted example of the term `extraterritoriality' might save space by omitting repeating the long word: \begin{quote} \swungdash, in this as in every other case, is a fiction only, for diplomatic envoys are in reality not without, but within, the territories of the receiving States. The term `\swungdash' is nevertheless valuable because it demonstrates clearly the fact that envoys must, in most respects, be treated as though they were not within the territory of the receiving States. \footnote{Sir H Lauterpacht \textsc{qc} (ed) \textit{Oppenheim on International Law}, vol 1 (8\textsuperscript{th} edn, Longmans, Green \& C\textsuperscript{o} 1955), 793} \end{quote} Although the swung dash is included in Unicode as \texttt{U+2053}, few typefaces include it. This package turns a tilde in any given typeface into a swung dash of 1 \textsc{m} width, and then, using the \texttt{accsup} package, overwrites this extended tilde into the Unicode character so that it will be read as a swung dash. \section{Usage} In your preamble put: \begin{minted}[ framesep=2mm, baselinestretch=1.2, bgcolor=LightGray, fontsize=\footnotesize, breaklines, firstnumber=last ] {latex} \usepackage{swungdash} \end{minted} To typeset a swung dash, simply use the command: \begin{minted}[ framesep=2mm, baselinestretch=1.2, bgcolor=LightGray, fontsize=\footnotesize, breaklines, firstnumber=last ] {latex} \swungdash \end{minted} \section{Development} Bugs, feature requests, \textit{etc}, should be submitted to the project's official Githup page: (\url{github.com/ezgranet/swungdash}). \section{Licence} This project is licensed under the Latex Public Project Licence version 1.3\textit{c}. This documentation is copyright of the author but licensed under CC-BY-SA 3.0. \section{Implementation} \begin{minted}[ frame=lines, framesep=2mm, baselinestretch=1.2, bgcolor=LightGray, fontsize=\footnotesize, linenos, breaklines, firstnumber=last ] {latex} \def\swungdashversionnumber{1.0.0} \ProvidesPackage{swungdash} [2022/08/24 v1.0 code to typeset a swung dash] % !TeX program = lualatex % !TeX encoding = utf8 % This work 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. % % This work has the LPPL maintenance status `maintained'. % % The Current Maintainer of this work is Elijah Z Granet \RequirePackage{accsupp}\RequirePackage{graphicx} \RequirePackage{iftex} \newcommand{\thetilde}{\symbol{"007E}} \newcommand{\swungdash}{\BeginAccSupp{method=hex,unicode,ActualText= 2053}% \resizebox{1em}{!}{{\raisebox{-.1ex}{\scalebox{1.75}[1.1]{\thetilde}}}} \EndAccSupp{}% } \newcommand{\twiddle}{$\sim$} \ifPDFTeX { \PackageError{swungdash} {You are using pdfTeX but this package only works \MessageBreak with XeTeX or LuaTeX}{} } \fi \end{minted} \section{Version History} \subsection{\texttt{1.0.0}} \ttfamily 24 August 2022: Package creation \end{document}