# Word2Tex in Mac OS

I apologize in advance if my question has ever been answered before but having searched among the related topics I did not find anything specific. My question is:

I run my TeX on Mac OS X Yosemite 10.10.4 I have the misfortune to have some word files with math I need a step-by-step instruction on how can I convert my word file into tex IN MAC.Unfortunately I do not have a Windows computer and have only Macbook Air at hand.

p.s. I only found some notes on how to do some whizzy stuff with terminal but I am by far a mere user of computer and would appreciate an advise for dummies.

• By far the easiest way is to just do it yourself. I'm afraid there's no good, automatic solution -- at least none that aren't terribly expensive. – Sean Allred Jul 13 '15 at 21:39
• Well, the darn truth at least... I tried the Pandoc thing, at least at an elementary level, I got the output using the command pandoc test1.md -s -o test1.tex which I learned from pandoc.org/getting-started.html#step-6-converting-a-file. However, it only gives you a .tex file which is not compilable; it basically gives the same result as if one just copy/pasted the word into LaTeX. Couple years ago when I was on Windows I used to know a clever method which gave something better but with Mac it seems things are humbler... – Loran Jul 13 '15 at 22:28
• In my experience, Word2TeX's results were... mixed. For shorter complex documents, it was simpler to just copy and paste the body text, then add figures, tables, and equations as needed. – Mike Renfro Jul 14 '15 at 2:00
• but a few days ago I tried pandoc on my windows laptop and for simple documents especially for test1.md, it gives fantastic results. see here – Sepideh Abadpour Aug 15 '15 at 13:51

I tried Pandoc for the first time, after a 2 minute debugging and removing some of the things that latex could not translate, I have a beautifully converted document from docx to tex. It works for me.

• I use the latest Mac MS Word
• Converted .docx to .tex
• If you need the figures to come along make sure to create the "media" folder within the "panic-test" folder, as per the instructions of the Getting Started instructions for pandoc

I did a test with my windows computer on pandoc,I think the results should be similar for Mac OS. I have two word files created with MS Word 2010. One of them is:

converting it to latex with the following command in windows command window:

pandoc test.docx -s -o test.tex


gives the result:

\documentclass[]{article}
\usepackage{lmodern}
\usepackage{amssymb,amsmath}
\usepackage{ifxetex,ifluatex}
\usepackage{fixltx2e} % provides \textsubscript
\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\else % if luatex or xelatex
\ifxetex
\usepackage{mathspec}
\usepackage{xltxtra,xunicode}
\else
\usepackage{fontspec}
\fi
\defaultfontfeatures{Mapping=tex-text,Scale=MatchLowercase}
\newcommand{\euro}{€}
\fi
% use upquote if available, for straight quotes in verbatim environments
\IfFileExists{upquote.sty}{\usepackage{upquote}}{}
% use microtype if available
\IfFileExists{microtype.sty}{%
\usepackage{microtype}
\UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts
}{}
\ifxetex
\usepackage[setpagesize=false, % page size defined by xetex
unicode=false, % unicode breaks when used with xetex
xetex]{hyperref}
\else
\usepackage[unicode=true]{hyperref}
\fi
\usepackage[usenames,dvipsnames]{color}
bookmarks=true,
pdfauthor={},
pdftitle={},
citecolor=blue,
urlcolor=blue,
pdfborder={0 0 0}}
\urlstyle{same}  % don't use monospace font for urls
\setlength{\parindent}{0pt}
\setlength{\parskip}{6pt plus 2pt minus 1pt}
\setlength{\emergencystretch}{3em}  % prevent overfull lines
\providecommand{\tightlist}{%
\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
\setcounter{secnumdepth}{0}

\date{}

% Redefines (sub)paragraphs to behave more like sections
\ifx\paragraph\undefined\else
\let\oldparagraph\paragraph
\renewcommand{\paragraph}[1]{\oldparagraph{#1}\mbox{}}
\fi
\ifx\subparagraph\undefined\else
\let\oldsubparagraph\subparagraph
\renewcommand{\subparagraph}[1]{\oldsubparagraph{#1}\mbox{}}
\fi

\begin{document}

\begin{itemize}
\item
pwd (or echo \%cd\% on Windows) to see what the current working
directory is.
\item
cd foo to change to the foo subdirectory of your working directory.
\item
cd .. to move up to the parent of the working directory.
\item
mkdir foo to create a subdirectory called foo in the working
directory.
\item
up-arrow to go back through your command history.
\item
tab to complete directories and file names.
\end{itemize}

http://www.bleepingcomputer.com/tutorials/windows-command-prompt-introduction/

\end{document}


run the code in latex and you will get the following pdf

The other word file is a more complex one, It's not exactly converted but it's satisfying. It's not just a copy and paste

I get the following result after converting to latex and then running the latex code. (Because the word file is for an article, I couldn't provide the whole latex code)

actually there are some shortcomings. I'm not asserting that It's perfect. I'm telling it's not just a copy and paste and can be helpful. In my second example I have bibliography in the text that is fully converted. Also tables are converted appropriately but my photos are not converted. For figures I think you should use the other answer. Because the text is one of my unpublished articles, I couldn't provide you the whole code. Indeed you will have some troubles with math formulas. Based on my experiments pandoc is not very good in converting complex lengthy math equations.

my bibliography is created with endnote and fully and perfectly converted

• No math or images in your examples, though. – JPi Aug 15 '15 at 15:19
• @JPi actually there are some shortcomings. I'm not asserting that It's perfect. I'm telling it's not just a copy and paste and can be helpful. In my second example I have bibliography in the text that is fully converted. Also tables are converted appropriately but my photos are not converted. For figures I think you should use the other answer. Because the text is one of my unpublished articles, I couldn't provide you the whole code. Indeed you will have some troubles with math formulas. Based on my experiments pandoc is not very good in converting complex lengthy math equations – Sepideh Abadpour Aug 15 '15 at 15:32
• my bibliography is created with endnote and fully and perfectly converted – Sepideh Abadpour Aug 15 '15 at 15:35

This website is in beta state but is constantly improving. If you follow all guidelines then you can get pretty descent ".tex" code and ".pdf". If you face any issues ,leave them a message and they will fix it.

Give it a try https://www.docx2latex.com/