latex-lineno / lineno

lineno – Line numbers on paragraphs
Other
11 stars 2 forks source link

Add LaTeX class option `twocolumn` support for `bframe` env #8

Closed muzimuzhi closed 1 year ago

muzimuzhi commented 1 year ago

It seems when twocolumn support was added more than 20 years ago, bframe was left out https://github.com/latex-lineno/lineno/blob/b1c9f403b0febfc27a82e3036a57460a77058b9d/lineno.sty#L283

The existing twocolumn support can be found by searching for \columnwidth and \if@twocolumn in lineno.sty.

\documentclass[twocolumn]{article}
\usepackage{lineno}

\setlength{\columnsep}{50pt}
\linenumbers

\begin{document}
\def\test{
  foo\par
  bar\par
  baz

  \begin{center}\internallinenumbers
    foo\par
    bar\par
    baz
  \end{center}

  \begin{bframe}
    foo\par
    bar\par
    baz
  \end{bframe}
  \bigskip
}

\leftlinenumbers  \test
\rightlinenumbers \test
\newpage

\leftlinenumbers  \test
\rightlinenumbers \test
\end{document}
Before After
image image
kwwette commented 1 year ago

Thanks @muzimuzhi, I'll merge this.

muzimuzhi commented 1 year ago

Thank you too for handling the changelog-thing (in https://github.com/latex-lineno/lineno/commit/c23b32a723c418b269d0124a35b1522ef6faec6f) which I forgot to do.