Skip to content

Instantly share code, notes, and snippets.

@anandology
Last active October 18, 2024 08:06
Show Gist options
  • Save anandology/3fcc89aa9e89f2888443a38325f1d776 to your computer and use it in GitHub Desktop.
Save anandology/3fcc89aa9e89f2888443a38325f1d776 to your computer and use it in GitHub Desktop.
How to write article with Quarto

How to write an article and generate PDF with Quarto

Step 1: Create a new directory

Create a new directory for your article.

mkdir my-article
cd my-article

Step 2: Install Quarto extension

Install quarto extension for Taylor and Francis Template:

quarto install extension mikemahoney218/quarto-tandf

Step 3: Create the article

Create a file article.qmd with the following content:

title: The Title
subtitle: The Subtitle
author:
  - name: The Author
    email: [email protected]
bibliography: references.bib
format:
  tandf-pdf:
    keep-tex: true
    include-in-header:
      text: |
        \usepackage{fancyhdr}
        \pagestyle{fancy}
        \fancyhead{}
        \fancyhead[LL]{The Title}
        \fancyhead[R]{The Subtitle}
        \fancyfoot[L]{The Author}
        \fancyfoot[C]{\thepage}
        \fancyfoot[R]{}
date: 2024-10-12
abstract: |
    Abstract Line 1
    Line 2
    
    Para 2
    
    Para 3
---

# Introduction

# First Section

# Second Section

# Summary 

# References {.unnunmbered}

::: {#refs}
:::

Step 4: Create references.bib file

Create an empty file and save it as references.bib.

Step 5: Generate the PDF

Run the following command to generate your pdf.

quarto render article.qmd --to tandf-pdf

After running this, you'll have article.pdf in the same directory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment