[texhax] Producing text and math in a 'spiral shape'

Heiko Oberdiek heiko.oberdiek at googlemail.com
Fri Sep 14 03:20:06 CEST 2012

On Thu, Sep 13, 2012 at 10:47:02AM -0500, Iraj Kalantari wrote:

> In an exchange between Minsu Kim and Ulrike Fischer 
> (see 
> http://newsgroups.derkeiler.com/Archive/Comp/comp.text.tex/2009-07/msg00425.html
> )
> the focus is on how to create *text* in the shape of a spiral.  (See source below.)  They use the digits of Pi for text in a successful example.
> I tried to insert a mathematical formula bookended by $s (say $a^2 + b^2
> =c^2$) but the source does not deliver and stops with an (odd) error
> message.
> Is there a remedy?  Is there a way to get mathematical formulas in the
> shape of a spiral?

The macros can be modified to support token groups instead of single tokens.
Then the equation can be split into token groups manually:


% A \DoPerCharacter macro adapted from Juergen Schlegelmilch
% (posted on comp.text.tex - January 1998)
  #1{#2}% #2 can be a group of tokens

% If the string ends in a group of tokens, then the curly braces
% would be stripped. The empty group before `\@nil' prevents this.

\pst at dimh=0.7pt

  \psscalebox{1 \pst at number{\pst at dimh}}{#1}
  \advance\pst at dimh by 0.04pt

{500}{-500}{1 2.7182818 x 200 div exp 1 add div}}% Spiral
%  3,141592653589793238462643383279502884197169399375%
%  10582097494459230781640%


%%% test.tex %%%

Your sincerely
  Heiko Oberdiek

More information about the texhax mailing list