25

I see that the jTab guitar tab plugin has been introduced at music.se now as it was on guitars.se, which I think is brilliant. But it should perhaps be only applied for questions tagged [guitar]. I just posted an answer to a Harmonica question, where I needed applied note names in a monospace font, and was converted to guitar tabs when I added. I had to simulate the spacing to get it work without code section.

Example of jTab kicking in, although I don't want it to be:

C    D    E    F    G    A    B    C  
out  in   out  in   out  in   in   out 

Instead I had to do some hacking using the block quote format, and add some   to align the spacing to an approximate:

C - D - E - F - G - A - B - C
out in out in  out  in  in  out

On StackOverflow, the programming language to use for code coloring is based on the language specified in the question tag ([C++], [C#] etc. use C encoding. [VB6], [VB.NET] etc. use VB encoding and so forth).

6
  • 2
    Another solution could be a different notation for jTab separate from the one for code.
    – Sophie Alpert Mod
    Commented Jun 23, 2011 at 18:27
  • 2
    +1: Great idea! Clearly we need better support for jTab in the first place (there's no autorendering), but this would certainly alleviate some headaches.
    – NReilingh Mod
    Commented Jun 23, 2011 at 19:16
  • 1
    I'm adding the bug tag to this since it wreaks absolute havok on Lilypond-related posts.
    – NReilingh Mod
    Commented Sep 16, 2013 at 19:52
  • Agreed with this. And when it activates it's really unclear what's happening. Commented Oct 26, 2013 at 13:56
  • 1
    @BenAlpert: I'm not sure I agree that jTab should not be in code section. Related to music, this is the perfect use of the code concept. What's missing is the concept of separating different "languages". I would also like the possibility to notate any form of music, which is another important request.
    – awe
    Commented Oct 28, 2013 at 8:57
  • Fast forward to now, looks like the jTab plugin is also enabled on meta...
    – Andrew T.
    Commented Jan 8, 2020 at 3:23

2 Answers 2

20

A temporary workaround I've found is to use HTML <pre></pre> (preformatted text) tags around stuff that would otherwise be malinterpreted by jTab.

EDIT:

Lilypond makes great use of << and >> symbols. These will get screwed up by <pre> tags unless you encode them as &lt;&lt; and &gt;&gt; respectively. Groan.

4
  • It'd be nice if <pre> would eat an initial newline. Commented Oct 6, 2012 at 6:18
  • 1
    That's HTML spec; pretty sure we can't/shouldn't change it.
    – NReilingh Mod
    Commented Oct 9, 2012 at 18:51
  • That's true, but AIUI we could create a CSS div class that would work the same as <pre> but with this extra feature. Quite probably not worth the effort, but possible IMO. Commented Oct 14, 2014 at 4:39
  • 2
    Is there any news regarding this? We should make JTab optional (or remove it, no one ever uses it). I created a new meta post to discuss it. Commented May 14, 2015 at 9:04
3

If anyone else is still struggling with this 5 years later (as I have been), I used inline ticks.

My problem: I wanted chords to appear thus, with the notes spelled out:

C Dm Em etc...

C D E ...
E F G ...
G A B ...

However when using pre-formatting (four spaces before text) I obtained the jTab chords, so instead I used inline ticks with line breaks

`chord name here`
`Chord notes`

which stopped the automatic jTab rendering.

1
  • You can also use the pre tags <pre> </pre>
    – Dom Mod
    Commented Jun 18, 2016 at 1:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .