12

I was looking for an answer to this question which is, by the way, unanswered :(

After searching this site, I read many questions similar to this one, and I found out that all of the answers suggested the use of widetext package.

But after looking in the code of widetext package, I found that it basically uses the strip environment from cuted package.

Am I missing something? Apart from those rules (which I don't understand/like) what is the advantage of using widetext package rather than cuted package?

Here are two examples where the code looks similar (the widetext package just paints those rules, adds a \par and adds \parindent \@parindent, two indents?).

\documentclass[twocolumn]{scrartcl}

\usepackage{kantlipsum,widetext}

\begin{document}
\kant[1-2]
\begin{widetext}
    \kant[4]
\end{widetext}
\kant[5]
\end{document}

And the other one

\documentclass[twocolumn]{scrartcl}

\usepackage{kantlipsum,cuted}

\begin{document}
\kant[1-2]
\begin{strip}
    \kant[4]
\end{strip}
\kant[5]
\end{document}

Here you can download the package widetext.

Manuel
  • 27,118
  • 3
    Hi! Thanks for your interested in my question. You should know that cuted (and therefore widetext as well) has the problem of corrupting vertical spacing in some cases. Try to fill your page with one-line itemize items and you should see it. – yo' Jan 24 '14 at 22:10
  • @tohecz Yes. I wrote 50 lines in an enumerate (one line per item) before the strip environment and it “broke” the space between items 27 and 28. In my case this does't affect me, but thanks for telling us :) – Manuel Jan 24 '14 at 22:18

1 Answers1

11

Yes, you are right; they are basically the same; the widetext package defines its widetext environment using strip from cuted.sty, but adds the rules. In fact, the author of widetext says in the .sty file:

%% This package just defines the widetext environment and the rules.

The other difference is that widetext gives you indentation for the first line of paragraphs, but cuted doesn't; this is done by widetext, using the ineternal length \@parindent to store the value of \parindent before the environment, and then using this value inside the widetext (that's the meaning of the line \parindent \@parindent in widetext.sty).

An image comparing widetext and strip (notice, in particular, the indentation for widetext but not for strip):

\documentclass[twocolumn]{scrartcl}
\usepackage{lipsum,widetext}

\begin{document}
\lipsum[4]
\begin{strip}
\lipsum[4]
\end{strip}
\lipsum[4]
\begin{widetext}
\lipsum[4]
\end{widetext}
\lipsum[4]

\end{document}

enter image description here

In short:

Advantages of widetext: the rules and indentation for the firs line of paragraphs. I personally don't the rules much, but they are there "to guide the reader" (the idea of the rules was taken from the widetext environment defined in revtex4.cls).

Disadvantage of widetext; the author didn't take any precautions to prevent the rules to be detached from the text; so you can get the initial rule at the bottom of a page, then the text beginning on the next page.

Gonzalo Medina
  • 505,128
  • Two subquestions: (1) why the rules? Could you explain what are they meant to be? I don't understand them, and they don't look good in my opinion; and (2) why double indentation? I don't understand why he copies \parindent and then uses both \parindent \@parindent, resulting in a double sized indent. I guess that's all, I missed that line of the code: %% This package just defines the widetext environment and the rules. – Manuel Jan 24 '14 at 21:44
  • @Manuel I also don't like the rules; according to the author, they are there to guide the reader: a quote from an answer in the link to latex-community mentioned by the author: "Since the flow of text goes from the first column to the second, comes backs to the first one and finally continues on the second, two horizontal rules are placed to guide the reader. " – Gonzalo Medina Jan 24 '14 at 21:50
  • @Manuel As I explained in my answer, there's no double indentation. The line \parindent \@parindent simply assigns to \parindent the value \@parindent (which is the paragraph indentation before the environment); in this way, the default document indentation is inherited by the environment. – Gonzalo Medina Jan 24 '14 at 21:51
  • 1
    Well, there is a double indentation (in your image, for example). If my eyes don't lie to me. – Manuel Jan 24 '14 at 21:53
  • @Manuel Ah, now I see what you mean. But, that result was not the intention of the author; the line \parindent \@parindent was meant to be a simple assignment; however, you're right and in my image there's a bigger indentation inside the environment; that's something weird with scrartcl and the value of \parindent; changing to article, the indentation is the same. – Gonzalo Medina Jan 24 '14 at 22:02
  • The "double indentation" is a standard typographical stuff, however, in this context, a bit weird: You use smaller indentation in twocolumn mode than in one-column, since simply said the column is too narrow for full indentation. However, in this case it would be prefered to have the same indent in both environments. – yo' Jan 24 '14 at 22:07
  • @tochez; Ah, so the KOMA classes use a value for the indentation in one column mode approximately equal to twice the indentation in two column mode? – Gonzalo Medina Jan 24 '14 at 22:09
  • @GonzaloMedina: No, it’s visually the same. – Speravir Jan 24 '14 at 22:44
  • @Speravir then I guess I am not understanding tochez's comment... – Gonzalo Medina Jan 24 '14 at 23:02
  • If you mix onecolumn and twocolumn mode, you have two options: be somehow correct and use larger indent in onecolumn than in twocolumn, or to be somehow consistent and use the small indent in both. I just checked how I do it in the journal, and I use a larger indent in onecolumn than in twocolumn, but I never mix them up so close to each other: either the whole article is onecolumn, or it's only the abstract at the very beginning in onecolumn and the rest is twocolumn. – yo' Jan 24 '14 at 23:06
  • @GonzaloMedina: It was a general remark not related to KOMA-Script. You've read his comment in between I'm sure. – Speravir Jan 24 '14 at 23:13