Nested numbered list do not break line in Jupyter Notebook Markdown - jupyter-notebook

I'm trying to create a nested numbered list within a Jupyter Notebook Markdown cell for use as a table of contents which links to titles in the document. However the items in the list which should be nested/indented just appear on the same line when the cell has been executed.
I have tried using four spaces before the numbers I want indenting (which is what I've seen people suggesting). This didn't work so I also tried 1-3 spaces and using a tab but none seem to work. Thought it may be an issue with the numbering itself and the use of fullstops (i.e. "1." and "1.1" , and not "1.1." etc), but this doesn't fix the issue either.
The indent does work if i use an asterisk in place of 1.1, 1.2 etc., but this is not the format I want.
Markdown code example:
1. [Intro](#intro)
1.1 [Part A](#pA)
1.2 [Part B](#pB)
1.3 [Part C](#pC)
2. [Main](#main)
This code outputs:
1. Intro 1.1 Part A 1.2 Part B 1.3 Part C
2. Main
Desired output:
1. Intro
1.1 Part A
1.2 Part B
1.3 Part C
2. Main

You need to add one of the following:
two white spaces at the end of each line, or
a <br> tag at the end of each line.
for instance:
1. [Intro](#intro)<br>
1.1 [Part A](#pA)<br>
1.2 [Part B](#pB)<br>
1.3 [Part C](#pC)<br>
2. [Main](#main)<br>

Results:
To create a numbered list, enter 1. followed by a space, for example:
1. Numbered item
1. Numbered item
For simplicity, you use 1. before each entry. The list will be numbered correctly when you run the cell.)
To create a substep, press Tab before entering the numbered item, for example:
1. Numbered item
1. Substep
Source (scroll down to "Numbered lists"): https://www.ibm.com/docs/en/watson-studio-local/1.2.3?topic=notebooks-markdown-jupyter-cheatsheet

Related

Fastest way to edit multiple lines of code at the same time

What is the best way to do the same action across multiple lines of code in the RStudio source editor?
Example 1
Let's say that I copy a list from a text file and paste it into R (like the list below). Then, I want to add quotation marks around each word and add a comma to each line, so that I can make a vector.
Krista Hicks
Miriam Cummings
Ralph Lamb
Jaylene Gilbert
Jordon Sparks
Kenna Melton
Expected Output
"Krista Hicks",
"Miriam Cummings",
"Ralph Lamb",
"Jaylene Gilbert",
"Jordon Sparks",
"Kenna Melton"
Example 2
How can I add missing parentheses on multiple lines. For example, if I have an if statement, then how can I add the missing opening parentheses for names on line 1 and line 4.
if (!is.null(names pattern))) {
vec <- FALSE
replacement <- unname(pattern)
pattern[] <- names pattern)
}
Expected Output
if (!is.null(names(pattern))) {
vec <- FALSE
replacement <- unname(pattern)
pattern[] <- names(pattern)
}
*Note: These names are just from a random name generator.
RStudio has support for multiple cursors, which allows you to write and edit multiple lines at the same time.
Example 1
You can simply click Alt on Windows/Linux (or option on Mac) and drag your mouse to make your selection, or you can use Alt+Shift to create a rectangular selection from the current location of the cursor to a clicked position.
Example 2
Another multiple cursor option is for selecting all matching instances of a term. So, you can select names and press Ctrl+Alt+Shift+M. Then, you can use the arrow keys to move the cursors to delete the space and add in the parentheses.

Cross referencing in jupyter notebook

in Jupyter notebook, is it possible to cross-reference a heading number in the markup cell.
For example, I have a paragraph like " As explained in Section 1.1... "
1.1 is a heading number. If I insert another heading above heading 1.1 , then the cross-reference should automatically change to 1.2 , like what happens in MS word

Bookdown Pandoc Table suppress Numbering

I am working with BookDown for my article. I have three tables. The second table does not contain any caption or label. I am expecting that the third table should take the number 2 but instead it is taking number 3. Is there any way I can suppress number in the second table so that the number of tables continues from the 1st to 3rd table.
Unfortunately it seems the answer is no. Bookdown uses pandoc with crossref and sending the unnumbered tag does nothing to the table number.
I tried:
a b c
--- --- ---
1 2 3
4 5 6
: Caption {.unnumbered}

How do parse a text file for the line after a phrase in r?

I have a large text file with 40,000+ sections of output. Each output section is ~150 lines. I want one number from each section to put in a vector. The section I want to parse is shown as below.
Min ChiSq_Th: ith_cs ith_rk
-1 1
chisq_th chisq_th_min chisq_th_max ftmp_imv fstp_imv
0.149282D+05 0.200268D+05 0.200268D+05 0.100000D+01 0.100000D+00
I need the number below chisq_th in each sweep. I tried taking every 152nd line but not every sweep is exactly the same. I know R is not the ideal platform for this problem but it is the language I know best.

subreport loop when horizontal print order with multiple Columns

I had to deal with printing horizontal. I have created a report which a subreport. The Subreport is defined as 10 columns in a horizontal print order.
I'm having a problem printing the report correctly.
This is the design of the subreport:
This what its look like before I click print
When I click print the report come like this
But I want my report like this
Na K Cl Ca
12.0 4.0 5.0 3.0
Na K Cl
5.0 2.0 1.0
Checked a few existing answers but couldn't figure it out.

Resources