Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Print of kunoichi theme needs fix #5

Open
emitanaka opened this issue Oct 10, 2018 · 3 comments
Open

Print of kunoichi theme needs fix #5

emitanaka opened this issue Oct 10, 2018 · 3 comments

Comments

@emitanaka
Copy link
Owner

screenshot 2018-10-11 07 33 12

First two page off.

screenshot 2018-10-11 07 34 30

All off here.
@rpodcast
Copy link
Contributor

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:

  • The title slide is similar to your output above but at least the secondary color and logo appear
  • All slides have a grey bar at top with "/< in the left.

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 👍

image

image

@emitanaka
Copy link
Owner Author

emitanaka commented Dec 26, 2018

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: emitanaka/anicon#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
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants