From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/28568 Path: news.gmane.org!not-for-mail From: "John R. Culleton" Newsgroups: gmane.comp.tex.context Subject: Ugly hack for multiple MSWord docs. Date: Tue, 13 Jun 2006 18:29:58 -0400 Organization: WexfordPress Message-ID: <200606131829.58862.john@wexfordpress.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1150368905 7881 80.91.229.2 (15 Jun 2006 10:55:05 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 15 Jun 2006 10:55:05 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Thu Jun 15 12:54:50 2006 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by ciao.gmane.org with esmtp (Exim 4.43) id 1FqpUg-0005Kf-MX for gctc-ntg-context-518@m.gmane.org; Thu, 15 Jun 2006 12:54:35 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 3527D12857; Thu, 15 Jun 2006 12:51:58 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 31285-05-52; Thu, 15 Jun 2006 12:51:54 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id E58121282A; Thu, 15 Jun 2006 12:51:06 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id F04D1127A0 for ; Tue, 13 Jun 2006 23:33:58 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 02110-02 for ; Tue, 13 Jun 2006 23:33:56 +0200 (CEST) Original-Received: from mta11.adelphia.net (mta11.adelphia.net [68.168.78.205]) by ronja.ntg.nl (Postfix) with SMTP id 4E3031278E for ; Tue, 13 Jun 2006 23:33:55 +0200 (CEST) Original-Received: from 69-174-128-193.frdrmd.adelphia.net ([69.174.128.193]) by mta11.adelphia.net (InterMail vM.6.01.05.02 201-2131-123-102-20050715) with ESMTP id <20060613213352.EWPC17849.mta11.adelphia.net@69-174-128-193.frdrmd.adelphia.net> for ; Tue, 13 Jun 2006 17:33:52 -0400 Original-To: mailing list for ConTeXt users User-Agent: KMail/1.9.1 Content-Disposition: inline X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.7 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:28568 Archived-At: 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