Markdown or Code Block?

acss21acss's Avatar

acss21acss

28 Feb, 2016 01:19 AM

I am learning programming, and always create note with some code, but it is not easy to format them. I see someone suggest markdown in 2012. Four years past, and new Studies comes, will there be any markdown support in the future? Thanks.

  1. Support Staff 1 Posted by drewmccormack on 28 Feb, 2016 04:10 PM

    drewmccormack's Avatar

    We don't have Markdown, but we have styled text. You can format your code in a monospaced font.

    You can also mark up your code in an app like Xcode, and screenshot it directly in Studies, or copy and paste with formatting into Studies.

    Kind regards,
    Drew

  2. drewmccormack closed this discussion on 28 Feb, 2016 04:10 PM.

  3. acss21acss re-opened this discussion on 06 Mar, 2016 01:41 AM

  4. 2 Posted by acss21acss on 06 Mar, 2016 01:41 AM

    acss21acss's Avatar

    Hi Drew,

    I follow your advice and use Quiver to store and format the code for me. But the paste style in Studies is wired.

    There are Code Cell and Markdown Cell in Quiver. The code in Code Cell will become default font when pasting. For the code in Markdown Cell, although it will become monospaced (Courier), it is not the same as preview in Quiver (Consolas, maybe). But I also tried to paste in Evernote and Mail.app, both are same style as preview in Quiver.

    This is the trail version for Quiver, hope can help you reproduce the problem. It will be great if I can just edit note in Quiver and paste it into Studies seamlessly!

    Thanks,
    Yuji

  5. Support Staff 3 Posted by drewmccormack on 06 Mar, 2016 12:10 PM

    drewmccormack's Avatar

    Hi Yuji,

    I tested this with Xcode. Indeed, I see the colors are maintained, but the font is lost and changes to the default.

    I will look at fixing this for the next release. In the meantime, what you could do is setup a template with a fixed width font like courier:

    1. Create a new note.
    2. Set the text defaults for each facet to use Courier. (Button bottom-right on each facet)
    3. Create a template with that note (button bottom toolbar in edit mode), and use that template for your stacks.

    Pasting into these notes should now make the text courier.

    Note that you can have a different font for each facet, so could have the question be in normal text, and the answer be code in courier.

    In any case, I plan to investigate. Thanks for reporting this.

    Kind regards,
    Drew

  6. drewmccormack closed this discussion on 06 Mar, 2016 12:10 PM.

  7. acss21acss re-opened this discussion on 06 Mar, 2016 09:50 PM

  8. 4 Posted by acss21acss on 06 Mar, 2016 09:50 PM

    acss21acss's Avatar

    Hi Drew,

    Thanks for support and advice! Hope it can be fixed.

    It seems the editor does not support background of font. User can not add this format style in editor, also the highlight (yellow background) and inline code will disappear when pasting. Will you add the support for font background?

    Best,
    Yuji

  9. 5 Posted by acss21acss on 07 Mar, 2016 02:44 AM

    acss21acss's Avatar

    Hi Drew,

    I build a template with different background color and font, then apply it to an existing stack. But only the first facet was formatted, the rest facets does not change. All the facets are Simple Note. Is this a bug?

    Best,
    Yuji

  10. Support Staff 6 Posted by drewmccormack on 07 Mar, 2016 07:22 AM

    drewmccormack's Avatar

    Hi Yuji,
    The template only includes as many facets as are in the note you make it from. So make a note with as many facets as you need, with the background and font for each facet set. Then save it as a template and apply it.
    Kind regards,
    Drew

  11. 7 Posted by acss21acss on 18 Mar, 2016 02:27 PM

    acss21acss's Avatar

    Hi Drew,

    Thanks for this update! I can paste with any style now. Here are another problem about Color Shift.

    I used Solarized Light as my note's background, but I found the color #fdf6e3 - RGB(253, 246, 227) in Studies is different with other apps or websites. So when I paste some content with "same" background, it looks different, see my attachment. I use color picker to check and find that the color in Studies actually is RGB(252, 244, 220). You can reproduce this by pasting some text from Solarized website.

    Thanks,
    Yuji

  12. Support Staff 8 Posted by drewmccormack on 18 Mar, 2016 03:32 PM

    drewmccormack's Avatar

    Hi Yuji,
    Don’t know what we can really do about this. You are better not to put the background on the text itself.
    Each system has a different color space, so the RGB values you give will be different in different color spaces. Very difficult to do anything about that. It’s a messy business. We are using Apple’s Safari backend, which may differ from other systems and apps.
    Drew

  13. Support Staff 9 Posted by drewmccormack on 18 Mar, 2016 03:34 PM

    drewmccormack's Avatar

    Another thing we can do is add texture or a gradient to the background of the slide, so you should not rely on it being exactly the selected color. Better to make the background of your text be clear.

    Drew

  14. 10 Posted by acss21acss on 18 Mar, 2016 07:10 PM

    acss21acss's Avatar

    Hi Drew,

    Thanks for quick reply. I understand this may beyond your control. I tested in some of editors (Sublime, Xcode...), when I set the color to #fdf6e3, they appear same value on DigitalColorMeter, the same as the website of Solarized in Safari. But there are big difference in Studies, especially Blue value.

    I did some search about color, there indeed are many color spaces as you said. I noticed most of display use sRGB, so I think maybe you can check the color system in your app and do some test. This is just my suggestion.

    A new subtle issue I found is the font-weight in Studies' editor is slightly lighter than normal. I did a screenshot under Zoom, compare with the same font-size of Helvetica in Mail.app. This is more obvious when I use the SF UI Text, which I download from web.
    The slideshow is good, and based on the picture I guess it is the problem with subpixel rendering.

  15. drewmccormack closed this discussion on 19 Mar, 2016 08:16 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac