ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "John R. Culleton" <john@wexfordpress.com>
Subject: Ugly hack for multiple MSWord docs.
Date: Tue, 13 Jun 2006 18:29:58 -0400	[thread overview]
Message-ID: <200606131829.58862.john@wexfordpress.com> (raw)

Frequently I find myself in the position of needing to combine
several MSWord and/or rtf documents into a single file for either
pdftex or Context. I have settled on this strategy. 

1. If necessary I convert the documents to rtf with Open Ofice
Writer. 
2. I convert the resulting  rtf documents to LaTeX using rtf2latex2e.
3. I need to rename some of the LaTeX commands to their plain 
TeX or Context equivalents, and simply ignore others. Instead of
editing each and every occurrence, I add the following to my
"macros.tex" file which heads up the document:
----------------------------------------------------
\def\documentclass{}
\def\newcommand{}
\def\usepackage{}
\def\tab{}
\def\hspace{}
\def\begin{}
\def\end{}
\def\textbf#1{\bf #1}
\def\nobreakspace{~}
\def\underline{}
\def\newpage{}
\def\textmd#1{\rm #1}
\def\textit#1{\it #1}
\def\large{\tfb}
\def\reg{\rm\char174\ }
\def\textregistered{\reg}
------------------------------------------------------

I create a master file that calls in each of the .tex files
and compile the whole goulash. If I missed a latex tag then I add
it to my \defs shown above and recompile until I get a
clean run. Now I have a readable pdf file and can start correcting
the format. 

The scattered Latex tags give me hints where centering etc. might
be needed even though the tags are inoperative in Context, thanks
to my nullifying \def statements shown above.  

Someday there will be an elegant solution to the MSWord to
Context problem. For now there is my ugly hack as described here.

-- 
John Culleton

             reply	other threads:[~2006-06-13 22:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-13 22:29 John R. Culleton [this message]
2006-06-15 12:50 ` Hans Hagen
2006-06-15 18:35   ` John R. Culleton
2006-06-15 17:55     ` Hans Hagen
2006-06-15 22:46       ` John R. Culleton
2006-06-19  7:44         ` luigi scarso
2006-06-15 16:45 ` Bob Kerstetter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200606131829.58862.john@wexfordpress.com \
    --to=john@wexfordpress.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).