Skip to content

Keywords - Replace whitespaces with CamelCase #2367

Answered by retorquere
dderom asked this question in Q&A
Discussion options

You must be logged in to vote

with a postscript:

if (Translator.BetterTeX && zotero.tags) {
  const tags = zotero.tags
    .map(tag => (typeof tag === 'string' ? tag : tag.tag))
    .map(tag => tag.replace(/\b\w/g, letter => letter.toUpperCase()).replace(/\s/g, ''))
  tex.add({ name: 'keywords', value: tags, enc: 'tags' })
}

Replies: 3 comments 21 replies

Comment options

You must be logged in to vote
1 reply
@dderom
Comment options

Answer selected by retorquere
Comment options

You must be logged in to vote
17 replies
@Gladbjerg
Comment options

@Gladbjerg
Comment options

@retorquere
Comment options

@dderom
Comment options

@Gladbjerg
Comment options

Comment options

You must be logged in to vote
3 replies
@retorquere
Comment options

@Gladbjerg
Comment options

@retorquere
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants