Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm making a calendar. The calendar will be for TUG, 2015. Last year I also made a calendar but because of time constraints most examples were graphics.

Since this is a lot of work, I need your help.

If you can/want to help out, the following are the requirements for contributions:

  • Your contribution should not exceed 1 page of A4 size, in landscape or A5 size, portrait orientation.
  • You should post your TeX solution as an answer to this question.
  • If possible, please provide a hyperlink to the pdf output document.
  • If you want to make your submission available for the calendar, you should make sure the document can be made available in a single page pdf that has a size that does not exceed A4/landscape. I will ask you for the pdf if I need it.
  • Your submission may use user-defined packages and proprietary fonts. There is no need to make these available.
  • Your submission should include a short description and a screenshot of the output.

The following template may be useful to get started.

% save this document as example.tex
% compile this document with: pdflatex -shell-escape example.tex

% Needed to make sure your page dimensions
% are the same as that of the calendar.




\node[scale=10]{Your Art Here.};


Example of Output

  • On 4 October, 2013 I decided to relax my question and also accept showcases of typography.
  • On 12 November, I once more relaxed my question because I definitely don't have the time to make a tasty looking calendar on my own. There may be a prize for one or two submissions.
  • Springer are kindly donating two copies of LaTeX and Friends.
  • If there are enough submissions, I'll compile a calendar. Otherwise, I may have to cancel the project.
  • There have been too few submissions so I am cancelling the calendar for 2014. Peter Wilson has already implemented a TeX-based calendar so I don't see any real problem.
  • Nicholas Hamilton and ChrisS have won a copy of the book.

When the calendar is finished, I will post the code as an answer to this question. Hopefully, this will help people who want to do similar things.

FWIW I decided not to award my bounty (500) today (2014-02-14) as I'd like to raise the standard a bit.

share|improve this question
Many cool things are shown in tex.stackexchange.com/questions/1319/…. Maybe you can ask some of the contributors there. –  Uwe Ziegenhagen Sep 24 '13 at 22:33
Can I submit this? –  David Carlisle Oct 4 '13 at 19:39
@DavidCarlisle it is art indeed but it's context is also required for it to remain a masterpiece :) –  masu Oct 16 '13 at 21:51
+1 for the template. LaTeX newbies like me appreciate it. –  LordStryker Oct 31 '13 at 19:27
@all Please note that Peter Wilson has made a nice calendar for 2014 available. –  Marc van Dongen Dec 9 '13 at 12:39
show 12 more comments

11 Answers

up vote 95 down vote

Well someone has to go first.... !


I have partially completed my PhD, and, use this on the inside cover of my submissions to add some 'artistic-flair', however, the source for the word-cloud is actually my BibTeX Database, so the cloud is relevant to each document, and, the sample above is effectively the last one that I produced.

In terms of methodology, the cloud itself was produced in R, via custom package, which I have written for this purpose. This custom package is more-or-less a convenience wrapper to the wordcloud package which is freely available.

To integrate it with LaTeX, I used knitr, however, this is simply to call the R package, which I have instructed to produce the result in .tikz format.

So here is the code to my solution:



      options(tikzDocumentDeclaration   = '\\documentclass[12pt]{article}\\usepackage{helvet}\\renewcommand{\\familydefault}{\\sfdefault}\n')
      suppressMessages(cloud(pattern    = "phd.bib",
                             dev        = "tikz",
                             output     = "WordCloud",
                             col.outer  = "#404040",
                             col.inner  = "#FFFFFF",
                             width      = 8,
                             height     = 8,
                             scale.small= 0.25,
                             scale.large= 4,
                             stem       = FALSE,
                             max.words  = 300))



The tikz file WordCloud.tikz, and the resulting pdf, can be found HERE.

