Jupyter notebook header, without number - formatting

Before, when I wrote # Header [markdown]
jupyter would return a title with a more prominent font.
Now Jupyter returns the font prominent plus a number before it.
Before:
(hashtag) HEADER
Header (bigger)
Now:
(hashtag) HEADER
1 HEADER
Any idea how to remove 1 before the header? thanks
markdown
result

So the way I found to solve this question is to use:
https://jupyter-contrib-nbextensions.readthedocs.io/en/latest/install.html
Once installed, it's possible, in the table of contents, ToC2 settings to remove automatically number headings, hope it helps.

Related

Google Colab headers don't show prepended number in Table of Contents

In Google Colaboratory, I like to create markdown section headers with a prepended number, like so:
# 1. My Notebook
-----
## 1. My section
However, when I look at the Table of Contents pane, the number does not show up.
When I instead use a letter, such as "A", the letter does show up.
How do I fix it so that the prepended numerals (e.g. 1.) show up in the Table of Contents?
You can write it like this:
# 1. Heading
## 1.1 Sub-Heading
Using to replace the space.

Knitr Spin and Rmarkdown Fig.cap (figure caption). Producing double numbering pdf document

I am referring to this Suppress automatic figure numbering in pdf output with r markdown/knitr
which I don't think was answered fully.
Essentially, I am using knitr::spin and rmarkdown to produce word, pdf and html documents.
For word, there appears to be no numbering when one puts in
+fig.1, fig.cap = "Figure name"
You only get an output Figure name in the caption.
To solve that, I used captioner class.
figs = captioner("Figure")
That works fine for word
But I am not faced with rewriting the script for pdf document as the caption turns up as figure 1: figure 1: The name
I am using knitr::spin to actually generate the RMD document for forward outputs in word and pdf.
I am not sure I can use hooks in knitr::spin, as I have tried it as advertised but can't get it to work.
I also tried
header-includes: \usepackage{caption} \usepackage{float}
\captionsetup[table]{labelformat=empty}
\captionsetup[figure]{labelformat=empty}
as suggested somehere to surpress the prefix for pdf but I get errors from pandoc. It uses pdf2latex.
I am not sure how one would query the output format in knitr::spin to actually produce different actions for different formats which could be a solution although cumbersome.
Thank you so much for your help from a novice.

80-characters / right margin line in Sublime Text 3

You can have 80-characters / right margin line in Netbeans, Text Mate and probably many, many more other IDEs. Is it possible to have it in Sublime Text 3 as well? Any option, plugin etc.?
Yes, it is possible in Sublime Text 2, ST3, and ST4 (which you should really upgrade to if you haven't already). Select View → Ruler → 80 (there are several other options there as well). If you like to actually wrap your text at 80 columns, select View → Word Wrap Column → 80. Make sure that View → Word Wrap is selected.
To make your selections permanent (the default for all opened files or views), open Preferences → Settings and use any of the following rules in the right-side pane:
{
// set vertical rulers in specified columns.
// Use "rulers": [80] for just one ruler
// default value is []
"rulers": [80, 100, 120],
// turn on word wrap for source and text
// default value is "auto", which means off for source and on for text
"word_wrap": true,
// set word wrapping at this column
// default value is 0, meaning wrapping occurs at window width
"wrap_width": 80
}
These settings can also be used in a .sublime-project file to set defaults on a per-project basis, or in a syntax-specific .sublime-settings file if you only want them to apply to files written in a certain language (Python.sublime-settings vs. JavaScript.sublime-settings, for example). Access these settings files by opening a file with the desired syntax, then selecting Preferences → Settings—Syntax Specific.
As always, if you have multiple entries in your settings file, separate them with commas , except for after the last one. The entire content should be enclosed in curly braces { }. Basically, make sure it's valid JSON.
If you'd like a key combo to automatically set the ruler at 80 for a particular view/file, or you are interested in learning how to set the value without using the mouse, please see my answer here.
Finally, as mentioned in another answer, you really should be using a monospace font in order for your code to line up correctly. Other types of fonts have variable-width letters, which means one 80-character line may not appear to be the same length as another 80-character line with different content, and your indentations will look all messed up. Sublime has monospace fonts set by default, but you can of course choose any one you want. Personally, I really like Liberation Mono. It has glyphs to support many different languages and Unicode characters, looks good at a variety of different sizes, and (most importantly for a programming font) clearly differentiates between 0 and O (digit zero and capital letter oh) and 1 and l (digit one and lowercase letter ell), which not all monospace fonts do, unfortunately. Version 2.0 and later of the font are licensed under the open-source SIL Open Font License 1.1 (here is the FAQ).
For this to work, your font also needs to be set to monospace.
If you think about it, lines can't otherwise line up perfectly perfectly.
This answer is detailed at sublime text forum:
http://www.sublimetext.com/forum/viewtopic.php?f=3&p=42052
This answer has links for choosing an appropriate font for your OS,
and gives an answer to an edge case of fonts not lining up.
Another website that lists great monospaced free fonts for programmers.
http://hivelogic.com/articles/top-10-programming-fonts
On stackoverflow, see:
Michael Ruth's answer here:
How to make ruler always be shown in Sublime text 2?
MattDMo's answer here:
What is the default font of Sublime Text?
I have rulers set at the following:
30
50 (git commit message titles should be limited to 50 characters)
72 (git commit message details should be limited to 72 characters)
80 (Windows Command Console Window maxes out at 80 character width)
Other viewing environments that benefit from shorter lines:
github: there is no word wrap when viewing a file online
So, I try to keep .js .md and other files at 70-80 characters.
Windows Console: 80 characters.

SSI to concatenate the echoed variable and/or strip whitespace?

The code below, yields the output of "apple banana cantaloupe" (spaces) .
<!--#set var="x" value="apple banana cantaloupe" -->
<!--#echo var="x" -->
Here's my example: http://4mo.st/my-question.shtml
Looking for a way to get "applebanadacantaloupe" (no spaces). Is there any native functionality within Apache SSI to accomplish this? An equivalent of something like concat or trim? I cannot find anything in the documentation but perhaps someone out there has solved a similar problem?
Unfortunately, there isn't anything in the include module which will provide this functionality.
From the summary of the module's documentation:
The processing is controlled by specially formatted SGML comments,
referred to as elements. These elements allow conditional text, the
inclusion of other files or programs, as well as the setting and
printing of environment variables.

Alter character restriction on get_description()

Just set up simplepie and is working superb, I would like to alter what appears to be a number of characters restriction on the get_description() output, I cannot find anywhare how I can alter this anywhere using the latest version 1.3
I appear to be getting approx 240 characters of the post content for the output then a "... continue reading" link, I would like to remove this link and increase the character output to say 400.
Any ideas how I cna go about doing this?
Managed to find the issue (eventually) within Wordpress (RSS feed from blog) and installed a plug in to increase the standard excerpt length and hey presto!