Add page breaks when needed
This commit is contained in:
parent
8e5f6d512a
commit
a072017525
2 changed files with 10 additions and 0 deletions
|
@ -27,12 +27,21 @@ body.content {
|
|||
img {
|
||||
margin-top: $image-spacing;
|
||||
width: 100%;
|
||||
page-break-after: avoid;
|
||||
}
|
||||
|
||||
p.caption {
|
||||
margin: 1px 5px $image-spacing;
|
||||
padding: 0;
|
||||
font-style: italic;
|
||||
page-break-before: avoid;
|
||||
}
|
||||
|
||||
.references-title {
|
||||
page-break-after: avoid;
|
||||
}
|
||||
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
page-break-after: avoid;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,6 +12,7 @@ def fix_references_title(content, config):
|
|||
reference_element = soup.find('div', class_='references')
|
||||
if reference_element is not None:
|
||||
title = soup.new_tag('h1')
|
||||
title['class'] = 'references-title'
|
||||
title.string = "References"
|
||||
reference_element.insert_before(title)
|
||||
return soup.prettify()
|
||||
|
|
Reference in a new issue