MediaWiki talk:Edittools

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
(Redirected from Help talk:CharInsert)


Customization instructions[edit]

To add custom entries, adapt this code, and place it in your common.js:

// Add custom Character Inserter entries
window.charinsertCustom = { 
	"Insert": ' Mention: {\{u|+}}  {\{ping|+}}', 
	"Wiki markup": ' Mention: {\{u|+}}  {\{ping|+}}' 
};

that will append the {{u}} and {{ping}} code to the indicated menus.

  • Note1: The "+" in those items, is where your cursor will appear after the text is inserted, or if you already have text highlighted when you click them then that text will be properly surrounded by the templates.
  • Note2: You can also remove or change the word "Mention:" - anything that is followed by a colon seems to get turned into a heading - Use_underscores_for_multi_word_headings: like so.
  • Note3: use a dot ( . ) for any spacing needed in such things as inline css class or id assignments. For example. -- the space needed between the words span and class in <span.class="plainlinks">+</span>
  • Note4: to include a single literal \ use four backslashes ( \\\\ ) (will appear as double-\ on menu display.) E.g. <math>\\\\scriptstyle{+}</math>.

Planetary symbols[edit]

Under 'Symbols', could we add the planetary symbols? I'm thinking:

 ☉ · ☾ · ☽ · ☿ · ♀ · 🜨 · ♁ · ♂ · ⚳ · ⚴ · ⚶ · ♃ · ♄ · ⛢ · ♅ · ♆ · ♇ · ⯓ · ⯰ · ⯲

♀ · ♂ are of course used in biology as well. If that's too many, we could leave out the alt symbols and the large planetoids, which aren't used as much as the others:

 ☉ · ☾ · ☿ · ♀ · 🜨 · ♂ · ♃ · ♄ · ⛢ · ♆ 

When ppl choose symbols from some other source, there tend to be errors like using the mathematical circled plus instead of the Earth symbol.

I don't know if it matters very much where we put them, but I thought maybe near the end, just before © ® ™ ◌. — kwami (talk) 22:45, 21 November 2021 (UTC)[reply]

  • 6,14,18,19,20 from the first list don't even render on 3 browsers I tried; on the second list 5,9 (duplicates from the first list) have the same issue. As far as usage - how often do we expect someone will ever enter these in to the source editor? — xaosflux Talk 00:11, 22 November 2021 (UTC)[reply]
The problem isn't your browser, but your fonts. You don't have a font that has the symbols for Earth or Uranus, which is a bit odd, since you have the asteroids. The symbol for Uranus has been supported since Unicode 6! The last three characters in the first list are more recent (2016).
They're common in astronomy and astrology articles. They're ubiquitous in astrology, and in astronomy it's very common to give masses of stars in terms of M (solar masses) and of planets in terms of M🜨 (Earth masses). Plus in botany ♀ and ♂ are quite common.
Doesn't WP have webfonts for ppl who don't have necessary characters, for example for physical constants in physics articles, or mathematical symbols in math articles? That issue should be addressed regardless, if there are very many users like yourself who lack basic characters we use in our articles. Do you know where I would ask about that? — kwami (talk) 01:21, 22 November 2021 (UTC)[reply]
FWIW, I can see all the characters except for the last three on the first list (astrological Pluto / Pluto the dwarf planet, Eris, and Sedna). Double sharp (talk) 14:29, 22 November 2021 (UTC)[reply]
We even have articles on the units Earth mass and solar mass, with these in the standard symbols. Double sharp (talk) 21:47, 22 November 2021 (UTC)[reply]

At the very least, I think the symbols for the Sun and Earth (ubiquitous in astronomy), plus Mars and Venus (ubiquitous in biology) should be added. Though once you get there, then at least version 2 with all the pre-2006 planets seems logical. Double sharp (talk) 19:47, 22 November 2021 (UTC)[reply]

