Skip to content

Commit

Permalink
_ and ^ are only macros in math mode
Browse files Browse the repository at this point in the history
  • Loading branch information
retorquere committed Mar 4, 2024
1 parent 24e8076 commit 01689de
Show file tree
Hide file tree
Showing 290 changed files with 606 additions and 595 deletions.
11 changes: 10 additions & 1 deletion grammar.peggy
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,7 @@ LineBreak
}

ScriptCommand
= mode:[_\^] __h v:Argument {
= &{ return math.on } mode:[_\^] __h v:Argument {
if (v.kind === 'Block') v = v.value

return {
Expand All @@ -622,6 +622,15 @@ ScriptCommand
value: v,
}
}
/ char:[_\^] {
return {
kind: 'Text',
loc: location(),
source: text(),
value: char,
mode: 'text',
}
}

DiacriticCommand
= '\\' mark:SimpleDiacritic __ chr:([a-zA-Z0-9] / '\\' [ij]) {
Expand Down
2 changes: 2 additions & 0 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,8 @@ export const fields = {
'verba',
'verbb',
'verbc',
'xref',
'crossref',
],
html: [
'annotation',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Object {
"20",
],
"xref": Array [
"welkerₐndreas₁999",
"welker_andreas_1999",
],
},
"key": "bentley_academic_2011",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Object {
],
"keywords": Array [
"bdec15",
"zoteroₜestcase",
"zotero_testcase",
],
"pages": Array [
"1–10",
Expand Down Expand Up @@ -127,7 +127,7 @@ Object {
],
"keywords": Array [
"bdec15",
"zoteroₜestcase",
"zotero_testcase",
],
"location": Array [
"Piscataway, NJ, USA",
Expand Down Expand Up @@ -197,7 +197,7 @@ Object {
"jasmin13a",
"p-12-iam",
"p-gmdm41",
"zoteroₜestcase",
"zotero_testcase",
],
"pages": Array [
"485–498",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Object {
],
"keywords": Array [
"bdec15",
"zoteroₜestcase",
"zotero_testcase",
],
"pages": Array [
"1–10",
Expand Down Expand Up @@ -121,7 +121,7 @@ Object {
],
"keywords": Array [
"bdec15",
"zoteroₜestcase",
"zotero_testcase",
],
"location": Array [
"Piscataway, NJ, USA",
Expand Down Expand Up @@ -188,7 +188,7 @@ Object {
"jasmin13a",
"p-12-iam",
"p-gmdm41",
"zoteroₜestcase",
"zotero_testcase",
],
"pages": Array [
"485–498",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Object {
],
"keywords": Array [
"bdec15",
"zoteroₜestcase",
"zotero_testcase",
],
"pages": Array [
"1–10",
Expand Down Expand Up @@ -121,7 +121,7 @@ Object {
],
"keywords": Array [
"bdec15",
"zoteroₜestcase",
"zotero_testcase",
],
"location": Array [
"Piscataway, NJ, USA",
Expand Down Expand Up @@ -185,7 +185,7 @@ Object {
"jasmin13a",
"p-12-iam",
"p-gmdm41",
"zoteroₜestcase",
"zotero_testcase",
],
"pages": Array [
"485–498",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Object {
],
"keywords": Array [
"bdec15",
"zoteroₜestcase",
"zotero_testcase",
],
"pages": Array [
"1–10",
Expand Down Expand Up @@ -121,7 +121,7 @@ Object {
],
"keywords": Array [
"bdec15",
"zoteroₜestcase",
"zotero_testcase",
],
"location": Array [
"Piscataway, NJ, USA",
Expand Down Expand Up @@ -188,7 +188,7 @@ Object {
"jasmin13a",
"p-12-iam",
"p-gmdm41",
"zoteroₜestcase",
"zotero_testcase",
],
"pages": Array [
"485–498",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Object {
"arxiv",
],
"keywords": Array [
"ₜabletₘodified",
"_tablet_modified",
],
"title": Array [
"A <span class=\\"nocase\\">Frame Tracking Model</span> for <span class=\\"nocase\\">Memory</span>-<span class=\\"nocase\\">Enhanced Dialogue Systems</span>",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ Object {
"archives",
"archivistiq",
"instrumentation",
"knowledge<sub>i</sub>nfrastructures",
"knowledgeₚroduction",
"pratiqₛci",
"researchₘethods",
"knowledge_infrastructures",
"knowledge_production",
"pratiq_sci",
"research_methods",
"tools",
"zotero",
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ Object {
"Journal of High Energy Physics",
],
"keywords": Array [
"ₜablet",
"_tablet",
"Batalin-Vilkoviski formalism",
"covariant string field theory",
"futur: 3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ Object {
"Journal of High Energy Physics",
],
"keywords": Array [
"ₜablet",
"_tablet",
"Batalin-Vilkoviski formalism",
"covariant string field theory",
"futur: 3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Object {
],
"keywords": Array [
"bdec15",
"zoteroₜestcase",
"zotero_testcase",
],
"location": Array [
"Piscataway, NJ, USA",
Expand Down Expand Up @@ -125,7 +125,7 @@ Object {
"jasmin13a",
"p-12-iam",
"p-gmdm41",
"zoteroₜestcase",
"zotero_testcase",
],
"pages": Array [
"485–498",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Object {
],
"keywords": Array [
"bdec15",
"zoteroₜestcase",
"zotero_testcase",
],
"location": Array [
"Piscataway, NJ, USA",
Expand Down Expand Up @@ -125,7 +125,7 @@ Object {
"jasmin13a",
"p-12-iam",
"p-gmdm41",
"zoteroₜestcase",
"zotero_testcase",
],
"pages": Array [
"485–498",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Object {
],
"keywords": Array [
"bdec15",
"zoteroₜestcase",
"zotero_testcase",
],
"pages": Array [
"1–10",
Expand Down Expand Up @@ -121,7 +121,7 @@ Object {
],
"keywords": Array [
"bdec15",
"zoteroₜestcase",
"zotero_testcase",
],
"location": Array [
"Piscataway, NJ, USA",
Expand Down Expand Up @@ -188,7 +188,7 @@ Object {
"jasmin13a",
"p-12-iam",
"p-gmdm41",
"zoteroₜestcase",
"zotero_testcase",
],
"pages": Array [
"485–498",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Object {
],
"keywords": Array [
"bdec15",
"zoteroₜestcase",
"zotero_testcase",
],
"pages": Array [
"1–10",
Expand Down Expand Up @@ -121,7 +121,7 @@ Object {
],
"keywords": Array [
"bdec15",
"zoteroₜestcase",
"zotero_testcase",
],
"location": Array [
"Piscataway, NJ, USA",
Expand Down Expand Up @@ -188,7 +188,7 @@ Object {
"jasmin13a",
"p-12-iam",
"p-gmdm41",
"zoteroₜestcase",
"zotero_testcase",
],
"pages": Array [
"485–498",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Object {
"885–898",
],
"related": Array [
"key₂",
"key_2",
],
"relatedtype": Array [
"bytranslator",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Object {
"Cours de droit administratif",
],
"crossref": Array [
"eisenmann<sub>c</sub>ours₁982",
"eisenmann_cours_1982",
],
"date": Array [
"1983",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Object {
"0147-5967",
],
"jlprojects": Array [
"spatialₑlections, continuousₒpinion<sub>d</sub>ynamics",
"spatial_elections, continuous_opinion_dynamics",
],
"journal": Array [
"Journal of Comparative Economics",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Object {
"20",
],
"xref": Array [
"welkerₐndreas₁999",
"welker_andreas_1999",
],
},
"key": "bentley_academic_2011",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Object {
],
"keywords": Array [
"bdec15",
"zoteroₜestcase",
"zotero_testcase",
],
"pages": Array [
"1–10",
Expand Down Expand Up @@ -127,7 +127,7 @@ Object {
],
"keywords": Array [
"bdec15",
"zoteroₜestcase",
"zotero_testcase",
],
"location": Array [
"Piscataway, NJ, USA",
Expand Down Expand Up @@ -197,7 +197,7 @@ Object {
"jasmin13a",
"p-12-iam",
"p-gmdm41",
"zoteroₜestcase",
"zotero_testcase",
],
"pages": Array [
"485–498",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Object {
],
"keywords": Array [
"bdec15",
"zoteroₜestcase",
"zotero_testcase",
],
"pages": Array [
"1–10",
Expand Down Expand Up @@ -121,7 +121,7 @@ Object {
],
"keywords": Array [
"bdec15",
"zoteroₜestcase",
"zotero_testcase",
],
"location": Array [
"Piscataway, NJ, USA",
Expand Down Expand Up @@ -188,7 +188,7 @@ Object {
"jasmin13a",
"p-12-iam",
"p-gmdm41",
"zoteroₜestcase",
"zotero_testcase",
],
"pages": Array [
"485–498",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Object {
],
"keywords": Array [
"bdec15",
"zoteroₜestcase",
"zotero_testcase",
],
"pages": Array [
"1–10",
Expand Down Expand Up @@ -121,7 +121,7 @@ Object {
],
"keywords": Array [
"bdec15",
"zoteroₜestcase",
"zotero_testcase",
],
"location": Array [
"Piscataway, NJ, USA",
Expand Down Expand Up @@ -185,7 +185,7 @@ Object {
"jasmin13a",
"p-12-iam",
"p-gmdm41",
"zoteroₜestcase",
"zotero_testcase",
],
"pages": Array [
"485–498",
Expand Down
Loading

0 comments on commit 01689de

Please sign in to comment.