• R/O
  • SSH

Tags
Keine Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

File Info

Rev. 1cf4ef796c9808f54a66c13761235251315d6882
Größe 1,338 Bytes
Zeit 2013-02-07 04:22:04
Autor Lorenzo Isella
Log Message

How to write a text with TeX that looks hand-written.

Content

% \documentclass[12pt]{article}


% Use xelatex (and not pdflatex!!!) to compile

\documentclass[17pt]{extarticle}

\usepackage{fontspec}
 
\usepackage[doublespacing]{setspace}% line spacing
% \usepackage[T1]{fontenc}

\usepackage[svgnames]{xcolor}
\usepackage{graphicx}

% thanks to Bruno Le Floch: http://tex.stackexchange.com/q/9331/4012
% and in his comments to http://tex.stackexchange.com/a/29458/4012
\usepackage{rotating}
\usepackage[first=-6,last=6]{lcg}% you can play around with these values
\makeatletter
\newcommand{\globalrand}{\rand\global\cr@nd\cr@nd}
\makeatother

\newcommand{\randomrotation}[1]{\globalrand\turnbox{\value{rand}}{#1}\phantom{#1}}


\setmainfont{Signerica_Fat.ttf}


% thanks to Martin Scharrer: http://tex.stackexchange.com/q/11598/4012
\makeatletter
\def\cthulhu#1{%
    \@cthulhu#1 \@empty
}
\def\@cthulhu#1 #2{%
   \randomrotation{#1}\space
   \ifx #2\@empty\else
    \expandafter\@cthulhu
   \fi
   #2%
}
\makeatother
% ----------



% \renewcommand*{\rmdefault}{fts}


\begin{document}\pagestyle{empty}

\cthulhu{
Some text written by a crazed madman.
Also, can I load the fonts as a sort of preset/alias? Since for a lot I have basically font families, so around 10 variants (oblique, bold, bold oblique, regular, etc). I would like to avoid repeating a declaration if possible.}



\end{document}