Help:Reference card/TeX source

From Meta, a Wikimedia project coordination wiki
Jump to navigation Jump to search
% Reference Card for Wiki syntax (MediaWiki)
% To create a document out of this for printing, save this text into
% a file 'wiki-refcard.tex' and run the commands
%     tex wiki-refcard.tex
%     dvips -t landscape wiki-refcard.dvi -o
%     gs -sDEVICE=pdfwrite -dBATCH -dNOPAUSE -sOutputFile=wiki-refcard.pdf
% this will result in a PDF file 'wiki-refcard.pdf'
% this is a comment

%**start of header

% This file can be printed with 1, 2, or 3 columns per page (see below).
% [For 2 or 3 columns, you'll need 6 and 8 point fonts.]
% Specify how many you want here.  Nothing else needs to be changed.


% This reference card is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of

% This file is intended to be processed by plain TeX (TeX82).
% The final reference card has six columns, three on each side.
% This file can be used to produce it in any of three ways:
% 1 column per page
%    produces six separate pages, each of which needs to be reduced to 80%.
%    This gives the best resolution.
% 2 columns per page
%    produces three already-reduced pages.
%    You will still need to cut and paste.
% 3 columns per page
%    produces two pages which must be printed sideways to make a
%    ready-to-use 8.5 x 11 inch reference card.
%    For this you need a dvi device driver that can print landscape
% Which mode to use is controlled by setting \columnsperpage above.

% Thanks:
%  (reference card macros due to Stephen Gildea)

\def\versionnumber{0.99}  % Version of this reference card
\def\version{\month\ \year\ v\versionnumber}

\def\shortcopyrightnotice{\vskip .5ex plus 2 fill
  \centerline{\small \copyright\ \year\ v\versionnumber}}

\def\copyrightnotice{\vskip 1ex plus 100 fill\begingroup\small

% make \bye not \outer so that the \def\bye in the \else clause below
% can be scanned without complaint.



  column\if 1\ncolumns\else s\fi\space per page]}

\def\scaledmag#1{ scaled \magstep #1}

% This multi-way format was designed by Stephen Gildea
% October 1986.
\if 1\ncolumns
  \hsize 4in
  \vsize 10in
  \voffset -.7in
  \font\titlefont=\fontname\tenbf \scaledmag3
  \font\headingfont=\fontname\tenbf \scaledmag2
		\font\headingfonttt=\fontname\tentt \scaledmag2

  \hsize 3.2in
  \vsize 7.5in %% was 7.95in
  \hoffset -2mm % was -.75in
  \voffset -.745in
  \font\titlefont=cmbx10 \scaledmag2
  \font\headingfont=cmbx10 \scaledmag1
  \font\headingfonttt=cmtt10 \scaledmag1
  \font\eightex=cmex10 at 8pt
  \def\rm{\fam0 \eightrm}
  \normalbaselines\rm		%make definitions take effect

  \if 2\ncolumns
    \def\makefootline{\vskip 2in \hsize=6.86in\line{\the\footline}}
  \else \if 3\ncolumns
    \errhelp{You must set \columnsperpage equal to 1, 2, or 3.}
    \errmessage{Illegal number of columns per page}

      % This next line is useful when designing the layout.
      %\immediate\write16{Column \folio\abc\space starts with \firstmark}
      \if \maxcolumn\abc \multicolumnformat \global\def\abc{a}
      \else\if a\abc
	\global\setbox\columna\columnbox \global\def\abc{b}
        %% in case we never use \columnb (two-column mode)
        \global\setbox\columnb\hbox to -\intercolumnskip{}
	\global\setbox\columnb\columnbox \global\def\abc{c}\fi\fi}

    \if a\abc \else\null\vfill\eject\fi
    \if a\abc \else\null\vfill\eject\fi

% we won't be using math mode much, so redefine some of the characters
% we might want to talk about

\chardef\'="0D % These are upright quote marks


\parindent 0pt
\parskip .85ex plus .35ex minus .5ex



\outer\def\title#1{{\titlefont\centerline{#1}}\vskip 1ex plus .5ex}

  \vskip .5ex  minus .1ex {\headingfont #1}\mark{#1}%
  \vskip .3ex  minus .1ex}

  \vskip .5ex  minus .1ex {\headingfont #1}\quad{\headingfonttt<#2>}\mark{#1}%
  \vskip .3ex  minus .1ex}




