top of page
Export to FB2

The script is intended to export the contents of text frames the InDesign document to the FB2 format.

The structure (table of contents) of the book is given by the four paragraph styles: "Body", "Section", "Subsection", "Chapter", thus creates a three-level contents. Paragraph style "Body" defines the beginning of the book (selected name of the book) and the beginning of the footnotes, therefore, no more than two paragraphs of this style. Annotation of the book should be in the style "Book Annotation". Paragraph styles with the required names are created at the first start of the script. The titles of sections, subsections and chapters provided by the appropriate styles. If for page content is needed more than one text frame, this frames must be placed from top to bottom in the follow text order.

Before exporting in FB2 format enter the author's name, genre and language of the book. Implemented the possibility to adding an image of the book cover. The image should be without ICC Profile. Do not recommend using images larger than 1024 px in width or height.

When you click on the contents item is selected the related paragraph.

 

When exporting analyze the following text attributes:

  • subscripts and superscripts,

  • strikethrough text,

  • font style: "Bold", "Italic", "Bold Italic".

The digits in brackets is recognized as footnote number. For a URL (words that begin with "http") creates a hyperlink in FB2 format.

A paragraph must begin and end within one page. Symbols of short and long dashes should be replaced with the characters "hyphen-minus".


Tables.
Tables should be placed in text frames between paragraphs. Table cell must contain only text information (a single paragraph).
When exporting is analyzed:

  • cell type ("normal" style="cell" or "header" style="cellhdr");

  • justify text: left, center, right (attribute "align": the alignment of the cell contents horizontally);

  • "colspan" attribute (the number of cells merged horizontally);

  • "rowspan" attribute (the number of cells merged vertically).



Images.
FB2 format supports two types of images: Portable Network Graphics (PNG) and JPEG (Joint Photographic Experts Group). Images should be placed in the text frames between paragraphs. JPEG files are saved without an ICC profile, do not recommended to use an image larger than 1024 px in width or height. Linked image file is exported without cropping. For the images preparation can be used the script "Transform Images to 100%".

Footnotes (notes).
Areas of notes begins with the second paragraph of the "Body" style. The names (numbers) of footnotes or notes should only be in the style "Section", the number of the selected by this paragraph styles will match the number of footnotes in a book. Footnotes in the main text are indicated by a number in square brackets: "[section footnote number]".

The demo version of the script allows you to export only 7 sections.

Скрипт предназначен для экспорта содержимого текстовых фреймов InDesign-документа в формат FB2.

Структура (оглавление) книги задается с помощью четырех стилей абзаца: "Body", "Section", "Subsection", "Chapter", таким образом создаётся трёхуровневое содержание. Стиль абзаца "Body" определяет начало книги (выделяется название книги) и начало области примечаний (footnotes), поэтому допускается не более двух абзацев данного стиля. Аннотация книги должна быть в стиле "Book Annotation". Стили абзацев с необходимыми именами создаются при первом старте скрипта. Названия разделов, подразделов и глав выделяются соответствующими стилями. Если для содержимого страницы необходимо более одного текстового фрейма, то фреймы должны создаваться в порядке следования текста по вертикали (сверху вниз).

Перед экспортом в формат FB2 вводится имя автора, задаётся жанр и язык книги. Реализована возможность добавления изображения обложки книги. Изображение должно быть без ICC профиля. Не рекомендуется использовать изображения более 1024 px по ширине или высоте.


При нажатии на элемент оглавления происходит выделение связанного абзаца.

При экспорте текстов анализируются:

  • верхние и нижние индексы,

  • перечеркнутый текст,

  • начертание шрифтов: "Bold", "Italic", "Bold Italic".

​Как номера сносок распознаются цифры в квадратных скобках. Для URL адресов (слова, которые начинаются с "http") создаются гиперссылки в формате FB2.

Абзац должен начинаться и заканчиваться в пределах одной страницы. Символы короткого и длинного тире должны быть заменены на символы "дефис-минус".


Таблицы.
Таблицы необходимо размещать в текстовых блоках между абзацами. Ячейки таблиц должны содержать только текстовую информацию (один абзац).
При экспорте анализируется:

  • тип ячейки ("обычная" style="cell" или "заголовочная" style="cellhdr");

  • выключка текста: влево, по центру, вправо (атрибут "align": выравнивание содержимого ячейки по горизонтали);

  • атрибут "colspan" (число ячеек объединенных по горизонтали);

  • атрибут "rowspan" (число ячеек объединенных по вертикали).



Изображения.
Формат FB2 поддерживает два типа изображений: Portable Network Graphics (PNG) и JPEG (Joint Photographic Experts Group). Изображения необходимо помещать в текстовые блоки между абзацами. JPEG файлы сохраняются без ICC профиля, не рекомендуется использовать изображения более 1024 px по ширине или высоте. Файл связанного изображения экспортируется без кадрирования. Для подготовки изображений можно использовать скрипт "Transform Images to 100%".

Примечания (сноски).
Область примечаний начинается со второго абзаца обозначенного стилем "Body". Названия (номера) сносок или примечаний должны быть только в стиле "Section", количество обозначенных данным стилем абзацев будет соответствовать числу сносок в книге. Сноски в основном тексте обозначаются номером в квадратных скобках: "[номер раздела сноски]".

Демонстрационная версия скрипта позволяет экспортировать только 7 секций.

bottom of page