# Tag Info

3

The two packages I know of that can do that are the subfiles package and the standalone package. My favorite is subfiles, but each file uses the main preamble, so if you want individual preambles for each, you probably want standalone. I will describe both. The standalone package With this package, each and every file in the project must be able to work ...

2

If you use xelatex or lualatex you just need to specify a monospace font that has the characters you need. I used Consolas here but there are many to choose from. DejaVu Sans Mono also has all the characters shown and may be easier to find available on on Windows machines. \documentclass{article} \usepackage{fontspec} \setmonofont{Consolas} % \setmonofont{...

1

If you structure your document chapter-wise, then use \include and \includeonly. You will compile always main.tex, but can control via \includeonly, which chapters are actually typeset. In this solution, there is only one preamble (in main.tex) which is used for all runs. % main.tex \documentclass{article} \includeonly{chapter1,chapter4} % ... preamble with ...

1


1

As a workaround, you can use \inputminted with NewEnviron. For example: \RequirePackage{environ} \NewEnviron{hidden}[0][]{\if@hidden\else\BODY\fi} ... \begin{hidden} \inputminted{c}{solution.c} \end{hidden}

Only top voted, non community-wiki answers of a minimum length are eligible