\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{{[}deleted{]}} \pdfinfo{ /Title (mql-syntax.pdf) /Creator (Cheatography) /Author ({[}deleted{]}) /Subject (MQL Syntax 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}{5079CC} \definecolor{LightBackground}{HTML}{F4F6FB} \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{MQL Syntax Cheat Sheet}}}} \\ \normalsize{by \textcolor{DarkBackground}{{[}deleted{]}} via \textcolor{DarkBackground}{\uline{cheatography.com/98672/cs/20966/}}} \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}{[}deleted{]} \\ \uline{cheatography.com/deleted-98672} \\ \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Cheat Sheet}} \\ \vspace{-2pt}Published 30th October, 2019.\\ Updated 30th October, 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*}{4} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Dimension: Syntax}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{add dimension NAME \newline description VALUE \newline icon FILENAME WITH PATH \newline {[}!inot{]}hidden \newline property NAME {[}to ADMINTYPE NAME{]} {[}value STRING{]} \newline unit UNITNAME label UNITLABEL multiplier MULTIPLIER offset OFFSET \newline {[}!inot{]}default \newline property NAME {[}to ADMINTYPE NAME{]} {[}value STRING{]} \newline setting NAME VALUE \newline history STRING;} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Type: Syntax}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{add type NAME \newline description VALUE \newline icon FILENAME WITH PATH \newline attribute NAME \{, NAME\} \newline derived TYPE NAME \newline abstract {[}truelfalse{]} \newline method PROG NAME \{, PROG NAME\} \newline trigger EVENT TYPE \{actionlcheckloverride\} PROG NAME {[}input ARG STRING{]} \newline {[}!|not{]}hidden \newline property NAME {[}to ADMINTYPE NAME{]} {[}value STRING{]} \newline history STRING;} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Format: Syntax}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{add format NAME \newline description VALUE \newline icon FILENAME\_ WITH PATH \newline creator NAME (Not Used) \newline type NAME (Not Used) \newline version VALUE \newline {[}!Inot{]}hidden \newline suffix VALUE \newline mime VALUE \newline property NAME {[}to ADMINTYPE NAME{]} {[}value STRING{]} \newline history STRING;} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Group: Syntax}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{add group "group\_name" \newline assign person "person name" \newline assign role "role\_name" \newline description "group\_description" \newline icon {[}path{]} child "group\_name" \newline parent "group\_name" \newline {[}not{]}hidden;} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Person: Syntax}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{add person "person\_name" \newline access "user access values" \newline admin "bus and/or system access rights" \newline address "address\_value" \newline assign "groupe role" \newline assign "role\_name" \newline comment "comment\_text" \newline enable/disable email \newline enable/disable iconmail \newline email "email\_address" \newline fax "fax\_number" \newline fullname "fullname\_value" \newline phone "phone number" \newline site "default site" \newline vault "vault name" \newline password "value" \newline no password \newline disable password \newline type of user \newline {[}not{]}hidden;} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Dimension: Example}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{add dimension Weight \newline description "Weight of the item" \newline unit g \newline default \newline label Grams \newline unitdescription "Weight in Grams (Default)" \newline multiplier 1.0 \newline offset 0.0 \newline unit Kg \newline label Kilograms \newline unitdescription "Weight in Kilograms" \newline multiplier 1000.0 \newline offset 0.0;} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Type: Example}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{add type PART \newline abstract true \newline description "Part for a computer" \newline attribute Cost,Source,Weight; \newline \newline Or \newline \newline add type Customer \newline description "Customer information" \newline icon \textless{}path of the directory\textgreater{} /HCCgifs/Customer.gif \newline abstract false attribute "Account Number" \newline attribute Addressl \newline attribute Address2 \newline attribute Address3 \newline attribute City \newline attribute ID \newline attribute State \newline attribute "Zip Code";} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Format: Example}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{add format Word \newline version "Office2010" \newline description "Microsoft Word" \newline suffix ".docx";} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Group: Example}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{add group Manufacturing \newline parent "HCC" \newline assign person "Joe Jackson" \newline assign person "Dave Matthews";} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Person: Example}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{add person Joe \newline access all \newline email joe \newline fullname "Joe Jackson" \newline type full,business \newline vault Engineering \newline no password \newline icon \textless{}path of the directory\textgreater{} /Icons/Joe.gif \newline assign role President \newline assign group Manufacturing \newline assign group Sales \newline assign group "HVV Corp";} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Policy Example (1/2)}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{add policy Production \newline enforce \newline description "Policy to govern \newline \newline PARTS„ \newline \newline sequence A,B,C,... \newline store Production \newline type PART \newline format Excel \newline format Word defaultformat Word \newline state Planned \newline version false \newline revision false \newline promote false \newline checkouthistory false \newline owner all \newline public all \newline state Active \newline version false \newline revision true \newline promote false \newline checkouthistory false \newline owner all \newline public read,show} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Attribute: Syntax}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{add attribute NAME \newline description VALUE \newline icon FILENAME\_ WITH PATH \newline type {[}integer, string, real, boolean, date{]} \newline default VALUE range = RANGE\_ITEM \newline {[}not{]}hidden \newline {[}not{]}multiline \newline {[}not{]}rangevalue \newline {[}not{]}multivalue \newline dimension DIMENSION NAME; \newline trigger modify PROG\_TYPE PROG NAME {[}input ARG\_STRING{]};} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Relationship: Syntax}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{add relationship "relationship\_ name" \newline description \seqsplit{"relationship\_description"} \newline icon {[}path{]}\_name \newline attribute ATTRIBUTE NAME \newline trigger EVENT\_TYPE TRIGGER TYPE PROG\_NAME {[}!| not{]}preventduplicates \newline derived RELATIONSHIP NAME \newline abstract {[}truelfalse{]} \newline {[}!lnot{]}hidden \newline property NAME {[}to ADMINTYPE NAME{]} {[}value STRING{]} \newline history STRING \newline from \newline type "from types" \newline meaning "meaning\_text" \newline cardinality {[}one, many{]} \newline revision {[}none, float, replicate{]} \newline clone {[}none, float, replicate{]} \newline {[}not{]} propagatemodify \newline to \newline type "to\_types" \newline meaning "meaning\_text" \newline cardinality {[}one, many{]} \newline revision {[}none, float, replicate{]} \newline clone {[}none, float, replicate{]} \newline {[}not{]} propagatemodify;} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Role: Syntax}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{add role "role name" \newline assign person "person\_name" \newline assign group "group\_name" \newline description "description\_name" \newline icon {[}path{]} child "role name" \newline parent "role name" \newline {[}not{]}hidden;} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Policy: Syntax (1/2)}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{add policy NAME \newline description VALUE \newline icon FILENAME\_WITH\_PATH \newline type TYPE\_NAME (,TYPE\_NAME) \newline type all \newline format FORMAT\_NAME (,FORMAT\_NAME) \newline format all \newline defaultformat FORMAT\_NAME \newline sequence REVISON\_SEQUENCE \newline {[}not{]}enforce \newline store STORE\_NAME \newline allstate USER\_ITEM ACCESS\_ITEM (,USER\_ITEM ACCESS\_ITEM) \newline {[}!|not{]}hidden \newline property NAME {[}to ADMINTYPE NAME{]} {[}value STRING{]} \newline history STRING} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Policy Example (2/2)}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{state Obsolete \newline version false \newline revision true \newline promote false \newline checkouthistory false \newline owner all \newline public read,show; \newline \newline modify policy "Production" \newline state "Planned" \newline add signature "Ready" \newline approve "Vice President" \newline reject "Vice President" \newline state "Active" \newline add signature "Obsolete" \newline approve "Vice President" \newline reject "Vice President";} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Attribute: Example}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{add attribute "Screen Size in Inches" \newline description "The diagonal measure of a monitor screen in inches" \newline type string default 15 \newline range = 15 \newline range = 17 \newline range = 19 \newline range = 21;} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Relationship: Example}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{add relationship "System Box Assembly" \newline description "Relationship for assembling the major components of the System Box" \newline attribute "Quantity" \newline from \newline type "System Box" \newline meaning "Is comprised of..." \newline cardinality many \newline revision replicate \newline clone none \newline to \newline type "SYSTEM BOX PART" \newline meaning "is a component of..." \newline cardinality many \newline revision float \newline clone none;} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Program: Syntax}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{add program NAME \newline description VALUE \newline icon {[}path{]} \newline java|external|mgl \newline execute immediateldeferred \newline execute user USER NAME \newline {[}!l not{]} needsbusinessobject \newline {[}!lnot{]}downloadable \newline {[}!lnot{]}pipe \newline {[}!lnot{]}pooled \newline {[}!lnot{]}hidden \newline rule NAME \newline property NAME {[}to ADMINTYPE NAME{]} {[}value STRING{]} \newline history STRING \newline code "command or code";} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Role: Example}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{add role Shipper \newline description "Shipper in the company";} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Policy: Syntax (2/2)}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{state STATE\_NAME \newline action COMMAND \newline check COMMAND \newline notify USER\_NAME \{,USER\_NAME\} message VALUE \newline notify signer message VALUE \newline route USER\_NAME message VALUE \newline owner ACCESS\_ITEM \{,ACCESS\_ITEM\} \newline public ACCESS\_ITEM \{,ACCESS\_ITEM\} \newline user USER\_NAME ACCESS\_ITEM \{,ACESS\_ITEM\} {[}filter EXPRESSION{]} \newline signature SIGN\_NAME {[}SIGNATURE\_ITEM \{, SIGNATURE\_ITEM\}{]} \newline stateproperty NAME {[}to ADMINTYPE NAME{]} {[}value STRING{]} \newline trigger EVENT\_TYPE TRIGGER\_TYPE PROG\_NAME {[}input ARG\_STRING{]} \newline revision {[}true|false{]} \newline version {[}true|false{]} \newline promote {[}true|false{]} \newline icon FILENAME \newline checkouthistory {[}true|false{]}; \newline \newline Signatures are usually added to the policy afterwards: \newline \newline modify policy "policy name" \newline state "state name" \newline add signature "signature name" \newline approve "user\_name" \newline reject "user\_name";} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} % That's all folks \end{multicols*} \end{document}