Yes, even just those four would be a help. — kwami (talk) 21:04, 22 November 2021 (UTC)[reply]
Oh, re "pre-2006": Pluto was about the same order of commonness as the others when it was considered a planet, I think. See for example the charts in John S. Lewis' Physics and Chemistry of the Solar System (2nd edition, 2004). But since then, I think it's become less common: e.g. this article (2016) uses the symbols for Mercury through Neptune in a chart (Fig. 3), but not Pluto even though its data point is there too. (It also doesn't use the symbol for the Moon, though, so YMMV on how important that is.) So, yeah, version 2 is OK with me, though version 1 would be nice. Double sharp (talk) 21:34, 22 November 2021 (UTC)[reply]

Might be best to hold off on this, if my conjecture regarding the failure of the double accidentals is right. 🜨 (the Earth symbol) is U+1F728, outside the BMP. Double sharp (talk) 16:15, 29 November 2021 (UTC)[reply]

Now that the BMP problem is fixed, could I request that Sol + Luna + major planets be added (the 2nd option above)?

 ☉ · ☾ · ☿ · ♀ · 🜨 · ♂ · ♃ · ♄ · ⛢ · ♆ 

Double sharp (talk) 10:21, 27 January 2022 (UTC)[reply]

Double-sharp and double-flat[edit]

I would like to propose that the double accidentals be added. Currently we have

♭ · ♯ · ♮

showing the three most common accidentals in common-practice Western musical notation (flat, sharp, and natural), but this isn't enough for referring to notes especially in 19th-century music which often makes heavier use of such alterations. Often double flats (𝄫) and double sharps (𝄪) are needed.

Also, the current order doesn't go from lowest to highest alteration, so I find it a bit unintuitive. Therefore I would suggest:

𝄫 · ♭ · ♮ · ♯ · 𝄪

as a more logical sequence.

Until recently 𝄫 and 𝄪 did not show up on most systems, so {{Music}} uses images for them. The huge number of links to the images File:Doubleflat.svg (𝄫) and File:DoubleSharp.svg (𝄪) suggests that these could receive heavy use now that they are showing up more generally.

(And yes, I know my username is being entertainingly appropriate for this!) Double sharp (talk) 19:55, 22 November 2021 (UTC)[reply]

I see both of those and I don't have any special musical fonts on my system. — kwami (talk) 21:05, 22 November 2021 (UTC)[reply]
FWIW, I don't see either of those as images - just UTF numbers. — xaosflux Talk 21:33, 22 November 2021 (UTC)[reply]
FWIW, they've been in Unicode since version 3.1, way back in 2001. Admittedly in Plane 1 rather than Plane 0. Double sharp (talk) 21:39, 22 November 2021 (UTC)[reply]
To some extent the reader is responsible for being able to access the internet. E.g. if you're into music, you'll want to install fonts that include musical symbols; if you're into astronomy or astrology, or chess, you'll want to install fonts that include those symbols. I suspect there are a lot of readers of WP that see UTF numbers for many of the symbols we already have under the "IPA" section of EditTools. I'm on a new computer, and many of the articles I used to be able to read are now full of UTF numbers. (In fact, many of my off-line documents I wrote myself now display as a bunch of UTF numbers.) Eventually I'll get around to installing fonts for Kannada etc. But meanwhile WP should still make proper Unicode as accessible as possible. That's why we tag certain articles with notices that the user might need additional fonts to read them. — kwami (talk) 22:08, 22 November 2021 (UTC)[reply]
FWIW, I can see pretty much everything in Musical Symbols (Unicode block) without having installed anything special. Only the koron and sori at the end of the block don't show up; anyway, they're Unicode 14.0 and mostly found in Persian classical music. I can't see the symbols for the other notation traditions (e.g. ancient Greek musical notation), but as you say, if I felt the need to read articles about those, I'd install a font. Double sharp (talk) 22:35, 22 November 2021 (UTC)[reply]
I can't see the last dozen in that block (Kievan notation), but all the rest are covered without any special musical or symbol fonts. — kwami (talk) 23:39, 22 November 2021 (UTC)[reply]
 Done but you'll need an interface admin to do MediaWiki:Gadget-charinsert-core.js — Martin (MSGJ · talk) 12:48, 24 November 2021 (UTC)[reply]
@MSGJ: Thank you! Is there anyone I should ask re MediaWiki:Gadget-charinsert-core.js? It's been a few days. Double sharp (talk) 12:06, 29 November 2021 (UTC)[reply]
It's in the queue, so hopefully will be dealt with shortly. If you can't wait, you can always post at the Interface administrators' noticeboard — Martin (MSGJ · talk) 13:04, 29 November 2021 (UTC)[reply]
 Done (for .js file). — xaosflux Talk 15:19, 29 November 2021 (UTC)[reply]
@Xaosflux: This is really really weird: somehow I can see 𝄫 and 𝄪 normally when I use them in text, but now what I'm seeing in the "Symbols" palette is � � ♭ ♮ ♯ � � with pairs of replacement characters. However, if I click the first replacement-character, then the second, I get a 𝄫 (but not with any other combinations) and can see it. And if I click the third, then the fourth, I get a 𝄪. I wonder if something is just going wrong because the problem is that these characters are outside the BMP: are these the surrogate pairs? Thanks a lot for your help, BTW. :D Double sharp (talk) 15:34, 29 November 2021 (UTC)[reply]
@Double sharp: see if this helped? Think these are just nasty unicode characters :D — xaosflux Talk 15:38, 29 November 2021 (UTC)[reply]
@Xaosflux: Unfortunately, it didn't. :( I can see the 𝄫 and 𝄪 in your edit, but somehow I can't see them in the symbols palette when I try to edit. I just get the replacement-character pairs that if clicked together in the right order give me the 𝄫 and 𝄪. That's why I suspected that the problem was that they were too high-numbered in Unicode, and that something in the code is interpreting it as pairs of lower-numbered characters, since 𝄫 for example has UTF-16 encoding 0xD834 0xDD2B. Supporting my hypothesis: if I click the 1st then the 4th, or the 3rd then the 2nd, I also get the right characters, because 𝄪 is 0xD834 0xDD2A.
Anyway, if this is unavoidable right now, it might be best to remove it for the moment. Maybe one of us should ask at WP:VPT what's going on? Sorry for putting you to this trouble. :( Double sharp (talk) 16:04, 29 November 2021 (UTC)[reply]

I've asked at Wikipedia:Village_pump_(technical)#Unicode_characters_outside_the_BMP_in_MediaWiki:Gadget-charinsert-core.js. Double sharp (talk) 16:11, 29 November 2021 (UTC)[reply]

@Double sharp: I've rolled back the edit, feel free to request again in the future. — xaosflux Talk 16:13, 29 November 2021 (UTC)[reply]
@Xaosflux: Thank you! Hopefully I can get to the bottom of this at VPT. :) Double sharp (talk) 16:13, 29 November 2021 (UTC)[reply]

