\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{Bas - Tools on Tech (bgrolleman)} \pdfinfo{ /Title (logseq.pdf) /Creator (Cheatography) /Author (Bas - Tools on Tech (bgrolleman)) /Subject (Logseq 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}{002B36} \definecolor{LightBackground}{HTML}{F7F8F8} \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{Logseq Cheat Sheet}}}} \\ \normalsize{by \textcolor{DarkBackground}{Bas - Tools on Tech (bgrolleman)} via \textcolor{DarkBackground}{\uline{cheatography.com/135372/cs/33266/}}} \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}Bas - Tools on Tech (bgrolleman) \\ \uline{cheatography.com/bgrolleman} \\ \uline{\seqsplit{toolsontech}.com} \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Cheat Sheet}} \\ \vspace{-2pt}Published 20th July, 2022.\\ Updated 26th 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.9908 cm} x{2.9862 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Basics Global}} \tn % Row 0 \SetRowColor{LightBackground} shift+click & Open link in sidebar \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} shift+right click & Open block context menu \tn % Row Count 3 (+ 2) % Row 2 \SetRowColor{LightBackground} ctrl+{[} & Backwards \tn % Row Count 4 (+ 1) % Row 3 \SetRowColor{white} ctrl+{]} & Forwards \tn % Row Count 5 (+ 1) % Row 4 \SetRowColor{LightBackground} ctrl+k & Full text search \tn % Row Count 6 (+ 1) % Row 5 \SetRowColor{white} ctrl+shift+k & Search current page \tn % Row Count 7 (+ 1) % Row 6 \SetRowColor{LightBackground} ctrl+z & Undo \tn % Row Count 8 (+ 1) % Row 7 \SetRowColor{white} shift+ctrl+z or ctrl+y & Redo \tn % Row Count 10 (+ 2) % Row 8 \SetRowColor{LightBackground} ctrl+x & Cut \tn % Row Count 11 (+ 1) % Row 9 \SetRowColor{white} ctrl+c & Copy selection or block reference \tn % Row Count 13 (+ 2) % Row 10 \SetRowColor{LightBackground} ctrl+shift+c & Copy selection as text \tn % Row Count 14 (+ 1) % Row 11 \SetRowColor{white} ctrl+v & Paste \tn % Row Count 15 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{p{0.4977 cm} x{4.4793 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Navigation Go To}} \tn % Row 0 \SetRowColor{LightBackground} g h & Go to home \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} g j & Go to journals \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} g a & Go to all pages \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} g g & Go to graph view \tn % Row Count 4 (+ 1) % Row 4 \SetRowColor{LightBackground} g f & Go to flashcards \tn % Row Count 5 (+ 1) % Row 5 \SetRowColor{white} g t & Go to tomorrow \tn % Row Count 6 (+ 1) % Row 6 \SetRowColor{LightBackground} g n & Go to next journal entry \tn % Row Count 7 (+ 1) % Row 7 \SetRowColor{white} g p & Go to previous journal entry \tn % Row Count 8 (+ 1) % Row 8 \SetRowColor{LightBackground} g s & Go to keyboard shortcuts \tn % Row Count 9 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.64241 cm} x{3.33459 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Toggle}} \tn % Row 0 \SetRowColor{LightBackground} ? & Toggle help \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} t o & Toggle open blocks \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} t w & Toggle wide mode \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} t c & Toggle cards \tn % Row Count 4 (+ 1) % Row 4 \SetRowColor{LightBackground} t d & Toggle Document Mode \tn % Row Count 5 (+ 1) % Row 5 \SetRowColor{white} ctrl+c ctrl+b & Toggle display brackets \tn % Row Count 6 (+ 1) % Row 6 \SetRowColor{LightBackground} t t & Toggle Dark/Light mode \tn % Row Count 7 (+ 1) % Row 7 \SetRowColor{white} t l & Toggle left sidebar \tn % Row Count 8 (+ 1) % Row 8 \SetRowColor{LightBackground} t r & Toggle right sidebar \tn % Row Count 9 (+ 1) % Row 9 \SetRowColor{white} t s & Toggle settings \tn % Row Count 10 (+ 1) % Row 10 \SetRowColor{LightBackground} alt+shift+c & Toggle contents in sidebar \tn % Row Count 11 (+ 1) \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}{Block Navigation Editing Mode}} \tn % Row 0 \SetRowColor{LightBackground} Enter & Enter edit mode \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} ESC & Exit edit mode \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} \{\{fa-arrow-up\}\} & Up a line \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} \{\{fa-arrow-down\}\} & Down a line \tn % Row Count 4 (+ 1) % Row 4 \SetRowColor{LightBackground} alt+\{\{fa-arrow-right\}\} & Zoom into block \tn % Row Count 6 (+ 2) % Row 5 \SetRowColor{white} alt+\{\{fa-arrow-left\}\} & Zoom out editing block \tn % Row Count 8 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{2.88666 cm} x{2.09034 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Block Navigation Block mode}} \tn % Row 0 \SetRowColor{LightBackground} ESC & Go to block mode \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} Enter & Go to edit mode \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} \{\{fa-arrow-up\}\} & Up a block \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} \{\{fa-arrow-down\}\} & Down a block \tn % Row Count 4 (+ 1) % Row 4 \SetRowColor{LightBackground} alt+\{\{fa-arrow-right\}\} & Backwards \tn % Row Count 5 (+ 1) % Row 5 \SetRowColor{white} alt+\{\{fa-arrow-left\}\} & Forwards \tn % Row Count 6 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{3.18528 cm} x{1.79172 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Move blocks}} \tn % Row 0 \SetRowColor{LightBackground} tab & Indent block \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} shift+tab & Outdent block \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} alt+shift+\{\{fa-arrow-up\}\} & Move block up \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} alt+shift+\{\{fa-arrow-down\}\} & Move block down \tn % Row Count 5 (+ 2) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.94103 cm} x{3.03597 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Select Text}} \tn % Row 0 \SetRowColor{LightBackground} click \& drag & Select text \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} double click \& drag & Select words \tn % Row Count 3 (+ 2) % Row 2 \SetRowColor{LightBackground} triple click \& drag & Select lines \tn % Row Count 5 (+ 2) % Row 3 \SetRowColor{white} shift+arrow & Select text \tn % Row Count 6 (+ 1) % Row 4 \SetRowColor{LightBackground} \seqsplit{ctrl+shift+arrow} & Select words \tn % Row Count 8 (+ 2) % Row 5 \SetRowColor{white} ctrl+a & Select full line in edit mode \tn % Row Count 10 (+ 2) % Row 6 \SetRowColor{LightBackground} ctrl+a & Select full page in block mode \tn % Row Count 12 (+ 2) \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}{Specials}} \tn % Row 0 \SetRowColor{LightBackground} \seqsplit{ctrl+shift+p} & Open command palette \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} \seqsplit{ctrl+shift+j} & Open todays page in sidebar \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} ctrl+c ctrl+c & Clear right sidebar \tn % Row Count 4 (+ 2) % Row 3 \SetRowColor{white} ctrl+d ctrl+a & Open file in default app \tn % Row Count 6 (+ 2) % Row 4 \SetRowColor{LightBackground} ctrl+d ctrl+i & Open file in parent directory \tn % Row Count 8 (+ 2) % Row 5 \SetRowColor{white} ctrl+c ctrl+s & Rebuild search index \tn % Row Count 10 (+ 2) % Row 6 \SetRowColor{LightBackground} \seqsplit{ctrl+shift+f} & Add/Remove favorites \tn % Row Count 11 (+ 1) % Row 7 \SetRowColor{white} \seqsplit{ctrl+shift+y} & Insert youtube timestamp \tn % Row Count 12 (+ 1) % Row 8 \SetRowColor{LightBackground} \seqsplit{ctrl+shift+1} & Run git command \tn % Row Count 13 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}--} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{5.377cm}{x{1.59264 cm} x{3.38436 cm} } \SetRowColor{DarkBackground} \mymulticolumn{2}{x{5.377cm}}{\bf\textcolor{white}{Simple Queries}} \tn % Row 0 \SetRowColor{LightBackground} /query & Start Query \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} (and A B) & Both need to be true \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} (or A B) & One needs to be true \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} (not A) & A should not be true \tn % Row Count 4 (+ 1) % Row 4 \SetRowColor{LightBackground} (task A B) & Get all tasks with state A or B \tn % Row Count 6 (+ 2) % Row 5 \SetRowColor{white} (task TODO) & Find all tasks TODO \tn % Row Count 7 (+ 1) % Row 6 \SetRowColor{LightBackground} (namespace A) & Get everything from namespace A \tn % Row Count 9 (+ 2) % Row 7 \SetRowColor{white} \seqsplit{(page-property} A) & page property A exists \tn % Row Count 11 (+ 2) % Row 8 \SetRowColor{LightBackground} \seqsplit{(page-property} A B) & page property A equals B \tn % Row Count 13 (+ 2) % Row 9 \SetRowColor{white} (property A) & Find anything with property A \tn % Row Count 15 (+ 2) % Row 10 \SetRowColor{LightBackground} (priority A) & Filter on priority A \tn % Row Count 16 (+ 1) % Row 11 \SetRowColor{white} (page-tags A) & Filter on page tags A \tn % Row Count 18 (+ 2) % Row 12 \SetRowColor{LightBackground} (between :-1d :-3d) & Filter journal entries between yesterday and 3 days ago \tn % Row Count 21 (+ 3) % Row 13 \SetRowColor{white} \seqsplit{(block-content} abc) & Does a block contain the string abc \tn % Row Count 23 (+ 2) % Row 14 \SetRowColor{LightBackground} (page abc) & Get page abc \tn % Row Count 24 (+ 1) % Row 15 \SetRowColor{white} (page-ref abc) & All blocks that refer to page abc \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}{Favorite Queries}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Get all tasks that are open en tagged with ABC} \tn \mymulticolumn{1}{x{5.377cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}`\{\{query (and (task TODO DOING) {[}{[}ABC{]}{]}) \}\}`} \tn % Row Count 2 (+ 2) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{Query subsection of a page} \tn \mymulticolumn{1}{x{5.377cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}`\{\{query (and (page \textless{}\% current page \%\textgreater{}) {[}{[}tag{]}{]} )\}\}`} \tn % Row Count 5 (+ 3) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{1}{x{5.377cm}}{Find all templates} \tn \mymulticolumn{1}{x{5.377cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}`\{\{query (property template) \}\}`} \tn % Row Count 7 (+ 2) % Row 3 \SetRowColor{white} \mymulticolumn{1}{x{5.377cm}}{All tasks related to current page} \tn \mymulticolumn{1}{x{5.377cm}}{\hspace*{6 px}\rule{2px}{6px}\hspace*{6 px}`\{\{query (and \textless{}\% current page \%\textgreater{} (task TODO DOING DONE) )\}\}`} \tn % Row Count 10 (+ 3) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} % That's all folks \end{multicols*} \end{document}