473,396 Members | 1,989 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

translating LaTeX to XML

I have a LaTeX document describing a long list of items that I want to
translate to XML to treat these as a database. I've written a perl
script to do the basic translation, and a basic DTD file,
but I am stumped at translating
LaTeX character encodings to something XML won't choke on.

I found GNU recode to solve most of this, using

cat milestone.tex | recode -d tex..xml | itemdb -s xml -o milestone.xml

where itemdb is my perl script, and I've gotten rid of the diacritical
characters, but I'm getting errors with &s in URLs:

XML Parsing Error: not well-formed
Location: file:///home/friendly/SCS/Gallery/milestone/Private/milestone.xml
Line Number 2397, Column 101: <commentary
url="http://historical.library.cornell.edu/cgi-bin/cul.math/docviewer?did=00620001&seq=3"
text="Text of d'Ocagne'sbook on parallel coordinates" />
----------------------------------------------------------------------------------------------------^

(This is from the mozilla browser, trying to load the milestone.xml file.)
I'm pretty much a newbie with XML, so I don't know whether it is a
problem with my DTD or what tools are available (debian linux)

-Michael
--
Michael Friendly Email: fr******@yorku.ca
Professor, Psychology Dept.
York University Voice: 416 736-5115 x66249 Fax: 416 736-5814
4700 Keele Street http://www.math.yorku.ca/SCS/friendly.html
Toronto, ONT M3J 1P3 CANADA

Jul 20 '05 #1
1 2023
In article <c4**********@sunburst.ccs.yorku.ca>,
Michael Friendly <fr******@yorku.ca> wrote:

% url="http://historical.library.cornell.edu/cgi-bin/cul.math/docviewer?did=00620001&seq=3"

You must encode & as &amp; and < as &gt; anywhere they appear as text in
any XML document, so this should be

url="http://historical.library.cornell.edu/cgi-bin/cul.math/docviewer?did=00620001&amp;seq=3"

(Must might be a bit strong here, you could get away with &#x26; and &#x3c;
if you find that more aesthetically pleasing.)

--

Patrick TJ McPhee
East York Canada
pt**@interlog.com
Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Marc Giombetti | last post by:
Hello Want to ask your help for the following problem: I want to generate a GIF or PNG image from a latex expression like: $\lim_{x\to -\infty} x^m$ or $\int_{0}^{+\infty} e^{-x^2} dx$ or...
0
by: Bo Peng | last post by:
Dear list, I am writing a manual for my python extension using Python (2.4) latex classes. Everything seems to be fine except that the subscripts are as big as normal text ( see page 55 of...
1
by: Tom | last post by:
I need a very, very minimal LaTeX system on Windows. I only need to have the possibility to get DVI files out of my tex files (with minimal fonts). An I need it without any installer (no settings...
4
by: schwehr | last post by:
Hi All, Does anyone have a good template that I might use for writing a python paper in latex/bibtex? I've got the paper mostly done, but am having issues with the references. I am definitely...
8
by: fortuneteller | last post by:
Hello, I'm quite new to python and Scipy. Anyway I want to use it to plot graphs. Does anybody know if there is the possibility to use Latex in SciPy's plotting functions like gplt? Thanks...
2
by: Ezequiel, Justin | last post by:
> Anyone parsing simple LaTeX constructs with pyparsing? Greetings Tim, Have always wanted a way to parse LaTeX myself. Unfortunately, I have been moved to a different project. However, I am...
0
by: giovanni gherdovich | last post by:
Hello, first of all: Is this the right place to ask plastek-related questions? I'm trying to make plastex work on my Ubuntu Dapper Drake. For LaTeX, I have the all-in-one package tetex.
1
by: adina | last post by:
Hello there, I need some help with LaTex and processing images in LaTex. I realise that this is a C/C++ forum, but I was thinking that perhaps there are a some people who are interested in LaTex,...
5
by: vasan999 | last post by:
Basically, it should do all that any of the tools below and in addition, 1/ human readable output that maintains the text lines of the source, ie does not scramble the text lines or insert...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.