-
-
Notifications
You must be signed in to change notification settings - Fork 178
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
Update defaults.md with export to Word docx #155
base: master
Are you sure you want to change the base?
Conversation
Information about Word Reference docx and defaults file. Small addition of noting that the default files are found in Assets manager.
docs/en/core/defaults-files.md
Outdated
|
||
#### Reference Document | ||
|
||
Use an existing Word document or download the reference.docx from Pandoc and change the styles. Your reference doc is a Word file that you format to your preferences. You need to adjust the Word Styles (Paragraph, Heading, Body Text, Footnote Text, etc) for it to apply. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pandoc explicitly states to NOT use any word document. Instead, try the following (please adapt the wording):
You can either download the reference file from the Pandoc repository or use the Pandoc that ships with Zettlr to export it
And then provide both methods, i.e.:
Download:
- Open https://github.com/jgm/pandoc/tree/master/data/docx
- Click on the three dots
- Select "Download directory"
- ZIP the directory, and then exchange ".zip" to ".docx"
Pandoc CLI: pandoc -o custom-reference.docx --print-default-data-file reference.docx
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ouh, alright, then it's probably the GitHub extension I have installed. Then … nevermind. Feel free to adapt the wording so that it's correct (zipping that directory and renaming it from .zip
to .docx
will still work)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried to do that and it didn't work for me. I think it worked in the past though, so I assume it'll work for others. I included it in the updated file anyways.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is more of a request, but maybe you could include a copy of the reference documents in the Zettlr or Zettlr docs repos, and then add a link to it in documentation, so that it's easier for people to find and download.
I don't really have much experience with command lines or github, so personally, it was a complicated and time consuming experience in trying to find the reference document to edit. I couldn't figure out where Pandoc was saving the doc or what I needed to change for it to show up or how to download it from github.
docs/en/core/defaults-files.md
Outdated
@@ -79,3 +79,47 @@ variables: | |||
``` | |||
|
|||
You can also make use of this templating system yourself. If you want to write a custom template, you can add statements such as `$if(myvariable)$$myvariable$$endif$` and insert the variable `myvariable` into any frontmatter or defaults file, and it will be replaced with whatever value you set it to. | |||
|
|||
|
|||
### Microsoft Word Template (.docx) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also add the fact that exactly the same holds true for ODT-documents and PowerPoint presentations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some things, mainly wording, but other than that it looks pretty good! Thank you already for the work.
docs/en/core/defaults-files.md
Outdated
|
||
Use an existing Word document or download the reference.docx from Pandoc and change the styles. Your reference doc is a Word file that you format to your preferences. You need to adjust the Word Styles (Paragraph, Heading, Body Text, Footnote Text, etc) for it to apply. | ||
For best results, it is recommended to download the reference document directly from Pandoc. It should already be installed with Zettlr, but if not, see [Pandoc installation](https://docs.zettlr.com/en/installing-pandoc/) instructions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you use Pandoc to spit it out on the command line, it does not necessarily constitute a "download", so I would rephrase to:
For best results, it is recommended to retrieve the reference document directly from Pandoc. It comes bundled with Zettlr, but if not, see the Pandoc installation instructions.
Use an existing Word document or download the reference.docx from Pandoc and change the styles. Your reference doc is a Word file that you format to your preferences. You need to adjust the Word Styles (Paragraph, Heading, Body Text, Footnote Text, etc) for it to apply. | ||
For best results, it is recommended to download the reference document directly from Pandoc. It should already be installed with Zettlr, but if not, see [Pandoc installation](https://docs.zettlr.com/en/installing-pandoc/) instructions. | ||
|
||
##### Option 1: Using Pandoc from Command line or Terminal |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since option 2 is definitely more cumbersome, I would suggest to remove that option and only leave this option.
docs/en/core/defaults-files.md
Outdated
|
||
##### Option 1: Using Pandoc from Command line or Terminal | ||
|
||
In the command line: `pandoc -o "custom-reference.docx" --print-default-data-file reference.docx` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rephrase:
In order to retrieve a reference document, run any of the following commands to create the file
custom-reference.docx
,custom-reference.pptx
, orcustom-reference.odt
:
And then list all three, but in a codeblock
docs/en/core/defaults-files.md
Outdated
|
||
In the command line: `pandoc -o "custom-reference.docx" --print-default-data-file reference.docx` | ||
|
||
To adjust the name or location of where the document is saved, you can change `"custom-reference.docx"` to include the absolute path: `"/Users/[user]/Downloads/project-reference.docx"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the path only applies to macOS, I would suggest to say the following (or something along these lines): " … to include the absolute path, e.g., for macOS you could use …"
docs/en/core/defaults-files.md
Outdated
|
||
To adjust the name or location of where the document is saved, you can change `"custom-reference.docx"` to include the absolute path: `"/Users/[user]/Downloads/project-reference.docx"` | ||
|
||
##### Option 2: Download from Pandoc Github repository |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this option
@@ -113,13 +156,18 @@ self-contained: true | |||
etc. | |||
``` | |||
|
|||
More options for the writer can be found [here](https://pandoc.org/MANUAL.html#options-affecting-specific-writers-1), including options for numbered headings, the table of contents, etc. | |||
Zettlr will search for the reference document in the same directory as the Markdown files that you're exporting. If you want different formatting for different projects and files, it can be convenient to have a custom-reference.docx within each of those folders. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really? Never tried this myself.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes it definitely works! I have a different custom-reference.docx for each project, and as long as they're in the correct folder, Zettlr uses the right one, which is really convenient for all the different types of reports I need.
docs/en/core/defaults-files.md
Outdated
3. Change the Defaults file in Assets Manager to include that file | ||
4. Adjust any other parameters in the Defaults Manager. | ||
5. Export as Word Document | ||
1. Download the custom-reference.docx from Pandoc |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1. Download the custom-reference.docx from Pandoc | |
1. Retrieve the appropriate reference document from Pandoc |
docs/en/core/defaults-files.md
Outdated
4. Adjust any other parameters in the Defaults Manager. | ||
5. Export as Word Document | ||
1. Download the custom-reference.docx from Pandoc | ||
2. In Word, change the format of that document using Styles Pane or Organizer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2. In Word, change the format of that document using Styles Pane or Organizer | |
2. In Word, change the format of that document using Styles Pane or Organizer; analogously with OpenDocument documents |
docs/en/core/defaults-files.md
Outdated
5. Export as Word Document | ||
1. Download the custom-reference.docx from Pandoc | ||
2. In Word, change the format of that document using Styles Pane or Organizer | ||
3. Place that .docx in the same folder with Markdown files for this export or get the absolute path name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
3. Place that .docx in the same folder with Markdown files for this export or get the absolute path name | |
3. Place that reference file in the same folder as the Markdown files for this export or get the absolute path name |
docs/en/core/defaults-files.md
Outdated
3. Place that .docx in the same folder with Markdown files for this export or get the absolute path name | ||
4. Adjust the Defaults file in Zettlr Assets Manager to include that file name | ||
5. Adjust any other parameters in the Defaults Manager | ||
6. Export as Word Document in Zettlr |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
6. Export as Word Document in Zettlr | |
6. Export using the appropriate exporter profile in Zettlr |
Need to format the image still and upload it.
Information about Word Reference docx and defaults file. Small addition of noting that the default files are found in Assets manager.