Arrange in grid using multicols and minipage

This commit is contained in:
eneller
2023-08-15 22:49:05 +02:00
parent 131b0c9e01
commit 4d39219076

View File

@@ -5,19 +5,25 @@
% layout related packages % layout related packages
\usepackage{parskip} \usepackage{parskip}
\usepackage[a4paper, margin=1pt]{geometry} \usepackage[a4paper, margin=.9cm]{geometry}
\usepackage{pdflscape} \usepackage{pdflscape}
\usepackage{multicol}
% TODO show the mod key in a diferent way, maybe shortend as "mod" or darker like the example % TODO show the mod key in a diferent way, maybe shortend as "mod" or darker like the example
\newcommand{\mod}{\ctrl + B} \newcommand{\mod}{\ctrl + B}
\newcommand{\tkeys}[1]{\keys{\ctrl + B + #1}} \newcommand{\tkeys}[1]{\keys{\ctrl + B + #1}}
% \end{minipage} and \begin{minipage} cannot be seperated by an empty line
\begin{document} \begin{document}
\begin{landscape} \begin{landscape}
\begin{multicols}{2}
\begin{minipage}{\columnwidth}
\section{sessions} \section{sessions}
\subsection*{new sessions} \subsection*{new sessions}
tmux tmux
@@ -35,7 +41,8 @@ tmux kill-session -t sessionname
\tkeys{D} detach \\ \tkeys{D} detach \\
\tkeys{(} next \\ \tkeys{(} next \\
\tkeys{)} previous \\ \tkeys{)} previous \\
\end{minipage}
\begin{minipage}{\columnwidth}
\section{panes} \section{panes}
are the sections that make up a window are the sections that make up a window
\subsection*{key bindings} \subsection*{key bindings}
@@ -50,7 +57,13 @@ are the sections that make up a window
\tkeys{\{} move pane left \\ \tkeys{\{} move pane left \\
\tkeys{!} convert pane to window \\ \tkeys{!} convert pane to window \\
\tkeys{X} kill pane \tkeys{X} kill pane
\end{minipage}
\end{multicols}
\vspace*{\fill} % Pushes the next minipages to the bottom
\begin{multicols}{2}
\begin{minipage}{\columnwidth}
\section{windows} \section{windows}
are like tabs and occupy the space of a session screen are like tabs and occupy the space of a session screen
\subsection*{key bindings} \subsection*{key bindings}
@@ -64,7 +77,8 @@ are like tabs and occupy the space of a session screen
\tkeys{,} rename window \\ \tkeys{,} rename window \\
\tkeys{F} search window \\ \tkeys{F} search window \\
\tkeys{\&} kill window \tkeys{\&} kill window
\end{minipage}
\begin{minipage}{\columnwidth}
\section{copy mode} \section{copy mode}
\subsection*{key bindings} \subsection*{key bindings}
\tkeys{[} enter copy mode \\ \tkeys{[} enter copy mode \\
@@ -80,6 +94,8 @@ are like tabs and occupy the space of a session screen
\keys{/} search \\ \keys{/} search \\
\keys{\#} list paste buffers \\ \keys{\#} list paste buffers \\
\keys{q} quit \keys{q} quit
\end{minipage}
\end{multicols}
\end{landscape} \end{landscape}
\end{document} \end{document}