两列

两列

由于网格排版选项,我正在考虑至少出于某些目的转向 ConTeXt。但是,我没有找到一个最小工作示例来展示如何使用脚注、列表、引用环境、标题等(许多文本中都需要的最基本元素)。如何实现以下操作?

\documentclass[DIV=21,twocolumn]{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}
\usepackage{lipsum}
\usepackage{microtype}
\pdfprotrudechars=2
\pdfadjustspacing=2
\usepackage[osf]{mathpazo}
\setlength{\columnsep}{20pt}
\setkomafont{disposition}{\rmfamily}
\title{Some Title Lipsum}
\author{Cicero}
\date{December 21 2016 }
\begin{document}
\maketitle


\lipsum[1-2] \begin{quote}
    Some Text in a quote environment        
\end{quote}
\section{One Section}\footnote{Some Footnote Some FootnoteSome FootnoteSome FootnoteSome FootnoteSome FootnoteSome FootnoteSome FootnoteSome Footnote }
\lipsum[1-4]
\subsection{A Subsection}
\begin{enumerate}
\item Some List \item Next Item \begin{enumerate}
    \item Next Level \item Next Item
\end{enumerate}
\end{enumerate}
 \section{A Header}
\lipsum[1-2]
\subsection{Some Text}
\end{document}

答案1

除了 Aditya 的回答之外,这里还有一个完整的例子,有点类似于您在 LaTeX 中发布的内容。

\mainlanguage[en]

\definefontfeature
  [default][default]
  [
    protrusion=quality,
    expansion=quality,
    onum=yes,
  ]

\setupbodyfont[pagella]

\setupalign[hz,hanging,tolerant]

\setuplayout[grid=yes]

\definenarrower
  [quote]
  [left=25pt,
   right=25pt]

\defineheadalternative
  [centered]
  [alternative=vertical,
   renderingsetup=headrenderings:centered]

\startsetups headrenderings:centered
    \vbox {
        \headsetupspacing
        \veryraggedcenter
        \ifconditional\headshownumber
            \headnumbercontent
            \kern\headnumberdistance
        \fi
        \begstrut
        \headtextcontent
        \endstrut
    }
\stopsetups

\setuphead[alternative=centered]

\starttexdefinition unexpanded placetitle
  \ifgridsnapping\startlinecorrection\fi
    \blank[2em,force]
    \startalignment[center]
      {\tfb\documentvariable{metadata:title}\par}
      \blank[1.5em]
      {\tfa\documentvariable{metadata:author}\par}
      \blank[1em]
      {\tfa\documentvariable{metadata:date}\par}
    \stopalignment
    \blank[1.5em,force]
  \ifgridsnapping\stoplinecorrection\fi
\stoptexdefinition

\startdocument
  [
    metadata:title={Some Title Lipsum},
    metadata:author={Cicero},
    metadata:date={December 21, 2016},
  ]

\placetitle

\startmixedcolumns[balance=yes]

  \input knuth

  \startquote
    Some Text in a quote environment
  \stopquote

  \startsection[title={One Section}]

    \input knuth\footnote{Some Footnote}

    \startsubsection[title={A Subsection}]

      \startitemize[n]
      \item Some List
      \item Next Item
        \startitemize[a]
        \item Next Level
        \item Next Item
        \stopitemize
      \stopitemize

    \stopsubsection

  \stopsection

  \startsection[title={A Header}]

    \input knuth

    \startsubsection[title={A Subsection}]

      \input knuth

    \stopsubsection

  \stopsection

\stopmixedcolumns

\stopdocument

在此处输入图片描述

答案2

两列

ConTeXt 中有多种双栏机制。最接近 LaTeX 双栏机制的是mixedcolumns。(请注意,默认columns机制不支持多栏脚注)。因此,一个基本示例是:

\starttext
\startmixedcolumns[balance=yes]
 \dorecurse{10}{\input knuth\footnote{A quote from Knuth.}}
\stopmixedcolumns
\stoptext

列表

在 ConTeXt 中,itemize环境用于LaTeX 的itemizeenumerate环境。基本示例(带列)为:

\setupitemize[2][packed][stopper=)]
\starttext
\startmixedcolumns
  \startitemize[n]
    \item Some List
    \item Next Item
      \startitemize[a]
        \item Next Level
        \item Next Item
      \stopitemize
  \stopitemize
\stopmixedcolumns
\stoptext

引用

quoteConTeXt 中与环境最接近的等价物是narrower

\setupitemize[2][packed][stopper=)]
\starttext
\startmixedcolumns
  \input knuth
  \startnarrower
    Some text in narrower environment
  \stopnarrower
  \input knuth
\stopmixedcolumns
\stoptext

标题等

尽管\section{...}\subsection{...}等在 ConTeXt 中可以工作,但建议使用\startsection[title={....}] .... \stopsection环境。

相关内容