Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > Workshop

Notices

Reply
 
Thread Tools Search this Thread
Old 08-20-2009, 03:12 PM   #1
ahi
Wizard
ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.
 
Posts: 1,790
Karma: 507333
Join Date: May 2009
Device: none
(Xe)LaTeX Help -- Casanova's Memoirs

I am in the process of putting together a full and (formatting-wise) somewhat cleaned-up version of The Memoirs of Casanova.

Going well enough... except that my Table of Contents (both internal and external) seem to be messed up. Worse yet... I cannot figure out where the corruption occurs... since the generated .toc file seems to be correct.

The problem is primarily (possibly solely) with the "Episode X" level entries. They ought to link to one page before their first chapters, and that's indeed what the .toc shows them linking to, but in the final PDF they link to seemingly random spots earlier in the document.

Any help would be appreciated.

- Ahi
Attached Files
File Type: zip casanova.zip (12.81 MB, 222 views)
ahi is offline   Reply With Quote
Old 08-20-2009, 04:22 PM   #2
ahi
Wizard
ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.
 
Posts: 1,790
Karma: 507333
Join Date: May 2009
Device: none
Correction... all is definitely not well with the .toc file:

Code:
\select@language {english}
\contentsline {part}{\emph {Preface}}{12}{section*.1}
\contentsline {section}{Casanova at Dux}{13}{chapter*.3}
\contentsline {section}{Translator's Preface}{45}{chapter*.8}
\contentsline {section}{Author's Preface}{49}{chapter*.9}
\contentsline {part}{\partnumberline {I}Venetian Years}{69}{part.1}
\contentsline {chapter}{Episode 1: Childhood}{70}{section*.10}
\contentsline {section}{Chapter 1}{71}{chapter*.11}
\contentsline {section}{Chapter 2}{88}{chapter*.12}
\contentsline {section}{Chapter 3}{123}{chapter*.13}
\contentsline {section}{Chapter 4}{154}{chapter*.14}
\contentsline {section}{Chapter 5}{205}{chapter*.15}
\contentsline {section}{Chapter 6}{242}{chapter*.16}
\contentsline {section}{Chapter 7}{274}{chapter*.17}
\contentsline {chapter}{Episode 2: A Cleric in Naples}{308}{chapter*.17}
\contentsline {section}{Chapter 8}{309}{chapter*.18}
\contentsline {section}{Chapter 9}{368}{chapter*.19}
\contentsline {section}{Chapter 10}{425}{chapter*.20}
\contentsline {section}{Chapter 11}{484}{chapter*.21}
\contentsline {section}{Chapter 12}{513}{chapter*.22}
\contentsline {chapter}{Episode 3: Military Career}{543}{poemline.15.1}
\contentsline {section}{Chapter 13}{544}{chapter*.23}
\contentsline {section}{Chapter 14}{567}{chapter*.24}
\contentsline {section}{Chapter 15}{676}{chapter*.25}
\contentsline {chapter}{Episode 4: Return to Venice}{723}{chapter*.25}
\contentsline {section}{Chapter 16}{724}{chapter*.26}
\contentsline {section}{Chapter 17}{749}{chapter*.27}
\contentsline {section}{Chapter 18}{775}{chapter*.28}
\contentsline {section}{Chapter 19}{827}{chapter*.29}
\contentsline {chapter}{Episode 5: Milan and Mantua}{872}{chapter*.29}
\contentsline {section}{Chapter 20}{873}{chapter*.30}
\contentsline {section}{Chapter 21}{912}{chapter*.31}
\contentsline {section}{Chapter 22}{935}{chapter*.32}
\contentsline {section}{Chapter 23}{962}{chapter*.33}
\contentsline {part}{\partnumberline {II}Paris and Prison}{989}{part.2}
\contentsline {chapter}{Episode 6: Paris}{990}{section*.34}
\contentsline {section}{Chapter 1}{991}{chapter*.35}
\contentsline {section}{Chapter 2}{1017}{chapter*.36}
\contentsline {section}{Chapter 3}{1043}{chapter*.37}
\contentsline {section}{Chapter 4}{1073}{chapter*.38}
\contentsline {section}{Chapter 5}{1099}{chapter*.39}
\contentsline {section}{Chapter 6}{1123}{chapter*.40}
\contentsline {section}{Chapter 7}{1158}{chapter*.41}
\contentsline {section}{Chapter 8}{1193}{chapter*.42}
\contentsline {section}{Chapter 9}{1227}{chapter*.43}
\contentsline {chapter}{Episode 7: Venice}{1261}{chapter*.43}
\contentsline {section}{Chapter 10}{1262}{chapter*.44}
\contentsline {section}{Chapter 11}{1285}{chapter*.45}
\contentsline {section}{Chapter 12}{1309}{chapter*.46}
\contentsline {section}{Chapter 13}{1333}{chapter*.47}
\contentsline {section}{Chapter 14}{1360}{chapter*.48}
\contentsline {section}{Chapter 15}{1386}{chapter*.49}
\contentsline {chapter}{Episode 8: Convent Affairs}{1410}{chapter*.49}
\contentsline {section}{Chapter 16}{1411}{chapter*.50}
\contentsline {section}{Chapter 17}{1436}{chapter*.51}
\contentsline {section}{Chapter 18}{1464}{chapter*.52}
\contentsline {section}{Chapter 19}{1487}{chapter*.53}
\contentsline {section}{Chapter 20}{1517}{chapter*.54}
\contentsline {chapter}{Episode 9: False Nun}{1542}{chapter*.54}
\contentsline {section}{Chapter 21}{1543}{chapter*.55}
\contentsline {section}{Chapter 22}{1569}{chapter*.56}
\contentsline {section}{Chapter 23}{1599}{chapter*.57}
\contentsline {section}{Chapter 24}{1626}{chapter*.58}
\contentsline {section}{Chapter 25}{1650}{chapter*.59}
\contentsline {chapter}{Episode 10: Under the Leads}{1677}{chapter*.59}
\contentsline {section}{Chapter 26}{1678}{chapter*.60}
\contentsline {section}{Chapter 27}{1705}{chapter*.61}
\contentsline {section}{Chapter 28}{1752}{chapter*.62}
\contentsline {section}{Chapter 29}{1783}{chapter*.63}
\contentsline {section}{Chapter 30}{1808}{chapter*.64}
\contentsline {section}{Chapter 31}{1835}{chapter*.65}
\contentsline {section}{Chapter 32}{1859}{chapter*.66}
\contentsline {part}{\partnumberline {III}The Eternal Quest}{1888}{part.3}
\contentsline {chapter}{Episode 11: Paris and Holland}{1889}{section*.67}
\contentsline {section}{Chapter 1}{1890}{chapter*.68}
\contentsline {section}{Chapter 2}{1963}{chapter*.69}
\contentsline {section}{Chapter 3}{1990}{chapter*.70}
\contentsline {section}{Chapter 4}{2021}{chapter*.71}
\contentsline {chapter}{Episode 12: Return to Paris}{2057}{chapter*.71}
\contentsline {section}{Chapter 5}{2058}{chapter*.72}
\contentsline {section}{Chapter 6}{2099}{chapter*.73}
\contentsline {section}{Chapter 7}{2138}{chapter*.74}
\contentsline {section}{Chapter 8}{2180}{chapter*.75}
\contentsline {section}{Chapter 9}{2201}{chapter*.76}
\contentsline {chapter}{Episode 13: Holland and Germany}{2249}{chapter*.76}
\contentsline {section}{Chapter 10}{2250}{chapter*.77}
\contentsline {section}{Chapter 11}{2312}{chapter*.78}
\contentsline {section}{Chapter 12}{2355}{chapter*.79}
\contentsline {chapter}{Episode 14: Switzerland}{2392}{chapter*.79}
\contentsline {section}{Chapter 13}{2393}{chapter*.80}
\contentsline {section}{Chapter 14}{2418}{chapter*.81}
\contentsline {section}{Chapter 15}{2446}{chapter*.82}
\contentsline {section}{Chapter 16}{2491}{chapter*.83}
\contentsline {section}{Chapter 17}{2530}{chapter*.84}
\contentsline {section}{Chapter 18}{2564}{chapter*.85}
\contentsline {chapter}{Episode 15: With Voltaire}{2593}{chapter*.85}
\contentsline {section}{Chapter 19}{2594}{chapter*.86}
\contentsline {section}{Chapter 20}{2637}{chapter*.87}
\contentsline {section}{Chapter 21}{2691}{chapter*.88}
\contentsline {part}{\partnumberline {IV}Adventures in the South}{2713}{part.4}
\contentsline {chapter}{Episode 16: Depart Switzerland}{2714}{section*.89}
\contentsline {section}{Chapter 1}{2715}{chapter*.90}
\contentsline {section}{Chapter 2}{2761}{chapter*.91}
\contentsline {section}{Chapter 3}{2803}{chapter*.92}
\contentsline {chapter}{Episode 17: Return to Italy}{2836}{chapter*.92}
\contentsline {section}{Chapter 4}{2837}{chapter*.93}
\contentsline {section}{Chapter 5}{2867}{chapter*.94}
\contentsline {section}{Chapter 6}{2900}{chapter*.95}
\contentsline {section}{Chapter 7}{2925}{chapter*.96}
\contentsline {chapter}{Episode 18: Return to Naples}{2965}{chapter*.96}
\contentsline {section}{Chapter 8}{2966}{chapter*.97}
\contentsline {section}{Chapter 9}{2996}{chapter*.98}
\contentsline {section}{Chapter 10}{3037}{chapter*.99}
\contentsline {section}{Chapter 11}{3071}{chapter*.100}
\contentsline {section}{Chapter 12}{3102}{chapter*.101}
\contentsline {chapter}{Episode 19: Back Again to Paris}{3138}{chapter*.101}
\contentsline {section}{Chapter 13}{3139}{chapter*.102}
\contentsline {section}{Chapter 14}{3174}{chapter*.103}
\contentsline {section}{Chapter 15}{3195}{chapter*.104}
\contentsline {section}{Chapter 16}{3226}{chapter*.105}
\contentsline {section}{Chapter 17}{3284}{chapter*.106}
\contentsline {chapter}{Episode 20: Milan}{3321}{chapter*.106}
\contentsline {section}{Chapter 18}{3322}{chapter*.107}
\contentsline {section}{Chapter 19}{3362}{chapter*.108}
\contentsline {section}{Chapter 20}{3412}{chapter*.109}
\contentsline {section}{Chapter 21}{3463}{chapter*.110}
\contentsline {section}{Chapter 22}{3503}{chapter*.111}
\contentsline {part}{\partnumberline {V}To London and Moscow}{3547}{part.5}
\contentsline {chapter}{Episode 21: South of France}{3548}{section*.112}
\contentsline {section}{Chapter 1}{3549}{chapter*.113}
\contentsline {section}{Chapter 2}{3579}{chapter*.114}
\contentsline {section}{Chapter 3}{3613}{chapter*.115}
\contentsline {section}{Chapter 4}{3660}{chapter*.116}
\contentsline {chapter}{Episode 22: To London}{3699}{chapter*.116}
\contentsline {section}{Chapter 5}{3700}{chapter*.117}
\contentsline {section}{Chapter 6}{3745}{chapter*.118}
\contentsline {section}{Chapter 7}{3771}{chapter*.119}
\contentsline {section}{Chapter 8}{3810}{chapter*.120}
\contentsline {section}{Chapter 9}{3850}{chapter*.121}
\contentsline {chapter}{Episode 23: The English}{3899}{poemline.30.3}
\contentsline {section}{Chapter 10}{3900}{chapter*.122}
\contentsline {section}{Chapter 11}{3931}{chapter*.123}
\contentsline {section}{Chapter 12}{3957}{chapter*.124}
\contentsline {section}{Chapter 13}{3975}{chapter*.125}
\contentsline {chapter}{Episode 24: Flight from London to Berlin}{4016}{chapter*.125}
\contentsline {section}{Chapter 14}{4017}{chapter*.126}
\contentsline {section}{Chapter 15}{4051}{chapter*.127}
\contentsline {section}{Chapter 16}{4077}{chapter*.128}
\contentsline {section}{Chapter 17}{4102}{chapter*.129}
\contentsline {section}{Chapter 18}{4134}{chapter*.130}
\contentsline {chapter}{Episode 25: Russia and Poland}{4168}{chapter*.130}
\contentsline {section}{Chapter 19}{4169}{chapter*.131}
\contentsline {section}{Chapter 20}{4203}{chapter*.132}
\contentsline {section}{Chapter 21}{4233}{chapter*.133}
\contentsline {section}{Chapter 22}{4272}{chapter*.134}
\contentsline {section}{Chapter 23}{4323}{chapter*.135}
\contentsline {part}{\partnumberline {VI}Spanish Passions}{4354}{part.6}
\contentsline {chapter}{Episode 26: Spain}{4355}{section*.136}
\contentsline {section}{Chapter 1}{4356}{chapter*.137}
\contentsline {section}{Chapter 2}{4395}{chapter*.138}
\contentsline {section}{Chapter 3}{4432}{chapter*.139}
\contentsline {section}{Chapter 4}{4467}{chapter*.140}
\contentsline {section}{Chapter 5}{4509}{chapter*.141}
\contentsline {section}{Chapter 6}{4546}{chapter*.142}
\contentsline {chapter}{Episode 27: Expelled from Spain}{4578}{poemline.31.2}
\contentsline {section}{Chapter 7}{4579}{chapter*.143}
\contentsline {section}{Chapter 8}{4615}{chapter*.144}
\contentsline {section}{Chapter 9}{4655}{chapter*.145}
\contentsline {section}{Chapter 10}{4671}{chapter*.146}
\contentsline {section}{Chapter 11}{4694}{chapter*.147}
\contentsline {section}{Chapter 12}{4726}{chapter*.148}
\contentsline {chapter}{Episode 28: Return to Rome}{4766}{chapter*.148}
\contentsline {section}{Chapter 13}{4767}{chapter*.149}
\contentsline {section}{Chapter 14}{4802}{chapter*.150}
\contentsline {section}{Chapter 15}{4852}{chapter*.151}
\contentsline {section}{Chapter 16}{4887}{chapter*.152}
\contentsline {section}{Chapter 17}{4923}{chapter*.153}
\contentsline {chapter}{Episode 29: Florence to Trieste}{4962}{chapter*.153}
\contentsline {section}{Chapter 18}{4963}{chapter*.154}
\contentsline {section}{Chapter 19}{4999}{chapter*.155}
\contentsline {section}{Chapter 20}{5023}{chapter*.156}
\contentsline {section}{Chapter 21}{5062}{chapter*.157}
\contentsline {section}{Chapter 22}{5094}{chapter*.158}
\contentsline {chapter}{Episode 30: Old Age and Death}{5129}{chapter*.158}
\contentsline {section}{Editor's Afterword}{5130}{chapter*.159}
\contentsline {part}{\emph {Supplement to the Memoirs}}{5136}{chapter*.159}
\contentsline {chapter}{Part the First: Venice 1774--1782}{5137}{part*.160}
\contentsline {section}{I --- Casanova's Return to Venice}{5138}{chapter*.161}
\contentsline {section}{II --- Relations with the Inquisitors}{5144}{chapter*.162}
\contentsline {section}{III --- Francesca Buschini}{5151}{chapter*.163}
\contentsline {section}{IV --- Publications}{5154}{chapter*.164}
\contentsline {section}{V --- Mlle. X---- C---- V----}{5156}{chapter*.165}
\contentsline {section}{VI --- Last Days at Venice}{5160}{chapter*.166}
The highlighted portions show that the fourth parameter is rather inconsistent... and, in fact, seemingly altogether unrelated to the TOC line. I guess the fourth parameter is overriding the correct third parameter (i.e.: page number).

Any ideas how to fix this... or even how to articulate the problem so I could google for a fix?

Oh... and this is autogenerated by my running XeLaTeX... so the screw-up, as far as I can fathom, isn't mine.

- Ahi
ahi is offline   Reply With Quote
Advert
Old 08-21-2009, 01:18 AM   #3
ahi
Wizard
ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.
 
Posts: 1,790
Karma: 507333
Join Date: May 2009
Device: none
Still don't really understand what's causing the TOC to be so utterly screwed up, but I found a workaround to all the problems... primarily by using unnumbered and unnamed (and thus invisible) sections to get the given TOC entries to link to the correct page (despite technically incorrectly linking to said invisible sections).

- Ahi
ahi is offline   Reply With Quote
Old 08-21-2009, 05:50 AM   #4
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,515
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
I haven't tested it, but I notice you are adding the Episode lines just with \addcontentsline, and you have no real sectioning command there. That adds the line to the TOC, but hyperref does not manage the hyperlink correctly. I think the solution is, as giver here:

Using \addcontentsline within the text (together with the hyperref-package) for additional entries in the table of contents generates a hyperlink anchor on the page where the respective section starts, and not - as would be desired - on the page, where the new entry is located. The technique to change this behaviour is the command \phantomsection which needs to be placed immediately before \addcontentsline. Then the page anchor is generated correctly.

Or you may want to use \book for your parts and \part for the episodes, that way you won't need to add the TOC line manually and you can format the episode titles easily.

Last edited by Jellby; 08-21-2009 at 05:53 AM.
Jellby is offline   Reply With Quote
Old 08-21-2009, 08:30 AM   #5
ahi
Wizard
ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.
 
Posts: 1,790
Karma: 507333
Join Date: May 2009
Device: none
Ah, that sounds like a far more elegant solution... I'll have to try it when I do further cleaning up of the file.

Thank you so much, Jellby!

- Ahi
ahi is offline   Reply With Quote
Advert
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Casanova's Memoirs in French Original ahi Reading Recommendations 1 10-27-2009 01:00 PM
Short Fiction Sabatini, Rafael: Casanova's Alibi v1 1 jan 2009 mtravellerh Kindle Books 3 01-09-2009 05:38 AM
Short Fiction Sabatini, Rafael: Casanova's Alibi v1 1 jan 2009 mtravellerh BBeB/LRF Books 0 01-01-2009 09:48 AM
Short Fiction Sabatini, Rafael: Casanova's Alibi EPUB v1 1 jan 2009 mtravellerh ePub Books 0 01-01-2009 09:47 AM
Short Fiction Sabatini, Rafael: Casanova's Alibi v1 1 jan 2009 mtravellerh IMP Books 0 01-01-2009 09:45 AM


All times are GMT -4. The time now is 04:32 PM.


MobileRead.com is a privately owned, operated and funded community.