TransWikia.com

Get linebreaks at a long list

TeX - LaTeX Asked on November 27, 2020

How can I get linebreaks at a very long list like 1,2,3,...?

enter image description here

documentclass[a4paper]{article}
usepackage{tikz}
begin{document}
letmylist=empty
foreach k in {1,...,44}{
  ifxemptymylist{} xdefmylist{k}%
  else xdefmylist{mylist,,k}%
  fi
}

section{Overlapping}
mylist: mylist

parbox: parbox{0.8linewidth}{mylist}

minipage: begin{minipage}{5cm}  mylist  end{minipage}
end{document}

One Answer

I am sure there are better answers. I realized it is the same that moewe provided before. Please do not vote.

documentclass[a4paper]{article}
usepackage{tikz}
begin{document}
    letmylist=empty
    foreach k in {1,...,44}{
        ifxemptymylist{} xdefmylist{k,}% <<<<<
        else   
        xdefmylist{mylist, k,}% <<<<   
        fi
    }
    
    section{Overlapping}
    mylist: mylist
    
    parbox: parbox{0.5linewidth}{mylist}
    
    minipage: begin{minipage}{3cm}  mylist  end{minipage}
end{document}

output

Correct answer by Simon Dispa on November 27, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP