von Bartman » Di 13. Aug 2019, 23:20
Wenn die Anordnung der Tabellen nicht so sein muss, wie in Deinem Beispiel, dann könntest Du mit dem Paket
multicol das folgende Ergebnis erreichen.
\documentclass[landscape]{scrartcl}
\usepackage{geometry}
\geometry{
hmargin=3cm,
vmargin=2cm%,
% bindingoffset=5mm
}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage{eso-pic}
\usepackage{calc}
\usepackage{scrlayer-scrpage}
\usepackage{multicol}
\usepackage{array}
\clearpairofpagestyles
\ofoot*{\pagemark}
\chead{tmux cheat sheet}
\setkomafont{pagehead}{\huge\bfseries}
\makeatletter
\AddToShipoutPicture{%
\begingroup
\setlength{\@tempdima}{15mm}%
\setlength{\@tempdimb}{\paperwidth-2\@tempdima}%
\setlength{\@tempdimc}{\paperheight-2\@tempdima}%
\linethickness{1mm}% Breite der Linie
\put(\LenToUnit{\@tempdima},\LenToUnit{\@tempdima}){%
\framebox(\LenToUnit{\@tempdimb},\LenToUnit{\@tempdimc}){}}%
\endgroup
}
\makeatother%
\begin{document}
\begin{multicols}{3}
\raggedright% Ersatz für alle \noindent-Befehl
\begin{tabular}{|>{\ttfamily}l|}
\hline
\textnormal{\textbf{General}}\\
\hline
prefix \\
CTRL + :\\
start new \\
tmux \\
start new session with name \\
tmux new -s myname \\
attach \\
tmux a \# \\
attach to named
tmux a -t myname \\
list sessions \\
tmux ls \\
kill sessions \\
tmux kill-sessions -t myname \\
\hline
\end{tabular}
\bigskip
\begin{tabular}{|l|l|}
\hline
\textbf{Panes(split)} & \\
\hline
\% & vertical split \\
" & horizontal split \\
o & swap panes \\
q & show numbers \\
x & kill \\
+ & break into window \\
- & restore from window \\
& toggel to layouts \\
\{ & move left \\
\} & move right \\
z & toggle zoom ls \\
\hline
\end{tabular}
\begin{tabular}{|l|l|l|}
\hline
\textbf{Copy mode} & & \\
\hline
\textbf{Function} & \textbf{vi} & \textbf{emacs}\\
back to indentaion & \texttt{\^{}} & \texttt{M-m}\\
start selection & \texttt{space} & \texttt{C-space} \\
clear selection & \texttt{ESC} & \texttt{C-g} \\
copy selection & \texttt{ENTER} & \texttt{M-w} \\
cursor down & \texttt{j} & \texttt{down} \\
cursor up & \texttt{k} & \texttt{up} \\
cursor right & \texttt{l} & \texttt{right} \\
cursor left & \texttt{h} & \texttt{left} \\
delete line & \texttt{d} & \texttt{C-u} \\
delete to end of line & \texttt{D} & \texttt{C-k} \\
end of line & \texttt{\$} & \texttt{C-e} \\
start of line & \texttt{0} & \texttt{C-e} \\
next page & \texttt{C-f} & \texttt{PgDn} \\
next word & \texttt{w} & \texttt{M-f} \\
past buffer & \texttt{c} & \texttt{C-y} \\
quit mode & \texttt{q} & \texttt{Esc} \\
scroll up & \texttt{K} & \texttt{C-up} \\
scroll down & \texttt{J} & \texttt{C-down} \\
search again & \texttt{n} & \texttt{n} \\
search backward & \texttt{?} & \texttt{C-r} \\
search forward & \texttt{/} & \texttt{C-s} \\
\hline
\end{tabular}
\begin{tabular}{|l|l|}
\hline
\textbf{Sessions} & \\
\hline
S & list sessions \\
\$ & rename sessions \\
\hline
\end{tabular}
\begin{tabular}{|>{\ttfamily}l|l|}
\hline
\textnormal{\textbf{Commands}} & \\
\hline
resize.pane -D 20 & resize down \\
resize.pane -U 20 & resize up \\
resize.pane -L 20 & resize left \\
resize.pane -R 20 & resize right \\
\$ & rename sessions \\
\hline
\end{tabular}
\medskip
\begin{tabular}{|l|l|}
\hline
\textbf{Windows /tabs)} & \\
\hline
c & create window \\
w & list window \\
n & next window \\
p & previous window \\
f & find window \\
, & name window \\
\& & kill window \\
\hline
\end{tabular}
\medskip
\begin{tabular}{|>{\ttfamily}l|l|}
\hline
\textnormal{\textbf{Misc)}} & \\
\hline
d & detach \\
t & clock \\
? & list shortcuts \\
: & prompt \\
\hline
\end{tabular}
\medskip
\begin{tabular}{|l|}
\hline
\textbf{Reload)} \\
\hline
\$ tmux source-file \~/.tmux.conf\\
\hline
\end{tabular}
\end{multicols}
\end{document}
In einigen Tabellen kannst Du sehen, wie Du die Schreibmaschinenschrift für eine ganze Spalte setzen kannst. So lassen sich die \texttt-Befehle in jeder Zelle der Tabelle für den Copy mode vermeiden.
Es gibt noch
andere Möglichkeiten, einen Rahmen einzufügen.
Wenn die Anordnung der Tabellen nicht so sein muss, wie in Deinem Beispiel, dann könntest Du mit dem Paket [p]multicol[/p] das folgende Ergebnis erreichen.
[code]\documentclass[landscape]{scrartcl}
\usepackage{geometry}
\geometry{
hmargin=3cm,
vmargin=2cm%,
% bindingoffset=5mm
}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage{eso-pic}
\usepackage{calc}
\usepackage{scrlayer-scrpage}
\usepackage{multicol}
\usepackage{array}
\clearpairofpagestyles
\ofoot*{\pagemark}
\chead{tmux cheat sheet}
\setkomafont{pagehead}{\huge\bfseries}
\makeatletter
\AddToShipoutPicture{%
\begingroup
\setlength{\@tempdima}{15mm}%
\setlength{\@tempdimb}{\paperwidth-2\@tempdima}%
\setlength{\@tempdimc}{\paperheight-2\@tempdima}%
\linethickness{1mm}% Breite der Linie
\put(\LenToUnit{\@tempdima},\LenToUnit{\@tempdima}){%
\framebox(\LenToUnit{\@tempdimb},\LenToUnit{\@tempdimc}){}}%
\endgroup
}
\makeatother%
\begin{document}
\begin{multicols}{3}
\raggedright% Ersatz für alle \noindent-Befehl
\begin{tabular}{|>{\ttfamily}l|}
\hline
\textnormal{\textbf{General}}\\
\hline
prefix \\
CTRL + :\\
start new \\
tmux \\
start new session with name \\
tmux new -s myname \\
attach \\
tmux a \# \\
attach to named
tmux a -t myname \\
list sessions \\
tmux ls \\
kill sessions \\
tmux kill-sessions -t myname \\
\hline
\end{tabular}
\bigskip
\begin{tabular}{|l|l|}
\hline
\textbf{Panes(split)} & \\
\hline
\% & vertical split \\
" & horizontal split \\
o & swap panes \\
q & show numbers \\
x & kill \\
+ & break into window \\
- & restore from window \\
& toggel to layouts \\
\{ & move left \\
\} & move right \\
z & toggle zoom ls \\
\hline
\end{tabular}
\begin{tabular}{|l|l|l|}
\hline
\textbf{Copy mode} & & \\
\hline
\textbf{Function} & \textbf{vi} & \textbf{emacs}\\
back to indentaion & \texttt{\^{}} & \texttt{M-m}\\
start selection & \texttt{space} & \texttt{C-space} \\
clear selection & \texttt{ESC} & \texttt{C-g} \\
copy selection & \texttt{ENTER} & \texttt{M-w} \\
cursor down & \texttt{j} & \texttt{down} \\
cursor up & \texttt{k} & \texttt{up} \\
cursor right & \texttt{l} & \texttt{right} \\
cursor left & \texttt{h} & \texttt{left} \\
delete line & \texttt{d} & \texttt{C-u} \\
delete to end of line & \texttt{D} & \texttt{C-k} \\
end of line & \texttt{\$} & \texttt{C-e} \\
start of line & \texttt{0} & \texttt{C-e} \\
next page & \texttt{C-f} & \texttt{PgDn} \\
next word & \texttt{w} & \texttt{M-f} \\
past buffer & \texttt{c} & \texttt{C-y} \\
quit mode & \texttt{q} & \texttt{Esc} \\
scroll up & \texttt{K} & \texttt{C-up} \\
scroll down & \texttt{J} & \texttt{C-down} \\
search again & \texttt{n} & \texttt{n} \\
search backward & \texttt{?} & \texttt{C-r} \\
search forward & \texttt{/} & \texttt{C-s} \\
\hline
\end{tabular}
\begin{tabular}{|l|l|}
\hline
\textbf{Sessions} & \\
\hline
S & list sessions \\
\$ & rename sessions \\
\hline
\end{tabular}
\begin{tabular}{|>{\ttfamily}l|l|}
\hline
\textnormal{\textbf{Commands}} & \\
\hline
resize.pane -D 20 & resize down \\
resize.pane -U 20 & resize up \\
resize.pane -L 20 & resize left \\
resize.pane -R 20 & resize right \\
\$ & rename sessions \\
\hline
\end{tabular}
\medskip
\begin{tabular}{|l|l|}
\hline
\textbf{Windows /tabs)} & \\
\hline
c & create window \\
w & list window \\
n & next window \\
p & previous window \\
f & find window \\
, & name window \\
\& & kill window \\
\hline
\end{tabular}
\medskip
\begin{tabular}{|>{\ttfamily}l|l|}
\hline
\textnormal{\textbf{Misc)}} & \\
\hline
d & detach \\
t & clock \\
? & list shortcuts \\
: & prompt \\
\hline
\end{tabular}
\medskip
\begin{tabular}{|l|}
\hline
\textbf{Reload)} \\
\hline
\$ tmux source-file \~/.tmux.conf\\
\hline
\end{tabular}
\end{multicols}
\end{document}[/code]
In einigen Tabellen kannst Du sehen, wie Du die Schreibmaschinenschrift für eine ganze Spalte setzen kannst. So lassen sich die [tt]\texttt[/tt]-Befehle in jeder Zelle der Tabelle für den Copy mode vermeiden.
Es gibt noch [url=https://texwelt.de/wissen/fragen/10072]andere Möglichkeiten[/url], einen Rahmen einzufügen.