I try to do a little more spectacular that phrase ( Δελτιο Υλης) . Is the headline on a press material for my students. The fact is that I could accomplish this with gimp or a graphics program such as the inscape or similar programs.

But what I want is to make a somewhat artistic distortion of letters through tikz to show to my students the possibilities of having the LaTeX without using external programs.

My question: is there a way to warp letter and how?

Currently this is what I've done ... and certainly I have not artistic vein ...

enter image description here

\draw[grid,step=0.5cm,gray,very thin] (-1cm,-1cm) grid (9cm,1.5cm);
\node[scale=5.,color =MidnightBlue ] at (0,0) {$\Delta$};
\node[scale=5.,color =MidnightBlue ,rotate=30] at (0.84cm,0.1cm) {$\varepsilon$};
\node[scale=5.,color =MidnightBlue,rotate=-15 ] at (1.3cm,0.0cm) {$\lambda$};
\node[scale=5.,color =MidnightBlue,rotate=+15 ] at (1.95cm,-0.2cm) {$\tau$};
\node[scale=5.,color =MidnightBlue ] at (2.5cm,0) {$\iota$};
\node[scale=5.,color =MidnightBlue ] at (2.6cm,0.4cm) {$'$};
\node[scale=5.,color =MidnightBlue ] at (3.0cm,0) {$o$};
\node[scale=6.,color =MidnightBlue,rotate=-20 ] at (5.3cm,0.08cm) {$\Upsilon$};
\node[scale=5.,color =MidnightBlue ] at (6.cm,-0.2cm) {$\lambda$};
\node[scale=5.,color =MidnightBlue ] at (7.cm,-0.1cm) {$\eta$};
\node[scale=5.,color =MidnightBlue ] at (8.cm,0) {$\varsigma$};
  • 14
    I would use MS Word for this. It's naturally supported – percusse Mar 29 '13 at 23:06
  • 5
    Did you see one of our greatest questions about Ctulhu and random rotations of letters here tex.stackexchange.com/q/29402/3235 ? Or any other great answers on this site ? – percusse Mar 29 '13 at 23:11
  • 1
    @karathan: Looks like a CAPTCHA to me. Maybe it would make sense to rename the question to accommodate that? – Count Zero Mar 29 '13 at 23:18
  • 4
    Maybe I should add that I meant the terrible quality of Word math rendering that it comes this horrible by default if one uses Word. – percusse Mar 30 '13 at 15:33
  • 2
    Why limit the question to TikZ? (see Why Metapost discrimination) – Aditya Mar 30 '13 at 17:12

No claims to artistry or anything (you may, or may not notice that I've changed the text :-), also as it involves randomness sometimes it looks OK sometimes it does not:



        execute at begin node={%

% Need a special space because inside \node { };
% \ignorespaces and \unskip will remove spaces.
\def\bigspace{\hbox to 1ex{\hfil}}




% The basic idea is to create a node called 0
% then by maintaining indexes \i = 1,2,... and \j = 0,1,...
% it is possible to position the current node (called \i)
% to the previous node (called \j).
\coordinate (0);
\foreach \letter [count=\i, count=\j from 0]in {P,i,g,s, \bigspace  ,m,i,g,h,t, \bigspace ,f,l,y}
    \node [inner sep=0pt, anchor=base west, distort]  at (\j.base east) (\i)


% The opacity is stored in an array and accessed
% using the (undocumented) evaluate key.
\foreach \c [evaluate={\o={5,25, 100}[\c-1];}]in {1,...,3} {
    \coordinate (0) at (rand/4, rand/4);
    \foreach \letter [count=\i, count=\j from 0]in {P,i,g,s, \bigspace  ,m,i,g,h,t, \bigspace ,f,l,y}
        \node [inner sep=0pt, anchor=base west, black!\o, distort]  at (\j.base east) (\i) {\letter};


% In order to get the same randomness (!) the random seed
% can be set to a fixed value. In this case the value is
% selected from the range 1-32768.
\foreach \c [evaluate={\o={5,25, 100}[\c-1];}]in {1,...,3} {
    \coordinate (0) at (\c*2pt,\c*2pt);
    \foreach \letter [count=\i, count=\j from 0]in {P,i,g,s, \bigspace  ,m,i,g,h,t, \bigspace ,f,l,y}
        \node [inner sep=0pt, anchor=base west, black!\o, distort]  at (\j.base east) (\i) {\letter};



EDIT: Added some more randomness in an attempt to make it more fancy.

| improve this answer | |
  • 2
    Really an excellent result. LaTeX and Tikz have a unique way to surprise me!!! and all of you with your codes – karathan Mar 31 '13 at 14:00
  • If you find a little time, would be easy to put a short comment on each line to explain your code – karathan Mar 31 '13 at 18:52
  • Is there any way to get the text that is displayed to make it an actual captcha? (Sorry, TeX n00b) – Cole Johnson Apr 5 '13 at 19:49

Here is a solution that uses Metapost and ConTeXt (no font changes but randomized color and scaling):


picture lab;

numeric total_width, current_width;

total_width := 0;

for s = "H", "e", "l", "p", "\quad", "Γ", "Δ" :
   lab := textext(s); 
   current_width := xpart (lrcorner lab - llcorner lab);

  for i = 1,3,2 :
   draw lab  rotated (-30 randomized 60) shifted (total_width randomized 5pt, i*6pt randomized 2pt)
      if i = 1 :
        scaled (0.8 randomized 0.2)
        withcolor (0.8 randomized 0.1, 0.8 randomized 0.1, 0.8 randomized 0.2)
      elseif i = 2 :
        scaled (0.8 randomized 0.2)
        withcolor (0.2 randomized 0.1, 0.1 randomized 0.1, 0.8 randomized 0.2)
      else :
        scaled (0.8 randomized 0.2)
        withcolor (0.8 randomized 0.1, 0.8 randomized 0.1, 0.8 randomized 0.2)

   total_width := total_width + current_width ;



which gives

enter image description here

| improve this answer | |
  • something went wrong as all three colors are light. One of them (in the middle) is supposed to be dark. – Aditya Mar 31 '13 at 5:03
  • No, context filename is correct. But the colors are changed at random, so there is no way to predict the output. – Aditya Mar 31 '13 at 5:12
  • Hmm... strange. I uploaded a bigger picture. – Aditya Mar 31 '13 at 5:29
  • Yes. Indeed. I might try to re-install ConTeXt. Well, thanks for the answer. This is really helpful. +1 :) – hpesoj626 Mar 31 '13 at 5:32
  • Although I use LaTeX + Tikz... is a very good result and will be useful to users of Metapost and ConTeXt – karathan Mar 31 '13 at 14:07

Without PSTricks.

enter image description here

\foreach \C in {I,a,m,a,p,i,g,.}{%
    \scalebox{\Scale}{\rotatebox{\Rotate}{\raisebox{\Raise pt}{\C}}}%
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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