R4.9: ElyMark menus and keys as Typora's, component pin 6b033f3

Paragraph and Format menus with Typora's items, labels and keys; Table
is a Paragraph submenu with row and column moves and source tidy.
Ctrl+/ toggles source, F8 focus, F9 typewriter, Ctrl+Shift+=/-/0 size,
Ctrl+Shift+C copies as Markdown, Ctrl+Shift+V pastes as plain text.
Refused commands show why, including refusals read in the background.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
ZacharyZhang-NYandClaude Opus 5.5 committed 2026-10-14 16:38:28 -04:00
1 parent 4252ff5062
commit 539206297c
20 files changed
+963 -153

No files matched your search

+3
View File
@@ -5,6 +5,7 @@ mod calc;
mod data;
mod doc;
mod mark;
mod mark_menus;
mod motion;
mod office;
mod output;
@@ -179,6 +180,7 @@ fn catalogs() -> (Catalog, Catalog) {
.chain(tree_ops::EN)
.chain(tree_places::EN)
.chain(mark::EN)
.chain(mark_menus::EN)
.chain(settings::EN)
.copied()
.collect();
@@ -202,6 +204,7 @@ fn catalogs() -> (Catalog, Catalog) {
.chain(tree_ops::ZH_CN)
.chain(tree_places::ZH_CN)
.chain(mark::ZH_CN)
.chain(mark_menus::ZH_CN)
.chain(settings::ZH_CN)
.copied()
.collect();
+12 -12
View File
@@ -16,8 +16,8 @@ pub(super) const EN: &[(&str, &str)] = &[
("mark.table.insert", "Insert Table"),
("mark.table.row_above", "Add Row Above"),
("mark.table.row_below", "Add Row Below"),
("mark.table.column_left", "Add Column Left"),
("mark.table.column_right", "Add Column Right"),
("mark.table.column_left", "Add Column Before"),
("mark.table.column_right", "Add Column After"),
("mark.table.delete_row", "Delete Row"),
("mark.table.delete_column", "Delete Column"),
("mark.table.none", "Put the caret in a table first"),
@@ -65,15 +65,15 @@ pub(super) const EN: &[(&str, &str)] = &[
("mark.copy.failed", "Copying failed: {error}"),
("mark.export.failed", "The export failed: {error}"),
("mark.look.focus", "Focus Mode"),
("mark.look.typewriter", "Typewriter Scrolling"),
("mark.look.typewriter", "Typewriter Mode"),
("mark.look.narrow", "Narrow Text"),
("mark.look.medium", "Medium Text"),
("mark.look.wide", "Wide Text"),
("mark.look.sans", "Sans-Serif Font"),
("mark.look.serif", "Serif Font"),
("mark.look.mono", "Monospace Font"),
("mark.look.larger", "Larger Text"),
("mark.look.smaller", "Smaller Text"),
("mark.look.larger", "Zoom In"),
("mark.look.smaller", "Zoom Out"),
("mark.look.actual", "Actual Size"),
("mark.git.unchanged", "Git: unchanged"),
("mark.git.changed", "Git: changed"),
@@ -113,10 +113,10 @@ pub(super) const ZH_CN: &[(&str, &str)] = &[
("mark.search.missed", "{name} 未能搜索"),
("mark.menu.table", "表格"),
("mark.table.insert", "插入表格"),
("mark.table.row_above", "在上方插入行"),
("mark.table.row_below", "在下方插入行"),
("mark.table.column_left", "在左侧插入列"),
("mark.table.column_right", "在右侧插入列"),
("mark.table.row_above", "上方插入行"),
("mark.table.row_below", "下方插入行"),
("mark.table.column_left", "左侧插入列"),
("mark.table.column_right", "右侧插入列"),
("mark.table.delete_row", "删除行"),
("mark.table.delete_column", "删除列"),
("mark.table.none", "请先把插入点放进表格"),
@@ -164,15 +164,15 @@ pub(super) const ZH_CN: &[(&str, &str)] = &[
("mark.copy.failed", "复制失败:{error}"),
("mark.export.failed", "导出失败:{error}"),
("mark.look.focus", "专注模式"),
("mark.look.typewriter", "打字机滚动"),
("mark.look.typewriter", "打字机模式"),
("mark.look.narrow", "窄正文"),
("mark.look.medium", "中等正文"),
("mark.look.wide", "宽正文"),
("mark.look.sans", "无衬线字体"),
("mark.look.serif", "衬线字体"),
("mark.look.mono", "等宽字体"),
("mark.look.larger", "放大文字"),
("mark.look.smaller", "缩小文字"),
("mark.look.larger", "放大"),
("mark.look.smaller", "缩小"),
("mark.look.actual", "实际大小"),
("mark.git.unchanged", "Git:未改动"),
("mark.git.changed", "Git:有改动"),
+139
View File
@@ -0,0 +1,139 @@
//! ElyMark's Typora menus, in Typora's own words.
pub(super) const EN: &[(&str, &str)] = &[
("mark.menu.paragraph", "Paragraph"),
("mark.menu.format", "Format"),
("mark.block.h1", "Heading 1"),
("mark.block.h2", "Heading 2"),
("mark.block.h3", "Heading 3"),
("mark.block.h4", "Heading 4"),
("mark.block.h5", "Heading 5"),
("mark.block.h6", "Heading 6"),
("mark.block.paragraph", "Paragraph"),
("mark.block.promote", "Increase Heading Level"),
("mark.block.demote", "Decrease Heading Level"),
("mark.block.math", "Math Block"),
("mark.block.code", "Code Fences"),
("mark.block.quote", "Quote"),
("mark.block.ordered", "Ordered List"),
("mark.block.bullet", "Unordered List"),
("mark.block.task", "Task List"),
("mark.block.before", "Insert Paragraph Before"),
("mark.block.after", "Insert Paragraph After"),
("mark.block.link_reference", "Link Reference"),
("mark.block.footnote", "Footnotes"),
("mark.block.rule", "Horizontal Line"),
("mark.block.toc", "Table of Contents"),
("mark.block.front_matter", "YAML Front Matter"),
("mark.format.strong", "Strong"),
("mark.format.emphasis", "Emphasis"),
("mark.format.underline", "Underline"),
("mark.format.code", "Code"),
("mark.format.strike", "Strike"),
("mark.format.link", "Hyperlink"),
("mark.format.image", "Insert Image"),
("mark.format.clear", "Clear Format"),
("mark.table.move_row_up", "Move Row Up"),
("mark.table.move_row_down", "Move Row Down"),
("mark.table.move_column_left", "Move Column Left"),
("mark.table.move_column_right", "Move Column Right"),
("mark.table.tidy", "Prettify Source Code"),
(
"mark.table.edge",
"Nothing lies past this row or column that way",
),
("mark.view.source", "Source Code Mode"),
("mark.copy.markdown", "Copy as Markdown"),
("mark.paste.plain", "Paste as Plain Text"),
("mark.paste.none", "The clipboard holds no text"),
("mark.refused.code", "This does not work inside code"),
("mark.refused.math", "This does not work inside math"),
("mark.refused.html", "This does not work inside HTML"),
(
"mark.refused.front_matter",
"This does not work inside front matter",
),
(
"mark.refused.outside",
"Put the caret in a paragraph, heading or cell first",
),
("mark.refused.table", "This does not work inside a table"),
("mark.refused.present", "The file has front matter already"),
(
"mark.refused.across",
"The selection crosses a block, a link or another format",
),
(
"mark.refused.too_long",
"The file is too long to read; edit it as source",
),
("mark.refused.busy", "The last edit is still being read"),
(
"mark.refused.changed",
"The text changed before the edit was ready; try again",
),
(
"mark.refused.misread",
"This would change how the text reads, so nothing changed",
),
];
pub(super) const ZH_CN: &[(&str, &str)] = &[
("mark.menu.paragraph", "段落"),
("mark.menu.format", "格式"),
("mark.block.h1", "一级标题"),
("mark.block.h2", "二级标题"),
("mark.block.h3", "三级标题"),
("mark.block.h4", "四级标题"),
("mark.block.h5", "五级标题"),
("mark.block.h6", "六级标题"),
("mark.block.paragraph", "段落"),
("mark.block.promote", "提升标题级别"),
("mark.block.demote", "降低标题级别"),
("mark.block.math", "公式块"),
("mark.block.code", "代码块"),
("mark.block.quote", "引用"),
("mark.block.ordered", "有序列表"),
("mark.block.bullet", "无序列表"),
("mark.block.task", "任务列表"),
("mark.block.before", "在上方插入段落"),
("mark.block.after", "在下方插入段落"),
("mark.block.link_reference", "链接引用"),
("mark.block.footnote", "脚注"),
("mark.block.rule", "水平分割线"),
("mark.block.toc", "内容目录"),
("mark.block.front_matter", "YAML Front Matter"),
("mark.format.strong", "加粗"),
("mark.format.emphasis", "斜体"),
("mark.format.underline", "下划线"),
("mark.format.code", "代码"),
("mark.format.strike", "删除线"),
("mark.format.link", "超链接"),
("mark.format.image", "插入图片"),
("mark.format.clear", "清除样式"),
("mark.table.move_row_up", "上移该行"),
("mark.table.move_row_down", "下移该行"),
("mark.table.move_column_left", "左移该列"),
("mark.table.move_column_right", "右移该列"),
("mark.table.tidy", "格式化表格源码"),
("mark.table.edge", "这一方向已到表格边缘"),
("mark.view.source", "源代码模式"),
("mark.copy.markdown", "复制为 Markdown"),
("mark.paste.plain", "粘贴为纯文本"),
("mark.paste.none", "剪贴板里没有文字"),
("mark.refused.code", "代码里用不了这条命令"),
("mark.refused.math", "公式里用不了这条命令"),
("mark.refused.html", "HTML 里用不了这条命令"),
("mark.refused.front_matter", "front matter 里用不了这条命令"),
("mark.refused.outside", "请先把插入点放进段落、标题或单元格"),
("mark.refused.table", "表格里用不了这条命令"),
("mark.refused.present", "文件已有 front matter"),
("mark.refused.across", "选区跨过了块、链接或别的格式"),
(
"mark.refused.too_long",
"文件太长,无法解析;请在源码里编辑",
),
("mark.refused.busy", "上一次编辑还在处理"),
("mark.refused.changed", "编辑完成前文字已改变,请重试"),
("mark.refused.misread", "这样会改变文字的读法,未作改动"),
];