Issues with Lists #337
-
This question is an extensions of my previous question on Secondary and Tertiary Lists. I changed the format of my ordered and unordered lists to be with four spaces instead of a tab. However, that didn't fix the problem and I have run into others. @geoffreymcgill, you may be the only one able to view the pages due to the files and pages being restricted to only individuals in the organisation. However, I will try to include images where possible. Firstly, I have created over 100 pages and I am now starting to get an issue that is fine in many other pages (of all the pages that have the formatting, only two have issues). These pages are Media and Publication Consent and Student Withdrawl. Both of these pages may be experiencing an issue with the formatting because the list is mixed-style (ordered and unordered together).
I had to convert several documents from Word (
I experienced some odd issues with inconsistent paragraph spacing between the primary ordered list (1,2,3).
Similar to maintaining the ordered structure (point three), I had issues inserting an image at the same indent of a sub-point and maintaining the same indent or structure as required. That is a lot of information. I know that Markdown is going to be different to Word and where formatting cannot be completed the same I will just have to life with or work around. However, I just want to ask and check first - because there have been many times where I was unaware of an issue or solution (such as the duplicate document 'idea'). Thank you again for all your assistance. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 2 replies
-
Hi @JoelMTaylor, I tried the source for Disburse-purchase.md in the CommonMark playground and the formatting began failing around item 10 as well. I noticed that you had an extra space in front of each list item. Once I remove that extra space char, the formatting appears to work as expected. I'll have to read through the CommonMark spec to figure out the exactly why a single digit list marker with a leading space works, but a double-digit list marker with a leading space fails. Removing those extra leading spaces should solve the formatting issues. I will do some research too. |
Beta Was this translation helpful? Give feedback.
-
I have been playing around again, trying to find a solution that appears fine. I tried to test things with the CommonMark Playground, but found that it did not display things consistently to Retype (some for better, others for worse). Item 4 was of particular annoyance to me since I am inclined to noticing and having issue with even very minor inconsistencies. I tried various solutions, but each required some use of Before I explain what I have tested, I want to mention that I have defined a few terms at the bottom of this post to ensure that nothing of this explanation is lost. Review this if you wish. If I have any of these terms incorrect, please let me know. The consistent pattern of ordered, unordered and mixed lists seems to be one with no paragraph spacing between individual items. That is, there is no gap between 1,2,3 or 1,a,b,2. Each appears close. For example: However, this could be changed by entering one extra line break in one location. By doing so, each list item has paragraph spacing. While I don't know why this happens (I haven't read through the CommonMark documentation enough), this seems to be a pleasing option and could be used as required. In my directionless testing, I can confirm this to be true for me - in the most part. There is one issue which seems to be at the root of my question above (point three). It seems to me that there is an issue with how the paragraph spacing is created when an additional line break is added at a list item (example two just above). In the code excerpt below, one would presume that the paragraph spacing would mimic that of the line breaks. However, this is not what occurs.
I consistently find that when a primary ordered list item (e.g. 1,2,3; I have not tested with unordered lists) is preceded by secondary ordered list item (e.g. a,b,c), that primary item fails to have the correct paragraph spacing. The only solution that I could hack was to have two breaks in order to force the appearance of the correct paragraph spacing (one break would not be sufficient). As you can probably guess, extra line breaks was not successful (only two breaks). If creating lists with a small amount of paragraph spacing is built in to CommonMark (according to example two), then I suppose this is an issue to be fixed. Similarly, I noticed a behaviour with alerts within a list that did the opposite - added paragraph spacing after when none was expected. When using on single break spacing (tight list like example one), an alert adds the paragraph space succeeding itself, regardless of the context (that is, indent level).
I suppose this also to be an issue. Also, one may notice that tabs are used instead of spaces for indents. I regularly switched between the two to make sure one or other was not the issue. I have not found an instance where spaces work and tabs do not. I would further add that I was not able to hack a fix for this as adding a break So, while I was able to find a hack for displaying the list with extra paragraph spacing, I preferred the more consistent (to my other pages) single spacing. This provided me another issue to solve - point four of my main post above. The obvious answer would be to have an extra line break between the primary (or secondary) item and the image. However, doing so causes the paragraph spacing issue I am also trying to avoid. The hack that I found was to insert a break
@geoffreymcgill, if you have any solutions or ideas, or you perceive any of these to be issues that you desire to fix (at any time in the future), please let me know. While it would be nice to not require any hacks in order to achieve a desired appearance, it is plain to understand that Markdown is designed for simplicity and to be light and one cannot have it both ways. If a solution is to be found to added in the future, that would be great. Otherwise, we make it work or make do. Definitions of terms:
|
Beta Was this translation helpful? Give feedback.
-
Hi @JoelMTaylor, Regarding the lists and spacing, the following thread discussing CommonMark Loose Lists vs Tight Lists should help provide some insight, see #67 Instead of adding As well, the markdown:
lineBreaks: hard Hope this helps. |
Beta Was this translation helpful? Give feedback.
Hi @JoelMTaylor,
Regarding the lists and spacing, the following thread discussing CommonMark Loose Lists vs Tight Lists should help provide some insight, see #67
Instead of adding
<br>
line breaks, in Markdown you can end a line with a\
to force a hard line break. The\
gets converted to a<br />
in the final generated HTML.As well, the
lineBreaks
config might also be something you would like to experiment with. Try the following setting in yourretype.yml
:Hope this helps.