Hide multiple cells in Jupyter Lab when an other cell is executed to create bilingual notebooks

Issue

This Content is from Stack Overflow. Question asked by virgilus

I want to create bilingual notebooks. Some markdown cells are written in French, others in English and the cells code are all the same.

Is there a simple way to hide/display all cells written in English and hide/display those in French ?

I thought about writing something using magic command %%html in order to display or hide cells based on condition – like if the cells start with a special tag “” and “” for example. But I can’t figure out how to do this.

%%html
<style>

# ??????????

</style>
</html>

Any idea would be highly appreciated! 🙂



Solution

This question is not yet answered, be the first one who answer using the comment. Later the confirmed answer will be published as the solution.

This Question and Answer are collected from stackoverflow and tested by JTuto community, is licensed under the terms of CC BY-SA 2.5. - CC BY-SA 3.0. - CC BY-SA 4.0.

people found this article helpful. What about you?