//
··
1#!/usr/bin/env bash
2# Build the paper PDF + sidecar with tectonic.
3#
4# Outputs:
5# build/main.pdf
6# build/main.rrxiv.aux
7#
8# Requires: tectonic (https://tectonic-typesetting.github.io/).
9set -euo pipefail
10
11SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
12ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
13
14if ! command -v tectonic >/dev/null 2>&1; then
15 echo "ERROR: tectonic not found in PATH." >&2
16 echo "Install: brew install tectonic | cargo install tectonic" >&2
17 exit 127
18fi
19
20mkdir -p "$ROOT/build"
21
22tectonic -X compile \
23 --keep-intermediates \
24 --keep-logs \
25 --outdir "$ROOT/build" \
26 "$ROOT/paper/main.tex"
27
28echo "OK build/main.pdf"
29if [[ -f "$ROOT/build/main.rrxiv.aux" ]]; then
30 echo "OK build/main.rrxiv.aux"
31else
32 echo "warn: no main.rrxiv.aux emitted — does paper/main.tex \\usepackage{rrxiv}?" >&2
33fi
34