I'm trying to mention below path... but I am getting an error.
Select \textbf{root directory} and select the folder
\textbf{Diagnostics_Example} from path \textit{C:\Users\harshalb\K-DCP
Projects\OTX}
Please guide me as I'm new to Latex.
I'm trying to mention below path... but I am getting an error.
Select \textbf{root directory} and select the folder
\textbf{Diagnostics_Example} from path \textit{C:\Users\harshalb\K-DCP
Projects\OTX}
Please guide me as I'm new to Latex.
I would strongly advise you to either use \verb or the url package.
The \verb command is designed for typesetting entities that include characters that are special in LaTeX and it respects spaces in its argument.
\documentclass{article}
\begin{document}
Select \verb+root directory+ and select the folder
\verb+Diagnostics_Example+ from path
\verb+C:\Users\harshalb\K-DCP Projects\OTX+.
\end{document}
As you can see the syntax is slightly non-standard, writing
\verb+...+
where + can be replaced by any character not in the argument.
The disadvantage of \verb is that it will not allow its argument to break over lines. The url package removes that restriction:
\documentclass{article}
\usepackage[obeyspaces]{url}
\begin{document}
Select \url+root directory+ and select the folder
\url+Diagnostics_Example+ from a path on your system such as this one:
\url+C:\Users\harshalb\K-DCP Projects\OTX+.
\end{document}
Note the use of the obeyspaces option to respect spaces in the arguments.
The url package allows you to change the style/font of urls too, e.g. \urlstyle{rm} will use the text font. See the package's documentation either via texdoc url on your system or at https://www.ctan.org/pkg/url?lang=en .
As @Mico mentions:
You may wish to consider adding the package options hyphens and/or spaces to allow line breaks at those characters.
The url package also provides the \path command, which is a version of \url which does not get converted to an active link if you have the hyperef package loaded.
url package also provides the macro \path, which essentially behaves like \url except that the macro's argument won't be made into a hyperlink in case the hyperref package is loaded as well. A separate comment: To allow linebreaks at hyphens and spaces, I'd also specify the options hyphens and spaces while loading the url package.
– Mico
Sep 21 '17 at 07:29
C:/Users/harshalb/K-DCP Projects/OTXis the file path you are looking for. – Johannes_B Sep 21 '17 at 06:32Diagnostics\_Exampleinstead ofDiagnostics_Examplebecause_is a special TeX char. – CarLaTeX Sep 21 '17 at 06:37thank you..let me try it agin
– Harshal Bonde Sep 21 '17 at 06:42