\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{Marco Ponton (mponton)} \pdfinfo{ /Title (qk-standard-readme-md.pdf) /Creator (Cheatography) /Author (Marco Ponton (mponton)) /Subject (QK Standard README.md 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}{251565} \definecolor{LightBackground}{HTML}{F8F7FA} \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{QK Standard README.md Cheat Sheet}}}} \\ \normalsize{by \textcolor{DarkBackground}{Marco Ponton (mponton)} via \textcolor{DarkBackground}{\uline{cheatography.com/173169/cs/36384/}}} \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}Marco Ponton (mponton) \\ \uline{cheatography.com/mponton} \\ \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Cheat Sheet}} \\ \vspace{-2pt}Not Yet Published.\\ Updated 11th January, 2023.\\ 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{1.28156 cm} x{1.09848 cm} x{2.19696 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{5.377cm}}{\bf\textcolor{white}{Sections}} \tn % Row 0 \SetRowColor{LightBackground} Title & Required & Usually this should be the repository name \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} Table of Content & Optional & Strongly recommended if you have a long README \tn % Row Count 6 (+ 3) % Row 2 \SetRowColor{LightBackground} Summary & Required & Summary of the content of the repository \tn % Row Count 9 (+ 3) % Row 3 \SetRowColor{white} Features & Optional & Feature of your tool, modules, library \tn % Row Count 11 (+ 2) % Row 4 \SetRowColor{LightBackground} \seqsplit{Prerequisites} & Required & Prerequisites for using your tool, module, library \tn % Row Count 14 (+ 3) % Row 5 \SetRowColor{white} Usage & Required & Basic usage for your tool, module, library \tn % Row Count 17 (+ 3) % Row 6 \SetRowColor{LightBackground} Examples & Optional & More specific examples of how to use your tool, module, library \tn % Row Count 21 (+ 4) % Row 7 \SetRowColor{white} Common Problems & Optional & If any identified, list the common problems that users can encounter here \tn % Row Count 25 (+ 4) % Row 8 \SetRowColor{LightBackground} \seqsplit{terraform-docs} Sections & Required (TF Module) & For Terraform modules, ensure you run the `terraform-docs` tool to include generated documentation for your module \tn % Row Count 31 (+ 6) \hhline{>{\arrayrulecolor{DarkBackground}}---} \SetRowColor{LightBackground} \mymulticolumn{3}{x{5.377cm}}{This is a list of "standard" sections but you do not have to limit yourself to these sections. Feel free to add any other sections that would improve documentation, user experience, and minimize end-user questions and support requests.} \tn \hhline{>{\arrayrulecolor{DarkBackground}}---} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{2.4885 cm} x{2.4885 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Recommended Tools}} \tn % Row 0 \SetRowColor{LightBackground} \{\{link="https://code.visualstudio.com/"\}\}Visual Studio Code\{\{/link\}\} & QK's preferred code editor \tn % Row Count 4 (+ 4) % Row 1 \SetRowColor{white} \{\{link="https://marketplace.visualstudio.com/items?itemName=DavidAnson.vscode-markdownlint"\}\}markdownlint\{\{/link\}\} & Helps ensure consistent Markdown structure and format \tn % Row Count 10 (+ 6) % Row 2 \SetRowColor{LightBackground} \{\{link="https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker"\}\}Code Spell Checker\{\{/link\}\} & Helps ensure your README does not have any typo \tn % Row Count 17 (+ 7) % Row 3 \SetRowColor{white} \{\{link="https://marketplace.visualstudio.com/items?itemName=joffreykern.markdown-toc"\}\}Markdown TOC\{\{/link\}\} & Helps creating Markdown table of content \tn % Row Count 23 (+ 6) % Row 4 \SetRowColor{LightBackground} \{\{link="https://marketplace.visualstudio.com/items?itemName=TakumiI.markdowntable"\}\}Markdown Table\{\{/link\}\} & Helps creating Markdown tables \tn % Row Count 29 (+ 6) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Title}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{To keep things simple, you should usually set the title to the name of the repository since the README.md file is displayed by BitBucket.% Row Count 3 (+ 3) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Table of Content}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{If you have a somewhat long README, we strongly recommend you add a ToC section so that users can have a quick view of all the content in your README and easily jump to a section they wish to read. We recommend you use a VS Code extension for this as creating the ToC manually is tedious.% Row Count 6 (+ 6) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Summary}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{Summary of the content of the repository. This is usually a one-liner or a short paragraph. If desired, you can put this directly under the "Title" section. The goal is to let the user know early what the repository contains.% Row Count 5 (+ 5) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Features}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{When creating a generic tool, module or library, we strongly recommend you create a "Features" section to "sell" it to potential users. The main benefit of such tools, modules or libraries is to standardize how things are done and provide users with easy to consume "LEGO" blocks on which they can build more complex projects. If you invested time to make your tool "usable" by many, you should take the time to explain its features and "sell" it to potential users so it bring value to many, not only you.% Row Count 11 (+ 11) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Prerequisites}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{Ensure you document any prerequisites (software, steps, permissions, etc) needed to use the content of your repository. Doing so will ensure people who takes the time to read your documentation will not waste any time trying to make things work when they unknowingly are missing prerequisites. It will also minimize questions and complaints from users.% Row Count 8 (+ 8) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Usage}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{Make sure you provide users with basic usage information for the content of your repository. What may seem evident to you may not be clear to others without context and explanations. This section should include the minimal information to get users up-and-running.% Row Count 6 (+ 6) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Examples}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{In this section, you should include examples of how to use the content of your repository. It can be task-focused (e.g. To do this: Use this way), it can include code to show some common usage patterns or it can refer to more complete examples stored in the repository. You are free to use the format you want, the goal is to provide the users with common examples they can learn from.% Row Count 8 (+ 8) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{Common Problems}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{When you are aware (e.g. from your own experience or from user feedback) of common questions, problems, pitfalls or limitations, you should document them in this section. When you have solution or workarounds you should include them as well. The goal is to empower the user with the information needed to fix "most" issues already identified and minimize questions and complaints. -{}-{}- As your repository become more popular, you may identify new questions or issues. When you do, you should update your README with new content.% Row Count 11 (+ 11) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{terraform-docs Sections}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{Required for all {\emph{Terraform Modules}}. Please see the Terraform module specific cheat sheet for details.% Row Count 3 (+ 3) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{5.377cm}}{\bf\textcolor{white}{\{\{fa-gift\}\} Tips}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Always include a `README.md` file in all your repositories. This file is automatically displayed by BitBucket and act as the main documentation for your repository.} \tn % Row Count 4 (+ 4) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{If your repository is published (public or to other project members), make sure your `README.md` file includes the `Required` sections.} \tn % Row Count 7 (+ 3) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{When necessary, feel free to add per-directory `README.md` files inside your project to further improve documentation. These READMEs don't have to include all sections, they can simply include information more specific to this part of the repository.} \tn % Row Count 12 (+ 5) % Row 3 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{As the content of your repository changes, do not forget to update your README file(s).} \tn % Row Count 14 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} % That's all folks \end{multicols*} \end{document}