emitanaka / ninja-theme

A xaringan / remark js ninja theme
https://emitanaka.github.io/ninja-theme
89 stars 23 forks source link

Print of kunoichi theme needs fix #5

Open emitanaka opened 6 years ago

emitanaka commented 6 years ago
screenshot 2018-10-11 07 33 12

First two page off.

screenshot 2018-10-11 07 34 30

All off here.

rpodcast commented 5 years ago

I am running the latest development version 0.8.5 of xaringan which now includes a function called decktape to create a pdf copy of the slides using the decktape library. I tried out printing your example slide deck using xaringan::decktape("https://emitanaka.github.io/ninja-theme/themes/kunoichi/kunoichi-theme-example.html", "kunoichi.pdf") and it is looking very close to the original HTML version with a couple of differences:

Here are a couple of screenshots. While not perfect, this will be good enough when I use your theme to create a new set of slides for an upcoming workshop :+1:

image

image

emitanaka commented 5 years ago

Ah thanks fo that @rpodcast. Good to know decktape almost works. I found a fix with css to get the print on google chrome right which I'll add to ninjutsu.css in future. That fix is below:

@page {
  size: 1210px 681px;
  margin: 0;
}

@media print {
  .remark-slide-scaler {
    width: 100% !important;
    height: 100% !important;
    transform: scale(1) !important;
    top: 0 !important;
    left: 0 !important;
  }
}

Regarding the top grey bar, it's to do with the anicon or icon in YAML (referenced here: https://github.com/emitanaka/anicon/issues/3). If we you remove those, it'll work. I haven't found a solution for this yet but I have a work around which is to use seal: false and make the title slide on my own.

rpodcast commented 5 years ago

Great! Until the new version of the theme is released I will create a simple css file with those contents.