Skip to content

Task how-to - Project publishing

How to combine Markdown files into one PDF

Open a Markdown project, choose the documents and their order, preview the combined publication, and export one PDF with each document starting on a new page.

Review method

Imported the published three-file fixture and inspected document order, boundaries, combined preview, and combined PDF export.

To combine several Markdown documents into one PDF, first open them as one project. Then create a Combined PDF, add only the documents that belong in it, arrange their order, preview that target, and export it. Each selected document starts on a new page.

This explicit step is important. A project folder can contain chapters, notes, a README, bibliography files, images, configuration, and drafts. Treating every source file as a book chapter would create accidental output. Lemmafour therefore separates what the project contains from what a particular combined publication contains.

Bring the project into the browser

Use the opening method that matches what you have:

  • Open files for a few Markdown, Quarto, notebook, and supporting files selected together.
  • Import project folder when the browser exposes folder selection.
  • Open project backup for a previously exported Lemmafour project archive.
  • Open a ZIP when a folder picker is unavailable or the project was sent as one archive.
  • Import from public link when the source is a supported public repository.

On iPhone and iPad, a ZIP or multi-file selection is usually more portable than relying on direct folder handles. On desktop Chromium browsers, a folder handle can support direct editing where permission is available. These are different storage capabilities, but they lead to the same project model after intake.

After import, Files shows the source tree. Open a file there to edit or preview that file. Images, bibliographies, styles, data files, and configuration remain supporting project material; they do not become standalone chapters merely because they appear in the tree.

Create a Combined PDF deliberately

Open Combined PDF contents. If the project has no combined target yet, choose Create combined PDF and give it a reader-facing name such as “Research report” or “Course handbook.”

Add the documents that belong in that output. A practical order might be:

  1. introduction or title material;
  2. chapters or report sections;
  3. results and discussion;
  4. appendices.

Use the move controls to establish the exact order. Do not rely on filesystem order or filenames unless that order is also represented in the Combined PDF contents. Assigning opening, body, or appendix roles can help the publication pipeline apply the intended document boundaries.

The downloadable example contains three source documents named for easy inspection, but the combined contents remain the authoritative order.

Why project files and combined contents are separate

The distinction supports more than books. The same project can produce:

  • a short client report that excludes internal notes;
  • a complete archival report with appendices;
  • a lecture handout assembled from selected lessons;
  • separate chapter PDFs for review;
  • one submission PDF in a required sequence.

You can create more than one Combined PDF in a project. Each target keeps its own name, document list, order, and roles. Editing the underlying Markdown updates every target that uses that file, while changing one target’s contents does not delete or rewrite source documents.

This also explains the preview selector. The file open in the editor and the target shown in the PDF preview are related but distinct choices. Select the Combined PDF as the preview target when you need to inspect the assembled deliverable.

Page boundaries and consistent design

Every document in a combined target begins on a new page. That is the expected behavior for separately authored chapters, reports, notebooks, and appendices. It avoids placing the next document’s top-level heading immediately after the previous document’s final paragraph.

The combined build goes through the same semantic and layout pipeline as an individual preview. Theme, typography, table handling, notebook output handling, headers, footers, branding, and other publication settings should therefore match the selected preview rather than falling back to a second export implementation.

Still review the result. A forced new document page can leave intentional white space at the end of the previous document. That is not the same as an avoidable blank page caused by an oversized figure. Use page-flow compaction only for avoidable layout breaks, not to erase the visual rhythm of the document.

Export the right output

Choose Export and select the output that matches the job:

OutputUse it when
Current PDFYou need the file or combined target currently being previewed
Separate PDFsReviewers or recipients need one PDF per selected source, delivered in a ZIP
Combined PDFThe documents must arrive as one ordered publication

For a Combined PDF, verify the selected target and order in the export sheet before creating the file. For separate PDFs, folder structure is preserved in the ZIP where possible. Neither choice silently changes the source project.

Save and recover the project

Edits are saved to the active local project according to its storage mode. The save indicator tells you whether the current revision is durable in the browser or written to a connected folder. Before clearing browser data or moving to another device, use Download project backup. Browser-local storage can survive a refresh, but deleting site data can remove browser-held projects.

The final PDF is an independent download and remains yours. Reopen it in a second viewer, check the document order and page count, and keep the source backup separately when the project matters.

Reproduce the result

Use the tested example

Lemmafour Combined PDF contents showing introduction methods and results in order beside the PDF preview
The tested project with an explicit three-document Combined PDF in its chosen order.
Download the tested three-file project

Before you begin

Current limitations

  • A project file is not included merely because it exists in the folder; add it to a Combined PDF when it belongs in that deliverable.
  • Folder selection depends on browser support. Opening several files or a ZIP remains the portable fallback on browsers without direct folder access.
  • Links and assets must resolve inside the imported project; files outside the selected folder or archive are not silently fetched.

FAQ

Questions answered here

Does every Markdown file in a folder automatically enter the combined PDF?

No. The Files view shows project material; Combined PDF contents is the explicit ordered list for that output. This prevents notes and supporting files from entering a deliverable accidentally.

Does each document start on a new page?

Yes. Documents in a Combined PDF are separate publication units and each begins on a new page.

Can I still export the files separately?

Yes. Export can target the current PDF, separate PDFs in a ZIP, or one Combined PDF, depending on the project and selected output.