Closed goska closed 8 years ago
Yeah, this is tricky because LaTeXML's processing order isn't quite the same as with LaTeX+BibTeX, namely LaTeXML converts the whole thing to XML for later use and doesn't know how or if all the fields will be used. For some fields a % gets treated as a comment and for others it doesn't.
In principle, a simple extension would get adsurl treated correctly. You'd create binding containing (something like) the following:
use LaTeXML::Package;
DefConstructor('\bib@field@default@adsurl Semiverbatim',
"<ltx:bib-url href='#1'>Link or whatever</ltx:bib-url>");
1;
If you named it adsurl.sty.ltxml, then you could invoke it by adding
--preload=adsurl.sty
to the commandline.
(or you could add the DefConstructor to some other binding, if you've already got one).
Or, maybe that's not the real problem...
Actually, you should change the "Semiverbatim" above to "Verbatim", then it should work.
Well that was anticlimactic.
Yes, perhaps so; it'd be nice if we could automatically know which non-standard fields held URL's, but searching for the string "url" doesn't seem sensible.
It's probably worth doing a git pull, since there have been some subtle fixes to verbatim, %, and so on. But I guess I'll go ahead and close this. If you need help in figuring out how/where to put that code snippet, either re-open the issue, or ask us on the mailing list.
Thanks for the report.
Thanks. I'll see how far I can get with the information you have given so far. As I have not developed anything LaTeXML-related so far (apart from simple css and XSLT sheet modifications), I may need more hints.
Thanks! I have implemented a binding for adsurl using your code (with "Semiverbatim"), which works and produces nice hyperlinks to ADS pages in bibliography in the HTML. I have called the binding ads_support.ltxml
and I used it to convert bib
file to XML using the following:
$ latexml --dest=mybib.bib.xml --preload=ads_support.ltxml --preload=aa.cls.ltxml mybib.bib
I am not sure which package it should belong to.
I am experiencing problems with conversion of documents and bibliographies containing
adsurl
s of Astronomy and Astrophysics articles, which contain strings%26
(url encoded & in A&A). LaTeXML generates malformedbibentry
elements for such bib records: closingbib entry
tag and and anybib-data
followingbib-data
withadsurl
role are missing. Using LaTeXML 0.8.1 running under MacOS X 10 with TeXLive, aa style bibliography and standard LaTeX report document class. For example:yields
Thanks