11

We've got some tags with command names like newcommand, input, noindent, newline and more. Do we need a preceding backslash in those tags?

  • Commands always begin with \ and are a common subject for questions, at least where a concept tag doesn't fit well.

  • We could distinguish commands from environments, concepts and packages. centering is a concept, \centering not. \cite means a command but not the cite package, the same applies to the newcommand package and \newcommand.

How?

  • The backslash might be a problem in URLs, but that could be solved somehow. If necessary, the site could use a tilde ~ instead of \ or do something else.

  • Or the backslash could just be shown on the tag like those small icons on other tags of other SO sites (like the icon on the [android] tag). Everything is without backslash like entering and URL, but the image of a command tag has the \ on it.

    A technical discussion might come later if we desire it.

It would look strange if I omit the \ in writing. Telling that newpage breaks a page and newline does it for the line, while linebreak and pagebreak behave in a slight different way.

Writing a command in a tag the way we do in LaTeX makes it clearer and avoids confusion. A book index would do the same.

  • At the moment it’s not possible to create tags with slashes. – Caramdir Aug 21 '10 at 21:44
  • 1
    If slash is not an option, we can use a [foo-command] tag where ambiguousness will arise. IMHO there's no reason not to be consistent in tagging, be it for classes, commands, environments, packages, or anything. – Martin Tapankov Aug 21 '10 at 22:52
  • 3
    [foo-cmd] might be sufficient, like foo-pkg on CTAN (epstopdf-pkg, etex-pkg). – Stefan Kottwitz Aug 22 '10 at 1:03
  • While I’m all for consistent tagging, I think we shouldn’t overdo it. Tags need to be easily discoverable for new users searching the site. – Caramdir Aug 22 '10 at 9:57
  • Right, let's not complicate it. I'm looking for such and other opinions, now that it's still early. But there's no hurry. – Stefan Kottwitz Aug 22 '10 at 11:19
  • I like the idea. I think, probably, we could make "newline" a synonym for "\newline" (technical discussion later), which is more concise than "newline-cmd" and to the point. Also people can simply type "newline" and magically get the slash before. I'm not sure, however, if this would cause problems with command names that clash with general topics or whatever. And we will also probably need a "tag police" to turn newly created tag commands into \commands. – Juan A. Navarro Aug 25 '10 at 15:32
4

One problem if we decide for [foo-cmd] instead of [\foo] might be searchability:

A new user might be tempted to search for \foo and tag seach is actually much more specific than normal search, so a search for [\foo] should imperatively find the relevant tag.

I think it’s quite important to distinguish this from a search for [foo]: the search of the OS X PDF viewer “Preview.app” does this, i.e. a search for “\foo” invariably resolves to “foo” and renders the search results completely useless.

  • That is incorrect. In Preview, searching for \foo only finds \foo, not foo (well, it'll find \foobar as well). – TH. Sep 13 '10 at 3:06
  • 1
    @TH. definitely not in the current version of Preview (5.0.2): the backslash in the search query is completely ignored. So a search for “\foo” effectively is a search for “foo”. A search for “\if” will find “specific” and “identification” (I just checked this to be absolutely sure). – Konrad Rudolph Sep 14 '10 at 9:00
  • I, of course, checked before I posted as well. Unfortunately, I checked with the Preview used on Leopard (4.2). I just checked Snow Leopard and you're right. I think I'll file a bug report about it. Fortunately, searching for "\foo" really does include the backslash. Awesome, bugreport.apple.com is down. – TH. Sep 16 '10 at 9:46
  • @TH.: don’t bother. I get the impression that Apple flushes bug reports down the drain without ever looking at them. Never hat such a frustrating experience anywhere else. Microsoft will at least look at reports (thoroughly!) before replying “won’t fix”. With Apple, apparently not even that. – Konrad Rudolph Sep 19 '10 at 9:43
  • Well, you tend to get "behaves correctly" from Apple if they're not going to fix it. I have some bugs open that have been open for 5 years. On the off-chance there's an Apple engineer reading this comment and wants to play along at home, here you go rdar://problem/8450803. – TH. Sep 19 '10 at 23:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .