5

Question Why is there too much white space over my tikzpicture references an image that's already in Imgur using the <img> HTML mechanism. I attempted to display the image via the icon mechanism (from the toolbar), but the output showed the input code rather than the image. (The input code is correct syntactically, when checked against other successful attempts.)

The only reason I can think that this might have happened is the presence of the same URL in the <img> HTML code. I didn't try to remove that. (I deleted the attempt; it can be seen in the edit history.) I left a comment explaining what happened.

Why isn't this doing what I expected? I certainly have enough rep to enter an image and have it appear if it exists.

1 Answer 1

4

Here are some of the issues with the markdown provided in the linked question:

  • The use of the HTML <img> tag is incorrect. The correct usage would be

    <img src="https://i.stack.imgur.com/hEcmY.png">
    

    not

    <img>https://i.stack.imgur.com/hEcmY.png<img>
    

    nor

    <img>https://i.stack.imgur.com/hEcmY.png</img>
    
  • Markdown for code blocks used to be an indent of 4 spaces. However, this has been updated to allow for a triple backtick that would initiate the code block, and a closing triple backtick to finish the code block. Based on the examples in the markdown/editing help, these triple backtick sequences need to be on their own line. Sure, in some cases they can be mixed in with the code, but proper identification of the code block (and just because you're showing that your coding style is nicely structured) requires the opening/closing triple backtick sequence to be on their own lines. So, the correct usage would be

    ```
    <your code here>
    ```
    

    not

    ```<your code here>
    <some more code>```
    

    nor

    ```
    <some code>```
    

The main issue with the post during your revision was the last triple backtick on the same line of code, which caused issues with the markdown image notation [![description][1]][1]. When the post was post was updated to use the regular 4-space indentation as code block markdown, the backticks were removed the problem didn't show anymore.

I've updated the code in that question to reflect the correct use of markdown (by removing the <img> tagging; SE only supports a subset of HTML tags anyway).

Here's a mockup situation similar to the original question:

enter image description here

1
  • 1
    Thanks for the explanation. So basically, if there is any "nonstandard" markdown code, all should be corrected to make sure that everything else works. Next time I come across something like this, I shall have to remember that. (I've had problems in the past with getting images to work properly, and have a question here in meta on that topic. It's from years ago. I keep learning.) Feb 1 at 1:36

You must log in to answer this question.

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