Calibre電子書管理與格式轉換工具

數位出版

簡介

實體書出版

電子書出版

BLOG 網誌

Wiki 出版

影音出版

文件出版

論文出版

HTML5

閱讀器

授權方式

商業模式

文件格式

未來

軟體

數位殯葬業

案例研究

Khan Acacemy

EPub格式

reStructuredText

TreeSaver

CNXML

Pandoc

Tex

Libre Office

Markdown

Kitabu

Calibre

訊息

相關網站

參考文獻

最新修改

簡體版

English

  1. Calibre v0.9.14 繁體中文版 – 功能強大的電子書管理與格式轉換工具
  2. 電子書管理 Calibre 繁中免安裝版(免費)
  3. Calibre-萬用的電子書管理軟體

ebook-convert input_file output_file [options]

TXT 型態的輸入有支援 markdown, textile,

--disable-font-rescaling
Disable all rescaling of font sizes.

---------------------------------------------------------------------------------
Look And Feel
Options to control the look and feel of the output

--asciiize
Transliterate unicode characters to an ASCII representation. Use with care because this will replace unicode characters with ASCII. For instance it will replace “Михаил Горбачёв” with “Mikhail Gorbachiov”. Also, note that in cases where there are multiple representations of a character (characters shared by Chinese and Japanese for instance) the representation based on the current calibre interface language will be used.

--base-font-size
The base font size in pts. All font sizes in the produced book will be rescaled based on this size. By choosing a larger size you can make the fonts in the output bigger and vice versa. By default, the base font size is chosen based on the output profile you chose.

--change-justification
Change text justification. A value of “left” converts all justified text in the source to left aligned (i.e. unjustified) text. A value of “justify” converts all unjustified text to justified. A value of “original” (the default) does not change justification in the source file. Note that only some output formats support justification.

--disable-font-rescaling
Disable all rescaling of font sizes.
--embed-font-family
Embed the specified font family into the book. This specifies the “base” font used for the book. If the input document specifies its own fonts, they may override this base font. You can use the filter style information option to remove fonts from the input document. Note that font embedding only works with some output formats, principally EPUB and AZW3.

--extra-css
Either the path to a CSS stylesheet or raw CSS. This CSS will be appended to the style rules from the source file, so it can be used to override those rules.

--filter-css
A comma separated list of CSS properties that will be removed from all CSS style rules. This is useful if the presence of some style information prevents it from being overridden on your device. For example: font-family,color,margin-left,margin-right

--font-size-mapping
Mapping from CSS font names to font sizes in pts. An example setting is 12,12,14,16,18,20,22,24. These are the mappings for the sizes xx-small to xx-large, with the final size being for huge fonts. The font rescaling algorithm uses these sizes to intelligently rescale fonts. The default is to use a mapping based on the output profile you chose.

--insert-blank-line
Insert a blank line between paragraphs. Will not work if the source file does not use paragraphs (<p> or <div> tags).

--insert-blank-line-size
Set the height of the inserted blank lines (in em). The height of the lines between paragraphs will be twice the value set here.

--keep-ligatures
Preserve ligatures present in the input document. A ligature is a special rendering of a pair of characters like ff, fi, fl et cetera. Most readers do not have support for ligatures in their default fonts, so they are unlikely to render correctly. By default, calibre will turn a ligature into the corresponding pair of normal characters. This option will preserve them instead.

--line-height
The line height in pts. Controls spacing between consecutive lines of text. Only applies to elements that do not define their own line height. In most cases, the minimum line height option is more useful. By default no line height manipulation is performed.

--linearize-tables
Some badly designed documents use tables to control the layout of text on the page. When converted these documents often have text that runs off the page and other artifacts. This option will extract the content from the tables and present it in a linear fashion.

--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. Note: 72 pts equals 1 inch

--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. Note: 72 pts equals 1 inch

--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. Note: 72 pts equals 1 inch

--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. Note: 72 pts equals 1 inch

--minimum-line-height
The minimum line height, as a percentage of the element’s calculated font size. calibre will ensure that every element has a line height of at least this setting, irrespective of what the input document specifies. Set to zero to disable. Default is 120%. Use this setting in preference to the direct line height specification, unless you know what you are doing. For example, you can achieve “double spaced” text by setting this to 240.

--remove-paragraph-spacing
Remove spacing between paragraphs. Also sets an indent on paragraphs of 1.5em. Spacing removal will not work if the source file does not use paragraphs (<p> or <div> tags).

--remove-paragraph-spacing-indent-size
When calibre removes blank lines between paragraphs, it automatically sets a paragraph indent, to ensure that paragraphs can be easily distinguished. This option controls the width of that indent (in em). If you set this value negative, then the indent specified in the input document is used, that is, calibre does not change the indentation.

--smarten-punctuation
Convert plain quotes, dashes and ellipsis to their typographically correct equivalents. For details, see http://daringfireball.net/projects/smartypants
--subset-embedded-fonts
Subset all embedded fonts. Every embedded font is reduced to contain only the glyphs used in this document. This decreases the size of the font files. Useful if you are embedding a particularly large font with lots of unused glyphs.

