formal-ledger-specifications
formal-ledger-specifications copied to clipboard
LaTeX error — Alignment of Agda code fails
I frequently encounter the error
! Package array Error: Empty preamble: `l' used.
when running
fls-shake --trace -j8 cardano-ledger.pdf
after adding Agda code and wanting to look at the output.
Making the alignment more messy works around this issue, but leads to worse output.
I started doing this a lot, for example defining
record Snapshot : Set where
field
stake : Credential ⇀ Coin
delegations : Credential ⇀ KeyHash
poolParameters : KeyHash ⇀ PoolParams
instead of
record Snapshot : Set where
field
stake : Credential ⇀ Coin
delegations : Credential ⇀ KeyHash
poolParameters : KeyHash ⇀ PoolParams
I think it's probably related to https://github.com/agda/agda/issues/7290 and the even further upstream https://github.com/kosmikus/lhs2tex/issues/104. I've also seen this pop up nondeterministically sometimes, and just adding empty lines invalidates some cache sufficiently to fix it in that case. It's not ideal, but I'm not sure there's much more we can do save for actually submitting an upstream patch.