I'm trying to write some commentary about data that is formatted to a very old standard (ARINC 424) in which each record is a 132-column line and data fields are identified by the columns they occupy.
Thus, I would like to be able to number the columns in addition to the lines in a lstlisting environment, but I can't find any way to do this in the listing package documents.
I was thinking that printing the column numbers along the top of the listing rotated 90 degrees CCW would be relatively readable. Does anyone have any idea how I could implement this?
Thanks in advance. I'm including a MWE but I don't think it's particularly useful since I don't know how to approach this at all.
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[letterpaper,margin=0.985in]{geometry} % weird margin so ARINC lines fit at 132 chars
\usepackage{xcolor}
\usepackage{listings} %for code snippets
\lstset{
tabsize=4,
numbers=left,
numberstyle=\ttfamily\color{gray},
frame = l,
basicstyle=\scriptsize\ttfamily,
breaklines=true,
postbreak=\mbox{\textcolor{red}{$\hookrightarrow$}\space},
}
\usepackage[scaled=0.85]{beramono} %better typewriter font
\usepackage[T1]{fontenc}
\begin{document}
\begin{lstlisting}[
float=hbt!,
caption=CIFP definition of the RNAV (GPS) Y RWY 13 approach procedure.,
label=lst:kacyiap
]
SUSAP KACYK6FR13-Y ACARYL 010CARYLK6PC0EE AR HF 12790060 + 02000 18000 A JS 090681310
SUSAP KACYK6FR13-Y AKOVEC 010KOVECK6PC0E A IF 18000 A JS 090691310
SUSAP KACYK6FR13-Y AKOVEC 020CARYLK6PC0EE B 010TF 03780060 + 02000 A JS 090701310
SUSAP KACYK6FR13-Y AWAGIR 010WAGIRK6PC0E A IF 18000 A JS 090711310
SUSAP KACYK6FR13-Y AWAGIR 020CARYLK6PC0EE B 010TF 21790060 + 02000 A JS 090721310
SUSAP KACYK6FR13-Y R 010CARYLK6PC0E I IF + 02000 18000 A JS 090731310
SUSAP KACYK6FR13-Y R 020MAYBNK6PC1E F 051TF 12790061 + 01600 A JS 090741310
SUSAP KACYK6FR13-Y R 020MAYBNK6PC2WALPV ALNAV/VNAV ALNAV JS 090751310
SUSAP KACYK6FR13-Y R 030RW13 K6PG0GY M 031TF 12790046 00133 -300 A JS 090761010
SUSAP KACYK6FR13-Y R 040 0 M CA 1279 + 00275 A JS 090771010
SUSAP KACYK6FR13-Y R 050JURADK6PC0E 010DF A JS 090781310
SUSAP KACYK6FR13-Y R 060RODDIK6PC0EY 010TF 0756 + 02000 A JS 090791310
SUSAP KACYK6FR13-Y R 070RODDIK6PC0EE R020HM 21820050 + 02000 A JS 090801310
\end{lstlisting}
\end{document}

I also tried using three rows in the first listing with the numerals typed so you can read the number of the column from top to bottom (001, 002, ... 010, 011, ... 100, 101, ...) but that's a lot busier. But it does have the advantage of not needing multiple columns.
– jnrobinson Mar 03 '21 at 20:45