quarto-dev / quarto-dev/quarto-cli
Rendering to a non declared custom format silently renders to quarto default format
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- JavaScript
- Star
- 6k
- Fork
- 458
- Merge trung bình
- 1 ngày 9 giờ
- Pull request đã merge (30 ngày)
- 41
Mô tả
> quarto use template quarto-journals/acs
Quarto templates may execute code when documents are rendered. If you do not
trust the authors of the template, we recommend that you do not install or
use the template.
? Do you trust the authors of this template (Y/n) » Yes
? Directory name: » test-quarto-acs
[>] Downloading
[>] Unzipping
Found 1 extension.
[>] Copying files...
Files created:
- bibliography.bib
- placeholder.png
- style-guide
- test-quarto-acs.qmd
- _extensions
> cd .\test-quarto-acs\
Then rendering to acs-html does "work" as no warning or error is thrown but
htmlis not defined in the_extensions.yml- document is rendered to HTML without using the
commoninformation defined in_extensions.yml(like the CSL file)
So it seems if the format is not explicitly defined, it will just pass through to main one, here HTML
Details of the render
> quarto render .\test-quarto-acs.qmd --to acs-html
pandoc
to: html
output-file: test-quarto-acs.html
standalone: true
section-divs: true
html-math-method: mathjax
wrap: none
default-image-extension: png
metadata
document-css: false
link-citations: true
date-format: long
lang: en
author:
- name: Andrew N. Other
note: A shared note
- name: Fred T. Secondauthor
affiliations:
- name: Current address
city: Some other place
country: Germany
- name: I. Ken Groupleader
email: i.k.groupleader@unknown.uu
phone: +123 (0)123 4445556
fax: +123 (0)123 4445557
affiliations:
- id: unknown1
name: Unknown University
department: Department of Chemistry
town: Unknown Town
- id: second-uni
name: Second University
department: Department of Chemistry
town: Nearby Town
note: A shared note
- name: Susanne K. Laborator
email: s.k.laborator@bigpharma.co
affiliations:
- name: BigPharma
town: Big Town
country: USA
- name: Kay T. Finally
affiliations:
- ref: second-uni
- ref: unknown1
title: 'A demonstration of the _achemso_ {{< latex >}} class^[A footnote for the title]'
title-short: An _achemso_ demo
keywords: 'American Chemical Society, LaTeX'
abstract: |
This is an example document for the _achemso_ documentclass, intended for submissions to the American Chemical Society for publication. The class is based on the standard LaTeXe _report_ file, and does not seek to reproduce the appearanceof a published paper.
This is an abstract for the _achemso_ document class demonstration document. An abstract is only allowed for certain manuscript types. The selection of `journal` and `manuscript` will determine if an abstract is valid. If not, the class will issue an appropriate error.This is the abstract.
bibliography:
- bibliography.bib
Output created: test-quarto-acs.html
I believe it should error if we expect to have explicitly a defined format in the extensions i.e at least adding html: default
YAML would be
title: ACS Journal Format
author: Charles Teague
version: 0.9.1
contributes:
formats:
common:
csl: american-chemical-society.csl
shortcodes:
- fancy-text
filters:
- latex-environment
environments:
- scheme
- chart
- graph
- tocentry
- acknowledgement
- suppinfo
commands:
- ce
pdf:
cite-method: natbib
biblio-config: false
format-resources:
- achemso.bst
template-partials:
- "doc-class.tex"
- "title.tex"
- "_affiliation.tex"
html: default
Or we should at least use the common information in format as someone passing explicitly a custom format e.g acs-html would expect that (I was)
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Reproduce the behavior with the shown quarto use template setup and quarto render .\test-quarto-acs.qmd --to acs-html command. Inspect how _extensions.yml format declarations are resolved, especially the fallback to HTML and handling of common; done means an undeclared custom format errors or applies the declared common configuration.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- javascript
- Lĩnh vực
- cli
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 42/100