Module:BibTeX2Cite/doc
Jump to navigation
Jump to search
This is the documentation page for Module:BibTeX2Cite
| This module is rated as pre-alpha. It is unfinished, and may or may not be in active development. It should not be used from article namespace pages. Modules remain pre-alpha until the original editor (or someone who takes one over if it is abandoned for some time) is satisfied with the basic structure. |
Context
As explained more fully at Module:LaTeX2UTF8, the TeX/LaTeX typesetting systems use a bibliographic format called BibTeX which is in wide use in mathematical and scientific fields. This module contains the first initial steps to allow translation from BibTeX to the {{cite}} family of templates. Due to the use of "}}" in BibTeX, the raw BibTeX code should be kept in a separate module, not article space.
Usage
local p = {}
function p.test(frame)
local s = [[
@book {MR0161818,
AUTHOR = {Erd{\H{o}}s, P{\'a}l and Sur{\'a}nyi, J{\'a}nos},
TITLE = {V\'alogatott fejezetek a sz\'amelm\'eletb{\H o}l},
PUBLISHER = {Tank\"onyvkiad\'o V\'allalat, Budapest},
YEAR = {1960},
PAGES = {250},
MRCLASS = {10.00},
MRNUMBER = {0161818 (28 \#5022)},
}
]]
local c = p.BibTeX2Cite(s)
return frame:expandTemplate{title = 'cite journal', args = c["citeparms"]}
end
should result in returning
Erdős, Pál; Surányi, János (1960). "Válogatott fejezetek a számelmáletből". Tankányvkiadá Vállalat, Budapest. p. 250. MR MR0161818.