KScript 문서
KO

언어

영어에서 자동 번역되었습니다. 원문은 영어입니다.

문서: KScript.Document

구조

<KScript.Document template="report" title="Annual Report" author="The team" to="'report.pdf'">
  <Contents />

  <Section title="Summary" id="summary">
    <Paragraph>Visits rose every quarter.</Paragraph>

    <Section title="Details">
      <List style="number">
        <Item>First point.</Item>
        <Item>Second point.</Item>
        <List>
          <Item>A point under the second.</Item>
        </List>
      </List>
    </Section>
  </Section>

  <Section title="Appendix" numbered="false" new_page="true">
    <Quote by="John Conway">I'm not a mathematician who's interested in applications.</Quote>
    <Code language="python">print('hello')</Code>
  </Section>
</KScript.Document>
import KScript.Document

Document(template: report, title: 'Annual Report', author: 'The team', to: 'report.pdf') {
  Contents

  Section(title: 'Summary', id: 'summary') {
    Paragraph "Visits rose every quarter."

    Section(title: 'Details') {
      List(style: number) {
        Item "First point."
        Item "Second point."
        List {
          Item "A point under the second."
        }
      }
    }
  }

  Section(title: 'Appendix', numbered: false, new_page: true) {
    Quote(by: 'John Conway') "I'm not a mathematician who's interested in applications."
    Code(language: 'python') "print('hello')"
  }
}
요소 개요
Author(affiliation, email) 저자입니다. 텍스트는 이름입니다. 또는 문서에 author: "Ada Lovelace; Alan Turing"를 지정하세요.
Abstract 제목 아래의 요약입니다.
Section(title, id, numbered, new_page) 섹션입니다. 섹션 안의 섹션은 하위 섹션이며, 최대 여섯 단계까지 허용됩니다. 일곱 번째 단계는 오류입니다.
Paragraph(id, align, lines) 단락이에요.
List(style, start) 및 Item 목록: bullet, number, letter 또는 roman입니다. Item 바로 뒤에 오는 List는 그 안에 중첩됩니다.
Quote(by) 인용 블록이에요.
Code(language) 고정폭 글꼴로, 작성된 그대로 유지되는 코드예요.
Contents(title, depth) PDF 파일의 페이지 번호가 포함된 목차입니다.
Markdown(path) 텍스트나 파일에서 Markdown을 가져오기: 아래를 참고하세요.
Latex(path, value) 텍스트, latex 값, 또는 .tex 파일에서 LaTeX를 가져옵니다: 아래를 참고하세요.
PageBreak, VSpace(height), Rule 새 페이지, VSpace(height: '1cm')와 같은 간격, 그리고 페이지를 가로지르는 선입니다.