This is a post to record my templates and style guide I use for my posts, which is done in HTML. More could be added as more posts are published. Update: since 08/01/20, blogger provides a format HTML capability, so HTML formatting should be taken care of mostly. Otherwise, the rules below should apply.
- 
      For justified word wraps and smaller font, wrap each post with:
      <div style="text-align: justify; font-size: 80%"> ... <div>
- 
      For code blocks, like the one above, use these values:
      Note there shouldn't be any spaces between the tags (new line only), and both the span tag and the pre closing tag need to be unindented to prevent a new line at the end of the code block. The template for the code block above is obtained through hilite.me — language: 'Bash' and style: 'default' with no line numbers and default padding values.<div style="background: #f8f8f8; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;"> <pre style="margin: 0; line-height: 125%"> <span style="color: #888888">YOUR FIRST LINE OF CODE HERE YOUR INDENTED CODE HERE MORE INDENTED CODE ANOTHER INDENT LEVEL CODE CLOSING TAG OF FIRST INDENT CODE FINAL CLOSING TAG</span> </pre> </div>
- Use the <br> tag for line breaks, and use the <hr> for horizontal lines ('horizontal rule').
- 
      No spaces for values or words enclosed by tags unless grammatically
      required, like this (for the list item above):
      
 Note that the word 'Use' has no space beside the <li> tag, while a whitespace is used for 'the' on the left of the <span style="font-family...> tag because a whitespace separation is needed.<li>Use the <span style="font-family: monospace;"><br></span> tag for line breaks, and use the <span style="font-family: monospace;"><hr></span> for horizontal lines ('horizontal rule').</li>
- 
      Line breaks should only be added when a code block div is used. In that
      case, add a line break before and after the div:
      <li> This is how you open your home directory in the terminal: <div style="background: #f8f8f8; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;"> <pre style="margin: 0; line-height: 125%"> <span style="color: #888888">$ cd /home/</span> </pre> </div> And that's how you open your home directory. </li>
- For inline code, use the <span style="font-family:monospace;"> tag.
- Add a single line after every list item (<br>).
- 
      To attach images, use the 'Compose view' to upload the image, then go back
      to 'HTML view' to modify. The attached image should show up like the
      following:
      Add the figure and figcaption tags to add caption to the image:<div class="separator" style="clear: both; text-align: center;"> <a href="https://website-link.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;" > <img border="0" style="background-color: white;" data-original-height="793" data-original-width="800" width="500" src="https://website-link.png" /></a> </div><div class="separator" style="clear: both; text-align: center;"> <figure> <a href="https://website-link.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;" > <img border="0" style="background-color: white;" data-original-height="793" data-original-width="800" width="500" src="https://website-link.png" /></a> </div> <figcaption style="font-style: italic; font-size: 80%;"> INSERT FIGURE CAPTION HERE </figcaption> <figure>
- 
      To add a footnote, do the following. First, at the desired article
      location, append the following code:
      where XX is the ith footnote number, i.e., 1, 2, 3, and so on. Note that the value to the name attribute has no # in it. Then, at the end of your article, under a horizontal line, add the note:<a href="#fnXX" name="fnXXtop"><sup>XX</sup></a>"Again, note that there is no # in the value to the name attribute. The carriage return at the end helps the reader resume the article.<a name="fnXX>XX</a>" INSERT NOTE DESCRIPTION HERE <a href="#fnXXtop"><span style="font-size: 150%">↵</span></a> 
Comments
Post a Comment