You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I often saw presentation that uses a single text box to provide a multiline title, where the first line is the main section and the second line is the more specific section.
Either behind a option flag or using a specific layout of the title file, it would be a nice feature that if such title block are found, the first line is considered as an header of level 1 (or what the title.txt says it should be) and the second line is considered as an header of level 2 (or what the title.txt says it should be).
Output of pptx2md demo-subtitle.pptx --out demo-subtitle.md --disable-escaping
# Section Title
My content 1
My content 2
# Section Title�Sub-Title Made with « enter »
My content 1.1
My content 1.2
# Section Title�Sub-Title using « shift+enter »
My content 2.1
My content 2.2
# Section Title Sub-Title 3 on same line – Made with « tab »
My content 3.1
My content 3.2
# Section Title that is very long so that it is on two line without using « enter »
My content 4.1
My content 4.2
You will see that the output use the character � (U+000B) for both subtitle made with enter. The one with the tab doesn't show well in the render, but if you use an editor that shows tab, you will see that between Title and Sub-Title, the character used is U+0009.
Feature Behavior
I expect either behavior to be behind a enable or disable flag.
I think the algorithm could be something along the line:
If U+000B or U+0009 are encountered in what is recognized as a title block
Split text in before and after
If before match the previous title OR the previous header level title
Output after as one header level X+1, where X is the header level of before
Else
Output before as header level X
Output after as header level X+1
Without title.txt
# Section Title
My content 1
My content 2
## Sub-Title Made with « enter »
My content 1.1
My content 1.2
## Sub-Title using « shift+enter »
My content 2.1
My content 2.2
## Sub-Title 3 on same line – Made with « tab »
My content 3.1
My content 3.2
# Section Title that is very long so that it is on two line without using « enter »
My content 4.1
My content 4.2
With a title.txt
First Header
Section Title
Sub-Title Made with « enter »
Sub-Title using « shift+enter »
Sub-Title 3 on same line – Made with « tab »
Section Title that is very long so that it is on two line without using « enter »
## Section Title
My content 1
My content 2
### Sub-Title Made with « enter »
My content 1.1
My content 1.2
### Sub-Title using « shift+enter »
My content 2.1
My content 2.2
### Sub-Title 3 on same line – Made with « tab »
My content 3.1
My content 3.2
## Section Title that is very long so that it is on two line without using « enter »
My content 4.1
My content 4.2
The text was updated successfully, but these errors were encountered:
I often saw presentation that uses a single text box to provide a multiline title, where the first line is the main section and the second line is the more specific section.
Either behind a option flag or using a specific layout of the title file, it would be a nice feature that if such title block are found, the first line is considered as an header of level 1 (or what the
title.txt
says it should be) and the second line is considered as an header of level 2 (or what thetitle.txt
says it should be).See the
demo-subtitle.pptx
presentation that I made to explain it better.Actual Behavior
Output of
pptx2md demo-subtitle.pptx --out demo-subtitle.md --disable-escaping
You will see that the output use the character
�
(U+000B) for both subtitle made with enter. The one with the tab doesn't show well in the render, but if you use an editor that shows tab, you will see that betweenTitle
andSub-Title
, the character used is U+0009.Feature Behavior
I expect either behavior to be behind a enable or disable flag.
I think the algorithm could be something along the line:
U+000B
orU+0009
are encountered in what is recognized as a title blockbefore
andafter
before
match the previous title OR the previous header level titleafter
as one header levelX+1
, whereX
is the header level ofbefore
before
as header levelX
after
as header levelX+1
Without
title.txt
With a
title.txt
The text was updated successfully, but these errors were encountered: