Skip to content

Markdown toolbox: split, merge, and tidy formatting

Utilities (实用工具) → Markdown tools (Markdown 工具) contains Split, Merge, and Format for existing .md files. These differ from the separate Markdown editor: the toolbox performs one-off file operations, while the editor supports continued writing, previewing, and other exports.

This guide uses synthetic Lesson 1.md and Lesson 2.md, each with headings, two paragraphs, a simple table, and a formula. Keep original copies before trying conversions. Both the web and desktop apps open the tool pages, whose components must load successfully. Local input files do not mean the entire tool works offline.

Prepare a repeatable sample

Save the following as UTF-8 Lesson 1.md. Make a second copy and change its title and body to Lesson 2.

markdown
# Lesson 1

## Goal

Learn the area formula and record two shapes.

## Data

| Shape | Base | Height |
| --- | --- | --- |
| Triangle | 6 | 4 |
| Parallelogram | 6 | 4 |

The triangle area is $S=bh/2$.

The toolbox reads Markdown text without automatically collecting image attachments. For a relative reference such as ![Diagram](images/diagram.png), preserve the image directory and place the downloaded Markdown where that reference still resolves.

On phones, use the purple menu button to find parameters. Queues and previews are not long-term storage; download results before leaving. The browser or desktop app's save prompt determines the download location.

Split: use headings, length, or selected outline sections

  1. Open Split (拆分) and upload .md files. Choose Single file (单文件处理) or Batch (批量处理) under processing mode. Batch mode accepts up to 10 files.
  2. Select the appropriate mode:
ModeActionSuitable input
By heading (按标题拆分)Select H1 or H2Notes, lessons, and articles with structured headings
By length (按长度拆分)Choose characters, content blocks, or reference tokens, then target lengthText prepared for reading or processing in parts
Extract outline sections (按大纲提取指定片段)Use single-file mode, expand the outline, and select sectionsOne chapter or a small set of passages
  1. Enable Keep Frontmatter (保留 Frontmatter) to include the original header once in the first output. This also applies to outline extraction or checked-result downloads of a later chapter. Turning it off removes the header while retaining the body preamble. In the naming pattern, base represents the original name and 001 represents the sequence; output names have one .md extension.
  2. Click Start splitting (开始拆分). With H2 selected for the example, check that “Goal” and “Data” appear as expected.
  3. Expand the result outline, select sections, and choose View split result (查看拆分结果). Check headings, tables, formulas, and any preface without a heading.
  4. In Batch processing, Download split files saves all results as a ZIP, while Download selected sections combines checked sections into one MD in source order. In Single file processing, check results and choose Batch download for a ZIP, or select one result and use Export above the source area to save the currently previewed raw fragment.

H1/H2 mode splits at real headings of the selected level and retains the preamble in the first output. Headings inside code fences do not create sections. Character and reference-token targets preserve whole paragraphs, tables, code blocks and formulas, so a block can exceed the target. By content blocks counts each heading, paragraph, table, code block and other top-level block as one. Reference tokens use cl100k_base, not a universal model limit. After changing settings, click Start splitting again.

Check downloaded source and the intended Markdown editor. Image paths remain, but image files are not collected into the ZIP. Cross-section footnotes and reference definitions are not copied into every file; keep the needed resources and definitions with each extracted document.

Split by headings or select specific sections from the outline. (workflow diagram)

Split by headings or select specific sections from the outline. (workflow diagram). Open the image in a new tab to enlarge it.

Check actual split files from the same sample

Open the Markdown splitter, or download source and results from the verified example in the split guide.

The self-authored UTF-8 sample contains YAML, an untitled preamble, two chapters, a table, display math and a code fence. H2 mode produces two MD files whose ordered contents reproduce this sample's source. The first chapter keeps its subsection and the fake heading inside its code fence. The second retains images/chart.png; the image resource still belongs in the matching directory. An actual reference-token run at target 100 also provides six MD files for checking whole-block boundaries.

Find PREFACE-KEEP-001, CODE-FENCE-KEEP-001 and DOCUMENT-END-20261010, then compare formula delimiters, table rows, columns and line breaks. These checks apply to the supplied files and do not establish standalone rendering for every Markdown extension.

Merge: put several notes into one document

  1. Open Merge (合并) and choose the two lesson files. The first selection accepts up to 10 files; the workspace can add files up to 20.
  2. Drag entries in File list (文件列表) into reading order. Remove any incorrect files.
  3. Review Merge settings (合并设置):
SettingUse
Separator (分隔符)--- inserts a rule; “Filename as H1” makes each filename a chapter; “None” directly joins content
Heading normalization (标题规范化)Shift heading levels +1, leave unchanged, or shift -1; inspect existing H1 headings
Generate contents (生成目录)Create a contents list from merged headings, then test its links
Remove references section (剔除参考文献章节)Enable only when those sections are unwanted; check for unintended removals
Deduplicate footnotes / reference anchors (去重脚注 / 去重参考锚点)Use for repeated reference markers, then check their destinations
  1. Choose Markdown as the output and click Start merging (开始合并).
  2. When Merge result (合并结果) shows Completed (已完成) and the source-file count, click Download merged file (下载合并文件).
  3. Open the .md and confirm Lesson 1 precedes Lesson 2, contents links work, and tables/formulas remain intact. Relative image references still need their resources.

Current PDF and Word behavior

Choosing PDF attempts to open browser printing. If the dialog appears, select “Save as PDF,” check pagination, and save. This is a print workflow rather than a direct PDF download. The print dialog may be blocked in embedded tool pages or some desktop environments. If it does not open, first download Markdown, then preview and print it from an editor or another application that supports Markdown. Split large documents if printing stalls.

The current Word option reports that Word conversion is not implemented and does not produce DOCX. Download the merged Markdown first, then use an editing workflow that supports Word export.

Arrange the files, choose merge rules, and download Markdown. (workflow diagram)

Arrange the files, choose merge rules, and download Markdown. (workflow diagram). Open the image in a new tab to enlarge it.

From merged Markdown to Word: the same-source result

Two self-authored lessons about area and motion each contain a table, an equation and the same footnote text. On 2026-10-13, the merge tool produced a 796-byte MD using Markdown output and the default contents/footnote-deduplication settings. It exactly matches the previously published merged source. No OCR or translation task was run.

  • Both repeated “Goal” and “Data and formulas” headings remain. The second pair of directory links uses -1; those link strings do not guarantee that every destination renderer creates matching targets.
  • Identical footnote text shares one definition with two references. This sample does not validate arbitrary same-label footnotes with different content.
  • When exported from the Markdown editor, the original Word file has no matching bookmarks for its six directory links. IDs on the headings yield six matching targets, but both footnote return links remain unresolved and native Word footnote objects are absent.

Download the actual merged MD or the two inputs, three Word exports and complete checks. The files and heading text are Chinese. A completed merge, visible contents list and completed download are separate checks; verify the final document in its destination app. This sample has no images, long-document pagination or desktop Word/WPS interaction test.

Format: choose rules and compare both sides

The English formatter and Chinese formatter currently use different workspaces and rules. Check the language path in the address bar and follow the controls actually shown. Switching languages does not imply identical output.

  1. Select one .md file or switch to Paste Text. Both entry points allowed only one file in this test; neither provided a multi-file queue.
  2. Compare Original Content on the left with Formatted Content on the right. Importing generates an initial result, so inspect the enabled options first.
  3. In the English workspace, check its seven switches: headings, lists, code fences, math notation, extra lines, table alignment and doc2x comments. Math notation also has a style selector. The Chinese workspace instead has 18 text/math switches.
  4. Use a copy containing representative math, code, currency and tables. Keep the source if unrelated text changes, and process confirmed body text separately.
  5. Download from the right-hand result pane. The left pane also has a download control, but it saves the source. All sample outputs below came from the right pane.
  6. The result is still .md. Preview it in the intended editor; this flow does not compile PDF or directly produce Word.

How to treat visible advanced switches

In the English workspace, all seven switches off produced a byte-identical copy of this particular Cedar input. Defaults changed dollar amounts, the code fence and table columns. Compare actual output rather than assuming the option names guarantee correct code or table structure.

The Chinese workspace has different controls. Some advanced switches do not independently change the output, and turning all 18 off still changed display-math delimiters and unescaped currency in this test. Do not apply the English all-off result as a general guarantee for the Chinese workspace or arbitrary files.

Compare source and output, then copy or download the result. (workflow diagram)

Compare source and output, then copy or download the result. (workflow diagram). Open the image in a new tab to enlarge it.

Compare native downloads from both languages

On October 12, 2026, we imported the same 526-byte self-authored Cedar document into both tools. It contains inline and display math, an aligned environment, Python code, dollar amounts and a two-column table. The files preserve the actual downloaded output, including unwanted changes.

Workspace and settingsDownload bytesObserved in this sample
Chinese defaults517Literal code parentheses become dollar delimiters; spacing between currency amounts changes
All 18 Chinese switches off523Code keeps its original notation, but display math and currency still change
English defaults555Currency becomes math notation; the code-language label moves to a new line; the table gains a column
All 7 English switches off526Byte-identical to this source

Actual English formatter: the default output adds a table column and changes currency and the code fence

Actual English default output. These differences are counterexamples to automatic repair, not recommended code or table syntax.

Actual Chinese formatter comparing a separate body-math-only input with its converted Markdown

A separate body-math-only input was also converted in the Chinese workspace. Its native MD displayed three expressions in the Doc2X editor with AI formula completion off; literal code and currency were excluded from that input.

Download the common source, four native MD outputs and checks (ZIP). The bundle includes the source, four untouched outputs, a readme and hashes. This documentation change does not fix the formatter engine.

See the delimiter comparison guide in Chinese for literal before/after snippets. For Word, use the separate editing and export workflow; an MD download is not DOCX.

Tidying a table

There is no separate table-tidying menu, and the formatter does not guarantee automatic table reconstruction. Check these items in the source pane or Markdown editor:

  1. Keep the same column count in the header, separator, and each data row. The sample has three columns: Shape, Base, and Height.
  2. Keep | --- | --- | --- | immediately below the header and avoid accidental line breaks inside rows.
  3. Escape a literal | according to the destination renderer's rules. Check merged cells or complex multi-row tables in an editor that supports their structure.

Preview the table in an editor before saving. If you need Excel, use the document-parsing or table-export workflow; this toolbox does not provide a direct XLSX export for the Markdown table.

Troubleshooting

ProblemRecovery
Text is garbledSave the source as UTF-8 in a text editor, then upload it again
No sections appearCheck # Heading or ## Heading syntax and select the matching level; normalize headings in the editor if needed
Images disappear after splittingRestore the relative image directories; the ZIP contains split text rather than automatically collected original images
Merged heading levels are wrongAdjust heading level and separator settings, merge again, and check the contents list
Word produces no downloadIt is not implemented here; download Markdown and use a Word-capable editing/export flow
PDF print dialog does not openDownload Markdown, then save a PDF from a printable editor or browser preview
Formatting changes formulas or styling incorrectlyKeep the source and compare small passages; check the workspace language and the native-output example above
A switch seems ineffectiveCheck the selected language and actual output; the two workspaces use different rule sets
Results disappear after refreshUpload the original again; download before closing instead of treating the queue as a local library