Add title pages, standard manuscript format and collapsible panels
Five changes to the export and the window chrome: * Manuscript details gains a contact field and a "Begin exports with a title page" option: the title, the author beneath it, and the contact details beneath that, laid out line for line as typed. A chapters + master export puts the title page on the master, not on each chapter. * "Standard manuscript format" lays an export out the way an agent or an editor expects a submission: 12pt Courier, double-spaced, half-inch first-line indents, a Surname / Title / page header on every page but the title page, chapters opening a third of the way down, and `---` rendered as the conventional centred `#` scene break. The title page becomes the submission kind, with contact top-left and an approximate word count top-right. Off by default; margins were already the standard 1in on US Letter and are unchanged either way. * A folder button beside Export ODT opens the project folder in the file manager -- the enclosing git work tree, including one still awaiting confirmation, since showing a folder is a smaller question than choosing which repository to commit to. * The toolbar and the file list each collapse, from the pair of buttons at the right of the menu bar or from the View menu, and Ctrl+D folds both away together for distraction-free writing. Both choices persist. * The editor sizes to its viewport instead of a fixed 30 rows, so the height a folded panel gives back reaches the page rather than leaving grey space below the text box that did not even take focus. Two traps worth recording. ODF's style:master-page-name is inherited, and any paragraph style carrying one forces a page break before every paragraph that uses it -- a four-line contact block came out as four pages until Contact_20_Line stopped inheriting from Contact_20_Block; a test now pins which styles may carry one. And the status bar shares a function with the toolbar, so guarding that function's top rather than the top panel alone silently took the word counts away with it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GYSGPDwkSzhm4qLqjCbqxU
This commit is contained in:
+43
-4
@@ -280,7 +280,8 @@ impl App {
|
||||
}
|
||||
}
|
||||
|
||||
/// Title and author written into exported documents.
|
||||
/// Title, author and contact details written into exported documents, plus
|
||||
/// whether an export opens with a title page carrying them.
|
||||
pub(super) fn manuscript_settings_window(&mut self, ctx: &egui::Context) {
|
||||
let mut open = self.show_manuscript_settings;
|
||||
let mut close = false;
|
||||
@@ -320,12 +321,50 @@ impl App {
|
||||
);
|
||||
save_now |= r.lost_focus();
|
||||
ui.end_row();
|
||||
|
||||
ui.label("Contact:");
|
||||
let r = ui
|
||||
.add(
|
||||
egui::TextEdit::multiline(&mut self.config.manuscript_contact)
|
||||
.hint_text("Address, email, phone — a line each")
|
||||
.desired_width(240.0)
|
||||
.desired_rows(4),
|
||||
)
|
||||
.on_hover_text(
|
||||
"Shown under your name on the title page, laid out \
|
||||
line for line as typed",
|
||||
);
|
||||
save_now |= r.lost_focus();
|
||||
ui.end_row();
|
||||
});
|
||||
ui.separator();
|
||||
let r = ui
|
||||
.checkbox(
|
||||
&mut self.config.manuscript_title_page,
|
||||
"Begin exports with a title page",
|
||||
)
|
||||
.on_hover_text(
|
||||
"A page of its own carrying the title, the author and the \
|
||||
contact details, with the first chapter starting after it",
|
||||
);
|
||||
save_now |= r.changed();
|
||||
let r = ui
|
||||
.checkbox(
|
||||
&mut self.config.manuscript_standard_format,
|
||||
"Standard manuscript format",
|
||||
)
|
||||
.on_hover_text(
|
||||
"What an agent or editor expects a submission in: 12pt \
|
||||
Courier, double-spaced, half-inch paragraph indents, a \
|
||||
Surname / Title / page header, chapters opening a third \
|
||||
of the way down, and # for a scene break",
|
||||
);
|
||||
save_now |= r.changed();
|
||||
ui.label(
|
||||
egui::RichText::new(
|
||||
"Written into exported .odt files as their document \
|
||||
properties, which is what a word processor shows under \
|
||||
File ▸ Properties.",
|
||||
"The title and author are also written into exported .odt \
|
||||
files as their document properties, which is what a word \
|
||||
processor shows under File ▸ Properties.",
|
||||
)
|
||||
.small()
|
||||
.weak(),
|
||||
|
||||
Reference in New Issue
Block a user