### Bug description

I am trying to create a quarto extension. The purpose is to generate a standard pdf format for class work for the students. 
The YAML head in the template.qmd is as follows:
```
---
title: "template"
format:
  Homework-pdf:
    keep-tex: true
  Homework-html: default
author:
  - name: Maulik Bhatt
    affiliations: 
      - ref: SPJIMR
    orcid: XXXX-XXXX-XXXX-XXXX
    email: email@example.com
affiliations:
  - id: SPJIMR
    name: S P Jain Institute of Management & Research
    Department: Fellow Program in Management
    Address: Bhavan's Campus, D N Nagar, Andheri (West)
    city: Mumbai
    country: India
    postal-code: 4000054
abstract: |
  This document is only a demo explaining how to use the template.
keywords: 
  - template
  - demo
bibliography: references.bib
editor: visual
---
```
Similarly, the YAML file in the _extensions folder reads as follows
```
title: Homework Submission Format
author: Maulik Bhatt
version: 0.1.2
contributes:
  formats:
    common:
      # define below YAML configuration common to all formats
      number-sections: true
#      filters:
        # You can include here Lua filters from your extension format 
      shortcodes:
        # You can include here Lua filters defining shortcodes from your extension
        - shortcodes.lua
      knitr:
        opts_chunk:
          echo: false
    pdf:
      # define default configuration for the pdf version of your format
      documentclass: scrbook
      colorlinks: true
      # Content to add in header that your format is using
      header-includes: |
        \usepackage{orcidlink}
      template-partials:
        # Add here the partials your format is using
        - "partials/title.tex"
        - "partials/before-body.tex"
        - "partials/_authors.tex"
        - "partials/_affiliations.tex"
      format-resources:
        # Add here the resources required for the PDF rendering
        - scrbook.cls
        - orcidlink.sty
    html:
      # define default configuration for the html version of your format
      toc: true
      theme: custom.scss
      # Use a CSL file to style (https://www.zotero.org/styles/)
      csl: apa7.csl
```
But when I render this file (template.qmd), it gives the following error.
```
compilation failed- error
LaTeX Error: Missing \begin{document}.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...                                              
                                                  
l.229 ...le.com}{\nolinkurl{email@example.com}}. }
                                                   

see G:\Username\Projects\MyQuartoExtension\template.log for more information.
```
The session info from xfun package is as follows:
```
R version 4.2.1 (2022-06-23 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19041), RStudio 2022.11.0.123

Locale:
  LC_COLLATE=English_India.utf8 
  LC_CTYPE=English_India.utf8   
  LC_MONETARY=English_India.utf8
  LC_NUMERIC=C                  
  LC_TIME=English_India.utf8    

Package version:
  askpass_1.1        assertthat_0.2.1  
  backports_1.4.1    base64enc_0.1.3   
  broom_1.0.0        bslib_0.4.0       
  cachem_1.0.6       callr_3.7.1       
  cli_3.3.0          colorspace_2.0-3  
  compiler_4.2.1     cpp11_0.4.2       
  curl_4.3.2         DBI_1.1.3         
  digest_0.6.29      dplyr_1.0.9       
  ellipsis_0.3.2     evaluate_0.16     
  fansi_1.0.3        farver_2.1.1      
  fastmap_1.1.0      fs_1.5.2          
  generics_0.1.3     ggplot2_3.3.6     
  glue_1.6.2         graphics_4.2.1    
  grDevices_4.2.1    grid_4.2.1        
  gtable_0.3.0       highr_0.9         
  htmltools_0.5.3    httr_1.4.4        
  isoband_0.2.5      jquerylib_0.1.4   
  jsonlite_1.8.0     kableExtra_1.3.4  
  knitr_1.39         labeling_0.4.2    
  later_1.3.0        lattice_0.20.45   
  lifecycle_1.0.1    magrittr_2.0.3    
  MASS_7.3.58.1      Matrix_1.4.1      
  memoise_2.0.1      methods_4.2.1     
  mgcv_1.8.40        mime_0.12         
  munsell_0.5.0      nlme_3.1.159      
  openssl_2.0.2      packrat_0.8.1     
  pillar_1.8.0       pkgconfig_2.0.3   
  processx_3.7.0     ps_1.7.1          
  purrr_0.3.4        quarto_1.2        
  R6_2.5.1           rappdirs_0.3.3    
  RColorBrewer_1.1.3 Rcpp_1.0.9        
  rlang_1.0.4        rmarkdown_2.15    
  rsconnect_0.8.27   rstudioapi_0.13   
  rvest_1.0.2        sass_0.4.2.9000   
  scales_1.2.0       selectr_0.4.2     
  splines_4.2.1      stats_4.2.1       
  stringi_1.7.8      stringr_1.4.0     
  svglite_2.1.0      sys_3.4           
  systemfonts_1.0.4  tibble_3.1.8      
  tidyr_1.2.0        tidyselect_1.1.2  
  tinytex_0.41       tools_4.2.1       
  utf8_1.2.2         utils_4.2.1       
  vctrs_0.4.1        viridisLite_0.4.0 
  webshot_0.5.3      withr_2.5.0       
  xfun_0.32          xml2_1.3.3        
  yaml_2.3.5        
```
So, I cannot render it to Homework-pdf format, but I can render it to pdf format, when I try to use
```
quarto render template.qmd --to pdf
```
How can I render it to the Homework-pdf format?

### `quarto check` Output

```
$ quarto.cmd check

[>] Checking Quarto installation......OK
      Version: 1.0.37
      Path: C:\Users\Maulik\AppData\Local\Programs\Quarto\bin\
      CodePage: 1252

[>] Checking basic markdown render....OK

[>] Checking Python 3 installation....(None)

      Unable to locate an installed version of Python 3.
      Install Python 3 from https://www.python.org/downloads/

[>] Checking R installation...........OK
      Version: 4.2.1
      Path: C:/PROGRA~1/R/R-42~1.1
      LibPaths:
        - C:/Users/Maulik/AppData/Local/R/win-library/4.2
        - C:/Program Files/R/R-4.2.1/library
      rmarkdown: 2.15

[>] Checking Knitr engine render......OK
```


### `quarto tools check` Output

```
[>] Inspecting tools

Tool         Status                    Installed     Latest
chromium     Not installed             ---           869685
tinytex      External Installation     ---           v2022.08
```

### Checklist

- [X] [formatted your issue](https://yihui.org/issue/#please-format-your-issue-correctly) so it is easier for us to read?
- [X] included a minimal, fully reproducible example in a single .qmd file? Please provide the whole file rather than the snippet you believe is causing the issue.
- [X] documented the quarto version you're running, by pasting the output from running `quarto check` in the "Quarto Check Output" text area?
- [X] documented the version of the quarto tools you're running, by providing the output from running `quarto tools check` in the "Quarto Tools Check Output" text area?
- [X] documented the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
- [X] documented which operating system you're running? If on Linux, please provide the specific distribution as well.
- [X] upgraded to the latest version, including your versions of R, the RStudio IDE, and relevant R packages?
dragonstyle
2022-08-20T06:44:08Z
bhattmaulik
bug
v1.1
closed
I am unable to render to a custom pdf format using a quarto extension I created
https://github.com/quarto-dev/quarto-cli/issues/2012