Numbered hierarchical headings & lists in MS Word - ms-word

I'm helping my fiancé clean up some MS Word documents with a structure something like...
<example>
1. Level 1 Heading
Paragraph text.
Paragraph text.
2. Level 1 Heading
Paragraph text.
2.1. Level 2 Heading
Paragraph text.
List item
List item
List item
2.2. Level 2 Heading
Paragraph text.
List item
List item
List item
3. Level 1 Heading
Paragraph text.
3.1. Level 2 Heading
Paragraph text.
3.1.1. Level 3 Heading
Paragraph text.
List item
List item
List item
Paragraph text.
List item
List item
List item
3.1.2. Level 3 Heading
Paragraph text.
List item
List item
List item
</example>
As I'm trying to do it, those hierarchical headings should be automatically numbered, & the numbered lists should be independent of the numbering of the headings.
I can do this easily in Apple's Pages, but am finding it impossible in Word. What happens is the numbered lists continue from the numbering of the heading above, then the heading below inherits from the last item of a list.
Advice needed.

Related

How to read Paragraph Titles and Paragraphs with Track changes like Insert and Delete in a Word Document using python-docx

I am working on a project where there is a Legal Word document in below Format and I want to extract the Paragraph titles along with the Paragraph and check if that paragraph has any track changes like Insert or Delete.
Heading
Paragraph 1 Text
Heading
Paragraph 2 Text
etc.,
I am able to extract the paragraphs individually and get the track changes from word/document.xml however the heading is also being coming as a paragraph when read with python-docx.
the Heading however is in bold text.
Is there a way to check when the paragraph 1 has any track changes, extract heading1 and assign it to a dictionary along with the paragraph text and track changes?
I tried to see if there is any particular style for headings but apparently there is nothing and the below output gave wrong results.
from docx import Document
#from docx.shared import Inches
document = Document("DOC_Example.docx")
headings = []
texts = []
for paragraph in document.paragraphs:
if paragraph.style.name == "Heading 2":
headings.append(paragraph.text)
elif paragraph.style.name == "Normal":
texts.append(paragraph.text)
for h, t in zip(headings, texts):
print(h, t)
I need to correlate and capture the Heading and Paragraph with the track changes in the same Dictionary.
I am a beginner in python and looking for some inputs.
Thanks in Advance.
Best Regards

How to start a Paragraph always in a new page?

Let say I have 3 paragraphs in one page. Now if I add few new sentences in 1st Paragraph, all 2 Paragraphs below the first, will move downwards in a continuous fashion.
However I want all these 3 paragraphs will start in a new page. Let say, first Paragraph will start in page #1, second Paragraph in page #2 and third Paragraph in page #3. Now if I add new lines in the first paragraph, the other 2 paragraphs below it will stay in the same pages respectively, until the first paragraph eventually become large enough to occupy first 2 pages. When that would happen, the second paragraph will move to page #3 and third paragraph will move to page #4 i.e. all paragraph will move in a discrete fashion such that each of them will start from a new page.
Is there any way to achieve the same in Libre-office?
Any pointer will be highly appreciated.
To make LibreOffice insert a page break before every paragraph, you can modify the paragraph style (or the paragraph properties) accordingly.
To modify your paragraphs 1-3 as described, select them, then select menu Format -> Paragraph to open the paragraph options. Select the "Text Flow" tab and under "Breaks", select "Insert", Type "Page", Position "Before".
To modify the default paragraph style accordingly, hit F11 to open the styles list, right-click on "Default style" and select "Modify". Again, a paragraph properties window will appear, but the modifications will affect every paragraph in your document, so this approach may lead to strange results.
The best way would be to define a custom paragraph style with the Page Break set as described, and assign that style to your paragraphs 1-3.
This is called a Page Break and the easiest way to insert it is CTRL+Enter.

How to remove extra line space on GitHub markdown bullets/lists?

The GitHub markdown code:
1. First item
* subitem
1. Second item
Generates a big space between the First, Second and the subitem:
How to make the subitem close to the first item, instead of exactly on the middle of them?
This is a Photoshop I did to illustrate the correct output:
Related questions:
Multi paragraph list items, OR preventing numbered list auto formatting
Markdown: Problems with numbered list paragraphs containing code element
You need to indent the sublist with at least 4 spaces:
1. First item
* subitem
2. Second item
You cannot do this going from a primary to secondary item. It is possible from a secondary to tertiary list, however. This is due to GitHub's styling of the markdown, not an inherent issue with the markdown itself.
See this document for details on what is possible regarding different layout styles.
An admittably "hacky" but still working solution:
Choose any character from here.
Copy it and paste it as bullet point:
1. First item [< two spaces for the linebreak]
◦ subitem1 [< two spaces for the linebreak]
◦ subitem2
2. Second item
Don't forget the two spaces for the linebreak.