\def\<#1>{$\langle${\rm #1}$\rangle$}

\def\kbd#1{{\tt#1}\null}	%\null so not an abbrev even if period follows

\hrule width.5\hsize
{\obeyspaces\global\let =\ }

\def\Example{\qquad{\sl Example\/}.\enspace\ignorespaces}

\def\key#1#2{\leavevmode\hbox to \hsize{\vtop

\setbox\metaxbox\hbox{\kbd{M-x }}

\def\metax#1#2{\leavevmode\hbox to \hsize{\hbox to .75\hsize
  \hskip -\metaxwidth minus 1fil


%**end of header

\title{MediaWiki Reference Card}

\section{Starting a new page}
{\bf from an existing page:} Add a link to a new
(not yet existing) page and save the document. All pages
that do not yet exist will have a red hyperlink. To 
create that page, click on the red hyperlink. See below
for link syntax.

{\bf from MS Word document:} Go to {\tt\-/Word2MediaWiki.aspx} and follow the instructions there. Note that images
will not be converted.

\section{Basic Formatting}
\metax{'{}'emphasized text'{}'}{2 single quotes}
\metax{'{}'{}'very emphasized text'{}'{}'}{3 single quotes}
\metax{'{}'{}'{}'{}'very very emphasized text'{}'{}'{}'{}'}{5 single quotes}
\metax{empty line}{Paragraph}
\metax{\~{ }\~{ }\~{ }\~{ }}{Insert username and date}
\metax{Start line with a space to avoid reformatting}{}
\metax{$<$nowiki$>$text w/o wikification$<$/nowiki$>$}{in box}
\metax{$<$pre$>$block of text w/o reformatting$<$/pre$>$}{\ \ \ in box}


