A simple Lua filter that converts .docx horizontal rule output from the default to a customizable line (single thin black line by default).
- 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
- Add the horizontal rule to your markdown
Insert horizontal rule below here
---
There is my horizontal rule
- Add the following to your YAML header
---
title: "Testing"
format: docx
filters:
- docx-horizontal-rule
---
- 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
---
- 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
---
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
---
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
---
I wrote this little tool to help format my Quarto CV, but thought it might be useful for the wider community!