Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SUPPORT] Newbie's questions #3042

Closed
Virgus opened this issue Jun 17, 2024 · 10 comments
Closed

[SUPPORT] Newbie's questions #3042

Virgus opened this issue Jun 17, 2024 · 10 comments

Comments

@Virgus
Copy link

Virgus commented Jun 17, 2024

Hello @pbek and thanks for this great tool.
I just discovered QOwnNotes and I'm facing two very basic needs which I'm not able to find answers for.

In this issue you mentioned enabling "breaks: true" to see the effects of "two spaces and a new line" to show a markup white line.
#1062 (comment)

I'm struggling to make this work, any test I've done so far fails, for such a basic thing.
Is there something I should enable ? Where should I write the "breaks: true" setting ? In which config file ?

The second question is just an advise about what is/are the suggested external viewer/viewers under MS Windows.

Thanks and have a nice day,
V.

BTW Is there an hotkey to toggle between edit panel and preview panel ? I'm now working with the two panels open, but I would be nice to have also only the preview panel when reading files. That's why I'm asking for a suggested external viewer...

@pbek
Copy link
Owner

pbek commented Jun 17, 2024

Thank you for your kind words!

In this issue you mentioned enabling "breaks: true" to see the effects of "two spaces and a new line" to show a markup white line.
#1062 (comment)

Markdown-it isn't used for HTML generation for quite a while anymore.

But the two spaces do work...
Can you please describe what you expected, what the actual behavior was, and step by step what you did?

And can you please post the output from the debug settings that you can copy when you get into the settings dialog in QOwnNotes and head over to the Debug section of it?

The second question is just an advise about what is/are the suggested external viewer/viewers under MS Windows.

Viewer in what way? Editing Markdown files? VScode would do...

BTW Is there an hotkey to toggle between edit panel and preview panel ? I'm now working with the two panels open, but I would be nice to have also only the preview panel when reading files. That's why I'm asking for a suggested external viewer...

Usually you would create a workspace with the preview and one without it. And then use the shortcut to switch to the previous workspace. 😉

@Virgus
Copy link
Author

Virgus commented Jun 17, 2024

Thanks @pbek for your prompt reply !

Usually you would create a workspace with the preview and one without it. And then use the shortcut to switch to the previous workspace. 😉

It worked beautifully, I created three workspaces: Edit, Dual Panel and Preview and it's perfect now.
20240617_221841_Screenshot_QOwnNotes

But the two spaces do work... Can you please describe what you expected, what the actual behavior was, and step by step what you did?

I'm under Win10 and the two spaces seem not to work on my setup.
Here two screenshots of my latest test: in the first one I added
after the title section, in the second one there's a sequence of Shift+Enter followed by Enter, but nothing changes on the preview pane.
20240617_221257_Screenshot_QOwnNotes br
20240617_221319_Screenshot_QOwnNotes shift+enter

And can you please post the output from the debug settings that you can copy when you get into the settings dialog in QOwnNotes and head over to the Debug section of it?

Sure, please find them in the attached text file.
Debug info.txt

Viewer in what way? Editing Markdown files? VScode would do...

With the Workplaces toggling solution I solved, but is there a Markdown viewer only app to your knowledge ? Like a light pdf viewer, maybe a portable app, so you can visualize markdown documents "on the fly" or share your documents with others easily ?

Thanks again, talk to you soon,
V.

@Kvcd12
Copy link

Kvcd12 commented Jun 17, 2024

It appears you want to create several blank lines between the content.

I typically use <br/>. And that appears to be working in your example.

A discussion:

Create two blank lines in Markdown

https://stackoverflow.com/questions/20543454/create-two-blank-lines-in-markdown

The Preview itself gives one a good idea what it will look like. If others have a Markdown editor, they probably have a preview, so you could just send them the Markdown file. If others don't ... PDF. From the menu: Note - Export - Export note as PDF (preview).

@pbek
Copy link
Owner

pbek commented Jun 18, 2024

I'm under Win10 and the two spaces seem not to work on my setup.

Can you please post an example Markdown text, that you used? I can make them out in your screenshot.
Have you turned off highlighting of trailing spaces?

Otherwise, try this (first line has two spaces at the end!):

Line1  
Line2

Like a light pdf viewer, maybe a portable app, so you can visualize markdown documents "on the fly" or share your documents with others easily ?

I'm not using Windows that often. 😊
QOwnNotes also shows a preview on the fly, you can export them as PDF or HTML and you can share them directly via your Nextcloud instance.

@Virgus
Copy link
Author

Virgus commented Jun 20, 2024

Hello @Kvcd12 thanks for the link to the stackoverflow discussion.

Dear @pbek I just tried copy and pasting your two lines and here is the result:
20240620 QOwnNotes Line1Line2

Have you turned off highlighting of trailing spaces?

I've tried all the options I found but how should I turn highlighting on ?

In this second screenshot I added other lines and tried removing the two trailing spaces.
Is it normal that line feeds are converted to spaces unless there are two spaces before CRLF ?
I tried also to add blank lines by using the methods in the stackoverflow discussions.
20240620 QOwnNotes Line1Line9

This is the text I've been using (after Line2 I tried adding one single space)
Line1 Line2 Line3 Line4 Line5 Line6 `
Line7

$~$

Line8
Line9
`

Edit: I just tried toggling the "Use UNIX newline" option but nothing changed.

@pbek
Copy link
Owner

pbek commented Jun 20, 2024

Dear @pbek I just tried copy and pasting your two lines and here is the result:

everything looks as it should 👍️

Is it normal that line feeds are converted to spaces unless there are two spaces before CRLF ?

yes, that's how Markdown works 😊

only by using two newlines you get a new paragraph, for a newline you need two spaces and a newline

@Virgus
Copy link
Author

Virgus commented Jun 21, 2024

Thanks for you time and patience @pbek !

yes, that's how Markdown works 😊
only by using two newlines you get a new paragraph, for a newline you need two spaces and a newline

Summarizing:
Line1<CRLF>Line2 in QOwnNotes produces:
"Line1 Line2"

Line1<space><space><CRLF>Line2 produces:
"Line1
Line2"

Line1<CRLF><CRLF> Line2 produces:
"Line1

Line2"

And finally my question. If I want:
Line1<CRLF><CRLF><CRLF>Line2
putting any extra <space><space><CRLF> won't produce any changes by design ?
So if I want to avoid using html tags in my markdowns, besides the tricks shown in @Kvcd12 url , are there any other "cleaner" options to add extra space in a md document ?

Thanks again,
V.

BTW To better understand how line breaks are handled I've found this link where in 6.10 I've read:

A softbreak may be rendered in HTML either as a [line ending] or as a space

As a test, I tried the Line1<CRLF>Line2 example here in github and it's rendered as a line ending while in QOwnNotes is rendered a space. This is a bit confusing indeed.
My last questions: is this a configurable option or it's related to a choice in the markdown implementation ? Do you have an url to share with me with all the adopted specs to better understand all the potential and constraints of this new tool ?

@pbek
Copy link
Owner

pbek commented Jun 21, 2024

GitHub uses their own "flavor" of Markdown. Yes, they handle line breaks differently.

If you want to enforce multiple lines, you'd need to do something like this:

line1

&nbsp;

line2

Or use other HTML (e.g. <br). Markdown wasn't meant to do that...

@Virgus
Copy link
Author

Virgus commented Jun 22, 2024

Thanks again @pbek I'm closing the support ticket.
Have a nice weekend,
V.

@Virgus Virgus closed this as completed Jun 22, 2024
@pbek
Copy link
Owner

pbek commented Jun 22, 2024

You too!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants