24

First of all to apologize for my English.

So, many times when I teach on the board used to include the final result on papyrus (and that likes too students). Just I think that would be a good idea to do it and at my notes.


So my question: How can I get one papyrus inside to have a mathematical relationship or a text. I want to create something maybe whith TikZ that listens to commands

\papyrustrue % on the preamble

\startpapyrus
 $ E = m c^2 $
\stoppapyrus

The \papyrustrue will switch to the papyrus displayed or not (if I comment it out %\papyrustrue). Certainly the mathematical relationship I always want to appear. I mean if I comment out the \papyrustrue not disappear and the relationship but only the papyrus. Rather it should be the papyrus as a layer over the ralationship ( .... that's what I think, maybe this idea is wrong)

At the final result I imagine something like this ( sorry for handmade figure, if I knew how to do it will not ask you, currently the score is: papyrus - karathan = 1 - 0 :-) ) I have seen this

\boxed{}, TikZ and colored equation background

but if on LateX I am relatively new I am ultimately irrelevant on TikZ

enter image description here


I know my question sounds rather do this for me, and I don't feel good for it... but I don't know what else to do...

Of course, I would like to hear your opinion if the idea of the papyrus is something worthwhile.


Here I put the stolen code from jpgfdrew than I use, but certainly that no help very much .

Just think maybe through the jpgfdraw and flowframe that it include maybe to manage something . . . but rather I try in vain without results ... .... never mind I survive without papyrus :-)

the score is: papyrus - karathan = 2 - 0

\documentclass{article}
\usepackage{tikz}

