References and links and bears, oh my

Vince's Avatar

Vince

07 Sep, 2017 07:46 PM

(I started this as a question in the Question forum, but ran into something that caused me to put it here.)

There's a sidebar for References, but I can't find anything on how to use them. I searched for "reference" and "references" in the KB and got nothing pertinent. I'm guessing/hoping I can do something like this:

For more details, see this topic.

I want the "this topic" in that sentence to be a link to another "place" in the current document. (What can "place" be? A topic? A sub-topic? A random word?) How do I do that? (Laugh if you want, but I've never needed/wanted to do this (in anything, not just MD), and I can't find any documentation in the KB on how to do so in MMD. :)

And, the thing that made me post here — while I was looking at this, I discovered there's no "Link" menu item to turn the currently selected text into a link. What?!? Or at least I couldn't find one (and I did search the menus, including every sub-menu on the Edit and Format menus). This is a request to add it. And image, while we're at it. Actually, I don't know why the Format menu doesn't have most/all of the standard MD items (not just Bold/Italic); regardless of whether they're "easy", having them on the menu lets us assign hotkeys to them, or change the hotkey if we don't like yours. And, since the "Convert Selection" submenu on the Format menu kind of scares me — these things should be smart enough to work with or without a selection. If I just hit Link, then an empty one should be inserted. If I have text highlighted, it should use that text as the text for the link. IOW, just like Mail, Word, and most everything else out there works.

  1. Support Staff 1 Posted by Fletcher on 07 Sep, 2017 09:06 PM

    Fletcher's Avatar

    > There's a sidebar for References, but I can't find anything on how to
     > use them. I searched for "reference" and "references" in the KB and got
     > nothing pertinent.

    It's a generic term for anything defined by reference (which is in the
    MD instructions on Gruber's web site). They'll appear if you use them,
    empty if you don't.

     > I'm guessing/hoping I can do something like this:
     >
     > For more details, see /this topic/.
     >
     > I want the "this topic" in that sentence to be a link to another "place"
     > in the current document. (What can "place" be? A topic? A sub-topic? A
     > random word?) How do I do that? (Laugh if you want, but I've never
     > needed/wanted to do this (in anything, not just MD), and I can't find
     > any documentation in the KB on how to do so in MMD. :)

    What you're talking about here is not supported in MD, but is in MMD
    (called cross-references).

    This web site is for Composer, not MMD itself. So it doesn't contain
    instructions on using Markdown or MultiMarkdown. But there are tons of
    sites on all the ins and outs of Markdown (there aren't many), and the
    offical MMD site is here:

    http://fletcherpenney.net/multimarkdown/

    (needs to be updated for v6)

    v5 User's guide

    http://fletcher.github.io/MultiMarkdown-5/

    And v6 site itself is here:

    https://github.com/fletcher/MultiMarkdown-6

    (include quickstart guide to what's new in v6)

     > And, the thing that made me post here — while I was looking at this, I
     > discovered there's no "Link" menu item to turn the currently selected
     > text into a link. What?!? Or at least I couldn't find one (and I /did/
     > search the menus, including every sub-menu on the Edit and Format
     > menus). This is a request to add it. And image, while we're at it.
     > Actually, I don't know why the Format menu doesn't have most/all of the
     > standard MD items (not just Bold/Italic); regardless of whether they're
     > "easy", having them on the menu lets us assign hotkeys to them, or
     > change the hotkey if we don't like yours. And, since the "Convert
     > Selection" submenu on the Format menu kind of scares me — these things
     > should be smart enough to work with or without a selection. If I just
     > hit Link, then an empty one should be inserted. If I have text
     > highlighted, it should use that text as the text for the link. IOW, just
     > like Mail, Word, and most everything else out there works.

    The problem is this -- every preference, every menu command, etc. adds
    more clutter to an app. Apps like Word are full of clutter, and it's
    awful. A big part of what makes good apps good is what's *not* in them,
    not just what *is* in them. I don't want to waste "space" with commands
    that trivial. Something like stripping out every bullet, or inserting a
    bullet on every line is worth the space.

    Creating a link is as simple as selecting what you want and typing '['.
    No reason to create a menu command for that (which would take at least
    two keys to activate). Or paste a URL on top of a selected word and you
    get a link. Want an image? Insert a '!'.

    Bold/Italic is slightly different:

    1. It's not as easy to do manually because you have to wrap many
    different segments in '*' characters to make a large section bold
    (multiple items in a list or cells in a table, for example)

    2. Figuring out how to correctly apply bold/italics to a complex
    document is actually an interesting problem -- I haven't seen any other
    app do it correctly. That UTF-8 bug notwithstanding, take a docuement
    with lists, tables, headers, etc. Select all and apply bold. The last
    I looked, no other app could do that with a non-trivial document --
    maybe they've finally copied me and made it smarter, but not the last I
    checked.

  2. 2 Posted by Vince Rice on 07 Sep, 2017 10:02 PM

    Vince Rice's Avatar

    Re the references, thanks, and I belatedly thought to check the syntax document as well. Doh!

    Re the link and other formatting, I agree about too busy menus, but that simply doesn't apply here. These aren't esoteric things, they're the basics of MD. And, as I already said, having them on the menu means we can customize the hotkeys. They also (once you know how to search menus in Help!) make things discoverable. It would never have occurred to me to just type a [ to start a link. We're not born knowing how to do these things. :)

    And besides that, typing a bracket doesn't make a link. It only makes a reference. A link has trailing parentheses to point to the URL. That's two more keystrokes, and "hard" keystrokes at that (few people type very well on the numeric line). Versus the single keystroke Cmd-K (since so many apps already use that, I make it the hotkey in all my apps that I can) doing everything — typing both brackets, both parenthesis, and, if it's especially smart, Doing the Right Thing™ with the cursor (between the brackets if no text was selected, between the parentheses if there was).

    As I've already mentioned, I've never used in-document references for anything, but I use links all the time in my blog posts. Like the tab issue, Cmd-K is engrained, it's habit, it's actually faster for me to type than [, because I have to think about the latter, and it still doesn't do what's needed for the link. (Note — I don't care what the hotkey is in MMD, it's the menu item I care about.)

    And, really, MMD has some of the worst of both worlds. Instead of having Blockquote on the main menu with Bold and Italics (and Link and Image :) and it acting like everything else (Doing the Right Thing™ whether text is selected or not), we don't have blockquote at all, and we have a buried sub-menu item to convert selected text to blockquote. Why? Both of those things can be accomplished with a single menu item, Blockquote. (Note: I don't actually care about Blockquote; it's always a single-keystroke. I'm just pointing out that your menu is already "busy," but busy for the wrong reasons.)

    Ergo, the menu should have at least Link and Image on it. I would also put Code (or Inline Code, if you prefer) on it, for the same reasons — typing a ` is just one keystroke, but again it's a hard keystroke (one of the worst on the keyboard), and having a menu item lets us assign a much easier hotkey. The more inline code you do, the more valuable that menu item is.

    This is a win-win. It doesn't cost you anything, because it's not code, just menu items (and two or three at the most). And it's a win for some (possibly significant) percentage of your users.

    Did I say please? Pretty please?

  3. Support Staff 3 Posted by Fletcher on 08 Sep, 2017 01:35 AM

    Fletcher's Avatar

    BTW -- I know this isn't exactly what you're asking for, but the text expansion functionality allows you to effectively design many of your own commands.

    For example, you could define .l as [%|](%). When you type .l (+/- a space after depending on your settings, and Composer will insert it as [|](%|) where the first | is the cursor. Type what you want, then hit tab and you can type the URL.

    You don't have to wait on me to do anything, and you can design them however you like. (And feel free to share any creations in the extras discussion section for others -- it's mostly just v2 styles for now, but I hope that will change).

    FYI -- the %| syntax is compatible with TextExpander (Composer has always honored that as a "jump here" token, so you can use these same shortcuts anywhere you use TextExpander (or any similar utility). And of course, it works on Composer iOS (where there aren't keyboard shortcuts, so it can be a handy thing to be in the habit of)

  4. 4 Posted by Vince Rice on 08 Sep, 2017 02:45 AM

    Vince Rice's Avatar

    Thanks, but that's Pro only, right? And that only works "empty" — it won't do the right thing (I assume?) when text is selected.

  5. Fletcher closed this discussion on 05 Nov, 2017 07:52 PM.

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