24

You know that every code formatting uses fixed width font. But they also draw a grey box around what you wrote. The difference is now in this grey box: Backticks work like a text marker. They put only single characters/words into the grey box. This is why we can use them for inline code formatting. But as you can see, the box does not expand in width, when ...


18

I propose to look at the archetype: Although there seem to be keyboards with lower-case ctrl, I think it’s save to say that most keyboards have Ctrl with initial capital letter. I never saw a key labeled CTRL, in my opinion all-caps in general is rightly frowned upon. There are better ways to emphasize if really necessary: bold: Ctrl italic: Ctrl both ...


17

Manual pre/code allows you to stick HTML in code. This is both a positive and a negative, depending on what you want to show. If you want to embolden a line, as below: dadasdasd asdasdasd asdasdasd asdasdasd ... pre/code makes sense. If you wanted to show the <strong> tag in use, it's a problem. You have to manually escape the tags. I have ...


16

You are correct, the style guide mentions this too: Style guide for questions and answers


16

The problem is the list. When using lists, you need to multiply the indentation by the list level (see this answer's source to understand better): No list, 4 spaces indents code: this is code List item, you now need 8 spaces this is not code (4 spaces) this is code (8 spaces) Sub-list item, you now need 12 spaces: this is not code (4 spaces) this is ...


15

The pastebin that we encourage is the official Ubuntu Pastebin, paste.ubuntu.com Here's to hoping that it gets unblocked soon!


13

This is HTML that works also in the used Markup language here on StackExchange. You would write <kbd>F1</kbd> to achieve F1 (when it is surrounded by ` for code formatting, HTML is ignored). kbd is the abbreviation for keyboard. Oh, and in comments you also have no HTML support. For more information, look there: https://askubuntu.com/help/...


13

I'm sure is not <key> but <kbd> tags: ESC So no, the only issue is that you're using the wrong syntax.


11

Nope. Comments are limited to: **bold** *italics* `code` [link text](http://example.com) There are also a few shortcuts for mentioning things like edit links, etc. See the full help on comments for a better understanding.


11

Disagree. If it is supported somewhere, it should be supported everywhere. (Or nowhere but I think no one is going to convert all existing posts.) So I would rather ask for adding the support to “SE editor” (or the “SE formatting bar” if I understand the term correctly). There is a hint frame How to Format on the right side of the editing field, at least in ...


11

This is indeed an annoying problem. I think your edit removing some parts of the output which were unnecessary was fine. It was also a good idea to leave a note of what you had removed, because anything you've taken out will always be available in the revision history. I handled your edit suggestion and I actually removed those parts because I don't think ...


10

A few answers, you can take your pick from: We aren't Ubuntu Forums, we're Ask Ubuntu. The software the drives the two websites is different. We don't use BBCode, we use Markdown (see this link for formatting guides, including code). tldr For blocks of code, prepend the line with four spaces, for shorter blocks, wrap in `` (backticks).


9

There's no official right way to format text that is input to, or output from, a graphical interface. It's largely a matter of personal style, and probably no style is objectively best. Quotation marks are often good, as are italics. When quotation marks or italics are already being used, the sparing use of bold may even be considered. An author might ...


9

No, backticks should not be used for emphasis. There are various reasons for this: Consider blind users using screen reading software. Such context tags (<code>) help them know what they're reading and, if I'm not mistaken, their software will spell anything marked as code letter by letter. So foo would become "eff, ow, ow" (f,o,o). Many of us find ...


9

Click the gray circle with a question mark inside it in the upper right corner of the Ask Ubuntu markdown editor to show the link for advanced help (in red letters) which tells all the rules for formatting text in the markdown editor. When text that is formatted as a code sample by clicking on {} in the markdown editor is too long to fit inside the window, ...


8

Just put it in the bounty box There! Should we allow such advertisements about bounties, and to what extent? Where should this information be put, and how should it be indicated? So, to me, this seems already present in the system and such information should not belong in the body of the question. If you feel this field is too limited in terms of ...


8

Really nothign to do with SE and everything to do with how browsers render <code> tags. Double spaces (and tabs, etc) are munched down into single spaces. If you want a proper code block, use four spaces at the beginning of the lines. This wraps the <code> tag in a <pre> which makes the browser behave more literally: sudo apt-get remove $(...


8

When your code is inside an ordered or unordered list you will need to indent it 8 spaces to get proper code formatting. I dunno if this is documented anywhere.


8

In this case I would suggest doing nothing, because the post is readable as it is. It would look prettier if its two list items were in an actual ordered list, but the 1), 2) formatting is readable here because both the list and the items in it are short. The formatting is only "wrong" if the actual goal is to cause HTML code for an ordered list to be ...


8

You need to apply code formatting to the copy/pasted code. This can be done by first copy/pasting in the content from the logs, then selecting the copied-in text completely, and hitting the button that looks like { } to apply code formatting. This will properly make your log data look like it came from the terminal, just like I did to your question here ...


8

Both names, "grave (accent)" and "backtick" apply to the same character. "grave" is more common in the linguistic field and when it's actually combined with a letter (like "è"). "backtick" is the name commonly used in technical or programming contexts, where it is used on its own like a quotation mark instead. Just like here in the Markdown editor, where ...


7

If it's clear who the user is because they've posted something on the same page you're posting on, then you can just have their username. Probably no special formatting is necessary. Otherwise, you should simply linkify their name to their profile. Beyond the URL, no special formatting is required. (For example, nutty about natty.) This is the recommended ...


7

The following (without four spaces): ``sudo update-initramfs -v -u -k `uname -r` `` generates the desired goal: sudo update-initramfs -v -u -k `uname -r` Source: How can the backtick character ` be included in code?


7

You haven't given an example, so I'm not sure which acronyms and abbreviations you've seen that could cause problems. As Fabby pointed out, many tech-related things are better known by their acronyms than their full names, and typing out the whole thing would be both cumbersome and obfuscatory. On the other hand, when editing posts (though I wouldn't always ...


6

In comments you are limited to just test test which is generated by the code: `test test` There is no way to get the larger code bar like in your example or in the line above this in a comment. This is because the comment system doesn't work at all with line breaks, etc. which the code bars like the above need.


6

TL;DR It has never had anything to do with the text representations on the keyboard itself. It was all about a standard way to disambiguate what you literal keystrokes from what meta keys you pressed and held in addition to the literal keystroke(s) in written documentation. It still is a valid way to notate them still today . Remember when ...


5

As noted by Anwar's comment on the answer, this behavior occurs when the bash tag is used in the question, and adds the coloration to code snippets used in the answers. This is a feature. The feature is described here: Editing helps - Syntax highlighting Also take a look at this question: Changes to syntax highlighting


5

This is indeed a bug, and should be addressed. There's a workaround, though... [Wikipedia - Ubuntu (Operating System)](http://en.wikipedia.org/wiki/Ubuntu_(operating_system)) yields this: Wikipedia - Ubuntu (Operating System)


5

It's incorrect. Fix it when you see it. Also new users tend to put a dollar sign too $ do this command but our style here is no $, so usually I do them both at once.


5

https://askubuntu.com/editing-help will help you out. Use <kbd>Your Key Here</kbd> for Your Key Here. To link to the Software Center, use [package name](link).


Only top voted, non community-wiki answers of a minimum length are eligible