Benutzer-Werkzeuge

Webseiten-Werkzeuge


ebook:sigil

Sigil

Semantik hinzufügen

(aus Sigil-Handbuch)

Das Menü ist zugänglich, wenn eine Inhalts-HTML-Section mit der rechten Maustaste angeklickt wird.

This sub-menu allows you to designate the semantic „type“ for selected files. EPUB ereaders may use this information (stored in the content.opf file) to guide them in how to present these files to readers. For Image files, the only option is Cover – to indicate that this image is the cover image of the book. For HTML files you can select from any of the following options – but each file can have only one type:

• Cover 
• TitlePage 
• Table Of Contents 
• Index 
• Glossary 
• Acknowledgements 
• Bibliography 
• Colophon 
• Copyright Page 
• Dedication 
• Epigraph 
• Foreword 
• List Of Illustrations 
• List Of Tables 
• Notes 
• Preface 
• Text 

Text should be used to indicate the page of the book that should be shown when the book is first opened, but not all ereaders follow this convention.

Indexing

Mark Entries for Indexing

[aus dem Sigil User's Guide]
The first way to identify entries to include in the index is to mark specific words or phrases in your text. Only the occurrence of the word or phrase you mark will be included in the Index – if you need all occurrences use the Index Editor. Highlight a word or phrase in either Book View or Code View and then select the menu item Tools→Index→Mark For Index or its keyboard shortcut (which you can change). This will then open a prompt for you to enter how you want these words to appear in the index:

The text you enter as the name to use in the Index will be show up in the Index as follows: • [blank]: If you leave the name empty, then the exact words you highlighted will be used in the index. • words: If you enter a word or phrase, then that word or phrase will be used (e.g. Oak instead of oak). • heading/words: If you use a „/“ in the name then a hierarchical group will be created (e.g. Forest/Tree/Oak will create an entry Oak filed under Tree filed under Forest). • entrya;entryb: If you use a „;“ then multiple entries will be created for this word or phrase. When you mark text for indexing, it just adds add some Sigil-specific HTML code that tells Sigil to include these words when you create the index. In code view it might appear as follows:

<a class=„sigil_index_marker“ title=„Character/Alice“>Alice</a>

If you no longer want a word or phrase to be indexed by Sigil, you will need to delete the special HTML tags around the word.

To find indexed words you can search in Code View. Or you can highlight them in Book View in color by adding the following CSS temporarily to your stylesheet: [class=„sigil_index_marker“] { color:#335500; }

Add Entries to Index Editor

[aus dem Sigil User's Guide]
The second way identify words to index is to add the words to a list. Then when you create the index every occurrence of that word will be included in the index automatically. You can use words marked for indexing and a list of words to index at the same time. To add specific words to the index list while in Book View or Code View, highlight the word or phrase, and then select the menu item Tools→Index→Add To Index Editor. If your selected text includes any HTML tags, you should remove them. This will bring up the Index Editor with the word added to the list of entries to index. You can also enter words directly in the Index Editor as described below.

Create the Index

[aus dem Sigil User's Guide]
To actually create your index once you have marked words and/or added them to the list just select the menu item Tools→Index→Create Index. This will create or update an HTML page called index.xhtml. It will be marked with the semantic type „index“. Entries are listed alphabetically, and, using the default styling, look like this:

You can edit the index page as with any HTML page, but if you re-create the index your changes will be over-written.

Custom Index Stylesheet

[aus dem Sigil User's Guide]
The index page uses a separate CSS file (sgc-index.css) to format the index. If the file already exists in your book it will not be overwritten (so you can customise it without losing your changes). But if it does not exist, it will look for sgc-index.css in your preferences directory and use that as the default file. If there is no file in your preferences directory, then Sigil will create a default stylesheet for the index.

Index Editor

[aus dem Sigil User's Guide]
The Index Editor is used to manage the list of entries that will be included in the index. It does not include the words you marked for indexing – they are included automatically. To open the Index Editor select the menu item Tools→Index→Index Editor or its keyboard shortcut:

Text To Include

[aus dem Sigil User's Guide]
The „Text To Include“ column is a list of patterns you want Sigil to search for in your text and then to create an Index entry for using the format in the „Index Entries“ column. Entries in the „Text To Include“ column can use the following formats: • words: The words in the book must exactly match the listed words (case-sensitive). Do not include any HTML tags, just the words as they appear in Book View. • Regex: You can enter most regex patterns - they will be match on a paragraph by paragraph basis. For example, to match words while ignoring case sensitivity you can use „[Gg]utenberg“ or „(?i)Gutenberg“.

You can paste text into the Text To Include field – e.g. from a file containing a list of words – and the text will be automatically split into separate entries for each line. You can also use Open to open a text file of words (and entries separated by tabs).

Index Entries

[aus dem Sigil User's Guide]
The „Index Entries“ column is what will actually appear in the Index for words matching the „Text To Include“ column. Entries in the „Index Entries“ column can use the following formats: • blank: If you leave the entry blank, then the words entered in the Text to Include column will be used for the entry's name. • words: If you enter a word or phrase, then that word or phrase will be used (e.g. Oak instead of oak). • heading/words: If you use a „/“ in your name then a hierarchical group will be created (e.g. Forest/Tree/Oak will create an entry Oak filed under Tree filed under Forest). • heading/: If you use a „/“ at the end of the entry name, then a hierarchical group will be created and the words in the Text to Include column will be used as a sub-entry.

Context Menu

[aus dem Sigil User's Guide]
Most actions concerning editing clips can be done by using the context menu. Select one or more entries then right-click on the selection for the following options: • Add Entry: Add a blank search under the entry you clicked. • Edit: Edit the entry. • Cut: Delete one or more entries that can be pasted later. • Copy: Copy one or more entries that can be pasted later. • Paste: Paste any cut/copied entries. • Delete: Delete entries. • Open: Replace the current Index List with entries from a file (either an index file or a text file). • Reload: Restore the list from the last saved state. • Save As: Save all entries to a file for keeping a per-book list of index entries. • Autofill: Fill the list with every word in the book. • Select All: Select all entries (for easy deletion).

Save

[aus dem Sigil User's Guide]
To save your entries to disk, click Save. To exit without saving your entries you can just close the window (with the close button or the Esc key). You can also use the context menu Reload to reload your entries from disk – which will delete your current entries.

If you save and are running more than one copy of Sigil, then the other instances of Sigil will automatically reload the newly saved index entries to keep all copies in sync.

Filter

[aus dem Sigil User's Guide]
You can use the filter text box to restrict the list of searches shown to make it easier to find a search.

Anmerkungen

Wichtig für professionelles Indexing sind folgende Punkte:

Erzeugung eines Eintrags

  • Ein Eintrag wird erzeugt, indem im vorhandenen Dokumenttext ein Wort oder eine längere Textstelle markiert und per Menü [Werkzeuge - Index - Markierung für Index] als Eintrag festgelegt wird. Dabei wird im Quellcode des Dokumenttextes ein Anker der Gestalt <a class=sigil_index_marker„ id=sigil_index_n“ title=„Indexbegriff“>Indexbegriff</a> angelegt. Hier ist n eine Laufnummer, die pro Datei durchgezählt wird. Die Laufnummer wird erst dann von Sigil vergeben, wenn der Befehl „Erstelle Index“ abgeschickt wird. Standardmäßig wird der markierte Indexbegriff als „title“ in den Eintrag aufgenommen. Der „title“ kann aber bearbeitet werden, sodass er vom Begriff im Dokumenttext abweicht.
  • Beispiel: <p class=„df_fliess_n_u“>Als Veranstalter von <a class=„sigil_index_marker“ id=„sigil_index_id_1“ title=„Seminare/Indexing“>Seminaren</a> zum Thema <a class=„sigil_index_marker“ id=„sigil_index_id_2“ title=„Indexing/Seminare“>Indexing</a> bin ich über die Jahre hinweg mit zahlreichen Themen unterschiedlichster Schwierigkeit konfrontiert worden: von der Frage, wie das Registererstellen in Word grundsätzlich funktioniert über Organisationsdinge (wer sollte wann ein Register anfertigen?) und allgemeine Registerfragen (was muss beim Registermachen beachtet werden?) bis hin zu kniffligen Problemen der Formatierung oder der Sortierung oder technischen Themen im Zusammenhang mit der Datenweitergabe an ein Layoutprogramm.</p>
  • Ein angelegter Eintrag erscheint nur dann im Register, wenn der Anker mindestens einen Buchstaben im Dokumenttext einschließt. Das heißt <a class=„sigil_index_marker“ id=„sigil_index_id_1“ title=„Seminare/Indexing“>Seminaren</a> erscheint im Index, wohingegen <a class=„sigil_index_marker“ id=„sigil_index_id_1“ title=„Seminare/Indexing“></a> nicht erscheinen würde.
  • Es können Unterthemen, ja sogar Unter-Unterthemen und weitere Indexstufen erzeugt werden! Dafür muss nur ein Schrägstrich nach der jeweiligen Stufe eingegeben werden. Das heißt <a class=„sigil_index_marker“ id=„sigil_index_id_2“ title=„Indexing/Seminare“> bedeutet, dass „Seminare“ ein Unterthema von „Indexing“ ist.

Erstellung des Gesamtindexes

  • Der Index wird aus den Einträgen erzeugt, wenn per Menü [Werkzeuge - Index - Erstelle Index] der entsprechende Befehl abgeschickt wird.
  • Die Zeiger sind keine Seitenzahlen, sondern Laufnummern, die mit den Fundstellen im Dokumenttext verlinkt sind; als Trennzeichen zwischen den Nummern dient das Komma. Die Laufnummern werden pro Eintrag vergeben, das heißt sie haben nichts mit den Laufnummern zu tun, die pro Datei in den Eintragsankern (siehe oben) vergeben werden.
  • Um einen Index zu aktualisieren (z.B. wenn ein neuer Eintrag hinzugekommen ist), muss der Befehl zum Erstellen des Index erneut abgeschickt werden.

Import und Export von Indexeinträgen

  • Sigil kann nur folgende Formate öffnen, also importieren: EPUB, HTML und TXT. Sind in einer EPUB- oder HTML-Datei bereits Indexeinträge in Sigil-konformem Code vorhanden, werden diese übernommen. TXT-Dateien können ebenfalls Sigil-konformen Code für Indexeinträge enthalten, der Code wird übernommen, allerdings müssen die Einträge nach dem Import evtl. per Suchen/Ersetzen nachbearbeitet werden.
  • XE-Felder in Word gehen beim Abspeichern als TXT oder HTML verloren, können also nicht an Sigil übergeben werden. Auch mit dem Umweg über InDesign oder Jutoh (Import der Word-Datei, Export von EPUB) können keine Sigil-konformen Codes für Indexeinträge erhalten werden.
  • Beim Export sieht es insofern besser aus, als die EPUB-Datei, die mit Sigil erzeugt wird, in Jutoh eingeladen und von hier aus als ODT-Datei abgespeichert werden kann. Diese wiederum kann mit Word direkt geöffnet werden. Es sind dann zwar keine XE-Felder anstelle der Sigil-Indexmarken vorhanden, aber die Sigil-Indexmarken fungieren als Ziel-Lesezeichen für Verlinkungen. Der komplette Index-Text aus Sigil steht auch in Word zur Verfügung, und alle Zeiger sind zu den jeweiligen Lesezeichen hin verlinkt. Allerdings sind die Zeiger nach wie vor Laufnummern, keine Seitenzahlen. Seitenzahlen würden erst hineinkommen, wenn XE-Felder vorhanden wären. Eine nachträgliche Umwandlung der Lesezeichen in XE-Felder scheint mir aber nicht möglich zu sein.

Wortlisten mit dem Index-Editor

  • Das, was in Sigil „Editor“ heißt, ist nicht so gemeint: Der Index lässt sich damit nicht bearbeiten!
  • Mit dem Index-Editor können lediglich Konkordanzlisten von Begriffen verwaltet und auf ihrer Basis Wortlisten mit sämtlichen Fundstellen der Begriffe im E-Book erzeugt werden. Das heißt, damit erhält man keinen Index, sondern lediglich eine statistische Auswertung des Auftretens der Begriffe.
ebook/sigil.txt · Zuletzt geändert: 2020/12/10 21:56 von 46.223.70.48