pat-s / xaringan-metropolis

Metropolis theme of R package xaringan

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

.left-column and emphasis within list

Btibert3 opened this issue · comments

I have been waiting to find the bandwidth to dive into xaringan to manage my lecture slide decks and am targeting to go live with this next semester. Your theme has the foundation that I am looking for, but as I am attempting to learn the ins and outs of the tool, including remark.js, I noticed that from the official overview, there is built-in emphasis when using .left-column[]. This can be seen in action when comparing slide 3 and then slide 4.

This feature appears to be available when using the default them from the xaringan package, but I am not sure what it would take to add it back into your theme's .css file.

Any help or guidance would be appreciated!

(It should also be noted I am the farthest thing from expert in CSS. I am just hacking away but nothing jumps out to me.)

Hi @Btibert3 ,

sorry for the late response.

For me, both .left-column (remark standard) and .pull-left (xaringan) work.

The only additional tweaks that this theme provides are related to font sizes.

Have you solved your problem in the meantime?

Not exactly. What is strange is that when I replicate the .left-column, I can see this working, but not for .pull-left.

Full source below:

---
title: "Presentation Ninja"
subtitle: ""
author: "Yihui Xie"
date: "2016/12/12 (updated: `r Sys.Date()`)"
output: 
  xaringan::moon_reader:
    css: [default, metropolis, metropolis-fonts]
    nature:
      highlightStyle: github
      highlightLines: true
      countIncrementalSlides: false
---

```{r setup, include=FALSE}
options(htmltools.dir.version = FALSE)
# Title

.left-column[
  ## Brock 1
  ## Brock 2
]

.right-column[
This works
]

# Title 2

.pull-left[
  ## Brock 1
  ## Brock 2
]

.pull-right[
This does not
]

Hm, strange. Your example works for me. And you say this only appears when using this theme? That's even more strange since this theme does not modify/add any arrangement classes.

The issue would be better placed in the xaringan repo but now that we started here.

  • Which OS?
  • xaringan version up-to-date?
  • Which R version?

I am on xaringan 0.8.1 and on Mac OSX. When just using the package, same results; first page works, second does not. I can post it there if nothing jumps out to you. Thanks so much.

R version 3.5.1 (2018-07-02)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS  10.14.1

Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] xaringan_0.8.1

loaded via a namespace (and not attached):
[1] compiler_3.5.1  htmltools_0.3.6 tools_3.5.1     Rcpp_1.0.0      xfun_0.4        digest_0.6.18  

When just using the package, same results; first page works, second does not.

Ok. We can leave the issue here even though you will get less attention of course.

If your behavior is different from the normal CRAN experience of everyone else, it suggests that something is "wrong" with your local setup. Not so many people have a Mac so it's hard to reproduce. Have you tried to replicate the behavior in a Linux VM?

Closing this, as I can't reproduce my error. Sorry for the delay on this.