MWE:
\documentclass{article}
\usepackage[obeyspaces]{url}
\usepackage{xcolor,letltxmacro,booktabs,longtable,tabu}
\LetLtxMacro{\oldpath}{\path}
\renewcommand{\path}[1]{\color{gray}{\oldpath{#1}}}
\begin{document}
\section{Software Requirements}\label{scn:softreq}
%
\begin{enumerate}
\item Windows 8.1 64-bit with .NET framework 3.5
\item Microsoft Visual Studio 2010 Professional with Service Pack 1
\item Download and install:
%
\begin{itemize}
\item \texttt{qt-win-opensource-4.8.4-vs2010} from \url{http://download.qt.io/archive/qt/4.8/4.8.4/qt-win-opensource-4.8.4-vs2010.exe}.
\item \texttt{qt-creator-windows-opensource-2.6.2} available in \path{C:\Code\Pre-requisite-Setup\}
\item \texttt{qt-vs-addin-1.1.11-opensource} from \url{http://download.qt.io/archive/vsaddin/qt-vs-addin-1.1.11-opensource.exe}.
\item \texttt{qt-opensource-windows-x86-msvc2013-5.6.0} from \url{http://download.qt.io/archive/qt/5.6/5.6.0/qt-opensource-windows-x86-msvc2013-5.6.0.exe}.
\end{itemize}
%
\end{enumerate}
\end{document}
If, instead of \path{C:\Code\Pre-requisite-Setup\}
I write \path{C:\Code\Pre-requisite-Setup}
, no errors are encountered. The problem is with LetLtxMacro
which I have used.
Error: file ended while scanning use of \path
The document is too long for me to go back and change each instance.
I have gone through Can I redefine a command to contain itself? and could not implement it to modify path
.
I need help to modify the useless macro and eventually find inner peace.
\path{([^{}]*)\}
to\path{\1}
– David Carlisle Jun 20 '16 at 11:20\path
. Thanks :) – abyshukla Jun 20 '16 at 11:30\}
with your redefinition the argument is not read verbatim so you get a space after each "command"\Code
,\Pre
etc. – David Carlisle Jun 20 '16 at 11:44