Collapse only selected content beneath a heading in word

When I am creating a heading in a word document and adding content to it, it is collapsing all the paragraphs added after the heading. But I want only few lines of text to be collapsed and retain the remaining. How can I achieve this?
Collapsing headings always collapsed everything below the heading. There is no option in Word allowing you to only partially collapse the text.
A collapsed heading is indicated by an outlined triangle to the left of the heading text as you can see here:

how to end TODO lists in emacs org-mode

I have a list of TODO items, and I'm trying to have 2 TODO lists in the same file, but can't seem to end the first one.
FIRST LIST: TODAY
* TODO Item 1
Description
* TODO Item 2
Description
SECOND LIST: TOMORROW
* TODO Item 3
Description
* TODO Item 4
Description
Unfortunately, SECOND LIST: TOMORROW is now part of the description of TODO Item 2. By this, I mean that when I hit shift-tab, I no longer see the text SECOND LIST: TOMORROW because it folds under TODO Item 2. What I see is..
FIRST LIST: TODAY
* TODO Item 1
* TODO Item 2
* TODO Item 3
* TODO Item 4
While what I'd like to see is...
FIRST LIST: TODAY
* TODO Item 1
* TODO Item 2
SECOND LIST: TOMORROW
* TODO Item 3
* TODO Item 4
How can I escape out of the description mode and start a new, independent list?
EDIT/UPDATE I added spaces in between the lists in response to comments. From here, 'A list ends whenever every item has ended, which means before any line less or equally indented than items at top level. It also ends before two blank lines'---From this, I suspect there must be a way to have more than one list in a .org file. However, in my example, I notice 2 blank lines is not ending the list, but continues on as if a description.
Is this a feature of it being somehow an agenda rather than a plain list? I know that the following enumerated /does/ end the list on the other hand:
FIRST LIST: TODAY
1. Item 1
Description
2. Item 2
Description
Second LIST: Tomorrow
1. Item 3
Description
2. Item 4
Description
I really don't mean any disrespect to you emacs wizards (who amaze me) in that I keep insisting on finding a way to do this, and I understand there's a lot of power to this tool I don't understand yet. But I would like to have 2 independent non-enumerated todo lists in one .org file, so I can quickly (for me) shuffle unfinished tasks from today to tomorrow without going into depth setting dependencies and due dates.
Very simple, just make the two headers become list items themselves., like so:
* first todo list.
** first item in list.
** second item in list
* second todo list
** first item and so on...
This additionally gives you the ability to fold the lists.
You cannot do so within a single file. Org treats all content under a headline as belonging to it until you reach another headline of the same level. There is no way to end a headline short of starting a new one.
This does have a few shortcomings in that you have to use blank headlines if you want a sub-heading and then to return to the parent level without any new headline. This means the only text that does not belong to a headline is the text before the first heading, which essentially is the equivalent of an abstract.
The two solutions I can think of would be
Use a solution such as the one offered by daramarak
Use 2 separate Org files then use the Agenda as a way of keeping track of the multiple TODOs in independent lists that can still be put together to see an overview.
Plain lists start with '-' and they end at white-space lines:
First list
- Item 1
- Item 2
Second List
- Item 1
- Item 2
But TODO's can only be recognized in a headlines (starting with a *). I think this is a part of the org-mode design. You can quickly turn a list into headings by marking the lines and pressing C-c *.
A similar but more light-weight feature to TODO's, "checkboxes", can however be used in plain lists for having a list of subtask.
List a
- [X] Item 1
- [ ] Item 2
List B
- [ ] Item 1
- [ ] Item 2
C-c C-c Toggles a list item. Also lists can be nested and show the satus of their children.
- [ ] List A
- [ ] Item 1
- [ ] Item 2
- [-] List B
- [X] Item 1
- [ ] Item 2
Another possibility is using inline tasks C-c C-x t they have a specific ending
List 1
*************** TODO Item 1
*************** END
*************** TODO Item 2
*************** END
List 2
*************** TODO Item 1
*************** END
*************** TODO Item 2
*************** END
*************** TODO
*************** END
More discussion can be found here