--unsmarten-punctuation¶
Convert fancy quotes, dashes and ellipsis to their plain equivalents.
HTML Output Options
--extract-to
Extract the contents of the generated ZIP file to the specified directory. WARNING: The contents of the directory will be deleted.

--pretty-print
If specified, the output plugin will try to create output that is as human readable as possible. May not have any effect for some output plugins.

--template-css
CSS file used for the output instead of the default file

--template-html
Template used for the generation of the html contents of the book instead of the default file

--template-html-index
Template used for generation of the html index file instead of the default file
----------------------------------------------------------------------------------------
TXT Input Options
--formatting-type
Formatting used within the document.* auto: Automatically decide which formatting processor to use. * plain: Do not process the document formatting. Everything is a paragraph and no styling is applied. * heuristic: Process using heuristics to determine formatting such as chapter headings and italic text. * textile: Processing using textile formatting. * markdown: Processing using markdown formatting. To learn more about markdown see http://daringfireball.net/projects/markdown/
--input-encoding
Specify the character encoding of the input document. If set this option will override any encoding declared by the document itself. Particularly useful for documents that do not declare an encoding or that have erroneous encoding declarations.

--markdown-disable-toc
Do not insert a Table of Contents into the output text.

--paragraph-type
Paragraph structure. choices are [‘auto’, ‘block’, ‘single’, ‘print’, ‘unformatted’, ‘off’] * auto: Try to auto detect paragraph type. * block: Treat a blank line as a paragraph break. * single: Assume every line is a paragraph. * print: Assume every line starting with 2+ spaces or a tab starts a paragraph. * unformatted: Most lines have hard line breaks, few/no blank lines or indents. Tries to determine structure and reformat the differentiate elements. * off: Don’t modify the paragraph structure. This is useful when combined with Markdown or Textile formatting to ensure no formatting is lost.

--preserve-spaces
Normally extra spaces are condensed into a single space. With this option all spaces will be displayed.

--txt-in-remove-indents
Normally extra space at the beginning of lines is retained. With this option they will be removed.
----------------------------------------------------------------------------------------
Table Of Contents
Control the automatic generation of a Table of Contents. By default, if the source file has a Table of Contents, it will be used in preference to the automatically generated one.

--duplicate-links-in-toc
When creating a TOC from links in the input document, allow duplicate entries, i.e. allow more than one entry with the same text, provided that they point to a different location.

--level1-toc
XPath expression that specifies all tags that should be added to the Table of Contents at level one. If this is specified, it takes precedence over other forms of auto-detection. See the XPath Tutorial in the calibre User Manual for examples.
--level2-toc
XPath expression that specifies all tags that should be added to the Table of Contents at level two. Each entry is added under the previous level one entry. See the XPath Tutorial in the calibre User Manual for examples.

--level3-toc
XPath expression that specifies all tags that should be added to the Table of Contents at level three. Each entry is added under the previous level two entry. See the XPath Tutorial in the calibre User Manual for examples.

--max-toc-links
Maximum number of links to insert into the TOC. Set to 0 to disable. Default is: 50. Links are only added to the TOC if less than the threshold number of chapters were detected.

--no-chapters-in-toc
Don’t add auto-detected chapters to the Table of Contents.

--toc-filter
Remove entries from the Table of Contents whose titles match the specified regular expression. Matching entries and all their children are removed.

--toc-threshold
If fewer than this number of chapters is detected, then links are added to the Table of Contents. Default: 6

--use-auto-toc
Normally, if the source file already has a Table of Contents, it is used in preference to the auto-generated one. With this option, the auto-generated one is always used.

--------------------------------------------------------------------------------------------------
PDF Output Options
--custom-size
Custom size of the document. Use the form widthxheight EG. 123x321 to specify the width and height. This overrides any specified paper-size.

--old-pdf-engine
Use the old, less capable engine to generate the PDF

--override-profile-size
Normally, the PDF page size is set by the output profile chosen under page options. This option will cause the page size settings under PDF Output to override the size specified by the output profile.

--paper-size
The size of the paper. This size will be overridden when a non default output profile is used. Default is letter. Choices are [u’a0’, u’a1’, u’a2’, u’a3’, u’a4’, u’a5’, u’a6’, u’b0’, u’b1’, u’b2’, u’b3’, u’b4’, u’b5’, u’b6’, u’legal’, u’letter’]

--pdf-default-font-size
The default font size

--pdf-mark-links
Surround all links with a red box, useful for debugging.

--pdf-mono-family
The font family used to render monospaced fonts

--pdf-mono-font-size
The default font size for monospaced text

--pdf-sans-family
The font family used to render sans-serif fonts

--pdf-serif-family
The font family used to render serif fonts

--pdf-standard-font
The font family used to render monospaced fonts

--preserve-cover-aspect-ratio
Preserve the aspect ratio of the cover, instead of stretching it to fill the full first page of the generated pdf.

--pretty-print
If specified, the output plugin will try to create output that is as human readable as possible. May not have any effect for some output plugins.

--uncompressed-pdf
Generate an uncompressed PDF, useful for debugging, only works with the new PDF engine.

--unit, -u
The unit of measure for page sizes. Default is inch. Choices are [‘millimeter’, ‘centimeter’, ‘

Facebook

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License