shapepar 中自定义“十字”形状的规格

shapepar 中自定义“十字”形状的规格

我正在尝试在十字形内写入一串文本(就像简单的医学十字一样)。我知道可以在shapepar中创建自定义形状,但想知道是否有人已经有规格可以分享。提前致谢。

答案1

按照shapepar说明设计十字形并不太难:

\newcommand\crossshape{ %Attention, coordinate y grows down, x grows right
{6}              %line center at x=6
{0} b{3}\\       %Shapepar starts at coordinate (3,0)
{0} t{3}{6}\\    %Text line at coordinate y=0, starts at x=3 with length 6
{2.9} t{3}{6}\\  %Text line at coordinate y=2.9, starts at x=3 with length 6
{3} t{0}{12}\\   %Text line at coordinate y=3, starts at x=0 with length 12
{8.9} t{0}{12}\\ %Text line at coordinate y=8.9, starts at x=0 with length 12
{9} t{3}{6}\\    %Text line at coordinate y=9, starts at x=3 with length 6
{12} t{3}{6}\\   %Text line at coordinate y=12, starts at x=3 with length 6
{12} e{9} }      %Paragraph ends at coordinate (9,12)

下面的代码展示了两个不同的交叉

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{blindtext}
\usepackage{shapepar}
\usepackage{lmodern}    

\newcommand\crossshape{ {6}
{0} b{3}\\
{0} t{3}{6}\\
{2.9} t{3}{6}\\
{3} t{0}{12}\\
{8.9} t{0}{12}\\
{9} t{3}{6}\\
{12} t{3}{6}\\
{12} e{9} }

\newcommand\anothercrossshape{ {6}
{0} b{5}\\
{0} t{5}{2}\\
{0.9} t{5}{2}\\
{1} t{0}{12}\\
{1.9} t{0}{12}\\
{2} t{5}{2}\\
{12} t{5}{2}\\
{12} e{7} }

\begin{document}

\shapepar{\crossshape} \blindtext

\shapepar{\anothercrossshape} \blindtext

\end{document}

在此处输入图片描述

在此处输入图片描述

相关内容