View Single Post
Old 12-10-2016, 10:52 PM   #6
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by pluma View Post
Where I am having troubles now is with the navigable TOC for pdf. None of the \chapters are being shown in the TOC, in other words my TOC only has this:

Code:
Contents
Did you compile your document twice?

Sometimes when complicated things are being done (Bookmarks, Cross-references, TOCs, Indexes, [...]) you have to compile the document multiple times. The first compile sets up the temporary files, then the second/third time reimplements that info into the final PDF.

Quote:
Originally Posted by pluma View Post
Also I am confused about \section, it trips up with an error about needing \item.
That is not normal. You are going to have to show the LaTeX code itself. You probably forgot to close a bracket somewhere along the line, or forgot to \end a list.

Quote:
Originally Posted by pluma View Post
I found out that "PALATINO" font in latex is called "TeX Gyre Pagella". Important detail to know in order to have it working.
A lot of the fonts in LaTeX packages are clones of more popular paid fonts, but released under a GPL license (or other Open Source licenses).

It is helpful when you need to use an (almost) dropin replacement:

Helvetica ~= TeX Gyre Heros = \usepackage{helvet}
Times New Roman ~= TeX Gyre Termes = \usepackage{mathptmx}
Palatino ~= TeX Gyre Pagella = \usepackage{mathpazo}
[...]

To the normal human (and for most projects), they are equivalent, but some extremely minor things might be different:
  • More accented characters
  • Maths support
  • Teeny weeny kerning differences
    • Maybe throughout an entire 500+ page book, a handful of words become hyphenated differently, and a few words might be pulled to a later/earlier line.
  • Slightly different shapes
  • [...]

If you wanted to use specific fonts directly in LaTeX, you would have to use the fontspec package:

Code:
\usepackage{fontspec}
\setmainfont{Times New Roman}
Quote:
Originally Posted by pluma View Post
When making pdf TOC should I use \chapter and \section?
Yes, it is just like using <h1> through <h6> in your HTML documents:

<h1> ~= \part{}
<h2> ~= \chapter{}
<h3> ~= \section{}
<h4> ~= \subsection{}
<h5> ~= \subsubsection{}
<h6> ~= \paragraph{}

Quote:
Originally Posted by pluma View Post
Lastly there's something called 'bookmarks' which require some other syntax in latex.
Yep, typically people implement PDF Bookmarks by using the bookmark or hyperref package.

If you included hyperref in your preamble and used all of the \part + \chapter + \section correctly, it should just work.

Quote:
Originally Posted by pluma View Post
Are bookmarks useful in a Ereader device??
If the PDF Reader supports PDF Bookmarks, then sure... if they don't, then it won't help.

PDFs are pretty crappy to read on dedicated ereaders. It is typically very slow to turn pages, clunky, doesn't allow you to change fonts + font sizes, you have to pinch/zoom, searching/highlighting is crap, etc. etc.

On the tablet/smartphone end, the PDF Reader selection is better, but personally, I wouldn't read PDFs on my phone (although many others do). If I had the choice, I would always go with EPUB/MOBI instead.

If you are creating a "Mobile-Friendly" version of the PDF, me + RbnJrg figured out that a paper size of 5.5"x8.5" with small margins + 12pt font is still very readable on very small devices (smartphone) to very large (PC monitor). The amount of text you can shove per page can be roughly equivalent to your typical 7"x10" book.

Here is a comparison between a 5.5"x8.5" (tiny margins, "Mobile-Friendly") + 6"x9" + 7"x10":

Click image for larger version

Name:	5.5x8.5.Example.png
Views:	533
Size:	178.7 KB
ID:	153488 Click image for larger version

Name:	6x9.Example.png
Views:	559
Size:	143.8 KB
ID:	153489 Click image for larger version

Name:	7x10.Example.png
Views:	559
Size:	186.2 KB
ID:	153490

Or here is a comparison of a two-page spread of the 5.5"x8.5" + 7"x10":

Click image for larger version

Name:	5.5x8.5.TwoPage.Example.png
Views:	543
Size:	202.8 KB
ID:	153491 Click image for larger version

Name:	7x10.TwoPage.Example.png
Views:	571
Size:	169.6 KB
ID:	153492

Of course you can tweak any of the variables... but I still think it would be an inferior experience compared to a proper EPUB.

Side Note: Jellby used LaTeX to create a "Mobile-Friendly" 9cm x 12cm "Alice's Adventures in Wonderland":

https://www.mobileread.com/forums/showthread.php?t=21584

You can download that PDF and check it out. Absolutely fantastic work he did on that one. :P

Last edited by Tex2002ans; 12-10-2016 at 11:55 PM.
Tex2002ans is offline   Reply With Quote