2

In manual for paracol package there is example how they change background color. But there is no particular code. Is it possible to change background color for paragraph or theorem environment? And what code I can use for this. Thank you

  • See the § 7.7 pag. 25 of the documentation and an example https://tex.stackexchange.com/questions/425632/paracol-and-koma-weird-behaviour-depending-on-page-break – Sebastiano Jun 16 '21 at 14:49
  • more exactly $7.8 . I tried code bellow before send question but I did not see any result
    \usepackage{xcolor}
    \usepackage{paracol}
    \newtheorem{theorem}{Theorem}[section]
    \newtheorem{definition}[theorem]{Definition}
    \begin{document}
    
    \section{S1}
    \backgroundcolor{s(4pt,-4pt)}[rgb]{0.8,0.8,0.8}
    \begin{paracol}{1}
    \backgroundcolor{s(4pt,-4pt)}[rgb]{0.8,0.8,0.8}
    \begin{definition}
    Let $A$ be algebra.
    The norm
    on module $A$ such that
    \[\|ab\|\le\|a\|\,\|b\|\]
    is called norm on algebra $A$.
    \end{definition}
    \end{paracol}
    abc
    \end{document}
    
    – Aleks Kleyn Jun 16 '21 at 15:49
  • Yes, it works. I have to use ``` \backgroundcolor{c}[rgb]{0.8,0.8,0.8}''' First parameter is c, not s. It is not clear what is span. Probably separation between columns – Aleks Kleyn Jun 16 '21 at 16:00
  • paracol enables you tro write text in parallel columns. A "spanning text" , which is what s refers to in the context of background colors here is a text than spans both columns. – leandriis Jun 16 '21 at 17:47
  • 2
    Most people use tcolorbox for this sort of thing. – John Kormylo Jun 16 '21 at 19:06
  • I use framed or paracol because I want continue text to next page. The only problem in paracol is next. It creates footnotes as I expect. However footnotes are disconnected from footnote mark – Aleks Kleyn Jun 17 '21 at 12:54
  • @AleksKleyn: Would you mind adding a sketch/descrition of the expected output to your question? Are you aware that tcolorbox allows colored boxes than can span several pages, as well? – leandriis Jun 17 '21 at 16:56
  • @leandriis For instance ``` \documentclass{amsart} \scrollmode \usepackage{graphicx} \usepackage{footmisc} \usepackage[all]{xy} \usepackage{xr-hyper} \usepackage{color} \definecolor{UrlColor}{rgb}{.9,0,.3} \usepackage{tcolorbox} \UseRawInputEncoding \begin{document} \title{Test File}

    \begin{abstract} In this paper I consider tcolorbox. \end{abstract} \maketitle

    \begin{tcolorbox}[width=\linewidth/2] This is a \textbf{tcolorbox}.

    \end{tcolorbox}

    \end{document}```

    – Aleks Kleyn Jun 24 '21 at 11:28
  • I cannot add long code. You can copy and paste lines. Colorbox leaves first page clean and goes to second but it cannot continue to third. – Aleks Kleyn Jun 24 '21 at 11:35

0 Answers0