\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{herve} \pdfinfo{ /Title (pr-cheat-sheet.pdf) /Creator (Cheatography) /Author (herve) /Subject (PR 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}{43ACE0} \definecolor{LightBackground}{HTML}{F3F9FD} \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{PR Cheat Sheet}}}} \\ \normalsize{by \textcolor{DarkBackground}{herve} via \textcolor{DarkBackground}{\uline{cheatography.com/726/cs/320/}}} \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}herve \\ \uline{cheatography.com/herve} \\ \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Cheat Sheet}} \\ \vspace{-2pt}Published 15th July, 2014.\\ Updated 12th May, 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}{What's a link?}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Links are key elements of Google alogorithm and count as vote.} \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{Normal links count as vote and nofollow link count as no vote} \tn % Row Count 4 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{{\bf{This is how a normal link looks like:}} \newline \newline \textless{}a href=”www.google.com”\textgreater{}Google\textless{}/a\textgreater{} \newline \newline {\bf{This is how a link with \seqsplit{rel=”nofollow”} attribute looks like:}} \newline \newline \textless{}a \seqsplit{rel=”nofollow”} href=”www.google.com”\textgreater{}Google\textless{}/a\textgreater{} \newline \newline We want to get as many normal links as possible. {\emph{BUT we should know which anchor text to use and which page to link to!}}} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.87657 cm} x{0.82386 cm} x{1.87657 cm} } \SetRowColor{DarkBackground} \mymulticolumn{3}{x{5.377cm}}{\bf\textcolor{white}{Linking 2 PR}} \tn % Row 0 \SetRowColor{LightBackground} {\bf{Which Anchor Text?}} & {\emph{Which \seqsplit{PageType}?}} & {\bf{Which Destination URL?}} \tn % Row Count 3 (+ 3) % Row 1 \SetRowColor{white} Ipad (product line : API Test) & {\emph{/sp/}} & /sp/ipad.html \tn % Row Count 5 (+ 2) % Row 2 \SetRowColor{LightBackground} Apple Ipad 3 (product line : API Test) & {\emph{/sp/}} & /sp/ipad.html or /sp/ipad3.html \tn % Row Count 8 (+ 3) % Row 3 \SetRowColor{white} Mobile / Mobilephones (category) & {\emph{/cl/}} & \seqsplit{/cl/1/Mobile-Phones} \tn % Row Count 10 (+ 2) % Row 4 \SetRowColor{LightBackground} Apple mobile (category + man) & {\emph{/cl/}} & \seqsplit{/cl/1/Mobile-Phones}?man\_id=162 \tn % Row Count 12 (+ 2) % Row 5 \SetRowColor{white} iPad 2 64GB Black (*one Product only is return by API)) & {\emph{/pl/}} & \seqsplit{/pl/224-2703435/Tablet-PC/Apple-iPad-2-64GB-Black-Compare-Prices} \tn % Row Count 16 (+ 4) \hhline{>{\arrayrulecolor{DarkBackground}}---} \SetRowColor{LightBackground} \mymulticolumn{3}{x{5.377cm}}{+ API test ? Enter in the search field on PR the anchor text to see what is returned.} \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}{How do I change the SEO template of a CL page?}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{This is the category structure in the cms: \newline % Row Count 1 (+ 1) seo-template \textgreater{} product\_list \textgreater{} ID \textgreater{} urls \textgreater{} encoded\_Attribute \textgreater{} \newline % Row Count 3 (+ 2) 1:In the product list folder, make sure you have created a folder with the id of the category you want to write about (ex Tv cat=2 , I should be in folder 2) \newline % Row Count 7 (+ 4) 2: In it make a folder called urls \newline % Row Count 8 (+ 1) 3: {\bf{If you want to write about the homepage of the category}}, create a folder 0 \newline % Row Count 10 (+ 2) {\bf{if you want to write about a filter of that category}}, take the part of the URL after the "?". Go to \newline % Row Count 13 (+ 3) \seqsplit{http://meyerweb.com/eric/tools/dencoder/} \newline % Row Count 14 (+ 1) and paste the part of the URL after the ? \seqsplit{(ex:attr\_47421171=47421172)} and create a folder with the encoded attribute \newline % Row Count 17 (+ 3) Then in that folder you can make the following files: \newline % Row Count 19 (+ 2) {\bf{meta\_title}}: Containing the title you want \newline % Row Count 20 (+ 1) {\bf{meta\_description:}} \newline % Row Count 21 (+ 1) {\bf{intro\_text\_cat:}}% Row Count 22 (+ 1) } \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}{How do I change the SEO template of an SP page?}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{This is the category structure in the cms: \newline % Row Count 1 (+ 1) {\emph{seo-template \textgreater{} product\_list \textgreater{} 1 \textgreater{} keywords \textgreater{} iphone \textgreater{}}} \newline % Row Count 3 (+ 2) {\bf{1:}}In the product list folder you should make sure you have a folder with the id of the category your sp keyword lands in, \newline % Row Count 6 (+ 3) {\bf{2:}} In it make a folder called keywords \newline % Row Count 7 (+ 1) {\bf{3:}} In that one make a folder with the name of the keyword% Row Count 9 (+ 2) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Then in that folder you can make the following files: \newline \newline {\bf{meta\_title:}} Containing the title you want \newline {\bf{meta\_description:}} \newline {\bf{intro\_text\_cat:}}} \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}{Buying Guide Code Cheat}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{\textless{}div class="buyingAdviceTab"\textgreater{} \newline % Row Count 1 (+ 1) {\emph{Name of the buying Advice Tab}} \newline % Row Count 2 (+ 1) \textless{}/div\textgreater{} \newline % Row Count 3 (+ 1) \textless{}div class="buyingAdviceIntro"\textgreater{} \newline % Row Count 4 (+ 1) {\emph{Top Part of BA : Intro}} \newline % Row Count 5 (+ 1) \textless{}/div\textgreater{} \newline % Row Count 6 (+ 1) \textless{}div class="buyingAdviceExtended"\textgreater{} \newline % Row Count 7 (+ 1) {\emph{Bottom Part of BA : longuest part}} \newline % Row Count 8 (+ 1) \textless{}/div\textgreater{}% Row Count 9 (+ 1) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{3.68298 cm} x{1.29402 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{How to create columns in the CMS?}} \tn % Row 0 \SetRowColor{LightBackground} \textless{}div class="left-column"\textgreater{} & ...\textless{}/div\textgreater{} \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} \textless{}div class="right-column"\textgreater{} & ...\textless{}/div\textgreater{} \tn % Row Count 2 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.54287 cm} x{3.43413 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Widget Recap}} \tn % Row 0 \SetRowColor{LightBackground} Widget & code \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} productInfo Widget & \textless{}!-{}- @productInfo categoryId="1" modelId="2755036" -{}-\textgreater{} \tn % Row Count 3 (+ 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}{How do I create a BOX?}} \tn \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{\textless{}div class="box-j"\textgreater{} \newline % Row Count 1 (+ 1) \textless{}div class="tl"\textgreater{} \newline % Row Count 2 (+ 1) \textless{}div class="tr"\textgreater{} \newline % Row Count 3 (+ 1) \textless{}/div\textgreater{} \newline % Row Count 4 (+ 1) \textless{}/div\textgreater{} \newline % Row Count 5 (+ 1) \textless{}div class="ml"\textgreater{} \newline % Row Count 6 (+ 1) \textless{}div align="center" class="mr"\textgreater{} \newline % Row Count 7 (+ 1) {\bf{\textless{}h1 class="winner-header"\textgreater{}Title Of The Box\textless{}/h1\textgreater{}}} \newline % Row Count 9 (+ 2) {\bf{Content of the Box}} \newline % Row Count 10 (+ 1) \textless{}/div\textgreater{} \newline % Row Count 11 (+ 1) \textless{}/div\textgreater{} \newline % Row Count 12 (+ 1) \textless{}div class="bl"\textgreater{} \newline % Row Count 13 (+ 1) \textless{}div class="br"\textgreater{} \newline % Row Count 14 (+ 1) \textless{}/div\textgreater{} \newline % Row Count 15 (+ 1) \textless{}/div\textgreater{} \newline % Row Count 16 (+ 1) \textless{}/div\textgreater{}% Row Count 17 (+ 1) } \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{\textless{}div align="center" class="mr"\textgreater{} is optional} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} % That's all folks \end{multicols*} \end{document}