I have a list, myList
, of let's say 20 (different) objects
myList = Table["object", {20}]
I know would like to export every single element of myList
to its own PDF page in a 20-paged PDF document; i.e., myList[[1]]
comes on page 1, ..., myList[[20]] comes on page 20.
Is this possible in Mathematica? I have heard of the Export
function, of course, but have not seen any way of combining 20 exports in one single document.
Export["myList.txt", myList // TeXForm]
and then\input{mylist.txt}
in a minimal latex document where you can ask latex to control page breaks etc. $\endgroup$TexForm
does that. I would uselongtable.sty
or force bage breaks within latex but seeing as you know exactly where the page breaks need to beTable[Export["page" <> ToString@i <> ".txt", TeXForm@myList[[i]]], {i, Length@myList}]
will export page1.txt, ..., page20.txt. Then you can add these on your tex document using\input{page1.txt}
...\input{page20.txt}
. Writing this 20 times may be a bit cumbersome but you can actually make mathematica produce the needed codeStringJoin @@ Table["\\" <> "input{page" <> ToString@i <> ".txt}\n" <> "\\" <> "newpage", {i, Length@myList}]
$\endgroup$