Is Free Software Ready For E-publishing? 221
johanneswilm writes "Over more than 3 years I have been writing my PhD thesis on the politics of Nicaragua. Being the most professional system for PDF generation, I went with LaTeX, and, to make the text accessible for the editors, I used the LyX editor. Now that the publication date comes near, I found I had to spend considerable time creating a script to convert the manuscript to formats such as Epub as none of the available tools were quite ready to do it automatically. Is LaTeX only good for writers in the natural sciences? Is the open source community boycotting ebook formats, as Richard Stallman has proposed? Are there better tools to do the same?"
You should had compared (Score:4, Insightful)
Being the most professional system for PDF generation, I went with LaTeX
Now that the publication date comes near, I found I had to spend considerable time creating a script to convert the manuscript to formats such as Epub
It sure sounds the like most professional system!
The truth is, if you want your job done, you look at the merits of every possible program without considering if it's open source or not. There are good software like Apache that are mostly good for web hosting (unless you have certain requirements). Then there is lots of shit. The same is true for proprietary software tho. But if you want to get something real done, it's just stupid to limit yourself to only open source OR proprietary software. Pick the best tool for the job.
Re:You should had compared (Score:5, Informative)
My fourth book (Go Phrasebook) is due to be published soon. I send 3 copies to the publisher:
The publisher can then just tweak the CSS for the ePub (XHTML) version. A C code listing has lots of span tags marking words as keywords, typedefs, macro uses, variables, and so on. How these are presented is controlled from the CSS, as is all of the rest of the styling.
The important thing is to make sure you separate content from presentation. If you use a lot of TeX markup in your chapters, then it's hard to use anything other than [La]TeX to typeset it. If you use simple semantic markup with all of the macros defined in a document class, then you can parse the same markup easily with something else and then transform it into some other format.
You could use some sort of XML and generate TeX from it, but typing XML is horrible. I like to work in vim, and with a couple of macros entering LaTeX is really easy.
Re: (Score:3)
For mathy stuff, LaTeX is great. I am not sure how to separate that content from the TeX itself. And I never understood why MathML did not just use TeX.
And I am a huge proponent of LyX. Much easier to get students to use than advocating vi+LaTeX....
Re: (Score:2)
My code doesn't convert the math stuff yet, but it's pretty easy to do. There are existing libraries out there that will generate MathML from LaTeX, and it's easy for a parser to detect math mode stuff bracketed by dollar signs and just pass that off to a library.
MathML didn't use TeX because it does more. TeX is great for typesetting maths, but it doesn't give you any semantic information. MathML captures both - how an equation should look and what it means, although both parts are optional.
Re: (Score:2)
What was wrong with using latex2html to generate hyperlinked files and such? What is the advantage of using your code? I did not see a readme or faq.
I have used latex2html successfully in a few cases, but maybe I am missing something.
Re: (Score:3)
Because it doesn't work? There is no generic LaTeX to HTML convertor out there, and all of them handle only specific use-cases.
In particular, all convertors either try to parse part of the LaTeX code or try to interpret the DVI that is produced as a result. With the first approach you'd have to limit your use of packages, because otherwise the convertor will fail unless it's a complete LaTeX implementation. With the second approach you won't be able to use XeLaTeX because it doesn't produce standard DVI fil
Re: (Score:2)
A quick google, looks like latex2html may work on files with UTF-8 chars in them:
After a lot of research I finally could find the right invocation of latex2html to generate HTML correctly with accents:
latex2html -html_version 4.0,latin1,unicode book.tex
From http://miguel.leugim.com.mx/index.php/2008/05/18/latex2html-and-utf8-encoding/ [leugim.com.mx]
But you are right on use of more interesting packages, latex2html probably can't handle them. But I don't see the advantage of writing my own code and limiting myself to simple cases.
Re: (Score:2)
Meh, it worked OK for my thesis. I managed not to need too many international characters, I guess.
lyx (eventually I migrated it to emacs so I could stop wrestling with the GUI, which was having a cow with some of my larger figures) -> latex -> latex2html -> pluckr
also had a makefile to generate/update the .dvi -> .ps -> .pdf targets as well.
Re: (Score:2)
Because it doesn't work? There is no generic LaTeX to HTML convertor out there, and all of them handle only specific use-cases.
AMEN!
You cannot convert TeX to anything other than DVI/ps/pdf without getting a mess. Embarrassing. While it does produce incredibly beautiful printed output, note that very few of us are reading printed anymore. Most of us are reading the TeX output on computers, not on paper
I decided to write my own, without all the disadvantages of TeX[1], but with as many of the benefits as possible[2]
I did a tiny prototype last September (was in hospital for a week, had nothing else to do) in Lisp that read in my spe
Re: (Score:2)
I type both xml and LaTeX with vim, and I find both are easy if you use the right plugins. Using the xml plugin vim will type all the angle brackets for you, complete your tags, format, and generally take the drudgery out of writing xml.
Re: (Score:2)
Dude I am NOT clicking a GNA link on a Slashdot post. </oldskool>
Re: (Score:2)
XHTML, generated by some code I wrote [gna.org], with hyperlinks and cross references and semantic markup in the code listings generated by clang for [Objective-]C[C++].
The problem is, with an URL like that no jaded /.er will click that link!
Re:You should had compared (Score:4, Insightful)
I'm in the process of preparing three novels, and I took a rather different approach. I'm using AppleWorks as my editing tool (because that's what I started with). From there, I'm:
The advantage to this process is that I have valid XHTML on the way into the process, and with minimal effort, I could go from there to usable ePub content.
If I were starting from scratch on a new document, I would be writing XHTML with some custom CSS as my source format. That would give me full semantic markup capabilities (which would give me slightly more flexibility than I have now, but not enough to convince me to ditch the convenience of editing in a WYSIWYG editor for this project). Then, I would tweak my XHTML to DocBook translation tools to handle that. So for ePub, it would just require containerizing the source material, and for nice PDF output, it would just require using the translator bits I already have.
Of course, none of this is a general solution. Novels and theses are rather different in the way you write them, and the former was made a lot more difficult by LaTeX being designed so heavily for typesetting things like the latter. There are also a lot of flaws in LaTeX stemming out of the core design that make for less than ideal typesetting.
For example, as far as I can tell, there is no good way to indicate that a section break (three stars, for example) cannot be the first thing on a page, and that at least two lines of the content above it must be pulled down with it. The closest you can do is to make it part of an unbreakable container with the previous whole paragraph, but that doesn't really do what you want most of the time.
Similarly, it does not support proper widow control. LaTeX supports widow line control—that is, saying that you cannot have fewer than the last n lines of a paragraph on a page/column by themselves. What it lacks is widow paragraph control—that is, treating a single-paragraph line as though it were the last line of the previous paragraph for widow calculation purposes. The result is poor typography if a page break happens to fall near the end of a chapter. You can fix this by hand-tweaking the TeX markup to force a page break earlier, but I assert that good page layout software should produce good layout by default without hackery.
And LaTeX does not handle UTF-8 very well at all. In my XHTML to DocBook translator, I've had to hack in extra markup (\hspace{0.001pt}) after em dashes, en dashes, and hyphens to force TeX to allow the line to wrap. Without that hack, I get serious overfull hbox problems.
I could probably go on for hours about all the problems I've encountered, but it suffices to say that I'm not impressed by TeX, and at several points, I was tempted to build my own PDF generator using WebKit and CSS styles, but I didn't want to spend the time. (Yet, in hindsight, it would have been faster than trying to force TeX to behave.) That said, if you started with something like the hyphenator [google.com] project, someone could probably replace most of TeX with a few hundred lines of JavaScript, and that would almost inarguably produce better typesetting with a lot more flexibility (particularly given that pretty much every programmer already understands JavaScript and the DOM).
Re:You should had compared (Score:4, Insightful)
Actually it makes perfect sense if you do not wish to support the mindset of proprietary software, and the dependencies and liabilities that such an association creates (and not just for yourself, either!) Obviously there is a price to be paid for refusing to run with wolves, hence the posted question: Is there a way to accomplish what needs to be done using only FLOSS (Free/Libre/Open Source Software)?
When copyleft restricts which tools may be used (Score:2, Informative)
But if you want to get something real done, it's just stupid to limit yourself to only open source OR proprietary software. Pick the best tool for the job.
Be careful: sometimes, especially in cases of works under a "copyleft" or "share-alike" license, a work's copyright license limits which tools for the job are lawful. For example, some licenses require works to be made available in an editable format that isn't Java-trapped [gnu.org].* See, for example, sentences containing "Transparent" in the GNU Free Documentation License [gnu.org] and sentences containing "technological" in CC BY-SA [creativecommons.org]. You can use proprietary tools yourself, but you also have to make sure that the work can
Re:When copyleft restricts which tools may be used (Score:4, Insightful)
Be careful: sometimes, especially in cases of works under a "copyleft" or "share-alike" license, a work's copyright license limits which tools for the job are lawful
What are you talking about? This would only be relevant if we were discussing templates and packages to be embedded as part of the document, it has nothing to do with software.
(If you still don't understand: GPL/GFDL/CC-SA only affect derivative works [derivative as defined by copyright law], a document made in MS Word is not subject to the copyright of MS Word unless you decompile Word and paste the code into the document. This simple fact is why you can (and many people, most obviously Apple, do) compile proprietary applications using GCC. DISCLAIMER: I'm talking about copyright law here, not contract law. If the MS Word EULA [which is a contract rather than a copyright license] says that all MS Word documents must be copyrighted a certain way then that may be a problem, fortunately I'm not aware of any applications that have such a clause)
Transparent (Score:4, Informative)
This would only be relevant if we were discussing templates and packages to be embedded as part of the document
In the case of documents under the GFDL, the copyright license requires that those who distribute copies of the document also make copies available in a "Transparent" form, one editable using free software. So those who make derivative works have to make derivative works available in a "Transparent" form. Or perhaps I misunderstood "Transparent" in the GFDL; what am I missing
Re:considering if it's open source (Score:2)
Sorry, I resoundingly disagree.
Looking at your brand new user name, some members would call your post a broad shill for all proprietary closed programs.
The entire point of Open Source is that it can be moved to new innovative uses. Open Source will be slightly-to-much harder to use in many cases! But that is not the point of Open Source! The point is that a valid computing experience can be made out of open components. Yes, someone will have locked down the "1-click" version of a feature with a patent. So i
Re: (Score:2)
The truth is, if you want your job done, you look at the merits of every possible program without considering if it's open source or not. There are good software like Apache that are mostly good for web hosting (unless you have certain requirements). Then there is lots of shit. The same is true for proprietary software tho. But if you want to get something real done, it's just stupid to limit yourself to only open source OR proprietary software. Pick the best tool for the job.
The problem there is that you also need to factor in the cost of Windows or OSX if you want to use proprietary software that's designed for professionals. If you're using one of those platforms then the calculation is much easier, but if you're not interested in giving those companies money then your options are severely limited.
Re: (Score:3)
Re: (Score:2)
Apache! Burn the fanboy!
Re: (Score:3)
Microsoft.
"Use best tool for the job" is now a code word for "Hey, look, Microsoft has some shiny thing we want you to use -- we promise, it's better than what you use now!"
No, in the real world "using the best tool for the job" is just what professional people do. That includes using Microsoft products if they are indeed the best suited for the job, impossible as his may be for some slashdotters to believe.
Back on topic, why does the PhD thesis need to be published as an eBook anyway?
Re: (Score:2)
No, in the real world "using the best tool for the job" is just what professional people do.
And I always thought the professional domain would mention constraints and talk of 'optimal' instead of 'best'.
CC.
through HTML (Score:3)
Re: (Score:3)
I have been using LyX for over a decade, and I feel it is a great tool for using LaTeX without the headache of LaTeX. The code it produces is not great, but it is reasonably readable.
Re: (Score:2)
Once you practice a little bit with LaTeX (we're talking using it for a couple of weeks) there really is no headache.
In fact, the lack of headache from LaTeX is what makes it better than any WYSIWYG editor out there (LyX is good, but still a headache imo)
Re:through HTML (Score:4, Interesting)
There are some things LyX is better at than pure LaTeX code.
I can see the current version of my figures, not just rely on the file name.
I can add references from a list instead of trying to remember what labels I have used.
I can search bib items and add / order citations easily.
I can make complex tables without forgetting some damn }
I can generate and view a new version of my document in a single keypress.
I can see my equations without having to mentally render them, while still using most of my TeX knowledge (\alpha _12 in LyX is the same as \alpha_{12})
Students can make the transition from Word a little more readily. Remember, LyX is not WYSIWYG, it is WYSIWYM (what you mean) so the on screen representation is close to the final but not exact.
Plus you have access to tons of menu options that you may not be aware of. I learn more about LaTeX by using and exploring LyX. And you can always use pure code if you want, for any fancy stuff.
Re: (Score:2)
The best way to go seems LaTeX->HTML->ePUB.
Absolutely. Once you're at well-formatted xhtml you can do a lot of boring structuring, TOC and so on with Calibre. Just import xhtml/css, put the right options and class names into the convert pane, and you're done. Epub is the best source format for converting to other ebook formats as well. Once you have a well formatted epub you get most other common formats almost for free, also with Calibre, depending on the complexities of your document and the limitations of those other formats.
I have no idea how hi
calibre (Score:3, Informative)
calibre is a free and open source e-book library management application that can convert to and from most of ebook formats. And does a pretty good job at it.
http://calibre-ebook.com/
...PROFIT!! (Score:2, Flamebait)
1. Realise no scripts exist for problem
2. Write scripts
3. Release scripts as open source
4. Don't post pointless problem on slashdot
5. ???
7. PROFIT!
(We don't talk about point. 6)
Re:...PROFIT!! (Score:5, Insightful)
1. Realise no scripts exist for problem
1,1 Realize that someone writing a thesis on Nicaraguan politics may not know how to program
1.2 Begin learning to program
1.3 Spend more time learning to program
2. Write scripts
2.1 Divert time from PhD thesis to write scripts
2.2 Spend more time (diverted from PhD program) learning to program sufficiently to write workable scripts to solve stated issue
3. Release scripts as open source
3.1 Fail to complete PhD thesis in time due to time spent programming
Re: (Score:2)
Re:...PROFIT!! (Score:5, Funny)
4. Realize this is exactly what happened to Knuth.
4.1 Take consolation in the fact that at least it's just a thesis, not the next volume of TAOCP.
Re:...PROFIT!! (Score:4)
I don't think any of you twits realize how much work goes into any PhD thesis.
A little programming overhead is not going to be that much of a burden really.
This is why most stuff gets invented. It's really not that much of a tragedy when people who don't specialize in selling a particular technology to others have to develop solutions for themselves involving that technology.
If real people thought like you weenies then we never would have had the original killer app for the PC.
Re: (Score:2)
Someone so brilliant as to be so intimately versed in what it takes to get a PhD that he can with impunity berate all others who don't have his amazing insight into the process used the phrase
"the original killer app for the PC"?
Re: (Score:2)
If real people thought like you weenies then we never would have had the original killer app for the PC.
Solitaire? I think Microsoft would have built it anyway...
RE: Stallman link (Score:3, Interesting)
Stallman complains about DRM and a lack of anonymity with eBooks. It seems to me that this story relates very closely to legally acquired music. While it is still difficult to legally acquire digital music anonymously, it is easy to get it without DRM. I suspect books will follow this same path if consumers value it as a feature. In practice there is in fact little anonymity in the purchase of real books as everyone wants you to swipe your "club" card and use your debit card to make the purchase but his point is well taken. The option to buy an unpopular book in secret is nice.
With time and interest from consumers we will have DRM free books.
Anonymity is dead and gone and I didn't even get an invitation to the funeral. We should all mourn it's passing.
Re: (Score:2)
I don't think anonymity is dead, I think its quite alive and kicking.
What did die was the expectation that others should protect your anonymity for you.
Re: (Score:2)
Wherein lies the difficulty?
Re: (Score:3)
The store has 87 CCTV cameras, all linked to face recognition software.
What rock did you just crawl out from under. (Score:2)
johanneswilm also wants to share. Its clear by his wanting to use FOSS in his process.
Perhaps you need to rethink who is the crackpot here? The answer is clear here.
Re: (Score:2)
I think it's fair to say RMS is both a genius and a crackpot. His goals are laudable, and I support them, but what he's willing to sacrifice to achieve them isn't necessarily so.
Open source solves problems programmers have (Score:2)
I went to arxiv.org and picked a dozen or so papers from the "new" list and clicked their other format links. They're available in pdf, ps, and dvi formats. This is hardly a complete analysis since I don't have any access to the "real" journals, but I have to wonder how many journals and universities are demanding papers in ebook format.
Open Source generally scratches itches. You may be one of the first people with the itch of converting theses to ebook formats.
Re:Open source solves problems programmers have (Score:4, Informative)
Re: (Score:2)
forget references. proper equation formatting and referencing in MS word for most physical sciences journals. still a bitch.
Re: (Score:3)
Short answer; none want epub formats as submissions. But this doesn't mean to say that there is not a desire to produce them from submissions. Lots of scientists and academics want to read articles on the go, without having to carry around lots of paper.
My own experience, however, is that the big move up is from PDF to HTML. This improves the reading experience enormously. EPUB on the other hand is limited. Many ebook readers don't work that well for academic content: mathematics is dealt with badly with no
Boycotting? Hardly (Score:2)
Hardly. Calibre [calibre-ebook.com] is an excelent converter, library manager and it's compatible with most of the readers out there for syncing. You could try converting from pdf to e-pub with it, although PDF is a lousy input format.
Re: (Score:2)
Pandoc (Score:5, Informative)
Re:Pandoc (Score:4, Informative)
Indeed. For a PhD thesis on the politics of Nicaragua, I'd have started with markdown and then converted that to ePub and LaTeX.
Boycott? I Think the Tools Merely Lack Maturity (Score:5, Insightful)
Others have told me that the financial gain of publishing an academic book may be up to 700 USD. In comparison to current Scandinavian wages that really means very little, so I don’t think that earning another 700 USD should be a motive to restrict the access to one’s thoughts.
First of all I would like to commend you and thank you for this sentiment.
Is the open source community boycotting ebook formats, as Richard Stallman has proposed?
I don't understand, Stallman decries e-book formats that aren't open. There are many open e-book formats [wikipedia.org]--including ePub. Granted, there are tools out there that allow you (to varying degrees of success like Calibre) to crack and convert to these formats but why bother? As you can see in that table, most everyone supports PDF. You are misunderstanding Stallman's gripe. It's not that we are boycotting e-books, it's that e-book makers are trying to carve out their own proprietary section of the electronic market, reader and creators included. So let them take their ball and play elsewhere. As you noted in your blog, this isn't the only problem:
Most ebook-readers out there so not implement the Epub-standard perfectly. That means that although one has an Epub that follows all the standards, one can be quite sure that it will not display properly on all the readers. Kovid Goyal, the creator of the Calibre ebook management software has done a good job in creating conversion scripts that create Epubs for all the different readers. Unfortunately they do this by breaking compatibility with the standard, and many distribution sites will only check whether your Epub complies to the standards and not whether the book will actually look good in the reader.
Most readers handle PDF, I would just stick to the output of LaTeX. I might suggest that your expectations are misdirected at the open source community and might be better directed at the makers of readers that apparently force you to break standards. It's the IE6 conundrum all over again.
Stallman didn't suggest boycotting ebook formats, just the DRM associated with them (big surprise there). The problem you are experiencing is that sometimes it's difficult to go from one open standard to another. The tools are lacking in maturity and I'm guessing that since my Android phone can easily display PDFs for me that there's not a lot of people demanding this ePub support that apparently needs multiple flavors for each device (and Calibre helps you with this). The tools exist [johnmacfarlane.net] but they'll only get you so far and I think the really special stuff that LaTeX does well is what you'll find yourself needing to fine tune in the end product. Look at how long it's taken LaTeX to get that beautiful and I think you'll discover that making a magical cure-all converter to ${random format} can be a non-trivial task.
If you start a kickstarter and get your university to donate hosting to making an open free market for any academic papers in any open format, I'd definitely throw in $20 (I've spent about $200 on kickstarter in the past two years). Either that or maybe throw your lot in with arxiv and work with them to fund more format support [arxiv.org]?
Re: (Score:2)
Pandoc (Score:3, Interesting)
RMS not boycotting e-books (Score:5, Informative)
While he states "We must reject e-books until they respect our freedom." He also outlines 7 things amazon's e-books do that violate this freedom. Fortunately epub is the most widely accepted e-book format and it has none of these 7.
RMS isn't against e-books. He's against amazon's approach to e-books.
Re: (Score:3)
In fact, he specifically mention "Project Gutenberg" as freedom respecting ebooks, and they distribute EPUBs.
Re: (Score:2)
They release books in other formats as well, like HTML.
Re: (Score:2)
No one can remotely delete it any more than any other file on your computer
Given you can copy the .amz file to your local system and save it (thus preventing Amazon from deleting it), this doesn't sound like much of a problem.
A word processor? (Score:2)
Is there some reason MS Word or OpenOffice + stylesheets aren't up to the task? It sounds like you might be overcomplicating things.
Re: (Score:2)
Setting aside the fact that LaTeX will perform typesetting, those word processing tools utterly fail for creation of documents with lots of (or complex) equations.
They are also very cumbersome for generating cross-references, bibliographic formatting, and management of figures/tables.
One killer feature MS Word *does* have over TeX-based solutions for now is excellent commenting, change tracking and shared collaboration features.
I know both worlds well, having used MS Word for collaborative proposal writing,
Re: (Score:2)
One killer feature MS Word *does* have over TeX-based solutions for now is excellent commenting, change tracking and shared collaboration features.
I have done some cooperative writing.
Latex supports comments trivially and always has. Anything starting with a %. There are also packages which allow you to insert them into the text as well.
For change tracking, word is OK if you pass the document around from one person to another in sequence. However, since LaTeX uses plain text files, you can use it with any V
Re: (Score:2)
Re: (Score:2)
The real magic of Word's Track Changes feature is the way it allows you to quickly see what's been changed and commented on in the *formatted* document.
I know how they work--I've used them. The whole thing fails miserably when several people make concurrent edits to a document, then you have a merge nightmare. Also, the whole attribution thing fails when people don't setup windows with their real name (noone I know ever seems to do that).
The visual display is nice, but it is way too brittle. Having done th
Re: (Score:2)
I sometime Google docs these days for collaborative writing as it avoids the "pass the word doc" around nightmare. Although with dropbox the latter has got easier.
In the end, the proposal gets turned into a word doc though for final formatting, because it is what people expect.
In terms of change tracking, I find this only works in word for a view people. Otherwise, you end up with change tracks everywhere and it's just an unreadable mess. Tex/latex in a versioning system can also work, although again only w
Re: (Score:2)
Is there some reason MS Word or OpenOffice + stylesheets aren't up to the task?
Have you ever written a long document in either word/OO and latex?
Basically everything that should be trivial, e.g. cross referencing, references and bibliographies, contents, figures, applying consistent styles (including bibliographic styles), separating content from presentation, quality typography is trivial in latex.
Also, since latex is in text files, you can use any version control system you wish.
It sounds like you might b
Re: (Score:2)
Any text processing tool that requires you to use the mouse is overcomplicating things.
Re: (Score:2)
or you need it converted. IANAP (I'm not a publisher) but I doubt they use Word to generate the necessary typesetting for a print run, and Word is pretty bad at converting a document to anything else whilst keeping the formatting intact.
Re: (Score:2)
I've copy edited books for the consumer market (mostly test prep for IT certifications) and we used Word for the job. It's not terrible, as long as you use stylesheets instead of physical markup. And no way was I going to force the author to use LaTex.
The best tool is the one you already use (Score:2)
I have helped to create a site for scientists to post their articles on the web. One of the problems is that academics tend to love their tools and do not want to switch, often because they have relatively elaborate workflows and practices, which can cope with their lives; whether this involves writing lots of maths, spending lots of time offline travelling, collaboration or whatever.
We got around this just using Wordpress. Many of the tools out there can already communicate with a blog: this includes Word
HTML and LaTEX are not semantic markup (Score:2)
Is there a compelling case for EPUB? (Score:2)
My version of e-publishing was, "write the thesis in LaTeX, output in PDF via pdfLaTeX, and upload the PDF to Google Books." Instant global accessibility for anyone that wants it (well, instant after the processing period) -- certainly a heck of a lot better than any exposure my University can offer, although I gave them the PDF too, and they supposedly make it available somewhere. It's not EPUB, sure, and I would convert it to other formats if I felt that the effort was worth it, but maximising availabilit
RMS against ebooks? (Score:2)
While it's true that ebooks present the possibility of digital restrictions management, Smashwords [smashwords.com], a ebooks distributor site, doesn't use DRM, AFAIK.
pandoc is your answer... (Score:2)
http://johnmacfarlane.net/pandoc/ [johnmacfarlane.net]
Unless you do some really wacky latex stuff, pandoc works great
Why Not Just... (Score:2)
I really like TeX and LaTeX (But don't google on the latter without some additional modifying keywords...) and used to maintain my resume in it. Turns out most contracting companies don't want a static document they can't modify, so I ended up dropping the whole thing into a big E-Lisp data structure which I serialize into eieo objects and then emit to some other markup language. I wrote emitters for HTML and Plain Text, but really you can do anything. I have it on my to
Wrong format (Score:2)
LaTeX is a formatter: it does an excellent job of typesetting and can produce publication-quality PDF (my company uses it all the time for this).
But it is not a reusable file format. The only processor that really groks it is TeX, and that can only output PDF or DVI. If you want multiple formats of output under program control, you need to use a output-agnostic file format like XML, from which you can generate LaTeX and any other kind of appropriate source code to create PDF and other kinds of output (eg HT
Yeah, do it the hard way! (Score:2)
Even grandpa can do it!
CutePDF writer (www.cutepdf.com) Just print from your application.
Calibre to convert PDF to any other format (calibre-ebook.com).
Done something similar last year (Score:2)
I wanted to have an article readable on my kobo on the go. That was not so easy but not so difficult as well. epub is mainly compressed xml (or xhtml can not remember).
The procedure to obtain the proper html goes through compiling the latex with pdflatex and bibtext so as to have a proper pdf AND intermediate latex files. Extract the bibliography information from the intermediate file. Regenerate the bibliography in html format using bibtex2html. Play with head and tail to cut header and footer.
Then, genera
Re:Easy solution (Score:5, Insightful)
Going through PDF is horrible. LaTeX contains a lot of semantic markup. ePub is XHTML, which is a form of semantic markup. PDF is a presentation format. So, you start with semantic markup, discard it all, and then try to generate it again by magic.
You end up with something that looks vaguely like the PDF, but loses most of the semantic information (e.g. section / chapter breaks). Worse, you often don't want the ePub version to look like the PDF - they're aimed at different form factors.
Re: (Score:3)
That depends on how you use it. In the XHTML that I generated for my last book, for example, every code listing was marked up using libclang. Each token was in a span element with the class set to the token type. This meant that the XHTML version contained information about whether something was a macro instantiation, a language keyword, a reference to a variable, and so on. The styling for all of this was then done in CSS. I sent my publisher a rough version and they could then tweak it so that it mat
Re:Easy solution (Score:5, Insightful)
Re: (Score:3)
This is fine. Then if I purchase an e-Book, I only need the PDF version specific to the device I'm currently using (a Nook Classic)... oh, and any device I might ever want to use for the rest of my life. A proper eBook format cannot be tied to a specific page format.
I like PDF for computer use, but the parent is right... it's definitely "rotten" for e-Readers. I've tried converting PDF to ePub to use on my Nook and it's a hit-or-miss proposition, with much more "miss" than "hit".
Re: (Score:2)
I don't think it will be all that long before all new e-reading devices can view rather large books and therefore pdfs with no problem.
Re: (Score:2)
Absolutely, what is needed is a ebook reader with a 24" display so it can handle really big page sizes. Right?
Please put down what you are smoking. When your chemically-fogged brain has cleared you will understand that an ebook reader is designed to be able to be held in one hand and the text read easily. Neither of these happen with larger screen sizes, as can easily be seen by the sales numbers for te Kindle and Kindle DX - the DX doesn't sell very well because very few people want the huge form factor
Re: (Score:2)
Who defines the "common" devices? How do you handle something like an Android or iDevice, where the orientation can be changed? PDFs are not a good format for anything destined for a screen instead of paper. That computer monitors are (mostly) large enough to display most of the common paper size (letter/A4) is fortunate, but should not be relied upon.
Re: (Score:2)
Re: (Score:3)
Congratulations, you've just earned the "I don't know what I'm talking about!" achievement! All modern e-readers, when using their proper formats (generally ePub for pretty much anything worth using) handle line-breaking and hyphenation just fine, and unless you're reading from some badly OCRed plaintext copy, will look as good as the paper version. PDF is a bad format for e-readers, and you're a bad person for suggesting it.
Re: (Score:2)
Re: (Score:2)
I specifically didn't mention the Kindle. Mobi is atrocious, and Amazon cares more about the bottom line than presenting an acceptable reading experience. You're right, not everyone uses the same algorithms to determine hyphenation and line-breaking, but in my experience, ePub and the readers that use ePub (at least the Nook - I really can't speak for others such as the Kobo or iRiver readers, not having used them) do a better job than the atrocity in that article. Of course, none of it matters if the pu
Re:Easy solution (Score:5, Insightful)
Re: (Score:2)
Re:Easy solution (Score:4, Insightful)
Yes, you've pointed out the drawbacks with deploying as pdf, which I agree are real. And I think I've pointed out the advantages of pdf, and the drawbacks of ebook formats as they are currently implemented. If you're an author and you care or want to control what the document actually looks like, then pdf (or a bunch of images) is your only option.
No, it isn't an option. PDF doesn't do that unless you also control the device on which it is displayed. When I view a PDF with large text on my eReader I'm damn sure that what I see isn't what the author intended (not all authors can be that demented, surely). If you are trying to do that then you have overstepped your role as an author. If you think you have succeeded then you should try talking to your users (especially ones with visual impairment). PDF does have it's uses, but that isn't one of them.
But one of the main reasons for LaTeX is exactly to separate content from presentation, so I think you're misinformed about that
I used to use laTeX a lot, and was a member of the TUG. LaTeX is better than raw TeX, in terms of separation of content and presentation, but most raw TeX is still there in LaTeX, and LaTeX commands such as \textwidth, \baselineskip, \raisebox (everything to do with boxes, in fact), \vspace, \textbf and so many other laTeX constructs are about presentation, not content. You can write laTeX that separates content from presentation, but tools that claim to process laTeX can't assume that you have; they need to accept all legal laTeX, including all the presentation stuff.
and that point doesn't apply to pdf, which is for consumption only, not for writing.
Internally, PDF is quite like DVI in terms of how it structures a page, and the content and presentation have been well and truly merged. PDF puts blocks in defined positions on the page, and the order of the blocks doesn't necessarily match the order of the content. That's why when you select text in a PDF you often get bits you don't want. And it's why it's hard to go from PDF to EPUP; it's not a simple translation, the software needs to understand the significance of relative positions of blocks of text, which is very far from trivial. Yes, it's a presentation format, but that means that you have lost information needed to make a robust EPUB file from it. A far better option is to start with EPUB and generate your PDF from it and a stylesheet. The only downsides are that free EPUB editing tools are not well developed (unless somebody can point me to one that I've missed) and that EPUB enforces a linear reading sequence (but you're going to have to deal with that anyway if you're going to produce EPUB).
Re: (Score:2)
Pdf is obviously an option. I read pdfs on my iphone and every other screen I have. That there are problems with this option is clear, but that's not the same as "not an option".
I'm not clear what you mean by "view a PDF with large text". Do you have a pdf reader that tries to increase the font size, or make font substitutions, rather than just zooming the whole page? Of course that will mangle the page, and create something that was not intended, but pdf readers should not try to do that.
You have some p
Re: (Score:3)
Do you have a pdf reader that tries to increase the font size, or make font substitutions, rather than just zooming the whole page?
Yes, my eReader, because it only has the facility to turn the page, not to move around the page. And as far as I'm concerned, it's not the fault of the reader for trying to do that, it's the fault of publishers supplying content in a format that tries to stop me, which I view in the same light as DVDs that won't let me pause the main feature while I take a comfort break. I don't want to have to read a broadsheet newspaper through a letter box by asking somebody on the other side of the door to move it aroun
Re: (Score:2)
CSS paged media (Score:3)
If graphics and equations were required, I would have moved to a generic HTML + css method.
Most web browsers that I've seen are based on the model of rendering a web page to a scroll that is 960px wide by infinitely tall. But in the real world of print, the codex has replaced the scroll. The paged media module in CSS3 [w3.org] is still only a Working Draft. So which web browser would you recommend that has thorough support for MathML and for CSS paged media?
Re: (Score:2)
I agree with the DocBook recommendation. I was writing a lot of DocBook back in 2000/2001 and it would output to just about any format, including PDF and a few of the ebook formats that were available at the time (plucker? among others).
The thing that most people (including the original) is separating content from presentation. HTML tried to do this and failed miserably. When you start thinking about things like layout while writing, you're spending more time trying to make it look good rather than actua
Re: (Score:2)
Actually, it doesn't. The results don't look that great, don't work in a web browser, often fail in screen-readers, are harder to archive, very difficult to text extract from. PDF is really pretty much a legacy format.
Re: (Score:2)
The results don't look that great, don't work in a web browser,
Neither does ePub. With PDF the situation is actually a little better as Chrome will get (or already has) native PDF support and Plugins for other browsers are also rather widespread. That ePub is internally just HTML in a Zip doesn't really help when the browser doesn't have a way to deal with that.
This is one of the weird things with browsers that I never really understood: They are essentially the primary tool for consuming text these days, yet they are incredible shitty at actually handling something th
Re:PDF is fine (Score:4, Insightful)
No, it doesn't.
If all you want to do is download a file and print it on Letter-sized paper (or A4, assuming the PDF is in A4), then PDF is great.
However, if you want to view it on a screen, especially a screen that's smaller than letter-size, it sucks. Maybe you haven't noticed, but ebook readers are all smaller than letter-size paper, so it's physically impossible to view a PDF page on an ebook reader without either panning, or shrinking it. Panning around to read a page is annoying, and shrinking it will make it difficult or impossible to read (depending on the font size and the ereader's algorithm), plus it's even worse if the viewer has poor eyesight and prefers larger fonts.
This is the entire reason that ebook formats were invented, so that readers could dynamically resize and re-flow text, instead of being stuck with a fixed page size. Of course, with PDF, instead of defaulting to Letter size, you could format your document for a page size equal to the ebook reader's screen size, and make it look great on that ebook reader, but only that one. They don't all have the same size screen, so you'll need different PDFs for every single ebook reader out there, which flies in the face of the "Portable" aspect that PDFs tout. Plus you'd still need one in Letter size for anyone who wants to print out the document.
Re:Calibre? (Score:4, Informative)
Because PDF to ePub conversion generally gives you pretty awful results. Nothing against Calibre. I use it. But most PDFs I've tried to convert for my Nook Classic have had less than stellar results: readable if you're lucky, but not nicely formatted. And if there are embedded images, all bets are off.
Re: (Score:3)
Creating ePub's is surprisingly easy from a programing perspective.