[Doxygen-develop] [PATCH] Improved ALIASES definitions
Brought to you by:
dimitri
From: Markus G. <mg...@we...> - 2013-10-02 10:51:17
|
Hi, please find two patches attached regarding the definition of ALIASES. The first one simply fixes a typo in an error message. The second patch implements escaping of commands using the \-syntax in the value part of ALIASES. Rationale: So far, there was no way to disambiguate a forced newline (via '\n') from a command using the \-syntax starting with 'n'. While special handling was implemented for some internal commands, self-defined commands or LaTeX commands inside a \latexonly environment were not recognized. For example, it was impossible to properly define a command inserting a newline followed by a page break only for the LaTeX output, as the '\newpage' in newpage="\latexonly\n\newpage\endlatexonly" was recognized as '\n' followed by the text 'ewpage'. Proposed solution: The attached patch implements C-style escaping for the value part of ALIASES. That is, '\n' inserts a newline, '\"' a quote character, '\\' a backslash, and '\<num>' expands the corresponding argment. The aforementioned command can therefore now be defined as either newpage="\\latexonly\n\\newpage\\endlatexonly" or newpage"@latexonly\n\\newpage@endlatexonly" While this solution is admittedly not backwards-compatible, it is IMO preferable over only escaping '\n's as it provides a consistent escaping scheme that is easy to remember. Cheers, Markus |