Basic biblical tools.
[librarian.git] / src / librarian / elements / paragraphs / akap.py
1 # This file is part of Librarian, licensed under GNU Affero GPLv3 or later.
2 # Copyright © Fundacja Wolne Lektury. See NOTICE for more information.
3 #
4 from ..base import WLElement
5
6
7 class Akap(WLElement):
8     STRIP = True
9     NUMBERING = 'main'
10
11     TXT_TOP_MARGIN = 2
12     TXT_BOTTOM_MARGIN = 2
13
14     EPUB_CLASS = 'paragraph'
15
16     HTML_TAG = 'p'
17     HTML_CLASS = 'wl paragraph'
18
19     FB2_TAG = 'p'
20
21     has_visible_numbering = True
22
23     @property
24     def EPUB_TAG(self):
25         try:
26             return self._set_EPUB_TAG
27         except AttributeError:
28             if self.in_context_of('START_INLINE'):
29                 self.signal('INLINE')
30                 self._set_EPUB_TAG = None
31             else:
32                 self._set_EPUB_TAG = 'p'
33             return self._set_EPUB_TAG
34