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

Markdown tables: "! LaTeX Error: Environment longtable undefined." #1

Open
jrcalabrese opened this issue Mar 5, 2022 · 0 comments
Open

Comments

@jrcalabrese
Copy link

Hi, I found your blogpost on making cheatsheets in RMarkdown and your template for minimizing whitespace/formatting content into multiple columns is exactly what I've been looking for.

I've been trying to use this theme with my own RMarkdown cheatsheet, but I don't think it's compatible with Markdown tables. I'm relatively unfamiliar with LaTeX, but do you know if something be added to template.tex to make it Markdown-table-friendly?

---
title: ""
output:
  pdf_document:
    template: template.tex
---

  # Tables
  
  | Symbol         | Mean        | Symbol         | Meaning                        |
  | :------------- | :---------- | :------------- | :----------------------------- |
  | $\beta_{0}$    | Intercept   | $\sigma$       | Variance                       |
  | $\beta_{1}$    | Slope       | $\sigma^2$     | Standard deviation             |
  
  | Model                      | Formula                                                                                |
  | :------------------------- | :------------------------------------------------------------------------------------- |
  | Intercept Only             | $\operatorname{Y_{i}} = \beta_{0} + \epsilon_{i}$                                      |
  | Simple linear regression   | $\operatorname{Y_{i}} = \beta_{0} + \beta_{1}x_{i} + \epsilon_{i}$                     |
  | Multiple linear regression | $\operatorname{Y_{i}} = \beta_{0} + \beta_{1}x_1{i} + \beta_{2}x_2{i} + \epsilon_{i}}$ |
  
  # Models
  
  $$ 
  \operatorname{Y_{i}} = {\beta}_{1}x_{1i} + {\beta}_{2}x_{2i} + ... + {\beta}_{p}x_{pi} + \epsilon_{i}
  $$

  $$
   \epsilon_{i} \sim_{iid} N(0, \sigma^2)
  $$

> processing file: reprex.Rmd
> output file: reprex.knit.md

> ! LaTeX Error: Environment longtable undefined.

> Error: LaTeX failed to compile reprex.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See reprex.log for more info.
> Execution halted
@jrcalabrese jrcalabrese changed the title Markdown Tables: "! LaTeX Error: Environment longtable undefined." Markdown tables: "! LaTeX Error: Environment longtable undefined." Mar 5, 2022
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

1 participant