错误 shapepar 使用命令 \circleshape

错误 shapepar 使用命令 \circleshape

看看我的代码:使用\diamondshape它可以工作,但使用\circleshape则不行。哪里出了问题?

\documentclass[a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{shapepar}
\usepackage{lipsum}
\pagestyle{empty}

\begin{document}

\shapepar{\circleshape}
{\lipsum*[1]}

\end{document}

答案1

使用英语而不是拉丁语,或者通过 babel 包使用拉丁语连字符,溢出问题就会消失!

\documentclass[a4paper]{article}
\usepackage[latin]{babel}
\usepackage{lipsum}
\usepackage{shapepar}
\begin{document}
\lipsum[1]

\shapepar[8.5cm]{\circleshape}
\lipsum*[1]
\end{document}

这也将起作用,这肯定指出由于未实现连字而存在某种溢出。

\documentclass[a4paper]{article}
\usepackage[english]{babel}
\usepackage{lipsum}
\usepackage{shapepar}
\begin{document}
\shapepar[8.5cm]{\circleshape}
a an ann anne lo res ar t t \lipsum*[1]
\end{document}

答案2

不确定为什么,但 LaTeX 会抱怨尺寸太大。我猜这与圆的顶端和底端有关。使用与在使用shapepar进行文本换行(在文本之间插入图像),这里是 的新版本,\circleshape称为\mycircleshape。我已将其写入宏,以便您可以使用\mycircle{\lipsum*[1]}

在此处输入图片描述

\documentclass{article}
\usepackage{shapepar}% http://ctan.org/pkg/shapepar
\usepackage{lipsum}% http://ctan.org/pkg/lipsum
\pagestyle{empty}
\newcommand{\mycircle}[1]{\shapepar{\mycircleshape}#1\par}
\def\mycircleshape{%
{25.1393}%
{0.0696379}b{25.1393}\\%
{0.278552}t{21.727}{6.82451}\\%
{0.97493}t{18.3844}{13.5097}\\%
{2.15877}t{15.1811}{19.9164}\\%
{3.69081}t{12.117}{26.0446}\\%
{5.71031}t{9.33148}{31.6156}\\%
{8.00836}t{6.82451}{36.6295}\\%
{10.6546}t{4.66574}{40.9471}\\%
{13.5794}t{2.85515}{44.5682}\\%
{16.7131}t{1.53203}{47.2145}\\%
{20.0557}t{0.626741}{49.0251}\\%
{23.3983}t{0.139276}{50}\\%
{26.8802}t{0.139276}{50}\\%
{30.2228}t{0.626741}{49.0251}\\%
{33.5655}t{1.53203}{47.2145}\\%
{36.6992}t{2.85515}{44.5682}\\%
{39.624}t{4.66574}{40.9471}\\%
{42.2702}t{6.82451}{36.6295}\\%
{44.5682}t{9.33148}{31.6156}\\%
{46.5877}t{12.117}{26.0446}\\%
{48.1198}t{15.1811}{19.9164}\\%
{49.3036}t{18.3844}{13.5097}\\%
{50}t{21.727}{6.82451}\\%
{50.2089}e{25.1393}%
}

\begin{document}
\mycircle{\lipsum*[1]}
\end{document}

答案3

宏有问题\lipsum。它重新定义了\parshapepar中不允许的内容

\documentclass[a4paper]{article}
\usepackage[nopar]{lipsum}
\usepackage{shapepar}
\pagestyle{empty}
\makeatletter
\let\lips@par\endgraf
\makeatother   
\begin{document}

\shapepar[8.5cm]{\circleshape}
\lipsum[1]    

\shapepar[8.5cm]{\circleshape}
\lipsum*[1]

\end{document}

答案4

如果错误是“尺寸过大”或“算术溢出”,则这是偶然发生的。该错误已在shapepar 2.3版(2019年9月)中修复。

相关内容