Refactor manuscript format text scaling and text margin settings (#2102)

This commit is contained in:
Veronica Berglyd Olsen
2024-11-13 23:22:28 +01:00
committed by GitHub
31 changed files with 298 additions and 280 deletions
@@ -64,6 +64,10 @@ font = nw_font.svg
forward = typ_chevron-right.svg
import = mixed_import.svg
list = typ_th-list.svg
margin_bottom = mixed_margin-bottom.svg
margin_left = mixed_margin-left.svg
margin_right = mixed_margin-right.svg
margin_top = mixed_margin-top.svg
maximise = typ_arrow-maximise.svg
menu = typ_th-dot-menu.svg
minimise = typ_arrow-minimise.svg
@@ -94,6 +98,8 @@ search_regex = nw_search-regex.svg
search_replace = mixed_search-replace.svg
search_word = nw_search-word.svg
settings = typ_cog.svg
size_height = mixed_size-height.svg
size_width = mixed_size-width.svg
star = typ_star.svg
status_idle = typ_media-pause-grey.svg
status_lang = typ_globe-grey.svg
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="24" height="24" version="1.2" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<rect x="2" y="2" width="20" height="20" rx="1" ry="1" fill="#e6e6e6" fill-opacity=".14902" stroke-linecap="round" stroke-width="2"/>
<rect x="2" y="18" width="20" height="4" rx="1" ry="1" fill="#848484" stroke-linecap="round" stroke-width="2"/>
<path d="m18.414 8.5959c0.78104 0.79361 0.78104 2.0837 0 2.8773l-6.4141 6.5268-6.4141-6.5268c-0.391-0.3968-0.58601-0.91769-0.58601-1.4386 0-0.52092 0.195-1.0418 0.58601-1.4386 0.78104-0.79464 2.047-0.79464 2.8281 0l3.5861 3.6475 3.5861-3.6475c0.78104-0.79464 2.047-0.79464 2.8281 0z" fill="#69c" stroke-width="1.0087"/>
</svg>

After

Width:  |  Height:  |  Size: 713 B

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="24" height="24" version="1.2" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<rect x="2" y="2" width="20" height="20" rx="1" ry="1" fill="#e6e6e6" fill-opacity=".14902" stroke-linecap="round" stroke-width="2"/>
<rect x="2" y="2" width="4" height="20" rx="1" ry="1" fill="#848484" stroke-linecap="round" stroke-width="2"/>
<path d="m15.404 18.5c-0.79361 0.78104-2.0837 0.78104-2.8773 0l-6.5268-6.4141 6.5268-6.4141c0.3968-0.391 0.91769-0.58601 1.4386-0.58601 0.52092 0 1.0418 0.195 1.4386 0.58601 0.79464 0.78104 0.79464 2.047 0 2.8281l-3.6475 3.5861 3.6475 3.5861c0.79464 0.78104 0.79464 2.047 0 2.8281z" fill="#69c" stroke-width="1.0087"/>
</svg>

After

Width:  |  Height:  |  Size: 711 B

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="24" height="24" version="1.2" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<rect x="2" y="2" width="20" height="20" rx="1" ry="1" fill="#e6e6e6" fill-opacity=".14902" stroke-linecap="round" stroke-width="2"/>
<rect x="18" y="2" width="4" height="20" rx="1" ry="1" fill="#848484" stroke-linecap="round" stroke-width="2"/>
<path d="m8.5959 18.5c0.79361 0.78104 2.0837 0.78104 2.8773 0l6.5268-6.4141-6.5268-6.4141c-0.3968-0.391-0.91769-0.58601-1.4386-0.58601-0.52092 0-1.0418 0.195-1.4386 0.58601-0.79464 0.78104-0.79464 2.047 0 2.8281l3.6475 3.5861-3.6475 3.5861c-0.79464 0.78104-0.79464 2.047 0 2.8281z" fill="#69c" stroke-width="1.0087"/>
</svg>

After

Width:  |  Height:  |  Size: 711 B

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="24" height="24" version="1.2" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<rect x="2" y="2" width="20" height="20" rx="1" ry="1" fill="#e6e6e6" fill-opacity=".14902" stroke-linecap="round" stroke-width="2"/>
<rect x="2" y="2" width="20" height="4" rx="1" ry="1" fill="#848484" stroke-linecap="round" stroke-width="2"/>
<path d="m18.414 15.404c0.78104-0.79361 0.78104-2.0837 0-2.8773l-6.4141-6.5268-6.4141 6.5268c-0.391 0.3968-0.58601 0.91769-0.58601 1.4386 0 0.52092 0.195 1.0418 0.58601 1.4386 0.78104 0.79464 2.047 0.79464 2.8281 0l3.5861-3.6475 3.5861 3.6475c0.78104 0.79464 2.047 0.79464 2.8281 0z" fill="#69c" stroke-width="1.0087"/>
</svg>

After

Width:  |  Height:  |  Size: 712 B

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="24" height="24" version="1.2" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<rect x="2" y="2" width="20" height="20" rx="1" ry="1" fill="#e6e6e6" fill-opacity=".14902" stroke-linecap="round" stroke-width="2"/>
<path d="m18.414 10.404c0.78104-0.79361 0.78104-2.0837 0-2.8773l-6.4141-6.5268-6.4141 6.5268c-0.391 0.3968-0.58601 0.91769-0.58601 1.4386 0 0.52092 0.195 1.0418 0.58601 1.4386 0.78104 0.79464 2.047 0.79464 2.8281 0l3.5861-3.6475 3.5861 3.6475c0.78104 0.79464 2.047 0.79464 2.8281 0z" fill="#69c" stroke-width="1.0087"/>
<path d="m18.414 13.596c0.78104 0.79361 0.78104 2.0837 0 2.8773l-6.4141 6.5268-6.4141-6.5268c-0.391-0.3968-0.58601-0.91769-0.58601-1.4386 0-0.52092 0.195-1.0418 0.58601-1.4386 0.78104-0.79464 2.047-0.79464 2.8281 0l3.5861 3.6475 3.5861-3.6475c0.78104-0.79464 2.047-0.79464 2.8281 0z" fill="#69c" stroke-width="1.0087"/>
</svg>

After

Width:  |  Height:  |  Size: 921 B

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="24" height="24" version="1.2" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<rect x="2" y="2" width="20" height="20" rx="1" ry="1" fill="#e6e6e6" fill-opacity=".15" stroke-linecap="round" stroke-width="2"/>
<path d="m13.596 18.414c0.79361 0.78104 2.0837 0.78104 2.8773 0l6.5268-6.4141-6.5268-6.4141c-0.3968-0.391-0.91769-0.58601-1.4386-0.58601-0.52092 0-1.0418 0.195-1.4386 0.58601-0.79464 0.78104-0.79464 2.047 0 2.8281l3.6475 3.5861-3.6475 3.5861c-0.79464 0.78104-0.79464 2.047 0 2.8281z" fill="#69c" stroke-width="1.0087"/>
<path d="m10.404 18.414c-0.79361 0.78104-2.0837 0.78104-2.8773 0l-6.5268-6.4141 6.5268-6.4141c0.3968-0.391 0.91769-0.58601 1.4386-0.58601 0.52092 0 1.0418 0.195 1.4386 0.58601 0.79464 0.78104 0.79464 2.047 0 2.8281l-3.6475 3.5861 3.6475 3.5861c0.79464 0.78104 0.79464 2.047 0 2.8281z" fill="#69c" stroke-width="1.0087"/>
</svg>

After

Width:  |  Height:  |  Size: 919 B

@@ -64,6 +64,10 @@ font = nw_font.svg
forward = typ_chevron-right.svg
import = mixed_import.svg
list = typ_th-list.svg
margin_bottom = mixed_margin-bottom.svg
margin_left = mixed_margin-left.svg
margin_right = mixed_margin-right.svg
margin_top = mixed_margin-top.svg
maximise = typ_arrow-maximise.svg
menu = typ_th-dot-menu.svg
minimise = typ_arrow-minimise.svg
@@ -94,6 +98,8 @@ search_regex = nw_search-regex.svg
search_replace = mixed_search-replace.svg
search_word = nw_search-word.svg
settings = typ_cog.svg
size_height = mixed_size-height.svg
size_width = mixed_size-width.svg
star = typ_star.svg
status_idle = typ_media-pause-grey.svg
status_lang = typ_globe-grey.svg
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="24" height="24" version="1.2" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<rect x="2" y="2" width="20" height="20" rx="1" ry="1" fill="#333" fill-opacity=".15" stroke-linecap="round" stroke-width="2"/>
<rect x="2" y="18" width="20" height="4" rx="1" ry="1" fill="#333" stroke-linecap="round" stroke-width="2"/>
<path d="m18.414 8.5959c0.78104 0.79361 0.78104 2.0837 0 2.8773l-6.4141 6.5268-6.4141-6.5268c-0.391-0.3968-0.58601-0.91769-0.58601-1.4386 0-0.52092 0.195-1.0418 0.58601-1.4386 0.78104-0.79464 2.047-0.79464 2.8281 0l3.5861 3.6475 3.5861-3.6475c0.78104-0.79464 2.047-0.79464 2.8281 0z" fill="#4271ae" stroke-width="1.0087"/>
</svg>

After

Width:  |  Height:  |  Size: 707 B

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="24" height="24" version="1.2" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<rect x="2" y="2" width="20" height="20" rx="1" ry="1" fill="#333" fill-opacity=".15" stroke-linecap="round" stroke-width="2"/>
<rect x="2" y="2" width="4" height="20" rx="1" ry="1" fill="#333" stroke-linecap="round" stroke-width="2"/>
<path d="m15.404 18.5c-0.79361 0.78104-2.0837 0.78104-2.8773 0l-6.5268-6.4141 6.5268-6.4141c0.3968-0.391 0.91769-0.58601 1.4386-0.58601 0.52092 0 1.0418 0.195 1.4386 0.58601 0.79464 0.78104 0.79464 2.047 0 2.8281l-3.6475 3.5861 3.6475 3.5861c0.79464 0.78104 0.79464 2.047 0 2.8281z" fill="#4271ae" stroke-width="1.0087"/>
</svg>

After

Width:  |  Height:  |  Size: 705 B

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="24" height="24" version="1.2" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<rect x="2" y="2" width="20" height="20" rx="1" ry="1" fill="#333" fill-opacity=".15" stroke-linecap="round" stroke-width="2"/>
<rect x="18" y="2" width="4" height="20" rx="1" ry="1" fill="#333" stroke-linecap="round" stroke-width="2"/>
<path d="m8.5959 18.5c0.79361 0.78104 2.0837 0.78104 2.8773 0l6.5268-6.4141-6.5268-6.4141c-0.3968-0.391-0.91769-0.58601-1.4386-0.58601-0.52092 0-1.0418 0.195-1.4386 0.58601-0.79464 0.78104-0.79464 2.047 0 2.8281l3.6475 3.5861-3.6475 3.5861c-0.79464 0.78104-0.79464 2.047 0 2.8281z" fill="#4271ae" stroke-width="1.0087"/>
</svg>

After

Width:  |  Height:  |  Size: 705 B

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="24" height="24" version="1.2" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<rect x="2" y="2" width="20" height="20" rx="1" ry="1" fill="#333" fill-opacity=".15" stroke-linecap="round" stroke-width="2"/>
<rect x="2" y="2" width="20" height="4" rx="1" ry="1" fill="#333" stroke-linecap="round" stroke-width="2"/>
<path d="m18.414 15.404c0.78104-0.79361 0.78104-2.0837 0-2.8773l-6.4141-6.5268-6.4141 6.5268c-0.391 0.3968-0.58601 0.91769-0.58601 1.4386 0 0.52092 0.195 1.0418 0.58601 1.4386 0.78104 0.79464 2.047 0.79464 2.8281 0l3.5861-3.6475 3.5861 3.6475c0.78104 0.79464 2.047 0.79464 2.8281 0z" fill="#4271ae" stroke-width="1.0087"/>
</svg>

After

Width:  |  Height:  |  Size: 706 B

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="24" height="24" version="1.2" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<rect x="2" y="2" width="20" height="20" rx="1" ry="1" fill="#333" fill-opacity=".15" stroke-linecap="round" stroke-width="2"/>
<path d="m18.414 10.404c0.78104-0.79361 0.78104-2.0837 0-2.8773l-6.4141-6.5268-6.4141 6.5268c-0.391 0.3968-0.58601 0.91769-0.58601 1.4386 0 0.52092 0.195 1.0418 0.58601 1.4386 0.78104 0.79464 2.047 0.79464 2.8281 0l3.5861-3.6475 3.5861 3.6475c0.78104 0.79464 2.047 0.79464 2.8281 0z" fill="#4271ae" stroke-width="1.0087"/>
<path d="m18.414 13.596c0.78104 0.79361 0.78104 2.0837 0 2.8773l-6.4141 6.5268-6.4141-6.5268c-0.391-0.3968-0.58601-0.91769-0.58601-1.4386 0-0.52092 0.195-1.0418 0.58601-1.4386 0.78104-0.79464 2.047-0.79464 2.8281 0l3.5861 3.6475 3.5861-3.6475c0.78104-0.79464 2.047-0.79464 2.8281 0z" fill="#4271ae" stroke-width="1.0087"/>
</svg>

After

Width:  |  Height:  |  Size: 921 B

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="24" height="24" version="1.2" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<rect x="2" y="2" width="20" height="20" rx="1" ry="1" fill="#333" fill-opacity=".15" stroke-linecap="round" stroke-width="2"/>
<path d="m13.596 18.414c0.79361 0.78104 2.0837 0.78104 2.8773 0l6.5268-6.4141-6.5268-6.4141c-0.3968-0.391-0.91769-0.58601-1.4386-0.58601-0.52092 0-1.0418 0.195-1.4386 0.58601-0.79464 0.78104-0.79464 2.047 0 2.8281l3.6475 3.5861-3.6475 3.5861c-0.79464 0.78104-0.79464 2.047 0 2.8281z" fill="#4271ae" stroke-width="1.0087"/>
<path d="m10.404 18.414c-0.79361 0.78104-2.0837 0.78104-2.8773 0l-6.5268-6.4141 6.5268-6.4141c0.3968-0.391 0.91769-0.58601 1.4386-0.58601 0.52092 0 1.0418 0.195 1.4386 0.58601 0.79464 0.78104 0.79464 2.047 0 2.8281l-3.6475 3.5861 3.6475 3.5861c0.79464 0.78104 0.79464 2.047 0 2.8281z" fill="#4271ae" stroke-width="1.0087"/>
</svg>

After

Width:  |  Height:  |  Size: 922 B

+12 -9
View File
@@ -105,6 +105,9 @@ class nwStyles:
H_LEVEL = {"H0": 0, "H1": 1, "H2": 2, "H3": 3, "H4": 4}
H_SIZES = {0: 2.50, 1: 2.00, 2: 1.75, 3: 1.50, 4: 1.25}
T_NORMAL = 1.0
T_SMALL = 0.8
T_LABEL = {
"H0": QT_TRANSLATE_NOOP("Constant", "Title"),
"H1": QT_TRANSLATE_NOOP("Constant", "Heading 1 (Partition)"),
@@ -115,15 +118,15 @@ class nwStyles:
"SP": QT_TRANSLATE_NOOP("Constant", "Scene Separator"),
}
T_MARGIN = {
"H0": (1.42, 0.50), # Title margins
"H1": (1.42, 0.50), # Heading 1 margins
"H2": (1.67, 0.50), # Heading 2 margins
"H3": (1.17, 0.50), # Heading 3 margins
"H4": (1.17, 0.50), # Heading 4 margins
"TT": (0.00, 0.58), # Text margins
"SP": (1.17, 1.17), # Separator margins
"MT": (0.00, 0.58), # Meta margins
"FT": (1.42, 0.47), # Footnote margins
"H0": (1.50, 0.60), # Title margins (top, bottom)
"H1": (1.50, 0.60), # Heading 1 margins (top, bottom)
"H2": (1.50, 0.60), # Heading 2 margins (top, bottom)
"H3": (1.20, 0.60), # Heading 3 margins (top, bottom)
"H4": (1.20, 0.60), # Heading 4 margins (top, bottom)
"TT": (0.00, 0.60), # Text margins (top, bottom)
"SP": (1.20, 1.20), # Separator margins (top, bottom)
"MT": (0.00, 0.60), # Meta margins (top, bottom)
"FT": (1.40, 0.40), # Footnote margins (left, bottom)
}
+6 -2
View File
@@ -27,7 +27,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
"""
from __future__ import annotations
from PyQt5.QtGui import QColor, QFont, QPalette
from PyQt5.QtGui import QColor, QFont, QPalette, QPixmap
from PyQt5.QtWidgets import (
QAbstractButton, QFrame, QHBoxLayout, QLabel, QLayout, QScrollArea,
QVBoxLayout, QWidget
@@ -183,7 +183,7 @@ class NScrollableForm(QScrollArea):
def addRow(
self,
label: str | None,
widget: QWidget | list[QWidget | str | int],
widget: QWidget | list[QWidget | QPixmap | str | int],
helpText: str = "",
unit: str | None = None,
button: QWidget | None = None,
@@ -200,6 +200,10 @@ class NScrollableForm(QScrollArea):
for item in widget:
if isinstance(item, QWidget):
wBox.addWidget(item)
elif isinstance(item, QPixmap):
icon = QLabel(self)
icon.setPixmap(item)
wBox.addWidget(icon)
elif isinstance(item, str):
wBox.addWidget(QLabel(item, self))
elif isinstance(item, int):
+17 -23
View File
@@ -521,12 +521,6 @@ class ToDocX(Tokenizer):
hScale = self._scaleHeads
hColor = _docXCol(self._theme.head) if self._colorHeads else None
fSz = self._fontSize
fnSz = 0.8 * self._fontSize
fSz0 = (nwStyles.H_SIZES[0] * fSz) if hScale else fSz
fSz1 = (nwStyles.H_SIZES[1] * fSz) if hScale else fSz
fSz2 = (nwStyles.H_SIZES[2] * fSz) if hScale else fSz
fSz3 = (nwStyles.H_SIZES[3] * fSz) if hScale else fSz
fSz4 = (nwStyles.H_SIZES[4] * fSz) if hScale else fSz
# Add Normal Style
styles.append(DocXParStyle(
@@ -545,12 +539,12 @@ class ToDocX(Tokenizer):
styles.append(DocXParStyle(
name="Title",
styleId=S_TITLE,
size=fSz0,
size=(nwStyles.H_SIZES[0] * fSz) if hScale else fSz,
basedOn=S_NORM,
nextStyle=S_NORM,
before=fSz * self._marginTitle[0],
after=fSz * self._marginTitle[1],
line=fSz0 * self._lineHeight,
line=fSz * self._lineHeight,
level=0,
bold=self._boldHeads,
))
@@ -559,12 +553,12 @@ class ToDocX(Tokenizer):
styles.append(DocXParStyle(
name="Heading 1",
styleId=S_HEAD1,
size=fSz1,
size=(nwStyles.H_SIZES[1] * fSz) if hScale else fSz,
basedOn=S_NORM,
nextStyle=S_NORM,
before=fSz * self._marginHead1[0],
after=fSz * self._marginHead1[1],
line=fSz1 * self._lineHeight,
line=fSz * self._lineHeight,
level=0,
color=hColor,
bold=self._boldHeads,
@@ -574,12 +568,12 @@ class ToDocX(Tokenizer):
styles.append(DocXParStyle(
name="Heading 2",
styleId=S_HEAD2,
size=fSz2,
size=(nwStyles.H_SIZES[2] * fSz) if hScale else fSz,
basedOn=S_NORM,
nextStyle=S_NORM,
before=fSz * self._marginHead2[0],
after=fSz * self._marginHead2[1],
line=fSz2 * self._lineHeight,
line=fSz * self._lineHeight,
level=1,
color=hColor,
bold=self._boldHeads,
@@ -589,12 +583,12 @@ class ToDocX(Tokenizer):
styles.append(DocXParStyle(
name="Heading 3",
styleId=S_HEAD3,
size=fSz3,
size=(nwStyles.H_SIZES[3] * fSz) if hScale else fSz,
basedOn=S_NORM,
nextStyle=S_NORM,
before=fSz * self._marginHead3[0],
after=fSz * self._marginHead3[1],
line=fSz3 * self._lineHeight,
line=fSz * self._lineHeight,
level=1,
color=hColor,
bold=self._boldHeads,
@@ -604,12 +598,12 @@ class ToDocX(Tokenizer):
styles.append(DocXParStyle(
name="Heading 4",
styleId=S_HEAD4,
size=fSz4,
size=(nwStyles.H_SIZES[4] * fSz) if hScale else fSz,
basedOn=S_NORM,
nextStyle=S_NORM,
before=fSz * self._marginHead4[0],
after=fSz * self._marginHead4[1],
line=fSz4 * self._lineHeight,
line=fSz * self._lineHeight,
level=1,
color=hColor,
bold=self._boldHeads,
@@ -653,12 +647,12 @@ class ToDocX(Tokenizer):
styles.append(DocXParStyle(
name="Footnote Text",
styleId=S_FNOTE,
size=fnSz,
size=nwStyles.T_SMALL * fSz,
basedOn=S_NORM,
before=0.0,
after=fnSz * self._marginFoot[1],
left=fnSz * self._marginFoot[0],
line=fnSz * self._lineHeight,
after=fSz * self._marginFoot[1],
left=fSz * self._marginFoot[0],
line=fSz * self._lineHeight,
))
# Add to Cache
@@ -795,6 +789,7 @@ class ToDocX(Tokenizer):
_wTag("before"): str(int(20.0 * firstFloat(style.before))),
_wTag("after"): str(int(20.0 * firstFloat(style.after))),
_wTag("line"): str(int(20.0 * firstFloat(style.line, size))),
_wTag("lineRule"): "auto",
})
if style.left is not None:
xmlSubElem(pPr, _wTag("ind"), attrib={
@@ -860,12 +855,10 @@ class ToDocX(Tokenizer):
xR = xmlSubElem(xP, _wTag("r"))
xmlSubElem(xR, _wTag("fldChar"), attrib={wFldCT: "begin"})
xR = xmlSubElem(xP, _wTag("r"))
_wText(xR, " PAGE ")
xmlSubElem(xR, _wTag("instrText"), "PAGE", attrib={_mkTag("xml", "space"): "preserve"})
xR = xmlSubElem(xP, _wTag("r"))
xmlSubElem(xR, _wTag("fldChar"), attrib={wFldCT: "separate"})
xR = xmlSubElem(xP, _wTag("r"))
_wText(xR, "0")
xR = xmlSubElem(xP, _wTag("r"))
xmlSubElem(xR, _wTag("fldChar"), attrib={wFldCT: "end"})
if post:
xR = xmlSubElem(xP, _wTag("r"))
@@ -1171,6 +1164,7 @@ class DocXParagraph:
_wTag("before"): str(int(20.0 * firstFloat(self._topMargin, style.before))),
_wTag("after"): str(int(20.0 * firstFloat(self._bottomMargin, style.after))),
_wTag("line"): str(int(20.0 * firstFloat(style.line, style.size))),
_wTag("lineRule"): "auto",
})
if indent:
xmlSubElem(pPr, _wTag("ind"), attrib=indent)
+14 -15
View File
@@ -339,26 +339,25 @@ class ToHtml(Tokenizer):
if not self._cssStyles:
return []
mScale = self._lineHeight/1.15
tColor = self._theme.text.name(QtHexRgb)
hColor = self._theme.head.name(QtHexRgb) if self._colorHeads else tColor
lColor = self._theme.head.name(QtHexRgb)
mColor = self._theme.highlight.name(QtHexRgb)
mtH0 = mScale * self._marginTitle[0]
mbH0 = mScale * self._marginTitle[1]
mtH1 = mScale * self._marginHead1[0]
mbH1 = mScale * self._marginHead1[1]
mtH2 = mScale * self._marginHead2[0]
mbH2 = mScale * self._marginHead2[1]
mtH3 = mScale * self._marginHead3[0]
mbH3 = mScale * self._marginHead3[1]
mtH4 = mScale * self._marginHead4[0]
mbH4 = mScale * self._marginHead4[1]
mtTT = mScale * self._marginText[0]
mbTT = mScale * self._marginText[1]
mtSP = mScale * self._marginSep[0]
mbSP = mScale * self._marginSep[1]
mtH0 = self._marginTitle[0]
mbH0 = self._marginTitle[1]
mtH1 = self._marginHead1[0]
mbH1 = self._marginHead1[1]
mtH2 = self._marginHead2[0]
mbH2 = self._marginHead2[1]
mtH3 = self._marginHead3[0]
mbH3 = self._marginHead3[1]
mtH4 = self._marginHead4[0]
mbH4 = self._marginHead4[1]
mtTT = self._marginText[0]
mbTT = self._marginText[1]
mtSP = self._marginSep[0]
mbSP = self._marginSep[1]
font = self._textFont
fFam = font.family()
+51 -116
View File
@@ -173,44 +173,10 @@ class ToOdt(Tokenizer):
self._fontStyle = "normal"
self._fontPitch = "variable"
self._fontBold = "bold"
self._fSizeTitle = "30pt"
self._fSizeHead1 = "24pt"
self._fSizeHead2 = "20pt"
self._fSizeHead3 = "16pt"
self._fSizeHead4 = "14pt"
self._fSizeHead = "14pt"
self._fSizeText = "12pt"
self._fSizeFoot = "10pt"
self._fLineHeight = "115%"
self._fBlockIndent = "1.693cm"
self._fTextIndent = "0.499cm"
self._dLanguage = "en"
self._dCountry = "GB"
# Text Margins
self._mTopTitle = "0.423cm"
self._mTopHead1 = "0.423cm"
self._mTopHead2 = "0.353cm"
self._mTopHead3 = "0.247cm"
self._mTopHead4 = "0.247cm"
self._mTopHead = "0.423cm"
self._mTopText = "0.000cm"
self._mTopMeta = "0.000cm"
self._mTopSep = "0.247cm"
self._mBotTitle = "0.212cm"
self._mBotHead1 = "0.212cm"
self._mBotHead2 = "0.212cm"
self._mBotHead3 = "0.212cm"
self._mBotHead4 = "0.212cm"
self._mBotHead = "0.212cm"
self._mBotText = "0.247cm"
self._mBotMeta = "0.106cm"
self._mBotSep = "0.247cm"
self._mBotFoot = "0.106cm"
self._mLeftFoot = "0.600cm"
# Document Size and Margins
self._mDocWidth = "21.0cm"
self._mDocHeight = "29.7cm"
@@ -262,52 +228,14 @@ class ToOdt(Tokenizer):
self._dLanguage = lang or self._dLanguage
self._dCountry = country or self._dCountry
self._fontFamily = self._textFont.family()
self._fontSize = self._textFont.pointSize()
self._fontWeight = FONT_WEIGHT_MAP.get(fontWeight, fontWeight)
self._fontStyle = FONT_STYLE.get(self._textFont.style(), "normal")
self._fontPitch = "fixed" if self._textFont.fixedPitch() else "variable"
self._fontBold = FONT_WEIGHT_MAP.get(fontBold, fontBold)
self._headWeight = self._fontBold if self._boldHeads else None
hScale = self._scaleHeads
self._fSizeTitle = self._emToPt(nwStyles.H_SIZES[0] if hScale else 1.0) # Was 2.50
self._fSizeHead1 = self._emToPt(nwStyles.H_SIZES[1] if hScale else 1.0) # Was 2.00
self._fSizeHead2 = self._emToPt(nwStyles.H_SIZES[2] if hScale else 1.0) # Was 1.60
self._fSizeHead3 = self._emToPt(nwStyles.H_SIZES[3] if hScale else 1.0) # Was 1.30
self._fSizeHead4 = self._emToPt(nwStyles.H_SIZES[4] if hScale else 1.0) # Was 1.15
self._fSizeHead = self._emToPt(nwStyles.H_SIZES[4] if hScale else 1.0) # Was 1.15
self._fSizeText = self._emToPt(1.0)
self._fSizeFoot = self._emToPt(0.8)
mScale = self._lineHeight/1.15
self._mTopTitle = self._emToCm(mScale * self._marginTitle[0])
self._mTopHead1 = self._emToCm(mScale * self._marginHead1[0])
self._mTopHead2 = self._emToCm(mScale * self._marginHead2[0])
self._mTopHead3 = self._emToCm(mScale * self._marginHead3[0])
self._mTopHead4 = self._emToCm(mScale * self._marginHead4[0])
self._mTopHead = self._emToCm(mScale * self._marginHead4[0])
self._mTopText = self._emToCm(mScale * self._marginText[0])
self._mTopMeta = self._emToCm(mScale * self._marginMeta[0])
self._mTopSep = self._emToCm(mScale * self._marginSep[0])
self._mBotTitle = self._emToCm(mScale * self._marginTitle[1])
self._mBotHead1 = self._emToCm(mScale * self._marginHead1[1])
self._mBotHead2 = self._emToCm(mScale * self._marginHead2[1])
self._mBotHead3 = self._emToCm(mScale * self._marginHead3[1])
self._mBotHead4 = self._emToCm(mScale * self._marginHead4[1])
self._mBotHead = self._emToCm(mScale * self._marginHead4[1])
self._mBotText = self._emToCm(mScale * self._marginText[1])
self._mBotMeta = self._emToCm(mScale * self._marginMeta[1])
self._mBotSep = self._emToCm(mScale * self._marginSep[1])
self._mLeftFoot = self._emToCm(self._marginFoot[0])
self._mBotFoot = self._emToCm(self._marginFoot[1])
self._fLineHeight = f"{round(100 * self._lineHeight):d}%"
self._fontFamily = self._textFont.family()
self._fontSize = self._textFont.pointSize()
self._fontWeight = FONT_WEIGHT_MAP.get(fontWeight, fontWeight)
self._fontStyle = FONT_STYLE.get(self._textFont.style(), "normal")
self._fontPitch = "fixed" if self._textFont.fixedPitch() else "variable"
self._fontBold = FONT_WEIGHT_MAP.get(fontBold, fontBold)
self._headWeight = self._fontBold if self._boldHeads else None
self._fBlockIndent = self._emToCm(self._blockIndent)
self._fTextIndent = self._emToCm(self._firstWidth)
# Clear Errors
self._errData = []
@@ -782,6 +710,9 @@ class ToOdt(Tokenizer):
def _defaultStyles(self) -> None:
"""Set the default styles."""
hScale = self._scaleHeads
textSize = self._emToPt(nwStyles.T_NORMAL)
# Add Paragraph Family Style
xStyl = ET.SubElement(self._xStyl, _mkTag("style", "default-style"), attrib={
_mkTag("style", "family"): "paragraph",
@@ -796,7 +727,7 @@ class ToOdt(Tokenizer):
_mkTag("fo", "font-family"): self._fontFamily,
_mkTag("fo", "font-weight"): self._fontWeight,
_mkTag("fo", "font-style"): self._fontStyle,
_mkTag("fo", "font-size"): self._fSizeText,
_mkTag("fo", "font-size"): textSize,
_mkTag("fo", "language"): self._dLanguage,
_mkTag("fo", "country"): self._dCountry,
})
@@ -812,7 +743,7 @@ class ToOdt(Tokenizer):
_mkTag("fo", "font-family"): self._fontFamily,
_mkTag("fo", "font-weight"): self._fontWeight,
_mkTag("fo", "font-style"): self._fontStyle,
_mkTag("fo", "font-size"): self._fSizeText,
_mkTag("fo", "font-size"): textSize,
})
# Add Default Heading Style
@@ -824,8 +755,8 @@ class ToOdt(Tokenizer):
_mkTag("style", "class"): "text",
})
ET.SubElement(xStyl, _mkTag("style", "paragraph-properties"), attrib={
_mkTag("fo", "margin-top"): self._mTopHead,
_mkTag("fo", "margin-bottom"): self._mBotHead,
_mkTag("fo", "margin-top"): self._emToCm(self._marginHead4[0]),
_mkTag("fo", "margin-bottom"): self._emToCm(self._marginHead4[1]),
_mkTag("fo", "keep-with-next"): "always",
})
ET.SubElement(xStyl, _mkTag("style", "text-properties"), attrib={
@@ -833,7 +764,7 @@ class ToOdt(Tokenizer):
_mkTag("fo", "font-family"): self._fontFamily,
_mkTag("fo", "font-weight"): self._fontWeight,
_mkTag("fo", "font-style"): self._fontStyle,
_mkTag("fo", "font-size"): self._fSizeHead,
_mkTag("fo", "font-size"): self._emToPt(nwStyles.H_SIZES[4] if hScale else 1.0),
})
# Add Header and Footer Styles
@@ -857,20 +788,24 @@ class ToOdt(Tokenizer):
def _useableStyles(self) -> None:
"""Set the usable styles."""
hScale = self._scaleHeads
hColor = self._theme.head if self._colorHeads else None
textSize = self._emToPt(nwStyles.T_NORMAL)
lineHeight = f"{round(100 * self._lineHeight):d}%"
# Add Text Body Style
style = ODTParagraphStyle(S_TEXT)
style.setDisplayName("Text body")
style.setParentStyleName("Standard")
style.setClass("text")
style.setMarginTop(self._mTopText)
style.setMarginBottom(self._mBotText)
style.setLineHeight(self._fLineHeight)
style.setMarginTop(self._emToCm(self._marginText[0]))
style.setMarginBottom(self._emToCm(self._marginText[1]))
style.setLineHeight(lineHeight)
style.setTextAlign(self._defaultAlign)
style.setFontName(self._fontFamily)
style.setFontFamily(self._fontFamily)
style.setFontSize(self._fSizeText)
style.setFontSize(textSize)
style.setFontWeight(self._fontWeight)
style.packXML(self._xStyl)
self._mainPara[style.name] = style
@@ -880,7 +815,7 @@ class ToOdt(Tokenizer):
style.setDisplayName("First line indent")
style.setParentStyleName(S_TEXT)
style.setClass("text")
style.setTextIndent(self._fTextIndent)
style.setTextIndent(self._emToCm(self._firstWidth))
style.packXML(self._xStyl)
self._mainPara[style.name] = style
@@ -889,12 +824,12 @@ class ToOdt(Tokenizer):
style.setDisplayName("Text Meta")
style.setParentStyleName("Standard")
style.setClass("text")
style.setMarginTop(self._mTopMeta)
style.setMarginBottom(self._mBotMeta)
style.setLineHeight(self._fLineHeight)
style.setMarginTop(self._emToCm(self._marginMeta[0]))
style.setMarginBottom(self._emToCm(self._marginMeta[1]))
style.setLineHeight(lineHeight)
style.setFontName(self._fontFamily)
style.setFontFamily(self._fontFamily)
style.setFontSize(self._fSizeText)
style.setFontSize(textSize)
style.setFontWeight(self._fontWeight)
style.packXML(self._xStyl)
self._mainPara[style.name] = style
@@ -905,12 +840,12 @@ class ToOdt(Tokenizer):
style.setParentStyleName("Heading")
style.setNextStyleName(S_TEXT)
style.setClass("chapter")
style.setMarginTop(self._mTopTitle)
style.setMarginBottom(self._mBotTitle)
style.setMarginTop(self._emToCm(self._marginTitle[0]))
style.setMarginBottom(self._emToCm(self._marginTitle[1]))
style.setTextAlign("center")
style.setFontName(self._fontFamily)
style.setFontFamily(self._fontFamily)
style.setFontSize(self._fSizeTitle)
style.setFontSize(self._emToPt(nwStyles.H_SIZES[0] if hScale else 1.0))
style.setFontWeight(self._headWeight)
style.packXML(self._xStyl)
self._mainPara[style.name] = style
@@ -921,13 +856,13 @@ class ToOdt(Tokenizer):
style.setParentStyleName("Standard")
style.setNextStyleName(S_TEXT)
style.setClass("text")
style.setMarginTop(self._mTopSep)
style.setMarginBottom(self._mBotSep)
style.setLineHeight(self._fLineHeight)
style.setMarginTop(self._emToCm(self._marginSep[0]))
style.setMarginBottom(self._emToCm(self._marginSep[1]))
style.setLineHeight(lineHeight)
style.setTextAlign("center")
style.setFontName(self._fontFamily)
style.setFontFamily(self._fontFamily)
style.setFontSize(self._fSizeText)
style.setFontSize(textSize)
style.setFontWeight(self._fontWeight)
style.packXML(self._xStyl)
self._mainPara[style.name] = style
@@ -939,11 +874,11 @@ class ToOdt(Tokenizer):
style.setNextStyleName(S_TEXT)
style.setOutlineLevel("1")
style.setClass("text")
style.setMarginTop(self._mTopHead1)
style.setMarginBottom(self._mBotHead1)
style.setMarginTop(self._emToCm(self._marginHead1[0]))
style.setMarginBottom(self._emToCm(self._marginHead1[1]))
style.setFontName(self._fontFamily)
style.setFontFamily(self._fontFamily)
style.setFontSize(self._fSizeHead1)
style.setFontSize(self._emToPt(nwStyles.H_SIZES[1] if hScale else 1.0))
style.setFontWeight(self._headWeight)
style.setColor(hColor)
style.packXML(self._xStyl)
@@ -956,11 +891,11 @@ class ToOdt(Tokenizer):
style.setNextStyleName(S_TEXT)
style.setOutlineLevel("2")
style.setClass("text")
style.setMarginTop(self._mTopHead2)
style.setMarginBottom(self._mBotHead2)
style.setMarginTop(self._emToCm(self._marginHead2[0]))
style.setMarginBottom(self._emToCm(self._marginHead2[1]))
style.setFontName(self._fontFamily)
style.setFontFamily(self._fontFamily)
style.setFontSize(self._fSizeHead2)
style.setFontSize(self._emToPt(nwStyles.H_SIZES[2] if hScale else 1.0))
style.setFontWeight(self._headWeight)
style.setColor(hColor)
style.packXML(self._xStyl)
@@ -973,11 +908,11 @@ class ToOdt(Tokenizer):
style.setNextStyleName(S_TEXT)
style.setOutlineLevel("3")
style.setClass("text")
style.setMarginTop(self._mTopHead3)
style.setMarginBottom(self._mBotHead3)
style.setMarginTop(self._emToCm(self._marginHead3[0]))
style.setMarginBottom(self._emToCm(self._marginHead3[1]))
style.setFontName(self._fontFamily)
style.setFontFamily(self._fontFamily)
style.setFontSize(self._fSizeHead3)
style.setFontSize(self._emToPt(nwStyles.H_SIZES[3] if hScale else 1.0))
style.setFontWeight(self._headWeight)
style.setColor(hColor)
style.packXML(self._xStyl)
@@ -990,11 +925,11 @@ class ToOdt(Tokenizer):
style.setNextStyleName(S_TEXT)
style.setOutlineLevel("4")
style.setClass("text")
style.setMarginTop(self._mTopHead4)
style.setMarginBottom(self._mBotHead4)
style.setMarginTop(self._emToCm(self._marginHead4[0]))
style.setMarginBottom(self._emToCm(self._marginHead4[1]))
style.setFontName(self._fontFamily)
style.setFontFamily(self._fontFamily)
style.setFontSize(self._fSizeHead4)
style.setFontSize(self._emToPt(nwStyles.H_SIZES[4] if hScale else 1.0))
style.setFontWeight(self._headWeight)
style.setColor(hColor)
style.packXML(self._xStyl)
@@ -1013,10 +948,10 @@ class ToOdt(Tokenizer):
style.setDisplayName("Footnote")
style.setParentStyleName("Standard")
style.setClass("extra")
style.setMarginLeft(self._mLeftFoot)
style.setMarginBottom(self._mBotFoot)
style.setTextIndent("-"+self._mLeftFoot)
style.setFontSize(self._fSizeFoot)
style.setMarginLeft(self._emToCm(self._marginFoot[0]))
style.setMarginBottom(self._emToCm(self._marginFoot[1]))
style.setTextIndent("-"+self._emToCm(self._marginFoot[0]))
style.setFontSize(self._emToPt(nwStyles.T_SMALL))
style.packXML(self._xStyl)
self._mainPara[style.name] = style
+2 -1
View File
@@ -500,7 +500,8 @@ class GuiIcons:
# Format Icons
"fmt_bold", "fmt_bold-md", "fmt_italic", "fmt_italic-md", "fmt_mark", "fmt_strike",
"fmt_strike-md", "fmt_subscript", "fmt_superscript", "fmt_underline",
"fmt_strike-md", "fmt_subscript", "fmt_superscript", "fmt_underline", "margin_bottom",
"margin_left", "margin_right", "margin_top", "size_height", "size_width",
# General Button Icons
"add", "add_document", "backward", "bookmark", "browse", "checked", "close", "copy",
+24 -19
View File
@@ -964,15 +964,6 @@ class _FormattingTab(NScrollableForm):
spW = 6*SHARED.theme.textNWidth
dbW = 8*SHARED.theme.textNWidth
# Common Translations
trW = self.tr("W:") # Width
trH = self.tr("H:") # Height
trT = self.tr("T:") # Top
trB = self.tr("B:") # Bottom
trL = self.tr("L:") # Left
trR = self.tr("R:") # Right
# Text Content
# ============
@@ -1084,6 +1075,13 @@ class _FormattingTab(NScrollableForm):
self._sidebar.addButton(title, section)
self.addGroupLabel(title, section)
pixT = SHARED.theme.getPixmap("margin_top", (iPx, iPx))
pixB = SHARED.theme.getPixmap("margin_bottom", (iPx, iPx))
pixL = SHARED.theme.getPixmap("margin_left", (iPx, iPx))
pixR = SHARED.theme.getPixmap("margin_right", (iPx, iPx))
pixH = SHARED.theme.getPixmap("size_height", (iPx, iPx))
pixW = SHARED.theme.getPixmap("size_width", (iPx, iPx))
# Title
self.titleMarginT = NDoubleSpinBox(self)
self.titleMarginT.setFixedWidth(dbW)
@@ -1093,7 +1091,8 @@ class _FormattingTab(NScrollableForm):
self.addRow(
trConst(nwStyles.T_LABEL["H0"]),
[trT, self.titleMarginT, 6, trB, self.titleMarginB],
[pixT, self.titleMarginT, 6, pixB, self.titleMarginB],
unit="em",
)
# Heading 1
@@ -1105,7 +1104,8 @@ class _FormattingTab(NScrollableForm):
self.addRow(
trConst(nwStyles.T_LABEL["H1"]),
[trT, self.h1MarginT, 6, trB, self.h1MarginB],
[pixT, self.h1MarginT, 6, pixB, self.h1MarginB],
unit="em",
)
# Heading 2
@@ -1117,7 +1117,8 @@ class _FormattingTab(NScrollableForm):
self.addRow(
trConst(nwStyles.T_LABEL["H2"]),
[trT, self.h2MarginT, 6, trB, self.h2MarginB],
[pixT, self.h2MarginT, 6, pixB, self.h2MarginB],
unit="em",
)
# Heading 3
@@ -1129,7 +1130,8 @@ class _FormattingTab(NScrollableForm):
self.addRow(
trConst(nwStyles.T_LABEL["H3"]),
[trT, self.h3MarginT, 6, trB, self.h3MarginB],
[pixT, self.h3MarginT, 6, pixB, self.h3MarginB],
unit="em",
)
# Heading 4
@@ -1141,7 +1143,8 @@ class _FormattingTab(NScrollableForm):
self.addRow(
trConst(nwStyles.T_LABEL["H4"]),
[trT, self.h4MarginT, 6, trB, self.h4MarginB],
[pixT, self.h4MarginT, 6, pixB, self.h4MarginB],
unit="em",
)
# Text
@@ -1153,7 +1156,8 @@ class _FormattingTab(NScrollableForm):
self.addRow(
trConst(nwStyles.T_LABEL["TT"]),
[trT, self.textMarginT, 6, trB, self.textMarginB],
[pixT, self.textMarginT, 6, pixB, self.textMarginB],
unit="em",
)
# Separator
@@ -1165,7 +1169,8 @@ class _FormattingTab(NScrollableForm):
self.addRow(
trConst(nwStyles.T_LABEL["SP"]),
[trT, self.sepMarginT, 6, trB, self.sepMarginB],
[pixT, self.sepMarginT, 6, pixB, self.sepMarginB],
unit="em",
)
# Page Layout
@@ -1198,7 +1203,7 @@ class _FormattingTab(NScrollableForm):
self.addRow(
self._build.getLabel("format.pageSize"),
[self.pageSize, 6, trW, self.pageWidth, 6, trH, self.pageHeight],
[self.pageSize, 6, pixW, self.pageWidth, 6, pixH, self.pageHeight],
)
# Page Margins
@@ -1216,11 +1221,11 @@ class _FormattingTab(NScrollableForm):
self.addRow(
self._build.getLabel("format.pageMargins"),
[trT, self.topMargin, 6, trB, self.bottomMargin],
[pixT, self.topMargin, 6, pixB, self.bottomMargin],
)
self.addRow(
"",
[trL, self.leftMargin, 6, trR, self.rightMargin],
[pixL, self.leftMargin, 6, pixR, self.rightMargin],
)
# Open Document
@@ -231,7 +231,7 @@
<w:p>
<w:pPr>
<w:pStyle w:val="MetaText" />
<w:spacing w:before="0" w:after="0" w:line="276" />
<w:spacing w:before="0" w:after="0" w:line="276" w:lineRule="auto" />
</w:pPr>
<w:r>
<w:rPr>
@@ -254,7 +254,7 @@
<w:p>
<w:pPr>
<w:pStyle w:val="MetaText" />
<w:spacing w:before="0" w:after="0" w:line="276" />
<w:spacing w:before="0" w:after="0" w:line="276" w:lineRule="auto" />
</w:pPr>
<w:r>
<w:rPr>
@@ -277,7 +277,7 @@
<w:p>
<w:pPr>
<w:pStyle w:val="MetaText" />
<w:spacing w:before="0" w:after="139" w:line="276" />
<w:spacing w:before="0" w:after="144" w:line="276" w:lineRule="auto" />
</w:pPr>
<w:r>
<w:rPr>
@@ -331,7 +331,7 @@
<w:p>
<w:pPr>
<w:pStyle w:val="MetaText" />
<w:spacing w:before="0" w:after="0" w:line="276" />
<w:spacing w:before="0" w:after="0" w:line="276" w:lineRule="auto" />
</w:pPr>
<w:r>
<w:rPr>
@@ -354,7 +354,7 @@
<w:p>
<w:pPr>
<w:pStyle w:val="MetaText" />
<w:spacing w:before="0" w:after="0" w:line="276" />
<w:spacing w:before="0" w:after="0" w:line="276" w:lineRule="auto" />
</w:pPr>
<w:r>
<w:rPr>
@@ -377,7 +377,7 @@
<w:p>
<w:pPr>
<w:pStyle w:val="MetaText" />
<w:spacing w:before="0" w:after="139" w:line="276" />
<w:spacing w:before="0" w:after="144" w:line="276" w:lineRule="auto" />
</w:pPr>
<w:r>
<w:rPr>
@@ -472,7 +472,7 @@
<w:p>
<w:pPr>
<w:pStyle w:val="MetaText" />
<w:spacing w:before="0" w:after="0" w:line="276" />
<w:spacing w:before="0" w:after="0" w:line="276" w:lineRule="auto" />
</w:pPr>
<w:r>
<w:rPr>
@@ -495,7 +495,7 @@
<w:p>
<w:pPr>
<w:pStyle w:val="MetaText" />
<w:spacing w:before="0" w:after="0" w:line="276" />
<w:spacing w:before="0" w:after="0" w:line="276" w:lineRule="auto" />
</w:pPr>
<w:r>
<w:rPr>
@@ -518,7 +518,7 @@
<w:p>
<w:pPr>
<w:pStyle w:val="MetaText" />
<w:spacing w:before="0" w:after="139" w:line="276" />
<w:spacing w:before="0" w:after="144" w:line="276" w:lineRule="auto" />
</w:pPr>
<w:r>
<w:rPr>
@@ -634,7 +634,7 @@
<w:p>
<w:pPr>
<w:pStyle w:val="MetaText" />
<w:spacing w:before="0" w:after="0" w:line="276" />
<w:spacing w:before="0" w:after="0" w:line="276" w:lineRule="auto" />
</w:pPr>
<w:r>
<w:rPr>
@@ -657,7 +657,7 @@
<w:p>
<w:pPr>
<w:pStyle w:val="MetaText" />
<w:spacing w:before="0" w:after="0" w:line="276" />
<w:spacing w:before="0" w:after="0" w:line="276" w:lineRule="auto" />
</w:pPr>
<w:r>
<w:rPr>
@@ -680,7 +680,7 @@
<w:p>
<w:pPr>
<w:pStyle w:val="MetaText" />
<w:spacing w:before="0" w:after="139" w:line="276" />
<w:spacing w:before="0" w:after="144" w:line="276" w:lineRule="auto" />
</w:pPr>
<w:r>
<w:rPr>
@@ -734,7 +734,7 @@
<w:p>
<w:pPr>
<w:pStyle w:val="MetaText" />
<w:spacing w:before="0" w:after="0" w:line="276" />
<w:spacing w:before="0" w:after="0" w:line="276" w:lineRule="auto" />
</w:pPr>
<w:r>
<w:rPr>
@@ -757,7 +757,7 @@
<w:p>
<w:pPr>
<w:pStyle w:val="MetaText" />
<w:spacing w:before="0" w:after="0" w:line="276" />
<w:spacing w:before="0" w:after="0" w:line="276" w:lineRule="auto" />
</w:pPr>
<w:r>
<w:rPr>
@@ -780,7 +780,7 @@
<w:p>
<w:pPr>
<w:pStyle w:val="MetaText" />
<w:spacing w:before="0" w:after="139" w:line="276" />
<w:spacing w:before="0" w:after="144" w:line="276" w:lineRule="auto" />
</w:pPr>
<w:r>
<w:rPr>
@@ -875,7 +875,7 @@
<w:p>
<w:pPr>
<w:pStyle w:val="MetaText" />
<w:spacing w:before="0" w:after="0" w:line="276" />
<w:spacing w:before="0" w:after="0" w:line="276" w:lineRule="auto" />
</w:pPr>
<w:r>
<w:rPr>
@@ -898,7 +898,7 @@
<w:p>
<w:pPr>
<w:pStyle w:val="MetaText" />
<w:spacing w:before="0" w:after="0" w:line="276" />
<w:spacing w:before="0" w:after="0" w:line="276" w:lineRule="auto" />
</w:pPr>
<w:r>
<w:rPr>
@@ -921,7 +921,7 @@
<w:p>
<w:pPr>
<w:pStyle w:val="MetaText" />
<w:spacing w:before="0" w:after="139" w:line="276" />
<w:spacing w:before="0" w:after="144" w:line="276" w:lineRule="auto" />
</w:pPr>
<w:r>
<w:rPr>
@@ -1035,7 +1035,7 @@
<w:p>
<w:pPr>
<w:pStyle w:val="MetaText" />
<w:spacing w:before="0" w:after="0" w:line="276" />
<w:spacing w:before="0" w:after="0" w:line="276" w:lineRule="auto" />
</w:pPr>
<w:r>
<w:rPr>
@@ -1058,7 +1058,7 @@
<w:p>
<w:pPr>
<w:pStyle w:val="MetaText" />
<w:spacing w:before="0" w:after="0" w:line="276" />
<w:spacing w:before="0" w:after="0" w:line="276" w:lineRule="auto" />
</w:pPr>
<w:r>
<w:rPr>
@@ -1081,7 +1081,7 @@
<w:p>
<w:pPr>
<w:pStyle w:val="MetaText" />
<w:spacing w:before="0" w:after="139" w:line="276" />
<w:spacing w:before="0" w:after="144" w:line="276" w:lineRule="auto" />
</w:pPr>
<w:r>
<w:rPr>
@@ -1197,7 +1197,7 @@
<w:p>
<w:pPr>
<w:pStyle w:val="MetaText" />
<w:spacing w:before="0" w:after="0" w:line="276" />
<w:spacing w:before="0" w:after="0" w:line="276" w:lineRule="auto" />
</w:pPr>
<w:r>
<w:rPr>
@@ -1230,7 +1230,7 @@
<w:p>
<w:pPr>
<w:pStyle w:val="MetaText" />
<w:spacing w:before="0" w:after="139" w:line="276" />
<w:spacing w:before="0" w:after="144" w:line="276" w:lineRule="auto" />
</w:pPr>
<w:r>
<w:rPr>
@@ -13,14 +13,11 @@
<w:fldChar w:fldCharType="begin" />
</w:r>
<w:r>
<w:t xml:space="preserve"> PAGE </w:t>
<w:instrText xml:space="preserve">PAGE</w:instrText>
</w:r>
<w:r>
<w:fldChar w:fldCharType="separate" />
</w:r>
<w:r>
<w:t>0</w:t>
</w:r>
<w:r>
<w:fldChar w:fldCharType="end" />
</w:r>
@@ -18,7 +18,7 @@
<w:style w:type="paragraph" w:styleId="Normal" w:default="1">
<w:name w:val="Normal" />
<w:pPr>
<w:spacing w:before="0" w:after="139" w:line="276" />
<w:spacing w:before="0" w:after="144" w:line="276" w:lineRule="auto" />
<w:jc w:val="left" />
</w:pPr>
<w:rPr>
@@ -31,7 +31,7 @@
<w:basedOn w:val="Normal" />
<w:next w:val="Normal" />
<w:pPr>
<w:spacing w:before="340" w:after="120" w:line="690" />
<w:spacing w:before="360" w:after="144" w:line="276" w:lineRule="auto" />
<w:outlineLvl w:val="0" />
</w:pPr>
<w:rPr>
@@ -45,7 +45,7 @@
<w:basedOn w:val="Normal" />
<w:next w:val="Normal" />
<w:pPr>
<w:spacing w:before="340" w:after="120" w:line="552" />
<w:spacing w:before="360" w:after="144" w:line="276" w:lineRule="auto" />
<w:outlineLvl w:val="0" />
</w:pPr>
<w:rPr>
@@ -60,7 +60,7 @@
<w:basedOn w:val="Normal" />
<w:next w:val="Normal" />
<w:pPr>
<w:spacing w:before="400" w:after="120" w:line="483" />
<w:spacing w:before="360" w:after="144" w:line="276" w:lineRule="auto" />
<w:outlineLvl w:val="1" />
</w:pPr>
<w:rPr>
@@ -75,7 +75,7 @@
<w:basedOn w:val="Normal" />
<w:next w:val="Normal" />
<w:pPr>
<w:spacing w:before="280" w:after="120" w:line="414" />
<w:spacing w:before="288" w:after="144" w:line="276" w:lineRule="auto" />
<w:outlineLvl w:val="1" />
</w:pPr>
<w:rPr>
@@ -90,7 +90,7 @@
<w:basedOn w:val="Normal" />
<w:next w:val="Normal" />
<w:pPr>
<w:spacing w:before="280" w:after="120" w:line="345" />
<w:spacing w:before="288" w:after="144" w:line="276" w:lineRule="auto" />
<w:outlineLvl w:val="1" />
</w:pPr>
<w:rPr>
@@ -105,7 +105,7 @@
<w:basedOn w:val="Normal" />
<w:next w:val="Normal" />
<w:pPr>
<w:spacing w:before="280" w:after="280" w:line="276" />
<w:spacing w:before="288" w:after="288" w:line="276" w:lineRule="auto" />
<w:jc w:val="center" />
</w:pPr>
<w:rPr>
@@ -118,7 +118,7 @@
<w:basedOn w:val="Normal" />
<w:next w:val="Normal" />
<w:pPr>
<w:spacing w:before="0" w:after="139" w:line="276" />
<w:spacing w:before="0" w:after="144" w:line="276" w:lineRule="auto" />
</w:pPr>
<w:rPr>
<w:sz w:val="24" />
@@ -129,7 +129,7 @@
<w:name w:val="Header" />
<w:basedOn w:val="Normal" />
<w:pPr>
<w:spacing w:before="0" w:after="0" w:line="240" />
<w:spacing w:before="0" w:after="0" w:line="240" w:lineRule="auto" />
<w:jc w:val="right" />
</w:pPr>
<w:rPr>
@@ -141,8 +141,8 @@
<w:name w:val="Footnote Text" />
<w:basedOn w:val="Normal" />
<w:pPr>
<w:spacing w:before="0" w:after="90" w:line="220" />
<w:ind w:left="272" />
<w:spacing w:before="0" w:after="96" w:line="276" w:lineRule="auto" />
<w:ind w:left="335" />
</w:pPr>
<w:rPr>
<w:sz w:val="19" />
+13 -13
View File
@@ -1,13 +1,13 @@
<?xml version='1.0' encoding='utf-8'?>
<office:document xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.text">
<office:meta>
<meta:creation-date>2024-10-29T23:24:19</meta:creation-date>
<meta:generator>novelWriter/2.6a3</meta:generator>
<meta:creation-date>2024-11-13T20:28:36</meta:creation-date>
<meta:generator>novelWriter/2.6b1</meta:generator>
<meta:initial-creator>Jane Smith</meta:initial-creator>
<meta:editing-cycles>1234</meta:editing-cycles>
<meta:editing-duration>P42DT12H34M56S</meta:editing-duration>
<dc:title>Test Project</dc:title>
<dc:date>2024-10-29T23:24:19</dc:date>
<dc:date>2024-11-13T20:28:36</dc:date>
<dc:creator>Jane Smith</dc:creator>
</office:meta>
<office:font-face-decls>
@@ -22,7 +22,7 @@
<style:text-properties style:font-name="Liberation Serif" fo:font-family="Liberation Serif" fo:font-weight="normal" fo:font-style="normal" fo:font-size="12pt" />
</style:style>
<style:style style:name="Heading" style:family="paragraph" style:parent-style-name="Standard" style:next-style-name="Text_20_body" style:class="text">
<style:paragraph-properties fo:margin-top="0.495cm" fo:margin-bottom="0.212cm" fo:keep-with-next="always" />
<style:paragraph-properties fo:margin-top="0.508cm" fo:margin-bottom="0.254cm" fo:keep-with-next="always" />
<style:text-properties style:font-name="Liberation Serif" fo:font-family="Liberation Serif" fo:font-weight="normal" fo:font-style="normal" fo:font-size="15pt" />
</style:style>
<style:style style:name="Header_20_and_20_Footer" style:display-name="Header and Footer" style:family="paragraph" style:parent-style-name="Standard" style:class="extra" />
@@ -30,45 +30,45 @@
<number:number number:min-integer-digits="1" />
</number:number-style>
<style:style style:name="Text_20_body" style:family="paragraph" style:display-name="Text body" style:parent-style-name="Standard" style:class="text">
<style:paragraph-properties fo:margin-top="0.000cm" fo:margin-bottom="0.246cm" fo:line-height="115%" fo:text-align="left" />
<style:paragraph-properties fo:margin-top="0.000cm" fo:margin-bottom="0.254cm" fo:line-height="115%" fo:text-align="left" />
<style:text-properties style:font-name="Liberation Serif" fo:font-family="Liberation Serif" fo:font-size="12pt" fo:font-weight="normal" />
</style:style>
<style:style style:name="First_20_line_20_indent" style:family="paragraph" style:display-name="First line indent" style:parent-style-name="Text_20_body" style:class="text">
<style:paragraph-properties fo:text-indent="0.593cm" />
</style:style>
<style:style style:name="Text_20_Meta" style:family="paragraph" style:display-name="Text Meta" style:parent-style-name="Standard" style:class="text">
<style:paragraph-properties fo:margin-top="0.000cm" fo:margin-bottom="0.246cm" fo:line-height="115%" />
<style:paragraph-properties fo:margin-top="0.000cm" fo:margin-bottom="0.254cm" fo:line-height="115%" />
<style:text-properties style:font-name="Liberation Serif" fo:font-family="Liberation Serif" fo:font-size="12pt" fo:font-weight="normal" />
</style:style>
<style:style style:name="Title" style:family="paragraph" style:display-name="Title" style:parent-style-name="Heading" style:next-style-name="Text_20_body" style:class="chapter">
<style:paragraph-properties fo:margin-top="0.601cm" fo:margin-bottom="0.212cm" fo:text-align="center" />
<style:paragraph-properties fo:margin-top="0.635cm" fo:margin-bottom="0.254cm" fo:text-align="center" />
<style:text-properties style:font-name="Liberation Serif" fo:font-family="Liberation Serif" fo:font-size="30pt" fo:font-weight="bold" />
</style:style>
<style:style style:name="Separator" style:family="paragraph" style:display-name="Separator" style:parent-style-name="Standard" style:next-style-name="Text_20_body" style:class="text">
<style:paragraph-properties fo:margin-top="0.495cm" fo:margin-bottom="0.495cm" fo:line-height="115%" fo:text-align="center" />
<style:paragraph-properties fo:margin-top="0.508cm" fo:margin-bottom="0.508cm" fo:line-height="115%" fo:text-align="center" />
<style:text-properties style:font-name="Liberation Serif" fo:font-family="Liberation Serif" fo:font-size="12pt" fo:font-weight="normal" />
</style:style>
<style:style style:name="Heading_20_1" style:family="paragraph" style:display-name="Heading 1" style:parent-style-name="Heading" style:next-style-name="Text_20_body" style:default-outline-level="1" style:class="text">
<style:paragraph-properties fo:margin-top="0.601cm" fo:margin-bottom="0.212cm" />
<style:paragraph-properties fo:margin-top="0.635cm" fo:margin-bottom="0.254cm" />
<style:text-properties style:font-name="Liberation Serif" fo:font-family="Liberation Serif" fo:font-size="24pt" fo:font-weight="bold" fo:color="#4271ae" loext:opacity="100%" />
</style:style>
<style:style style:name="Heading_20_2" style:family="paragraph" style:display-name="Heading 2" style:parent-style-name="Heading" style:next-style-name="Text_20_body" style:default-outline-level="2" style:class="text">
<style:paragraph-properties fo:margin-top="0.707cm" fo:margin-bottom="0.212cm" />
<style:paragraph-properties fo:margin-top="0.635cm" fo:margin-bottom="0.254cm" />
<style:text-properties style:font-name="Liberation Serif" fo:font-family="Liberation Serif" fo:font-size="21pt" fo:font-weight="bold" fo:color="#4271ae" loext:opacity="100%" />
</style:style>
<style:style style:name="Heading_20_3" style:family="paragraph" style:display-name="Heading 3" style:parent-style-name="Heading" style:next-style-name="Text_20_body" style:default-outline-level="3" style:class="text">
<style:paragraph-properties fo:margin-top="0.495cm" fo:margin-bottom="0.212cm" />
<style:paragraph-properties fo:margin-top="0.508cm" fo:margin-bottom="0.254cm" />
<style:text-properties style:font-name="Liberation Serif" fo:font-family="Liberation Serif" fo:font-size="18pt" fo:font-weight="bold" fo:color="#4271ae" loext:opacity="100%" />
</style:style>
<style:style style:name="Heading_20_4" style:family="paragraph" style:display-name="Heading 4" style:parent-style-name="Heading" style:next-style-name="Text_20_body" style:default-outline-level="4" style:class="text">
<style:paragraph-properties fo:margin-top="0.495cm" fo:margin-bottom="0.212cm" />
<style:paragraph-properties fo:margin-top="0.508cm" fo:margin-bottom="0.254cm" />
<style:text-properties style:font-name="Liberation Serif" fo:font-family="Liberation Serif" fo:font-size="15pt" fo:font-weight="bold" fo:color="#4271ae" loext:opacity="100%" />
</style:style>
<style:style style:name="Header" style:family="paragraph" style:display-name="Header" style:parent-style-name="Header_20_and_20_Footer">
<style:paragraph-properties fo:text-align="right" />
</style:style>
<style:style style:name="Footnote" style:family="paragraph" style:display-name="Footnote" style:parent-style-name="Standard" style:class="extra">
<style:paragraph-properties fo:margin-bottom="0.199cm" fo:margin-left="0.601cm" fo:text-indent="-0.601cm" />
<style:paragraph-properties fo:margin-bottom="0.169cm" fo:margin-left="0.593cm" fo:text-indent="-0.593cm" />
<style:text-properties fo:font-size="10pt" />
</style:style>
</office:styles>
+10 -10
View File
@@ -12,7 +12,7 @@
<style:text-properties style:font-name="Liberation Serif" fo:font-family="Liberation Serif" fo:font-weight="normal" fo:font-style="normal" fo:font-size="12pt" />
</style:style>
<style:style style:name="Heading" style:family="paragraph" style:parent-style-name="Standard" style:next-style-name="Text_20_body" style:class="text">
<style:paragraph-properties fo:margin-top="0.495cm" fo:margin-bottom="0.212cm" fo:keep-with-next="always" />
<style:paragraph-properties fo:margin-top="0.508cm" fo:margin-bottom="0.254cm" fo:keep-with-next="always" />
<style:text-properties style:font-name="Liberation Serif" fo:font-family="Liberation Serif" fo:font-weight="normal" fo:font-style="normal" fo:font-size="15pt" />
</style:style>
<style:style style:name="Header_20_and_20_Footer" style:display-name="Header and Footer" style:family="paragraph" style:parent-style-name="Standard" style:class="extra" />
@@ -20,45 +20,45 @@
<number:number number:min-integer-digits="1" />
</number:number-style>
<style:style style:name="Text_20_body" style:family="paragraph" style:display-name="Text body" style:parent-style-name="Standard" style:class="text">
<style:paragraph-properties fo:margin-top="0.000cm" fo:margin-bottom="0.246cm" fo:line-height="115%" fo:text-align="left" />
<style:paragraph-properties fo:margin-top="0.000cm" fo:margin-bottom="0.254cm" fo:line-height="115%" fo:text-align="left" />
<style:text-properties style:font-name="Liberation Serif" fo:font-family="Liberation Serif" fo:font-size="12pt" fo:font-weight="normal" />
</style:style>
<style:style style:name="First_20_line_20_indent" style:family="paragraph" style:display-name="First line indent" style:parent-style-name="Text_20_body" style:class="text">
<style:paragraph-properties fo:text-indent="0.593cm" />
</style:style>
<style:style style:name="Text_20_Meta" style:family="paragraph" style:display-name="Text Meta" style:parent-style-name="Standard" style:class="text">
<style:paragraph-properties fo:margin-top="0.000cm" fo:margin-bottom="0.246cm" fo:line-height="115%" />
<style:paragraph-properties fo:margin-top="0.000cm" fo:margin-bottom="0.254cm" fo:line-height="115%" />
<style:text-properties style:font-name="Liberation Serif" fo:font-family="Liberation Serif" fo:font-size="12pt" fo:font-weight="normal" />
</style:style>
<style:style style:name="Title" style:family="paragraph" style:display-name="Title" style:parent-style-name="Heading" style:next-style-name="Text_20_body" style:class="chapter">
<style:paragraph-properties fo:margin-top="0.601cm" fo:margin-bottom="0.212cm" fo:text-align="center" />
<style:paragraph-properties fo:margin-top="0.635cm" fo:margin-bottom="0.254cm" fo:text-align="center" />
<style:text-properties style:font-name="Liberation Serif" fo:font-family="Liberation Serif" fo:font-size="30pt" fo:font-weight="bold" />
</style:style>
<style:style style:name="Separator" style:family="paragraph" style:display-name="Separator" style:parent-style-name="Standard" style:next-style-name="Text_20_body" style:class="text">
<style:paragraph-properties fo:margin-top="0.495cm" fo:margin-bottom="0.495cm" fo:line-height="115%" fo:text-align="center" />
<style:paragraph-properties fo:margin-top="0.508cm" fo:margin-bottom="0.508cm" fo:line-height="115%" fo:text-align="center" />
<style:text-properties style:font-name="Liberation Serif" fo:font-family="Liberation Serif" fo:font-size="12pt" fo:font-weight="normal" />
</style:style>
<style:style style:name="Heading_20_1" style:family="paragraph" style:display-name="Heading 1" style:parent-style-name="Heading" style:next-style-name="Text_20_body" style:default-outline-level="1" style:class="text">
<style:paragraph-properties fo:margin-top="0.601cm" fo:margin-bottom="0.212cm" />
<style:paragraph-properties fo:margin-top="0.635cm" fo:margin-bottom="0.254cm" />
<style:text-properties style:font-name="Liberation Serif" fo:font-family="Liberation Serif" fo:font-size="24pt" fo:font-weight="bold" fo:color="#4271ae" loext:opacity="100%" />
</style:style>
<style:style style:name="Heading_20_2" style:family="paragraph" style:display-name="Heading 2" style:parent-style-name="Heading" style:next-style-name="Text_20_body" style:default-outline-level="2" style:class="text">
<style:paragraph-properties fo:margin-top="0.707cm" fo:margin-bottom="0.212cm" />
<style:paragraph-properties fo:margin-top="0.635cm" fo:margin-bottom="0.254cm" />
<style:text-properties style:font-name="Liberation Serif" fo:font-family="Liberation Serif" fo:font-size="21pt" fo:font-weight="bold" fo:color="#4271ae" loext:opacity="100%" />
</style:style>
<style:style style:name="Heading_20_3" style:family="paragraph" style:display-name="Heading 3" style:parent-style-name="Heading" style:next-style-name="Text_20_body" style:default-outline-level="3" style:class="text">
<style:paragraph-properties fo:margin-top="0.495cm" fo:margin-bottom="0.212cm" />
<style:paragraph-properties fo:margin-top="0.508cm" fo:margin-bottom="0.254cm" />
<style:text-properties style:font-name="Liberation Serif" fo:font-family="Liberation Serif" fo:font-size="18pt" fo:font-weight="bold" fo:color="#4271ae" loext:opacity="100%" />
</style:style>
<style:style style:name="Heading_20_4" style:family="paragraph" style:display-name="Heading 4" style:parent-style-name="Heading" style:next-style-name="Text_20_body" style:default-outline-level="4" style:class="text">
<style:paragraph-properties fo:margin-top="0.495cm" fo:margin-bottom="0.212cm" />
<style:paragraph-properties fo:margin-top="0.508cm" fo:margin-bottom="0.254cm" />
<style:text-properties style:font-name="Liberation Serif" fo:font-family="Liberation Serif" fo:font-size="15pt" fo:font-weight="bold" fo:color="#4271ae" loext:opacity="100%" />
</style:style>
<style:style style:name="Header" style:family="paragraph" style:display-name="Header" style:parent-style-name="Header_20_and_20_Footer">
<style:paragraph-properties fo:text-align="right" />
</style:style>
<style:style style:name="Footnote" style:family="paragraph" style:display-name="Footnote" style:parent-style-name="Standard" style:class="extra">
<style:paragraph-properties fo:margin-bottom="0.199cm" fo:margin-left="0.601cm" fo:text-indent="-0.601cm" />
<style:paragraph-properties fo:margin-bottom="0.169cm" fo:margin-left="0.593cm" fo:text-indent="-0.593cm" />
<style:text-properties fo:font-size="10pt" />
</style:style>
</office:styles>
@@ -5,16 +5,16 @@
<title>Lorem Ipsum</title>
<style>
body {color: #000000; font-family: 'Arial'; font-size: 12pt; font-weight: 400; font-style: normal;}
p {text-align: left; line-height: 150%; margin-top: 0.00em; margin-bottom: 0.76em;}
p {text-align: left; line-height: 150%; margin-top: 0.00em; margin-bottom: 0.60em;}
a {color: #4271ae;}
mark {background: #ffffa6;}
h1, h2, h3, h4 {color: #4271ae; page-break-after: avoid;}
h1 {margin-top: 1.85em; margin-bottom: 0.65em;}
h2 {margin-top: 2.18em; margin-bottom: 0.65em;}
h3 {margin-top: 1.53em; margin-bottom: 0.65em;}
h4 {margin-top: 1.53em; margin-bottom: 0.65em;}
.title {font-size: 2.5em; margin-top: 1.85em; margin-bottom: 0.65em;}
.sep {text-align: center; margin-top: 1.53em; margin-bottom: 1.53em;}
h1 {margin-top: 1.50em; margin-bottom: 0.60em;}
h2 {margin-top: 1.50em; margin-bottom: 0.60em;}
h3 {margin-top: 1.20em; margin-bottom: 0.60em;}
h4 {margin-top: 1.20em; margin-bottom: 0.60em;}
.title {font-size: 2.5em; margin-top: 1.50em; margin-bottom: 0.60em;}
.sep {text-align: center; margin-top: 1.20em; margin-bottom: 1.20em;}
</style>
</head>
<body>
@@ -2,22 +2,22 @@
"meta": {
"projectName": "Lorem Ipsum",
"novelAuthor": "lipsum.com",
"buildTime": 1730136403,
"buildTimeStr": "2024-10-28 18:26:43"
"buildTime": 1731526420,
"buildTimeStr": "2024-11-13 20:33:40"
},
"text": {
"css": [
"body {color: #000000; font-family: 'Arial'; font-size: 12pt; font-weight: 400; font-style: normal;}",
"p {text-align: left; line-height: 150%; margin-top: 0.00em; margin-bottom: 0.76em;}",
"p {text-align: left; line-height: 150%; margin-top: 0.00em; margin-bottom: 0.60em;}",
"a {color: #4271ae;}",
"mark {background: #ffffa6;}",
"h1, h2, h3, h4 {color: #4271ae; page-break-after: avoid;}",
"h1 {margin-top: 1.85em; margin-bottom: 0.65em;}",
"h2 {margin-top: 2.18em; margin-bottom: 0.65em;}",
"h3 {margin-top: 1.53em; margin-bottom: 0.65em;}",
"h4 {margin-top: 1.53em; margin-bottom: 0.65em;}",
".title {font-size: 2.5em; margin-top: 1.85em; margin-bottom: 0.65em;}",
".sep {text-align: center; margin-top: 1.53em; margin-bottom: 1.53em;}"
"h1 {margin-top: 1.50em; margin-bottom: 0.60em;}",
"h2 {margin-top: 1.50em; margin-bottom: 0.60em;}",
"h3 {margin-top: 1.20em; margin-bottom: 0.60em;}",
"h4 {margin-top: 1.20em; margin-bottom: 0.60em;}",
".title {font-size: 2.5em; margin-top: 1.50em; margin-bottom: 0.60em;}",
".sep {text-align: center; margin-top: 1.20em; margin-bottom: 1.20em;}"
],
"html": [
[
@@ -1,13 +1,13 @@
<?xml version='1.0' encoding='utf-8'?>
<office:document xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.text">
<office:meta>
<meta:creation-date>2024-10-29T09:41:30</meta:creation-date>
<meta:generator>novelWriter/2.6a3</meta:generator>
<meta:creation-date>2024-11-13T20:33:59</meta:creation-date>
<meta:generator>novelWriter/2.6b1</meta:generator>
<meta:initial-creator>lipsum.com</meta:initial-creator>
<meta:editing-cycles>50</meta:editing-cycles>
<meta:editing-duration>P0DT0H40M48S</meta:editing-duration>
<dc:title>Lorem Ipsum</dc:title>
<dc:date>2024-10-29T09:41:30</dc:date>
<dc:date>2024-11-13T20:33:59</dc:date>
<dc:creator>lipsum.com</dc:creator>
</office:meta>
<office:font-face-decls>
@@ -22,7 +22,7 @@
<style:text-properties style:font-name="Arial" fo:font-family="Arial" fo:font-weight="normal" fo:font-style="normal" fo:font-size="12pt" />
</style:style>
<style:style style:name="Heading" style:family="paragraph" style:parent-style-name="Standard" style:next-style-name="Text_20_body" style:class="text">
<style:paragraph-properties fo:margin-top="0.646cm" fo:margin-bottom="0.276cm" fo:keep-with-next="always" />
<style:paragraph-properties fo:margin-top="0.508cm" fo:margin-bottom="0.254cm" fo:keep-with-next="always" />
<style:text-properties style:font-name="Arial" fo:font-family="Arial" fo:font-weight="normal" fo:font-style="normal" fo:font-size="15pt" />
</style:style>
<style:style style:name="Header_20_and_20_Footer" style:display-name="Header and Footer" style:family="paragraph" style:parent-style-name="Standard" style:class="extra" />
@@ -30,45 +30,45 @@
<number:number number:min-integer-digits="1" />
</number:number-style>
<style:style style:name="Text_20_body" style:family="paragraph" style:display-name="Text body" style:parent-style-name="Standard" style:class="text">
<style:paragraph-properties fo:margin-top="0.000cm" fo:margin-bottom="0.320cm" fo:line-height="150%" fo:text-align="left" />
<style:paragraph-properties fo:margin-top="0.000cm" fo:margin-bottom="0.254cm" fo:line-height="150%" fo:text-align="left" />
<style:text-properties style:font-name="Arial" fo:font-family="Arial" fo:font-size="12pt" fo:font-weight="normal" />
</style:style>
<style:style style:name="First_20_line_20_indent" style:family="paragraph" style:display-name="First line indent" style:parent-style-name="Text_20_body" style:class="text">
<style:paragraph-properties fo:text-indent="0.593cm" />
</style:style>
<style:style style:name="Text_20_Meta" style:family="paragraph" style:display-name="Text Meta" style:parent-style-name="Standard" style:class="text">
<style:paragraph-properties fo:margin-top="0.000cm" fo:margin-bottom="0.320cm" fo:line-height="150%" />
<style:paragraph-properties fo:margin-top="0.000cm" fo:margin-bottom="0.254cm" fo:line-height="150%" />
<style:text-properties style:font-name="Arial" fo:font-family="Arial" fo:font-size="12pt" fo:font-weight="normal" />
</style:style>
<style:style style:name="Title" style:family="paragraph" style:display-name="Title" style:parent-style-name="Heading" style:next-style-name="Text_20_body" style:class="chapter">
<style:paragraph-properties fo:margin-top="0.784cm" fo:margin-bottom="0.276cm" fo:text-align="center" />
<style:paragraph-properties fo:margin-top="0.635cm" fo:margin-bottom="0.254cm" fo:text-align="center" />
<style:text-properties style:font-name="Arial" fo:font-family="Arial" fo:font-size="30pt" fo:font-weight="bold" />
</style:style>
<style:style style:name="Separator" style:family="paragraph" style:display-name="Separator" style:parent-style-name="Standard" style:next-style-name="Text_20_body" style:class="text">
<style:paragraph-properties fo:margin-top="0.646cm" fo:margin-bottom="0.646cm" fo:line-height="150%" fo:text-align="center" />
<style:paragraph-properties fo:margin-top="0.508cm" fo:margin-bottom="0.508cm" fo:line-height="150%" fo:text-align="center" />
<style:text-properties style:font-name="Arial" fo:font-family="Arial" fo:font-size="12pt" fo:font-weight="normal" />
</style:style>
<style:style style:name="Heading_20_1" style:family="paragraph" style:display-name="Heading 1" style:parent-style-name="Heading" style:next-style-name="Text_20_body" style:default-outline-level="1" style:class="text">
<style:paragraph-properties fo:margin-top="0.784cm" fo:margin-bottom="0.276cm" />
<style:paragraph-properties fo:margin-top="0.635cm" fo:margin-bottom="0.254cm" />
<style:text-properties style:font-name="Arial" fo:font-family="Arial" fo:font-size="24pt" fo:font-weight="bold" fo:color="#4271ae" loext:opacity="100%" />
</style:style>
<style:style style:name="Heading_20_2" style:family="paragraph" style:display-name="Heading 2" style:parent-style-name="Heading" style:next-style-name="Text_20_body" style:default-outline-level="2" style:class="text">
<style:paragraph-properties fo:margin-top="0.922cm" fo:margin-bottom="0.276cm" />
<style:paragraph-properties fo:margin-top="0.635cm" fo:margin-bottom="0.254cm" />
<style:text-properties style:font-name="Arial" fo:font-family="Arial" fo:font-size="21pt" fo:font-weight="bold" fo:color="#4271ae" loext:opacity="100%" />
</style:style>
<style:style style:name="Heading_20_3" style:family="paragraph" style:display-name="Heading 3" style:parent-style-name="Heading" style:next-style-name="Text_20_body" style:default-outline-level="3" style:class="text">
<style:paragraph-properties fo:margin-top="0.646cm" fo:margin-bottom="0.276cm" />
<style:paragraph-properties fo:margin-top="0.508cm" fo:margin-bottom="0.254cm" />
<style:text-properties style:font-name="Arial" fo:font-family="Arial" fo:font-size="18pt" fo:font-weight="bold" fo:color="#4271ae" loext:opacity="100%" />
</style:style>
<style:style style:name="Heading_20_4" style:family="paragraph" style:display-name="Heading 4" style:parent-style-name="Heading" style:next-style-name="Text_20_body" style:default-outline-level="4" style:class="text">
<style:paragraph-properties fo:margin-top="0.646cm" fo:margin-bottom="0.276cm" />
<style:paragraph-properties fo:margin-top="0.508cm" fo:margin-bottom="0.254cm" />
<style:text-properties style:font-name="Arial" fo:font-family="Arial" fo:font-size="15pt" fo:font-weight="bold" fo:color="#4271ae" loext:opacity="100%" />
</style:style>
<style:style style:name="Header" style:family="paragraph" style:display-name="Header" style:parent-style-name="Header_20_and_20_Footer">
<style:paragraph-properties fo:text-align="right" />
</style:style>
<style:style style:name="Footnote" style:family="paragraph" style:display-name="Footnote" style:parent-style-name="Standard" style:class="extra">
<style:paragraph-properties fo:margin-bottom="0.199cm" fo:margin-left="0.601cm" fo:text-indent="-0.601cm" />
<style:paragraph-properties fo:margin-bottom="0.169cm" fo:margin-left="0.593cm" fo:text-indent="-0.593cm" />
<style:text-properties fo:font-size="10pt" />
</style:style>
</office:styles>
+1 -1
View File
@@ -395,7 +395,7 @@ def testFmtToDocX_ParagraphFormatting(mockGUI):
doc._pars[-1].toXml(xTest)
assert xmlToText(xTest) == (
'<w:body><w:p><w:pPr><w:pStyle w:val="Normal" />'
'<w:spacing w:before="0" w:after="0" w:line="252" /></w:pPr>'
'<w:spacing w:before="0" w:after="0" w:line="252" w:lineRule="auto" /></w:pPr>'
'<w:r><w:rPr /><w:t>Hello World</w:t></w:r></w:p></w:body>'
)
-4
View File
@@ -803,10 +803,6 @@ def testFmtToOdt_SaveFlat(mockGUI, fncPath, tstPaths, ipsumText):
odt._isNovel = True
odt.setHeaderFormat(nwHeadFmt.DOC_AUTO, 1)
assert odt._headerFormat == nwHeadFmt.DOC_AUTO
odt.setFirstLineIndent(True, 1.4, False)
assert odt._firstIndent is True
assert odt._fTextIndent == "0.499cm"
assert odt._indentFirst is False
odt.setPageLayout(148, 210, 20, 18, 17, 15)
assert odt._mDocWidth == "14.800cm"