Sphinx restructuredText to HTML hyperlink conversion - hyperlink

I have a collection of reStructuredText files which link to each other in the following manner:
further reading at `document name <otherdoc.rst>`.
I have noticed that this works really well on BitBucket and Github, as .rst files are rendered quite nicely and the links in-between the files work.
However, now I wanted to generate HTML documents with Sphinx and noticed that Sphinx is not converting links like the example above to HTML links, so I have a bunch of HTML files with broken links. How can I fix this without breaking the links on GitHub and BitBucket?

From the Sphinx documentation on hyperlinks it seems that the syntax for inline external hyperlinks is
`Link text <http://example.com/>`_
Note the trailing _ just after the final back-tick. Try adding this underscore and seeing if this fixes your links in your Sphinx output.

Related

How to add hyperlink to bibliography titles in Jekyll using Jekyll-pandoc and jekyll-scholar bibtex renders?

I am using Jekyll with pandoc and Jekyll-scholar plugins to render bibtex database to appear on my static website. I wonder if there is any easy way to automatically add hyperlinks to all article titles of the rendered bibliography? I have tried to modify some CSL bibtex style template, but it doesn't seem to support hyperlink. I don't have any clue on how to using other methods to make it work.
A page I am working on can be found at http://i2000s.github.io/pubs/. The source code can be found at http://github.com/i2000s/i2000s.github.io/ (the Vita.html file). The configuration of Jekyll-scholar plugin can be found in the _config.yml file with more detailed information of the CSL style and bibtex files I am using. Thanks!

Generating a nice web documentation from .pdf or .tex

I wrote a documentation for an application in LaTex, and was wondering what the best way to display in a webpage. I can just convert it to HTML, but I'm wondering if there's a better way with all the nice css styling done automatically as in other web documentations.
I'm looking for something like Sphinx, but never used it, so not sure if it's a good solution to a document already made in .tex/.pdf
Here's what I did, (thx #Blender)
Exported the Latex file to html using tex4ht (texmaker) and used pandoc to convert the html file to reStructuresText, and edited that .rst to fit the specifications of sphinx. This was needed since I wanted to break the latex file to few different HTML files.
Then used sphinx to generate the PDF file. I think I'm going to keep writing in .rst, so it's easy to convert both to HTML, and PDF.
Adding the answer so anyone having the same problem will get some ideas.

Rendering equations with Doxygen and MathJax in CHM file

I've got doxygen configured so that I can get MathJax to render equations nicely in the HTML output. I had hoped that things would magically work with output to a CHM file (which is what I distribute), but unfortunately I was wrong.
Has anyone tried to do this before, and if so, how did you do it?
Anyway, use a tool (search for chmlib or "chm decompressor") to look inside the CHM, and check all relevant JS scripts and other files are there.
If Doxygen doesn't add all relevant files to the .hhp, it might be possible that the outdates html scanning of HTML help doesn't find and package all references to external files.

How do I convert HTML into document form? [duplicate]

This question already has answers here:
Convert HTML to word file ?
(2 answers)
Closed 8 years ago.
I'd like to be able to convert HTML to either docx or RTF. There are plenty of Ruby gems for creating docx and RTF docs, but they are just for creating an empty document, which you can then programmatically add stuff to.
The issue with those gems is there is no way to accurately convert the format of a webpage to be the same/similar on a printable page. There are a lot of complexities with HTML tags, and the position of those tags due to their CSS attributes.
With my current knowledge of the gems out there for RTF and Word creation, I'd have to write an HTML parser and convert all the HTML tags to similar openXML tags, such as bold, and italic, but then position things based on the CSS, but due to position: relative/absolute rendering a document page would be extremely difficult.
I'm wondering if there are any recent developments, or if there is some soon-to-be-released gem or service or tool to be able to handle this conversion.
There is a gem that is supposed to convert Word to and from HTML, but, it has no documentation, and can only be found at https://www.ruby-toolbox.com/gems/word_parsing and on rubygems. And, I've been unsuccessful installing it on my local machine, due to dependency issues. Since there is no documentation, there is no mention how to fix the dependencies.
There are services out there that will convert PDF to "word", and converting HTML to PDF has already been solved by multiple people or gems. This service: http://www.pdftoword.com/ converts PDF to RTF, and even separates out the images in the resulting document. Their issue is that it runs on a Windows server -- I need something cross platform, because the app I'm working on is Ruby on Rails running on Unix based servers.
I've published a little gem that generates docx files from html templates.
https://github.com/docxtor/docxtor
It can insert page numbers, footers/headers with given <div>'s contains, translate <h1> headings to document headings.
The catch is that all word processors parse docx format differently. So the resulting files are read just fine by Libre Office on Mac, but wouldn't open in Google Docs.
Any help and/or feedback on a gem is much appreciated!
I'm also looking for this kind of solution, I think it's better looking at on https://github.com/bagilevi/docx_builder. I haven't tried it yet however. Read this article also http://rubythings.blogspot.com/2011/05/creating-word-documents-in-rails.html
If someone could come up with a better solution, we all would be thankful :)

Using Ruby-on-Rails, Sphinx or UltraSphinx and an HTML source (not a database)

The documentation states for sphinx-0.9.9-rc2:
The data to be indexed can generally come from very different sources: SQL
databases, plain text files, HTML files, mailboxes, and so on.
However, I can't find any documentation on setting up a a source besides SQL. The config file doesn't seem to indicate that the source can be anything but a database. Anyone have any helpful links for setting up sphinx with an HTML source?
Are you looking for the xmlpipe (now called xmlpipe2) feature on Sphinx? I've tried it out for XML files and it works just like it does for SQL.
I haven't tried out Sphinx with vanilla HTML files, so I'm guessing you'll need to parse your HTML file and create XML files with the attributes/fields that you want indexed and feed them to Sphinx using xmlpipe.
You can see here and here for more.
HTH

Resources