इसे छोड़कर कंटेंट पर जाएं
Oleaflyv0.4.6

Document tools

Change paper size, margins, font, language, line spacing, and numbering in a dialog that edits the LaTeX preamble, the Typst set rules, or the Markdown front matter.

यह कंटेंट अभी तक आपकी भाषा में उपलब्ध नहीं है।

Each language keeps its page setup somewhere different: class options and preamble commands in LaTeX, #set rules in Typst, front matter in Markdown. Document settings gives you one form for all of them. When you apply it, Oleafly writes the change into your main file as ordinary source that you can read and edit later.

Open it with the Document settings button at the right end of the editor toolbar, or run Document settings from the ⌘K palette. The dialog always edits the project’s main document, whichever file you have open.

The form has four sections. The fields depend on the engine:

SectionLaTeXTypstMarkdown
PagePage size, Columns, MarginsPage size, Margins, ColumnsDocument class, Page size, Columns, Margins
TextBody font, Font size, LanguageBody font, Font size, Language, RegionBody font, Font size, Language
ParagraphLine spacingJustification, Line spacingLine spacing
NumberingNumbered levels, Equation numberingHeading numbering, Equation numberingSection numbers

Lists start with Default, which removes the setting so the class, template, or engine default applies again. Leave a text field empty for the same effect. Lengths take units, such as 2.5cm, 1in, or 11pt, and Typst margins also accept auto. A value Oleafly can’t use gets a short note under the field, and Apply waits until you fix it.

Body font suggests fonts as you type. In Typst projects, the list holds every font Typst can find and says where each comes from: the project’s fonts folder, the computer, or Typst’s built-in set. In LaTeX and Markdown projects, it lists fonts installed on the computer.

Choose Apply to write the changes, or Cancel to leave the file alone. When the main file is open in the editor, one ⌘Z undoes the whole change.

  • Page size, Columns, and Font size become options of \documentclass.
  • Margins go to the geometry package. Oleafly edits an existing \geometry{…} or geometry option, or adds \usepackage[margin=…]{geometry}.
  • Body font writes \setmainfont{…} and loads fontspec. It needs the XeLaTeX or LuaLaTeX compiler, and the field says so until you pick one in the compile menu.
  • Language adds the language to babel, uses \setdefaultlanguage when the document loads polyglossia, or adds \usepackage[language]{babel}. Use babel names such as english.
  • Line spacing is Single, One and a half, Double, or a number such as 1.5. It uses the setspace package, or \linespread when that is what the document already has.
  • Numbered levels sets secnumdepth. Choose None, Chapters only, or how deep numbering goes, from Down to sections to Down to subparagraphs.
  • Equation numbering writes \numberwithin{equation}{…} for By section, By chapter, or By subsection.

Values go into the main file’s #set rules. When a rule is missing, Oleafly adds it near the top:

  • #set page(paper: …, margin: …, columns: …)
  • #set text(font: …, size: …, lang: …, region: …)
  • #set par(justify: …, leading: …), where Justification is Justified or Ragged right
  • #set heading(numbering: …), with patterns such as 1., 1.1, 1.a, I., or A.
  • #set math.equation(numbering: …), with (1), (1.1), or 1

Language takes a two or three letter code such as en, and Region a two letter code such as GB.

Typst projects also get a Build variants section. Each variant is a named set of values that the document reads with sys.inputs, such as a draft and a camera-ready build. Use Add variant, give it a name, then add each value with Add value. Pick the variant to build from Variant (this project) in the compile menu.

Values go into the YAML front matter that Pandoc reads when it builds the PDF: documentclass, papersize, classoption for columns, geometry for margins, mainfont, fontsize, lang, linestretch, and numbersections. Document class offers article, report, book, scrartcl, scrreprt, and memoir. Language takes a tag such as en-US.

If the file has no front matter yet, the dialog says so, and Apply adds a block at the top. Front matter without a closing --- line has to be fixed by hand first.

Some values belong to something else, and the dialog shows them greyed out with the reason underneath:

  • Set by the … class: classes such as acmart, IEEEtran, llncs, and beamer fix their own margins, and some also fix the page size, font size, columns, line spacing, or language. A note at the top of the dialog names the class.
  • Set by the … style: conference style packages such as those for NeurIPS, ICML, ICLR, CVPR, and ACL set the page size and margins. A note at the top of the dialog says which style is in charge.
  • The source sets each margin separately: the document gives left, right, top, and bottom margins on their own instead of one margin value.
  • Set inside a conditional block: the value sits inside \if… code, so changing it here could break the logic.
  • Set by the template: in Typst, the #set rule holding the value has an if condition or passes .. arguments, the way template code often does, so the dialog leaves it alone.
  • Set by an expression in the source: the value is computed, not written out, so edit the source instead.

When a Typst document applies a template, a note at the top says that values set inside the template aren’t shown, and that a value you set here overrides the template. In LaTeX, a similar note appears when part of the preamble lives in other files.

Image preview

AI answers couldn’t load

Try again, or search the documentation.