Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Yaml header option standalone: false does not work #7335

Open
GuillaumeDehaene opened this issue Oct 24, 2023 · 5 comments · May be fixed by #7741
Open

Yaml header option standalone: false does not work #7335

GuillaumeDehaene opened this issue Oct 24, 2023 · 5 comments · May be fixed by #7741
Labels
documentation Doc improvements & quarto-web pandoc
Milestone

Comments

@GuillaumeDehaene
Copy link

Bug description

In 1.4.444, for formats html and latex, the yaml header option standalone: false has no effect.
The bug is not present in 'rtf' and 'tei' which also have the standalone option.

It should be forwarded to pandoc and produce a document with only the body.
However, the output document is the same for both standalone: true, standalone: false

The issue is probably that the option is simply not forwarded to pandoc.

Steps to reproduce

Here is a MWE

---
title: "Test"
format:
    html:
        standalone: false
    latex:
        standalone: false
    rtf:
        standalone: false
    tei:
        standalone: false
---

Content

Run with quarto render test.qmd

Quarto render log on my machine:

pandoc 
  to: html
  output-file: test.html
  standalone: false
  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
  title: Test

pandoc 
  to: latex
  output-file: test.tex
  standalone: false
  pdf-engine: xelatex
  variables:
    graphics: true
    tables: true
  default-image-extension: pdf

metadata
  documentclass: scrartcl
  classoption:
    - DIV=11
    - numbers=noendperiod
  papersize: letter
  header-includes:
    - '\KOMAoption{captions}{tableheading}'
  block-headings: true
  title: Test

pandoc 
  to: rtf
  output-file: test.rtf
  standalone: false
  default-image-extension: png

metadata
  title: Test

pandoc 
  to: tei
  output-file: test.tei
  standalone: false
  default-image-extension: png

metadata
  title: Test

Output created: test.html

examine output files:

  • test.html and test.tex are full documents.

Expected behavior

When standalone: false, test.html and test.tex should include only the body of the document.

Actual behavior

When standalone: false, test.html and test.tex produce a standalone document.

Your environment

  • IDE: VSCode
  • OS: Windows 11
  • Quarto: 1.4.444

Quarto check output

Quarto 1.4.444
[>] Checking versions of quarto binary dependencies...
Pandoc version 3.1.8: OK
Dart Sass version 1.55.0: OK
Deno version 1.33.4: OK
[>] Checking versions of quarto dependencies......OK
[>] Checking Quarto installation......OK
Version: 1.4.444
Path: C:\Users\Guillaume\AppData\Local\Programs\Quarto\bin
CodePage: 1252

[>] Checking tools....................OK
TinyTeX: (not installed)
Chromium: (not installed)

[>] Checking LaTeX....................OK
Using: Installation From Path
Path: C:\texlive\2023\bin\windows
Version: 2023

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

ERROR: The file cannot be accessed by the system. (os error 1920): ...

@GuillaumeDehaene GuillaumeDehaene added the bug Something isn't working label Oct 24, 2023
@GuillaumeDehaene GuillaumeDehaene changed the title Yaml header standalone does not work Yaml header option standalone: false does not work Oct 24, 2023
@olivroy

This comment was marked as off-topic.

@mcanouil
Copy link
Collaborator

mcanouil commented Oct 26, 2023

You seem to imply the option worked before, did you try in earlier version including 1.3 stable version?

@dragonstyle
Copy link
Collaborator

Both our PDF format and HTML formats can't emit standalone HTML since many features of Quarto depend upon the inclusion of code outside the body of the document.

@dragonstyle dragonstyle closed this as not planned Won't fix, can't repro, duplicate, stale Nov 28, 2023
@GuillaumeDehaene
Copy link
Author

@dragonstyle , that's another way to resolve the issue.

The option is mentioned in the docs here for html and there for pdf (and probably in other places; extensions perhaps?).

Shoud I open another issue for the docs, or would you rather reopen this issue?

mcanouil added a commit to mcanouil/quarto-cli that referenced this issue Nov 29, 2023
@mcanouil mcanouil linked a pull request Nov 29, 2023 that will close this issue
@mcanouil
Copy link
Collaborator

I am reopening as documentation until my PR to remove the option is merged.

@mcanouil mcanouil reopened this Nov 29, 2023
@mcanouil mcanouil added documentation Doc improvements & quarto-web and removed bug Something isn't working labels Nov 29, 2023
@cscheid cscheid added this to the v1.5 milestone Nov 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Doc improvements & quarto-web pandoc
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants