-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update the guide to sigil 2.3.0 (2nd chance)
- Loading branch information
1 parent
9df6756
commit cae0175
Showing
65 changed files
with
515 additions
and
240 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,137 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!DOCTYPE html> | ||
|
||
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" lang="en" xml:lang="en"> | ||
<head> | ||
<title>Advanced Topics</title> | ||
<link href="../Styles/styles.css" type="text/css" rel="stylesheet"/> | ||
</head> | ||
|
||
<body> | ||
<h1 id="user_interface">Advanced Topics</h1> | ||
|
||
<h2 id="sigil_toc_id_35">Using Sigil's Environment Variables</h2> | ||
|
||
|
||
<p>Some rarely needed settings in Sigil are controlled by "Environment Variables". An environment variable is a user-definable value that can affect the way running processes will behave on a computer. See <a href="https://en.wikipedia.org/wiki/Environment_variable">https://en.wikipedia.org/wiki/Environment_variable></a> for more information on setting and using environment variables on your computer.</p> | ||
|
||
<p>Sigil Uses the following Environment Varabiles:</p> | ||
|
||
<ul> | ||
<li><p><span class="listheading">SIGIL_DISABLE_VERSION_META</span> Set this environment variable to any value to prevent Sigil from adding the metadata that identifies Sigil as the producer of this epub.</p></li> | ||
|
||
<li><p><span class="listheading">SIGIL_DISABLE_NFC_NORMALIZATION</span> Set this environment variable to disable conversion of user content to use Unicode Normalization Form C. Please note, disabling use of NFC form means that many e-readers will be unable to properly search your epub for texts that include accents.</p></li> | ||
|
||
<li><p><span class="listheading">SIGIL_FOCUS_HIGHLIGHT_COLOR</span> This allows the user to control the color used when Focus Highlight Rectangles are enabled. Its value should be a standard css color value beginning with '#' followed by 6 hex digits.</p></li> | ||
|
||
<li><p><span class="listheading">SIGIL_ALLOW_CODEVIEW_DROP</span> If this value is set, drag and drop editing inside CodeView is enabled. Be warned that on some platforms, using drag and drop to edit inside CodeView can be unstable causing Sigil to crash. No support will be provided to people who decide to enable drag and drop as fixing these issues are outside our control (internal to Qt6).</p></li> | ||
|
||
<li><p><span class="listheading">SIGIL_DEBUG_LOGFILE</span> Setting this to the full path (including file name and extension) to a user-writeable location will cause Sigil to output any additional debug information to that log file. Unset this environment after debugging is important as this file will continue to build up output eventually filling up user disk space and slowing down Sigil.</p></li> | ||
|
||
<li><p><span class="listheading">SIGIL_USE_FREETYPE_FONTENGINE</span> This environment variable is <b>Windows Only</b>. Setting this will tell Sigil to use the FreeType Font Engine. This is useful on Windows for users who make heavy use of // Woff/woff2 fonts in their epub. Current Qt version of the Windows Font Engine does not support these font types.</p></li> | ||
|
||
<li><p><span class="listheading">SIGIL_PREVIEW_TIMEOUT</span> Setting this to a number (of milliseconds) will determine the length of time after user input stops while editing in CodeView until Preview is updated. The minimum delay is 1000 milliseconds and the maximum delay can be set up to 10000 milliseconds. Therre is typically no reason to set this unless you are editing huge xhtml files that take too long for Preview to update.</p></li> | ||
|
||
<li><p><span class="listheading">SIGIL_DRAG_DISTANCE_TWEAK</span> This environment varaible is <b>Windows Only</b>. You can set this to change the distance in pixels needed to move something before drag and drop is detected by the system. Its valid values range from -20 to 20 pixels.</p></li> | ||
|
||
<li><p><span class="listheading">SIGIL_DISABLE_CURSOR_BLINK</span> Many people have senstivities to flashing and blinking. If you are one of those people, you can set this environment variable to disable the constant cursor blinking used in CodeView and in many input dialogs.</p></li> | ||
|
||
<li><p><span class="listheading">SKIP_SIGIL_UPDATE_CHECK</span> Setting this tells Sigil *NOT* to use the network to query for the latest version of Sigil. This may be important for Linux distributions who build and release their own versions of Sigil and would prefer you use their builds.</p></li> | ||
|
||
<li><p><span class="listheading">SIGIL_PREFS_DIR</span> This environment Variable is primarily <b>Linux Only</b>. Setting this tells Sigil where your Sigil Preferences Location folder is located.</p></li> | ||
|
||
<li><p><span class="listheading">SIGIL_EXTRA_ROOT</span> This environment Variable is primarily <b>Linux Only</b>. Setting this tells Sigil where your share/sigil folder is located.</p></li> | ||
|
||
<li><p><span class="listheading">SIGIL_DICTIONARIES</span> This environment Variable is primarily <b>Linux Only</b>. Setting this tells Sigil where to locate the hunspell dictionaries installed on your system.</p></li> | ||
</ul> | ||
|
||
<div class="tip"> | ||
<p class="tiptext">In addition to the Sigil specific environment variables, you can also use Qt6 specific environment varaibles including QT_QPA_PLATFORM and QTWEBENGINE_CHROMIUM_FLAGS. You will need a search engine to find recent Qt6 information on how these environment variables can be used to control Sigil as these change with newer releases.</p> | ||
</div> | ||
|
||
<hr class="narrow"/> | ||
|
||
<h2 id="sigil_toc_id_36">Using Sigil's Template Files</h2> | ||
|
||
<p>Many users of Sigil develop their own versions of starting xhtml, and css files that they would much prefere using over what Sigil defaults to. To address these concerns, Sigil has added the ability to load user defined starting xhtml, and css files. To create these "templates" simply edit any blank xhtml or css page to your liking and then save it to your Sigil Preferences Location with one of these specific filenames. When you are a Blank HTML or Blank CSS files using Sigil's BookBrowser, sigil will use your templates instead. To prevent their use simply rename or delete them.</p> | ||
|
||
<ul> | ||
<li><p><span class="listheading">user-template2.xhtml</span> Epub2 specific xhtml file.</p></li> | ||
|
||
<li><p><span class="listheading">user-template3.xhtml</span> Epub3 specific xhtml file.</p></li> | ||
|
||
<li><p><span class="listheading">user-template2.css</span> Epub2 specific css file.</p></li> | ||
|
||
<li><p><span class="listheading">user-template3.css</span> Epub3 specific css file.</p></li> | ||
|
||
</ul> | ||
|
||
<p>In a similar manner, many people prefer specific layouts for their cover images xhtml pages. To facilitate thise Sigil allows the user to create a cover-template2.xhtml or cover-template3.xhtml file and store it in Sigil's Preferences Location.</p> | ||
<p>Sigil allows these cover templates to use a set of PLACEHOLDERS that Sigil will automatically fill in values for when creating the cover: </p> | ||
<ul> | ||
<li>SGC_IMAGE_FILENAME - the relative path to the chosen image.</li> | ||
<li>SGC_IMAGE_WIDTH - the width in pixels of the chosen image.</li> | ||
<li>SGC_IMAGE_HEIGHT - the height in pixels of the chosen image.</li> | ||
</ul> | ||
|
||
<p>Here is an example of a cover-template3.xhtml that uses SVG and makes use of these PLACEHOLDERS:</p> | ||
|
||
<pre><code> | ||
<?xml version="1.0" encoding="UTF-8" standalone="no" ?> | ||
<!DOCTYPE html> | ||
|
||
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" lang="en" xml:lang="en"> | ||
<head> | ||
<title>Cover</title> | ||
</head> | ||
|
||
<body> | ||
<div style="height: 100vh; text-align: center; padding: 0pt; margin: 0pt;"> | ||
<svg xmlns="http://www.w3.org/2000/svg" height="100%" preserveAspectRatio="xMidYMid meet" version="1.1" viewBox="0 0 SGC_IMAGE_WIDTH SGC_IMAGE_HEIGHT" width="100%" xmlns:xlink="http://www.w3.org/1999/xlink"> | ||
<image width="SGC_IMAGE_WIDTH" height="SGC_IMAGE_HEIGHT" xlink:href="SGC_IMAGE_FILENAME\"/> | ||
</svg> | ||
</div> | ||
</body> | ||
</html> | ||
</code></pre> | ||
|
||
<hr class="narrow"/> | ||
|
||
<h2 id="sigil_toc_id_37">Embedding a PDF inside an Epub3</h2> | ||
|
||
<p> Many e-readers employ the Adobe Digital Editions Software Development Kit as their underlying rendering and display engine. Many other employ Web Browser-based display engines. All of these e-readers have the capability to include Adobe PDF documents inside their epub.</p> | ||
|
||
<p>Unfortunately many older e-readers do not support PDF. The epub3 specification does allow for this case by providing "fallback" resources (or sometimes OPF bindings) to handle the cases when the e-reader does not have the ability to display a resource type.</p> | ||
|
||
<p>More unfortunately, according to the developers of Epubcheck, few e-readers actually support the use of fallback resources or OPF bindings. This leaves epub3 developers in a quandary. Luckily the "object" tag can be used to create an xhtml/html based fallback allowing the spine to be comprised of purely xhtml files.</p> | ||
|
||
<p>Here is an example of how to use the "object" tag in an xhtml file to display an embedded PDF or an xhtml-based alternative as a fallback that works on many older e-readers for that can not handle the PDF format.</p> | ||
|
||
|
||
<pre><code> | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!DOCTYPE html> | ||
|
||
<html xmlns="http://www.w3.org/1999/xhtml"> | ||
<head> | ||
<title>PDF Test Page</title> | ||
</head> | ||
|
||
<body> | ||
|
||
<object type="application/pdf" data="../Misc/demo.pdf" width="500" height="500"> | ||
|
||
<!-- The child of the object tag holds the xhtml fallback --> | ||
<h3 class="sigil_not_in_toc">PDF Fallback text</h3> | ||
|
||
<p>This text is being displayed, if the reader or reading device doesn't support embedded .pdf files.</p> | ||
|
||
</object> | ||
|
||
</body> | ||
</html> | ||
</code></pre> | ||
|
||
<p>In addition direct links to the PDF are possible and loading the links into a iframe is alo possible but these approaches do not allow for fallbacks for older e-readers and should be avoided if at all possible.</p> | ||
</body> | ||
</html> |
Oops, something went wrong.