Skip to content

ttalVlatt/Quarto-Docx-Horizontal-Rule

Repository files navigation

Quarto-Docx-Horizontal-Rule

A simple Lua filter that converts .docx horizontal rule output from the default to a customizable line (single thin black line by default).

To use this filter

  1. Ensure the docx-horizontal-rule extension is in your _extensions folder

You can install the filter directly in the terminal with

quarto install extension ttalVlatt/Quarto-Docx-Horizontal-Rule

This assumes your terminal is set to the same directory as your project/.qmd script

  1. Add the horizontal rule to your markdown
Insert horizontal rule below here
---
There is my horizontal rule
  1. Add the following to your YAML header
---
title: "Testing"
format: docx
filters:
  - docx-horizontal-rule
---
  1. To customize the line, use the following optional fields in your YAML header
---
title: "Testing"
format: docx
filters:
  - docx-horizontal-rule
docx-hr-color: takes a color hex code input (no #) 
docx-hr-style: takes the multiple of lines you want (i.e., triple)
docx-hr-width: takes a numeric value for the width of the line in 20th of a ft point
---
  1. Here are a few examples of the output

Single 0.5pt line in black (the default output if no optional fields are supplied)

---
title: "Testing"
format: docx
filters:
  - docx-horizontal-rule
---
Screen Shot 2023-06-20 at 12 05 22 PM



Double 0.5pt line in 🐊 orange (note: you can fill some optional fields and leave others to default)

---
title: "Testing"
format: docx
filters:
  - docx-horizontal-rule
docx-hr-color: FA4616
docx-hr-style: double
---
Screen Shot 2023-06-20 at 12 08 19 PM



Triple 0.25pt line in 🐊 blue

---
title: "Testing"
format: docx
filters:
  - docx-horizontal-rule
docx-hr-color: 0021A5
docx-hr-style: triple
docx-hr-width: 5
---
Screen Shot 2023-06-20 at 12 13 05 PM



I wrote this little tool to help format my Quarto CV, but thought it might be useful for the wider community!

About

A simple Lua filter that converts .docx horizontal rule output from the default to a customizable line.

Topics

Resources

License

Stars

Watchers

Forks

Languages