share|improve this answer
"Flair", not "Flare", unless it involves some phosphorus, of coarse [sic]. –  Steven B. Segletes Dec 5 '13 at 0:24
@StevenB.Segletes Thanks. –  Nicholas Hamilton Dec 5 '13 at 1:41
@StevenB.Segletes BTW its course, not coarse... –  Nicholas Hamilton Dec 6 '13 at 10:08
Indeed. It was a [sic] joke on my part. Cheers on a fine calendar entry! –  Steven B. Segletes Dec 6 '13 at 13:12
Cheers, and, Touche`......... –  Nicholas Hamilton Dec 6 '13 at 13:14
show 2 more comments

Here's a nineteenth century-style advertisement for TeX, demonstrating XeTeX's OpenType support and the power of OpenType fonts. A single font, Phaeton, was used to produce this file: all the text, the abbreviations, the banners, the ornaments used in the background and the image of the man on the horse are glyphs in the font.

Preview of Phaeton

% save this document as example.tex
% compile this document with: xelatex -shell-escape example.tex

% Needed to make sure your page dimensions
% are the same as that of the calendar.








  % Clipping
  \clip (-0.5\textwidth+1cm,-0.5\textheight) rectangle (0.5\textwidth-1cm,0.5\textheight-2cm) ;
  % Background.
  \draw (0,0) node {\fontsize{48}{20.5}\selectfont\begin{minipage}{1.5\textwidth}\color{bgcolour}\ORN\ORN\end{minipage}} ;
  % Logo.
  \draw (0,0) node {\fontsize{120}{120}\selectfont\baner{6=======6}} ;
  \draw (0,0) node {\fontsize{48}{48}\selectfont\TeX\ \cword{AND} Friends} ;
  \draw (0,4.5) node {\fontsize{120}{120}\selectfont\char"E00E} ;
  \draw (-4,4.5) node {\begin{minipage}{3cm}\fontsize{14}{16}\selectfont\centering\hrule\medskip\swash{\strut THE MOST POWERFUL\strut\ PROGRAM\strut}\medskip\hrule\end{minipage}} ;
  \draw (4,4.5) node {\begin{minipage}{3cm}\fontsize{14}{16}\selectfont\centering\hrule\medskip\swash{\strut OF ITS KIND AVAILABLE\strut\ TODAY\strut}\medskip\hrule\end{minipage}} ;
  \draw (0,-1.5) node {\fontsize{16}{16}\selectfont\swash{Available for all major operating systems.}} ;
  \draw (0,-5) node {\begin{minipage}{13cm}\fontsize{16}{20}\selectfont\cword{with} SUPPORT \cword{for} UNICODE \cword{and} OPENTYPE FONTS, \TeX\ \cword{and} ITS DERIVATIVES ARE \cword{the} IDEAL SOLUTION \cword{for} ALL YOUR TWENTY-FIRST CENTURY TYPESETTING NEEDS. \cword{the} IN-BUILT MACRO LANGUAGE ALLOWS YOU TO CUSTOMISE IT TO YOUR NEEDS. \cword{with} AUTOMATIC INDEXING \cword{and} REFERENCING, \cword{and} UNPARALLELED MATHEMATICS SUPPORT, THERE'S NO REASON NOT TO SWITCH TODAY.\end{minipage}} ;
  \draw (0,-9) node {\fontsize{120}{120}\selectfont\baner{1====1}} ;
  \draw (0,-8.7) node {ESTABLISHED 1978} ;

The source code and output are available here.

share|improve this answer
How to get the different font features of a font? Not all otf fonts have all the features. Anyway this is a retro but nice style. –  s__C Dec 14 '13 at 9:20
@s__C Many rich (such as Phaeton) come with documentation that list the OpenType features. There are font programs that can show you every character and OT features; I use FontMatrix, which is for Linux and Windows. The Adobe Font Development Kit can also tell you about OT features. –  ChrisS Dec 14 '13 at 9:24
@s__C See tex.stackexchange.com/questions/75720/… and the first question linked in there. ChrisS – FontMatrix might be another answer to that question of mine there? If so, your writing up an answer would be appreciated! –  doncherry Dec 14 '13 at 11:49
Where can one can the Phaeton font for installation on Debian Linux? –  Faheem Mitha Dec 14 '13 at 12:44
@doncherry FontMatrix doesn't give you a glyph-by-glyph list of substitutions for each feature, as the question asks; it only allows you to apply different combinations of features to a block of text, so I don't think it provides enough detail for that question. –  ChrisS Dec 15 '13 at 6:37
show 5 more comments

Well, it is Christmas:


% save this document as example.tex
% compile this document with: xelatex example.tex on a machine which has the Zapfino Extra LT Pro font (or edit the font declaration) --- you'll also need a background graphic, or comment it out

% Needed to make sure your page dimensions
% are the same as that of the calendar.




\setmainfont[Numbers={Proportional,OldStyle},Ligatures={Common, Rare}]{Zapfino Extra LT Pro}


\rgb{99000099}{Paix sur terre Bonne entente entre toutes et tous} \orn{A}
\rgb{3D3D5A99}{Friede auf Erden und den Menschen ein Wohlgefallen} \orn{K}
\rgb{447D8E99}{In terra pax hominibus bonæ voluntatis} \orn{C}
\rgb{2C345299}{Vrede op aarde aan de mensen van goede wil} \orn{E}
\rgb{94BF8299}{Frede op ierde ûnder minsken fen it wolbehagen} \orn{B}
\rgb{00669999}{Frid på jorden, till människorna ett gott behag} \orn{F}
\rgb{8F98AF99}{Rauha Maassa Ja Ihmisillä Hyvä Tahto} \orn{J}
\rgb{33660099}{Pace in terra agli uomini di buona volontà} \orn{H}
\rgb{00003399}{Paz en la tierra a los hombres de buena voluntad} \orn{I}
\rgb{99663399}{Paz na terra entre os homens de boa vontade.} \orn{D}
\rgb{FFCC6699}{Fred til mennesker med Guds velbehag!}

\alt{4}{P}eace on \lower3bp\hbox\alt{3}{E}\kern3bp art\alt{3}{h}\\[36bp]
\hspace*{24bp}\alt{4}{G}oo\alt{4}{d} \alt{3}{W}ill \alt{4}{T}owar\alt{4}{d} \alt{3}{M}e\alt{7}{n}}


This card was typeset using the \XeTeX\ variant of Dr.\ Donald Knuth’s \TeX\ system
created by Jonathan Kew in the typeface Zapfino created by Prof.\ Hermann Zapf
with David Siegel and Gino Lee.
It is modeled on Jean-Yee Wong’s famous polyglot card for \textsc{unicef}.
\rgb{99000099}{The French translation was provided by Jef Tombeur,}
\rgb{3D3D5A99}{the traditional German, also used for Händel’s \textsc{Messiah}, by David Kastrup,} 
\rgb{447D8E99}{the Latin by DK, Bruno Voisin and John McChesney-Young,}
\rgb{2C345299}{the Dutch by Henk Gianotten,} 
\rgb{94BF8299}{the Frysian by Gerben Wierda,}
\rgb{00669999}{the Swedish by Fredrik Wallenberg,}
\rgb{8F98AF99}{the Finnish by Pekka Sorjonen,}
\rgb{33660099}{the Italian by Giuseppe Bilotta,} 
\rgb{00003399}{the Spanish by Jorge de Buen U.}
\rgb{99663399}{the Portuguese by Jorge N. R. Vilhena,} 
\rgb{FFCC6699}{the Danish by~Mogens Lemvig Hansen.}

Translations for other languages would be gratefully received. 
\hfill\alt{2}{C}reated by \alt{4}{W}illiam \alt{3}{F}. \alt{4}{A}\alt{1}{d}ams for the \TeX\ Showcase and updated for \textsc{tug}’s 2014 Calen\alt{8}{d}ar.

share|improve this answer
Please fix the first comment because it has to be compiled with XeTeX. –  marczellm Dec 4 '13 at 18:46
Thanks. I made two (minor/pedantic) changes in the source code. Could you provide a link to the output pdf please? (I cannot read the text in the picture.) –  Marc van Dongen Dec 6 '13 at 11:12
This is a coincidence. I had a look at your website and I noticed something that had caught my eye before. Would you considering submitting the cover of The Book of Tea? I think it would be an excellent example of what I am looking for. –  Marc van Dongen Dec 6 '13 at 11:57
Not sure how I could work that portrait format into a landscape. Also, I'm afraid that the cover was drawn up in Altsys Virtuoso if memory serves --- I guess I could (should) re-create it in XeLaTeX --- I'll keep that in mind when it surfaces again as a project. Currently really busy w/ documentation for the ShapeOko 2 and trying to get a book re-print off the ground. My apologies. –  WillAdams Dec 10 '13 at 16:58
Toward men? What about women? –  Jubobs Dec 19 '13 at 22:27
show 6 more comments
up vote 45 down vote

A very simple demonstration of using LaTeX fonts with pdfLaTeX.

A pamphlet with a powerful message from George Orwell.

enter image description here


\input Zallman.fd
\begin{tikzpicture}[remember picture,overlay]
  \shade[outer color=gray!15,inner color=white] (current page.south west) rectangle (current page.north east);
  \draw[gray!45,dashed] (current page.south) -- node[pos=.01,rotate=90] {\ScissorRight} (current page.north);
        \textcolor{RoyalBlue}{F}reedom} \textit{of} \textsc{the
        \textcolor{RoyalBlue}{P}ress}\hfill} \vspace{\baselineskip}

    \lettrine{\textcolor{RoyalBlue}{I}}{} am well acquainted with all
    the arguments against freedom of thought and speech ---the
    arguments which claim that it cannot exist, and the arguments
    which claim that it ought not to.  I answer simply that they don't
    convince me and that our civilization over a period of four
    hundred years has been founded on the opposite notice.  For quite
    a decade past I have believed that the existing Russian
    \textit{r\'egime} is a mainly evil thing, and I claim the right to
    say so, in spite of the fact that we are allies with the USSR in a
    war which I want to see won.  If I had to choose a text to justify
    myself, I should choose the line from Milton:

      \itshape By the known rules of ancient liberty.

    The word \textit{ancient} emphasizes the fact that intellectual
    freedom is a deep--rooted tradition without which our
    characteristic western culture could only doubtfully exist.  From
    that tradition many of our intellectuals are visibly turning away.
    They have accepted the principle that a book should be published
    or suppressed, praised or damned, not on its merits but according
    to political expediency.  And others who do not actually hold this
    view assent to it from sheer cowardice.  An example of this is the
    failure of the numerous and vocal English pacifists to raise their
    voices against the prevalent worship of Russian militarism.
    According to those pacifists, all violence is evil, and they have
    urged us at every stage of the war to give in or at least to make
    a compromise peace.  But how many of them have ever suggested that
    war is also evil when it is waged by the Red Army?  Apparently the
    Russians have a right to defend themselves, whereas for us to do
    [\textit{so}] is a deadly sin.  One can only explain this
    contradiction in one way: that is, by a cowardly desire to keep in
    with the bulk of the intelligentsia, whose patriotism is directed
    towards the USSR rather than towards Britain.  I know that the
    English intelligentsia have plenty of reason for their timidity
    and dishonesty, indeed I know by heart the arguments by which they
    justify themselves.  But at least let us have no more nonsense
    about defending liberty against Fascism.  If liberty means
    anything at all it means the right to tell people what they do not
    want to hear.  The common people still vaguely subscribe to that
    doctrine and act on it.  In our country ---it is not the same in
    all countries: it was not so in republican France, and
    it is not so in the USA today--- it is the liberals who fear
    liberty and the intellectuals who want to do dirt on the
    intellect: it is to draw attention to that fact that I have
    written this preface.

    \noindent\textit{Extract from}
    \textsc{The Freedom of the Press}\textit{, by
      \textcolor{RoyalBlue}{George Orwell}.
      Proposed Preface to `Animal Farm', 1945.
      First published: The Times Literary Supplement,
      September 15, 1972.}\par
  } \pamphlet \columnbreak \pamphlet


