如何在多列环境中设置列的垂直长度以避免列中断

如何在多列环境中设置列的垂直长度以避免列中断

第一列分成两部分。如何避免这种情况?

\documentclass[12pt]{article}
 %Some packages I commonly use.
\usepackage[english]{babel}
\usepackage{graphicx}
\usepackage{framed}
\usepackage[normalem]{ulem}
 \usepackage{amsmath}
  \usepackage{amsthm}
  \usepackage{amssymb}
  \usepackage{amsfonts}
   \usepackage{enumerate}
  \usepackage[utf8]{inputenc}
  \usepackage[top=1 in,bottom=1in, left=1 in, right=1 in]{geometry}

\usepackage{libertine}
  \usepackage{multicol}


\begin{document}


 \begin{multicols}{3}
POSCAR\\ 
fcc (100)\\
 surface\\
 3.53\\
  .50000   .50000   .00000\\
 -.50000   .50000   .00000\\
 .00000   .00000  5.00000\\
 5\\
 Selective Dynamics\\
Kartesisch\\
   .00000   .00000   .00000 F F F\\
  .00000   .50000   .50000 F F F\\
  .00000   .00000  1.00000 F F F\\
  .00000   .50000  1.50000 T T T\\
 .00000   .00000  2.00000 T T T\\

 INCAR
 ISTART = 0; ICHARG = 2\\
 general:\\
  SYSTEM = clean Ni(100) surface\\
  ENCUT = 270 \\
  ISMEAR = 2 ; SIGMA = 0.2\\
  ALGO = Fast\\
  EDIFF = 1E-6\\
  spin:\\
  ISPIN=2\\
  MAGMOM = 5*1\\
dynamic:
NSW = 100\\
 POTIM = 0.8
 IBRION = 1

KPOINTS
k-points\\

0\ Monkhorst-Pack\ 9 9 1\ 0 0 0\

\end{multicols}
\end{document}

在此处输入图片描述

答案1

我猜想文本是某种配置文件显示?我在这里设置为逐字逐句,但\columnbreak在一个希望好的位置强制使用分栏符,而不是乳胶,只是在中间点中断文本。

在此处输入图片描述

\documentclass[12pt]{article}
 %Some packages I commonly use.
\usepackage[english]{babel}
\usepackage{graphicx}
\usepackage{framed}
\usepackage[normalem]{ulem}
 \usepackage{amsmath}
  \usepackage{amsthm}
  \usepackage{amssymb}
  \usepackage{amsfonts}
   \usepackage{enumerate}
  \usepackage[utf8]{inputenc}
  \usepackage[top=1 in,bottom=1in, left=1 in, right=1 in]{geometry}

\usepackage{libertine}
  \usepackage{multicol}


\begin{document}

\setlength\columnseprule{1pt}

 \begin{multicols}{2}\small

\begin{verbatim}
POSCAR 
fcc (100)
 surface
 3.53
  .50000   .50000   .00000
 -.50000   .50000   .00000
  .00000   .00000  5.00000
 5
 Selective Dynamics
Kartesisch
  .00000   .00000   .00000 F F F
  .00000   .50000   .50000 F F F
  .00000   .00000  1.00000 F F F
  .00000   .50000  1.50000 T T T
  .00000   .00000  2.00000 T T T
\end{verbatim}
\columnbreak
\begin{verbatim}
 INCAR
 ISTART = 0; ICHARG = 2
 general:
  SYSTEM = clean Ni(100) surface
  ENCUT = 270 
  ISMEAR = 2 ; SIGMA = 0.2
  ALGO = Fast
  EDIFF = 1E-6
  spin:
  ISPIN=2
  MAGMOM = 5*1
dynamic:
NSW = 100
 POTIM = 0.8
 IBRION = 1

KPOINTS
k-points

0 Monkhorst-Pack 9 9 1 0 0 0
\end{verbatim}

\end{multicols}
\end{document}

相关内容