TeX capacity exceeded, sorry [main memory size=5000000]
Scenario: TikZ plot A compiles. TikZ plot B compiles. But TikZ plot A and B end with this error.
Solution: Search extra_mem_ in .../texlive/<year>/texmf-dist/web2c/texmf.cnf and read carefully. Then add the preferred settings to /texlive/<year>/texmf.cnf.
Example:
extra_mem_top = 4000000 % extra high memory for chars, tokens, etc.
extra_mem_bot = 4000000 % extra low memory for boxes, glue, breakpoints, etc.Link: How to influence the position of float environments like figure and table in LaTeX?
“[…] the basic rules that govern LaTeX’s standard placement of floats”
How to include just one page of a PDF file?
pdftk A=full.pdf cat A20-22 output excerpt.pdf
A is a variable; pages 20-22 are extracted.