Skip to content

Latest commit

 

History

History
 
 

latex

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
wtf-plugin-latex
a plugin for wtf_wikipedia

npm install wtf-plugin-latex

Output all, or parts of a wikipedia article in LATEX format.

const wtf = require('wtf_wikipedia')
wtf.extend(require('wtf-plugin-latex'))

let doc = wtf('hello [[world]]')
doc.latex()
// 'hello \href{./world}{world}'
<script src="https://unpkg.com/wtf_wikipedia"></script>
<script src="https://unpkg.com/wtf-plugin-latex"></script>
<script defer>
  wtf.plugin(window.wtfLatex)
  wtf.fetch('Hamburg').then((doc) => {
    console.log(doc.sentences()[0].latex())
    // \textbf{Hamburg} officially the \textbf{Free and Hanseatic City of Hamburg}, is the \href{./List_of_cities_in_Germany_by_population}{second-largest city} ...
  })
</script>

work-in-progress

MIT