|
|
View Full Version : Making PDFs for the iliad using LaTeX (with LyX)
Antartica 07-24-2006, 10:41 AM Hi.
I think that i've encountered another way to make good-looking pdfs for the iliad, fast and with good typesetting et al.; it's using LaTeX to do the hard job (and LyX to ease it a bit).
Here is the book I've converted (hastily, so no italics, bold... just converted the .doc to .txt and imported that to lyx, then "export to pdf"). The book (short story) is in Spanish, but I hope that to critic the layout, the language doesn't matter.
I like it more than the Wuthering Heights sample.
Also attached is a template for Lyx.
MikeB 07-24-2006, 11:19 AM Thanks for this.
I've downloaded and installed Lyx. How do you use the template? In fact a quick text to Ilex conversion steps guide would be much appreciated :huh: !
Thanks
Mike
MikeB 07-24-2006, 11:33 AM Antartica,
OK. I figured out the new from template bit. When I load your template I get the error message:
'The document uses the missing TeX class "scrbook". Lyx will not be able to produce output'
Am I doing something wrong?
Regards
Mike
I've been playing around with using the "memoir" class with LaTeX, which is a pretty hardcore book layout class. Here's my initial attempt at Madame Bovary in French.
By the way, in LaTeX, you should convert all double-quotes to doubled single backquotes and forward quotes: " -> `` and ''
Antartica 07-24-2006, 02:16 PM OK. I figured out the new from template bit. When I load your template I get the error message:
'The document uses the missing TeX class "scrbook". Lyx will not be able to produce output'
Am I doing something wrong?
The problem is that I've used the koma-script document classes, that are not in the tetex "base" package, but in the "extras" package. In Debian 3.1 Sarge (and I suppose that also in Ubuntu), this is installed with
# apt-get install tetex-extra
What I did to make the pdf above from a .doc file was:
1. Open the .doc with OpenOffice and save a Text (I have to try gnuhtml2tex... as it should preserve italics and bold texts).
2. Open Lyx with the template above
3. Do new and Import Text as Lines (AFAIK it was lines and not paragraphs)
4. Select all in the new document and cut and paste to the template document
5. save the template docuament with another name
6. Select the title and change the paragraph styte to title, then the author, date, dadication (as quote), then chapter headings and so on (the text I used didn't had chapters, so it was fast).
7. Export as PDF.
And that was. The template has the correct document type, page type and margins and, configuration in the LaTeX preamble to use times font and to indent all paragraphs (as is done in Spain; in USA that is not the formal way to print books, but most are formatted with it anyway)
Antartica 07-24-2006, 02:18 PM I've been playing around with using the "memoir" class with LaTeX, which is a pretty hardcore book layout class. Here's my initial attempt at Madame Bovary in French.
By the way, in LaTeX, you should convert all double-quotes to doubled single backquotes and forward quotes: " -> `` and ''
One more thing, for best results in the iliad, you have to change page size to 12x15cm and set margins to 0.5cm, as recommended by Tribble ;-).
Here's The Adventures of Sherlock Holmes formatted for iLiad.
Gavrahil 07-24-2006, 03:18 PM why the heck don't you just export from OpenOffice directly?
Your approach is like gong over north and south pole to get from london to paris.
shonk 07-24-2006, 05:34 PM Note: there are a number of tools out there for intelligently converting plain text to LaTeX (i.e. fixing the quotes, changing *italic text* to {\it italic text}, etc.). I've put GutenMark (easily found by Google) to good use converting Project Gutenberg books to LaTeX in the past, but there are others out there. Most if not all can probably be trivially modified to produce 12x15cm output automatically (or, for that matter, whatever template you like) and, even if not, you can just make the necessary changes directly in the resulting TeX file.
Once I have an iLiad and some spare time, I definitely plan to play around with this a bit.
shonk 07-24-2006, 05:38 PM why the heck don't you just export from OpenOffice directly?
Your approach is like gong over north and south pole to get from london to paris.
LaTeX's typesetting capabilities are substantially better than OpenOffice's, so the end result looks consistently better.
MikeB 07-24-2006, 06:06 PM [QUOTE=Antartica]
The problem is that I've used the koma-script document classes, that are not in the tetex "base" package, but in the "extras" package. In Debian 3.1 Sarge (and I suppose that also in Ubuntu), this is installed with
# apt-get install tetex-extra
Sorry this bit is unintelligable to me. What do I have to do to get this? Is it posible on a Windows XP system? :huh:
on windows you install miktex with texnicscenter.
A full installation of miktex should give you everything you'll never need concerning latex.
MikeB 07-25-2006, 02:27 AM Thanks,
I managed to install koma-script (and memoire) but still get the same error message - guess I'll have to keep playing with it. I don't find this intuitive at all I just hope the learning curve is worth it!
Regards
Mike
LaTeX's typesetting capabilities are substantially better than OpenOffice's, so the end result looks consistently better.
But it should be noted that LaTeX (or more correctly, TeX) is considerably more unforgiving than most other tools when there are problems. At that point, you really need to know what you are doing.
TeX will produce a better-looking file, true. But OpenOffice or Word or ... well, most other tools will usually get you a somewhat worse document but rather faster and easier. If you yourself are the only reader, decide first if you need a better job than those standard tools can do. If not, ... no need to jump through hoops to get there.
Antartica 07-25-2006, 04:25 AM I managed to install koma-script (and memoire) but still get the same error message - guess I'll have to keep playing with it.
In LyX, do "Edit->Reconfigure".
Every time that you change the capabilities of your TeX installation (e.g. because you instlled more document classes), you have to tell lyx to reconfigure itself for the new "capabilities", or you will get extrange errors like the one you got.
I don't find this intuitive at all I just hope the learning curve is worth it!
Yes, very it isn't very intuitive, but it's productive once you get the hang of the tools. Its overly useful when you want to automate producing documents from command line programs, as you only have to make a suitable template (for example using LyX and then export to LaTeX/TeX), and the make scripts that generate files following that template and running latex/pdflatex to convert them to documents or pdfs.
And, after al,l the output of LaTeX is very, very nice...
Antartica 07-25-2006, 04:26 AM Here's The Adventures of Sherlock Holmes formatted for iLiad.
Great! It looks very good. Congrats! (and thanks for generating another nicely formatted book to read :-).
shonk 07-25-2006, 08:25 AM But it should be noted that LaTeX (or more correctly, TeX) is considerably more unforgiving than most other tools when there are problems. At that point, you really need to know what you are doing.
TeX will produce a better-looking file, true. But OpenOffice or Word or ... well, most other tools will usually get you a somewhat worse document but rather faster and easier. If you yourself are the only reader, decide first if you need a better job than those standard tools can do. If not, ... no need to jump through hoops to get there.
Sure. There's always an effort/reward calculation involved.
|