Skip to content

bbernicker/rtf2latex2e

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NOTE: This is a fork of rtf2latex2e which is available from:

https://sourceforge.net/projects/rtf2latex2e/

Release 2.2.4 fixes compilation failures on modern GCC

Release 2-2-3 adds the option to delimit LaTeX equations by (...) instead of $...$ and [...] instead of $$...$$

Release 2-2-2 adds conversion of Word's EQ fields and fixes the missing -lm flag in the gcc compiler call in Makefile

This is rtf2latex2e version 2.2 that

  1. detects text style: bold, italic, color, big, small,...
  2. reads embedded figures: PICT, EMF, GIF, TIFF, WMF, PNG, JPEG
  3. reads tables: simple to semi-complex
  4. equations: converts embedded MathType equations and EQ fields
  5. symbols: converts most greek and math symbols
  6. reads footnotes (not in tables yet)
  7. translates hyperlinks using the hyperref package
  8. converted latex file uses utf8
  9. supports codepages 1250, 1251, 1252, 1254, mac, NeXt
  10. converts RTFD (rtf directories)
  11. extended preferences
  12. internal document page references
  13. save all converted files in a separate directory

WHAT YOU WILL GET:

rtf2latex2e converts an RTF file to LaTeX and saves any image files found inside. Using pdflatex on the resulting latex file will require that these images be converted by you to some image format supported by pdflatex.

If you expect a WYSIWYG reproduction of your RTF file, you may be disappointed. My main concerns have been translating the essential features of the RTF file such as characters, figures, tables, and equations (as pictures). I have largely ignored visual formatting such as ruler positions, tabs, paragraph indentations, and other fluff. Expect the output LaTeX file to require manual editing to put the finishing touches. I just want to make that task a little easier. In my opinion, expecting a WYSIWYG reproduction is not practical and misses the point entirely.

The user has some control over how good the visual fidelity is. For example

prompt> rtf2latex2e -t 0 -p 0 test/test.rtf

will produce a file 'test/test.tex' that has no paragraph formatting or text formatting. Two other useful variants are

prompt> rtf2latex2e -n test/test.rtf

which makes a file with reasonable latex mark-up. Fussy details about paragraph indenting and spacing are left to latex and some work will be needed to identify paragraphs that should not be indented, etc., Finally

prompt> rtf2latex2e -b test/test.rtf

will try all sorts of things to get the formatting correct. This comes at the expense of extensive formatting ``noise.''

Typeset the rtf2latexDoc.tex for more information, or print out the rtf2latexDoc.pdf file. They are in the documentation directory.

The file Release-notes.txt usually has more up-to-date info.

INSTALLATION AND USE:

rtf2latex2e was developed on under Mac OS X but should compile under any Unix variant. Windows users should compile under something like MinGW.

As of version 2.2.0, rtf2latex2e uses unoconv to convert EMF, WMF, and PICT images to PDF files. unoconv in turn use LibreOffice to do the actual conversion.

To build rtf2latex2e, change to the Unix directory directory, type:

make make test make install (optional, as root)

By default the executable is installed as /usr/local/bin/rtf2latex2e. Support files will installed in /usr/local/share/rtf2latex2e

You can change the directory into which rtf2latex2e is installed by editing the variable PREFIX in the Makefile. You may need to become super-user to install into that directory. If you do not have super-user privileges, you can change the PREFIX to somewhere in your home directory, say $(HOME)/rtf2latex2e.

WINDOWS:

Windows users get a pre-compiled binary rtf2latex2e.exe to be run from the MS-DOS prompt.

THE r2l-pref PREFERENCE FILE:

rtf2latex2e reads a preference file r2l-pref that allows one to specify many settings. Read the comments in the preference file for details.

THE r2l-head file:

Allows you to insert text directly into the preamble of the converted doument.

THE r2l-map file:

Allows some direct mapping of paragraph styles to latex commands. There are only three styles defined at the moment. These convert the style 'heading 1' to \section

LEGAL STUFF:

(c) Ujwal S. Sathyam and Scott A. Prahl, 1999, (c) Scott A. Prahl, 2012

The author provides this software as is and does not take any responsibility for the consequences of running it (unless it is good, of course...). This is beta software, so treat it as such.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

The writer and driver parts of the code are copyright Ujwal Sathyam. The reader part of the code was written by Paul DuBois of the Univ. of Wisconsin Primate Center.

Packages

No packages published

Languages

  • Rich Text Format 89.1%
  • C 10.1%
  • PostScript 0.4%
  • Makefile 0.3%
  • TeX 0.1%
  • Perl 0.0%