Quick search on "Title, Creator, Year" not show rich-text titled ITEM-s (sub/sup/italic markup)
In the item list quick search (mode “Title, Creator, Year”), a query that crosses a rich-text formatting boundary in a title does not match. For example: an item whose title is stored as
Zotero 9.0.6 (64-bit)
Better BibTeX citation key formula:
Title, Creator, Year quick search matches:
and thus results are following:
[1] T.F. Babuska, A.A. Pitenis, M.R. Jones, B.L. Nation, W.G. Sawyer, N. Argibay, Temperature-Dependent Friction and Wear Behavior of PTFE and MoS2, Tribol Lett 63 (2016) 15. https://doi.org/10.1007/s11249-016-0702-y.
[2] Z. Yang, S. Bhowmick, F.G. Sen, A.T. Alpas, Microscopic and atomistic mechanisms of sliding friction of MoS2: Effects of undissociated and dissociated H2O, Applied Surface Science 563 (2021) 150270. https://doi.org/10.1016/j.apsusc.2021.150270.
[3] L.E. Seitzman, R.N. Bolster, I.L. Singer, X-ray diffraction of MoS2 coatings prepared by ion-beam-assisted deposition, Surface and Coatings Technology 52 (1992) 93–98. https://doi.org/10.1016/0257-8972(92)90375-K.
https://s3.amazonaws.com/zotero.org/images/forums/u4845974/6kxetjnnrlsppwutlsqg.gif
https://s3.amazonaws.com/zotero.org/images/forums/u4845974/es2lrat65clsqxhcx3a2.png
https://s3.amazonaws.com/zotero.org/images/forums/u4845974/ozclro1xngu2vegf21rb.png
https://s3.amazonaws.com/zotero.org/images/forums/u4845974/w6ittuu49hvzj8hi4ame.png
132642 Zotero HTML markup title search — source files
MoS<sub>2</sub> (the “2” is a subscript) is not found when searching for "MoS2", even though the user can clearly see the item in the list with the title “MoS₂”. Searching "MoS" alone does find it.Zotero 9.0.6 (64-bit)
Better BibTeX citation key formula:
auth.lower + shorttitle(3,3) + year
| Item | Citation Key | Short title |
|---|---|---|
| 1 | babuskaTemperatureDependentFrictionWear2016 | |
| 2 | yangMicroscopicAtomisticMechanisms2021 | Microscopic and atomistic mechanisms of sliding friction of MoS2 |
| 3 | seitzmanXrayDiffractionMoS21992 |
Title, Creator, Year quick search matches:
title, year, creator, shortTitle and citationKeyand thus results are following:
| Item | Search 'mos' | Search 'mos2' | SELECT by |
|---|---|---|---|
| 1 | ✅ | ❌ | none |
| 2 | ✅ | ✅ | short title |
| 3 | ✅ | ✅ | Citation Key |
[1] T.F. Babuska, A.A. Pitenis, M.R. Jones, B.L. Nation, W.G. Sawyer, N. Argibay, Temperature-Dependent Friction and Wear Behavior of PTFE and MoS2, Tribol Lett 63 (2016) 15. https://doi.org/10.1007/s11249-016-0702-y.
[2] Z. Yang, S. Bhowmick, F.G. Sen, A.T. Alpas, Microscopic and atomistic mechanisms of sliding friction of MoS2: Effects of undissociated and dissociated H2O, Applied Surface Science 563 (2021) 150270. https://doi.org/10.1016/j.apsusc.2021.150270.
[3] L.E. Seitzman, R.N. Bolster, I.L. Singer, X-ray diffraction of MoS2 coatings prepared by ion-beam-assisted deposition, Surface and Coatings Technology 52 (1992) 93–98. https://doi.org/10.1016/0257-8972(92)90375-K.
[1] T.F. Babuska, A.A. Pitenis, M.R. Jones, B.L. Nation, W.G. Sawyer, N. Argibay, Temperature-Dependent Friction and Wear Behavior of PTFE and MoS<sub>2</sub>, Tribol Lett 63 (2016) 15. https://doi.org/10.1007/s11249-016-0702-y.
[2] Z. Yang, S. Bhowmick, F.G. Sen, A.T. Alpas, Microscopic and atomistic mechanisms of sliding friction of MoS<sub>2</sub>: Effects of undissociated and dissociated H<sub>2</sub>O, Applied Surface Science 563 (2021) 150270. https://doi.org/10.1016/j.apsusc.2021.150270.
[3] L.E. Seitzman, R.N. Bolster, I.L. Singer, X-ray diffraction of MoS<sub>2</sub> coatings prepared by ion-beam-assisted deposition, Surface and Coatings Technology 52 (1992) 93–98. https://doi.org/10.1016/0257-8972(92)90375-K.https://s3.amazonaws.com/zotero.org/images/forums/u4845974/6kxetjnnrlsppwutlsqg.gif
https://s3.amazonaws.com/zotero.org/images/forums/u4845974/es2lrat65clsqxhcx3a2.png
https://s3.amazonaws.com/zotero.org/images/forums/u4845974/ozclro1xngu2vegf21rb.png
https://s3.amazonaws.com/zotero.org/images/forums/u4845974/w6ittuu49hvzj8hi4ame.png
132642 Zotero HTML markup title search — source files
Upgrade Storage
The “Title, Creator, Year” search does a substring match (
value LIKE '%mos2%') against the raw stored field value, which still contains the formatting tags. SoMoS2is compared against the literal stringMoS<sub>2</sub>and cannot match — the characters<sub>sit betweenMoSand2. SearchingMoSmatches theMoSprefix, which is whyMoSalone finds it. The item list renders those tags as a real subscript (renderItemTitle()), so the stored value and the displayed value differ and there is no visible cue that a formatted title is being searched.Zotero already strips exactly these tags — but only for sorting, not for searching
Zotero.Items.getSortTitle()builds the sort key by removing the same markup set —<i>,<b>,<sub>,<sup>,<span style="font-variant:small-caps;">,<span class="nocase">,</span>(the_stripFromSortTitlelist indata/items.js). That same normalization is simply not applied on the search path (data/search.js). Matching against the tag-free form on search (i.e. reusing the stripping logic that already exists for sorting) would makeMoS2findMoS<sub>2</sub>regardless of whether shortTitle/citationKey happen to hold a plain-text copy — and would fix the same problem for italic/superscript/small-caps titles too.