-
Notifications
You must be signed in to change notification settings - Fork 567
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't turn off scroll bar on the slides #152
Comments
I have had similar scrollbars on the vertical axis show up on slides where I have a top-level section in Markdown only (i.e., |
@brettcannon This is now fixed in #38, with fix released in nbconvert 4.1.0. The fix is just a css patch though. |
The scrollbars occur if and only if I use IPython.display and Math to display latex formula, e.g., the following cell will produce the vertical scrollbar: from IPython.display import display, HTML, Math hope this helps |
Thanks, will take a look... |
@damianavila any further thoughts? |
This is probably again because css conficts with mathjax and reveal... need to test it with current master, please keep it open until I research a little bit more... |
In case more examples help, i'm having similar issues with scroll bars: My preference would be to shrink all titles, dataframes, and charts so scroll bars get removed (like the .png images) Related issues: And Damian: thank you again for your contribution to another great package |
With Bokeh we have another layer of possible conflict with css... I am almost 100% sure by now that we need to remove scrollbars by default and only provide the option to enabling them by user request... it should be an special case. |
I actually like the scrollbars, at least for slides with content that would otherwise be invisible beyond the bottom of the slide. As long as there is documentation that makes clear how to turn this on, it would be fine to have the default be off. |
My use case for scroll bars = 'off' is to allow printing to hardcopy or pdf. |
@bs1234 - yes, that would be perfect! |
A flag to turn off all scroll bar would be great, when can we have it?
|
+1 |
See my comment here: #78 (comment). |
Scroll situation should be better now than #600 was merged. |
I'm upgrading some of my ipython notebooks and lecture slides for a class I'm teaching, from an older version of ipython (i think it is version 2.3) to jupyter and nbconvert version 4.0.0, i have noticed the scrollbars started to appear in the resulting slides.html after the upgrade. I have never seen these scrollbars when I was using the nbconvert that came with the older ipython.
I cannot get rid of these scrollbars by adding following to the custom.css:
I used the following command to create the .slides.html:
ipython nbconvert --to slides --template ./scrollbar.tpl --reveal-prefix "//cdn.jsdelivr.net/reveal.js/2.6.2" scrollbar.ipynb
The following is the screenshot of the resulting scrollbar:
Please let me know if I'm doing anything wrong, and how can i get rid of these scrollbars.
the following is a sample of my ipynb that produces the scrollbars: scrollbar.ipynb:
{$x_1$ terms using the first row, this operation is a linear transformation:\n"
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false,
"slideshow": {
"slide_type": "skip"
}
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Populating the interactive namespace from numpy and matplotlib\n"
]
}
],
"source": [
"%pylab inline\n",
"\n",
"import fmt\n",
"import sympy as sp\n",
"from IPython.display import display, HTML, Math\n",
"\n",
"sp.init_printing(use_latex = True)"
]
},
{
"cell_type": "markdown",
"metadata": {
"slideshow": {
"slide_type": "subslide"
}
},
"source": [
"## Gaussian elimination\n",
"\n",
"Eliminate the
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/latex": [
"$$ L_{1} \left(\begin{matrix}2 & 1 & -1\-6 & -2 & 4\-2 & 1 & 2\end{matrix}\right)\left(\begin{matrix}x_{1}\x_{2}\x_{3}\end{matrix}\right)=L_{1} \left(\begin{matrix}8\-22\-3\end{matrix}\right);,;;\left(\begin{matrix}2 & 1 & -1\0 & 1 & 1\0 & 2 & 1\end{matrix}\right)\left(\begin{matrix}x_{1}\x_{2}\x_{3}\end{matrix}\right)=\left(\begin{matrix}8\2\5\end{matrix}\right)$$"
],
"text/plain": [
"<IPython.core.display.Math object>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"a = sp.Matrix([[2, 1, -1], [-6, -2, 4], [-2, 1, 2]])\n",
"y = sp.Matrix([8, -22, -3])\n",
"X = sp.MatrixSymbol('x', 3, 1)\n",
"x1, x2, x3 = sp.symbols('x_1, x_2, x_3')\n",
"x = sp.Matrix([x1, x2, x3])\n",
"\n",
"A = sp.MatrixSymbol('A', 3, 3)\n",
"L1 = sp.MatrixSymbol('L_1', 3, 3)\n",
"L2 = sp.MatrixSymbol('L_2', 3, 3)\n",
"l1 = sp.eye(3)\n",
"l1[1, 0] = -a[1, 0]/a[0, 0]\n",
"l1[2, 0] = -a[2, 0]/a[0, 0]\n",
"\n",
"fmt.displayMath(L1_a, fmt.joinMath('=', x, L1_y), ";,;;", l1_a, fmt.joinMath('=', x, l1_y), sep="")"
]
}
],
"metadata": {
"celltoolbar": "Slideshow",
"kernelspec": {
"display_name": "Python 2",
"language": "python",
"name": "python2"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.6"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
and the following is my scrollbar.tpl:
{%- extends 'slides_reveal.tpl' -%}
{% block input_group -%}
{% endblock input_group %}
{% block body %}
{{ super() }}
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> <style type="text/css"> //div.output_wrapper { // margin-top: 0px; //} .input_hidden { display: none; // margin-top: 5px; } </style> <script src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML"></script>{% endblock body %}
The text was updated successfully, but these errors were encountered: