From: TeXstudio <be...@be...> - 2012-03-27 21:04:26
|
Idea #7: Filename tokens in commands This concerns the tokens used in commands: e.g. latex -src -interaction=nonstopmode %.tex where % expands to filename. Current special chars syntax: - % and @ tokens inherited from Texmaker - ? syntax with a, m, e acronyms for absolute path, basefile and extension. - ? has the c prefix for current files - ? has four possible terminators ':', '.', ' ' and ')' - %, @@ and ?? as escape sequences for %, @, ? Personally I find this syntax hard to read and to write. I'll put two votes below. The first is just to see, if there is any need for change. The second is a possible alternative. Tags: (none) -------------------------SOLUTION:------------------------ Is there a need for changes by t_hoffmann Please vote up, if you would like to have changes to the syntax. And vote down, if you are happy with the current situation. -------------------------SOLUTION:------------------------ Extended names by t_hoffmann An alternative could be extended names: % -> [filename] @ -> [line] ?e) -> [extension] ?a) -> [path] ?m) -> [filename] Also possible: [current-filename], [current-path] (the ones above may refer to the master file). Examples: old: latex -src -interaction=nonstopmode %.tex new: latex -src -interaction=nonstopmode [filename].tex old: mpost -interaction=nonstopmode ?me) -> new: mpost -interaction=nonstopmode "[filename].[extension]" old: "AcroRd32.exe" "?am.pdf" new: "AcroRd32.exe" "[path]/[filename].pdf" The great advantage is the improved readability and consistency. Furthermore it's more explicit: Dots slashes and quotation marks have to be provided by the user. You can debate if that's a plus or a minus. On the downside it's a little more verbose, but these commands are seldomly changed. [...] Checking the tokens for typos after each change can be easily added. |