Something went wrong. Try again.
Monorepo for Aesthetic.Computer aesthetic.computer
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388% ac-paper-cards.sty — Aesthetic Computer "cards" paper layout% A mobile-friendly, single-column format where each page is a card.%% Usage: \usepackage{ac-paper-cards} in place of ac-paper-layout%% Design philosophy:% - Every page is a self-contained card (like a slide deck in PDF form)% - Small page size (~4" × 6") optimized for phone screens% - Large, readable type — no pinch-to-zoom needed% - Single column, generous whitespace% - Sections auto-break to new cards (header always at top)% - Index card after title shows section overview% - Card numbers centered at bottom% - AC color palette and Processing fonts% - Hairline border on every page%% Papers still define their own:% - \hypersetup{pdftitle=...}% - \graphicspath{...}% - Additional packages (listings, etc.)% - Extra font families
\NeedsTeXFormat{LaTeX2e}\ProvidesPackage{ac-paper-cards}[2026/03/17 Aesthetic Computer cards layout v4]
% === PAGE SIZE (phone-proportioned card) ===\RequirePackage[ paperwidth=4in, paperheight=6in, top=0.45in, bottom=0.85in, left=0.4in, right=0.4in,]{geometry}
% === FONTS ===\newfontfamily\acbold{ywft-processing-bold}[ Path=../../system/public/type/webfonts/, Extension=.ttf]\newfontfamily\aclight{ywft-processing-light}[ Path=../../system/public/type/webfonts/, Extension=.ttf]% CJK font for translation labels on title page\newfontfamily\accjk{Droid Sans Fallback}
% === COLORS (AC palette) ===\RequirePackage{xcolor}\definecolor{acpink}{RGB}{180,72,135}\definecolor{acpurple}{RGB}{120,80,180}\definecolor{acdark}{RGB}{64,56,74}\definecolor{acgray}{RGB}{119,119,119}\definecolor{aclight-bg}{RGB}{248,246,250}\definecolor{accard}{RGB}{255,255,255}\definecolor{draftcolor}{RGB}{180,72,135}
% === RANDOM CAPS for Aesthetic.Computer branding ===% Uses XeTeX primitive \uniformdeviate for random 0/1 per letter.% Each compile produces a different capitalization.\newcount\acrandtmp\newcommand{\acrandletter}[2]{% \acrandtmp=\uniformdeviate 2\relax \ifnum\acrandtmp=0\relax#1\else#2\fi%}\newcommand{\acrandname}{% \acrandletter{a}{A}\acrandletter{e}{E}\acrandletter{s}{S}\acrandletter{t}{T}% \acrandletter{h}{H}\acrandletter{e}{E}\acrandletter{t}{T}\acrandletter{i}{I}% \acrandletter{c}{C}{\color{acpink}.}\acrandletter{c}{C}\acrandletter{o}{O}% \acrandletter{m}{M}\acrandletter{p}{P}\acrandletter{u}{U}\acrandletter{t}{T}% \acrandletter{e}{E}\acrandletter{r}{R}%}
% === PDF BASE NAME (set by each paper for margin URL) ===\newcommand{\acpdfbase}{}
% === CARD FRAMES ===\RequirePackage{tcolorbox}\tcbuselibrary{breakable,skins}
% Card environment — borderless content box\newtcolorbox{card}[1][]{% enhanced, breakable, colback=accard, colframe=accard, arc=6pt, boxrule=0pt, left=8pt, right=8pt, top=6pt, bottom=6pt, before skip=0pt, after skip=0pt, #1}
% Accent card (subtle pink)\newtcolorbox{accentcard}[1][]{% enhanced, breakable, colback=accard, colframe=acpink!15, arc=6pt, boxrule=0.3pt, left=8pt, right=8pt, top=6pt, bottom=6pt, before skip=0pt, after skip=0pt, #1}
% Dark card (for code/examples)\newtcolorbox{darkcard}[1][]{% enhanced, breakable, colback=acdark!8, colframe=acdark!8, arc=6pt, boxrule=0pt, left=8pt, right=8pt, top=6pt, bottom=6pt, before skip=4pt, after skip=4pt, #1}
% === PAGE BORDER + DRAFT WATERMARK + MARGIN URL ===\RequirePackage{eso-pic}\RequirePackage{tikz}% Draft watermark toggle. On by default; a printed/published edition sets% \acdraftfalse in its preamble to drop the "WORKING DRAFT" overlay.\newif\ifacdraft\acdrafttrue\AddToShipoutPictureBG{% \begin{tikzpicture}[remember picture, overlay] % Draft watermark — tiled pattern across content pages (skip cover) \ifacdraft \ifnum\c@page>1\relax \foreach \xoff in {-3cm, 1cm, 5cm} { \foreach \yoff in {-5cm, -1.5cm, 2cm, 5.5cm} { \node[opacity=0.14, rotate=35, anchor=center, font=\aclight\fontsize{0.65cm}{0.8cm}\selectfont] at ([xshift=\xoff, yshift=\yoff]current page.center) {\color{red!70!acpink}WORKING DRAFT}; } } \fi \fi % Tappable URL at bottom center of every page \ifx\acpdfbase\empty\else \ifnum\c@page=1\relax \node[anchor=south, font=\acbold\fontsize{5pt}{6pt}\selectfont, opacity=0.7] at ([yshift=0.15cm]current page.south) {\href{https://papers.aesthetic.computer/\acpdfbase-cards.pdf}% {\color{acpurple}https://papers.aesthetic.computer/\acpdfbase-cards.pdf}}; \else \node[anchor=south, font=\acbold\fontsize{5pt}{6pt}\selectfont, opacity=0.7] at ([yshift=0.15cm]current page.south) {\href{https://papers.aesthetic.computer/\acpdfbase-cards.pdf\#page=\thepage}% {\color{acpurple}https://papers.aesthetic.computer/\acpdfbase-cards.pdf\#page=\thepage}}; \fi \fi \end{tikzpicture}%}
% === SECTION FORMATTING (card-aware) ===\RequirePackage{titlesec}
% Sections: start on a new card (new page), header at top\newcommand{\origsection}{}\let\origsection\section\renewcommand{\section}{\clearpage\origsection}
\titleformat{\section} {\acbold\large\color{acdark}} {\thesection.} {0.4em} {}\titlespacing{\section}{0pt}{0em}{0.5em}
\titleformat{\subsection} {\normalfont\bfseries\normalsize\color{acpurple}} {\thesubsection} {0.4em} {}\titlespacing{\subsection}{0pt}{0.6em}{0.2em}
% === HEADER/FOOTER ===\RequirePackage{fancyhdr}\pagestyle{fancy}\fancyhf{}\renewcommand{\headrulewidth}{0pt}\fancyhead[R]{}% Footer: page number center, pals logo bottom-right\fancyfoot[C]{{\small\color{acgray}\thepage}}\fancyfoot[R]{\ifnum\c@page=1\raisebox{-0.1em}{\includegraphics[height=0.9em]{pals}}\fi}
% === LIST SETTINGS ===\RequirePackage{enumitem}\setlist[itemize]{nosep, leftmargin=1em, itemsep=0.15em}\setlist[enumerate]{nosep, leftmargin=1em, itemsep=0.15em}
% === PARAGRAPH SETTINGS ===\setlength{\parindent}{0em}\setlength{\parskip}{0.5em}
% === HYPHENATION & LINE BREAKING ===% Critical for narrow card columns (~3.2in) — without this, long words% (URLs, compound terms like "platform-as-infrastructure") overflow.\tolerance=1000 % allow slightly loose lines before forcing overfull\emergencystretch=1.5em % extra stretch as last resort before overfull box\setlength{\hfuzz}{12pt} % suppress watermark overlay overfull warnings\hyphenpenalty=50 % encourage hyphenation (default 50, lower = more)\exhyphenpenalty=50 % also break at explicit hyphens in compounds
% === LISTINGS OVERFLOW PREVENTION ===% Force line breaking in code listings on narrow cards.% Only applies when the paper actually loads the listings package.\AtBeginDocument{% \@ifpackageloaded{listings}{% \lstset{ breaklines=true, breakatwhitespace=false, breakautoindent=true, postbreak=\mbox{\textcolor{acgray}{$\hookrightarrow$}\space}, basicstyle=\ttfamily\footnotesize, columns=fullflexible, xleftmargin=0.3em, xrightmargin=0.3em, }% }{}%}
% === TABLE OVERFLOW PREVENTION ===% Cards are only ~3.2in wide — tables must never exceed column width.\RequirePackage{tabularx} % auto-stretching X columns\RequirePackage{adjustbox} % fallback: shrink oversized tables% Wrap every tabular/tabularx in adjustbox max width=\linewidth% so no table can ever overflow the card edge.% Also reduce font size in tables for better fit on narrow cards.\let\origintabular\tabular\let\oriendtabular\endtabular\renewenvironment{tabular}[1]{% \small% \begin{adjustbox}{max width=\linewidth}% \origintabular{#1}%}{% \oriendtabular% \end{adjustbox}%}% Note: tabularx is converted to plain tabular by cards-convert.mjs at generation time.% tabularx resists all forms of runtime patching (\def, \renewcommand, \AtBeginDocument).% The adjustbox wrapper on plain tabular handles any remaining overflow.% For plain tabular: scriptsize + tight + adjustbox.\renewenvironment{tabular}[1]{% \scriptsize\setlength{\tabcolsep}{3pt}% \begin{adjustbox}{max width=\linewidth}% \origintabular{#1}%}{% \oriendtabular\end{adjustbox}%}
% === HYPERREF ===\RequirePackage{hyperref}\hypersetup{ colorlinks=true, linkcolor=acpurple, urlcolor=acpink, citecolor=acpurple, breaklinks=true, pdfborderstyle={},}% Prevent citations from creating PDF hyperlink annotations% (avoids full-page clickable area bug when citations span page breaks)% Note: no \makeatother here — we are inside a .sty where @ is already a letter\AtBeginDocument{% \@ifpackageloaded{natbib}{% \renewcommand{\hyper@natlinkstart}[1]{}% \renewcommand{\hyper@natlinkend}{}% \renewcommand{\hyper@natlinkbreak}[2]{#1}% }{}%}
% === TABLE OF CONTENTS STYLING (for index card) ===\RequirePackage{titletoc}\contentsmargin{2.5em}\titlecontents{section}[0em] {\smallskip\small} {\color{acpurple}\thecontentslabel.\enspace\color{acdark}} {\color{acdark}} {\titlerule*[0.6em]{\tiny\color{acgray}.}\color{acpurple}\contentspage}\titlecontents{subsection}[1.5em] {\smallskip\small} {\color{acpurple}\thecontentslabel\enspace\color{acdark}} {\color{acdark}} {\titlerule*[0.6em]{\tiny\color{acgray}.}\color{acpurple}\contentspage}
% === COMMON COMMANDS ===\newcommand{\ac}{\textsc{Aesthetic.Computer}}\newcommand{\acdot}{{\color{acpink}.}}\newcommand{\np}{\textsc{notepat}}
% === PAPER INTER-LINKING (§shortcodes) ===% Usage: \acref{plork} renders as §plork linking to the cards PDF% In regular papers, links go to regular PDFs instead.% Cyan text with subtle drop shadow via TikZ.\newcommand{\acrefdef}[2]{\expandafter\def\csname acref@#1\endcsname{#2}}\newcommand{\acrefurl}[1]{\csname acref@#1\endcsname}% Paper ID → PDF base name mapping\acrefdef{ac}{aesthetic-computer-26-arxiv}\acrefdef{kidlisp}{kidlisp-26-arxiv}\acrefdef{plork}{plorking-the-planet-26-arxiv}\acrefdef{os}{ac-native-os-26-arxiv}\acrefdef{api}{piece-api-26-arxiv}\acrefdef{pieces}{pieces-not-programs-26-arxiv}\acrefdef{notepat}{notepat-26-arxiv}\acrefdef{goodiepal}{radical-computer-art-26-arxiv}\acrefdef{whistlegraph}{whistlegraph-26-arxiv}\acrefdef{complex}{sucking-on-the-complex-26-arxiv}\acrefdef{dead-ends}{dead-ends-26-arxiv}\acrefdef{folk-songs}{folk-songs-26-arxiv}\acrefdef{archaeology}{repo-archaeology-26-arxiv}\acrefdef{network}{network-audit-26-arxiv}\acrefdef{kidlisp-ref}{kidlisp-reference-26-arxiv}\acrefdef{diversity}{citation-diversity-audit-26}\acrefdef{sustainability}{who-pays-for-creative-tools-26-arxiv}% Cards format: §id links to cards PDF\newcommand{\acref}[1]{% \href{https://papers.aesthetic.computer/\acrefurl{#1}-cards.pdf}% {\tikz[baseline=(X.base)]{% \node[inner sep=0pt, outer sep=0pt] (X) {\color{cyan!70!blue}\texttt{§#1}};% \node[inner sep=0pt, outer sep=0pt, opacity=0.15] at ([xshift=0.3pt, yshift=-0.3pt]X) {\color{black}\texttt{§#1}};% }}%}% Regular paper format: §id links to regular PDF\newcommand{\acpref}[1]{% \href{https://papers.aesthetic.computer/\acrefurl{#1}.pdf}% {\tikz[baseline=(X.base)]{% \node[inner sep=0pt, outer sep=0pt] (X) {\color{cyan!70!blue}\texttt{§#1}};% \node[inner sep=0pt, outer sep=0pt, opacity=0.15] at ([xshift=0.3pt, yshift=-0.3pt]X) {\color{black}\texttt{§#1}};% }}%}
% === INDEX CARD (table of contents on its own card) ===% Call \cardindex after the title card to generate a section overview\newcommand{\cardindex}{% \clearpage \thispagestyle{fancy} \vspace*{0.2em} {\acbold\normalsize\color{acdark} Index}\par \vspace{0.3em} \rule{\linewidth}{0.5pt}\par \vspace{0.4em} {\@starttoc{toc}} \vspace*{\fill}}
% Card-specific commands\newcommand{\cardtitle}[1]{% {\acbold\large\color{acdark}#1}\par\vspace{0.3em}%}\newcommand{\cardsubtitle}[1]{% {\aclight\normalsize\color{acpink}#1}\par\vspace{0.2em}%}\newcommand{\cardnote}[1]{% {\small\color{acgray}\textit{#1}}%}
% Song notation display (for showing notepat rawSong format)\newcommand{\notesong}[1]{% \begin{darkcard} {\ttfamily\small #1} \end{darkcard}}
% Big quote for card format\newcommand{\cardquote}[2]{% \begin{accentcard} \textit{``#1''}\\[0.3em] {\small\color{acgray}--- #2} \end{accentcard}}
\endinput