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

  • I have some doubts that multicol is the right environment for whatever you are trying to achieve. – Ulrike Fischer Jun 20 '19 at 15:09
  • which one should I use? – Andrea Angeletti Jun 20 '19 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???? – David Carlisle Jun 20 '19 at 18:25
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}
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.