2

My searches haven't pulled up anything like what I'm looking for.

I'd like to create text that does something like what you can see here. I'm not trying to create the poster. I just want to write the word Beyond in a manner similar (or along a bit more exaggerated scale) to how the word Raiders is written.

So far what I've tried is

\documentclass[border=2in]{standalone}
\usepackage{fontspec}
\usepackage{tikz}
\usetikzlibrary{calc}
\usetikzlibrary{shapes.symbols,decorations.pathmorphing,fit,decorations.text,backgrounds}
\begin{document}

\begin{tikzpicture}
  \path (-5,-5) rectangle (5,5);

  \path[postaction={decorate},
        draw,        
        decoration={text effects along path,
                    text={Beyond},
                    text effects/.cd,
                    character count=\i,
                    character total=\n,
                    characters={
                      text along path,
                      font=\sffamily\Huge\bfseries,
                      text=red,
                      scale=1/(\i/\n)*0.75-1.25,
                      anchor=center,
                      },                    
                   %% text align=align,
                   }]
        (-5,-5) .. controls (-5,1.5) and (1.5,5) .. (5,5);
\end{tikzpicture}

\end{document}

which is completely not to my liking.

I'd love to see something much better. Or, minimally, pointed to an answer on this site that already illustrates what I want.

percusse
  • 157,807
A.Ellett
  • 50,533
  • Perhaps similar to this: http://tex.stackexchange.com/questions/208426/how-do-i-display-pi-in-latex-like-don or maybe a variant of this: http://tex.stackexchange.com/questions/313880/draw-text-in-different-shapes – Steven B. Segletes Sep 19 '16 at 20:24
  • @StevenB.Segletes The second one looks much more like what I want. Thank you. Of course, I'd be happy to see what you might put together. You always have interesting approaches. – A.Ellett Sep 19 '16 at 20:31
  • @StevenB.Segletes The second is what I'd like to be able to do, but I can't get it to compile. It's possible that I may need to update my LaTeX version. Argh. – A.Ellett Sep 19 '16 at 20:38
  • Take the preamble of that second approach and make the document this: \Huge\centering\sffamily\bfseries\parabtext{1}{.8}{200}{Beyond~~~~~~~~} – Steven B. Segletes Sep 19 '16 at 20:38
  • It runs very, very slow. The abbreviated version above should run a bit faster. Also the "200" parameter is proportional to the run time. To test for compileability, change that from 200 to, for example, 20, for a lo-res version. – Steven B. Segletes Sep 19 '16 at 20:39
  • @StevenB.Segletes I copied the most recent version of pdf-trans to my local directory. So, I can get past the preamble now, but then it complains about \parabtext. Do you know where that is defined? – A.Ellett Sep 19 '16 at 20:43
  • It is defined in the preamble. I will post a [temporary] answer to get you over the hump. – Steven B. Segletes Sep 19 '16 at 20:43

1 Answers1

3

Directly stealing my preamble from Draw Text in different shapes. It can be improved (by a factor of 2 or so) to not spend time cutting up empty space (see below).

To review the parameters of \parabtext, the optional argument of 0 or 1 determines whether the left end is thick (0) or thin (1). To understand the 1st mandatory argument, consider a scale in which the baseline of the first letter is at height 0.0 and the top of the first letter is at height 1.0. This argument, for the current problem, gives the coordinate of the top of the last letter. The 2nd mandatory argument gives the fractional height reduction of the thinnest part of the word. The 3rd argument gives the number of vertical strips into which the word is cut. The last argument is the word/phrase to which to apply the transformation.

\documentclass{article}
\usepackage{ifthen,trimclip,calc,fp,graphicx,xcolor}
\newsavebox\mytext
\newcounter{mycount}
\newlength\clipsize
\newcommand\parabtext[5][0]{%
  \edef\neck{#3}% percent to depress the amplitude
  \def\cuts{#4}% Number of cuts
  \savebox{\mytext}{\kern.2pt#5\kern.2pt}% TEXT
  \FPeval{\myprod}{1/cuts}%
  \clipsize=\myprod\wd\mytext\relax%
  \setcounter{mycount}{0}%
  \whiledo{\value{mycount}<\cuts}{%
    \stepcounter{mycount}%
    \edef\NA{\themycount}%
    \edef\NB{\the\numexpr\cuts-\themycount\relax}%
    \FPeval{\myprod}{\NA*\NB*4/\cuts/\cuts}%
    \ifnum0#1=0\relax%
      \FPeval{\myprod}{1 - \neck*(\myprod)}%
    \else%
      \FPeval{\myprod}{1 - \neck*(1-\myprod)}%
    \fi%
    \clipbox{%
      \value{mycount}\clipsize\relax{} %
      -1pt %
      \wd\mytext-\value{mycount}\clipsize-\clipsize\relax{} %
      -1pt%
    }{\raisebox{#2\dimexpr\ht\mytext-\myprod\ht\mytext}{%
        \scalebox{1}[\myprod]{\usebox{\mytext}}}}%
  }%
}
\begin{document}
\Huge\sffamily\bfseries%
\parabtext{1}{.8}{200}{Beyo‌​nd~~~~~~~~}

\parabtext{2}{.8}{300}{Beyond~~~~~~~~~~}
\end{document}

enter image description here

Here is the version that doesn't spend time cutting up empty space:

\documentclass{article}
\usepackage{ifthen,trimclip,calc,fp,graphicx,xcolor}
\newsavebox\mytext
\newcounter{mycount}
\newlength\clipsize
\newcommand\parabtext[5][0]{%
  \edef\neck{#3}% percent to depress the amplitude
  \def\cuts{#4}% Number of cuts
  \savebox{\mytext}{\kern.2pt#5#5\kern.2pt}% TEXT
  \FPeval{\myprod}{1/cuts}%
  \clipsize=\myprod\wd\mytext\relax%
  \setcounter{mycount}{0}%
  \whiledo{\value{mycount}<\the\numexpr\cuts/2\relax}{%
    \stepcounter{mycount}%
    \edef\NA{\themycount}%
    \edef\NB{\the\numexpr\cuts-\themycount\relax}%
    \FPeval{\myprod}{\NA*\NB*4/\cuts/\cuts}%
    \ifnum0#1=0\relax%
      \FPeval{\myprod}{1 - \neck*(\myprod)}%
    \else%
      \FPeval{\myprod}{1 - \neck*(1-\myprod)}%
    \fi%
    \clipbox{%
      \value{mycount}\clipsize\relax{} %
      -1pt %
      \wd\mytext-\value{mycount}\clipsize-\clipsize\relax{} %
      -1pt%
    }{\raisebox{#2\dimexpr\ht\mytext-\myprod\ht\mytext}{%
        \scalebox{1}[\myprod]{\usebox{\mytext}}}}%
  }%
}
\begin{document}
\Huge\sffamily\bfseries%
\parabtext{1}{.8}{200}{Beyo‌​nd}

\parabtext{1.7}{.7}{300}{Beyond}
\end{document}

enter image description here