1

The first column break in two parts. How can avoid it?

\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}

enter image description here

3
  • I have some doubts that multicol is the right environment for whatever you are trying to achieve. Jun 20, 2019 at 15:09
  • which one should I use? Jun 20, 2019 at 15:23
  • the column breaking is the least of the problems, it is very hard to guess what output you want but presumably you don't want it to look like the image? For example aren't the sections like 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\\ supposed to be lined up as a 6-column table, you are just setting them as word spaced lines with no alignment at all???? Jun 20, 2019 at 18:25

1 Answer 1

2

I would guess that the text is some kind of config file display? I set here as verbatim but force a column break using \columnbreak at a hopefully good place rather than latex just break the text at the half way point.

enter image description here

\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}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .