Giter VIP home page Giter VIP logo

Comments (9)

aless80 avatar aless80 commented on June 9, 2024

Any idea if it's due to doconce format html, doconce slides_html or both? To create a minimal example, do you have any idea if we can neglect any of those options?

from doconce.

lexnederbragt avatar lexnederbragt commented on June 9, 2024

Good question. There are two commands:

doconce format html slide1.do.txt --html_output=slide1.deck --pygments_html_style=autumn \
	--keep_pygments_html_bg SLIDE_TYPE=reveal SLIDE_THEME=swiss \
	--skip_inline_comments
doconce slides_html slide1.deck deck --html_slide_theme=swiss

Running 1) with Pre-break DocOnce and 2) with latest DocOnce works fine.
Running 1) with latest DocOnce and 2) with Pre-break DocOnce leads to the problem.

So it seems that doconce slides_html is the cause.

from doconce.

aless80 avatar aless80 commented on June 9, 2024

I created two virtual environments to test the two commands on combinations of the "old" and latest code versions. By "old" I mean commit 53504e235f41, which is the one before 0f04d50 .

Below I log an example to reproduce at least some of the issues. I removed all options with styling.

Apparently the first command doconce format html leads to bad slides in latest. The second command works in latest, meaning that the slides are ok when the second command in latest is applied to the output of the first command in the old version.

The html output in the old versions has indeed several stray <p> elements. The new version renders the code with more css and html code. I guess the second command slides_html relies on some of the features in old html formatting.

I notice that

  1. The first page with the author, date and title are rendered in a different order and style;
  2. Text above a code cell/table/figure is placed below it;
  3. Text in back ticks are separated from their surrounding text;
  4. The spacing/styling can be different.
### slides.do.txt
TITLE: Minimal slide demo
AUTHOR: Some Author
DATE: today

!split

===== Slide =====

Text above `pycod -t` code with a `for` loop
!bc pycod -t
total = 0
for n in range(10):
   total += n
!ec
Text below `pycod -t` code with a `for` loop

  
Text above a table `table`:
|----c-----------c------|
| time      | count     |
|----c-----------c------|
| 60        | 10000     |
|-----------------------|
Text below a table `table`


Text above a figure `figure`:
FIGURE: [../img/PythonDict, width=400 frac=0.8] Data structure concept of a dictionary in python. label{PythonDict}
Text below a figure `figure`

Commands:

doconce format html slides.do.txt
doconce slides_html slides deck

from doconce.

lexnederbragt avatar lexnederbragt commented on June 9, 2024

Thanks for #132! This fixes the problems I had with deck.js slides as far as I can tell.

However, there is one issue: the command line flag --html_slide_theme is ignored. It is supposed to result in the following line in the html:

<link rel="stylesheet" media="screen" href="deck.js-latest/themes/style/swiss.css">

Instead, we get the default:

<link rel="stylesheet" media="screen" href="deck.js-latest/themes/style/web-2.0.css">

Also, why is the deck.js folder now called deck.js-latest?

A second problem is that now reveal slide output is broken...

from doconce.

aless80 avatar aless80 commented on June 9, 2024

I fixed the theme option and added some css to shows tables with borders.

There is another issue in the slides (also in the old code): <h1> tags are displayed very big in the middle of the slide, and if one has more than one in the input html file (from DocOnce chapters, but also from the TOC or TITLE) they clutter the slide. Maybe the --sections_down option would fix it.

Also, why is the deck.js folder now called deck.js-latest?

Because that is how the latest package from http://imakewebthings.com/deck.js/ is called. deck.js

A second problem is that now reveal slide output is broken...

It does not surprise me, unfortunately

from doconce.

lexnederbragt avatar lexnederbragt commented on June 9, 2024

and added some css to shows tables with borders.

Ha, this is very nice! However, these borders do also appear around 'tables' created by !bslidecell blocks, and these were not there before and should not really be there. Quick demo: https://github.com/lexnederbragt/doconce_demo/blob/master/slide1/slide1.do.txt (last slide, html version in the repo is -not-yet- EDIT now also updated).

About the <h1> tags, these are title slides, I use them sometimes so it kind of is a feature. And one should only have one per slide (which I guess is poorly documented).

One new issue: earlier, slide transitions were commented out by DocOnce (I guess), see https://github.com/lexnederbragt/doconce_demo/blob/b8b90e565e559506172fa4c694e51f7987fa59f8/slide1/slide1.deck.html#L88. Now, horizontal-slide.css is added as he default. I'd prefer going back to no transitions... (or, if you have nothing else to do, default --> no transition, but can be changed by a new flag, for example --html_slide_transition=horizontal-slide).

Thanks for fixing the reveal slides.

from doconce.

lexnederbragt avatar lexnederbragt commented on June 9, 2024

Thanks for #140! Table borders now no longer appear in deck slides. But, they are still present in reveal slides...

from doconce.

aless80 avatar aless80 commented on June 9, 2024

I also implemented --html_slide_transition in reveal.js slides and fixed no transition theme as default. The existing code could be made more dynamic as I tried to do for deck.js, but it should work. The existing code creates stray HTML elements (e.g. unclosed <p> )

from doconce.

lexnederbragt avatar lexnederbragt commented on June 9, 2024

After some more testing, I think all is fixed now. Closing the issue. Thanks!

from doconce.

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.