\begin{document}
\begin{pgfpicture}{0bp}{0bp}{420.849709bp}{179.390961bp}
\begin{pgfscope}
\pgfsetlinewidth{1.0bp}
\pgfsetrectcap 
\pgfsetmiterjoin \pgfsetmiterlimit{10.0}
\pgfpathmoveto{\pgfpoint{32.278702bp}{137.07737bp}}
\pgfpathcurveto{\pgfpoint{5.113533bp}{147.962151bp}}{\pgfpoint{26.937674bp}{155.673503bp}}{\pgfpoint{37.413107bp}{145.194173bp}}
\pgfpathcurveto{\pgfpoint{45.642968bp}{139.580246bp}}{\pgfpoint{46.640999bp}{127.003489bp}}{\pgfpoint{34.337142bp}{127.252997bp}}
\pgfpathcurveto{\pgfpoint{0.747145bp}{137.108558bp}}{\pgfpoint{-15.689186bp}{157.100377bp}}{\pgfpoint{34.150011bp}{161.778649bp}}
\pgfpathcurveto{\pgfpoint{103.887462bp}{161.404387bp}}{\pgfpoint{428.247698bp}{121.857389bp}}{\pgfpoint{415.897059bp}{164.398482bp}}
\pgfpathcurveto{\pgfpoint{404.575639bp}{186.604683bp}}{\pgfpoint{351.368085bp}{173.848593bp}}{\pgfpoint{370.704945bp}{159.720209bp}}
\pgfpathcurveto{\pgfpoint{403.140969bp}{148.211659bp}}{\pgfpoint{410.71977bp}{167.236634bp}}{\pgfpoint{387.453161bp}{167.766838bp}}
\color[rgb]{0.0,0.0,0.0}
\pgfusepath{stroke}
\end{pgfscope}
\begin{pgfscope}
\pgfsetlinewidth{1.0bp}
\pgfsetrectcap 
\pgfsetmiterjoin \pgfsetmiterlimit{10.0}
\pgfpathmoveto{\pgfpoint{37.892612bp}{39.289968bp}}
\pgfpathcurveto{\pgfpoint{107.630063bp}{38.915706bp}}{\pgfpoint{431.990299bp}{-1.754077bp}}{\pgfpoint{419.63966bp}{40.787015bp}}
\color[rgb]{0.0,0.0,0.0}
\pgfusepath{stroke}
\end{pgfscope}
\begin{pgfscope}
\pgfsetlinewidth{1.0bp}
\pgfsetrectcap 
\pgfsetmiterjoin \pgfsetmiterlimit{10.0}
\pgfpathmoveto{\pgfpoint{4.343639bp}{143.814082bp}}
\pgfpathcurveto{\pgfpoint{25.92607bp}{73.0786bp}}{\pgfpoint{7.462488bp}{43.387163bp}}{\pgfpoint{2.846592bp}{23.301779bp}}
\pgfpathcurveto{\pgfpoint{15.44674bp}{3.216395bp}}{\pgfpoint{48.631287bp}{-3.146055bp}}{\pgfpoint{42.144082bp}{12.448187bp}}
\pgfpathcurveto{\pgfpoint{39.898511bp}{59.729929bp}}{\pgfpoint{31.914259bp}{104.391838bp}}{\pgfpoint{41.76982bp}{128.469348bp}}
\pgfpathcurveto{\pgfpoint{35.532123bp}{127.097055bp}}{\pgfpoint{19.064604bp}{128.344594bp}}{\pgfpoint{4.343639bp}{143.814082bp}}
\pgfclosepath
\color[rgb]{1.0,1.0,1.0}\pgfseteorule\pgfusepath{fill}
\pgfpathmoveto{\pgfpoint{4.343639bp}{143.814082bp}}
\pgfpathcurveto{\pgfpoint{25.92607bp}{73.0786bp}}{\pgfpoint{7.462488bp}{43.387163bp}}{\pgfpoint{2.846592bp}{23.301779bp}}
\pgfpathcurveto{\pgfpoint{15.44674bp}{3.216395bp}}{\pgfpoint{48.631287bp}{-3.146055bp}}{\pgfpoint{42.144082bp}{12.448187bp}}
\pgfpathcurveto{\pgfpoint{39.898511bp}{59.729929bp}}{\pgfpoint{31.914259bp}{104.391838bp}}{\pgfpoint{41.76982bp}{128.469348bp}}
\pgfpathcurveto{\pgfpoint{35.532123bp}{127.097055bp}}{\pgfpoint{19.064604bp}{128.344594bp}}{\pgfpoint{4.343639bp}{143.814082bp}}
\pgfclosepath
\color[rgb]{0.0,0.0,0.0}
\pgfusepath{stroke}
\end{pgfscope}
\begin{pgfscope}
\pgfsetlinewidth{1.0bp}
\pgfsetrectcap 
\pgfsetmiterjoin \pgfsetmiterlimit{10.0}
\pgfpathmoveto{\pgfpoint{20.156201bp}{144.469041bp}}
\pgfpathcurveto{\pgfpoint{22.744845bp}{140.071464bp}}{\pgfpoint{21.372552bp}{136.4536bp}}{\pgfpoint{20.343332bp}{132.679793bp}}
\pgfpathcurveto{\pgfpoint{27.17361bp}{129.280249bp}}{\pgfpoint{31.446432bp}{128.812421bp}}{\pgfpoint{33.255364bp}{128.84361bp}}
\pgfpathcurveto{\pgfpoint{32.10139bp}{132.461474bp}}{\pgfpoint{32.475652bp}{134.675856bp}}{\pgfpoint{32.787537bp}{137.264501bp}}
\pgfpathcurveto{\pgfpoint{30.198893bp}{138.075401bp}}{\pgfpoint{25.489431bp}{139.073433bp}}{\pgfpoint{20.156201bp}{144.469041bp}}
\pgfclosepath
\color[rgb]{1.0,1.0,1.0}\pgfseteorule\pgfusepath{fill}
\pgfpathmoveto{\pgfpoint{20.156201bp}{144.469041bp}}
\pgfpathcurveto{\pgfpoint{22.744845bp}{140.071464bp}}{\pgfpoint{21.372552bp}{136.4536bp}}{\pgfpoint{20.343332bp}{132.679793bp}}
\pgfpathcurveto{\pgfpoint{27.17361bp}{129.280249bp}}{\pgfpoint{31.446432bp}{128.812421bp}}{\pgfpoint{33.255364bp}{128.84361bp}}
\pgfpathcurveto{\pgfpoint{32.10139bp}{132.461474bp}}{\pgfpoint{32.475652bp}{134.675856bp}}{\pgfpoint{32.787537bp}{137.264501bp}}
\pgfpathcurveto{\pgfpoint{30.198893bp}{138.075401bp}}{\pgfpoint{25.489431bp}{139.073433bp}}{\pgfpoint{20.156201bp}{144.469041bp}}
\pgfclosepath
\color[rgb]{0.0,0.0,0.0}
\pgfusepath{stroke}
\end{pgfscope}
\begin{pgfscope}
\pgfsetlinewidth{1.0bp}
\pgfsetrectcap 
\pgfsetmiterjoin \pgfsetmiterlimit{10.0}
\pgfpathmoveto{\pgfpoint{416.499459bp}{161.030126bp}}
\pgfpathcurveto{\pgfpoint{418.994537bp}{145.934899bp}}{\pgfpoint{391.829368bp}{77.694496bp}}{\pgfpoint{420.148511bp}{40.892084bp}}
\color[rgb]{0.0,0.0,0.0}
\pgfusepath{stroke}
\end{pgfscope}
\begin{pgfscope}
\pgfsetlinewidth{1.0bp}
\pgfsetrectcap 
\pgfsetmiterjoin \pgfsetmiterlimit{10.0}
\pgfpathmoveto{\pgfpoint{366.25481bp}{165.147006bp}}
\pgfpathcurveto{\pgfpoint{370.621198bp}{159.034063bp}}{\pgfpoint{372.367753bp}{151.424073bp}}{\pgfpoint{368.126119bp}{145.685391bp}}
\color[rgb]{0.0,0.0,0.0}
\pgfusepath{stroke}
\end{pgfscope}
\begin{pgfscope}
\pgfsetlinewidth{1.0bp}
\pgfsetrectcap 
\pgfsetmiterjoin \pgfsetmiterlimit{10.0}
\pgfpathmoveto{\pgfpoint{387.026341bp}{167.673273bp}}
\pgfpathcurveto{\pgfpoint{389.864493bp}{163.805901bp}}{\pgfpoint{389.802116bp}{159.751398bp}}{\pgfpoint{387.961995bp}{156.164722bp}}
\color[rgb]{0.0,0.0,0.0}
\pgfusepath{stroke}
\end{pgfscope}
\begin{pgfscope}
\pgfsetlinewidth{1.0bp}
\pgfsetrectcap 
\pgfsetmiterjoin \pgfsetmiterlimit{10.0}
\pgfpathmoveto{\pgfpoint{399.714409bp}{150.471577bp}}
\pgfpathcurveto{\pgfpoint{396.876257bp}{154.338949bp}}{\pgfpoint{398.997074bp}{157.364232bp}}{\pgfpoint{400.837194bp}{160.950908bp}}
\color[rgb]{0.0,0.0,0.0}
\pgfusepath{stroke}
\end{pgfscope}
\begin{pgfscope}
\pgftransformcm{1.0}{0.0}{0.0}{1.0}{\pgfpoint{148.434436bp}{90.668905bp}}
\pgftext[left,base]{\sffamily\mdseries\upshape\normalsize
\color[rgb]{0.0,0.0,0.0}$E = m c^2$}
\end{pgfscope}
\end{pgfpicture}
\end{document}

