\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{Vlets} \pdfinfo{ /Title (hst-configuration.pdf) /Creator (Cheatography) /Author (Vlets) /Subject (HST Configuration 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}{3074CF} \definecolor{LightBackground}{HTML}{F2F6FC} \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{HST Configuration Cheat Sheet}}}} \\ \normalsize{by \textcolor{DarkBackground}{Vlets} via \textcolor{DarkBackground}{\uline{cheatography.com/80454/cs/19385/}}} \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}Vlets \\ \uline{cheatography.com/vlets} \\ \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 24th April, 2019.\\ 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*}{2} \begin{tabularx}{8.4cm}{x{3.68 cm} x{4.32 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{General hst properties}} \tn % Row 0 \SetRowColor{LightBackground} \seqsplit{hst:parameternames} (String-Multi) & Define parameter names that can be used in the page/logic associated with the node. \tn % Row Count 4 (+ 4) % Row 1 \SetRowColor{white} \seqsplit{hst:parametervalues} (String-Multi) & Define default parameter values matching one to one with the hst:parameternames. \tn % Row Count 8 (+ 4) % Row 2 \SetRowColor{LightBackground} \seqsplit{hst:componentclassname} (String) & The reference of the Java class responsible for the business logic of the node and everything directly associated with it. \tn % Row Count 14 (+ 6) \hhline{>{\arrayrulecolor{DarkBackground}}--} \SetRowColor{LightBackground} \mymulticolumn{2}{x{8.4cm}}{Properties that you can encounter/use in most hst node types.} \tn \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{2.16 cm} x{5.84 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{hst:sitemap}} \tn % Row 0 \SetRowColor{LightBackground} \seqsplit{hst:sitemapitem} & The main sitemap node for your page. Can be either custom named, or a wildcard. Its name is also the name in the URL/path. \tn % Row Count 5 (+ 5) % Row 1 \SetRowColor{white} \_any\_ & Wildcard sitemap node. Matches anything in the structure that doesn't match with the already existing nodes. \tn % Row Count 9 (+ 4) % Row 2 \SetRowColor{LightBackground} \seqsplit{\_any\_.html} & Wildcard sitemap node. Matches anything in the structure that doesn't match with the already existing nodes. More specific than the simple \_any\_ and is commonly used for matching with documents. \tn % Row Count 16 (+ 7) \hhline{>{\arrayrulecolor{DarkBackground}}--} \SetRowColor{LightBackground} \mymulticolumn{2}{x{8.4cm}}{Part of hst:myproject-\textgreater{}hst:configurations} \tn \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{3.84 cm} x{4.16 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{hst:sitemap properties}} \tn % Row 0 \SetRowColor{LightBackground} hst:pagetitle (String) & The displayed title of the page. \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} \seqsplit{hst:componentconfigurationid} (String) & The node path to the page's configuration node (e.g. hst:pages/news). \tn % Row Count 6 (+ 4) % Row 2 \SetRowColor{LightBackground} \seqsplit{hst:relativecontentpath} & The relative path (from \seqsplit{content/documents/myproject)} of the content folder/node. A sitemap can point to either a document, or a folder. The document will be available as the content of the page. In the case of a folder, children nodes (e.g. a wildcard) will be needed to point to any documents in that folder. Can also reference another sitemap item and inherit its relative content path. \tn % Row Count 26 (+ 20) % Row 3 \SetRowColor{white} hst:scheme (String) & Specify and limit to specific scheme(s) (e.g. https, http) \tn % Row Count 29 (+ 3) % Row 4 \SetRowColor{LightBackground} hst:schemeagnostic (Boolean) & Make a sitemap item load no matter if a scheme has been specified. Especially useful if parent only supports one scheme and you want a child node to render no matter what. \tn % Row Count 38 (+ 9) \end{tabularx} \par\addvspace{1.3em} \vfill \columnbreak \begin{tabularx}{8.4cm}{x{3.84 cm} x{4.16 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{hst:sitemap properties (cont)}} \tn % Row 5 \SetRowColor{LightBackground} \seqsplit{hst:schemenotmatchresponsecode} (Long) & Response code to be thrown when scheme does not match (e.g. 404). \tn % Row Count 4 (+ 4) % Row 6 \SetRowColor{white} hst:refId (String) & Creates a reference ID for the sitemap item to easily reference it from other sitemap items or Java classes. \tn % Row Count 10 (+ 6) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{3.52 cm} x{4.48 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{hst:pages}} \tn % Row 0 \SetRowColor{LightBackground} hst:component & An hst node commonly responsible for the configuration of the behaviour of a page. Can be used alone or have children that reference components with business logic to extend functionality. \tn % Row Count 9 (+ 9) % Row 1 \SetRowColor{white} \seqsplit{hst:containercomponent} & The container that is rendered in a page. Used as a "folder" to container components. Can be referenced by \seqsplit{hst:containercomponentreference}. Used to hold/reference one or multiple container item components. \tn % Row Count 19 (+ 10) % Row 2 \SetRowColor{LightBackground} \seqsplit{hst:containercomponentreference} & References an \seqsplit{hst:containercomponent}. Often used to reference a container component set in the hst:containers part of the workspace to reuse in multiple page configurations. \tn % Row Count 27 (+ 8) % Row 3 \SetRowColor{white} \seqsplit{hst:containeritemcomponent} & Used as the core to item components. The configuration for a component to work as required is held in this node. There are commonly a copy of the component's definition created in hst:catalog. \tn % Row Count 36 (+ 9) \hhline{>{\arrayrulecolor{DarkBackground}}--} \SetRowColor{LightBackground} \mymulticolumn{2}{x{8.4cm}}{The first component node often references and abstract page structure. This is how all the pages can have the same footer/header all over the site. \newline Note: Although these are core to the hst:pages structure, a lot of these nodes are also used in other parts of the hst such as the hst:workspace\textgreater{}hst:containers.} \tn \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{3.52 cm} x{4.48 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{hst:component properties}} \tn % Row 0 \SetRowColor{LightBackground} hst:template (String) & The name of the template responsible for rendering the page (set in hst:templates). \tn % Row Count 4 (+ 4) % Row 1 \SetRowColor{white} \seqsplit{hst:componentclassname} (String) & The reference of the Java class responsible for the business logic of the node and everything directly associated with it. \tn % Row Count 10 (+ 6) % Row 2 \SetRowColor{LightBackground} \seqsplit{hst:referencecomponent} & Reference the configuration of another hst:component. \tn % Row Count 13 (+ 3) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{2.56 cm} x{5.44 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{\seqsplit{hst:containeritemcomponent} properties}} \tn % Row 0 \SetRowColor{LightBackground} hst:label (String) & The name of the Container \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} hst:xtype (String) & The type of the layout of the container. \tn % Row Count 4 (+ 2) % Row 2 \SetRowColor{LightBackground} hst:async (Boolean) & Set to true to render the container asynchronously. \tn % Row Count 6 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{2.8 cm} x{5.2 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{\seqsplit{hst:containercomponentreference}}} \tn % Row 0 \SetRowColor{LightBackground} \seqsplit{hst:referencecomponent} & Reference a configured component to be used in this page configuration. \tn % Row Count 3 (+ 3) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{8.4cm}{x{3.52 cm} x{4.48 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{8.4cm}}{\bf\textcolor{white}{\seqsplit{hst:containeritemcomponent} properties}} \tn % Row 0 \SetRowColor{LightBackground} \seqsplit{hst:componentclassname} (String) & The reference of the Java class responsible for the business logic of the node and everything directly associated with it. \tn % Row Count 6 (+ 6) % Row 1 \SetRowColor{white} hst:iconpath (String) & The relative path to the icon used to display the component in the catalogue. \tn % Row Count 10 (+ 4) % Row 2 \SetRowColor{LightBackground} hst:label (String) & The displayed name of the component. \tn % Row Count 12 (+ 2) % Row 3 \SetRowColor{white} hst:template (String) & The template that renders the component. \tn % Row Count 14 (+ 2) % Row 4 \SetRowColor{LightBackground} \seqsplit{hst:resourcetemplate} (String) & The template that renders any REST or other resource that is called by the component (e.g. doBeforeServeResource method). \tn % Row Count 20 (+ 6) % Row 5 \SetRowColor{white} hst:xtype & Set to hst.item by default to identify this as a component item. \tn % Row Count 23 (+ 3) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} % That's all folks \end{multicols*} \end{document}