Open main menu
Home
Random
Donate
Recent changes
Special pages
Community portal
Preferences
About Stockhub
Disclaimers
Search
User menu
Talk
Contributions
Create account
Log in
Editing
Module:LaTeX2UTF8/doc
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Usage == This module is designed to be called from within other Lua modules. As an example: <syntaxhighlight lang="lua"> function TranslateLaTeX() local l2u = require( "Module:LaTeX2UTF8" ) 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)}, } ]] s = l2u.translate_diacritics( s ) s = l2u.p.translate_special_characters( s ) return s end </syntaxhighlight> The BibTeX entry should be transformed to a UTF8 string that looks (likebreaks aside) like this: <syntaxhighlight lang="bibtex"> @book {MR0161818, AUTHOR = {Erdős, Pál and Surányi, János}, TITLE = {Válogatott fejezetek a számelmáletből}, PUBLISHER = {Tankányvkiadá Vállalat, Budapest}, YEAR = {1960}, PAGES = {250}, MRCLASS = {10.00}, MRNUMBER = {0161818 (28 #5022)}, } </syntaxhighlight> <!-- <nowiki>{{</nowiki>#invoke:{{BASEPAGENAME}}|''function_name''}} --> <includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | | <!-- Categories below this line, please; interwikis at Wikidata --> [[Category:Lua metamodules]] }}</includeonly>
Summary:
Please note that all contributions to Stockhub may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Stockhub:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)