the output from jpgfdraw

Eventually realize that what I ask is far more complex than I imagined

I realize why some of you ( gurus in TeX-TikZ) maybe you haven't responded to my question. Without much comment in following figure...problems of overlap has begining.......

(The figure isn't through code, but with editing in Gimp)

enter image description here

...addition 1 ...after the response of @PeterGrill

I show here some figures with a scale corresponding to both x-y, scale-x, scale-y (factor=2).

Here I have posted the jpgfdraw file which I use to experiment https://docs.google.com/open?id=0BxaG1GVbo3S5ZkJDbmMwYlROTUk

enter image description here

I think the red lines must somehow remain stable. And black points to make connections with curves that vary

enter image description here


... addition 2

At the moment I am trying to create the red curves through TikZ as shown in handmade figure but my skills in the TikZ does not help me. (I think maybe something good will come out from this ...maybe not) ...

I think the solution will not come out of one single piece of code but rather will be piece by piece...obviously you probably have some better ideas, I would really like to hear those, really I have stuck

karathan
  • 2,138
  • 2
  • 17
  • 32
  • 1
    You are using ConTeXt? It seems so from your question, but it is not clear at all... – yo' Nov 05 '12 at 12:03
  • 1
    @tohecz No, I use Latex and I compiling with xelatex – karathan Nov 05 '12 at 13:50
  • I think it's Papyrus 1 - 1 Karathan. You can scale down the papyrus and make the text optional. Would that be enough? – percusse Nov 05 '12 at 14:34
  • 1
    @percusse Yes this is true but I was thinking something like this http://tex.stackexchange.com/questions/75129/boxed-tikz-and-colored-equation-background but on papyrus – karathan Nov 05 '12 at 14:40

3 Answers3

15

Well, here is a start. I am not too happy about how I computed the scaling factors, but should get you started until someone comes up with a better solution:

enter image description here

Code:

\documentclass{article}
\usepackage{graphicx}
\usepackage{tikz}

\newcommand{\XScale}{1.0}% \newcommand{\YScale}{1.0}%

\makeatletter \let\OldPgfpoint\pgfpoint \renewcommand{\pgfpoint}[2]{% \pgfmathsetlength{\pgf@x}{\XScale#1}% \pgfmathsetlength{\pgf@y}{\YScale#2}% }% \makeatother

\newlength{\NormalHeight} \newlength{\NormalWidth}

\settoheight{\NormalHeight}{$\mathstrut$} \settowidth{\NormalWidth}{$E = mc^2$} \newcommand{\Papyrus}[1]{% \pgfmathsetmacro{\XScale}{0.20\widthof{#1}/\NormalWidth} \pgfmathsetmacro{\YScale}{0.20*\heightof{#1}/\NormalHeight} \begin{pgfpicture}{0bp}{0bp}{420.849709bp}{179.390961bp} \begin{pgfscope} \pgfsetlinewidth{1.0bp} \pgfsetrectcap \pgfsetmiterjoin \pgfsetmiterlimit{10.0} \pgfpathmoveto{\pgfpoint{32.278702bp}{137.07737bp}} \pgfpathcurveto{\pgfpoint{5.113533bp}{147.962151bp}}{\pgfpoint{26.937674bp}{155.673503bp}}{\pgfpoint{37.413107bp}{145.194173bp}} \pgfpathcurveto{\pgfpoint{45.642968bp}{139.580246bp}}{\pgfpoint{46.640999bp}{127.003489bp}}{\pgfpoint{34.337142bp}{127.252997bp}} \pgfpathcurveto{\pgfpoint{0.747145bp}{137.108558bp}}{\pgfpoint{-15.689186bp}{157.100377bp}}{\pgfpoint{34.150011bp}{161.778649bp}} \pgfpathcurveto{\pgfpoint{103.887462bp}{161.404387bp}}{\pgfpoint{428.247698bp}{121.857389bp}}{\pgfpoint{415.897059bp}{164.398482bp}} \pgfpathcurveto{\pgfpoint{404.575639bp}{186.604683bp}}{\pgfpoint{351.368085bp}{173.848593bp}}{\pgfpoint{370.704945bp}{159.720209bp}} \pgfpathcurveto{\pgfpoint{403.140969bp}{148.211659bp}}{\pgfpoint{410.71977bp}{167.236634bp}}{\pgfpoint{387.453161bp}{167.766838bp}} \color[rgb]{0.0,0.0,0.0} \pgfusepath{stroke} \end{pgfscope} \begin{pgfscope} \pgfsetlinewidth{1.0bp} \pgfsetrectcap \pgfsetmiterjoin \pgfsetmiterlimit{10.0} \pgfpathmoveto{\pgfpoint{37.892612bp}{39.289968bp}} \pgfpathcurveto{\pgfpoint{107.630063bp}{38.915706bp}}{\pgfpoint{431.990299bp}{-1.754077bp}}{\pgfpoint{419.63966bp}{40.787015bp}} \color[rgb]{0.0,0.0,0.0} \pgfusepath{stroke} \end{pgfscope} \begin{pgfscope} \pgfsetlinewidth{1.0bp} \pgfsetrectcap \pgfsetmiterjoin \pgfsetmiterlimit{10.0} \pgfpathmoveto{\pgfpoint{4.343639bp}{143.814082bp}} \pgfpathcurveto{\pgfpoint{25.92607bp}{73.0786bp}}{\pgfpoint{7.462488bp}{43.387163bp}}{\pgfpoint{2.846592bp}{23.301779bp}} \pgfpathcurveto{\pgfpoint{15.44674bp}{3.216395bp}}{\pgfpoint{48.631287bp}{-3.146055bp}}{\pgfpoint{42.144082bp}{12.448187bp}} \pgfpathcurveto{\pgfpoint{39.898511bp}{59.729929bp}}{\pgfpoint{31.914259bp}{104.391838bp}}{\pgfpoint{41.76982bp}{128.469348bp}} \pgfpathcurveto{\pgfpoint{35.532123bp}{127.097055bp}}{\pgfpoint{19.064604bp}{128.344594bp}}{\pgfpoint{4.343639bp}{143.814082bp}} \pgfclosepath \color[rgb]{1.0,1.0,1.0}\pgfseteorule\pgfusepath{fill} \pgfpathmoveto{\pgfpoint{4.343639bp}{143.814082bp}} \pgfpathcurveto{\pgfpoint{25.92607bp}{73.0786bp}}{\pgfpoint{7.462488bp}{43.387163bp}}{\pgfpoint{2.846592bp}{23.301779bp}} \pgfpathcurveto{\pgfpoint{15.44674bp}{3.216395bp}}{\pgfpoint{48.631287bp}{-3.146055bp}}{\pgfpoint{42.144082bp}{12.448187bp}} \pgfpathcurveto{\pgfpoint{39.898511bp}{59.729929bp}}{\pgfpoint{31.914259bp}{104.391838bp}}{\pgfpoint{41.76982bp}{128.469348bp}} \pgfpathcurveto{\pgfpoint{35.532123bp}{127.097055bp}}{\pgfpoint{19.064604bp}{128.344594bp}}{\pgfpoint{4.343639bp}{143.814082bp}} \pgfclosepath \color[rgb]{0.0,0.0,0.0} \pgfusepath{stroke} \end{pgfscope} \begin{pgfscope} \pgfsetlinewidth{1.0bp} \pgfsetrectcap \pgfsetmiterjoin \pgfsetmiterlimit{10.0} \pgfpathmoveto{\pgfpoint{20.156201bp}{144.469041bp}} \pgfpathcurveto{\pgfpoint{22.744845bp}{140.071464bp}}{\pgfpoint{21.372552bp}{136.4536bp}}{\pgfpoint{20.343332bp}{132.679793bp}} \pgfpathcurveto{\pgfpoint{27.17361bp}{129.280249bp}}{\pgfpoint{31.446432bp}{128.812421bp}}{\pgfpoint{33.255364bp}{128.84361bp}} \pgfpathcurveto{\pgfpoint{32.10139bp}{132.461474bp}}{\pgfpoint{32.475652bp}{134.675856bp}}{\pgfpoint{32.787537bp}{137.264501bp}} \pgfpathcurveto{\pgfpoint{30.198893bp}{138.075401bp}}{\pgfpoint{25.489431bp}{139.073433bp}}{\pgfpoint{20.156201bp}{144.469041bp}} \pgfclosepath \color[rgb]{1.0,1.0,1.0}\pgfseteorule\pgfusepath{fill} \pgfpathmoveto{\pgfpoint{20.156201bp}{144.469041bp}} \pgfpathcurveto{\pgfpoint{22.744845bp}{140.071464bp}}{\pgfpoint{21.372552bp}{136.4536bp}}{\pgfpoint{20.343332bp}{132.679793bp}} \pgfpathcurveto{\pgfpoint{27.17361bp}{129.280249bp}}{\pgfpoint{31.446432bp}{128.812421bp}}{\pgfpoint{33.255364bp}{128.84361bp}} \pgfpathcurveto{\pgfpoint{32.10139bp}{132.461474bp}}{\pgfpoint{32.475652bp}{134.675856bp}}{\pgfpoint{32.787537bp}{137.264501bp}} \pgfpathcurveto{\pgfpoint{30.198893bp}{138.075401bp}}{\pgfpoint{25.489431bp}{139.073433bp}}{\pgfpoint{20.156201bp}{144.469041bp}} \pgfclosepath \color[rgb]{0.0,0.0,0.0} \pgfusepath{stroke} \end{pgfscope} \begin{pgfscope} \pgfsetlinewidth{1.0bp} \pgfsetrectcap \pgfsetmiterjoin \pgfsetmiterlimit{10.0} \pgfpathmoveto{\pgfpoint{416.499459bp}{161.030126bp}} \pgfpathcurveto{\pgfpoint{418.994537bp}{145.934899bp}}{\pgfpoint{391.829368bp}{77.694496bp}}{\pgfpoint{420.148511bp}{40.892084bp}} \color[rgb]{0.0,0.0,0.0} \pgfusepath{stroke} \end{pgfscope} \begin{pgfscope} \pgfsetlinewidth{1.0bp} \pgfsetrectcap \pgfsetmiterjoin \pgfsetmiterlimit{10.0} \pgfpathmoveto{\pgfpoint{366.25481bp}{165.147006bp}} \pgfpathcurveto{\pgfpoint{370.621198bp}{159.034063bp}}{\pgfpoint{372.367753bp}{151.424073bp}}{\pgfpoint{368.126119bp}{145.685391bp}} \color[rgb]{0.0,0.0,0.0} \pgfusepath{stroke} \end{pgfscope} \begin{pgfscope} \pgfsetlinewidth{1.0bp} \pgfsetrectcap \pgfsetmiterjoin \pgfsetmiterlimit{10.0} \pgfpathmoveto{\pgfpoint{387.026341bp}{167.673273bp}} \pgfpathcurveto{\pgfpoint{389.864493bp}{163.805901bp}}{\pgfpoint{389.802116bp}{159.751398bp}}{\pgfpoint{387.961995bp}{156.164722bp}} \color[rgb]{0.0,0.0,0.0} \pgfusepath{stroke} \end{pgfscope} \begin{pgfscope} \pgfsetlinewidth{1.0bp} \pgfsetrectcap \pgfsetmiterjoin \pgfsetmiterlimit{10.0} \pgfpathmoveto{\pgfpoint{399.714409bp}{150.471577bp}} \pgfpathcurveto{\pgfpoint{396.876257bp}{154.338949bp}}{\pgfpoint{398.997074bp}{157.364232bp}}{\pgfpoint{400.837194bp}{160.950908bp}} \color[rgb]{0.0,0.0,0.0} \pgfusepath{stroke} \end{pgfscope} \begin{pgfscope} \pgftransformcm{1.0}{0.0}{0.0}{1.0}{\pgfpoint{148.434436bp}{90.668905bp}} \pgftext[left,base]{\sffamily\mdseries\upshape\normalsize \color[rgb]{0.0,0.0,0.0}#1} \end{pgfscope} \end{pgfpicture}% }

\begin{document} \Papyrus{$E' = mc + m c^2 + m c^3$} \Papyrus{$\displaystyle\frac{\displaystyle\sum_{n=1}^{\infty} = f(n)}{\displaystyle\sum_{n=1}^{\infty} = g(n)}$} \end{document}

Peter Grill
  • 223,288
  • Thanks for the response , ...the first problems began to appear. However you skipped ahead one step :-) – karathan Nov 07 '12 at 09:55
  • @karathan: Huh? Skipped ahead one step? – Peter Grill Nov 07 '12 at 09:58
  • oh I used a wrong expression? .... my English not help me ... I apologize for this – karathan Nov 07 '12 at 10:10
  • @karathan: No problem. I thought that perhaps you saw a problem with this answer. – Peter Grill Nov 07 '12 at 10:13
  • the only certainty is that I will write error and other expressions ... my fault and google's translator... :-) .....the set of commands that you gave I definitely could not do it ..... and though the dodge will allow me here to say "thank you" :-) – karathan Nov 07 '12 at 10:20
  • Curving the text along the surface of the papyrus would probably be too difficult, but I wonder if the papyrus and text could be shaded to give some semblance of that 3D effect? – Chris Chudzicki Oct 22 '16 at 14:12
4

I stumbled over this thread in search of an old fashioned role of paper layout block that could dynamically wrap a paragraph. I didn't find anything, so I coded a simple one myself. For everyone getting here and also is interested in something like that, here is my quick solution:

% Papyrus paper style frame border
% Author: Fabian Ostermann (github.com/OysterSandwich)
\documentclass[a4paper,12pt]{article}
\usepackage{lipsum} % for dummy text
\usepackage{tikz}
\usetikzlibrary{calc}

% Define background layer \pgfdeclarelayer{background} \pgfsetlayers{background,main}

\tikzset{ % Add more line modifications here: papyrus line/.style={ line width=1pt } }

%Usage: \drawRole{<anchor>}{<direction>}{<sizeFactor>} \def\drawRole#1#2#3{% \begin{scope}[yscale=#2,scale=0.6*#3] % Draw role on the left \draw[papyrus line] (A.#1 west) .. controls +(0,1) and +(0,1) .. +(-1,0) .. controls +(0,-1) and +(0,-1) .. +(-.2,0) .. controls +(0,.7) and +(0,.7) .. +(-.8,0) .. controls +(0,-.5) and +(0,-.5) .. +(-.5,0) -- +(-.2,0); \draw[papyrus line] (A.#1 west) +(-.6,-.75) -- +(0,-.75); \draw[papyrus line] (A.#1 west) +(-.65,-.375) -- +(-.25,-.375);

    % Draw right corner and vertical line
    \draw[papyrus line] (A.#1 east) .. controls +(0,.7) and +(.4,0) .. +(-.5,0.751) -- ($(A.#1 west)+(-.5,.751)$);
\end{scope}

}

%Usage: \papyrus[<scale of decoration>]{<content>} \newcommand\papyrus[2][1]{% \tikz{ \node[inner xsep=1em, inner ysep=0.5em] (A) {#2}; % Draw the text of the node \begin{pgfonlayer}{background} % Draw the shape behind

            \drawRole{north}{1}{#1}
            \drawRole{south}{-1}{#1}

            %\draw ([papyrus line] A.north west) -- (A.north east);
            \draw[papyrus line] (A.north east) -- (A.south east);
            %\draw[papyrus line] (A.south east) -- (A.south west);
            \draw[papyrus line] (A.south west) -- (A.north west);
            %\fill[white]   (A.north west) -- (A.north east) -- (A.south east) -- (A.south west) -- (A.north west);
    \end{pgfonlayer}}

}

\begin{document} \begin{center} \papyrus{ \parbox{.9\textwidth}{\lipsum[8]} } \papyrus{ \parbox{.6\textwidth}{\lipsum[5]} } \papyrus[.6]{ Short text } \end{center} \end{document}

Output:

enter image description here

Also, my thanks to Jose Luis Diaz for the Torn Paper example which made a good starting point.

1
  1. 1- open inkscape program.

    2- draw your design + your formula.

    3- export as tex.

    4- include tex file in the main document.

regards

draco
  • 11
  • 1
    you can instead code your presentation in assembler language. That would have equal convenience for a moderate length document – percusse Oct 22 '16 at 13:36