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

Support for Merged Table Cells in all formats (particularly DOCX) and \(, \[ Math Delimiters in all formats #11761

Open
JamesSmith20 opened this issue Dec 31, 2024 · 0 comments
Labels
documentation Doc improvements & quarto-web

Comments

@JamesSmith20
Copy link

JamesSmith20 commented Dec 31, 2024

What would you like to do?

Give feedback or suggest an improvement

Description

1. Merged Table Cells in Word

According to the Quarto documentation on tables, it is not explicitly stated that merged cells are supported in Word output. However, Quarto natively supports grid_tables, which can render merged cells correctly across Word, HTML, and PDF formats. Here's an example:

---
title: "Quarto Playground"
format:
  docx
---

## Grid Table with Column Span

+---------------------+----------+
| Property            | Earth    |
+=============+=======+==========+
|             | min   | -89.2 °C |
| Temperature +-------+----------+
| 1961-1990   | mean  | 14 °C    |
|             +-------+----------+
|             | max   | 56.7 °C  |
+-------------+-------+----------+

The above example works seamlessly in all output formats, including Word. However, this functionality is not explicitly mentioned in the Quarto documentation, and including it would make this capability more visible to users.


2. Support for \( and \[ Math Delimiters

Currently, the Quarto documentation on equations does not mention support for LaTeX-style math delimiters \(...\) (inline) and \[...\] (block). It states that only $...$ and $$...$$ are supported for inline and block math. However, using Pandoc’s markdown+tex_math_single_backslash extension, Quarto can support these delimiters seamlessly across Word, HTML, and PDF formats.

Here is an example:

---
title: "Quarto Playground"
from: markdown+tex_math_single_backslash
format:
  docx
---

Inline math example: \( E = mc^2 \)

Inline math example: $E = mc^2$

Block math example:

\[ a^2 + b^2 = c^2 \]

$$
a^2 + b^2 = c^2
$$

This works well to render equations using the preferred LaTeX-style delimiters, which are consistent with LaTeX standards and widely used by large language models and other AI tools. Including this information in the official documentation would help users integrate equations more easily without manual adjustments.


Suggested Improvements:

  1. Document Merged Table Cells:

    • Update the table documentation to include the use of grid_tables for merged cells in Word, HTML, and PDF outputs.
    • Provide clear examples for users to replicate this functionality.
  2. Document Support for \( and \[ Delimiters:

    • Update the math documentation to mention the use of markdown+tex_math_single_backslash for LaTeX-style math delimiters.
    • Include examples to show how \(...\) and \[...\] can be used for inline and block math.

Benefits:

  • Makes Quarto’s capabilities more transparent to users.
  • Enhances usability for academic and technical writing by providing official guidance on:
    • Merged table cells in Word.
    • LaTeX-style math delimiters for consistency.

Related Discussions:

This request builds upon Discussion #11753 on Quarto’s GitHub platform.

Thank you for considering this enhancement to the documentation!

@JamesSmith20 JamesSmith20 added the documentation Doc improvements & quarto-web label Dec 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Doc improvements & quarto-web
Projects
None yet
Development

No branches or pull requests

1 participant