首页
学习
活动
专区
圈层
工具
发布

Manim长文
EN

Stack Overflow用户
提问于 2021-04-15 01:05:58
回答 1查看 2.3K关注 0票数 4

在使用马尼姆库的社区版本呈现长篇文本时,我注意到信息呈现在可见窗口之外,效果相当不理想。我怀疑问题的根源在于Latex未能确保文本保持在pdf的范围内。是否有自动包装文本的方法?我不想手动指定换行符,因为文本将不再显示为正确的。

下面是一个很小的例子:

代码语言:javascript
复制
from manim import *


class Edge_Wise(Scene):
    def construct(self):
        text=Tex("\\text{First we conceptualize an undirected graph  ${G}$  as a union of a finite number of line segments residing in  ${\\mathbb{{{C}}}}$ . By taking our earlier parametrization, we can create an almost trivial extension to  ${\\mathbb{{{R}}}}^{{{3}}}$ . In the following notation, we write a bicomplex number of a 2-tuple of complex numbers, the latter of which is multiplied by the constant  ${j}$ .  ${z}_{{0}}\\in{\\mathbb{{{C}}}}_{{>={0}}}$  is an arbitrary point in the upper half plane from which the contour integral begins. The function  ${\\tan{{\\left(\\frac{{{\\theta}-{\\pi}}}{{z}}\\right)}}}:{\\left[{0},{2}{\\pi}\\right)}\\to{\\left[-\\infty,\\infty\\right)}$  ensures that the vertices at  $\\infty$  for the Schwarz-Christoffel transform correspond to points along the branch cut at  ${\\mathbb{{{R}}}}_{{+}}$ .}")
        text.scale(0.6)
        self.play(FadeIn(text))
        self.wait(1)
        self.play(FadeOut(text))
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2021-04-15 07:18:33

您使用的\text环境没有包装。它的目的是将文本格式化为数学模式中的文本,并且当您在$...$之外时不需要它。下面的示例给出了正确的文本:

代码语言:javascript
复制
class SquareToCircle(Scene):
    def construct(self):
        text=Tex("\\justifying {First we conceptualize an undirected graph  ${G}$  as a union of a finite number of line segments residing in  ${\\mathbb{{{C}}}}$ . By taking our earlier parametrization, we can create an almost trivial extension to  ${\\mathbb{{{R}}}}^{{{3}}}$ . In the following notation, we write a bicomplex number of a 2-tuple of complex numbers, the latter of which is multiplied by the constant  ${j}$ .  ${z}_{{0}}\\in{\\mathbb{{{C}}}}_{{>={0}}}$  is an arbitrary point in the upper half plane from which the contour integral begins. The function  ${\\tan{{\\left(\\frac{{{\\theta}-{\\pi}}}{{z}}\\right)}}}:{\\left[{0},{2}{\\pi}\\right)}\\to{\\left[-\\infty,\\infty\\right)}$  ensures that the vertices at  $\\infty$  for the Schwarz-Christoffel transform correspond to points along the branch cut at  ${\\mathbb{{{R}}}}_{{+}}$ .}")
        text.scale(0.6)
        self.play(FadeIn(text))
        self.wait(1)
        self.play(FadeOut(text))

结果:

票数 8
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/67100911

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档