Jupyter笔记本上每个单元的多个Markdown翻译

问题描述 投票:0回答:1

在jupyter笔记本上是否有本机方式或小部件来设置markdown单元格以创建类似html tabs的内容,因此我可以添加所需的每种语言的文档,而不必创建3种不同的笔记本来增加实验可维护性的复杂性?

能够添加这样的东西就足够了

<!-- Tab links -->
<div class="tab">
  <button class="tablinks" onclick="openCity(event, 'Spanish')">Spanish</button>
  <button class="tablinks" onclick="openCity(event, 'English')">English</button>
  <button class="tablinks" onclick="openCity(event, 'Japanese')">Japanese</button>
</div>

<!-- Tab content -->
<div id="Spanish" class="tabcontent">
  <h3>Spanish Explanation</h3>
  <p>This is an explanation in Spanish</p>
</div>

<div id="English" class="tabcontent">
  <h3>English Explanation</h3>
  <p>This is an explanation in English</p>
</div>

<div id="Japanese" class="tabcontent">
  <h3>Japanese Explanation</h3>
  <p>This is an explanation in Japanese</p>
</div>
html tabs jupyter-notebook jquery-ui-tabs jupyter-contrib-nbextensions
1个回答
0
投票
ipywidgets包含tabs,并且要使其看起来像Markdown单元格,您可以隐藏代码或制作Voila应用程序。有几个扩展名可以做到这一点,例如Hide inputHide input allhide_code。 (前两个是捆绑安装的community-contributed unofficial extensions(jupyter_contrib_nbextensions)的一部分。对Voila的描述是here,其中有一个gallery of examples

[对于一些简单的东西,它可以在笔记本的Markdown单元中正常工作,并且可以很好地呈现笔记本的静态显示效果,因此[collapsible markdown

© www.soinside.com 2019 - 2024. All rights reserved.