\documentclass[10pt,a4paper]{article} % Packages \usepackage{fancyhdr} % For header and footer \usepackage{multicol} % Allows multicols in tables \usepackage{tabularx} % Intelligent column widths \usepackage{tabulary} % Used in header and footer \usepackage{hhline} % Border under tables \usepackage{graphicx} % For images \usepackage{xcolor} % For hex colours %\usepackage[utf8x]{inputenc} % For unicode character support \usepackage[T1]{fontenc} % Without this we get weird character replacements \usepackage{colortbl} % For coloured tables \usepackage{setspace} % For line height \usepackage{lastpage} % Needed for total page number \usepackage{seqsplit} % Splits long words. %\usepackage{opensans} % Can't make this work so far. Shame. Would be lovely. \usepackage[normalem]{ulem} % For underlining links % Most of the following are not required for the majority % of cheat sheets but are needed for some symbol support. \usepackage{amsmath} % Symbols \usepackage{MnSymbol} % Symbols \usepackage{wasysym} % Symbols %\usepackage[english,german,french,spanish,italian]{babel} % Languages % Document Info \author{yarik} \pdfinfo{ /Title (byebug.pdf) /Creator (Cheatography) /Author (yarik) /Subject (Byebug Cheat Sheet) } % Lengths and widths \addtolength{\textwidth}{6cm} \addtolength{\textheight}{-1cm} \addtolength{\hoffset}{-3cm} \addtolength{\voffset}{-2cm} \setlength{\tabcolsep}{0.2cm} % Space between columns \setlength{\headsep}{-12pt} % Reduce space between header and content \setlength{\headheight}{85pt} % If less, LaTeX automatically increases it \renewcommand{\footrulewidth}{0pt} % Remove footer line \renewcommand{\headrulewidth}{0pt} % Remove header line \renewcommand{\seqinsert}{\ifmmode\allowbreak\else\-\fi} % Hyphens in seqsplit % This two commands together give roughly % the right line height in the tables \renewcommand{\arraystretch}{1.3} \onehalfspacing % Commands \newcommand{\SetRowColor}[1]{\noalign{\gdef\RowColorName{#1}}\rowcolor{\RowColorName}} % Shortcut for row colour \newcommand{\mymulticolumn}[3]{\multicolumn{#1}{>{\columncolor{\RowColorName}}#2}{#3}} % For coloured multi-cols \newcolumntype{x}[1]{>{\raggedright}p{#1}} % New column types for ragged-right paragraph columns \newcommand{\tn}{\tabularnewline} % Required as custom column type in use % Font and Colours \definecolor{HeadBackground}{HTML}{333333} \definecolor{FootBackground}{HTML}{666666} \definecolor{TextColor}{HTML}{333333} \definecolor{DarkBackground}{HTML}{9E9E9E} \definecolor{LightBackground}{HTML}{F8F8F8} \renewcommand{\familydefault}{\sfdefault} \color{TextColor} % Header and Footer \pagestyle{fancy} \fancyhead{} % Set header to blank \fancyfoot{} % Set footer to blank \fancyhead[L]{ \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{C} \SetRowColor{DarkBackground} \vspace{-7pt} {\parbox{\dimexpr\textwidth-2\fboxsep\relax}{\noindent \hspace*{-6pt}\includegraphics[width=5.8cm]{/web/www.cheatography.com/public/images/cheatography_logo.pdf}} } \end{tabulary} \columnbreak \begin{tabulary}{11cm}{L} \vspace{-2pt}\large{\bf{\textcolor{DarkBackground}{\textrm{Byebug Cheat Sheet}}}} \\ \normalsize{by \textcolor{DarkBackground}{yarik} via \textcolor{DarkBackground}{\uline{cheatography.com/31028/cs/9348/}}} \end{tabulary} \end{multicols}} \fancyfoot[L]{ \footnotesize \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{LL} \SetRowColor{FootBackground} \mymulticolumn{2}{p{5.377cm}}{\bf\textcolor{white}{Cheatographer}} \\ \vspace{-2pt}yarik \\ \uline{cheatography.com/yarik} \\ \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Cheat Sheet}} \\ \vspace{-2pt}Published 4th October, 2016.\\ Updated 4th October, 2016.\\ Page {\thepage} of \pageref{LastPage}. \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Sponsor}} \\ \SetRowColor{white} \vspace{-5pt} %\includegraphics[width=48px,height=48px]{dave.jpeg} Measure your website readability!\\ www.readability-score.com \end{tabulary} \end{multicols}} \begin{document} \raggedright \raggedcolumns % Set font size to small. Switch to any value % from this page to resize cheat sheet text: % www.emerson.emory.edu/services/latex/latex_169.html \footnotesize % Small font. \begin{multicols*}{3} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Stopping Again}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{q{[}uit{]}}} - Quit. Note: To quit without an 'are you sure?' prompt, use quit {\emph{unconditionally}} ({\emph{q!}})} \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{kill}} - Really quit. This uses {\emph{kill -9}}, for situations where quit just isn't fierce enough} \tn % Row Count 5 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Essential Commands}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{c{[}ontinue{]} \textless{}line-number\textgreater{}}} - Carry on running until program ends, hits a breakpoint or reaches line {\emph{line-number}} (if specified)} \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{n{[}ext{]} \textless{}number\textgreater{}}} - Go to next line, stepping over function calls. If {\emph{number}} specified, go forward that number of lines} \tn % Row Count 6 (+ 3) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{s{[}tep{]} \textless{}number\textgreater{}}} - Go to next line, stepping into function calls. If {\emph{number}} is specified, make that many steps} \tn % Row Count 9 (+ 3) % Row 3 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{b{[}ack{]}t{[}race{]} — a.k.a. "w{[}here{]}"}} - Display stack trace} \tn % Row Count 11 (+ 2) % Row 4 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{h{[}elp{]} \textless{}command-name\textgreater{}}} - Help. When passed the name of a command, gives help on using that command} \tn % Row Count 14 (+ 3) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Program Stack}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{b{[}ack{]}t{[}race{]} — a.k.a. "w{[}here{]}"}} - Display stack trace} \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{f{[}rame{]} \textless{}frame-number\textgreater{}}} - Moves to \textless{}frame-number\textgreater{} (frame numbers are shown by {\emph{bt}}). With no argument, shows the current frame} \tn % Row Count 5 (+ 3) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{up \textless{}number\textgreater{}}} - Move up \textless{}number\textgreater{} frames (or 1, if no number specified)} \tn % Row Count 7 (+ 2) % Row 3 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{down \textless{}number\textgreater{}}} - Move down \textless{}number\textgreater{} frames (or 1, if no number specified)} \tn % Row Count 9 (+ 2) % Row 4 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{info args}} - Arguments of the current frame} \tn % Row Count 10 (+ 1) % Row 5 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{info locals}} - Local variables in the current stack frame} \tn % Row Count 12 (+ 2) % Row 6 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{info instance\_variables}} - Instance variables in the current stack frame} \tn % Row Count 14 (+ 2) % Row 7 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{info global\_variables}} - Current global variables} \tn % Row Count 16 (+ 2) % Row 8 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{info variables}} - Local and instance variables of the current frame} \tn % Row Count 18 (+ 2) % Row 9 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{m{[}ethod{]} \textless{}class|module\textgreater{}}} - Shows instance methods of the given class or module} \tn % Row Count 20 (+ 2) % Row 10 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{m{[}ethod{]} i{[}nstance{]} \textless{}object\textgreater{}}} - Shows methods of \textless{}object\textgreater{}} \tn % Row Count 22 (+ 2) % Row 11 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{m{[}ethod{]} iv \textless{}object\textgreater{}}} - Shows instance variables of \textless{}object\textgreater{}} \tn % Row Count 24 (+ 2) % Row 12 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{v{[}ar{]} cl{[}ass{]}}} - Shows class variables of self} \tn % Row Count 25 (+ 1) % Row 13 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{v{[}ar{]} co{[}nst{]} \textless{}object\textgreater{}}} - Shows constants of \textless{}object\textgreater{}} \tn % Row Count 27 (+ 2) % Row 14 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{v{[}ar{]} g{[}lobal{]}}} - Shows global variables (same as {\emph{info global\_variables}})} \tn % Row Count 29 (+ 2) % Row 15 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{v{[}ar{]} i{[}nstance{]} \textless{}object\textgreater{}}} - Shows instance variables of \textless{}object\> (same as {\emph{method iv \textless{}object\textgreater{}}})} \tn % Row Count 32 (+ 3) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Program Stack (cont)}} \tn % Row 16 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{v{[}ar{]} l{[}ocal{]}}} - Shows local variables (same as {\emph{info locals}})} \tn % Row Count 2 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Display}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{e{[}val{]} — a.k.a. "p" \textless{}expression\textgreater{}}} - Evaluate \textless{}expression\textgreater{} and display result. By default, you can also just type the expression without any command and get the same thing (disabled by using {\emph{set noautoeval}}} \tn % Row Count 5 (+ 5) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{pp}} - Evaluate expression and pretty-print the result} \tn % Row Count 7 (+ 2) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{putl}} - Evaluate an expression with an array result and columnize the output} \tn % Row Count 9 (+ 2) % Row 3 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{ps}} - Evaluate an expression with an array result, sort and columnize the output} \tn % Row Count 11 (+ 2) % Row 4 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{disp{[}lay{]} \textless{}expression\textgreater{}}} - Automatically display \textless{}expression\textgreater{} every time the program halts. With no argument, lists the current display expressions} \tn % Row Count 14 (+ 3) % Row 5 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{info display}} - List all current display expressions} \tn % Row Count 16 (+ 2) % Row 6 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{undisp{[}lay{]} \textless{}number\textgreater{}}} - Remove display expression number \textless{}number\textgreater{} (as listed by {\emph{info display}}). With no argument, cancel all current display expressions} \tn % Row Count 20 (+ 4) % Row 7 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{disable display \textless{}number\textgreater{}}} - Stop displaying expression number \textless{}number\textgreater{}. The display expression is kept in the list, though, and can be turned back on again using {\emph{enable display}}} \tn % Row Count 24 (+ 4) % Row 8 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{enable display \textless{}number\textgreater{}}} - Re-enable previously disabled display expression \textless{}number\textgreater{}} \tn % Row Count 26 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Breakpoints and Catchpoints}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{b{[}reak{]}}} - Sets a breakpoint at the current line. These can be conditional: {\emph{break if foo != bar}}. Keep reading for more ways to set breakpoints!} \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{b{[}reak{]} \textless{}filename\textgreater{}:\textless{}line-number\textgreater{}}} - Puts a breakpoint at line-number in filename (or the current file if {\emph{filename}} is blank). Again, can be conditional: {\emph{b myfile.rb:15 unless my\_var.nil?}}} \tn % Row Count 7 (+ 4) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{b{[}reak{]} \textless{}class\textgreater{}(.|\#)\textless{}method\textgreater{}}} - Puts a breakpoint at the start of the {\emph{method}} in {\emph{class}}. Accepts an optional condition: {\emph{b MyClass\#my\_method if my\_boolean}}} \tn % Row Count 11 (+ 4) % Row 3 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{info breakpoints}} - List all breakpoints, with status} \tn % Row Count 13 (+ 2) % Row 4 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{cond{[}ition{]} \textless{}number\textgreater{} \textless{}expression\textgreater{}}} - Add condition {\emph{expression}} to breakpoint number\textless{}\textgreater{}. If no {\emph{expression}} is given, removes any conditions from that breakpoint} \tn % Row Count 17 (+ 4) % Row 5 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{del{[}ete{]} \textless{}number\textgreater{}}} - Deletes breakpoint \textless{}number\textgreater{}. With no arguments, deletes all breakpoints} \tn % Row Count 19 (+ 2) % Row 6 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{disable breakpoints \textless{}number\textgreater{}}} - Disable (but don't delete) breakpoint \textless{}number\textgreater{}. With no arguments, disables all breakpoints} \tn % Row Count 22 (+ 3) % Row 7 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{cat{[}ch{]} \textless{}exception\textgreater{} off}} - Enable or (with {\emph{off}} argument) disable catchpoint on \textless{}exception\textgreater{}} \tn % Row Count 24 (+ 2) % Row 8 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{cat{[}ch{]}}} - Lists all catchpoints} \tn % Row Count 25 (+ 1) % Row 9 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{cat{[}ch{]} off}} - Deletes all catchpoints} \tn % Row Count 26 (+ 1) % Row 10 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{sk{[}ip{]}}} - Passes a caught exception back to the application, skipping the catchpoint.} \tn % Row Count 28 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Controlling Byebug}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{hist{[}ory{]} \textless{}num-commands\textgreater{}}} - view last \textless{}num-commands\textgreater{} byebug commands (or all, if no argument given).} \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{save \textless{}file\textgreater{}}} - saves current byebug session options as a script file in \textless{}file\textgreater{}} \tn % Row Count 5 (+ 2) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{source \textless{}file\textgreater{}}} - loads byebug options from a script file at \textless{}file\textgreater{}} \tn % Row Count 7 (+ 2) % Row 3 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{set \textless{}option\textgreater{}}} - change value of byebug option \textless{}option\textgreater{}} \tn % Row Count 9 (+ 2) % Row 4 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{show \textless{}option\textgreater{}}} - view current value of byebug option \textless{}option\textgreater{}} \tn % Row Count 11 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Source Files and Code}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{reload}} - Reload source code} \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{info file}} - Information about the current source file} \tn % Row Count 3 (+ 2) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{info files}} - All currently loaded files} \tn % Row Count 4 (+ 1) % Row 3 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{info lines}} - Shows the current line number and filename} \tn % Row Count 6 (+ 2) % Row 4 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{l{[}ist{]}}} - Shows source code after the current point. Keep reading for more list options} \tn % Row Count 8 (+ 2) % Row 5 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{l{[}ist{]} –}} - Shows source code before the current point} \tn % Row Count 10 (+ 2) % Row 6 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{l{[}ist{]} =}} - Shows source code centred around the current point} \tn % Row Count 12 (+ 2) % Row 7 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{l{[}ist{]} \textless{}first\textgreater{}-\textless{}last\textgreater{}}} - Shows all source code from {\emph{\textless{}first\textgreater{}}} to {\emph{\textless{}last\textgreater{}}} line numbers} \tn % Row Count 14 (+ 2) % Row 8 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{edit \textless{}file:lineno\textgreater{}}} - Edit {\emph{\textless{}file\textgreater{}}}. With no arguments, edits the current file} \tn % Row Count 16 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Execution Control}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{c{[}ontinue{]} \textless{}line-number\textgreater{}}} - Carry on running until program ends, hits a breakpoint or reaches line {\emph{line-number}} (if specified)} \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{n{[}ext{]} \textless{}number\textgreater{}}} - Go to next line, stepping over function calls. If {\emph{number}} specified, go forward that number of lines} \tn % Row Count 6 (+ 3) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{s{[}tep{]} \textless{}number\textgreater{}}} - Go to next line, stepping into function calls. If {\emph{numberis}} specified, make that many steps} \tn % Row Count 9 (+ 3) % Row 3 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{fin{[}ish{]} \textless{}num-frames\textgreater{}}} - With no argument, run until the current frame returns. Otherwise, run until \textless{}num-frames\textgreater{} frames have returned} \tn % Row Count 12 (+ 3) % Row 4 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{irb}} - Start an IRB session} \tn % Row Count 13 (+ 1) % Row 5 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{{\bf{restart}} - Restart the program. This also restarts byebug} \tn % Row Count 15 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{2.28942 cm} x{2.68758 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Threads}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{th{[}read{]}}} & Show current thread \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} {\bf{th{[}read{]} l{[}ist{]}}} & List all threads \tn % Row Count 3 (+ 2) % Row 2 \SetRowColor{LightBackground} {\bf{th{[}read{]} stop \textless{}number\textgreater{}}} & Stop thread number \textless{}number\textgreater{} \tn % Row Count 5 (+ 2) % Row 3 \SetRowColor{white} {\bf{th{[}read{]} resume \textless{}number\textgreater{}}} & Resume thread number \textless{}number\textgreater{} \tn % Row Count 7 (+ 2) % Row 4 \SetRowColor{LightBackground} {\bf{th{[}read{]} \textless{}number\textgreater{}}} & Switch context to thread \textless{}number\textgreater{} \tn % Row Count 9 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} % That's all folks \end{multicols*} \end{document}