Register Guidelines E-Books Search Today's Posts Mark Forums Read

 MobileRead Forums > iRex Making PDFs for the iliad using LaTeX (with LyX)

07-24-2006, 12:41 PM   #1
Antartica
Evangelist

Posts: 417
Karma: 754
Join Date: Jun 2006
Making PDFs for the iliad using LaTeX (with LyX)

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.
Attached Files
 El_abismo_del_espaciotiempo.pdf (103.5 KB, 698 views) iliad-template.lyx.txt (961 Bytes, 402 views)

 07-24-2006, 01:19 PM #2 MikeB Member   Posts: 18 Karma: 10 Join Date: Jul 2006 Device: Pocket Loox 720 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 ! Thanks Mike
 07-24-2006, 01:33 PM #3 MikeB Member   Posts: 18 Karma: 10 Join Date: Jul 2006 Device: Pocket Loox 720 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
07-24-2006, 01:47 PM   #4
jsc
Member

Posts: 12
Karma: 10
Join Date: Jul 2006
Another LaTeX example

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 ''
Attached Files

07-24-2006, 04:16 PM   #5
Antartica
Evangelist

Posts: 417
Karma: 754
Join Date: Jun 2006
Quote:
 Originally Posted by MikeB 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)

Last edited by Antartica; 07-24-2006 at 04:19 PM.

07-24-2006, 04:18 PM   #6
Antartica
Evangelist

Posts: 417
Karma: 754
Join Date: Jun 2006
Quote:
 Originally Posted by jsc 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 ;-).

07-24-2006, 05:10 PM   #7
jsc
Member

Posts: 12
Karma: 10
Join Date: Jul 2006
Another attempt

Attached Files

 07-24-2006, 05:18 PM #8 Gavrahil Member   Posts: 22 Karma: 10 Join Date: May 2006 Device: Sony Librié 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.
 07-24-2006, 07:34 PM #9 shonk Member   Posts: 11 Karma: 10 Join Date: Jul 2006 Device: Nokia 770/iLiad/e815 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. Last edited by shonk; 07-24-2006 at 07:38 PM.
07-24-2006, 07:38 PM   #10
shonk
Member

Posts: 11
Karma: 10
Join Date: Jul 2006
Quote:
 Originally Posted by Gavrahil 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.

 07-24-2006, 08:06 PM #11 MikeB Member   Posts: 18 Karma: 10 Join Date: Jul 2006 Device: Pocket Loox 720 [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?
 07-25-2006, 03:08 AM #12 DHer Addict   Posts: 261 Karma: 156 Join Date: Jul 2006 Device: iliad on windows you install miktex with texnicscenter. A full installation of miktex should give you everything you'll never need concerning latex.
 07-25-2006, 04:27 AM #13 MikeB Member   Posts: 18 Karma: 10 Join Date: Jul 2006 Device: Pocket Loox 720 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
07-25-2006, 05:29 AM   #14
ath

Posts: 222
Karma: 110
Join Date: Jun 2006
Location: Malmo, Sweden
Quote:
 Originally Posted by shonk 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.

07-25-2006, 06:25 AM   #15
Antartica
Evangelist

Posts: 417
Karma: 754
Join Date: Jun 2006
Quote:
 Originally Posted by MikeB 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.

Quote:
 Originally Posted by MikeB 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...