Code Monkey home page Code Monkey logo

Comments (4)

JanPalasek avatar JanPalasek commented on August 16, 2024

Thanks for reporting. Can you paste version of pretty jupyter and input ipynb and output html to the issue?

from pretty-jupyter.

xtfocus avatar xtfocus commented on August 16, 2024

jupyter notebook version 6.5.3
input ipynb:

<a id="top"></a><div style="padding: 20px; color: white; background-color: #0077B5; font-size: 35px; margin: 0; font-family: Georgia; text-align: left; display: fill; border-radius: 5px; overflow: hidden;"><b>Linkedin</b></div>
* [1 Dataset](#1)
* [2 NER model](#2)
	* [2.1 Something](#2.1)
	* [2.2 Yes](#2.2)
<a id="1"></a>
<h2 style="padding: 20px; color: white; background-color: #0077B5; font-size: 35px; margin: 0; font-family: Georgia; text-align: center; display: fill; border-radius: 5px; overflow: hidden;"><b>Dataset</h2>

<a id="2"></a>
<h2 style="padding: 20px; color: white; background-color: #0077B5; font-size: 35px; margin: 0; font-family: Georgia; text-align: center; display: fill; border-radius: 5px; overflow: hidden;"><b>NER model</h2>

<a id="2.1"></a>
<h3 style="font-family: Georgia; font-size: 25px; font-style: normal; font-weight: normal; text-decoration: none; text-transform: none; letter-spacing: 2px; color: #0077B5; background-color: #ffffff;"><b>Something</h3>

<a id="2.2"></a>
<h3 style="font-family: Georgia; font-size: 25px; font-style: normal; font-weight: normal; text-decoration: none; text-transform: none; letter-spacing: 2px; color: #0077B5; background-color: #ffffff;"><b>Yes</h3>

from pretty-jupyter.

JanPalasek avatar JanPalasek commented on August 16, 2024

I couldn't reproduce it. Unfortunately, "it works on my machine" 🙁. I tested it on both Linux and Windows.

My environment:

  • Python: 3.8.10
requirements.txt

asttokens==2.2.1
attrs==23.1.0
backcall==0.2.0
beautifulsoup4==4.12.2
bleach==6.0.0
Cerberus==1.3.4
click==8.1.4
colorama==0.4.6
decorator==5.1.1
defusedxml==0.7.1
entrypoints==0.4
executing==1.2.0
fastjsonschema==2.17.1
importlib-metadata==6.8.0
importlib-resources==6.0.0
ipython==8.12.2
ipython-genutils==0.2.0
jedi==0.18.2
Jinja2==3.1.2
jsonschema==4.18.0
jsonschema-specifications==2023.6.1
jupyter-client==8.3.0
jupyter-core==5.3.1
jupyterlab-pygments==0.2.2
lxml==4.9.3
MarkupSafe==2.1.3
matplotlib-inline==0.1.6
mistune==0.8.4
nbclient==0.8.0
nbconvert==6.5.4
nbformat==5.9.1
packaging==23.1
pandocfilters==1.5.0
parso==0.8.3
pickleshare==0.7.5
pkgutil-resolve-name==1.3.10
platformdirs==3.8.1
pretty-jupyter==2.0.5
prompt-toolkit==3.0.39
pure-eval==0.2.2
Pygments==2.15.1
python-dateutil==2.8.2
pywin32==306
PyYAML==6.0
pyzmq==25.1.0
referencing==0.29.1
rpds-py==0.8.10
six==1.16.0
soupsieve==2.4.1
stack-data==0.6.2
tinycss2==1.2.1
tornado==6.3.2
traitlets==5.9.0
typing-extensions==4.7.1
wcwidth==0.2.6
webencodings==0.5.1
zipp==3.16.0

Source file and the output:

pj.zip

Can you provide exact ipynb and html in zip as I did? Btw please do not save file with Ctrl + S in the browser, it ruins the report. Use directly the generated html.

Also may I suggest to try more "markdown" approach that is well supported and can achieve the same results? Try an ipynb notebook with one markdown cell like this:

<style>
    h2 {
        padding: 20px; color: white; background-color: #0077B5; font-size: 35px; margin: 0 10; font-family: Georgia; text-align: center; display: fill; border-radius: 5px; overflow: hidden;
    }
    h3 {
        font-family: Georgia; font-size: 25px; font-style: normal; font-weight: normal; text-decoration: none; text-transform: none; letter-spacing: 2px; color: #0077B5; background-color: #ffffff;
    }
</style>

## Table of Contents

* [1 Dataset](#Dataset)
* [2 NER model](#NER-model)
	* [2.1 Something](#Something)
	* [2.2 Yes](#Yes)

## Dataset

## NER model

### Something

### Yes

Btw it is good practice to have empty lines between markdown and HTML. The parser interprets it better in that case. If you want to keep your solution, try this instead:

Original markdown with fixed bold tags and empty lines
<a id="top"></a><div style="padding: 20px; color: white; background-color: #0077B5; font-size: 35px; margin: 0; font-family: Georgia; text-align: left; display: fill; border-radius: 5px; overflow: hidden;"><b>Linkedin</b></div>

* [1 Dataset](#1)
* [2 NER model](#2)
	* [2.1 Something](#2.1)
	* [2.2 Yes](#2.2)

<a id="1"></a>
<h2 style="padding: 20px; color: white; background-color: #0077B5; font-size: 35px; margin: 0; font-family: Georgia; text-align: center; display: fill; border-radius: 5px; overflow: hidden;"><b>Dataset</b></h2>

<a id="2"></a>
<h2 style="padding: 20px; color: white; background-color: #0077B5; font-size: 35px; margin: 0; font-family: Georgia; text-align: center; display: fill; border-radius: 5px; overflow: hidden;"><b>NER model</b></h2>

<a id="2.1"></a>
<h3 style="font-family: Georgia; font-size: 25px; font-style: normal; font-weight: normal; text-decoration: none; text-transform: none; letter-spacing: 2px; color: #0077B5; background-color: #ffffff;"><b>Something</b></h3>

<a id="2.2"></a>
<h3 style="font-family: Georgia; font-size: 25px; font-style: normal; font-weight: normal; text-decoration: none; text-transform: none; letter-spacing: 2px; color: #0077B5; background-color: #ffffff;"><b>Yes</b></h3>

from pretty-jupyter.

JanPalasek avatar JanPalasek commented on August 16, 2024

I'm closing the issue. I hope the solution worked. If the problem persists, feel free to reopen it.

from pretty-jupyter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.