Word to Latex: Writing papers the right way
Published:
LaTeX is a document preparation system for high-quality typesetting. It is most often used for medium-to-large technical or scientific documents, but it can be used for almost any form of publishing.
Prerequisite
Pandoc: If you need to convert files from one markup format into another, pandoc is your swiss-army knife.
- JabRef: Native BibTeX and BibLaTeX support, perfect for text-based typesetting systems such as LaTeX and Markdown.
- Endnote
- Latex: MikTex, GhostScript and PDF viewer, and TexStudio
Workflow
Step1. Word2Latex using Pandoc
- Reference in word using Endnote
Reference in Latex using JabRef
- pandoc [options] [input-file]…
- -s: standalone
- –wrap=auto, none, or preserve
- –extract-media=. : extract figures from the document
Check details in the pandoc manual
pandoc --extract-media=. --wrap=none -s input.docx -t latex –o output.tex
Step2a. Equations, Tables and Figures using Latex
- Equations: Convert to default math function in Word
- Tables: https://www.tablesgenerator.com/
%equation
\begin{equation}
\label{eq:eq1}
x + y = z
\end{equation}
%table
\begin{table}[H]
\caption{Table 1\label{tab:tab1}}
\begin{tabular}{ll}
\toprule
Tabe Head
\midrule
text
\bottomrule
\end{tabular}
\end{table}
%figure
\begin{figure}
\caption{Figure 1\label{fig:fig1}}
\includegraphics[width=\linewidth]{Fig.jpg}
\end{figure}
Cite by: \ref{eq:eq1}; \ref{tab:tab1}; \ref{fig:fig1}
Step2b. Reference
- JabRef: Generate Citation keys (e.g., RN1)
%in the preamble
\bibliographystyle{plain}
%Where the bibliography will be printed
\bibliography{name of .bib file}
@book{RN1,
author = {Gastel, Barbara and Day, Robert A.},
title = {How to Write and Publisher a Scientific Paper},
publisher = {Cambridge University Press},
address = {New York, USA},
year = {2017},
type = {Book}
}
Cite by: \cite{RN1}
Step3. Adapting to any required format by journals
- Document class (e.g., elsarticle.cls)
- Bibliography style (e.g., elsarticle-num.bst)
%Default class: article, book, thesis
\documentclass[12pt]{article}
\bibliographystyle{plain}
%Elsevier
\documentclass[review]{elsarticle}
\bibliographystyle{elsarticle-num}