3

I need to write an article, the template is provided in MS Word, however the file they accept could be either PDF or MSWord. Then I prefer to write it in latex.

From this question it seems there is no tool for automatic conversion. but I would like to create a latex template manually which covers some basic features. So I would like to find the simplest way to get the following correspondences. I guess it could be a useful question for those who want to start a manual conversion.

Size:

  • Page Size: Letter: 21.59cm x 27.94cm
  • Margins : Top:2.54 cm, Bottom: 2.79 cm, left:1.9cm, Right:2.16cm
  • Two columns, 8.36 wide, Spacing: 0.81cm

Fonts:

  • Text : Times New Roman, 10 pt
  • Heading: Times New Roman, bold 12 pt
  • Subheading: Times New Roman, Regular, 11pt
  • Title : Century, Bold, 18pt
  • Abstract: Times New Roman, 9pt
  • References: Times New Roman, 9pt

Paragraphs:

  • Line Spacing : single
  • Paragraph Spacing : Before: 0pt, After: 0pt
  • Indentation : Before Text: 0pt, After text: 0pt, Special: First Line: 0pt
  • Heading spacing: Before : 20pt, After:10pt
  • Subheading spacing: Before : 10pt, After: 10pt

Captions:

  • Figure Captions: 8pt
  • Tables caption: 8pt
  • Table content: 9pt
  • Table headings: 9pt, bold

Page Numbers:

  • No page number
  • 1
    What about the paper size: A4, US-Letter (8.5" x 11.0"), or something else? – Mico Jun 12 '16 at 13:51
  • 2
    Please note that font size specifications etc. from Word are not directly usable for LaTeX! – user31729 Jun 12 '16 at 14:07
  • 4
    Before we explore any further, since a Word template (and just word) is provided, are you sure you are allowed to submit in another format? – Johannes_B Jun 12 '16 at 14:16
  • 7
    @Ahmad -- just because they want it in pdf doesn't mean they will end up using your pdf file. i have just been through an exercise of preparing an article in latex, submitting the pdf file, and having to identify many corrections because the text was cut-and-pasted from the pdf into word and thence into indesign. things like "ff" ligatures were lost, spacing was quite amazingly "revised" by automatic processes, and there were other horrors too complicated to mention. (fortunately, the editor was understading.) please, for your own sake, find out exactly how your submission will be handled. – barbara beeton Jun 12 '16 at 16:20
  • 2
    I recommend converting from Word using wvware in the first instance. The result will not match the original perfectly and you will need to clean it up, but it usually provides a reasonable approximation. Note, however, that it always loads the obsolete times package when I use it, regardless of the original font. You can't directly translate many of those requirements into LaTeX regardless. However, if it needs to look like Word try loading the philosophy package which provides philosophy.sty. It is quite good: the result looks almost as bad as Word. – cfr Jun 12 '16 at 19:34
10

Here's a suggested template, to be saved in a file named word2latextemplate.sty. I've had to fill in some gaps with educated guesses, as your instructions aren't nearly enough to define a template unambiguously.

%%% Save this file as 'word2latextemplate.sty'
%%% Load it from the main tex file via "\usepackage{word2latextemplate.sty}"

\ProvidesPackage{word2latextemplate}[2016/06/12]

\twocolumn

\usepackage{newtxtext,newtxmath}      % Times Roman clone

\usepackage[top=2.54cm, bottom=2.79cm, left=1.9cm, right=2.16cm, 
            columnsep=0.81cm, letterpaper]{geometry}

\usepackage{sectsty}
\sectionfont{\large} % 12pt
\subsectionfont{\fontsize{11}{13}\selectfont\mdseries}

\setlength\parindent{0pt} % no indentation of first line of paragraphs

\usepackage{caption}
\captionsetup{size=footnotesize, % 8pt
              font=bf, % bold
              skip=0.25\baselineskip}

\usepackage{etoolbox}
\AtBeginEnvironment{abstract}{\small} % 9pt in 'abstract' env.
\apptocmd{\@xfloat}{\small} % 9pt in tables and figures
% no page numbers on title pages:
\apptocmd{\maketitle}{\thispagestyle{empty}}{}{} 
% no page numbers on 'plain' pages
\pagestyle{empty} 

\endinput % end of "word2latextemplate"

Load it from your main tex file with the instruction \usepackage{word2latextemplate}.

Note that I didn't try to resolve what I perceive to be a conflict between the requirements "Tables caption: 8pt" and "Table headings: 9pt...". I gave the nod to the first-mentioned requirement.

Note also that not all formatting-related instructions are contained in the style file. Some additional formatting still has to be performed in the main tex file, as is done in the following MWE (minimum working example). Specifically, font-related commands have to be provided in the argument of \title.

\documentclass{article}
\usepackage{word2latextemplate}
\usepackage{lipsum}  % for filler text
\begin{document}

\title{\renewcommand{\rmdefault}{qcs} % Century clone
       \fontfamily\familydefault
       \fontsize{18}{22}\selectfont  % set font size
       \bfseries                     % set bold weight
       Article Title}
\author{FirstName LastName}
\date{January 1, 3001}
\maketitle

\begin{abstract}
\lipsum[2]
\end{abstract}

\section{Hello World}
\subsection{Good Morning}

\lipsum[2-4]

\begin{table}[h!]
\small  % switch to 9pt font size for body of 'table' env.
\caption{A table}
\centering
\begin{tabular}{lll}
\hline
a & b & c \\
d & e & f \\
\hline
\end{tabular}
\end{table}

\lipsum[6]

\end{document}

Here's a screenshot to go with the MWE:

enter image description here

  • Thank you very much, just as I see your output, there is an indentation for the first line of each paragraph, while in my template there is no indentation, 0pt before text – Ahmad Jun 13 '16 at 4:27
  • @Ahmad - I've added an instruction to the .sty file. I must say I was confused by the indentation-related instruction, especially the "After text: 0pt" part. I thus thought it (along with the "Before text: 0pt" part) was referring to some kind of block indentation of every paragraph! – Mico Jun 13 '16 at 5:33
  • Why do not use \appto{\table}{\small} to change the size of the font inside a table? – Guido Jun 13 '16 at 5:52
  • @Guido - Your suggestion may not work if there's a positioning specifier associated with the table. E.g., \begin{table} should be OK but \begin{table}[t] is not. – Mico Jun 13 '16 at 7:09
  • 1
    @Ahmad - May I suggest that you post a new query, in which you ask about how to go about instructing MiKTeX to install missing packages? – Mico Jun 13 '16 at 16:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.