Skip to content

Commit

Permalink
prep for unified
Browse files Browse the repository at this point in the history
  • Loading branch information
retorquere committed Mar 4, 2024
1 parent 71300ba commit 9b95d2a
Show file tree
Hide file tree
Showing 56 changed files with 58 additions and 58 deletions.
6 changes: 3 additions & 3 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -794,9 +794,9 @@ class Parser {
}
}

private show(o) {
private show(_o) {
// eslint-disable-next-line prefer-template
let text = JSON.stringify(o)
let text = '' // JSON.stringify(o)
if (this.chunk) text += `\n${this.chunk.trim()}`
return text
}
Expand Down Expand Up @@ -1442,7 +1442,7 @@ class Parser {
return this.text()
}
else {
return this.error(new TeXError(`Unhandled command: ${node.command}${this.show(node)}`, node, this.chunk))
return this.error(new TeXError(`unsupported macro (\\${node.command})${this.show(node)}`, node, this.chunk))
}
}

Expand Down
2 changes: 1 addition & 1 deletion test/all.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function tryparse({ bibfile, options }) {

let result = ''
if (options.exception) {
bibtex.parse(source, {...options, errorHandler: err => { result = `caught error: ${err.message}` } })
bibtex.parse(source, {...options, errorHandler: err => { result = err.message } })
}
else {
result = bibtex.parse(source, options)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/
'use strict'
exports[`test/all.js > TAP > import=unknown command handler #1733.bib > must match snapshot 1`] = `
caught error: Unhandled command: aap{"kind":"RegularCommand","source":"\\\\aap","command":"aap","arguments":{"optional":[],"required":[]}}
unsupported macro (\\aap)
@ARTICLE{2004A&A...424..927C,
author = {{Caputo}, F. and {Castellani}, V. and {Degl'Innocenti}, S. and {Fiorentino}, G. and {Marconi}, M.},
title = "{Bright metal-poor variables: Why \`\`Anomalous'' Cepheids?}",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/
'use strict'
exports[`test/all.js > TAP > import=web_page and other mendeley idiocy.bib > must match snapshot 1`] = `
caught error: Unhandled command: ud{"kind":"RegularCommand","source":"\\\\ud ","command":"ud","arguments":{"optional":[],"required":[]}}
unsupported macro (\\ud)
@generic{Willis2015,
abstract = {The increasing use of social media around global news events, such as the London Olympics in 2012, raises questions for international broadcasters about how to engage with users via social media in order to best achieve their individual missions. Twitter is a highly diverse social network whose conversations are multi-directional involving individual users, political and cultural actors, athletes and a range of media professionals. In so doing, users form networks of influence via their interactions affecting the ways that information is shared about specific global events.\\ud \\ud This article attempts to understand how networks of influence are formed among Twitter users, and the relative influence of global news media organisations and information providers in the Twittersphere during such global news events. We build an analysis around a set of tweets collected during the 2012 London Olympics. To understand how different users influence the conversations across Twitter, we compare three types of accounts: those belonging to a number of well-known athletes, those belonging to some well-known commentators employed by the BBC, and a number of corporate accounts belonging to the BBC World Service and the official London Twitter account. We look at the data from two perspectives. First, to understand the structure of the social groupings formed among Twitter users, we use a network analysis to model social groupings in the Twittersphere across time and space. Second, to assess the influence of individual tweets, we investigate the ageing factor of tweets, which measures how long users continue to interact with a particular tweet after it is originally posted.\\ud \\ud We consider what the profile of particular tweets from corporate and athletes’ accounts can tell us about how networks of influence are forged and maintained. We use these analyses to answer the questions: How do different types of accounts help shape the social networks? and, What determines the level and type of influence of a particular account?},
author = {Alistair Willis and Ali Fisher and Ilia Lvov},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/
'use strict'
exports[`test/all.js > TAP > other=long.bib > must match snapshot 1`] = `
caught error: Unhandled command: aaaaaaaaa{"kind":"RegularCommand","source":"\\\\aaaaaaaaa","command":"aaaaaaaaa","arguments":{"optional":[],"required":[]}}
unsupported macro (\\aaaaaaaaa)
@article{citeulike:1342115,
abstract = {Aa aaaaaaa a Aaaa aaaaaa, aaaaa aa aaa aaaa aaaaaa Aaaa aaaaaaa, aaaaa aaaaaa aaa aaaaaaaaaaa aa aaaaaaaa aaaaaaaaa aaa AAAa aaaa a aaaaa-aaaaaaaaaaa aaaaaaaaa. Aaa aaaaaaa aaa aaa aaa aaaaaaa aaaaaaaa aa Aaaa, aaa aaaa aaa aaaaaaaaaa aa aaaaaaaaa aaaa A-A aaa A-A 0-aaaa aaaaaaaaa aaaaaaaaa. Aa aaa aaaa aa A\\&aaaa;A aaaaaaaaa, aaa Aaaaaa aaaaaaaa aa aaaa aa aaaaaaa aaaa. Aaa aaaaaaa aaaa aaaaaaaaaa AAAa aaaaa aaa aaaa aaaaaaaaaa aaaaaa aaaaaaaa. Aaa aaaaa aaaaaaaaaaaa aaa aaaaaa aaaa a aaaaaa aaaaa aaa aaaaa aaaaaaaaa. Aaa aaaaaaa aaa aaaaaaaaa aaaaaa aaa aaaaa-aaaaaaaaa aaaaa, aaa aaa aaaaaaa aaaaa aaaaa aaa aaa aaaaaaaaaaaaaa aaaaaaa aaaaaaa AAAAAA. Aaaaaaaaa {\\aaaaaaaaa} 0000 Aaaa Aaaaa \\& Aaaa, Aaa.},
address = {Eli Lilly and Company Ltd, Lilly Research Centre, Windlesham, Surrey, GU20 6PH, UK},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/
'use strict'
exports[`test/all.js > TAP > import=unknown command handler #1733.bib > must match snapshot 1`] = `
caught error: Unhandled command: aap{"kind":"RegularCommand","source":"\\\\aap","command":"aap","arguments":{"optional":[],"required":[]}}
unsupported macro (\\aap)
@ARTICLE{2004A&A...424..927C,
author = {{Caputo}, F. and {Castellani}, V. and {Degl'Innocenti}, S. and {Fiorentino}, G. and {Marconi}, M.},
title = "{Bright metal-poor variables: Why \`\`Anomalous'' Cepheids?}",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/
'use strict'
exports[`test/all.js > TAP > import=web_page and other mendeley idiocy.bib > must match snapshot 1`] = `
caught error: Unhandled command: ud{"kind":"RegularCommand","source":"\\\\ud ","command":"ud","arguments":{"optional":[],"required":[]}}
unsupported macro (\\ud)
@generic{Willis2015,
abstract = {The increasing use of social media around global news events, such as the London Olympics in 2012, raises questions for international broadcasters about how to engage with users via social media in order to best achieve their individual missions. Twitter is a highly diverse social network whose conversations are multi-directional involving individual users, political and cultural actors, athletes and a range of media professionals. In so doing, users form networks of influence via their interactions affecting the ways that information is shared about specific global events.\\ud \\ud This article attempts to understand how networks of influence are formed among Twitter users, and the relative influence of global news media organisations and information providers in the Twittersphere during such global news events. We build an analysis around a set of tweets collected during the 2012 London Olympics. To understand how different users influence the conversations across Twitter, we compare three types of accounts: those belonging to a number of well-known athletes, those belonging to some well-known commentators employed by the BBC, and a number of corporate accounts belonging to the BBC World Service and the official London Twitter account. We look at the data from two perspectives. First, to understand the structure of the social groupings formed among Twitter users, we use a network analysis to model social groupings in the Twittersphere across time and space. Second, to assess the influence of individual tweets, we investigate the ageing factor of tweets, which measures how long users continue to interact with a particular tweet after it is originally posted.\\ud \\ud We consider what the profile of particular tweets from corporate and athletes’ accounts can tell us about how networks of influence are forged and maintained. We use these analyses to answer the questions: How do different types of accounts help shape the social networks? and, What determines the level and type of influence of a particular account?},
author = {Alistair Willis and Ali Fisher and Ilia Lvov},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/
'use strict'
exports[`test/all.js > TAP > other=long.bib > must match snapshot 1`] = `
caught error: Unhandled command: aaaaaaaaa{"kind":"RegularCommand","source":"\\\\aaaaaaaaa","command":"aaaaaaaaa","arguments":{"optional":[],"required":[]}}
unsupported macro (\\aaaaaaaaa)
@article{citeulike:1342115,
abstract = {Aa aaaaaaa a Aaaa aaaaaa, aaaaa aa aaa aaaa aaaaaa Aaaa aaaaaaa, aaaaa aaaaaa aaa aaaaaaaaaaa aa aaaaaaaa aaaaaaaaa aaa AAAa aaaa a aaaaa-aaaaaaaaaaa aaaaaaaaa. Aaa aaaaaaa aaa aaa aaa aaaaaaa aaaaaaaa aa Aaaa, aaa aaaa aaa aaaaaaaaaa aa aaaaaaaaa aaaa A-A aaa A-A 0-aaaa aaaaaaaaa aaaaaaaaa. Aa aaa aaaa aa A\\&aaaa;A aaaaaaaaa, aaa Aaaaaa aaaaaaaa aa aaaa aa aaaaaaa aaaa. Aaa aaaaaaa aaaa aaaaaaaaaa AAAa aaaaa aaa aaaa aaaaaaaaaa aaaaaa aaaaaaaa. Aaa aaaaa aaaaaaaaaaaa aaa aaaaaa aaaa a aaaaaa aaaaa aaa aaaaa aaaaaaaaa. Aaa aaaaaaa aaa aaaaaaaaa aaaaaa aaa aaaaa-aaaaaaaaa aaaaa, aaa aaa aaaaaaa aaaaa aaaaa aaa aaa aaaaaaaaaaaaaa aaaaaaa aaaaaaa AAAAAA. Aaaaaaaaa {\\aaaaaaaaa} 0000 Aaaa Aaaaa \\& Aaaa, Aaa.},
address = {Eli Lilly and Company Ltd, Lilly Research Centre, Windlesham, Surrey, GU20 6PH, UK},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/
'use strict'
exports[`test/all.js > TAP > import=unknown command handler #1733.bib > must match snapshot 1`] = `
caught error: Unhandled command: aap{"kind":"RegularCommand","source":"\\\\aap","command":"aap","arguments":{"optional":[],"required":[]}}
unsupported macro (\\aap)
@ARTICLE{2004A&A...424..927C,
author = {{Caputo}, F. and {Castellani}, V. and {Degl'Innocenti}, S. and {Fiorentino}, G. and {Marconi}, M.},
title = "{Bright metal-poor variables: Why \`\`Anomalous'' Cepheids?}",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/
'use strict'
exports[`test/all.js > TAP > import=web_page and other mendeley idiocy.bib > must match snapshot 1`] = `
caught error: Unhandled command: ud{"kind":"RegularCommand","source":"\\\\ud ","command":"ud","arguments":{"optional":[],"required":[]}}
unsupported macro (\\ud)
@generic{Willis2015,
abstract = {The increasing use of social media around global news events, such as the London Olympics in 2012, raises questions for international broadcasters about how to engage with users via social media in order to best achieve their individual missions. Twitter is a highly diverse social network whose conversations are multi-directional involving individual users, political and cultural actors, athletes and a range of media professionals. In so doing, users form networks of influence via their interactions affecting the ways that information is shared about specific global events.\\ud \\ud This article attempts to understand how networks of influence are formed among Twitter users, and the relative influence of global news media organisations and information providers in the Twittersphere during such global news events. We build an analysis around a set of tweets collected during the 2012 London Olympics. To understand how different users influence the conversations across Twitter, we compare three types of accounts: those belonging to a number of well-known athletes, those belonging to some well-known commentators employed by the BBC, and a number of corporate accounts belonging to the BBC World Service and the official London Twitter account. We look at the data from two perspectives. First, to understand the structure of the social groupings formed among Twitter users, we use a network analysis to model social groupings in the Twittersphere across time and space. Second, to assess the influence of individual tweets, we investigate the ageing factor of tweets, which measures how long users continue to interact with a particular tweet after it is originally posted.\\ud \\ud We consider what the profile of particular tweets from corporate and athletes’ accounts can tell us about how networks of influence are forged and maintained. We use these analyses to answer the questions: How do different types of accounts help shape the social networks? and, What determines the level and type of influence of a particular account?},
author = {Alistair Willis and Ali Fisher and Ilia Lvov},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/
'use strict'
exports[`test/all.js > TAP > other=long.bib > must match snapshot 1`] = `
caught error: Unhandled command: aaaaaaaaa{"kind":"RegularCommand","source":"\\\\aaaaaaaaa","command":"aaaaaaaaa","arguments":{"optional":[],"required":[]}}
unsupported macro (\\aaaaaaaaa)
@article{citeulike:1342115,
abstract = {Aa aaaaaaa a Aaaa aaaaaa, aaaaa aa aaa aaaa aaaaaa Aaaa aaaaaaa, aaaaa aaaaaa aaa aaaaaaaaaaa aa aaaaaaaa aaaaaaaaa aaa AAAa aaaa a aaaaa-aaaaaaaaaaa aaaaaaaaa. Aaa aaaaaaa aaa aaa aaa aaaaaaa aaaaaaaa aa Aaaa, aaa aaaa aaa aaaaaaaaaa aa aaaaaaaaa aaaa A-A aaa A-A 0-aaaa aaaaaaaaa aaaaaaaaa. Aa aaa aaaa aa A\\&aaaa;A aaaaaaaaa, aaa Aaaaaa aaaaaaaa aa aaaa aa aaaaaaa aaaa. Aaa aaaaaaa aaaa aaaaaaaaaa AAAa aaaaa aaa aaaa aaaaaaaaaa aaaaaa aaaaaaaa. Aaa aaaaa aaaaaaaaaaaa aaa aaaaaa aaaa a aaaaaa aaaaa aaa aaaaa aaaaaaaaa. Aaa aaaaaaa aaa aaaaaaaaa aaaaaa aaa aaaaa-aaaaaaaaa aaaaa, aaa aaa aaaaaaa aaaaa aaaaa aaa aaa aaaaaaaaaaaaaa aaaaaaa aaaaaaa AAAAAA. Aaaaaaaaa {\\aaaaaaaaa} 0000 Aaaa Aaaaa \\& Aaaa, Aaa.},
address = {Eli Lilly and Company Ltd, Lilly Research Centre, Windlesham, Surrey, GU20 6PH, UK},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/
'use strict'
exports[`test/all.js > TAP > import=unknown command handler #1733.bib > must match snapshot 1`] = `
caught error: Unhandled command: aap{"kind":"RegularCommand","source":"\\\\aap","command":"aap","arguments":{"optional":[],"required":[]}}
unsupported macro (\\aap)
@ARTICLE{2004A&A...424..927C,
author = {{Caputo}, F. and {Castellani}, V. and {Degl'Innocenti}, S. and {Fiorentino}, G. and {Marconi}, M.},
title = "{Bright metal-poor variables: Why \`\`Anomalous'' Cepheids?}",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/
'use strict'
exports[`test/all.js > TAP > import=web_page and other mendeley idiocy.bib > must match snapshot 1`] = `
caught error: Unhandled command: ud{"kind":"RegularCommand","source":"\\\\ud ","command":"ud","arguments":{"optional":[],"required":[]}}
unsupported macro (\\ud)
@generic{Willis2015,
abstract = {The increasing use of social media around global news events, such as the London Olympics in 2012, raises questions for international broadcasters about how to engage with users via social media in order to best achieve their individual missions. Twitter is a highly diverse social network whose conversations are multi-directional involving individual users, political and cultural actors, athletes and a range of media professionals. In so doing, users form networks of influence via their interactions affecting the ways that information is shared about specific global events.\\ud \\ud This article attempts to understand how networks of influence are formed among Twitter users, and the relative influence of global news media organisations and information providers in the Twittersphere during such global news events. We build an analysis around a set of tweets collected during the 2012 London Olympics. To understand how different users influence the conversations across Twitter, we compare three types of accounts: those belonging to a number of well-known athletes, those belonging to some well-known commentators employed by the BBC, and a number of corporate accounts belonging to the BBC World Service and the official London Twitter account. We look at the data from two perspectives. First, to understand the structure of the social groupings formed among Twitter users, we use a network analysis to model social groupings in the Twittersphere across time and space. Second, to assess the influence of individual tweets, we investigate the ageing factor of tweets, which measures how long users continue to interact with a particular tweet after it is originally posted.\\ud \\ud We consider what the profile of particular tweets from corporate and athletes’ accounts can tell us about how networks of influence are forged and maintained. We use these analyses to answer the questions: How do different types of accounts help shape the social networks? and, What determines the level and type of influence of a particular account?},
author = {Alistair Willis and Ali Fisher and Ilia Lvov},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/
'use strict'
exports[`test/all.js > TAP > other=long.bib > must match snapshot 1`] = `
caught error: Unhandled command: aaaaaaaaa{"kind":"RegularCommand","source":"\\\\aaaaaaaaa","command":"aaaaaaaaa","arguments":{"optional":[],"required":[]}}
unsupported macro (\\aaaaaaaaa)
@article{citeulike:1342115,
abstract = {Aa aaaaaaa a Aaaa aaaaaa, aaaaa aa aaa aaaa aaaaaa Aaaa aaaaaaa, aaaaa aaaaaa aaa aaaaaaaaaaa aa aaaaaaaa aaaaaaaaa aaa AAAa aaaa a aaaaa-aaaaaaaaaaa aaaaaaaaa. Aaa aaaaaaa aaa aaa aaa aaaaaaa aaaaaaaa aa Aaaa, aaa aaaa aaa aaaaaaaaaa aa aaaaaaaaa aaaa A-A aaa A-A 0-aaaa aaaaaaaaa aaaaaaaaa. Aa aaa aaaa aa A\\&aaaa;A aaaaaaaaa, aaa Aaaaaa aaaaaaaa aa aaaa aa aaaaaaa aaaa. Aaa aaaaaaa aaaa aaaaaaaaaa AAAa aaaaa aaa aaaa aaaaaaaaaa aaaaaa aaaaaaaa. Aaa aaaaa aaaaaaaaaaaa aaa aaaaaa aaaa a aaaaaa aaaaa aaa aaaaa aaaaaaaaa. Aaa aaaaaaa aaa aaaaaaaaa aaaaaa aaa aaaaa-aaaaaaaaa aaaaa, aaa aaa aaaaaaa aaaaa aaaaa aaa aaa aaaaaaaaaaaaaa aaaaaaa aaaaaaa AAAAAA. Aaaaaaaaa {\\aaaaaaaaa} 0000 Aaaa Aaaaa \\& Aaaa, Aaa.},
address = {Eli Lilly and Company Ltd, Lilly Research Centre, Windlesham, Surrey, GU20 6PH, UK},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/
'use strict'
exports[`test/all.js > TAP > import=unknown command handler #1733.bib > must match snapshot 1`] = `
caught error: Unhandled command: aap{"kind":"RegularCommand","source":"\\\\aap","command":"aap","arguments":{"optional":[],"required":[]}}
unsupported macro (\\aap)
@ARTICLE{2004A&A...424..927C,
author = {{Caputo}, F. and {Castellani}, V. and {Degl'Innocenti}, S. and {Fiorentino}, G. and {Marconi}, M.},
title = "{Bright metal-poor variables: Why \`\`Anomalous'' Cepheids?}",
Expand Down
Loading

0 comments on commit 9b95d2a

Please sign in to comment.