Skip to content

Commit 3e27a64

Browse files
committed
2 parents 51ed7b0 + 0a8f0a8 commit 3e27a64

File tree

17 files changed

+89
-39
lines changed

17 files changed

+89
-39
lines changed

.travis.yml

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ matrix:
3838
env: TOXENV=condarecipe
3939
# linux, various python and notebook versions
4040
- os: linux
41-
python: '3.4'
41+
python: '2.7'
4242
env: TOXENV=py27-notebook
4343
- os: linux
4444
python: '3.3'
@@ -67,15 +67,6 @@ matrix:
6767
- os: linux
6868
python: '3.6'
6969
env: TOXENV=py36-notebook
70-
# OSX tests, python 2 & 3
71-
# Use generic language on osx, get python via terryfy during before_install
72-
- os: osx
73-
language: generic
74-
env: OSX_PYTHON=2.7 TOXENV=py27-notebook
75-
- os: osx
76-
language: generic
77-
env: OSX_PYTHON=3.5 TOXENV=py35-notebook
78-
# finally, appveyor downloads from windows platform
7970
- os: linux
8071
python: '3.4'
8172
env: TOXENV=appveyorartifacts
@@ -91,19 +82,6 @@ before_install:
9182
- uname -a
9283
- id -un
9384
- id -Gn
94-
# install python on osx
95-
- 'if [[ ${OSX_PYTHON} ]]; then curl https://raw.githubusercontent.com/MacPython/terryfy/12a4641c4e922eb4a63c82732df8d0c5045430af/travis_tools.sh > travis_tools.sh; fi'
96-
- 'if [[ ${OSX_PYTHON} ]]; then source travis_tools.sh; fi'
97-
- 'if [[ ${OSX_PYTHON} ]]; then get_python_environment macpython $OSX_PYTHON venv; fi'
98-
# install 3.4 as it's the default for tox environments like clean, check
99-
- 'if [[ ${OSX_PYTHON} ]] && [[ ${OSX_PYTHON} != "3.4" ]]; then install_macpython 3.4; fi'
100-
# check which python installs are present/active
101-
- 'if [[ ${OSX_PYTHON} ]]; then echo "$PYTHON_EXE"; fi;'
102-
- 'if [[ ${OSX_PYTHON} ]]; then if [[ $(which python ) ]]; then ls -l $(which python ); else echo "missing"; fi; fi'
103-
- 'if [[ ${OSX_PYTHON} ]]; then if [[ $(which python2.7) ]]; then ls -l $(which python2.7); else echo "missing"; fi; fi'
104-
- 'if [[ ${OSX_PYTHON} ]]; then if [[ $(which python3.3) ]]; then ls -l $(which python3.3); else echo "missing"; fi; fi'
105-
- 'if [[ ${OSX_PYTHON} ]]; then if [[ $(which python3.4) ]]; then ls -l $(which python3.4); else echo "missing"; fi; fi'
106-
- 'if [[ ${OSX_PYTHON} ]]; then if [[ $(which python3.5) ]]; then ls -l $(which python3.5); else echo "missing"; fi; fi'
10785
# stuff for conda recipe
10886
- 'if [[ ${TOXENV} == "condarecipe" ]]; then wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh; fi'
10987
- 'if [[ ${TOXENV} == "condarecipe" ]]; then bash miniconda.sh -b -p $HOME/miniconda; fi'

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ New features and bugfixes:
3434
- Add preprocessor to embed images into a notebook
3535
[#1067](https://github.com/ipython-contrib/jupyter_contrib_nbextensions/pull/1067)
3636
[@juhasch](https://github.com/juhasch)
37+
- Fixed conflicts in collapsible_headings if keys are rebound.
38+
[@rhilenova](https://github.com/rhilenova)
3739

3840

3941
0.4.0

docs/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
import os
1212

1313
from jupyter_contrib_core.testing_utils import get_logger
14-
from recommonmark.transform import AutoStructify
1514
from recommonmark.parser import CommonMarkParser
15+
from recommonmark.transform import AutoStructify
1616

1717
log = get_logger(name=os.path.basename(__file__), log_level=logging.INFO)
1818

src/jupyter_contrib_nbextensions/nbconvert_support/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
from .nbTranslate import NotebookLangExporter
1010
from .pp_highlighter import HighlighterPostProcessor, HighlighterPreprocessor
1111
from .pre_codefolding import CodeFoldingPreprocessor
12-
from .pre_pymarkdown import PyMarkdownPreprocessor
1312
from .pre_embedimages import EmbedImagesPreprocessor
13+
from .pre_pymarkdown import PyMarkdownPreprocessor
1414
from .pre_svg2pdf import SVG2PDFPreprocessor
1515
from .toc2 import TocExporter
1616

src/jupyter_contrib_nbextensions/nbextensions/code_prettify/README_isort.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,6 @@ All options are provided by the [KerneExecOnCells library](kernel_exec_on_cell.j
3535

3636
Under the hood, this nbextension uses the [kerneexeconcells library](kernel_exec_on_cell.js), a shared library for creating Jupyter nbextensions which transform code cell text using calls to the active kernel.
3737

38-
See the [shared README](REAME.md) and [kerneexeconcells library](kernel_exec_on_cell.js) for the internal model used by the nbextension.
38+
See the [shared README](README.md) and [kerneexeconcells library](kernel_exec_on_cell.js) for the internal model used by the nbextension.
3939

4040
[fontawesome]: https://fontawesome.com/icons

src/jupyter_contrib_nbextensions/nbextensions/collapsible_headings/main.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,7 @@
634634

635635
var kbm = Jupyter.keyboard_manager;
636636

637-
var action_up = kbm.actions.get(kbm.command_shortcuts.get_shortcut('up'));
637+
var action_up = kbm.actions.get("jupyter-notebook:select-previous-cell");
638638
var orig_up_handler = action_up.handler;
639639
action_up.handler = function (env) {
640640
for (var index = env.notebook.get_selected_index() - 1; (index !== null) && (index >= 0); index--) {
@@ -647,7 +647,7 @@
647647
return orig_up_handler.apply(this, arguments);
648648
};
649649

650-
var action_down = kbm.actions.get(kbm.command_shortcuts.get_shortcut('down'));
650+
var action_down = kbm.actions.get("jupyter-notebook:select-next-cell");
651651
var orig_down_handler = action_down.handler;
652652
action_down.handler = function (env) {
653653
var ncells = env.notebook.ncells();

src/jupyter_contrib_nbextensions/nbextensions/hide_input/readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Exporting with nbconvert
1818
------------------------
1919

2020
See also the general docs for exporting using nbconvert at
21-
[jupyter-contrib-nbextensions.readthedocs.io](https://jupyter-contrib-nbextensions.readthedocs.io/en/latest).
21+
[jupyter-contrib-nbextensions.readthedocs.io](https://jupyter-contrib-nbextensions.readthedocs.io/en/latest/).
2222

2323
To export a notebook with hidden cell inputs using nbconvert, you need to use a
2424
custom template.
5.6 KB
Loading
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Type: Jupyter Notebook Extension
2+
Name: Load TeX macros
3+
Description: This extension automatically loads a set of latex commands from the file latexdefs.tex when a notebook is opened.
4+
Link: readme.md
5+
Icon: icon.png
6+
Main: main.js
7+
Compatibility: 4.x, 5.x
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
define(function(require, exports, module) {
2+
var Jupyter = require('base/js/namespace');
3+
4+
function loadLatexUserDefs() {
5+
$.get('latexdefs.tex').done(function(data) {
6+
data = data.replace(/^/gm, '\$\$\$').replace(/$/gm, '\$\$\$');
7+
if ($('#latexdefs').length > 0) $('#latexdefs').remove();
8+
$('body').append($('<div/>').attr('id', 'latexdefs').text(data));
9+
console.log('latex_envs: loaded user LaTeX definitions latexdefs.tex');
10+
}).fail(function() {
11+
console.log('load_tex_macros: failed to load user LaTeX definitions latexdefs.tex')
12+
});
13+
}
14+
15+
function rerenderMaths() { // probably something like that
16+
MathJax.Hub.Queue(
17+
["resetEquationNumbers",MathJax.InputJax.TeX],
18+
["PreProcess", MathJax.Hub],
19+
["Reprocess", MathJax.Hub]
20+
);
21+
}
22+
23+
function load_ipython_extension() {
24+
"use strict";
25+
26+
if (Jupyter.notebook._fully_loaded) {
27+
loadLatexUserDefs();
28+
rerenderMaths();
29+
} else {
30+
$([Jupyter.events]).on("notebook_loaded.Notebook", function() {
31+
loadLatexUserDefs();
32+
rerenderMaths();
33+
})
34+
}
35+
}
36+
return {
37+
load_ipython_extension: load_ipython_extension,
38+
};
39+
})

0 commit comments

Comments
 (0)