Skip to content

Commit 67abe57

Browse files
committed
migrating to LaTeX 2023
1 parent feb2808 commit 67abe57

File tree

15 files changed

+389
-89
lines changed

15 files changed

+389
-89
lines changed

.github/workflows/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Book generation
1+
name: Pillar >10
22

33
on:
44
push:
@@ -13,6 +13,6 @@ on:
1313

1414
jobs:
1515
build:
16-
uses: SquareBracketAssociates/BookBuilderDashboard/.github/workflows/main.yml@master
16+
uses: SquareBracketAssociates/BookBuilderDashboard/.github/workflows/main.yml@newVersionOfPillar
1717
with:
1818
bookname: DynamicWebDev-wip

_support/latex/sbabook/.drone.yml

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
---
2+
kind: pipeline
3+
type: docker
4+
name: TeXlive
5+
6+
steps:
7+
- name: build
8+
image: texlive/texlive
9+
commands:
10+
- tlmgr option repository https://ctan.gutenberg-asso.fr/systems/texlive/tlnet
11+
- tlmgr update --self --all
12+
- latexmk sbabook
13+
- latexmk sbabook.bod
14+
- latexmk sbabook.spiral
15+
16+
- name: build log
17+
image: alpine
18+
commands:
19+
- cat sbabook.log
20+
- cat sbabook.bod.log
21+
- cat sbabook.spiral.log
22+
when:
23+
status: [failure, success]
24+
25+
---
26+
kind: pipeline
27+
type: docker
28+
name: minimal TeXlive
29+
30+
steps:
31+
- name: build
32+
image: texlive/texlive:latest-minimal
33+
pull: always
34+
commands:
35+
- tlmgr option repository https://ctan.gutenberg-asso.fr/systems/texlive/tlnet
36+
- tlmgr update --self --all
37+
- tlmgr install latex-bin latexmk
38+
- xargs tlmgr install < texlive.deps
39+
- tlmgr path add
40+
- latexmk sbabook
41+
- latexmk sbabook.bod
42+
- latexmk sbabook.spiral
43+
44+
- name: build log
45+
image: alpine
46+
commands:
47+
- cat sbabook.log
48+
- cat sbabook.bod.log
49+
- cat sbabook.spiral.log
50+
when:
51+
status: [failure, success]
52+
53+
---
54+
kind: pipeline
55+
type: docker
56+
name: Ubuntu + TeXlive 2023
57+
58+
environment:
59+
TEXLIVE_RELEASE: 2023
60+
61+
steps:
62+
- name: build
63+
image: ubuntu
64+
commands:
65+
- apt update && apt install -y curl perl
66+
- export PATH=$HOME/texlive/bin/x86_64-linux:$HOME/texlive/bin/aarch64-linux:$PATH
67+
- ./ci/install-texlive
68+
- xargs tlmgr install < texlive-2023.deps
69+
- latexmk sbabook
70+
- latexmk sbabook.bod
71+
- latexmk sbabook.spiral
72+
73+
- name: build log
74+
image: alpine
75+
commands:
76+
- cat sbabook.log
77+
- cat sbabook.bod.log
78+
- cat sbabook.spiral.log
79+
when:
80+
status: [failure, success]
81+
82+
---
83+
kind: pipeline
84+
type: docker
85+
name: Ubuntu + TeXlive rolling
86+
87+
environment:
88+
TEXLIVE_RELEASE: rolling
89+
90+
steps:
91+
- name: build
92+
image: ubuntu
93+
commands:
94+
- apt update && apt install -y curl perl
95+
- export PATH=$HOME/texlive/bin/x86_64-linux:$HOME/texlive/bin/aarch64-linux:$PATH
96+
- ./ci/install-texlive
97+
- xargs tlmgr install < texlive.deps
98+
- latexmk sbabook
99+
- latexmk sbabook.bod
100+
- latexmk sbabook.spiral
101+
102+
- name: build log
103+
image: alpine
104+
commands:
105+
- cat sbabook.log
106+
- cat sbabook.bod.log
107+
- cat sbabook.spiral.log
108+
when:
109+
status: [failure, success]

_support/latex/sbabook/.gitrepo

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
;
66
[subrepo]
77
remote = https://github.com/cdlm/sbabook.git
8-
branch = master
9-
commit = 6ba943f40408c19528b5c62d5c498c9507e44335
10-
parent = d9663feb3a92f12b7cc6268e6cc41a5d6aef60da
8+
branch = v0.2.8
9+
commit = ffabafecf60c20d856b706f9377595a45be7704f
10+
parent = 45207449de0cce8a515afcfe358fabf185a14d30
1111
method = merge
12-
cmdver = 0.4.1
12+
cmdver = 0.4.6

_support/latex/sbabook/.travis.yml

Lines changed: 0 additions & 27 deletions
This file was deleted.

_support/latex/sbabook/README.markdown

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,12 @@ SBAbook — A LaTeX class for technical books
44
This is a set of layout, typography, and markup definitions for LaTeX books based on the [memoir][] document class.
55
It is intended for use by [Square Bracket Associates (SBA)][sba], and heavily customized in this direction — by this I mean it's made to setup specific semantic markup and typographic style, rather than to be flexible.
66

7-
[![Build Status](https://travis-ci.org/cdlm/sbabook.svg?branch=master)](https://travis-ci.org/cdlm/sbabook)
8-
[![Flattr this git repo](https://button.flattr.com/flattr-badge-large.png)](https://flattr.com/submit/auto?url=https%3A%2F%2Fgithub.com%2Fcdlm%2Fsbabook)
7+
[![Donate](https://liberapay.com/assets/widgets/donate.svg)](https://liberapay.com/cdlm/donate "Donate using Liberapay")
98

109

1110
## Usage (nearly there)
1211

13-
The preamble is limited to the minimum:
12+
Here is the minimal preamble:
1413

1514
```latex
1615
\documentclass{sbabook}

_support/latex/sbabook/ci/install-texlive

Lines changed: 33 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -4,56 +4,43 @@ trap 's=$?; echo "$0: Error on line "$LINENO": $BASH_COMMAND"; exit $s' ERR
44
IFS=$'\n\t'
55
# preamble from https://disconnected.systems/blog/another-bash-strict-mode/
66

7+
: "${TEXLIVE_TARBALL:=install-tl-unx.tar.gz}"
8+
79
function die() {
810
echo "$@" >&2
911
exit 1
1012
}
1113

1214
function texlive-repo() {
1315
[[ $# -eq 1 ]] || die "${FUNCNAME[0]}: No release specified (YYYY or rolling)"
14-
local release="$1"
16+
local release="$1" url
1517

1618
if [[ "$release" = rolling ]]; then
17-
echo 'http://mirror.ctan.org/systems/texlive/tlnet'
19+
url='http://mirror.ctan.org/systems/texlive/tlnet'
1820
else
1921
[[ "$release" = [0-9][0-9][0-9][0-9] ]] || die "${FUNCNAME[0]}: incorrect release '$release'"
20-
echo "https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/${release}/tlnet-final/"
22+
url="https://ftp.tu-chemnitz.de/pub/tug/historic/systems/texlive/${release}/tlnet-final/"
2123
# the rolling release is missing the shasum, and the tlnet directory
2224
# US mirror: http://ftp.math.utah.edu/pub/tex/historic/systems/texlive/${release}/
2325
fi
24-
}
25-
26-
function deps-file() {
27-
if [[ "$1" = [0-9][0-9][0-9][0-9] ]]; then
28-
echo "texlive-$1.deps"
29-
else
30-
echo texlive.deps
31-
fi
32-
}
3326

34-
function texlive-release() {
35-
tlmgr --version \
36-
| grep 'TeX Live .*version' \
37-
| grep --only-matching '\d\d\d\d'
27+
# resolve possible mirror to fixed URL
28+
curl -LIs -o /dev/null -w '%{url_effective}' "$url"
3829
}
3930

40-
# Ensure meaningful default values for required environment variables.
41-
# Override the full repository URL or set TEXLIVE_RELEASE to pick that year's frozen release.
42-
# Defaults to the current rolling release.
43-
: "${TEXLIVE_RELEASE:=rolling}"
44-
: "${TEXLIVE_REPOSITORY:="$(texlive-repo "$TEXLIVE_RELEASE")"}"
45-
: "${TEXLIVE_TARBALL:=install-tl-unx.tar.gz}"
46-
4731
function get-texlive-installer() {
32+
[[ $# -eq 1 ]] || die "Usage: ${FUNCNAME[0]} texlive-repo-url"
33+
local repo="$1"
34+
4835
# download, checksum, extract
49-
curl --silent --location --remote-name-all "${TEXLIVE_REPOSITORY}/${TEXLIVE_TARBALL}"{,.sha512}
50-
shasum --check "${TEXLIVE_TARBALL}.sha512"
36+
curl --silent --location --remote-name-all "${repo}/${TEXLIVE_TARBALL}"{,.sha512}
37+
sha512sum --check "${TEXLIVE_TARBALL}.sha512"
5138
tar --extract --gzip --file "${TEXLIVE_TARBALL}"
5239
}
5340

5441
function texlive-profile() {
5542
cat <<EOF
56-
selected_scheme scheme-basic
43+
selected_scheme scheme-infraonly
5744
5845
TEXDIR $HOME/texlive
5946
TEXMFLOCAL \$TEXDIR/texmf-local
@@ -76,36 +63,42 @@ tlpdbopt_generate_updmap 0
7663
tlpdbopt_install_docfiles 0
7764
tlpdbopt_install_srcfiles 0
7865
tlpdbopt_post_code 1
79-
66+
tlpdbopt_sys_bin /usr/local/bin
67+
tlpdbopt_sys_info /usr/local/info
68+
tlpdbopt_sys_man /usr/local/man
8069
EOF
8170
}
8271

8372
function install-texlive() {
84-
[[ $TRAVIS = true ]] || die "Should only run on Travis"
85-
echo "Downloading minimal TeXlive..."
86-
echo " release $TEXLIVE_RELEASE"
87-
echo " from $TEXLIVE_REPOSITORY"
73+
[[ $# -eq 2 ]] || die "Usage: ${FUNCNAME[0]} (YYYY | rolling) texlive-repository-url"
74+
local release="$1" repo="$2"
8875

89-
get-texlive-installer
76+
echo "Downloading TeXlive..."
77+
echo " release ${release}"
78+
echo " from ${repo}"
79+
80+
get-texlive-installer "$repo"
9081

9182
# find installer path from archive listing, sanity check
9283
local installer
9384
installer="$(tar --list --gzip --file "${TEXLIVE_TARBALL}" | grep '/install-tl$' )"
9485
[[ -x "$installer" ]] || die "can not find TeXlive installer at ${installer}";
9586

9687
texlive-profile >> texlive.profile
97-
"$installer" --repository "$TEXLIVE_REPOSITORY" --profile texlive.profile
98-
}
88+
"$installer" --repository "$repo" --profile texlive.profile
89+
tlmgr option repository "$repo"
9990

100-
function install-deps() {
101-
xargs tlmgr install \
102-
latexmk \
103-
< "$(deps-file "$TEXLIVE_RELEASE")"
91+
tlmgr update --self --all
92+
tlmgr install latex-bin latexmk
10493
}
10594

10695
# Only call the main function if this script was called as a command. This makes
10796
# it possible to source this script as a library.
10897
if [[ ${BASH_SOURCE[0]} == "$0" ]]; then
109-
install-texlive
110-
install-deps
98+
# Override the full repository URL or set TEXLIVE_RELEASE to pick that year's frozen release.
99+
# Defaults to the current rolling release.
100+
release="${1:-${TEXLIVE_RELEASE:-rolling}}"
101+
repo="${2:-${TEXLIVE_REPOSITORY:-$(texlive-repo "$release")}}"
102+
103+
install-texlive "$release" "$repo"
111104
fi

0 commit comments

Comments
 (0)