The Wayback Machine - https://web.archive.org/web/20200914111736/https://github.com/rstudio/rmarkdown/issues/1642
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

pandoc’s default css style instructions are missing #1642

Open
njbart opened this issue Sep 8, 2019 · 1 comment
Open

pandoc’s default css style instructions are missing #1642

njbart opened this issue Sep 8, 2019 · 1 comment

Comments

@njbart
Copy link

@njbart njbart commented Sep 8, 2019

The pandoc default templates https://github.com/jgm/pandoc/blob/master/data/templates/default.html4 and https://github.com/jgm/pandoc/blob/master/data/templates/default.html5 contain [EDIT: pandoc code refactored] import the following from https://github.com/jgm/pandoc/blob/master/data/templates/styles.html:

  <style>
      code{white-space: pre-wrap;}
      span.smallcaps{font-variant: small-caps;}
      span.underline{text-decoration: underline;}
      div.column{display: inline-block; vertical-align: top; width: 50%;}
      div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
$if(quotes)$
      q { quotes: "“" "”" "‘" "’"; }
$endif$
  </style>

All of these are required to have pandoc html output appear as expected, i.e., as described in https://pandoc.org/MANUAL.html.

None of these instructions appear in rmarkdown/bookdown/blogdown html output, however.

This should be fixed.


By filing an issue to this repo, I promise that

  • [ x] I have fully read the issue guide at https://yihui.name/issue/.
  • [x ] I have provided the necessary information about my issue.
    • If I'm asking a question, I have already asked it on Stack Overflow or RStudio Community, waited for at least 24 hours, and included a link to my question there.
    • If I'm filing a bug report, I have included a minimal, self-contained, and reproducible example, and have also included xfun::session_info('rmarkdown'). I have upgraded all my packages to their latest versions (e.g., R, RStudio, and R packages), and also tried the development version: remotes::install_github('rstudio/rmarkdown').
    • If I have posted the same issue elsewhere, I have also mentioned it in this issue.
  • [x ] I have learned the Github Markdown syntax, and formatted my issue correctly.

I understand that my issue may be closed if I don't fulfill my promises.

@njbart
Copy link
Author

@njbart njbart commented Sep 9, 2019

MWE: rmarkdown file in RStudio:

[This span should appear in small caps.]{.smallcaps}

[This span should be underlined.]{.underline}

:::::::::::::: {.columns}
::: {.column width="40%"}
This is the content of the first column; column width should be forty percent.
:::
::: {.column width="60%"}
This is the content of the second column; column width should be sixty percent.
:::
::::::::::::::

::: {.hanging-indent}
This paragraph should have hanging indentation. pandoc uses this format automatically for reference section items if instructed by a .csl style file to do so.
:::

Formatted in RStudio via Knit to HTML button:

Expected output, as formatted by pandoc test.Rmd -s -o test.html:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
1 participant
You can’t perform that action at this time.