如何制作带有分隔线和框的两列文本,文本旋转 90 度

如何制作带有分隔线和框的两列文本,文本旋转 90 度

在此处输入图片描述

我正在写一篇数学论文,想用这种设计,但我做不到,在网上查了一下,没搞清楚这是一篇双栏文章

答案1

在此处输入图片描述

这是使用标准双列而不是包装的版本multicol

\documentclass[twocolumn]{article}
\usepackage{lipsum}
\setlength\columnsep{40pt}
\usepackage{graphicx}
\def\columnseprule{0pt\relax
\makebox[0pt]{%
\rotatebox{90}{\makebox[\textheight]{\hrulefill\framebox{%
\rule[-10pt]{0pt}{20pt}%
\raisebox{-2pt}{Something}%
}\hrulefill}}\kern.4pt}}
\begin{document}
\lipsum

\end{document}

答案2

multicols下面是使用and 的示例tikz

\documentclass{article}
\usepackage{tikz}
\usepackage{microtype}
\usepackage{multicol}
\usepackage{lipsum}
\setlength{\columnsep}{4em}

\makeatletter
\def\columnseprulecolor{\vrule%
\rotatebox{90}{\makebox[\ht\mult@rightbox][c]{\begin{tikzpicture}[remember picture,overlay]\node[draw, fill=white]{Some text};
\end{tikzpicture}}}
    }%
\makeatother

\begin{document}
\begin{multicols}{2}
\lipsum
\end{multicols}
\end{document}

在此处输入图片描述

为了实现圆角,您可以添加同名选项,如下所示:

\node[draw, fill=white, rounded corners]

答案3

我可以演示如何使用纯 TeX 和 OPmac 来实现这一点。我们需要重新定义两个宏\makecolumns\balancecolumns

\input opmac

\def\makecolumns{\bgroup
   \vbadness=20000 \setbox1=\hbox{}\tmpnum=0
   \loop \ifnum\Ncols>\tmpnum
      \advance\tmpnum by1
      \setbox1=\hbox{\unhbox1 \vsplit6 to\dimen1 \ifnum\Ncols>\tmpnum\vertline\fi}
   \repeat
   \hbox{}\nobreak\vskip-\splittopskip \nointerlineskip
   \line{\unhbox1}
   \dimen0=\dimen1 \divide\dimen0 by\baselineskip \multiply\dimen0 by\Ncols
   \global\advance\mullines by-\dimen0
   \egroup
}
\def\balancecolumns{\bgroup \setbox7=\copy6 
   \ifdim\dimen0>\baselineskip \else \dimen0=\baselineskip \fi
   \vbadness=20000
   \def\tmp{%
      \setbox1=\hbox{}\tmpnum=0
      \loop \ifnum\Ncols>\tmpnum
         \advance\tmpnum by1
         \setbox1=\hbox{\unhbox1
              \ifvoid6 \hbox to\wd6{\hss}\else \vsplit6 to\dimen0 \fi
              \ifnum\Ncols>\tmpnum\vertline\fi}
      \repeat
   \ifvoid6 \else
      \advance \dimen0 by.2\baselineskip
      \setbox6=\copy7
      \expandafter \tmp \fi}\tmp
   \hbox{}\nobreak\vskip-\splittopskip \nointerlineskip
   \hbox to\hsize{\unhbox1\unskip}%
   \egroup
}
\def\vertline{\setbox0=\lastbox \dimen0=\ht0 \box0 
   \hss\vbox to\dimen0{%
      \leaders\hrule width.4pt \vss 
      \setbox0=\hbox{\something}\kern.5\wd0
      \rlap{\pdfsave\pdfrotate{90}%
          \vbox to0pt{\vss\hbox to0pt{\hss\something\hss}\vss}\pdfrestore} 
      \kern.5\wd0\leaders\hrule width.4pt \vss}%
   \hss
}
\def\something{\def\vvkern{1mm}\frame{\ SOMETHING\ }}

\colsep=3em

%%% test:

\begmulti 2
... text for two columns ...
\endmulti

\bye

相关内容