This is a 'how to' for putting HTML formatted notes into LaTeX document templates.

Packages, Elements and other repository items are often documented using the notes field. When dealing with notes, RepoDoc offers two notes related properties: Notes and NotesHtml.

In one of our earlier posts we’ve generated a PDF document using one of our LaTex templates. While Notes property can be used in the LaTeX templates as-is, the disadvantage is that the format information is lost, because the Notes property offers plain text output without preserving the formatting. The NotesHtml property contains the notes in the HTML format, but to use it in LaTeX, we need to tell LaTeX processor how to process the HTML code. One way of doing this, is to use a dedicated package like the typehtml package.

To use the HTML notes in your templates first install the typehtml package using the MiKTeX Package Manager.

Then add \usepackage{typehtml} directive at the beginning of your template.

Finally put your code into the document template like this:

\dohtml
<html>
$Element.Notes
</html>

Read the typehtml documentation for more information and examples.

Dealing with HTML entities

Notes may contain special or various national characters. These are represented as HTML entities in the output. Unfortunately typehtml recognizes only a small group of HTML entities. To properly display the entities we need to modify the typehtml package.

The package consists of several files and one of them, namely the typehtml.sty, performs the HTML entity processing. You can find this file under the installation folder of MiKTeX, in our case the path was c:\Users\UserName\AppData\Local\Programs\MiKTeX 2.9\tex\latex\typehtml\typehtml.sty. Simply replace the part of the file dealing with entities (starts with \SGMLentity{amp}{\&}) with the modification below.

