1

I would like to use a multicol package and create three columns with different widths, e.g. 30%, 30% and 40% of the total \textwidth.

How to do this?

Edit:

More concretely, I am also using \columnbreak and I have three distinct sections that I want to see on one page split vertically and flushed left each separately. However, I want them to have different widths, small separation and distinct division like a full vertical line.

Vladimir
  • 273
  • What is the context here? Is this for a stand-alone document consisting of only two pages? See the flowfram package; with some manual work you can make this happen... – Werner Jul 05 '15 at 16:22
  • or you could just use three parboxes, or a longtable or tabular with three columns. if text is not flowing from one column to the other then there is no requirement to have equal widths at all. – David Carlisle Jul 05 '15 at 16:23
  • It is consisted of one text with its two translations (3 columns). I need to have every line of the original text aligned with the corresponding line in the other two columns. I want to write every column separately in tex as they are in very different languages. – Vladimir Jul 05 '15 at 16:35
  • You can use flowfram, but you have to be careful not to break a paragraph (or you can manually add a \nopar as in http://tex.stackexchange.com/questions/163075/how-to-arrange-a-large-picture-on-the-side-on-the-current-page/163104?s=1|0.2046#163104). – John Kormylo Jul 05 '15 at 16:50

1 Answers1

2

That is not supported, for the same reason you can not change \textwidth mid document, the paragraphs are set first to a specified width and then split into columns, so the lines can not be re-set to a different length.


from your edit it looks like

\documentclass{article}
\usepackage{tabularx}

\begin{document}

\noindent
\begin{tabularx}{\textwidth}{
>{\hsize.3\hsize}X|
>{\hsize.3\hsize}X|
>{\hsize.4\hsize}X}
aaa

\[x=y\]
&
bbb

xx
zz

&ccc
\end{tabularx}

\end{document}

will do what you want. (tabularx package)

David Carlisle
  • 757,742
  • It makes sense. – Vladimir Jul 05 '15 at 16:15
  • I have made an edit that better explains what I would like to do. – Vladimir Jul 05 '15 at 16:20
  • @Vladimir see update – David Carlisle Jul 05 '15 at 16:26
  • This would require to write one line from the first column, then one line from the second and then from the third, before starting the second line, wouldn't it? – Vladimir Jul 05 '15 at 16:36
  • 1
    @Vladimir No! write all the first column text then & then all the second column then & then the third. X columns can take multiple paragraphs. – David Carlisle Jul 05 '15 at 16:57
  • I appreciate your help! This package is unfamiliar to me. It gives me an error: Missing number, treated as zero. > 1.19 >{\hsize.4\hsize}X} – Vladimir Jul 05 '15 at 17:20
  • 1
    @Vladimir sorry I got the syntax wrong. (even though it's my package:-) – David Carlisle Jul 05 '15 at 17:46
  • Your code works (obviously). However, what happened to the old syntax requirement that the sum of the \hsize arguments had to be equal to the sum of the X-type columns? I would have thought that 0.9, 0.9, and 1.2 had to be the \hsize arguments, but that's evidently (no more?) the case. Did you change the syntax requirement(s) at some point? – Mico Mar 04 '17 at 06:52
  • @Mico that's an interesting question! It's an old answer so I'm not sure: either I was tired and couldn't add up, or I was following the documentation on the last line of section 4.3 of the tabularx doc...... Nothing has changed in the tabularx algorithm since the 1990s – David Carlisle Mar 04 '17 at 08:34