Commits

Albert Graef committed 3f84ba9

Fixes for gawk 4.1 compatibility.

  • Participants
  • Parent commits 814a132

Comments (0)

Files changed (1)

sphinx/html2ltx.awk

 mode==2 && /\\item/ { next; }
 mode==2 && /\\end{itemize}/ { mode = 3; print ""; next; }
 mode==2 {
-    gsub(/\\textbar{}/, " |");
+    gsub(/\\textbar\{\}/, " |");
     gsub(/»/, "");
     $0 = gensub(/\\href{([^:/]+)[.]html((#[^}]*)?)}{([^}]*)}/, "\\\\href{\\1.tm\\2}{\\4}", "g");
     print $0;
 # All other content.
 {
     # Some special TeX commands and characters causing trouble with TeXmacs.
-    gsub(/\\textbar{}/, "|");
-    gsub(/\\textless{}/, "<");
-    gsub(/\\textgreater{}/, ">");
+    gsub(/\\textbar\{\}/, "|");
+    gsub(/\\textless\{\}/, "<");
+    gsub(/\\textgreater\{\}/, ">");
     gsub(/«/, "<<");
     gsub(/»/, ">>");
     gsub(/≡/, "==");
 	    $0 = gensub(/^\\subsection{(.*)}$/, "\\\\subsection*{\\1\\\\label{\\1}}", "g");
 	else if (/^\\textbf{[a-z]}$/)
 	    $0 = gensub(/^\\textbf{(.*)}$/, "\\\\subsection*{\\1\\\\label{cap-\\1}}", "g");
-	else if (/^~$/ || /^\\emph{}$/ || /^\\includegraphics.*{.*}$/)
+	else if (/^~$/ || /^\\emph\{\}$/ || /^\\includegraphics.*{.*}$/)
 	    $0 = "";
 	else if (/^~~~/)
 	    gsub(/^~~~/, "\\ \\ \\ ");