9

Diagnosis The problem is that the lines of your \tabbody are collected by the \tabline macro, which is inserted by \everypar. However, the \everypar tokens are only inserted when a paragraph starts, and \bfseries used in vertical mode doesn't cause TeX to start a paragraph (i.e., to switch to horizontal mode). So, when one of the special lines designed to ...


8

Why not simply use the align* or flalign* environments? \documentclass[a4paper]{article} \usepackage[showframe]{geometry} \usepackage{amsmath} \usepackage{lipsum} \begin{document} \lipsum[10] \begin{align*} K_P & =\frac{0.9}{\mathcal{R} t_d}=0.40 & t_I & =\frac{t_d}{0.3}=57.3 &K_P t_I & =3\mathcal{R} \end{align*} \lipsum[11]...


7

Use multicol. If your items do not divide evenly into each column, add \item[\vspace{\fill}] to the end of your list to align the items. The multicol package solution from AboAmmar works well if your enumerate items can be divided evenly into each column. However, spacing between items can become inconsistent if each column does not hold an equal number of ...


7

I have updated the longtable solution, using the class scrartcl from the KOMA-script bundle. I have also added new font, Palantino, a very nice and readable font. Title is set using KOMA-script features. Necessary babel environments are piped into the column. You have now a better paracol-solution than before, but I am still of the opinion that longtable ...


7

As requested, here’s a solution with paracol, a newer and more flexible package for parallel columns that is still being updated. This is closer to what you wanted, and will work better than my original answer if you want the columns to have different widths or spacing. As you can see, I defined some macros for convenience. It uses Unicode and modern ...


6

Updated code Here is a solution that reduces the column height on the page if it detects a column that has no stretch whatsoever. It is now a bit more tested (but still possibly wrong/fragile). In particular it now fixes the 255 box not empty remarked about in the comment. That was actually a bug on my part: I recopied box255 for trial use, but that means ...


6

