When students submit papers electronically as
.docx files, I prefer
to convert them to
You’ll need to have
pandoc, and LaTeX (with
installed. Here’s the easy, three-step process:
- Download all the
.docxfiles to a single directory
- Rename the files to remove spaces and replace them with
underscores (which makes the next step easier):
rename 's/ /_/g' *.docx.
- Edit: You do not have to do this if you include quotation
"$i"in step 3. I just found it easier to deal with filenames without spaces.
- Edit: You do not have to do this if you include quotation marks around
- Create a simple for loop to run
pandocover all the files:
for i in *.docx ; do echo "$i" && pandoc --variable mainfont="Minion Pro" --variable sansfont="Myriad Pro" --variable monofont="Inconsolata" --variable fontsize=12pt --latex-engine=xelatex "$i" -o "$i.pdf" ; done
- You can change all the different fonts there that you want. I prefer Minion Pro, etc.
One you do this, you’ll have a set of nice, consistently formatted