\SGMLentity{#32}{ }
\SGMLentity{#33}{!}
\SGMLentity{#34}{"}
\SGMLentity{quot}{"}
\SGMLentity{#35}{\#}
\SGMLentity{#36}{\$}
\SGMLentity{#37}{\%}
\SGMLentity{#38}{\&}
\SGMLentity{amp}{\&}
\SGMLentity{#39}{'}
\SGMLentity{#40}{(}
\SGMLentity{#41}{)}
\SGMLentity{#42}{*}
\SGMLentity{#43}{+}
\SGMLentity{#44}{,}
\SGMLentity{#45}{-}
\SGMLentity{#46}{.}
\SGMLentity{#47}{/}
\SGMLentity{#48}{0}
\SGMLentity{#49}{1}
\SGMLentity{#50}{2}
\SGMLentity{#51}{3}
\SGMLentity{#52}{4}
\SGMLentity{#53}{5}
\SGMLentity{#54}{6}
\SGMLentity{#55}{7}
\SGMLentity{#56}{8}
\SGMLentity{#57}{9}
\SGMLentity{#58}{:}
\SGMLentity{#59}{;}
\SGMLentity{#60}{\ensuremath{<}}
\SGMLentity{lt}{\ensuremath{<}}
\SGMLentity{#61}{=}
\SGMLentity{#62}{\ensuremath{>}}
\SGMLentity{gt}{\ensuremath{>}}
\SGMLentity{#63}{?}
\SGMLentity{#64}{@}
\SGMLentity{#65}{A}
\SGMLentity{#66}{B}
\SGMLentity{#67}{C}
\SGMLentity{#68}{D}
\SGMLentity{#69}{E}
\SGMLentity{#70}{F}
\SGMLentity{#71}{G}
\SGMLentity{#72}{H}
\SGMLentity{#73}{I}
\SGMLentity{#74}{J}
\SGMLentity{#75}{K}
\SGMLentity{#76}{L}
\SGMLentity{#77}{M}
\SGMLentity{#78}{N}
\SGMLentity{#79}{O}
\SGMLentity{#80}{P}
\SGMLentity{#81}{Q}
\SGMLentity{#82}{R}
\SGMLentity{#83}{S}
\SGMLentity{#84}{T}
\SGMLentity{#85}{U}
\SGMLentity{#86}{V}
\SGMLentity{#87}{W}
\SGMLentity{#88}{X}
\SGMLentity{#89}{Y}
\SGMLentity{#90}{Z}
\SGMLentity{#91}{[}
\SGMLentity{#92}{\textbackslash}
\SGMLentity{#93}{]}
\SGMLentity{#94}{\textasciicircum}
\SGMLentity{#95}{\_}
\SGMLentity{#96}{`}
\SGMLentity{#97}{a}
\SGMLentity{#98}{b}
\SGMLentity{#99}{c}
\SGMLentity{#100}{d}
\SGMLentity{#101}{e}
\SGMLentity{#102}{f}
\SGMLentity{#103}{g}
\SGMLentity{#104}{h}
\SGMLentity{#105}{i}
\SGMLentity{#106}{j}
\SGMLentity{#107}{k}
\SGMLentity{#108}{l}
\SGMLentity{#109}{m}
\SGMLentity{#110}{n}
\SGMLentity{#111}{o}
\SGMLentity{#112}{p}
\SGMLentity{#113}{q}
\SGMLentity{#114}{r}
\SGMLentity{#115}{s}
\SGMLentity{#116}{t}
\SGMLentity{#117}{u}
\SGMLentity{#118}{v}
\SGMLentity{#119}{w}
\SGMLentity{#120}{x}
\SGMLentity{#121}{y}
\SGMLentity{#122}{z}
\SGMLentity{#123}{\{}
\SGMLentity{#124}{|}
\SGMLentity{#125}{\}}
\SGMLentity{#126}{\textasciitilde}
\SGMLentity{#192}{À}
\SGMLentity{#193}{Á}
\SGMLentity{#194}{Â}
\SGMLentity{#195}{Ã}
\SGMLentity{#196}{Ä}
\SGMLentity{#197}{Å}
\SGMLentity{#198}{Æ}
\SGMLentity{#199}{Ç}
\SGMLentity{#200}{È}
\SGMLentity{#201}{É}
\SGMLentity{#202}{Ê}
\SGMLentity{#203}{Ë}
\SGMLentity{#204}{Ì}
\SGMLentity{#205}{Í}
\SGMLentity{#206}{Î}
\SGMLentity{#207}{Ï}
\SGMLentity{#208}{Ð}
\SGMLentity{#209}{Ñ}
\SGMLentity{#210}{Ò}
\SGMLentity{#211}{Ó}
\SGMLentity{#212}{Ô}
\SGMLentity{#213}{Õ}
\SGMLentity{#214}{Ö}
\SGMLentity{#216}{Ø}
\SGMLentity{#217}{Ù}
\SGMLentity{#218}{Ú}
\SGMLentity{#219}{Û}
\SGMLentity{#220}{Ü}
\SGMLentity{#221}{Ý}
\SGMLentity{#222}{Þ}
\SGMLentity{#223}{ß}
\SGMLentity{#224}{à}
\SGMLentity{#225}{á}
\SGMLentity{#226}{â}
\SGMLentity{#227}{ã}
\SGMLentity{#228}{ä}
\SGMLentity{#229}{å}
\SGMLentity{#230}{æ}
\SGMLentity{#231}{ç}
\SGMLentity{#232}{è}
\SGMLentity{#233}{é}
\SGMLentity{#234}{ê}
\SGMLentity{#235}{ë}
\SGMLentity{#236}{ì}
\SGMLentity{#237}{í}
\SGMLentity{#238}{î}
\SGMLentity{#239}{ï}
\SGMLentity{#240}{ð}
\SGMLentity{#241}{ñ}
\SGMLentity{#242}{ò}
\SGMLentity{#243}{ó}
\SGMLentity{#244}{ô}
\SGMLentity{#245}{õ}
\SGMLentity{#246}{ö}
\SGMLentity{#248}{ø}
\SGMLentity{#249}{ù}
\SGMLentity{#250}{ú}
\SGMLentity{#251}{û}
\SGMLentity{#252}{ü}
\SGMLentity{#253}{ý}
\SGMLentity{#254}{þ}
\SGMLentity{#255}{ÿ}
\SGMLentity{Agrave}{À}
\SGMLentity{Aacute}{Á}
\SGMLentity{Acirc}{Â}
\SGMLentity{Atilde}{Ã}
\SGMLentity{Auml}{Ä}
\SGMLentity{Aring}{Å}
\SGMLentity{AElig}{Æ}
\SGMLentity{Ccedil}{Ç}
\SGMLentity{Egrave}{È}
\SGMLentity{Eacute}{É}
\SGMLentity{Ecirc}{Ê}
\SGMLentity{Euml}{Ë}
\SGMLentity{Igrave}{Ì}
\SGMLentity{Iacute}{Í}
\SGMLentity{Icirc}{Î}
\SGMLentity{Iuml}{Ï}
\SGMLentity{ETH}{Ð}
\SGMLentity{Ntilde}{Ñ}
\SGMLentity{Ograve}{Ò}
\SGMLentity{Oacute}{Ó}
\SGMLentity{Ocirc}{Ô}
\SGMLentity{Otilde}{Õ}
\SGMLentity{Ouml}{Ö}
\SGMLentity{Oslash}{Ø}
\SGMLentity{Ugrave}{Ù}
\SGMLentity{Uacute}{Ú}
\SGMLentity{Ucirc}{Û}
\SGMLentity{Uuml}{Ü}
\SGMLentity{Yacute}{Ý}
\SGMLentity{THORN}{Þ}
\SGMLentity{szlig}{ß}
\SGMLentity{agrave}{à}
\SGMLentity{aacute}{á}
\SGMLentity{acirc}{â}
\SGMLentity{atilde}{ã}
\SGMLentity{auml}{ä}
\SGMLentity{aring}{å}
\SGMLentity{aelig}{æ}
\SGMLentity{ccedil}{ç}
\SGMLentity{egrave}{è}
\SGMLentity{eacute}{é}
\SGMLentity{ecirc}{ê}
\SGMLentity{euml}{ë}
\SGMLentity{igrave}{ì}
\SGMLentity{iacute}{í}
\SGMLentity{icirc}{î}
\SGMLentity{iuml}{ï}
\SGMLentity{eth}{ð}
\SGMLentity{ntilde}{ñ}
\SGMLentity{ograve}{ò}
\SGMLentity{oacute}{ó}
\SGMLentity{ocirc}{ô}
\SGMLentity{otilde}{õ}
\SGMLentity{ouml}{ö}
\SGMLentity{oslash}{ø}
\SGMLentity{ugrave}{ù}
\SGMLentity{uacute}{ú}
\SGMLentity{ucirc}{û}
\SGMLentity{uuml}{ü}
\SGMLentity{yacute}{ý}
\SGMLentity{thorn}{þ}
\SGMLentity{yuml}{ÿ}
\SGMLentity{#160}{ }
\SGMLentity{#161}{¡}
\SGMLentity{#162}{¢}
\SGMLentity{#163}{£}
\SGMLentity{#164}{¤}
\SGMLentity{#165}{¥}
\SGMLentity{#166}{¦}
\SGMLentity{#167}{§}
\SGMLentity{#168}{¨}
\SGMLentity{#169}{©}
\SGMLentity{#170}{ª}
\SGMLentity{#171}{«}
\SGMLentity{#172}{¬}
\SGMLentity{#173}{­}
\SGMLentity{#174}{®}
\SGMLentity{#175}{¯}
\SGMLentity{#176}{°}
\SGMLentity{#177}{±}
\SGMLentity{#178}{²}
\SGMLentity{#179}{³}
\SGMLentity{#180}{´}
\SGMLentity{#181}{µ}
\SGMLentity{#182}{¶}
\SGMLentity{#184}{¸}
\SGMLentity{#185}{¹}
\SGMLentity{#186}{º}
\SGMLentity{#187}{»}
\SGMLentity{#188}{¼}
\SGMLentity{#189}{½}
\SGMLentity{#190}{¾}
\SGMLentity{#191}{¿}
\SGMLentity{#215}{×}
\SGMLentity{#247}{÷}
\SGMLentity{nbsp}{}
\SGMLentity{iexcl}{¡}
\SGMLentity{cent}{¢}
\SGMLentity{pound}{£}
\SGMLentity{curren}{¤}
\SGMLentity{yen}{¥}
\SGMLentity{brvbar}{¦}
\SGMLentity{sect}{§}
\SGMLentity{uml}{¨}
\SGMLentity{copy}{©}
\SGMLentity{ordf}{ª}
\SGMLentity{laquo}{«}
\SGMLentity{not}{¬}
\SGMLentity{shy}{­}
\SGMLentity{reg}{®}
\SGMLentity{macr}{¯}
\SGMLentity{deg}{°}
\SGMLentity{plusmn}{±}
\SGMLentity{sup2}{²}
\SGMLentity{sup3}{³}
\SGMLentity{acute}{´}
\SGMLentity{micro}{µ}
\SGMLentity{para}{¶}
\SGMLentity{cedil}{¸}
\SGMLentity{sup1}{¹}
\SGMLentity{ordm}{º}
\SGMLentity{raquo}{»}
\SGMLentity{frac14}{¼}
\SGMLentity{frac12}{½}
\SGMLentity{frac34}{¾}
\SGMLentity{iquest}{¿}
\SGMLentity{times}{×}
\SGMLentity{divide}{÷}
\SGMLentity{#8704}{∀}
\SGMLentity{#8706}{∂}
\SGMLentity{#8707}{∃}
\SGMLentity{#8709}{∅}
\SGMLentity{#8711}{∇}
\SGMLentity{#8712}{∈}
\SGMLentity{#8713}{∉}
\SGMLentity{#8715}{∋}
\SGMLentity{#8719}{∏}
\SGMLentity{#8721}{∑}
\SGMLentity{#8722}{−}
\SGMLentity{#8727}{∗}
\SGMLentity{#8730}{√}
\SGMLentity{#8733}{∝}
\SGMLentity{#8734}{∞}
\SGMLentity{#8736}{∠}
\SGMLentity{#8743}{∧}
\SGMLentity{#8744}{∨}
\SGMLentity{#8745}{∩}
\SGMLentity{#8746}{∪}
\SGMLentity{#8747}{∫}
\SGMLentity{#8756}{∴}
\SGMLentity{#8764}{∼}
\SGMLentity{#8773}{≅}
\SGMLentity{#8776}{≈}
\SGMLentity{#8800}{≠}
\SGMLentity{#8801}{≡}
\SGMLentity{#8804}{≤}
\SGMLentity{#8805}{≥}
\SGMLentity{#8834}{⊂}
\SGMLentity{#8835}{⊃}
\SGMLentity{#8836}{⊄}
\SGMLentity{#8838}{⊆}
\SGMLentity{#8839}{⊇}
\SGMLentity{#8853}{⊕}
\SGMLentity{#8855}{⊗}
\SGMLentity{#8869}{⊥}
\SGMLentity{#8901}{⋅}
\SGMLentity{forall}{∀}
\SGMLentity{part}{∂}
\SGMLentity{exist}{∃}
\SGMLentity{empty}{∅}
\SGMLentity{nabla}{∇}
\SGMLentity{isin}{∈}
\SGMLentity{notin}{∉}
\SGMLentity{ni}{∋}
\SGMLentity{prod}{∏}
\SGMLentity{sum}{∑}
\SGMLentity{minus}{−}
\SGMLentity{lowast}{∗}
\SGMLentity{radic}{√}
\SGMLentity{prop}{∝}
\SGMLentity{infin}{∞}
\SGMLentity{ang}{∠}
\SGMLentity{and}{∧}
\SGMLentity{or}{∨}
\SGMLentity{cap}{∩}
\SGMLentity{cup}{∪}
\SGMLentity{int}{∫}
\SGMLentity{there4}{∴}
\SGMLentity{sim}{∼}
\SGMLentity{cong}{≅}
\SGMLentity{asymp}{≈}
\SGMLentity{ne}{≠}
\SGMLentity{equiv}{≡}
\SGMLentity{le}{≤}
\SGMLentity{ge}{≥}
\SGMLentity{sub}{⊂}
\SGMLentity{sup}{⊃}
\SGMLentity{nsub}{⊄}
\SGMLentity{sube}{⊆}
\SGMLentity{supe}{⊇}
\SGMLentity{oplus}{⊕}
\SGMLentity{otimes}{⊗}
\SGMLentity{perp}{⊥}
\SGMLentity{sdot}{⋅}
\SGMLentity{#913}{Α}
\SGMLentity{#914}{Β}
\SGMLentity{#915}{Γ}
\SGMLentity{#916}{Δ}
\SGMLentity{#917}{Ε}
\SGMLentity{#918}{Ζ}
\SGMLentity{#919}{Η}
\SGMLentity{#920}{Θ}
\SGMLentity{#921}{Ι}
\SGMLentity{#922}{Κ}
\SGMLentity{#923}{Λ}
\SGMLentity{#924}{Μ}
\SGMLentity{#925}{Ν}
\SGMLentity{#926}{Ξ}
\SGMLentity{#927}{Ο}
\SGMLentity{#928}{Π}
\SGMLentity{#929}{Ρ}
\SGMLentity{#931}{Σ}
\SGMLentity{#932}{Τ}
\SGMLentity{#933}{Υ}
\SGMLentity{#934}{Φ}
\SGMLentity{#935}{Χ}
\SGMLentity{#936}{Ψ}
\SGMLentity{#937}{Ω}
\SGMLentity{#945}{α}
\SGMLentity{#946}{β}
\SGMLentity{#947}{γ}
\SGMLentity{#948}{δ}
\SGMLentity{#949}{ε}
\SGMLentity{#950}{ζ}
\SGMLentity{#951}{η}
\SGMLentity{#952}{θ}
\SGMLentity{#953}{ι}
\SGMLentity{#954}{κ}
\SGMLentity{#955}{λ}
\SGMLentity{#956}{μ}
\SGMLentity{#957}{ν}
\SGMLentity{#958}{ξ}
\SGMLentity{#959}{ο}
\SGMLentity{#960}{π}
\SGMLentity{#961}{ρ}
\SGMLentity{#962}{ς}
\SGMLentity{#963}{σ}
\SGMLentity{#964}{τ}
\SGMLentity{#965}{υ}
\SGMLentity{#966}{φ}
\SGMLentity{#967}{χ}
\SGMLentity{#968}{ψ}
\SGMLentity{#969}{ω}
\SGMLentity{#977}{ϑ}
\SGMLentity{#978}{ϒ}
\SGMLentity{#982}{ϖ}
\SGMLentity{Alpha}{Α}
\SGMLentity{Beta}{Β}
\SGMLentity{Gamma}{Γ}
\SGMLentity{Delta}{Δ}
\SGMLentity{Epsilon}{Ε}
\SGMLentity{Zeta}{Ζ}
\SGMLentity{Eta}{Η}
\SGMLentity{Theta}{Θ}
\SGMLentity{Iota}{Ι}
\SGMLentity{Kappa}{Κ}
\SGMLentity{Lambda}{Λ}
\SGMLentity{Mu}{Μ}
\SGMLentity{Nu}{Ν}
\SGMLentity{Xi}{Ξ}
\SGMLentity{Omicron}{Ο}
\SGMLentity{Pi}{Π}
\SGMLentity{Rho}{Ρ}
\SGMLentity{Sigma}{Σ}
\SGMLentity{Tau}{Τ}
\SGMLentity{Upsilon}{Υ}
\SGMLentity{Phi}{Φ}
\SGMLentity{Chi}{Χ}
\SGMLentity{Psi}{Ψ}
\SGMLentity{Omega}{Ω}
\SGMLentity{alpha}{α}
\SGMLentity{beta}{β}
\SGMLentity{gamma}{γ}
\SGMLentity{delta}{δ}
\SGMLentity{epsilon}{ε}
\SGMLentity{zeta}{ζ}
\SGMLentity{eta}{η}
\SGMLentity{theta}{θ}
\SGMLentity{iota}{ι}
\SGMLentity{kappa}{κ}
\SGMLentity{lambda}{λ}
\SGMLentity{mu}{μ}
\SGMLentity{nu}{ν}
\SGMLentity{xi}{ξ}
\SGMLentity{omicron}{ο}
\SGMLentity{pi}{π}
\SGMLentity{rho}{ρ}
\SGMLentity{sigmaf}{ς}
\SGMLentity{sigma}{σ}
\SGMLentity{tau}{τ}
\SGMLentity{upsilon}{υ}
\SGMLentity{phi}{φ}
\SGMLentity{chi}{χ}
\SGMLentity{psi}{ψ}
\SGMLentity{omega}{ω}
\SGMLentity{thetasym}{ϑ}
\SGMLentity{upsih}{ϒ}
\SGMLentity{piv}{ϖ}
\SGMLentity{#338}{Œ}
\SGMLentity{#339}{œ}
\SGMLentity{#352}{Š}
\SGMLentity{#353}{š}
\SGMLentity{#376}{Ÿ}
\SGMLentity{#402}{ƒ}
\SGMLentity{#710}{ˆ}
\SGMLentity{#8211}{–}
\SGMLentity{#8212}{—}
\SGMLentity{#8216}{‘}
\SGMLentity{#8217}{’}
\SGMLentity{#8218}{‚}
\SGMLentity{#8220}{“}
\SGMLentity{#8221}{”}
\SGMLentity{#8222}{„}
\SGMLentity{#8224}{†}
\SGMLentity{#8225}{‡}
\SGMLentity{#8226}{•}
\SGMLentity{#8230}{…}
\SGMLentity{#8240}{‰}
\SGMLentity{#8242}{′}
\SGMLentity{#8243}{″}
\SGMLentity{#8249}{‹}
\SGMLentity{#8250}{›}
\SGMLentity{#8254}{‾}
\SGMLentity{#8364}{€}
\SGMLentity{#8482}{™}
\SGMLentity{#8592}{←}
\SGMLentity{#8593}{↑}
\SGMLentity{#8594}{→}
\SGMLentity{#8595}{↓}
\SGMLentity{#8596}{↔}
\SGMLentity{#8629}{↵}
\SGMLentity{#8968}{⌈}
\SGMLentity{#8969}{⌉}
\SGMLentity{#8970}{⌊}
\SGMLentity{#8971}{⌋}
\SGMLentity{#9674}{◊}
\SGMLentity{#9824}{♠}
\SGMLentity{#9827}{♣}
\SGMLentity{#9829}{♥}
\SGMLentity{#9830}{♦}
\SGMLentity{OElig}{Œ}
\SGMLentity{oelig}{œ}
\SGMLentity{Scaron}{Š}
\SGMLentity{scaron}{š}
\SGMLentity{Yuml}{Ÿ}
\SGMLentity{fnof}{ƒ}
\SGMLentity{circ}{ˆ}
\SGMLentity{ndash}{–}
\SGMLentity{mdash}{—}
\SGMLentity{lsquo}{‘}
\SGMLentity{rsquo}{’}
\SGMLentity{sbquo}{‚}
\SGMLentity{ldquo}{“}
\SGMLentity{rdquo}{”}
\SGMLentity{bdquo}{„}
\SGMLentity{dagger}{†}
\SGMLentity{Dagger}{‡}
\SGMLentity{bull}{•}
\SGMLentity{hellip}{…}
\SGMLentity{permil}{‰}
\SGMLentity{prime}{′}
\SGMLentity{Prime}{″}
\SGMLentity{lsaquo}{‹}
\SGMLentity{rsaquo}{›}
\SGMLentity{oline}{‾}
\SGMLentity{euro}{€}
\SGMLentity{trade}{™}
\SGMLentity{larr}{←}
\SGMLentity{uarr}{↑}
\SGMLentity{rarr}{→}
\SGMLentity{darr}{↓}
\SGMLentity{harr}{↔}
\SGMLentity{crarr}{↵}
\SGMLentity{lceil}{⌈}
\SGMLentity{rceil}{⌉}
\SGMLentity{lfloor}{⌊}
\SGMLentity{rfloor}{⌋}
\SGMLentity{loz}{◊}
\SGMLentity{spades}{♠}
\SGMLentity{clubs}{♣}
\SGMLentity{hearts}{♥}
\SGMLentity{diams}{♦}