输入格式选项
输出格式选项
处理输出 epub
的选项设置
- --dont-split-on-page-breaks
- Turn off splitting at page breaks. Normally, input files are automatically
split at every page break into two files. This gives an output e-book that
can be parsed faster and with less resources. However, splitting is slow
and if your source file contains a very large number of page breaks, you
should turn off splitting on page breaks.
- --epub-flatten
- 仅在您需要使用 FBReaderJ
阅读 EPUB
文件时使用本选项。启用本选项会消除
EPUB
文件中的目录结构,把所有文件放到同一层目录中。
- 解压EPUB文件的内容到指定文件夹。请注意该文件夹会先被清空。
- --flow-size
- 将大于该大小
(以KB为单位)
的HTML文件切分。由于很多EPUB阅读器无法打开巨大的文件,故此功能十分有用。默认值
260KB 是Adobe Digital Editions
的文件大小要求。设置为0来禁用大小为基准的切分。
- --no-svg-cover
- 请不要使用 SVG
作为书籍封面。如果您打算将
EPUB 文件用到不支持 SVG
格式的设备(像 iPhone 或 JetBook
Lite)上的话,请使用该选项。不选中此选项的话,这类设备将只能显示封面为一个空白页。
- --preserve-cover-aspect-ratio
- 当使用 SVG
封面时,该选项会导致封面平铺满有效的屏幕区字段,但仍会保持它的纵宽比(宽度和高度的比例)。意思就是说,这可能会在图像顶边或底边处产生空白边界,但是图像本身不会被扭曲变形。不选该选项的话,图像可能会产生轻微的扭曲变形,但优点是不会出现空白边界。
界面外观
输出的界面外观选项设置
- --asciiize
- 把 Unicode 字符转换为 ASCII
表达型式。请谨慎使用这个功能,因为它会把所有的
Unicode 字符转换为 ASCII
字符。比如:它会把
"Михаил
Горбачёв"
替换为 "Mikhail
Gorbachiov"。并且当一个字符可能有多种表示方式时(比如中文和日文中一些共用的字符),
calibre
会根据当前设置的界面语言类型决定如何去转换这类字符。
- --base-font-size
- 基准字体尺寸(pts)。所有输出文件中的文字将以此为基准进行缩放。选择一个较大的基准字体可以将所有文字相应放大,反之亦然。在默认情况下,程序根据您选择的输出配置文件来设定基准字体尺寸。
- --change-justification
- 更改文本对齐方式。
使用值"left"
将转换资源中所有的文本为左对齐。
(如:未对齐)
使用值"justify"
将转换资源中所有的未对齐的文本为对齐。使用值"original"(默认)则不更改源文件的对齐方式。请注意,仅部分输出格式支持对齐方式。
- --embed-all-fonts
- 嵌入输入文档中引用到但未嵌入的字体。软件会在你的系统中查找这些字体,找到了就嵌入。字体嵌入只有当你的目的格式支持才有用,例如
EPUB、AZW3、DOCX 和
PDF。请保证你拥有在文档中嵌入字体的合适授权。
- --embed-font-family
- 在书中嵌入指定字体。这指定了书中使用的“基础”字体。如果输入文件自己指定了字体,就有可能覆盖这个基础字体。你可以使用过滤样式信息的选项来去除输入文件的字体。注意,字体嵌入只在一些输出格式中有用,主要是
EPUB、AZW3 和 DOCX。
- --expand-css
- calibre 默认会使用各种 CSS
属性值的简写形式,如
margin、padding、border
等。打开此选项会使用完全展开的形式替代。注意,当生成采用了
Nook 系列配置文件的 EPUB
文件时,CSS
总是会用展开的形式,这是因为
Nook 无法处理简写的
CSS。
- CSS 样式表或原始 CSS
文件路径。该 CSS
样式表将会被添加到源文件的样式规则中,它可以覆盖输入文件中已定义的相同样式。
- --filter-css
- 以逗号分隔的 CSS
属性列表,将移除所有
CSS
样式规则。这是非常有用的,如果存在的一些样式信息,防止覆盖您的的设备上的样式信息。例如:字体系列,颜色,左边距,右边距
- --font-size-mapping
- 将CSS字体名称映射为以pts为单位的字体大小.
例如12,12,14,16,18,20,22,24.
这些设置是从xx-small到xx-large的对应映射,
最后的大小作为做对应的最大字体的映射.
程序用这些尺寸进行只能文字字体缩放.
程序默认使用输出配置文件中指定的映射关系.
- --keep-ligatures
- 保留输入文档中的“印刷连字”。所谓“印刷连字”是指对于ff,
fi,
fl之类的字母组合的一种特殊的展示方式。大部分阅读器在使用默认字体时无法支持“印刷连字”,所以常常无法正常显示。默认情况下,Calibre会把“印刷连字”转换成对应的字母组合。本选项用于选择保留“印刷连字”。
- --line-height
- pt
行高。控制两行高度距离。仅仅适用于未定义行高的元素。大多数情况下,最小行高值更加有用。默认不进行行高操控。
- --margin-bottom
- Set the bottom margin in pts. Default is 5.0. Setting this to less than
zero will cause no margin to be set (the margin setting in the original
document will be preserved). Note: Page oriented formats such as PDF and
DOCX have their own margin settings that take precedence.
- --margin-left
- Set the left margin in pts. Default is 5.0. Setting this to less than zero
will cause no margin to be set (the margin setting in the original
document will be preserved). Note: Page oriented formats such as PDF and
DOCX have their own margin settings that take precedence.
- --margin-right
- Set the right margin in pts. Default is 5.0. Setting this to less than
zero will cause no margin to be set (the margin setting in the original
document will be preserved). Note: Page oriented formats such as PDF and
DOCX have their own margin settings that take precedence.
- --margin-top
- Set the top margin in pts. Default is 5.0. Setting this to less than zero
will cause no margin to be set (the margin setting in the original
document will be preserved). Note: Page oriented formats such as PDF and
DOCX have their own margin settings that take precedence.
- --minimum-line-height
- 最小行高,元素字体计算值的百分比。calibre
将保证行中所有元素至少有此高度,无论输入文档如何定义。设为零即禁用。默认
120%。首选项中也有此设定,请注意。否则可能出现双倍行高,达
240%。
- --smarten-punctuation
- Convert plain quotes, dashes and ellipsis to their typographically correct
equivalents. For details, see
https://daringfireball.net/projects/smartypants
- --transform-css-rules
- Path to a file containing rules to transform the CSS styles in this book.
The easiest way to create such a file is to use the wizard for creating
rules in the calibre GUI. Access it in the "Look &
feel->Transform styles" section of the conversion dialog.
Once you create the rules, you can use the
"Export" button to save them to a file.
启发式处理
使用常见模式修改文档内容与结构。默认禁用。使用
--enable-heuristics
启用该功能。具体选项可以通过
--disable-* 参数禁用。
- --html-unwrap-factor
- 决定一行字符是否能成为一个新的段落的因子,有效值为
0 到 1
之间的小数,默认值是
0.4,即略小于半行的长度。如果文档中只有很少的行需要消除段落内换行,应当减小这个设置值。
查找并替换
以用户预定义的模式修改文档内容和结构。
- --search-replace
- Path to a file containing search and replace regular expressions. The file
must contain alternating lines of regular expression followed by
replacement pattern (which can be an empty line). The regular expression
must be in the Python regex syntax and the file must be UTF-8
encoded.
结构检测
设置自动检测文档结构。
- --chapter
- An XPath expression to detect chapter titles. The default is to consider
<h1> or <h2> tags that contain the words
"chapter", "book",
"section", "prologue",
"epilogue" or "part" as
chapter titles as well as any tags that have
class="chapter". The expression used must evaluate
to a list of elements. To disable chapter detection, use the expression
"/". See the XPath Tutorial in the calibre User
Manual for further help on using this feature.
- --chapter-mark
- 设置标注章节的模式.
"pagebreak"模式会在章节前插入下一页控制符.
"rule"模式会在章节前插入空行.
"none"模式不会在章节前插入控制.
"both"模式会在章节前插入下一页控制符和空行.
- --insert-metadata
- Insert the book metadata at the start of the book. This is useful if your
e-book reader does not support displaying/searching metadata
directly.
- --remove-first-image
- Remove the first image from the input e-book. Useful if the input document
has a cover image that is not identified as a cover. In this case, if you
set a cover in calibre, the output document will end up with two cover
images if you do not specify this option.
- --start-reading-at
- An XPath expression to detect the location in the document at which to
start reading. Some e-book reading programs (most prominently the Kindle)
use this location as the position at which to open the book. See the XPath
tutorial in the calibre User Manual for further help using this
feature.
目录
设置自动生成目录。默认情况下若源文件有目录,它将被首选自动创建。
- --level1-toc
- 指定应添加到目录级别1的所有标签的
XPath
表达式。如果指定此项,它会优先于其他自动检测形式。可查阅
calibre 用户手册中的 XPath
向导。
- --level2-toc
- XPath
表达式指定所有标签应添加在二级目录表。每个条目加入到一级目录条目下。请参阅
calibre 用户手册中 XPath
教程的例子。
- --level3-toc
- XPath
表达式指定所有标签应添加在三级目录表。每个条目加入到二级目录条目下。请参阅
calibre 用户手册中 XPath
教程的例子。
- --max-toc-links
- 输出文件目录中的最多链接项数量。设置为
0
表示关闭。默认值:50。只有在检测到的章节数量小于该阈值时这些链接项才会被添加到目录中。
元数据
设定输出的元数据选项
- --pubdate
- Set the publication date (assumed to be in the local timezone, unless the
timezone is explicitly specified)
- --series-index
- 设置书籍在丛书中的索引位置。
- --title-sort
- 用作排序的书籍标题序列数字。
调试