2

How about really inserting a picture at the beginning of every paragraph but just change its contents with the macros like \RedBox, \GreenCircle and so on? \documentclass{article} \usepackage{tikz} \usepackage{lipsum} \begin{filecontents}{figure1.tex} % Some random definitions which may or may not contain whitespace or newlines \def\MyHelperMacro{foo} ...


1

The following example updates \mychapter by doing the following: Store the second argument #2 in a command called \chaptoc. Use regexpatch's \xpatchcmd* to replace all occurrences of \\ with nothing (effectively removing them) Use \chaptoc as the addition to the ToC, while printing the original chapter title as part of \chapter*. \documentclass{report} \...


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