DEV Community

Pacharapol Withayasakpunt
Pacharapol Withayasakpunt

Posted on

How do you ensure consistent formatting in MS Word?

Do you consistently use Styles pane, or create programmatically; or use some other softwares?

Not sure if LibreOffice even solves this problem better.

Top comments (9)

Collapse
 
stereoplegic profile image
Mike Bybee

Yes, styles and choosing the appropriate elements is key to getting any consistency whatsoever.

What I've found helps is to start my document in markdown, and convert it to two files using pandoc. The first one will serve as your template for the second pandoc conversation. I use the exact same source markdown, so I can predict how the finished product will look with proper font sizes, styles, and margins as much as possible (all tweaked in the Word/LibreOffice styles pane of the first output template file).

Then, when I'm finished writing my markdown, I fire a second pandoc command of:

pandoc -t docx file-name.md --reference-doc=path-to-your-file/reference.docx -o file-name.docx
Collapse
 
waylonwalker profile image
Waylon Walker

I have switched completely to markdown unless I need to work with someone else who cannot use markdown for the reason of such inconsistent and impossible to manage styles.

The worst is image anchoring and content getting tossed all over the page with the smallest of change.

Also it's been years since I have wrote anything for print. I don't like how it constrains you to pages most commonly 8.5X11.

Collapse
 
patarapolw profile image
Pacharapol Withayasakpunt

I don't think Markdown allows you to embed images directly. So, any kind of management software?

Collapse
 
stereoplegic profile image
Mike Bybee • Edited

You can use markdown image tags inline e.g.

Lorem ipsum ![congration you done it] (https://dev-to-uploads.s3.amazonaws.com/i/cf8tc0ao0ljg6i2gzza4.jpg) dolor sit amet.

Lorem ipsum congration you done it dolor sit amet.

You'll need to supply the correct size image or use pandoc with either markdown strict mode or disabling markdown in HTML blocks in conjunction with HTML tags with width and/or height and and/or align attributes (instead of standard markdown image syntax shown above) to truly inline images with proper size.

Thread Thread
 
patarapolw profile image
Pacharapol Withayasakpunt

So, I have to put my image online?

I know I can put image files alongside Markdown files, all locally, but folder structure might be quite... fixed.

Thread Thread
 
waylonwalker profile image
Waylon Walker

I see what your asking, markdown renders out to HTML. so your images have to be available to the client somehow. hosting them online is the easiest (doesn't have to be public, but has to be accessible by the client)

So yes if you reference local files like that, just like with a static website the orientation to your images must always be the same.

Thread Thread
 
stereoplegic profile image
Mike Bybee

You can use relative paths. To be honest, the only Word documents I've made in probably the last 2-3 years were resumes, cover letters, proposals, and agreements/contacts, so no images involved.

Collapse
 
waylonwalker profile image
Waylon Walker

Some places like gitlab allow you to drag and drop in. I understand each has their place and there are times that word makes more sense. I just don't have that use case post-university as much as I would have during my education.

I have also used forestry for my personal blog.

waylonwalker.com/blog/forestry-io/

Collapse
 
lexlohr profile image
Alex Lohr

Even with programmatic styles, just changing the printer will re-format the whole document. The only way to be 100% consistent is to use a PDF printer in all cases.