25

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 ...


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 ...


16

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


15

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 ...


14

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/...


12

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

I want to focus first on one of your questions that I consider very important: Links: should they be shown like "I followed this link" or like "I followed https://foo". It is true that links that contain the title or other descriptive text about their destination (which, from context, is what I believe karel is advocating) are generally preferred ...


11

In my opinion you have three options: If the pastebins aren't huge just embed them in the post. Ask the OP to reupload the pastebins without expiration. Reupload the pastebins yourself without expiration. In the case you mention, the pastebins aren't extremely big, so they could be embedded. Also, if you look closely, they aren't three pastebins, but ...


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).


10

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 ...


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, ...


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

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 ...


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

I agree with BeastOfCaerbannog, wholly. The system can handle large-ish pastes and will tell you when it can't. Just remember that you don't have to indent you can use ~~~ fences before and after code and that saves you 4n characters. But as a fourth point, if you know what you're looking at, you could edit in the just relevant error message or code fragment ...


7

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.


7

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 ...


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

Walls of text should be separated into paragraphs to make posts more readable. Paths should be formatted as code. Example: /path/to/file Errors should usually be formatted the same as code inside a code fence between start markdown ```none and end markdown ``` The none string at the beginning of the code fence markdown suppresses ...


5

My two cents to just those two points you raised: users may mistakenly take in code comments as part of the provided solution The syntax highlighting prevents that very well, for example: #!/bin/bash a=~/dir # fill variable a Unfortunately syntax highlighting doesn’t seem to work here on meta, but on main the comment would appear greyed out if the code ...


5

Originally you asked about "Embedded Frames", which implies HTML iframe tags. Those don't work and are disabled for a reason - you can embed almost anything inside those from external sites, and that causes a TON of security risks. In comments, you referred to this question as an example of what you're looking for. Basically, what that scrolling block of ...


5

Just an example as I have nothing to add to ByteCommander's excellent answer: The ls / command gives the following output bin dev initrd.img lib32 media proc sbin temp var boot etc initrd.img.old lib64 mnt root srv tmp vmlinuz cdrom home lib lost+found opt run sys usr vmlinuz.old on a windowed ...


5

We don't need to enforce a style policy about exactly how people should use bold and italics. It is okay for different posts to use different styles. There is no one proper way, nor probably even just a few. Trying to mold authors to one style would make it artificially hard for people to contribute to the site. Having a policy about bold or italics that ...


4

Have some image data in the clipboard and press ctrl+v while in the editor, click "Add Picture" and immediately, the image is in place. For super-fast copy-pasting a screenshot with Ubuntu, copy-paste a shot from full screen (ctrl+print) or from a bounding box (ctrl+shift+print).


4

At the Top bar of this image, there is a picture of a canvas (end of the second row of options). click on that and it will bring up another box (see bottom image). From that it should be quite simple to work out what to do. Hope this helps (N.B. Click on the box to upload an image).


4

50 rep + users: Click the img button Do you want to add from the computer or from the web? Chose here: The image will be inserted: My pronouns are He / Him


4

I was using the wrong character. I thought the directions said to use the apostrophe character ( ' ) but they said to use the backtick character ( ` ) which was a subtle difference that I wasn't catching. Now I can present console input/output in comments.


4

The problem only happens with short lines (or rather, with lines containing short enough words), where the editor wraps a paragraph, leading it to fit as many words as it can into each line. aaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbb cccccccccccccccccccccccccc Take this and block quote it: aaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbb ...


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