##// END OF EJS Templates
Fix issue #5877 with tests...
Fix issue #5877 with tests This pull request prevent to have lists environments inside the headings cells which break latex code. - First, the function `markdown2latex` has been changed in order to accept a markup keyword for pandoc reader, default to `markdown` as before(`test_markdown.py` updated too). - Headings cells are treated with markup `markdown_strict+tex_math_dollars` to remove enhancements of pandoc for lists and add math support. - Secondly, `prevent_list_blocks` filter escape characters `. - * +` in headings cells to prevent `enumerate` or `itemize` environments in latex sections(test added in `test_strings.py` Test files accessible at: <https://gist.github.com/benjaminabel/4a40d1300dcf087c8695&gt;

File last commit:

r17201:03d0484a
r18427:7b2e741d
Show More
layoutmanager.js
58 lines | 1.9 KiB | application/javascript | JavascriptLexer
// Copyright (c) IPython Development Team.
// Distributed under the terms of the Modified BSD License.
define([
'base/js/namespace',
'jquery',
], function(IPython, $) {
"use strict";
var LayoutManager = function () {
this.bind_events();
this.pager = undefined;
};
LayoutManager.prototype.bind_events = function () {
$(window).resize($.proxy(this.do_resize,this));
};
LayoutManager.prototype.app_height = function() {
var win = $(window);
var w = win.width();
var h = win.height();
var header_height;
if ($('div#header').css('display') === 'none') {
header_height = 0;
} else {
header_height = $('div#header').outerHeight(true);
}
var menubar_height;
if ($('div#menubar-container').css('display') === 'none') {
menubar_height = 0;
} else {
menubar_height = $('div#menubar-container').outerHeight(true);
}
return h-header_height-menubar_height; // content height
};
LayoutManager.prototype.do_resize = function () {
var app_height = this.app_height(); // content height
$('#ipython-main-app').height(app_height); // content+padding+border height
if (this.pager) {
var pager_height = this.pager.percentage_height*app_height;
var pager_splitter_height = $('div#pager_splitter').outerHeight(true);
$('div#pager').outerHeight(pager_height);
if (this.pager.expanded) {
$('div#notebook').outerHeight(app_height-pager_height-pager_splitter_height);
} else {
$('div#notebook').outerHeight(app_height-pager_splitter_height);
}
}
};
// Backwards compatability.
IPython.LayoutManager = LayoutManager;
return {'LayoutManager': LayoutManager};
});