ismayc / thesisdown

An updated R Markdown thesis template using the bookdown package
Other
809 stars 357 forks source link

Chapter 3 template preventing knitting #122

Closed kelseygonzalez closed 3 years ago

kelseygonzalez commented 3 years ago

Describe the bug When rendering the default template, there's something in chapter 3 that Latex is now struggling to render that is breaking the build.

To Reproduce Create a new thesisdown from the template, and click knit from the index.Rmd file. Error from the console / thesis.log:

Chapter 3.
! Missing number, treated as zero.
<to be read again> 
                   (
l.553 ...columnwidth - 2\tabcolsep) * \real{0.31}}
                                                  \centering 

Expected behavior I expect it to render the default document.

Desktop (please complete the following information):

Additional context This could definitely be a latex issue on my own computer. I've been fighting with it all day but this error has persisted. If I delete most of the chapter 3, the error disappears and the document renders.

ismayc commented 3 years ago

Hi there. I think this might be the table that I have added in to demo that in Chapter 3 as that has caused issues with LaTeX before. It's probably best to just remove that Markdown table and generate tables with R instead.

kelseygonzalez commented 3 years ago

Indeed @ismayc - I just tested by removing only the markdown table at the beginning and it rendered. Sounds like it's time to rid ourselves of that pesky table!

ismayc commented 3 years ago

I'll look into updating the template over the next few days so others don't have this same issue when they do a fresh build. Thanks for reporting!

Xyv commented 3 years ago

Hey, Pandoc has recently changed the way they compute the the column widths in tables: https://github.com/jgm/pandoc/commit/bd7c9eb32be7c5499f4a50cb4b5f138f9eb919e8 Adding \usepackage{calc} in the template fixes this. And thanks for all the work you've done!

EDIT: They've made a few more changes regarding tables since were you might require to include array too. (https://github.com/jgm/pandoc/commit/7c4d7db9c7b582c7eb574c8ef9381f41cd419a6e) For reference, I made my own template and stumbled onto the same problem, I've skimmed through the last few commits on the default.latex template to catch the culprits.

ismayc commented 3 years ago

Thank you! That's super helpful

Xyv commented 3 years ago

My pleasure, happy to be of some help to this nice project.

ismayc commented 3 years ago

Pushed to master in #124

github-actions[bot] commented 3 years ago

This issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org whenever possible) and link to this issue. If a reprex is not applicable, recording a short Loom video showing what you are seeing can go a long way in helping to diagnose problems.