Based on this perfect answer, using pullquote environment, following code maybe help: \documentclass{article} \usepackage{tikz} \usepackage{lipsum,graphicx} \usepackage[latin]{babel} \usepackage{pullquote} \usetikzlibrary{shapes,backgrounds,calc} \def\mygraphic {% \begin{tikzpicture} \node (0,0) {\includegraphics[width=4cm]{example-image-a}}; \end{...


6

I've found a solution using paracol. The basic idea is to synchronize columns with switching from leftcolumn* to rightcolumn. This code puts every next left paragraph at the bottom of every previous right paragraph. \documentclass[a6paper,pagesize,12pt]{book} \usepackage[utf8x]{inputenc} \usepackage[T1]{fontenc} \usepackage{amssymb} \usepackage{color} \...


5

The following yields the current column unexpandably. It needs at least 2 runs of LaTeX. \documentclass[]{article} \usepackage[left=2mm,right=2mm]{geometry} \usepackage[colaction]{multicol} \usepackage{etoolbox} \makeatletter \newcounter{nexprex@col@count} \newcounter{nexprex@current@column@call} \def\nexprex@patch@last {% \stepcounter{nexprex@col@...


5

Out of the box multicol supports finding out if you are at a certain point in the first, the last or one of the middle columns (assuming you have more than 2 columns). That is done using \docolaction which is described in the documentation (and needs to be explicitly enabled via an option). If you need more detail then perhaps the link suggested above ...


5

What wrapfig does is that it sets up a special parshape which should in theory get canceled after the paragraph is set. Typically this is done by setting something up activating it in \everypar and \everypar then resets itself when called. But if that call happens inside a group then at the end of the group the old \everypar gets restored and you will get ...


5

If you set \topskip and \mathdepth locally to 0pt and (e.g. with before upper*) it seems to work with the exception of the empty case. \begin{filecontents*}{empty\jobname.cpp} \end{filecontents*} \begin{filecontents*}{\jobname.cpp} 0000 0000 \end{filecontents*} \begin{filecontents*}{multi\jobname.cpp} 0000 0000 0000 0000 \end{filecontents*} % --------------...


4

multicol.sty does \newcommand\RLmulticolcolumns {\let\mc@align@columns \RL@column@boxes} \newcommand\LRmulticolcolumns {\let\mc@align@columns \LR@column@boxes} \LRmulticolcolumns so you have to reissue \LRmulticolcolumna: \documentclass{article} \usepackage{multicol} \usepackage{xpatch} \usepackage{lipsum} \usepackage{xcolor} \...


4

With he new version, one need to (re)define the environment multichoices like this \makeatletter \newenvironment{multichoices}[1][2]{% \begin{multicols}{#1}}{% \if@correctchoice \color@endgroup \endgroup \fi \end{multicols}} \makeatother MWE \documentclass{exam} \printanswers %\noprintanswers \pointsinrightmargin \bracketedpoints \usepackage{tikz} \...


4

There is no point putting your tabular environments inside \[ and \], as they are not displayed equations. Removing these commands makes the multicols behave as you want: \documentclass[12pt]{article} \usepackage{amsmath,amsthm,verbatim,amssymb,amsfonts,amscd, graphicx, multicol, xcolor} \usepackage{fancyhdr,array,tcolorbox,hyperref,faktor} \tcbuselibrary{...


4

As the line you quote says, the details are in the source file. It is distributed in LPPL with an additional clause: % \iffalse meta-comment % % % This file is part of the Standard LaTeX `Tools Bundle'. % ------------------------------------------------------- % % It may be distributed and/or modified under the % conditions of the LaTeX Project Public ...


4

Well, the issue here is that in environment multicols are floats not allowed, so you can not use environment figure to let the figure float to the next page. The only way I see to solve this is to manually (off course only done after the text is fixed and will not change any longer ...) move the code for Figure in the text to get the figure placed without ...


4

It works correctly with *File List* book.cls 2018/09/03 v1.4i Standard LaTeX document class bk10.clo 2018/09/03 v1.4i Standard LaTeX file (size option) vruler.sty multicol.sty 2018/12/27 v1.8v multicolumn formatting (FMi) where vruler is the file from 1996 or so that is in TeX Live. Result is:


3

The multicol documentation states the following in section 2.4 Floats inside a multicols environment: Within the multicols environment the usual star float commands are available but their function is somewhat different as in the twocolumn mode of standard LaTeX. Stared floats, e.g., figure*, denote page wide floats that are handled in a similar fashion ...


3

Changing the size of multicol's columns individually isn't possible without a major rewrite of its internal column balancing routines. Manually shrinking a column separator is possible with the very latest version of multicolrule (1.2), which I released earlier today and should be hitting your CTAN mirror within the next day or so. (If you're impatient, it's ...


3

You could use tabularx: \documentclass[a4paper]{article} \usepackage{multicol} \usepackage{amsmath} \usepackage{lipsum} \usepackage{tabularx} \begin{document} \lipsum[4] \noindent \begin{tabularx}{\textwidth}{XX} \begin{equation*} K_P=\frac{0.9}{\mathcal{R} t_d}=0.40 \end{equation*} % here I get the 'underfull' warning & \begin{equation*}...


3

You can use this: \documentclass{article} \usepackage{xparse} \usepackage{lipsum} \usepackage{multicol} \ExplSyntaxOn \cs_new_protected:Npn \draconis_start_multicols_env:nn #1#2 { \begin{multicols}{#1}[{#2}] } \cs_generate_variant:Nn \draconis_start_multicols_env:nn { nV } \tl_new:N \l__draconis_sectioning_command_tl \cs_new_protected:Npn \...


3

It wasn't quite as simple as I first thought, although the test of \@currenvir was probably unneeded. \documentclass{article} \usepackage{lipsum} \usepackage{multicol} \let\oldsection=\section \makeatletter \def\section{\@ifnextchar*\oldsection\newsection}% handle \section* \newcommand{\newsection}[2][\empty]{% #1=short title (optonsl), #2=title \def\...


3

Something like \documentclass[12pt,a4paper,landscape]{article} \usepackage[utf8]{inputenc} \usepackage{amsmath,bm} \usepackage{amsfonts} \usepackage{multicol} \usepackage{blindtext} \usepackage[left=0.5cm,right=0.5cm,top=0.5cm,bottom=0.5cm]{geometry} \begin{document} \begin{multicols}{3} \blindtext The following equation shows \ldots \begin{multline} \...


3

Add a single | to the relevant \multicolumn preambles: \documentclass{article} \usepackage{multirow} \usepackage{multicol} \begin{document} \begin{table}[h!] \centering \begin{tabular}{c|cc|cc|cc|cc} & \textbf{1} & \textbf{2} & \textbf{3} & \textbf{4} & \textbf{5} & \textbf{6} & \textbf{7} & \textbf{8}\\\hline ...


3

My solution is to define a new environment that takes as argument the file to include and the caption. Thus we can set the figure before starting multicols and pass the needed space to \premulticols. \documentclass[fontsize=9pt, paper=a5]{scrreprt}% \usepackage{multicol} \usepackage{graphicx} \usepackage{caption} \usepackage{showframe,lipsum}% for the ...


2

Adding \par at the beginning of \step and at the end of the environment is recommended and cures the problems. The \strut is a safety measure for ensuring better spacing if the step is followed by something very high like after step 4 (thanks to Barbara Beeton for it). \documentclass[]{scrbook} \usepackage{multicol} \usepackage{lettrine} \newcounter{...


2

I had the same issue with a document of mine and what fixed the problem for me was this answer from egreg, so I included the code here too. \RenewDocumentEnvironment{multicols}{mO{}} {% \ifnum#1=1 #2% \else % More than 1 column \multicolmulticols{#1}[#2] \fi } {% \ifnum#1=1 \else % More than 1 column \endmulticolmulticols \fi } ...


2

multicol doesn't support floats but if you don't mind a bit of hand adjustment it's possible to get most arrangements. If you are working on one book for several weeks such hand adjustments are quite feasible, if automatically typesetting thousands of documents an hour from some catalogue database, less so. Basically let TeX decide where the natural column ...


Only top voted, non community-wiki answers of a minimum length are eligible