ismayc / thesisdown

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

Unable to use single quotes in abstract.Rmd #184

Closed Samasaur1 closed 1 year ago

Samasaur1 commented 2 years ago

Note: I've already submitted a pull request to fix this bug (#183), but I'm making a corresponding issue as well.

Describe the bug When putting single quotes/apostrophes (') in the prelims/00-abstract.Rmd file, thesisdown fails to knit. And since the thesisdown blank project suggests using the same code for the acknowledgements, dedication, and preface as is used for the abstract, users may face the same issue for those fields.

To Reproduce Steps to reproduce the behavior:

  1. Create a new thesisdown project using the instructions in the README

    1. Ensure that you have already installed LaTeX and the fonts described above, and are using the latest version of RStudio. You can use thesisdown without RStudio. For example, you can write the Rmd files in your favorite text editor (e.g. Atom, Notepad++). But RStudio is probably the easiest tool for writing both R code and text in your thesis. It also provides a nice way to build your thesis while editing. We’ll proceed assuming that you have decided to use the RStudio workflow.

    2. Install the {bookdown} and {thesisdown} packages. Note that {thesisdown} is not available on CRAN at the moment and that’s why install.packages("thesisdown") won’t work. Use remotes::install_github() as shown below instead to install the package.

    if (!require("remotes")) 
      install.packages("remotes", repos = "https://cran.rstudio.org")
    remotes::install_github("rstudio/bookdown")
    remotes::install_github("ismayc/thesisdown")

    Note that you may need to restart RStudio at this point for the following dialog to show up.

    1. Get started with the {thesisdown} template. There are two options for doing so.
    • 3a) RECOMMENDED Create a new RStudio project with a {thesisdown} template.

    In RStudio, click on File > New Project > New Directory. Then select Thesis Project using thesisdown from the dropdown that will look something like the image below. You’ll see the graduation cap as the icon on the left for the appropriate project type.

    Next, give your project a name and specify where you’d like the files to appear. In the screenshot below, the project name is my_thesis and it will appear as a new folder on my Desktop.

    If you got this far, skip over step 3b which is the older version of getting the template. It might force you to change some of the directories to get knitting to work and has some other limitations as well. That’s why step 3a is recommended.

    • 3b) Use the New R Markdown dialog to select Thesis:

    Note that this will currently only Knit if you name the directory index as shown above. This guarantees that index.html is generated correctly for the Gitbook version of the thesis.

    1. After choosing which type of output you’d like in the YAML at the top of index.Rmd, Knit the index.Rmd file to get the book in PDF or HTML formats.
  2. Edit prelims/00-abstract.Rmd to include an apostrophe/single quote

  3. Knit again

Expected behavior The project should knit successfully.

Desktop (please complete the following information):

ismayc commented 2 years ago

Thanks for flagging this. I'm still in the process of reviewing this and understanding any additional implications of the changes.

github-actions[bot] commented 1 year 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.