Revisit[edit]

@Xaosflux: Since the problem's been fixed per the section below, could we have the 𝄫 and 𝄪 back? Thanks in advance. :D Double sharp (talk) 10:17, 27 January 2022 (UTC)[reply]
@Double sharp: this is the current line:
'Symbols': '~ | ¡¿†‡↔↑↓•¶#∞ ‹+› «+» {\{angle.bracket|+}}  ¤₳฿₵¢₡₢$₫₯€₠₣ƒ₴₭₤ℳ₥₦№₧₰£៛₨₪৳₮₩¥  ♠♣♥♦  ♭♯♮  ©®™ ◌',
Exactly what do you want it replaced with? — xaosflux Talk 13:16, 27 January 2022 (UTC)[reply]
I'd like:
'Symbols': '~ | ¡¿†‡↔↑↓•¶#∞ ‹+› «+» {\{angle.bracket|+}}  ¤₳฿₵¢₡₢$₫₯€₠₣ƒ₴₭₤ℳ₥₦№₧₰£៛₨₪৳₮₩¥  ♠♣♥♦  𝄫♭♮♯𝄪  ©®™ ◌',
If you think the planetary symbols in the request above are also worth adding, then I think this would do:
'Symbols': '~ | ¡¿†‡↔↑↓•¶#∞ ‹+› «+» {\{angle.bracket|+}}  ¤₳฿₵¢₡₢$₫₯€₠₣ƒ₴₭₤ℳ₥₦№₧₰£៛₨₪৳₮₩¥  ♠♣♥♦  𝄫♭♮♯𝄪  ©®™ ◌ ☉☾☿♀🜨♂♃♄⛢♆',
Double sharp (talk) 15:40, 27 January 2022 (UTC)[reply]
Fixed syntax error above. — xaosflux Talk 16:19, 27 January 2022 (UTC)[reply]
 Donexaosflux Talk 16:20, 27 January 2022 (UTC)[reply]
Thank you so much! Double sharp (talk) 19:36, 27 January 2022 (UTC)[reply]

How to insert a full stop?[edit]

I've been using the instructions at #Customization to construct some custom inserts. But my desired inserts include actual full stops (.), which of course get converted to spaces. Also this seems unescapable using e.g. \.. Is there an established way of insering these? / Lokal_Profil 10:36, 30 December 2022 (UTC)[reply]

My current work around is to subst a template thqt only contains a full stop, but that feels a bit ridiculous. / Lokal_Profil 09:08, 5 January 2023 (UTC)[reply]
May need to update something in MediaWiki:Gadget-charinsert-core.js; if you sandbox it and make it work and have a suggestion let us know. — xaosflux Talk 10:29, 5 January 2023 (UTC)[reply]

IPA section[edit]

For some reason, it lists some vowels, notably ɛ (which is an open-mid front unrounded vowel) as close-mids, and it shouldn’t be like this БудетЛучше (talk) 18:20, 2 October 2023 (UTC)[reply]

What interface are you talking about? If you mean CharInsert's IPA section, ⟨ɛ⟩ appears correctly with other open-mids. Nardog (talk) 03:48, 3 October 2023 (UTC)[reply]