适当的字体显示文件夹路径

适当的字体显示文件夹路径

在我正在编写的文档中,我想以某种方式突出显示一个文件夹路径,以便读者可以找到其他资源来重现分析。

\documentclass{article}
\usepackage{url}
\begin{document}
The final dataset we used in our analysis, after the data munging process, 
was composed by 2498 observations and 14 variables
\footnote{Raw and processed datasets can be found in the ``/data/raw data/" and ``/data/processed data/" folders in the .zip file attached with this analysis.}.
\end{document} 

您能教我报告文件夹路径的最佳做法吗?我指的是要使用的字体/形状。

答案1

该包url(也由 加载)提供了在这里似乎有用的hyperref命令:\path

\documentclass{article}
\usepackage[obeyspaces]{url}
\begin{document}
The final dataset we used in our analysis, after the data munging process, 
was composed by 2498 observations and 14 variables
\footnote{Raw and processed datasets can be found in the \path{/data/raw data/ and /data/processed data/ folders} in the .zip file attached with this analysis.}.
\end{document}  

答案2

你可能想看看我的menukeys包裹:

\documentclass{article}

\usepackage{menukeys}
\renewmenumacro{\directory}{pathswithfolder}

\begin{document}
The final dataset we used in our analysis, after the data munging process, 
was composed by 2498 observations and 14 variables
\footnote{Raw and processed datasets can be found in the
\directory{/data/raw data/and/data/processed data/folders}
in the .zip file attached with this analysis.}.
\end{document}

菜单键目录格式

相关内容