| 1 |
\ProvidesFile{wikicheat.tex}[2011/01/26 cheatsheet for wiki.sty] |
| 2 |
% \def\title{Cheatsheet for the \textsf{wiki} Package} |
| 3 |
\def\title{\textbf{Cheatsheet} for the \textbf{\textsf{wiki}} Package} |
| 4 |
\def\author{Uwe L\"uck} |
| 5 |
\documentclass[12pt,a4paper]{article} |
| 6 |
\nofiles |
| 7 |
\pagestyle{empty} |
| 8 |
\makeatletter |
| 9 |
\@ifundefined{UndeclareTextCommand}{}{\usepackage{upquote}} %% 2008/07/02 |
| 10 |
\makeatother |
| 11 |
\usepackage{wiki} |
| 12 |
% \let\WE\relax \let\WF\relax \let\WH\relax |
| 13 |
\let\WE\wikiEnvironments |
| 14 |
\let\WF\wikiFonts |
| 15 |
\let\WH\wikiHeadings |
| 16 |
\def\SP#1{\multicolumn{3}{\VR c\VR}{% |
| 17 |
% \parbox{11cm}{% |
| 18 |
\parbox{13cm}{% |
| 19 |
\footnotesize\it\sloppy\SU#1\SD}}} |
| 20 |
\def\SL{/\hskip.16667em} |
| 21 |
% \setbox0\hbox{(}\showthe\ht0\showthe\dp0 %% height = 3x depth |
| 22 |
\def\SU{\rule{0pt}{.99em}}%%%{1.1em}} |
| 23 |
\def\HSU{\rule{0pt}{.75em}} |
| 24 |
\def\SD{\rule[-.33em]{0pt}{0pt}}%%%45em]{0pt}{0pt}} |
| 25 |
% \def\CS#1{{\tt\textbackslash #1}} %% 2008/07/02 |
| 26 |
{\makeatletter \gdef\CS#1{{\tt\@backslashchar#1}}} |
| 27 |
\let\VR| \catcode`\|\active \def|{\verb|} |
| 28 |
\begin{document} |
| 29 |
% \maketitle |
| 30 |
|
| 31 |
\enlargethispage{3\normalbaselineskip} |
| 32 |
\vspace*{-\topmargin} %% !? |
| 33 |
\vspace*{-\headheight}\vspace*{-\headsep}\vspace*{-\topsep}\vspace*{-\partopsep} |
| 34 |
\begin{center} |
| 35 |
\large \title\\[.4ex] \normalsize |
| 36 |
Some \LaTeX-Markup through some Wiki-Markup\\[.8ex] |
| 37 |
\author, \today |
| 38 |
% \end{center} |
| 39 |
|
| 40 |
\vspace{\topsep} |
| 41 |
\vspace*{\partopsep} |
| 42 |
% \vspace{1.5ex} |
| 43 |
% \vspace{1ex} |
| 44 |
% \hrule |
| 45 |
% \vspace{1ex} |
| 46 |
|
| 47 |
% \begin{center} |
| 48 |
\leavevmode\kern-1em |
| 49 |
\begin{tabular}{\VR l\VR l\VR l\VR} |
| 50 |
\hline\hline |
| 51 |
\SU\SD\bf Code for \textsf{wiki.sty}&\bf What you get& \bf like \LaTeX-code\\ |
| 52 |
\hline\hline |
| 53 |
|''italic''|&\WF ''italic''&|\textit{italic}|\SU\\ |
| 54 |
|'''bold'''|&\WF '''bold'''&|\textbf{bold}|%%%\\ |
| 55 |
\SD\\ |
| 56 |
% |'''''bf+it'''''|&\WF '''''bf+it''''' |
| 57 |
% &|\textbf{\textit{bf+it}}|\SD\\ |
| 58 |
% |'''''B+I'''''|&\WF '''''B+I''''' &|\textbf{\textit{B+I}}|\SD\\ |
| 59 |
\hline |
| 60 |
\SP{``Italic'' and ``bold'' may be combined, nested, overlap. |
| 61 |
% Automatic italic correction cannot be suppressed by \CS{nocorr}. |
| 62 |
% Implementation uses \LaTeX\ internals; no groups are formed. |
| 63 |
Quotation marks |
| 64 |
% (even German) |
| 65 |
usually are not |
| 66 |
affected.---Turn |
| 67 |
% {\tt '\string{\string}''} may help with |
| 68 |
% apostrophes.---Turn |
| 69 |
font feature on/off by \CS{wikiFonts}\SL\CS{nowikiFonts}; disable feature |
| 70 |
entirely by package option {\tt noFonts}.}\\ |
| 71 |
\hline\hline |
| 72 |
|== Level 1 ==|&\Large\bf\HSU 1\quad Level 1&|\section{Level 1}|\SU\\ |
| 73 |
|=== Level 2 ===|&\large\bf 1.1\quad Level 2&|\subsection{Level 2}|\SU\\ |
| 74 |
|==== Level 3 ====|&\bf 1.1.1\quad Level 3&|\subsubsection{Level 3}|\\ |
| 75 |
|===== Level 4 =====|&\bf Level 4 &|\paragraph{Level 4}|\SD\\ |
| 76 |
|====== Level 5 ======|&\bf Level 5 &|\subparagraph{Level 5}|\SD\\ |
| 77 |
\hline |
| 78 |
\SP{Turn heading feature on/off by \CS{wikiHeadings}\SL\CS{nowikiHeadings}; |
| 79 |
disable feature entirely by package option {\tt noHeadings}.}\\ |
| 80 |
\hline\hline |
| 81 |
&&|\begin{itemize}|\SU\\ |
| 82 |
|* One|&\textbullet\hspace\labelsep One &|\item One|\\[2\parsep] |
| 83 |
|* Two|&\textbullet\hspace\labelsep Two &|\item Two|\\ |
| 84 |
&&|\end{itemize}|\SD\\ |
| 85 |
\hline |
| 86 |
&&|\begin{enumerate}|\SU\\ |
| 87 |
|# One|&1.\hspace\labelsep One &|\item One|\\[2\parsep] |
| 88 |
|# Two|&2.\hspace\labelsep Two &|\item Two|\\ |
| 89 |
&&|\end{enumerate}|\SD\\ |
| 90 |
\hline |
| 91 |
&&|\begin{description}|\SU\\ |
| 92 |
|;[club] explain|&\textbf{club}\hspace\labelsep explain |
| 93 |
&|\item[club] explain|\\[2\parsep] |
| 94 |
|;[widow] explain|&\textbf{widow}\hspace\labelsep explain |
| 95 |
&|\item[widow] explain|\\ |
| 96 |
&&|\end{description}|\SD\\ |
| 97 |
\hline |
| 98 |
& &|She wrote:|\SU\\ |
| 99 |
|She wrote:|&\smash{\raisebox{\topsep}{She wrote:}}&|\begin{quote}|\\ |
| 100 |
|:Indeed| &\hspace\leftmargini Indeed&|Indeed|\\ |
| 101 |
& &|\end{quote}|\SD\\ |
| 102 |
\hline |
| 103 |
& &|Type|\SU\\ |
| 104 |
|Type| &\smash{\raisebox{\topsep}{Type}}&|\begin{verbatim}|\\ |
| 105 |
| \typeout{OK!}| &|\typeout{OK!}|&|\typeout{OK!}|\\ |
| 106 |
& &|\end{verbatim}|\SD\\ |
| 107 |
\hline |
| 108 |
\SP{A \CS{begin} is executed when {\tt*} etc.\ is first character of a |
| 109 |
code line; an indent starts {\tt verbatim}. |
| 110 |
\CS{end} is executed at code line without indent and not beginning with |
| 111 |
{\tt*} etc.---Turn this feature on by \CS{wikiEnvironments}; turn off by |
| 112 |
\CS{nowikiEnvironments}, e.g., to get around incompatibilities |
| 113 |
(lists feature is most dangerous). |
| 114 |
Disable feature entirely by package option {\tt noEnvironments}. |
| 115 |
Package option {\tt noVerbatim} instead may usually suffice, |
| 116 |
if you don't want to have any {\tt verbatim}.}\\ |
| 117 |
\hline |
| 118 |
\end{tabular} |
| 119 |
\kern-1em |
| 120 |
\end{center} |
| 121 |
|
| 122 |
% \section{Test}\subsection{Sub-Test}\subsubsection{Subsub-Test} |
| 123 |
% \paragraph{Para}\subparagraph{Sub-Para} |
| 124 |
|
| 125 |
\footnotesize |
| 126 |
% \vspace{2ex} |
| 127 |
\sloppy |
| 128 |
\noindent \WE\WF %%% '''Please note:''' |
| 129 |
''Note:'' |
| 130 |
% * |
| 131 |
Explicit '''turning on''' by %%% one of |
| 132 |
% \[|\wikiEnvironments|,\quad |\wikiFonts|,\quad |\wikiHeadings|\] |
| 133 |
|\wikiEnvironments| %%% , |\wikiFonts|, |\wikiHeadings|, |
| 134 |
etc.\ |
| 135 |
% or by |\wikimarkup| (which executes the former three) is ''required''; |
| 136 |
is '''required'''; |
| 137 |
e.g., after %%% |\maketitle| and |
| 138 |
|\tableofcontents|. |
| 139 |
|\wikimarkup| '''activates ''all''''' the features. |
| 140 |
% * |
| 141 |
|\nowikimarkup| %%% executes all of |
| 142 |
% \[|\nowikiEnvironments|,\quad |\nowikiFonts|,\quad |\nowikiHeadings|.\] |
| 143 |
% |\nowikiEnvironments|, |\nowikiFonts|, |\nowikiHeadings|. |
| 144 |
% Use them to get around incompatible code. |
| 145 |
'''''dis''ables all''' of them, e.g., to get around incompatibilities. |
| 146 |
|
| 147 |
\end{document} |
| 148 |
|