Fixed an typing error inside text. Thanks Benjamin McKay! Here's the PDF output.

share|improve this answer
Nice, especially the use of colour and the subtle background. –  ChrisS Dec 17 '13 at 3:36
Nice, though in my opinion the left and right margin is a bit too narrow. –  maetra Dec 17 '13 at 9:08
Thanks. Could you provide a hyperlink to a pdf version as well please? –  Marc van Dongen Dec 17 '13 at 10:07
@MarcvanDongen I put it on the pamphlet word, ;) here's again: Orwell'sPamphlet. –  OSjerick Dec 17 '13 at 15:27
@maetra Apparently so. I had not thought so far. ;) –  OSjerick Dec 17 '13 at 15:29
show 2 more comments

I'm not a type designer or a typographer, but I thought use TikZ to illustrate a type design. Here is my idea:


I add a text to right side to complement the figure and show typography with a Sans Serif font, the numbers can be used in a pretty good cover :). The output can be downloaded here.


\parskip .5\baselineskip
    \begin{tikzpicture}[remember picture,overlay]
        \shade[inner color=RoyalBlue!70,outer color=RoyalBlue] (current page.south west) rectangle (current page.north east);
        \shade[left color=Black,right color=transparent!0,opacity=.20] (current page.south) rectangle (current page.north east);
                \ifnum#1=3 \def\opacityF{0}\def\opacityS{1}
                \foreach [count=\yi] \y in {0,...,4}{
                    \pgfmathifthenelse{mod(\y,2) == 0}{"solid"}{"dashed"};
                    \draw[name path global/.expanded=hline\yi,\pgfmathresult] (0.5,\y) -- +(11.5,0);
                %\foreach [count=\xi] \x in {1,3,4,6,7,9,10,12}{%Normal space between 4 and 1
                %    \draw[name path global/.expanded=vline\xi] (\x,-0.5) -- (\x,4.5);
                %\foreach [count=\xi] \x in {2,5,8,11}{
                %    \draw[name path global/.expanded=auxvline\xi,dashed] (\x,-0.3) -- (\x,4.3);
                \foreach [count=\xi] \x in {1,3,4,6,7,9,9.5,11.5}{%Number 4 closer to 1
                    \draw[name path global/.expanded=vline\xi] (\x,-0.5) -- (\x,4.5);
                \foreach [count=\xi] \x in {2,5,8,10.5}{
                    \draw[name path global/.expanded=auxvline\xi,dashed] (\x,-0.3) -- (\x,4.3);

                %Number 2
                \path[name intersections={of=auxvline1 and hline4,by=c12}];
                \draw[name path=circle12] (c12) circle (\nwidth/2);
                \draw[name path=circle22] (c12) circle (\nwidth/2-\nthick);
                \path[name intersections={of=vline1 and hline5,by=a1}];
                \path[name intersections={of=vline2 and hline3,by=a2}];
                \draw[name path=d1,dashed] ($(a1)+(-.2,.2)$) -- ($(a2)+(.2,-.2)$);
                \path[name intersections={of=vline1 and hline3,by=a3}];
                \path[name intersections={of=vline2 and hline1,by=a4}];
                \draw[name path=d2,dashed] ($(a3)+(-.2,.2)$) -- ($(a4)+(.2,-.2)$);
                \path[name intersections={of=d1 and circle12,by={s11,s12}}];
                \path[name intersections={of=d1 and circle22,by={s21,s22}}];
                \draw[name path=d3] ($(s22)+(.5,.5)$) -- +(-2,-2);
                \draw[name path=d4] ($(s12)+(.3,.3)$) -- +(-2,-2);
                \draw[name path=hbase2] (1,\nthick) -- +(2,0);
                \path[name intersections={of=d2 and hbase2,by=auxc}];
                \path[name intersections={of=d2 and d4,by=ic1}];
                \path[name intersections={of=d2 and d3,by=ic2}];
                \path[name intersections={of=vline1 and hline1,by=o}];
                    \path[clip] (o) rectangle +(2,2);
                    \node [draw] at (auxc) [circle through={(ic1)}] {};
                    \node [draw] at (auxc) [circle through={(ic2)}] {};
                \path[name intersections={of=vline1 and hline4,by=i21}];
                \path[name intersections={of=vline2 and hline1,by=i22}];

                %Number 0
                \path[name intersections={of=auxvline2 and hline4,by=c10}];
                \path[name intersections={of=auxvline2 and hline2,by=c20}];
                \path[name intersections={of=vline3 and hline4,by=i01}];
                \path[name intersections={of=vline4 and hline2,by=i02}];
                \draw[name path=circle10] (c10) circle (\nwidth/2);
                \draw[name path=circle20] (c10) circle (\nwidth/2-\nthick);
                \draw[name path=circle30] (c20) circle (\nwidth/2);
                \draw[name path=circle40] (c20) circle (\nwidth/2-\nthick);
                \path[name intersections={of=circle20 and hline4,by={o11,o12}}];
                \path[name intersections={of=circle40 and hline2,by={o21,o22}}];
                \draw ($(o11)+(0,1)$) -- ($(o21)+(0,-1)$);
                \draw ($(o12)+(0,1)$) -- ($(o22)+(0,-1)$);

                %Number 1
                \path[name intersections={of=vline5 and hline4,by=i10}];
                \path[name intersections={of=auxvline3 and hline5,by=i11}];
                \path[name intersections={of=auxvline3 and hline1,by=i12}];
                \draw[name path=v11] ($(i11)-(\nthick/2,0)$) -- ($(i12)-(\nthick/2,0)$);
                \draw[name path=v12] ($(i11)+(\nthick/2,0)$) -- ($(i12)+(\nthick/2,0)$);
                \draw ($(i10)+(0,\nthick/2)$) -- ($(i11)-(\nthick/2,0)$);
                \draw[name path=d11] ($(i10)-(0,\nthick/2)$) -- ($(i11)+(\nthick/2,0)$);
                \draw[name path=d12,dashed] ($(i10)+(0,\nthick/2)+(-.2,.2)$) -- +(2.4,-2.4);
                \path[name intersections={of=d11 and d12,by=i13}];
                \path[name intersections={of=d11 and v11,by=i14}];
                \draw[name path=hbase1] (7,\nthick) -- +(2,0);
                \path[name intersections={of=vline6 and hbase1,by=i15}];
                \path[name intersections={of=vline5 and hline1,by=i16}];
                \path[name intersections={of=v11 and hbase1,by=i17}];

                %Number 4 (replace this with code for number 5)
                \path[name intersections={of=vline8 and hline1,by=i41}];
                \path[name intersections={of=vline8 and hline5,by=i42}];
                \path[name intersections={of=vline7 and hline3,by=i43}];
                \draw[name path=v41] ($(i41)+(-\nthick,0)$) -- ($(i42)+(-\nthick,0)$);
                \draw[name path=d41] (i43) -- (i42);
                \draw ($(i43)+(0,\nthick)$) -- ($(i42)+(-\nthick,0)$);
                \draw[name path=h41] ($(i43)+(0,\nthick)$) -- +(2,0);
                \path[name intersections={of=d41 and v41,by=i44}];
                \path[name intersections={of=d41 and h41,by=i45}];
                \path[name intersections={of=h41 and v41,by=i46}];
                \path[name intersections={of=vline8 and hline3,by=i47}];

                %Number 2
                \fill (i21) arc(180:-45:\nwidth/2) -- (ic1) let \p1=($(ic1)-(auxc)$), \n1={veclen(\x1,\y1)} in arc(135:180:\n1) -| (i22) -| (1,\nthick) let \p2=($(ic2)-(auxc)$), \n2={veclen(\x2,\y2)} in arc(180:135:\n2) -- (s22) arc(-45:180:\nwidth/2-\nthick) -- cycle;

                %Number 0
                \fill[even odd rule] (i01) arc(180:0:\nwidth/2) -- (i02) arc(0:-180:\nwidth/2) -- cycle (o11) arc(180:0:\nwidth/2-\nthick) -- (o22) arc(0:-180:\nwidth/2-\nthick) -- cycle;

                %Number 1
                \fill ($(i10)+(0,\nthick/2)$) -- ($(i11)-(\nthick/2,0)$) -- ($(i11)+(\nthick/2,0)$) |- (i15) |- (i16) |- (i17) -- (i14) -- (i13) -- cycle;

                %Number 4 (replace this with code for number 5)
                \fill[even odd rule] ($(i43)+(0,\nthick)$) -- ($(i42)+(-\nthick,0)$) -| (i41) -| ($(i47)+(-\nthick,0)$) -- (i43) -- cycle (i44) -- (i45) -- (i46) -- cycle;


        \lettrine{\textcolor{yellow!70}{A}}{lthough} the technology of printing text using movable type was invented in China, and despite the esteem which calligraphy held in that civilization, the vast number of Chinese characters meant that few distinctive, complete fonts could be afforded by Chinese printers. For many centuries, creating type started with cutting punches, which acted as the masters. The material that was cut formed a prototype of the character from which type was cast by various means from an alloy usually containing lead. Type design accounted for the limitations of the printing process, such as the splashing properties of ink or the wear on the type itself. In many countries, though not the United States of America, type design could be copyrighted typeface by typeface. The USA offered and continues to offer design patents as an option for typeface design protection.

        For the American Type Founders Corporation, and a few others using their technology, each character was drawn in a very large size, over a foot (30 cm) high. The outline was then traced by a Benton pantograph-based engraving machine with a pointer at the hand-held vertex and a cutting tool at the opposite vertex down to a size usually less than a quarter-inch (6 mm). The pantographic engraver was first used to cut punches, and later to directly create matrices.

        With the coming of computers, especially those on artists' desktops, type design eventually became a subdivision of computer graphics, employing a drafting program of some sort. Today, visual animators can create complex movies using just fonts. This style is called kinetic typography. Each character design can be traced by a stylus on a digitizing board, or modified from a scanned drawing of somewhat smaller size than that once used for the pantograph, or composed entirely within the computer graphics program itself. Each character is then made into a digitized form to be reconstructed within the graphics display program of a display screen or printer. Copyright was extended to this form. Although a given digitization of a typeface can all too easily be modified by another type designer, such a modified font is usually considered a derivative work, and is covered by the copyright of the original font software.

        \noindent History of \textit{`Type design'}, from \textit{Wikipedia, the free encyclopedia}. Available at \url{http://en.wikipedia.org/wiki/Type_design#History}.

Maybe I worked over than necessary, any comment is welcome.


Because Marc changed the calendar for 2015, Speravir asked me a solution for this year. Can be downloaded here.

enter image description here

This can be obtained replacing the code for the number 4 with (at first scope):

%Number 5
\path[name intersections={of=vline7 and hline1,by=i51}];
\path[name intersections={of=vline7 and hline5,by=i52}];
\path[name intersections={of=vline8 and hline1,by=i53}];
\path[name intersections={of=vline8 and hline5,by=i54}];
\path[name intersections={of=vline7 and hline3,by=i55}];
\path[name intersections={of=vline8 and hline3,by=i56}];
\path[name intersections={of=auxvline4 and hline2,by=c15}];
\draw[name path=circle15] (c15) circle (\nwidth/2);
\draw[name path=circle25] (c15) circle (\nwidth/2-\nthick);
\coordinate (c25) at ($(c15)+(0,2*\nthick)$);
\draw[name path=auxhline1,dashed] ($(c25)-(1,0)$) -- ($(c25)+(1,0)$);
\draw[name path=circle35,dashed] (c25) circle (\nwidth/2);
\draw[name path=circle45,dashed] (c25) circle (\nwidth/2-\nthick);
\draw[name path=line51] ($(i51)+(\nthick,0)$) -- ($(i52)+(\nthick,0)$);
\draw[name path=line52] ($(i53)-(\nthick,0)$) -- ($(i54)-(\nthick,0)$);
\draw[name path=line53] ($(i52)-(0,\nthick)$) -- ($(i54)-(0,\nthick)$);
\draw[name path=line54] ($(i55)+(0,2*\nthick)$) -- ($(i56)+(0,2*\nthick)$);
\draw[name path=line55] ($(i55)+(0,\nthick)$) -- ($(i56)+(0,\nthick)$);
\path[name intersections={of=auxvline4 and line54,by=i57}];
\path[name intersections={of=vline8 and hline2,by=i58}];
\path[name intersections={of=line51 and hline2,by=i59}];
\path[name intersections={of=auxhline1 and line52,by=i510}];

and this (at second scope):

%Number 5
\fill (i54) -- ($(i54)-(0,\nthick)$) -- ($(i52)+(\nthick,-\nthick)$) -- ($(i55)+(\nthick,2*\nthick)$) -- (i57) arc (90:0:\nwidth/2) -- (i58) arc(0:-180:\nwidth/2) -- (i59) arc (-180:0:\nwidth/2-\nthick) -- (i510) arc(0:90:\nwidth/2-\nthick) -- ($(i55)+(0,\nthick)$) -- (i52) -- cycle;
share|improve this answer
Thanks. Looks nice. Would you mind providing a hyperlink to a pdf version please? –  Marc van Dongen Dec 20 '13 at 12:02
@MarcvanDongen Yeah, sure! Here's again: docs.google.com/file/d/0BxFKCIz7VScITjZXb29FbHdLX3M/edit –  OSjerick Dec 24 '13 at 22:28
Marc changed his plan and wants to produce the calendar for 2015, now. Is a version for this year possible, as well? (But do not delete the original version, please!) –  Speravir Dec 27 '13 at 21:39
@Speravir Yes, no problem. –  OSjerick Dec 28 '13 at 18:18
@Speravir Done! Greetings. :) –  OSjerick Jan 20 at 18:11
show 1 more comment
up vote 40 down vote

Here's a demonstration of TeX's hyphenation and justification algorithm. Apart from changing a few \sfcodes and using character protrusion with microtype, this is TeX's default output with no manual line breaks or hyphenation points.

Preview of The Crystal Goblet

% save this document as example.tex
% compile this document with: xelatex -shell-escape example.tex

% Needed to make sure your page dimensions
% are the same as that of the calendar.

\setmainfont[Mapping=tex-text,RawFeature={+onum,+pnum}]{Garamond Premier Pro Medium}


{\fontsize{24}{30}\selectfont\centering\so{THE CRYSTAL GOBLET}\par}
{\centering\emph{by} \so{BEATRICE WARDE}\par}
Imagine that you have before you a flagon of wine.  You may choose
your own favourite vintage for this imaginary demonstration, so that
it be a deep shimmering crimson in colour.  You have two goblets
before you.  One is of solid gold, wrought in the most exquisite
patterns.  The other is of crystal-clear glass, thin as a bubble, and
as transparent.  Pour and drink; and according to your choice of
goblet, I shall know whether or not you are a connoisseur of wine.

For if you have no feelings about wine one way or the other, you will
want the sensation of drinking the stuff out of a vessel that may have
cost thousands of pounds; but if you are a member of that vanishing
tribe, the amateurs of fine vintages, you will choose the crystal,
because everything about it is calculated to reveal rather than to
hide the beautiful thing which it was meant to contain.

Bear with me in this long-winded and fragrant metaphor; for you will
find that almost all the virtues of the perfect wine-glass have a
parallel in typography.  There is the long, thin stem that obviates
fingerprints on the bowl.  Why? Because no cloud must come between
your eyes and the fiery hearth of the liquid.  Are not the margins on
book pages similarly meant to obviate the necessity of fingering the
type-pages? Again: The glass is colourless or at the most only faintly
tinged in the bowl, because the connoisseur judges wine partly by its
colour and is impatient of anything that alters it.

There are a thousand mannerisms in typography that are as impudent and
arbitrary as putting port in tumblers of red or green glass! When a
goblet has a base that looks too small for security, it does not
matter how cleverly it is weighted; you feel nervous lest it should
tip over.  There are ways of setting lines of type which may work well
enough, and yet keep the reader subconsciously worried by the fear of
`doubling' lines, reading three words as one, and so forth.

Printing demands a humility of mind, for the lack of which many of the
fine arts are even now floundering in self-conscious and maudlin
experiments.  There is nothing simple or dull in achieving the
transparent page.  Vulgar ostentation is twice as easy as discipline.
When you realise that ugly typography never effaces itself, you will
be able to capture beauty as the wise men capture happiness by aiming
at something else.

The `stunt typographer' learns the fickleness of rich men who hate to
read.  Not for them are long breaths held over serif and kern, they
will not appreciate your splitting of hair-spaces.  Nobody (save the
other craftsmen) will appreciate half your skill.  But you may spend
endless years of happy experiment in devising that crystalline goblet
which is worthy to hold the vintage of the human
\textsc{Beatrice Warde} (1900--1969) was an American-English
communicator of typography.  Her essay, `The Crystal Goblet',
first delivered as a speech, `Printing Should Be Invisible', to
the British Typographers' Guild, in 1930, is one of her most
famous works.  It was published as a pamphlet in 1932 and again in
1937, and in 1955 appeared in a book entitled \emph{The Crystal
Goblet:\ Sixteen Essays on Typography}.  The abbreviated text
reproduced above was taken from \emph{Typography Online}
(nenne.com/typography).  It is set here by \XeLaTeX\ in ten point
Garamond Premier Pro, which was designed by \textsc{Robert
Slimbach} (1956--\hspace*{0.5em}) in imitation of the types of
\textsc{Claude Garamond} (\emph{ca.}\,1490--1561).

The text is Beatrice Warde's The Crystal Goblet, an essay that praises simplicity in typography; the precise text is an abbreviated version that appears here. The typeface, a Garamond, is considered by some to be the closest thing we have to such a crystal goblet.

The source code and output are available here. Also available is a version with manual kerning at the top of the third column of the main text.

share|improve this answer
Thanks. Looks good. –  Marc van Dongen Dec 9 '13 at 11:16
Is there a missing blank space after "fear of" at the top line of the third column? –  jonalv Dec 11 '13 at 15:33
@jonalv I did notice this when I was compiling: the space is not missing, but it looks like it is, because: 1) that line is set quite tightly; 2) the ascender on the 'f' hangs over the space; and 3) the open quote does the same. –  ChrisS Dec 11 '13 at 22:04
@ChrisS Isn't this a kerning problem? At least I will add some manual space to improve readability. –  zunbeltz Dec 13 '13 at 11:34
@ChrisS Otherwise looks very nice. –  zunbeltz Dec 13 '13 at 11:34
show 2 more comments

Last summer I taught a cryptography course. Next summer I will again, but I'll use PythonTex! The example below shows off PythonTex, TeX, and a little bit of tikz.

Good for March?

% save this document as example.tex
% compile this document with: pdflatex -shell-escape example.tex


%Needed to make sure your page dimensions are the same as that of the calendar.
%For plainciphertextweave
\usepackage{setspace,xcolor}% http://ctan.org/pkg/{setspace,xcolor}

%%%%%%%%%%%%%       Cryptography       %%%%%%%%%%%%%%  
% \plainciphertextweave[<num chars>]{<plain text>}{<cipher text>}
  \settowidth{\dimen0}{\ttfamily A}%
  \leavevmode\rlap{\parbox[t]{\the\dimen0}{\setstretch{2}\scan{#3}\scan{#2}\ttfamily\strut\\[\dimexpr-1.7\baselineskip+\dimen1]\color{black!75}\@tempa\strut}}% Plain text
  \parbox[t]{\the\dimen0}{\setstretch{2}\scan{#3}\ttfamily\strut\\[\dimexpr-1.2\baselineskip+\dimen1]\@tempa\strut}% Cipher text

% \stacktext[<num chars>]{<text>}
  \settowidth{\dimen0}{\ttfamily A}%
  \g@addto@macro{\@tempa}{#1\hskip 0pt}%
\def\scan#1{\let\@tempa\@empty\scan@letters #1\@empty}





alphabet = "abcdefghijklmnopqrstuvwxyz"
def caesar_shift(ptext):
    shift = 3
    ctext = ""
    for pchar in ptext:
        if pchar not in alphabet:
            cchar = pchar
            pnum = alphabet.index(pchar)
            cnum = (pnum + shift) % len(alphabet)
            cchar = alphabet[cnum]
        ctext = ctext + cchar
    return print(ctext.upper())

description = "If he had anything confidential to say, he wrote it in cipher, that is, by so changing the order of the letters of the alphabet, that not a word could be made out. If anyone wishes to decipher these, and get at their meaning, he must substitute the fourth letter of the alphabet, namely D, for A, and so with the others. \ ---Suetonius, Life of Julius Caesar 56"
description = description.lower()

    \section*{Caesar Shift}



    alphabet = "abcdefghijklmnopqrstuvwxyz"
    def caesar_shift(ptext):
        shift = 3
        ctext = ""
        for pchar in ptext:
            if pchar not in alphabet:
                cchar = pchar
                pnum = alphabet.index(pchar)
                cnum = (pnum + shift) % len(alphabet)
                cchar = alphabet[cnum]
            ctext = ctext + cchar

    caesar_shift("hello, caesar")
    \fill[fill=black!20] (0,0) circle (1.15*\Rb cm);
    \fill[fill=black!0] (0,0) circle (1.15*\Ra cm);
    \foreach \K/\char in {0/a,1/b,2/c,3/d,4/e,5/f,6/g,7/h,8/i,9/j,10/k,11/l,12/m,13/n,14/o,15/p,16/q,17/r,18/s,19/t,20/u,21/v,22/w,23/x,24/y,25/z}
        \node[rotate=-\K*\angle] at (90-\K*\angle:\Ra) {\tt \char};
    \foreach \K/\char in {0/D,1/E,2/F,3/G,4/H,5/I,6/J,7/K,8/L,9/M,10/N,11/O,12/P,13/Q,14/R,15/S,16/T,17/U,18/V,19/W,20/X,21/Y,22/Z,23/A,24/B,25/C}
        \node[rotate=-\K*\angle] at (90-\K*\angle:\Rb) {\tt \char};


enter image description here

Here's the pdf output

share|improve this answer
Thanks. Would you mind including a hyperlink to the output pdf document please? –  Marc van Dongen Dec 22 '13 at 10:21
I like that! Shameless plug: you might be interested in my Enigma package for Luatex: ctan.org/pkg/enigma –  phg Dec 28 '13 at 17:02
add comment

For February, there are many possibilities at Can we make a love heart with LaTeX? Here’s my heart with one of the few poems I could stand seeing every day for a month:

% Compile with lualatex
\setmainfont[Contextuals=Alternate,Ligatures={Historic,Rare},ItalicFeatures={Ligatures=Contextual,Style=Swash}]{EB Garamond}
Only name the day, and we’ll fly away
  In the face of old traditions,
To a sheltered spot, by the world forgot,
  Where we’ll park our inhibitions.
Come and gaze in eyes where the lovelight lies
  As it psychoanalyzes,
And when once you glean what your fantasies mean
  Life will hold no more surprises.
When you’ve told your love what you’re thinking of
  Things will be much more informal;
Through a sunlit land we’ll go hand-in-hand,
  Drifting gently back to normal.
While the pale moon gleams, we will dream sweet dreams,
  And I’ll win your admiration,
For it’s only fair to admit I’m there
  With a mean interpretation.
In the sunrise glow we will whisper low
  Of the scenes our dreams have painted,
And when you’re advised what they symbolized
  We’ll begin to feel acquainted.
So we’ll gaily float in a slumber boat
  Where subconscious waves dash wildly;
In the stars’ soft light, we will say good-night—
  And “good-night!” will put it mildly.
Our desires shall be from repressions free—
  As it’s only right to treat them.
To your ego’s whims I will sing sweet hymns,
  And ad libido repeat them.
With your hand in mine, idly we’ll recline
  Amid bowers of neuroses,
While the sun seeks rest in the great red west
  We will sit and match psychoses.
So come dwell a while on that distant isle
  In the brilliant tropic weather;
Where a Freud in need is a Freud indeed,
  We’ll always be Jung together.}

\footnotesize\noindent Dorothy Parker\hfill\itshape The Passionate Freudian to His Love

enter image description here

The PDF output is here.

share|improve this answer
Thanks. The format isn't what I asked for, but it's a good idea. Would you mind providing link to the pdf output please./ –  Marc van Dongen Dec 27 '13 at 11:50
add comment

This is an example of automated environment using stringstrings and parselines packages to separate plain contents and a complex format, so the first word and the second word are aligned in two parallel diagonals, whereas the remaining text is right-aligned, and the three parts of each line also are formatted distinctly with color gradients across the rows.

The last line is a bit different, and note that there are a hyphen in species name (that is deleted in the output) so that the binomial scientific name is treated as a single word.

Moreover, the code use the tcolorbox package but this tikz part does nothing odd with the text (excepting put all in a nice tcolortbox). So that, a nearly verbatim-like environment, where the settings is only one value of the indentation steps:

Regio Eukaryota Chatton, 1925
Regnum  Protozoa (Goldfuss, 1818) R. Owen, 1858 
Subregnum  Biciliata  (Hatschek, 1888) Cavalier-Smith, 1983
Infraregnum Alveolata Cavalier-Smith, 1991
Phylum Ciliophora (Doflein, 1901) Copeland, 1956 
Subphylum Intramacronucleata Lynn, 1996
Classis Litostomatea Small y Lynn, 1981
Subclassis Trichostomatia Bütschli, 1889
Ordo Vestibuliferida de Puytorac et al., 1974
Familia Balantidiidae Reichenow, in Doflein y Reichenow, 1929
Genus Balantidium  Clapar\`ede y Lachmann, 1858
Species Balantidium-coli (Malmsten, 1857)

become this:


Here are the source tex file and the resulting pdf compiled with pdflatex.

Note: egreg's answer in Suggestions for an automatic taxonomy environment also show how obtain diagonal alignments in parallel, but using a completely different approach.

share|improve this answer
Thanks. It looks it should also be possible to do this on top of TikZ. You draw the left two columns as a tree (without lines) and align the rightmost column by computing the positions using the intersections coordinate system and aligning the nodes with anchors to the east. –  Marc van Dongen Jan 20 at 10:29
@MarcvanDongen Probably, but here not only matter the final result. The main idea was (re)use already made plain text and maintain it readadable for humans (me). I use often this kind of classifications, thus working with a source code as simple as possible was a must. –  Fran Jan 20 at 11:11
add comment

LaTeX has some nice title page designs but we need some tools to produce them. The following is a case study to see what is needed to build title pages from some basic building blocks. I improved the first submission by adding coordinate transformations.

An on line pdf may be found here.

The following is the source code. Compiling it may take a while. The document requires the TikZ library external, so the best thing to do is saving the document as name.tex and compiling it with: pdflatex -shell-escape name.tex


% Based on a titlepage design in the top left picture on Page 159 of
% @BOOK{de:Jong:Type:2,
%   title     = {Type
%                \emph{A Visual History of Typefaces and Graphic Styles
%                \emph{1901\thinspace\textemdash\thinspace1938}}},
%   volume    = {2},
%   editor    = {de Jong, Cees W.},
%   publisher = {Taschen},
%   isbn      = {978-3-8365-1514-6},
% }
% The typeface in the original design is _Eine Neue Groteske, 1911,_
%  by Schriftgie{\ss}erei Ludwig \&~Mayer, Frankfurt am Main.

% Author: M.\,R.\,C. van Dongen


% incude tikz and tikz libraries.
% The following may be omitted---they're only useful if you
% want to create a stand alone version of the title page.

% distance commands
% colour commands
% line width commands

% auxiliary dimensions for positions of ornaments
% draw fancy ornamental shape (much simpler than the original shape)
    \centrexpos=\TotalHeight cm%
    \divide\centrexpos by \Rows%
    \multiply\centrexpos by #2%
    \multiply\centreypos by #1%
    \foreach \a/\b/\c/\d in {1/0/0/1,-1/0/0/1,1/0/0/-1,-1/0/0/-1} {

% some style
\tikzset{draw style/.style={line cap=round,line join=round,draw=DrawOuter,line width=\LineWidth cm}}

% helper macro for \DrawOrnament
    \draw[name path=big spiral,draw style]
         let \n{wd}={\TotalHeight/\Rows},
             \n{first step}={0},
             \n{last step}={99},
             \n{angle increment}={360*\n{windings}/(\n{last step}-\n{first step}+1)},
            (0,0) + (2*\n{dx},0)      coordinate (outer lr)
                  + (2*\n{dx},\n{dy}) coordinate (outer ur)
                  + (0,\n{dy})        coordinate (outer ul)
                  + (0,0)             coordinate (outer ll)
              (outer lr) + (-\n{sepx},\n{sepy}) coordinate (inner lr)
              (outer ur) + (-\n{sepx},-\n{sepy}) coordinate (inner ur)
              (outer ul) + (0,-\n{sepy})  coordinate (inner ul)
              (outer ll) + (0,\n{sepy})   coordinate (inner ll)
              (inner ll) + (\n{hoffset},\n{voffset}) coordinate (fst centre)
              ($(inner lr)!0.2!(inner ll)$) coordinate (start)
              ($(inner ur)!0.35!(inner ul)$) coordinate (end)
              (start) -- (inner lr) -- (inner ur) -- (end)
              \foreach \num in {\n{first step},...,\n{last step}} {
                  let \n{rd0}={(\n{rad}*\num)/\n{last step}},
                      \n{rd2}={(\n{rad}*(\num+1))/\n{last step}},
                      \n{a0}={\num*\n{angle increment}},
                      \n{a3}={(\num+1)*\n{angle increment}},
                  in ($(fst centre)+(-\n{a0}:\n{rd0})$) coordinate(\num@0)
                     ($(fst centre)+(-\n{a1}:\n{rd0})$) coordinate(\num@1)
                     ($(fst centre)+(-\n{a2}:\n{rd2})$) coordinate(\num@2)
                     ($(fst centre)+(-\n{a3}:\n{rd2})$) coordinate(\num@3)
                     (\num@0) .. controls (\num@1) and (\num@2) .. (\num@3)
              (\n{last step}@3) coordinate (p1)
              (p1) + (1.2*\n{radx},0) coordinate (p2)
              (start) + (-0.65*\n{radx},1.3*\n{rady}) coordinate (p3)
              (p1) .. controls (p2) and (p3) .. (start)
              ($(end)+(-\n{dx},-\n{dy})$) coordinate (aux) ;
    \draw[name path=small spiral,draw style]
         ($(inner ll)!0.675!(inner lr)$) coordinate (temp1)
         ($(inner lr)!0.115!(inner ur)$) coordinate (temp2)
         (temp1 |- temp2) coordinate (snd centre)
              \foreach \num in {8,...,45} {
                  let \n{rad}={0.75*(\Separation+\LineWidth)},
                  in  ($(snd centre)+(\n{a0}:\n{rd0})$) coordinate(\num@0)
                     ($(snd centre)+(\n{a1}:\n{rd0})$) coordinate(\num@1)
                     ($(snd centre)+(\n{a2}:\n{rd2})$) coordinate(\num@2)
                     ($(snd centre)+(\n{a3}:\n{rd2})$) coordinate(\num@3)
                     (\num@0) .. controls (\num@1) and (\num@2) .. (\num@3)
    \draw[draw style]
         let \n{dx}={\TotalHeight/\Rows} in
             (fst centre |- inner ll) coordinate (join point)
             (45@3) .. controls ($(45@3)+(-0.40*\n{dx},0)$) and ($(join point)+(0.30*\n{dx},0)$) .. (join point);
    \path[name path=first]
         (p1) .. controls (p2) and (p3) .. (start);
    \path[name path=second]
         (end) -- (aux);
    \draw[draw style,name intersections={of=first and second, by=inter}]
         (end) -- (inter);
    \foreach \pos/\offy in {inner ul/-0.20,inner ll/0.20} {
        \path[name path=third]
             let \n{dx}={\TotalHeight/\Rows} in
             (\pos) -- +(0.20*\n{dx},\offy*\n{dx});
        \draw[draw style,name intersections={of=big spiral and third, by=inter}]
              (\pos) -- (inter);

% draw and fill a square
    \draw[line cap=round,line join=round,draw=DrawOuter,line width=\LineWidth cm]
         let \n{width}={\TotalHeight/\Rows},
          in (\n{outerdrawxpos},\n{outerdrawypos})
                 rectangle + (\n{outerwidth},\n{outerwidth})
    \path[line cap=round,line join=round,#3,fill=FillInnerSquare,line width=\LineWidth cm]
         let \n{width}={\TotalHeight/\Rows},
          in (\n{outerdrawxpos},\n{outerdrawypos})
                 rectangle + (\n{outerwidth},\n{outerwidth})

% draw a square

% draw a compound square

% draw the title
          let \n{width}={\TotalHeight/\Rows},
              \p{pos}=(\n{xpos},\n{ypos}) in
          (\p{pos}) node[scale=1.5,shape=rectangle split,rectangle split parts=2]
              {\bfseries\Huge \LaTeX\ is Fun\nodepart{two}\bfseries\LARGE \emph{Innit?}}

% Here we go.
\begin{tikzpicture}[outer sep=0pt]
         let \n{width}={\TotalHeight/\Rows},
         in (0.5*\n{width},0.5*\n{width}) rectangle
            ($(\p{offset})+(\Cols*\n{width},\Rows*\n{width})$) ;
    \foreach \row/\col in {
             \Rows/1,\Rows/\Cols} {
    \foreach \col in {1,\Cols} {
        \foreach \row in {2,...,\PredMidRows} {
        \foreach \row in {\SuccMidRows,...,\Rows} {
    \foreach \row in {2,...,\PredMidRows} {
    \foreach \row in {1,\MidRows,\Rows} {
        \foreach \col in {2,...,\PredMidCols} {
        \foreach \col in {\SuccMidCols,...,\PredCols} {
    \foreach \row in {3,5,7,9} {
        \foreach \col in {4,9} {


sample output

share|improve this answer
add comment

A CD design for a friend. This design was never used.


\newcommand{\EdgeText}{Anear Production. Recorded Live at St Finbarre's Cathedral, Cork, 2009.}

\def\MakeCd[large text=#1,%
            large text outer scale=#2,%
            large text inner scale=#3,%
            large text xoffset=#4,%
            large text yoffset=#5,%
            probability=#6] {%
   \path (0,0) coordinate (origin);
   \clip (origin) circle (\CdOuterRadius);
        (origin) +(-\CdOuterRadius,-\CdOuterRadius)
       rectangle +(\CdOuterRadius,\CdOuterRadius);
   \foreach \row in {-10,...,10} {
   \foreach \col in {-15,-14,...,15} {
       \draw let \p{pos} = (\CdOuterRadius*\col*0.06666,\row*0.65),
                 \n{prob} = {random(1,\Probability)}
             in (origin) + (\p{pos})
                {$\pgfmathparse{\n{prob} == 1 ? 1 : 0}\pgfmathresult$}
                (origin) + (\p{pos})
                {$\pgfmathparse{\n{prob} == 1 ? 1 : 0}\pgfmathresult$};
   \draw (origin) + (\LargeTextXOffset,\LargeTextYOffset)
         (origin) + (\LargeTextXOffset,\LargeTextYOffset)
        (origin) circle (\CdInnerRadius);
   \fill[white] (origin) circle (\CdHoleRadius);
   \draw[ultra thick] (origin) circle (\CdOuterRadius);
   \draw[thick] (origin) circle (\CdHoleRadius);

   \path[rotate=200,decorate,decoration={text along path,text=\EdgeText}]
        (origin) circle (\CdOuterRadius-3.5);

\def\MAKECD[large text=#1,%
            large text outer scale=#2,%
            large text inner scale=#3,%
            use probability=#4] {%
   \path (0,0) coordinate (origin);
   \clip (origin) circle (\CdOuterRadius);
        (origin) +(-\CdOuterRadius,-\CdOuterRadius)
       rectangle +(\CdOuterRadius,\CdOuterRadius);
   \csname if#4\endcsname
   \foreach \row in {-10,...,10} {
   \foreach \col in {-15,-14,...,15} {
       \draw let \p{pos} = (\CdOuterRadius*\col*0.06666,\row*0.65),
                 \n{prob} = {random(1,\Probability)}
             in (origin) + (\p{pos})
                {$\pgfmathparse{\n{prob} == 1 ? 1 : 0}\pgfmathresult$}
                (origin) + (\p{pos})
                {$\pgfmathparse{\n{prob} == 1 ? 1 : 0}\pgfmathresult$};
   \draw %(origin) + (0.55*\CdOuterRadius,0.5 |- 0,-\CdInnerRadius)
         %node[baseline,scale=1.75*\LargeTextOuterScale,inner sep=0pt]
         (origin) + (0.60*\CdOuterRadius,0.5 |- 0,-\CdInnerRadius)
         node[anchor=base,color=\CdLargeTextInnerColour,scale=1.75*\LargeTextInnerScale,inner sep=0pt]
        (origin) circle (\CdInnerRadius);
   \fill[white] (origin) circle (\CdHoleRadius);
   \draw[ultra thick] (origin) circle (\CdOuterRadius);
   \draw[thick] (origin) circle (\CdHoleRadius);

   \path[rotate=200,decorate,decoration={text along path,text=\EdgeText}]
        (origin) circle (\CdOuterRadius-3.5);


\MakeCd[large text=$1$,%
        large text outer scale=34.4,%
        large text inner scale=33.4,%
        large text xoffset=+3.0,%
        large text yoffset=-0.1,%

\MakeCd[large text=$2$,%
        large text outer scale=34.4,%
        large text inner scale=33.4,%
        large text xoffset=+2.10,%
        large text yoffset=+0.3,%

\MakeCd[large text=$3$,%
        large text outer scale=32.4,%
        large text inner scale=31.4,%
        large text xoffset=+3.30,%
        large text yoffset=-0.1,%

\MakeCd[large text=$4$,%
        large text outer scale=32.4,%
        large text inner scale=31.4,%
        large text xoffset=+3.30,%
        large text yoffset=-0.1,%

\MakeCd[large text=$4$,%
        large text outer scale=40.4,%
        large text inner scale=39.4,%
        large text xoffset=+1.30,%
        large text yoffset=-0.1,%


First CD Screenshot Second CD Screenshot Third CD Screenshot Fourth CD Screenshot

share|improve this answer
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.