如何在jupyter笔记本中制作一个代码单元格(通过\ usepackage {})显示乳胶?
我正在编写一个与选区树一起使用的软件包 - 就像在上下文中的语法树中一样,(例如 )。我已经编写了代码生成正确的乳胶表达式以使用QTREE
显示树,例如:
\Tree [.S [.NP [.PN she ] ] [.VP [.V saw ] [.NP [.NP [.Det the ] [.N dog ] ] [.PP [.Prep with ] [.NP [.Det the ] [.N telescope ] ] ] ] ] ]
我正在使用jupyter笔记本进行一些测试和演示,我知道ipython.display
能够在代码单元的输出中显示乳胶 - 但我不知道如何将\ usepackage {qtree}
纳入乳胶 展示。这是可能的,如果是的话,如何?
I'm writing a package that works with constituency trees - as in syntax trees in Context Free Grammar, (like this). I've written code that generates the correct LaTeX expression to display the tree using qtree
, e.g.:
\Tree [.S [.NP [.PN she ] ] [.VP [.V saw ] [.NP [.NP [.Det the ] [.N dog ] ] [.PP [.Prep with ] [.NP [.Det the ] [.N telescope ] ] ] ] ] ]
I'm using a Jupyter Notebook for some testing and demonstration, and I know that IPython.display
is able to display LaTeX in the output of a code cell - but I don't know how to incorporate \usepackage{qtree}
into the LaTeX so the tree will display. Is this possible, and if so, how?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论