Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
XeLaTeX friendly SOUPS 2021 sty
% (JPG) Modified Usenex-SOUPS style to use fontspec if running with XeLaTeX or LuaLaTeX
% (JPG) Comments annoted with "(JPG)" are by Jeffrey P Goldberg,
% (JPG) (or
% (JPG):
% The goal is to make this style sheet work with using a pdftex engine,
% (pdflatex) as well as XeTeX or LuaTeX (xelatex, lualatex)
% with similar output
% So far, I have noticed two visible difference
% 1. pdftex uses frenchspacing.
% 2. pdftex uses a fixed-width font that is unrelated to Times.
% As I don't believe that these were desired design choices of the orignal
% style (to be used with pdftex), I am not making the {Xe,Lua}TeX versions
% mimic that original behavior.
% (JPG) The immediately visible differences between using pdflatex en
\newif\iffontspecavailable % default is false
% usenix.sty - to be used with latex2e for USENIX.
% To use this style file, look at the template usenix_template.tex
% $Id: usenix.sty,v 1.2 2005/02/16 22:30:47 maniatis Exp $
% The following definitions are modifications of standard article.sty
% definitions, arranged to do a better job of matching the USENIX
% guidelines.
% It will automatically select two-column mode and the Times-Roman
% font.
% 2018-12-19 [for ATC'19]: add packages to help embed all fonts in
% pdf; to improve appearance (hopefully); to make refs and citations
% clickable in pdf
% USENIX papers are two-column.
\if@twocolumn\else\input twocolumn.sty\fi
% Times-Roman font is nice if you can get it
% (JPG) \texttt uses very different fonts in the different cases
% (JPG) I am not going to tinker with the fontspec option to make
% (JPG) mimic the pdftex option, as the fixed width font used by
% (JPG) by textxtext is much more compatible with Times.
% (JPG) the following packages load Times-like clones that
% (JPG) should be part of any standard TeX installation.
% (JPG) If you have a true Times New Roman on your system
% (JPG) you load those instead, but those are system
% (JPG) dependent.
\usepackage{newtxtext} % Times-like text fonts
\usepackage{newtxmath} % Times-like math fonts
% (JPG) It appears that mathptmx does not attempt to find a
% (JPG) Times compatable fixed-width (typewriter) font.
\usepackage{mathptmx} % times roman, including math (where possible)
% hopefully embeds all fonts in pdf
% Allow UTF input
% appearance
% (JPG) We could try to mimic what was probabably _intended_ by the microtype
% (JPG) inclusion in the original by using fontspec's LetterSpacing features
% (JPG) and moving to frenchspacing. But it is too unclear what was
% (JPG) actually intended.
% (JPG) Loading microtype with these features doesn't do anything if
% (JPG) if additional commands introduced by the package aren't
% (JPG) used.
\usepackage[kerning,spacing]{microtype} % more compact and arguably nicer
% (JPG) breakurl is only needed for pdftex engines.
\usepackage{breakurl} % break too-long urls in refs
\usepackage{flushend} % make cols in last page equal in size
% refs and bib
\usepackage{cite} % order multiple entries in \cite{...}
\usepackage{url} % allow \url in bibtex for clickable links
\usepackage{xcolor} % color definitions, to be use for...
\usepackage[pdfusetitle]{hyperref} % ...clickable refs within pdf...
\hypersetup{ % so
% USENIX wants margins of: 0.75" sides, 1" bottom, and 1" top.
% 0.33" gutter between columns.
% Gives active areas of 7" x 9"
% Usenix wants no page numbers for camera-ready papers, so that they can
% number them themselves. But submitted papers should have page numbers
% for the reviewers' convenience.
% \pagestyle{empty}
% Usenix titles are in 14-point bold type, with no date, and with no
% change in the empty page headers. The whole author section is 12 point
% italic--- you must use {\rm } around the actual author names to get
% them in roman.
\def\@makefnmark{\hbox to\z@{$\m@th^{\@thefnmark}$\hss}}%
\long\def\@makefntext##1{\parindent 1em\noindent
\hbox to1.8em{\hss$\m@th^{\@thefnmark}$}##1}%
\else \newpage
\@maketitle \fi\@thanks
\vbox to 2.5in{
\vskip 2em
{\Large\bf \@title \par}%
\vskip 0.375in minus 0.300in
\lineskip .5em
pdfauthor = {\plainauthor}} %MLM: Put "plainauthor" into pdf metadata
% \vskip 1.5em
% The abstract is preceded by a 12-pt bold centered heading
{\large\bf \abstractname\vspace{-.5em}\vspace{\z@}}%
% Main section titles are 12-pt bold. Others can be same or smaller.
\def\section{\@startsection {section}{1}{\z@}{-3.5ex plus-1ex minus
-.2ex}{2.3ex plus.2ex}{\reset@font\large\bf}}
% set up for copyright box (adapted from ACM template used in SOUPS 2018)
% create a float for the copyright box
\newfloat{soupscopyright}{b} %A new float type so it doesn't count against figures
\begin{soupscopyright}[b] %declare a float of the type
\begin{picture}(20,6) %Space for copyright notice
% \put (0,-0.95){TEST}
\put(0,-0.95){ %"Put" adds text to the "picture"
\parbox[b]{20pc}{\baselineskip 9pt %parbox lets you have newlines and such
\footnotesize{Copyright is held by the author/owner. Permission
to make digital or hard copies of all or part of this work for
personal or classroom use is granted without fee.\par
\emph{USENIX Symposium on Usable Privacy and Security
(SOUPS)} 2021. \\ August~8--10,~2021, Vancouver,~B.C.,~Canada.}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment