I have a function which takes a filepath as an argument. How can I extract the basename (file.c in the example below) from the argument?
\mycommand{path/to/file.c}
...
\def\@mycommand#1{
...
\section{\basename{#1})}
...
}
|
I have a function which takes a filepath as an argument. How can I extract the basename (
|
|||
|
|
|
LaTeX includes a filepath parser (the exact syntax it parses depends on the system)
Produces this on the terminal:
|
|||
|
|