使用 TikZ 在纸莎草纸上绘制方程式

使用 TikZ 在纸莎草纸上绘制方程式

首先我对我的英语水平表示抱歉。

因此,很多时候,当我在黑板上授课时,我会把最终结果写在纸莎草纸上(学生也喜欢这样)。我认为这样做并记在笔记里是个好主意。


我的问题是: 我怎样才能将一张纸莎草纸放入其中以建立数学关系或文本。我想创建一些东西,也许使用 TikZ 来听取命令

\papyrustrue % on the preamble

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

是否\papyrustrue显示纸莎草纸(如果我注释掉它 %\papyrustrue)。当然,我一直希望数学关系能够出现。我的意思是,如果我注释掉它,\papyrustrue关系不会消失,只有纸莎草纸。相反,它应该是纸莎草纸作为关系的一层(……这就是我的想法,也许这个想法是错误的)

在最终的结果是,我想象的是这样的(抱歉,手工制作的人物,如果我知道怎么做就不会问你了,目前的得分是:纸莎草纸 - karathan = 1 - 0 :-))我已经看到了

\boxed{}、TikZ 和彩色方程背景

但如果我在 LateX 上还比较新,那么我最终在 TikZ 上就无关紧要了

在此处输入图片描述


我知道我的问题听起来更像是为我做这件事,而且我感觉不太好......但我不知道还能做什么......

当然,如果纸莎草纸的想法有价值的话,我很想听听你的意见。


这里我放上了从 jpgfdrew 偷来的代码,供大家使用,但肯定没什么帮助。

只是想想也许通过 jpgfdraw 和 flowframe 它包括也许可以管理一些东西。。。但我徒劳地尝试而没有结果......没关系我没有纸莎草纸也能生存:-)

得分为: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}

jpgfdraw 的输出

最终意识到我问的问题比我想象的要复杂得多

我意识到为什么你们中的一些人(TeX-TikZ 方面的专家)可能没有回答我的问题。下图中没有太多评论...重叠问题已经开始了......

(该图不是通过代码生成的,而是在 Gimp 中编辑的)

在此处输入图片描述

...加法 1...在@PeterGrill 的回复之后

我在这里展示了一些具有与 xy、比例-x、比例-y(因子=2)相对应的比例的图形。

这里我发布了我用来实验的 jpgfdraw 文件 https://docs.google.com/open?id=0BxaG1GVbo3S5ZkJDbmMwYlROTUk

在此处输入图片描述

我认为红线必须保持稳定。黑点与变化的曲线连接起来

在此处输入图片描述


...加法 2

目前,我正尝试通过 TikZ 创建手工图中所示的红色曲线,但我在 TikZ 方面的技能对我没有帮助。(我认为这也许会带来一些好处……也许不会)...

我认为解决方案不会来自一段代码,而会一点一点地出现……显然你可能有更好的想法,我真的很想听听,我真的坚持了

答案1

好吧,这是一个开始。我对计算比例因子的方式不太满意,但应该可以让你开始,直到有人想出更好的解决方案:

在此处输入图片描述

代码:

\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}

答案2

我在寻找一种可以动态换行段落的老式纸张布局块角色时偶然发现了这个帖子。我没有找到任何东西,所以我自己编写了一个简单的代码。对于每个来到这里并且对类似的东西感兴趣的人,这是我的快速解决方案:

% 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}

输出:

在此处输入图片描述

此外,我还要感谢 Jose Luis Diaz撕纸示例这是一个很好的起点。

答案3

  1. 1-打开 inkscape 程序。

    2-绘制您的设计+您的公式。

    3-以 tex 格式导出。

    4- 在主文档中包含 tex 文件。

问候

相关内容