10

I noticed that using inline code tags (`code`) is commonly use for names of packages or software (among other uses).

But we could consider a name of a software (for example) is not code... Certain kind of uses of code is just a replacement for quotations marks...

What is the general guideline to use inline code?

  • 1
    See meta.tex.stackexchange.com/questions/2407/…: with a few exceptions package/class names are marked as code. (We don't have the serif/sanserif distinction available we'd use in for example ltxdoc files.) – Joseph Wright Dec 16 '13 at 17:01
  • 1
    Off-Topic: You can use the main Chat room for any Quick and Short Q's also. – texenthusiast Dec 16 '13 at 17:08
  • @texenthusiast It could be useful to have a topic about this question for users who ask themselves the same question. – ppr Dec 16 '13 at 17:17
  • @ppr no worries,it was just a hint or another option. Yes asking Q is very important finally. – texenthusiast Dec 16 '13 at 17:22
  • Title is missing important information. "Using code backticks for package names" would be better. – Ben Voigt Dec 16 '13 at 17:34
  • @BenVoigt My question was about when we should use (or not) code tag. It was not only about the package names case. But feel free to modify. – ppr Dec 16 '13 at 17:41
  • 2
    @ppr: As written, your question is about code tags for names of software, especially including TeX packages. If that's not what you intended to ask, edit the question. (But right now it's a very nice question with addressable scope, just without a matching title.) – Ben Voigt Dec 16 '13 at 17:42
  • @BenVoigt better ? – ppr Dec 16 '13 at 18:01
  • It matches the title better, but now it is broad and borderline unanswerable. And likely to lead to a policy that doesn't provide specific guidance for any particular case, only some overarching expression of desirability. – Ben Voigt Dec 16 '13 at 18:03
  • 1
    @BenVoigt Not really. I think now it's quite a Meta question. – percusse Dec 17 '13 at 22:33
  • @ppr: for a clear, specific title, how about “Guideline: using code backticks for names of packages/software?” (Or “…packages, software, etc.” if you want to keep the potential scope more general — though consensus seems to be that the more specific version is a better question.) – Peter LeFanu Lumsdaine Dec 19 '13 at 15:28
16

There's no formal policy since, of course, you can't force people to use it.

With many people familiar with this habit, most packages/classes are written using <code>. And, if not, they may be edited to "conform" to this.

One advantage of using an alternative <code>-markdown is that it clearly highlights when you're using a package rather than just mentioning something. For example,

I use algorithm and...

tells me that the OP is using either an algorithm environment (perhaps from algorithm2e), or the algorithm package, which provides an algorithm environment, as opposed to some algorithm they downloaded from the InterWebz...

The context here is somewhat superficial, but I hope it relays the message.

  • 1
    Backticks can get ugly, though, when lots of packages get cited. (On SU I had an answer where someone thought all the commands should be in backticks, resulting in quite jarring rendering in my browser - superuser.com/questions/93437/…) – Charles Stewart Dec 18 '13 at 10:49
8

This is a little splitting the hair for my understanding. IF we force this I'm the first one who will stop using backticks :P We shouldn't have policies on such stuff because they are aids not rules.

But at least we can embed some use into this pedantry if the backticked thing is a package name. We have the amazing tool of Martin Scharrer described here; User script for CTAN Package and TeXDoc.net buttons which when certain text is selected it converts into a CTAN or again our amazing Stefan Kottwitz and Paulo Cereda brewed TeXDoc server URLs.

For example these are all wrong uses of it.

  • 1
    I missed the fact that Martin is amazing too :) – percusse Dec 16 '13 at 21:34
  • In my mind, my question was more asking a guideline than a strict rule. If you wonder when using inline code, then, you will have the answer (for package it's ok, ...). – ppr Dec 16 '13 at 21:41
  • @ppr policy is a strong word – percusse Dec 16 '13 at 21:45
  • Yes. I'm no English native speaker which probably explain that. – ppr Dec 16 '13 at 21:57
7

Does the package name have to be typed exactly so in the preamble or you get an error? It won't work if you use a synonym, different capitalization, or hyphenate? Why then, it really IS code after all, just a very small excerpt.

  • Good point. But examples such as LaTeX is not code... – ppr Dec 16 '13 at 17:42
  • 2
    It is code just as much as any other markup language. Oh you mean the word LaTeX? No it isn't, but \LaTeX is. And so are pdflatex and texify (commands to be entered into a shell are code). – Ben Voigt Dec 16 '13 at 17:43
  • 1
    We agree, LaTeX shouldn't be codified (\latex should). But the common use is to use code for LaTeX... – ppr Dec 16 '13 at 18:03
  • 1
    The correct spelling of the command is \LaTeX. If you lose exact spelling that can be used in a document, you're no longer dealing with code, which is the main point my answer is intended to convey. Also latex should be set as code if you're talking specifically about the command that performs typesetting. – Ben Voigt Dec 16 '13 at 18:06
  • 5
    @ppr Can you point to some examples where people have used LaTeX and not LaTeX? I certainly don't think that the former is "common use". – Alan Munn Dec 17 '13 at 0:22

You must log in to answer this question.

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