I'm writing a term paper using LaTeX that includes a number of figures created using external tools. These figures are available in both bitmap and vector formats. Ideally I'd like to use the vector versions, of course, but these are fairly chunky (up to 40 MiB apiece), and if I include these rather than the bitmap versions, the resulting PDF for the paper is well in excess of 100 MiB.
This isn't a problem per se. However, I have to submit the paper in both paper and electronic form (by email), and emailing such a large file could be an issue. I've therefore wondered if there is an easy (!) way of producing two versions of the paper, one for printing (using vector graphics) and one for emailing (a ,,web version´´, using bitmap graphics) from the same TeX file. The TeX file is already suitably prepared, I merely need to ,,flip a switch´´ to produce either version, but I cannot produce both at the same time, with different names.
I'd like to avoid using makefiles etc.; my workflow's based on TeXstudio on Windows, so something that's pure TeX (well, LaTeX is fine) would be best. I've looked at \input and \include, but I'm wondering if there's any tricks or Best Current Practices where ideally, I only need to run xelatex termpaper.tex or so and get both termpaper-web.pdf and termpaper-print.pdf.
I do apologize for the relatively open-ended question. Thanks in advance!
\newcommand{\printversion}[2][]{\includegraphics[#1]{#2\printext}}so that one can use the key-val. Also make sure your lines are properly terminated with%(the downvote wasn't mine though). – Phelype Oleinik Sep 25 '19 at 17:39[]needed in the command? – Bob Sep 25 '19 at 17:43[]part of of the\printversion[options]{filename_without_extention}. That is a very cool idea. – Bob Sep 25 '19 at 17:46[...]-delimited argument to\(re)newcommandthen the command will have an optional argument and what's inside that[...]will be the default value of the optional argument. See here. – Phelype Oleinik Sep 25 '19 at 17:50width=whateverfor every single figure that you include. – Teepeemm Sep 25 '19 at 18:17