summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/nicetext/docsrc/wikicheat.tex
blob: f80251cd778e675905530e195c41003b6785e799 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
\ProvidesFile{wikicheat.tex}[2011/01/26 cheatsheet for wiki.sty]
% \def\title{Cheatsheet for the \textsf{wiki} Package}
\def\title{\textbf{Cheatsheet} for the \textbf{\textsf{wiki}} Package}
\def\author{Uwe L\"uck}
\documentclass[12pt,a4paper]{article}
\nofiles
\pagestyle{empty}
\makeatletter
\@ifundefined{UndeclareTextCommand}{}{\usepackage{upquote}} %% 2008/07/02
\makeatother
\usepackage{wiki}
% \let\WE\relax \let\WF\relax \let\WH\relax
\let\WE\wikiEnvironments
\let\WF\wikiFonts
\let\WH\wikiHeadings
\def\SP#1{\multicolumn{3}{\VR c\VR}{% 
%   \parbox{11cm}{% 
  \parbox{13cm}{% 
    \footnotesize\it\sloppy\SU#1\SD}}}
\def\SL{/\hskip.16667em}
% \setbox0\hbox{(}\showthe\ht0\showthe\dp0 %% height = 3x depth
\def\SU{\rule{0pt}{.99em}}%%%{1.1em}}
\def\HSU{\rule{0pt}{.75em}}
\def\SD{\rule[-.33em]{0pt}{0pt}}%%%45em]{0pt}{0pt}}
% \def\CS#1{{\tt\textbackslash #1}} %% 2008/07/02
{\makeatletter \gdef\CS#1{{\tt\@backslashchar#1}}}
\let\VR| \catcode`\|\active \def|{\verb|}
\begin{document}
% \maketitle

\enlargethispage{3\normalbaselineskip}
\vspace*{-\topmargin} %% !? 
\vspace*{-\headheight}\vspace*{-\headsep}\vspace*{-\topsep}\vspace*{-\partopsep}
\begin{center}
\large \title\\[.4ex] \normalsize 
Some \LaTeX-Markup through some Wiki-Markup\\[.8ex]
            \author, \today 
% \end{center}

\vspace{\topsep}
\vspace*{\partopsep}
% \vspace{1.5ex}
% \vspace{1ex}
% \hrule
% \vspace{1ex}

% \begin{center}
\leavevmode\kern-1em
\begin{tabular}{\VR l\VR l\VR l\VR}
\hline\hline
\SU\SD\bf Code for \textsf{wiki.sty}&\bf What you get& \bf like \LaTeX-code\\
\hline\hline
|''italic''|&\WF ''italic''&|\textit{italic}|\SU\\
|'''bold'''|&\WF '''bold'''&|\textbf{bold}|%%%\\
\SD\\
% |'''''bf+it'''''|&\WF '''''bf+it'''''
%                  &|\textbf{\textit{bf+it}}|\SD\\
% |'''''B+I'''''|&\WF '''''B+I''''' &|\textbf{\textit{B+I}}|\SD\\
\hline
\SP{``Italic'' and ``bold'' may be combined, nested, overlap. 
% Automatic italic correction cannot be suppressed by \CS{nocorr}. 
% Implementation uses \LaTeX\ internals; no groups are formed. 
Quotation marks 
% (even German) 
usually are not 
affected.---Turn
% {\tt '\string{\string}''} may help with 
% apostrophes.---Turn 
font feature on/off by \CS{wikiFonts}\SL\CS{nowikiFonts}; disable feature 
entirely by package option {\tt noFonts}.}\\
\hline\hline
|== Level 1 ==|&\Large\bf\HSU 1\quad Level 1&|\section{Level 1}|\SU\\
|=== Level 2 ===|&\large\bf 1.1\quad Level 2&|\subsection{Level 2}|\SU\\
|==== Level 3 ====|&\bf 1.1.1\quad Level 3&|\subsubsection{Level 3}|\\
|===== Level 4 =====|&\bf Level 4 &|\paragraph{Level 4}|\SD\\
|====== Level 5 ======|&\bf Level 5 &|\subparagraph{Level 5}|\SD\\
\hline
\SP{Turn heading feature on/off by \CS{wikiHeadings}\SL\CS{nowikiHeadings}; 
disable feature entirely by package option {\tt noHeadings}.}\\
\hline\hline
&&|\begin{itemize}|\SU\\
|* One|&\textbullet\hspace\labelsep One &|\item One|\\[2\parsep]
|* Two|&\textbullet\hspace\labelsep Two &|\item Two|\\
&&|\end{itemize}|\SD\\
\hline
&&|\begin{enumerate}|\SU\\
|# One|&1.\hspace\labelsep One &|\item One|\\[2\parsep]
|# Two|&2.\hspace\labelsep Two &|\item Two|\\
&&|\end{enumerate}|\SD\\
\hline
&&|\begin{description}|\SU\\
|;[club]  explain|&\textbf{club}\hspace\labelsep  explain 
                  &|\item[club]  explain|\\[2\parsep]
|;[widow] explain|&\textbf{widow}\hspace\labelsep explain 
                  &|\item[widow] explain|\\
&&|\end{description}|\SD\\
\hline
           &          &|She wrote:|\SU\\
|She wrote:|&\smash{\raisebox{\topsep}{She wrote:}}&|\begin{quote}|\\
|:Indeed|  &\hspace\leftmargini Indeed&|Indeed|\\
           &          &|\end{quote}|\SD\\
\hline
                 &               &|Type|\SU\\
|Type|           &\smash{\raisebox{\topsep}{Type}}&|\begin{verbatim}|\\
| \typeout{OK!}| &|\typeout{OK!}|&|\typeout{OK!}|\\
                 &               &|\end{verbatim}|\SD\\
\hline
\SP{A \CS{begin} is executed when {\tt*} etc.\ is first character of a 
code line; an indent starts {\tt verbatim}. 
\CS{end} is executed at code line without indent and not beginning with 
{\tt*} etc.---Turn this feature on by \CS{wikiEnvironments}; turn off by 
\CS{nowikiEnvironments}, e.g., to get around incompatibilities 
(lists feature is most dangerous). 
Disable feature entirely by package option {\tt noEnvironments}.
Package option {\tt noVerbatim} instead may usually suffice, 
if you don't want to have any {\tt verbatim}.}\\
\hline
\end{tabular}
\kern-1em
\end{center}

% \section{Test}\subsection{Sub-Test}\subsubsection{Subsub-Test}
% \paragraph{Para}\subparagraph{Sub-Para}

\footnotesize
% \vspace{2ex}
\sloppy
\noindent \WE\WF %%% '''Please note:'''
''Note:''
% * 
Explicit '''turning on''' by %%% one of 
%   \[|\wikiEnvironments|,\quad |\wikiFonts|,\quad |\wikiHeadings|\] 
|\wikiEnvironments| %%% , |\wikiFonts|, |\wikiHeadings|,
etc.\ 
% or by |\wikimarkup| (which executes the former three) is ''required''; 
is '''required''';
e.g., after %%% |\maketitle| and 
|\tableofcontents|.
|\wikimarkup| '''activates ''all''''' the features. 
% * 
|\nowikimarkup| %%% executes all of 
%   \[|\nowikiEnvironments|,\quad |\nowikiFonts|,\quad |\nowikiHeadings|.\] 
% |\nowikiEnvironments|, |\nowikiFonts|, |\nowikiHeadings|. 
% Use them to get around incompatible code.
'''''dis''ables all''' of them, e.g., to get around incompatibilities. 

\end{document}