\metax{* itemized list}{List with dots}
\metax{** second level}{}
\metax{*** third level}{}
\metax{\# numbered list}{Numbered list}
\metax{\#\# second level}{}
\metax{\#\#\# third level}{}
\metax{; DNA: Deoxyribonucleic acid}{Definition list}
\metax{;; rDNA: Ribosomal DNA}{}
\metax{: colon indents line}{}
\metax{:: more indented line}{}
\metax{-{}-{}-{}-}{horizontal line}

\metax{we reserach [[rice]] here}{Internal link}
\metax{we research [[Golden Rice]] here}{}
Note: Links to pages that don't exist, will be in red. To create that 
page, simply click on that link to create it. An edit window will appear.\par

\metax{[[Rice$\vert$Oryza sativa]] is\dots}{Alternative text}
\metax{[ Yahoo!!]}{External link}
\metax{see also []}{see also [1]$\nearrow$}
\metax{other wiki [[:Wikipedia:PCR$\vert$PCR]]}{Interwiki link}
\metax{\#REDIRECT [[Official position]]}{abbrevs, aliases}
\metax{$\rightarrow$ full details at}{Help:Editing}

\metax{Here is a pic [[Image:wiki.png]]}{}
\metax{[[Image:wiki.png$\vert$frame$\vert$Caption]]}{with frame}
\metax{[[Image:wiki.png$\vert$thumb$\vert$Caption]]}{with thumb}
\metax{[[Image:wiki.png$\vert$thumb$\vert$300px$\vert$Caption]]}{300px wide}
\metax{[[Image:wiki.png$\vert$thumb$\vert$left$\vert$300px$\vert$Cap]]}{text floating}
\metax{All other media: [[Media:video.asf$\vert$Video]]}{}
\metax{PDF: [[Media:filename.pdf$\vert$PDF]]}{}
\metax{$\rightarrow$ full details at}{Wikimedia:Extended\_image\_syntax}

\metax{$\{\vert$}{Simple 3x3 table}
\metax{$\vert$ topleft $\vert\vert$ topmiddle $\vert\vert$ topright}{}
\metax{$\vert$-}{new row}
\metax{midleft $\vert\vert$ midmiddle $\vert\vert$ midright}{3 cells of row 2}
\metax{$\vert$-}{new row}
\metax{bottomleft $\vert\vert$ bottommiddle $\vert\vert$ bottomright}{3 cells of row 3}
\metax{$\vert\}$}{end of table}
\metax{\phantom{x}}{ }
\metax{$\{\vert$ border=1}{Start framed table}
\metax{$\vert$+ Student List}{caption}
\metax{$\vert$- bgcolor=grey}{first row has grey background}
\metax{! Name !! Age !! Sex}{header}
\metax{$\vert$-}{new row, no parameters}
\metax{$\vert$ Peter $\vert\vert$ align=right $\vert$ 8 $\vert\vert$ m}{3 cells of 1st row}
\metax{$\vert$-}{new row, no parameters}
\metax{$\vert$ Paul $\vert\vert$ align=right $\vert$ 12 $\vert\vert$ m}{3 cells of 2nd row}
\metax{$\vert$-}{new row, no parameters}
\metax{$\vert$ Mary $\vert\vert$ align=right $\vert$ 9 $\vert\vert$ f}{3 cells of 3rd row}

\metax{$\rightarrow$ full details at}{Help:Table}


\metax{[[Category:CatName]]}{Add cat to article}
\metax{Note: new categories are created automatically}{ }
\metax{[[:Category:CatName]]}{Link to cat}
\metax{[[Category:People$\vert$Einstein, Albert]]}{Sort under Einstein}
Categories can be member of other categories. This
way you create a hierachy of categories.\par
\metax{Special:Categories}{Lists all categories}
\metax{Note: Images can be part of a category}{}
\metax{$\rightarrow$ full details at}{Help:Category}

$<$math$>\backslash$ sum\_$\{$n=0$\}\hat{ } \backslash\hbox{infty}\backslash$frac$\{$x\^{ }n$\}\{$n!$\}<$/math$>$\par

\metax{$\displaystyle \sum_{n=0}^\infty {x^n\over n!}$}{La\TeX\ style math}
\metax{$\rightarrow$ full details at}{Help:Math}

\section{Special Characters}
\metax{\`A \&Agrave; \`E \&Egrave; \`o \&ograve; \dots}{accent grave}
\metax{$\acute A$ \&Aacute; $\acute E$ \&Eacute; $\acute o$ \&oacute; \dots}{accent acute}
\metax{\^A \&Acirc; \^E \&Ecirc; \^o \&ocirc; \dots}{accent circumflex}
\metax{\~A \&Atilde; \~N \&Ntilde; \~n \&ntilde; \dots}{tilde}
\metax{\"A \&Auml; \"E \&Euml; \"o \&ouml; \dots}{umlaut}
\metax{$\beta$ \&szlig; \oe\ \&oelig; \o\ \&oslash;}{specials}
\metax{?` \&iquest; !` \&iexcl; $\dagger$ \&dagger; --- \&mdash;}{}
\metax{$\alpha$ \&alpha; $\beta$ \&beta; $\gamma$ \&gamma; \dots}{greek}
\metax{$\rightarrow$ full details at}{Help:Special\_characters}


To insert a block of text from a template type $\{\{$Template name$\}\}$.
The template can be found under\par

\metax{$\rightarrow$ full details at}{Help:Template}


{\bf Naming articles} The name of the article is at the same time the
article headline as well as the link for the article. The first
character is always automatically capitalized. Lowercase second and
subsequent words, except if it's a name. Prefer singular nouns. Use
spelled-out phrase and use redirect for acronyms and abbreviations.

The following characters are not allowed in page titles: \# + $<$ $>$
[ ] $\vert$ $\{$ $\}$ /. The first character is automatically
capitalized. The maximum length is 255 characters.

\metax{$\rightarrow$ full details at}{Wikipedia:Naming\_conventions}

{\bf Editing} Be bold in updating articles. If you see a mistake,
content, spelling or grammar, please edit the page and correct it
immediately. But don't be reckless. Don't make the contributer
angry.% Stay at a neutral point of view.

Perfection is not required. This is a community and incomplete
articles or random collection of facts. Save them for others to add
their knowledge and edit your article. Avoid duplication, irrelevancy,
nonsense and inaccuracy.

\metax{$\rightarrow$ full details at}{Wikipedia:Wikiquette}

\section{Help Pages}

Help pages mentioned above, are available at\par
{\tt} or under the mentioned help section, e.\
g.\ {\tt}.

%%%%%%%%%%%%%%%%%%%%%%%%%% END LIBRARIES %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% This goes at the bottom of the last page (column 6)


% Local variables:
% compile-command: "tex wiki-refcard.tex"
% End: