diff options
author | Clifford Wolf <clifford@clifford.at> | 2013-05-23 09:49:37 +0200 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2013-05-23 09:49:37 +0200 |
commit | 6a38e767ba9abb68f1a066f381147fc609d496df (patch) | |
tree | 4b693b9632109a17af4f007dedafd3e91d3a3e6e /kernel | |
parent | ebb155b2d59a60115c163b3a170862c0514da305 (diff) | |
download | yosys-6a38e767ba9abb68f1a066f381147fc609d496df.tar.gz yosys-6a38e767ba9abb68f1a066f381147fc609d496df.tar.bz2 yosys-6a38e767ba9abb68f1a066f381147fc609d496df.zip |
Added labels to "help -write-tex-command-reference-manual" output
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/register.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/register.cc b/kernel/register.cc index bfd51feb1..f4e973889 100644 --- a/kernel/register.cc +++ b/kernel/register.cc @@ -389,9 +389,11 @@ struct HelpPass : public Pass { size_t begin = text.find_first_not_of("\n"), end = text.find_last_not_of("\n"); if (begin != std::string::npos && end != std::string::npos && begin < end) text = text.substr(begin, end-begin+1); + std::string cmd_unescaped = cmd; escape_tex(cmd); escape_tex(title); fprintf(f, "\\section{%s -- %s}\n", cmd.c_str(), title.c_str()); + fprintf(f, "\\label{cmd:%s}\n", cmd_unescaped.c_str()); fprintf(f, "\\begin{lstlisting}[numbers=left,frame=single]\n"); fprintf(f, "%s\n\\end{lstlisting}\n\n", text.c_str()); |