# Using pandoc to convert tutorial project to a docx file

**URL:** <https://forum.literatureandlatte.com/t/using-pandoc-to-convert-tutorial-project-to-a-docx-file/140789>\
**Category:** Scrivener\
**Tags:** support, compile, markup\
**Created:** [May 23, 2024, 9:33pm UTC](https://forum.literatureandlatte.com/t/using-pandoc-to-convert-tutorial-project-to-a-docx-file/140789 "2024-05-23T21:33:25Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![AmberV](https://forum.literatureandlatte.com/user_avatar/forum.literatureandlatte.com/amberv/32/13021_2.png) [@AmberV](https://forum.literatureandlatte.com/u/AmberV)\
**Post date:** [May 24, 2024, 7:17pm UTC](https://forum.literatureandlatte.com/t/using-pandoc-to-convert-tutorial-project-to-a-docx-file/140789/4 "2024-05-24T19:17:25Z")

</div>

To change the default look, use `pandoc --version` on the command-line to have it print out where your data configuration folder should be. On my system, it defaults to ~/.local/share/pandoc. It probably won’t exist yet, so run `mkdir -p ~/.local/share/pandoc` to build the directory structure in one shot.

Next, use `cd ~/.local/share/pandoc` to change directories to the data dir, and use this command:

```bash
pandoc -o reference.docx --print-default-data-file reference.docx

```

Open that in your word processor, and design the look you want by modifying the styles it provides. Pandoc advises not changing the boilerplate text, but it’s okay to add your own styles, which you can [make use of as markup](https://pandoc.org/MANUAL.html#custom-styles), or modify styles that are in the document but not previewed (e.g. to design the ToC which may be stylesheet driven; at least it is in ODT, not sure about DOCX).

Calling it “reference.docx” will change the _default_ for all new .docx files you generate with Pandoc. So to use this you don’t have do anything other than selecting Pandoc → DOCX in the compile window.

You can make your own templates in this same folder as well, just change the name after the `-o` in the command above. You would then call upon this with: `pandoc --reference-doc=name-of-template.docx`, which is something you can insert into your Processing pane, in the compiler to automate that straight out of Scrivener, rather than having to compile to .md and then use the command-line after compiling.

---

_[View the full topic](https://forum.literatureandlatte.com/t/using-pandoc-to-convert-tutorial-project-to-a-docx-file/140789)._
