Commit 69665ef2 authored by Dimitri van Heesch's avatar Dimitri van Heesch

Merge branch 'feature/html_entities' of...

Merge branch 'feature/html_entities' of https://github.com/albert-github/doxygen into albert-github-feature/html_entities
parents c625dc78 1bd64ac0
......@@ -24,7 +24,9 @@
\usepackage{color}
\usepackage{ifthen}
\usepackage[table]{xcolor}
\PassOptionsToPackage{warn}{textcomp}
\usepackage{textcomp}
\usepackage[nointegrals]{wasysym}
\usepackage{alltt}
\usepackage{ifpdf}
\ifpdf
......
This diff is collapsed.
......@@ -390,94 +390,7 @@
<xsd:element name="anchor" type="docAnchorType" />
<xsd:element name="formula" type="docFormulaType" />
<xsd:element name="ref" type="docRefTextType" />
<xsd:element name="copy" type="docEmptyType" />
<xsd:element name="trademark" type="docEmptyType" />
<xsd:element name="registered" type="docEmptyType" />
<xsd:element name="lsquo" type="docEmptyType" />
<xsd:element name="rsquo" type="docEmptyType" />
<xsd:element name="ldquo" type="docEmptyType" />
<xsd:element name="rdquo" type="docEmptyType" />
<xsd:element name="ndash" type="docEmptyType" />
<xsd:element name="mdash" type="docEmptyType" />
<xsd:element name="umlaut" type="docCharType" />
<xsd:element name="acute" type="docCharType" />
<xsd:element name="grave" type="docCharType" />
<xsd:element name="circ" type="docCharType" />
<xsd:element name="slash" type="docCharType" />
<xsd:element name="tilde" type="docCharType" />
<xsd:element name="cedil" type="docCharType" />
<xsd:element name="ring" type="docCharType" />
<xsd:element name="szlig" type="docEmptyType" />
<xsd:element name="nonbreakablespace" type="docEmptyType" />
<xsd:element name="aelig" type="docEmptyType" />
<xsd:element name="AElig" type="docEmptyType" />
<xsd:element name="Gamma" type="docEmptyType" />
<xsd:element name="Delta" type="docEmptyType" />
<xsd:element name="Theta" type="docEmptyType" />
<xsd:element name="Lambda" type="docEmptyType" />
<xsd:element name="Xi" type="docEmptyType" />
<xsd:element name="Pi" type="docEmptyType" />
<xsd:element name="Sigma" type="docEmptyType" />
<xsd:element name="Upsilon" type="docEmptyType" />
<xsd:element name="Phi" type="docEmptyType" />
<xsd:element name="Psi" type="docEmptyType" />
<xsd:element name="Omega" type="docEmptyType" />
<xsd:element name="alpha" type="docEmptyType" />
<xsd:element name="beta" type="docEmptyType" />
<xsd:element name="gamma" type="docEmptyType" />
<xsd:element name="delta" type="docEmptyType" />
<xsd:element name="epsilon" type="docEmptyType" />
<xsd:element name="zeta" type="docEmptyType" />
<xsd:element name="eta" type="docEmptyType" />
<xsd:element name="theta" type="docEmptyType" />
<xsd:element name="iota" type="docEmptyType" />
<xsd:element name="kappa" type="docEmptyType" />
<xsd:element name="lambda" type="docEmptyType" />
<xsd:element name="mu" type="docEmptyType" />
<xsd:element name="nu" type="docEmptyType" />
<xsd:element name="xi" type="docEmptyType" />
<xsd:element name="pi" type="docEmptyType" />
<xsd:element name="rho" type="docEmptyType" />
<xsd:element name="sigma" type="docEmptyType" />
<xsd:element name="tau" type="docEmptyType" />
<xsd:element name="upsilon" type="docEmptyType" />
<xsd:element name="phi" type="docEmptyType" />
<xsd:element name="chi" type="docEmptyType" />
<xsd:element name="psi" type="docEmptyType" />
<xsd:element name="omega" type="docEmptyType" />
<xsd:element name="sigmaf" type="docEmptyType" />
<xsd:element name="sect" type="docEmptyType" />
<xsd:element name="deg" type="docEmptyType" />
<xsd:element name="prime" type="docEmptyType" />
<xsd:element name="Prime" type="docEmptyType" />
<xsd:element name="infin" type="docEmptyType" />
<xsd:element name="empty" type="docEmptyType" />
<xsd:element name="plusmn" type="docEmptyType" />
<xsd:element name="times" type="docEmptyType" />
<xsd:element name="minus" type="docEmptyType" />
<xsd:element name="sdot" type="docEmptyType" />
<xsd:element name="part" type="docEmptyType" />
<xsd:element name="nabla" type="docEmptyType" />
<xsd:element name="radic" type="docEmptyType" />
<xsd:element name="perp" type="docEmptyType" />
<xsd:element name="sum" type="docEmptyType" />
<xsd:element name="int" type="docEmptyType" />
<xsd:element name="prod" type="docEmptyType" />
<xsd:element name="sim" type="docEmptyType" />
<xsd:element name="asymp" type="docEmptyType" />
<xsd:element name="ne" type="docEmptyType" />
<xsd:element name="equiv" type="docEmptyType" />
<xsd:element name="prop" type="docEmptyType" />
<xsd:element name="le" type="docEmptyType" />
<xsd:element name="ge" type="docEmptyType" />
<xsd:element name="larr" type="docEmptyType" />
<xsd:element name="rarr" type="docEmptyType" />
<xsd:element name="isin" type="docEmptyType" />
<xsd:element name="notin" type="docEmptyType" />
<xsd:element name="lceil" type="docEmptyType" />
<xsd:element name="rceil" type="docEmptyType" />
<xsd:element name="lfloor" type="docEmptyType" />
<xsd:element name="rfloor" type="docEmptyType" />
<!-- Automatically insert here the HTML entities -->
</xsd:choice>
</xsd:group>
......@@ -717,10 +630,6 @@
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="docCharType">
<xsd:attribute name="char" type="DoxCharRange"/>
</xsd:complexType>
<xsd:complexType name="docEmptyType"/>
<!-- Simple types -->
......
......@@ -73,109 +73,14 @@ void DocbookDocVisitor::visit(DocWhiteSpace *w)
void DocbookDocVisitor::visit(DocSymbol *s)
{
if (m_hide) return;
switch(s->symbol())
const char *res = get_symbol_docbook(s->symbol());
if (res)
{
case DocSymbol::BSlash: m_t << "\\"; break;
case DocSymbol::At: m_t << "@"; break;
case DocSymbol::Less: m_t << "&lt;"; break;
case DocSymbol::Greater: m_t << "&gt;"; break;
case DocSymbol::Amp: m_t << "&amp;"; break;
case DocSymbol::Dollar: m_t << "$"; break;
case DocSymbol::Hash: m_t << "#"; break;
case DocSymbol::DoubleColon: m_t << "::"; break;
case DocSymbol::Percent: m_t << "%"; break;
case DocSymbol::Copy: m_t << "&#x00A9;"; break;
case DocSymbol::Tm: m_t << "&#8482;"; break;
case DocSymbol::Reg: m_t << "&#174;"; break;
case DocSymbol::Apos: m_t << "&apos;"; break;
case DocSymbol::Quot: m_t << "&quot;"; break;
case DocSymbol::Lsquo: m_t << "&#8216;"; break;
case DocSymbol::Rsquo: m_t << "&#8217;"; break;
case DocSymbol::Ldquo: m_t << "&#8220;"; break;
case DocSymbol::Rdquo: m_t << "&#8221;"; break;
case DocSymbol::Ndash: m_t << "&#8211;"; break;
case DocSymbol::Mdash: m_t << "&#8212;"; break;
case DocSymbol::Uml: m_t << "&#168;"; break;
case DocSymbol::Acute: m_t << "&#180;"; break;
case DocSymbol::Grave: m_t << "&#192;"; break;
case DocSymbol::Circ: m_t << "&#710;"; break;
case DocSymbol::Tilde: m_t << "&#732;"; break;
case DocSymbol::Szlig: m_t << "&#223;"; break;
case DocSymbol::Cedil: m_t << "&#184;"; break;
case DocSymbol::Ring: m_t << "&#197;"; break;
case DocSymbol::Slash: m_t << "&#216;"; break;
case DocSymbol::Nbsp: m_t << "&#160;"; break;
case DocSymbol::Aelig: m_t << "&#230;"; break;
case DocSymbol::AElig: m_t << "&#198;"; break;
case DocSymbol::GrkGamma: m_t << "&#915;"; break;
case DocSymbol::GrkDelta: m_t << "&#916;"; break;
case DocSymbol::GrkTheta: m_t << "&#920;"; break;
case DocSymbol::GrkLambda: m_t << "&#923;"; break;
case DocSymbol::GrkXi: m_t << "&#926;"; break;
case DocSymbol::GrkPi: m_t << "&#928;"; break;
case DocSymbol::GrkSigma: m_t << "&#931;"; break;
case DocSymbol::GrkUpsilon: m_t << "&#933;"; break;
case DocSymbol::GrkPhi: m_t << "&#934;"; break;
case DocSymbol::GrkPsi: m_t << "&#936;"; break;
case DocSymbol::GrkOmega: m_t << "&#937;"; break;
case DocSymbol::Grkalpha: m_t << "&#945;"; break;
case DocSymbol::Grkbeta: m_t << "&#946;"; break;
case DocSymbol::Grkgamma: m_t << "&#947;"; break;
case DocSymbol::Grkdelta: m_t << "&#948;"; break;
case DocSymbol::Grkepsilon: m_t << "&#949;"; break;
case DocSymbol::Grkzeta: m_t << "&#950;"; break;
case DocSymbol::Grketa: m_t << "&#951;"; break;
case DocSymbol::Grktheta: m_t << "&#952;"; break;
case DocSymbol::Grkiota: m_t << "&#953;"; break;
case DocSymbol::Grkkappa: m_t << "&#954;"; break;
case DocSymbol::Grklambda: m_t << "&#955;"; break;
case DocSymbol::Grkmu: m_t << "&#956;"; break;
case DocSymbol::Grknu: m_t << "&#957;"; break;
case DocSymbol::Grkxi: m_t << "&#958;"; break;
case DocSymbol::Grkpi: m_t << "&#960;"; break;
case DocSymbol::Grkrho: m_t << "&#961;"; break;
case DocSymbol::Grksigma: m_t << "&#963;"; break;
case DocSymbol::Grktau: m_t << "&#964;"; break;
case DocSymbol::Grkupsilon: m_t << "&#965;"; break;
case DocSymbol::Grkphi: m_t << "&#966;"; break;
case DocSymbol::Grkchi: m_t << "&#967;"; break;
case DocSymbol::Grkpsi: m_t << "&#968;"; break;
case DocSymbol::Grkomega: m_t << "&#969;"; break;
case DocSymbol::Grkvarsigma: m_t << "&#962;"; break;
case DocSymbol::Section: m_t << "<simplesect/>"; break;
case DocSymbol::Degree: m_t << "&#176;"; break;
case DocSymbol::Prime: m_t << "&#8242;"; break;
case DocSymbol::DoublePrime: m_t << "&#8243;"; break;
case DocSymbol::Infinity: m_t << "&#8734;"; break;
case DocSymbol::EmptySet: m_t << "&#8709;"; break;
case DocSymbol::PlusMinus: m_t << "&#177;"; break;
case DocSymbol::Times: m_t << "&#215;"; break;
case DocSymbol::Minus: m_t << "&#8722;"; break;
case DocSymbol::CenterDot: m_t << "&#8901;"; break;
case DocSymbol::Partial: m_t << "&#8706;"; break;
case DocSymbol::Nabla: m_t << "&#8711;"; break;
case DocSymbol::SquareRoot: m_t << "&#8730;"; break;
case DocSymbol::Perpendicular: m_t << "&#8869;"; break;
case DocSymbol::Sum: m_t << "&#8721;"; break;
case DocSymbol::Integral: m_t << "&#8747;"; break;
case DocSymbol::Product: m_t << "&#8719;"; break;
case DocSymbol::Similar: m_t << "&#8764;"; break;
case DocSymbol::Approx: m_t << "&#8776;"; break;
case DocSymbol::NotEqual: m_t << "&#8800;"; break;
case DocSymbol::Equivalent: m_t << "&#8801;"; break;
case DocSymbol::Proportional: m_t << "&#8733;"; break;
case DocSymbol::LessEqual: m_t << "&#8804;"; break;
case DocSymbol::GreaterEqual: m_t << "&#8805;"; break;
case DocSymbol::LeftArrow: m_t << "&#8592;"; break;
case DocSymbol::RightArrow: m_t << "&#8594;"; break;
case DocSymbol::SetIn: m_t << "&#8712;"; break;
case DocSymbol::SetNotIn: m_t << "&#8713;"; break;
case DocSymbol::LeftCeil: m_t << "&#8968;"; break;
case DocSymbol::RightCeil: m_t << "&#8969;"; break;
case DocSymbol::LeftFloor: m_t << "&#8970;"; break;
case DocSymbol::RightFloor: m_t << "&#8971;"; break;
default:
err("unknown symbol found\n");
m_t << res;
}
else
{
err("DocBook: non supported HTML-entity found: &%s;\n",get_symbol_item(s->symbol()));
}
}
......
This diff is collapsed.
......@@ -336,34 +336,84 @@ class DocStyleChange : public DocNode
class DocSymbol : public DocNode
{
public:
enum SymType { Unknown=0, BSlash, At, Less, Greater, Amp, Dollar, Hash,
DoubleColon, Percent, Copy, Tm, Reg, Apos, Quot, Uml, Acute,
Grave, Circ, Tilde, Szlig, Cedil, Ring, Nbsp, Slash,
Lsquo, Rsquo, Ldquo, Rdquo, Ndash, Mdash, Aelig, AElig,
GrkGamma, GrkDelta, GrkTheta, GrkLambda, GrkXi, GrkPi,
GrkSigma, GrkUpsilon, GrkPhi, GrkPsi, GrkOmega, Grkalpha,
Grkbeta, Grkgamma, Grkdelta, Grkepsilon, Grkzeta, Grketa,
Grktheta, Grkiota, Grkkappa, Grklambda, Grkmu, Grknu, Grkxi,
Grkpi, Grkrho, Grksigma, Grktau, Grkupsilon, Grkphi, Grkchi,
Grkpsi, Grkomega, Grkvarsigma, Section, Degree, Prime,
DoublePrime, Infinity, EmptySet, PlusMinus, Times, Minus,
CenterDot, Partial, Nabla, SquareRoot, Perpendicular, Sum,
Integral, Product, Similar, Approx, NotEqual, Equivalent,
Proportional, LessEqual, GreaterEqual, LeftArrow, RightArrow,
SetIn, SetNotIn, LeftCeil, RightCeil, LeftFloor, RightFloor,
Pipe
enum SymType { Sym_Unknown = -1,
Sym_nbsp, Sym_iexcl, Sym_cent, Sym_pound, Sym_curren,
Sym_yen, Sym_brvbar, Sym_sect, Sym_uml, Sym_copy,
Sym_ordf, Sym_laquo, Sym_not, Sym_shy, Sym_reg,
Sym_macr, Sym_deg, Sym_plusmn, Sym_sup2, Sym_sup3,
Sym_acute, Sym_micro, Sym_para, Sym_middot, Sym_cedil,
Sym_sup1, Sym_ordm, Sym_raquo, Sym_frac14, Sym_frac12,
Sym_frac34, Sym_iquest, Sym_Agrave, Sym_Aacute, Sym_Acirc,
Sym_Atilde, Sym_Auml, Sym_Aring, Sym_AElig, Sym_Ccedil,
Sym_Egrave, Sym_Eacute, Sym_Ecirc, Sym_Euml, Sym_Igrave,
Sym_Iacute, Sym_Icirc, Sym_Iuml, Sym_ETH, Sym_Ntilde,
Sym_Ograve, Sym_Oacute, Sym_Ocirc, Sym_Otilde, Sym_Ouml,
Sym_times, Sym_Oslash, Sym_Ugrave, Sym_Uacute, Sym_Ucirc,
Sym_Uuml, Sym_Yacute, Sym_THORN, Sym_szlig, Sym_agrave,
Sym_aacute, Sym_acirc, Sym_atilde, Sym_auml, Sym_aring,
Sym_aelig, Sym_ccedil, Sym_egrave, Sym_eacute, Sym_ecirc,
Sym_euml, Sym_igrave, Sym_iacute, Sym_icirc, Sym_iuml,
Sym_eth, Sym_ntilde, Sym_ograve, Sym_oacute, Sym_ocirc,
Sym_otilde, Sym_ouml, Sym_divide, Sym_oslash, Sym_ugrave,
Sym_uacute, Sym_ucirc, Sym_uuml, Sym_yacute, Sym_thorn,
Sym_yuml, Sym_fnof, Sym_Alpha, Sym_Beta, Sym_Gamma,
Sym_Delta, Sym_Epsilon, Sym_Zeta, Sym_Eta, Sym_Theta,
Sym_Iota, Sym_Kappa, Sym_Lambda, Sym_Mu, Sym_Nu,
Sym_Xi, Sym_Omicron, Sym_Pi, Sym_Rho, Sym_Sigma,
Sym_Tau, Sym_Upsilon, Sym_Phi, Sym_Chi, Sym_Psi,
Sym_Omega, Sym_alpha, Sym_beta, Sym_gamma, Sym_delta,
Sym_epsilon, Sym_zeta, Sym_eta, Sym_theta, Sym_iota,
Sym_kappa, Sym_lambda, Sym_mu, Sym_nu, Sym_xi,
Sym_omicron, Sym_pi, Sym_rho, Sym_sigmaf, Sym_sigma,
Sym_tau, Sym_upsilon, Sym_phi, Sym_chi, Sym_psi,
Sym_omega, Sym_thetasym, Sym_upsih, Sym_piv, Sym_bull,
Sym_hellip, Sym_prime, Sym_Prime, Sym_oline, Sym_frasl,
Sym_weierp, Sym_image, Sym_real, Sym_trade, Sym_alefsym,
Sym_larr, Sym_uarr, Sym_rarr, Sym_darr, Sym_harr,
Sym_crarr, Sym_lArr, Sym_uArr, Sym_rArr, Sym_dArr,
Sym_hArr, Sym_forall, Sym_part, Sym_exist, Sym_empty,
Sym_nabla, Sym_isin, Sym_notin, Sym_ni, Sym_prod,
Sym_sum, Sym_minus, Sym_lowast, Sym_radic, Sym_prop,
Sym_infin, Sym_ang, Sym_and, Sym_or, Sym_cap,
Sym_cup, Sym_int, Sym_there4, Sym_sim, Sym_cong,
Sym_asymp, Sym_ne, Sym_equiv, Sym_le, Sym_ge,
Sym_sub, Sym_sup, Sym_nsub, Sym_sube, Sym_supe,
Sym_oplus, Sym_otimes, Sym_perp, Sym_sdot, Sym_lceil,
Sym_rceil, Sym_lfloor, Sym_rfloor, Sym_lang, Sym_rang,
Sym_loz, Sym_spades, Sym_clubs, Sym_hearts, Sym_diams,
Sym_quot, Sym_amp, Sym_lt, Sym_gt, Sym_OElig,
Sym_oelig, Sym_Scaron, Sym_scaron, Sym_Yuml, Sym_circ,
Sym_tilde, Sym_ensp, Sym_emsp, Sym_thinsp, Sym_zwnj,
Sym_zwj, Sym_lrm, Sym_rlm, Sym_ndash, Sym_mdash,
Sym_lsquo, Sym_rsquo, Sym_sbquo, Sym_ldquo, Sym_rdquo,
Sym_bdquo, Sym_dagger, Sym_Dagger, Sym_permil, Sym_lsaquo,
Sym_rsaquo, Sym_euro,
/* doxygen extensions */
Sym_tm, Sym_apos,
/* doxygen commands mapped */
Sym_BSlash, Sym_At, Sym_Less, Sym_Greater, Sym_Amp,
Sym_Dollar, Sym_Hash, Sym_DoubleColon, Sym_Percent, Sym_Pipe,
Sym_Quot
};
DocSymbol(DocNode *parent,SymType s,char letter='\0') :
m_symbol(s), m_letter(letter) { m_parent = parent; }
enum PerlType { Perl_unknown = 0, Perl_string, Perl_char, Perl_symbol, Perl_umlaut,
Perl_acute, Perl_grave, Perl_circ, Perl_slash, Perl_tilde,
Perl_cedilla, Perl_ring
};
typedef struct PerlSymb {
const char *symb;
const PerlType type;
}PerlSymb;
DocSymbol(DocNode *parent,SymType s) :
m_symbol(s) { m_parent = parent; }
SymType symbol() const { return m_symbol; }
char letter() const { return m_letter; }
Kind kind() const { return Kind_Symbol; }
void accept(DocVisitor *v) { v->visit(this); }
static SymType decodeSymbol(const QCString &symName,char *letter);
static SymType decodeSymbol(const QCString &symName);
private:
SymType m_symbol;
char m_letter;
};
/** Node representing some amount of white space */
......
......@@ -182,110 +182,14 @@ void HtmlDocVisitor::visit(DocWhiteSpace *w)
void HtmlDocVisitor::visit(DocSymbol *s)
{
if (m_hide) return;
switch(s->symbol())
{
case DocSymbol::BSlash: m_t << "\\"; break;
case DocSymbol::At: m_t << "@"; break;
case DocSymbol::Less: m_t << "&lt;"; break;
case DocSymbol::Greater: m_t << "&gt;"; break;
case DocSymbol::Amp: m_t << "&amp;"; break;
case DocSymbol::Dollar: m_t << "$"; break;
case DocSymbol::Hash: m_t << "#"; break;
case DocSymbol::DoubleColon: m_t << "::"; break;
case DocSymbol::Percent: m_t << "%"; break;
case DocSymbol::Pipe: m_t << "|"; break;
case DocSymbol::Copy: m_t << "&copy;"; break;
case DocSymbol::Tm: m_t << "&trade;"; break;
case DocSymbol::Reg: m_t << "&reg;"; break;
case DocSymbol::Apos: m_t << "'"; break;
case DocSymbol::Quot: m_t << "\""; break;
case DocSymbol::Lsquo: m_t << "&lsquo;"; break;
case DocSymbol::Rsquo: m_t << "&rsquo;"; break;
case DocSymbol::Ldquo: m_t << "&ldquo;"; break;
case DocSymbol::Rdquo: m_t << "&rdquo;"; break;
case DocSymbol::Ndash: m_t << "&ndash;"; break;
case DocSymbol::Mdash: m_t << "&mdash;"; break;
case DocSymbol::Uml: m_t << "&" << s->letter() << "uml;"; break;
case DocSymbol::Acute: m_t << "&" << s->letter() << "acute;"; break;
case DocSymbol::Grave: m_t << "&" << s->letter() << "grave;"; break;
case DocSymbol::Circ: m_t << "&" << s->letter() << "circ;"; break;
case DocSymbol::Slash: m_t << "&" << s->letter() << "slash;"; break;
case DocSymbol::Tilde: m_t << "&" << s->letter() << "tilde;"; break;
case DocSymbol::Szlig: m_t << "&szlig;"; break;
case DocSymbol::Cedil: m_t << "&" << s->letter() << "cedil;"; break;
case DocSymbol::Ring: m_t << "&" << s->letter() << "ring;"; break;
case DocSymbol::Nbsp: m_t << "&#160;"; break;
case DocSymbol::AElig: m_t << "&AElig;"; break;
case DocSymbol::Aelig: m_t << "&aelig;"; break;
case DocSymbol::GrkGamma: m_t << "&Gamma;"; break;
case DocSymbol::GrkDelta: m_t << "&Delta;"; break;
case DocSymbol::GrkTheta: m_t << "&Theta;"; break;
case DocSymbol::GrkLambda: m_t << "&Lambda;"; break;
case DocSymbol::GrkXi: m_t << "&Xi;"; break;
case DocSymbol::GrkPi: m_t << "&Pi;"; break;
case DocSymbol::GrkSigma: m_t << "&Sigma;"; break;
case DocSymbol::GrkUpsilon: m_t << "&Upsilon;"; break;
case DocSymbol::GrkPhi: m_t << "&Phi;"; break;
case DocSymbol::GrkPsi: m_t << "&Psi;"; break;
case DocSymbol::GrkOmega: m_t << "&Omega;"; break;
case DocSymbol::Grkalpha: m_t << "&alpha;"; break;
case DocSymbol::Grkbeta: m_t << "&beta;"; break;
case DocSymbol::Grkgamma: m_t << "&gamma;"; break;
case DocSymbol::Grkdelta: m_t << "&delta;"; break;
case DocSymbol::Grkepsilon: m_t << "&epsilon;"; break;
case DocSymbol::Grkzeta: m_t << "&zeta;"; break;
case DocSymbol::Grketa: m_t << "&eta;"; break;
case DocSymbol::Grktheta: m_t << "&theta;"; break;
case DocSymbol::Grkiota: m_t << "&iota;"; break;
case DocSymbol::Grkkappa: m_t << "&kappa;"; break;
case DocSymbol::Grklambda: m_t << "&lambda;"; break;
case DocSymbol::Grkmu: m_t << "&mu;"; break;
case DocSymbol::Grknu: m_t << "&nu;"; break;
case DocSymbol::Grkxi: m_t << "&xi;"; break;
case DocSymbol::Grkpi: m_t << "&pi;"; break;
case DocSymbol::Grkrho: m_t << "&rho;"; break;
case DocSymbol::Grksigma: m_t << "&sigma;"; break;
case DocSymbol::Grktau: m_t << "&tau;"; break;
case DocSymbol::Grkupsilon: m_t << "&upsilon;"; break;
case DocSymbol::Grkphi: m_t << "&phi;"; break;
case DocSymbol::Grkchi: m_t << "&chi;"; break;
case DocSymbol::Grkpsi: m_t << "&psi;"; break;
case DocSymbol::Grkomega: m_t << "&omega;"; break;
case DocSymbol::Grkvarsigma: m_t << "&sigmaf;"; break;
case DocSymbol::Section: m_t << "&sect;"; break;
case DocSymbol::Degree: m_t << "&deg;"; break;
case DocSymbol::Prime: m_t << "&prime;"; break;
case DocSymbol::DoublePrime: m_t << "&Prime;"; break;
case DocSymbol::Infinity: m_t << "&infin;"; break;
case DocSymbol::EmptySet: m_t << "&empty;"; break;
case DocSymbol::PlusMinus: m_t << "&plusmn;"; break;
case DocSymbol::Times: m_t << "&times;"; break;
case DocSymbol::Minus: m_t << "&minus;"; break;
case DocSymbol::CenterDot: m_t << "&sdot;"; break;
case DocSymbol::Partial: m_t << "&part;"; break;
case DocSymbol::Nabla: m_t << "&nabla;"; break;
case DocSymbol::SquareRoot: m_t << "&radic;"; break;
case DocSymbol::Perpendicular: m_t << "&perp;"; break;
case DocSymbol::Sum: m_t << "&sum;"; break;
case DocSymbol::Integral: m_t << "&int;"; break;
case DocSymbol::Product: m_t << "&prod;"; break;
case DocSymbol::Similar: m_t << "&sim;"; break;
case DocSymbol::Approx: m_t << "&asymp;"; break;
case DocSymbol::NotEqual: m_t << "&ne;"; break;
case DocSymbol::Equivalent: m_t << "&equiv;"; break;
case DocSymbol::Proportional: m_t << "&prop;"; break;
case DocSymbol::LessEqual: m_t << "&le;"; break;
case DocSymbol::GreaterEqual: m_t << "&ge;"; break;
case DocSymbol::LeftArrow: m_t << "&larr;"; break;
case DocSymbol::RightArrow: m_t << "&rarr;"; break;
case DocSymbol::SetIn: m_t << "&isin;"; break;
case DocSymbol::SetNotIn: m_t << "&notin;"; break;
case DocSymbol::LeftCeil: m_t << "&lceil;"; break;
case DocSymbol::RightCeil: m_t << "&rceil;"; break;
case DocSymbol::LeftFloor: m_t << "&lfloor;"; break;
case DocSymbol::RightFloor: m_t << "&rfloor;"; break;
default:
err("unknown symbol found\n");
const char *res = get_symbol_html(s->symbol());
if (res)
{
m_t << res;
}
else
{
err("HTML: non supported HTML-entity found: &%s;\n",get_symbol_item(s->symbol()));
}
}
......
......@@ -135,135 +135,25 @@ void LatexDocVisitor::visit(DocWhiteSpace *w)
void LatexDocVisitor::visit(DocSymbol *s)
{
if (m_hide) return;
switch(s->symbol())
{
case DocSymbol::BSlash: m_t << "\\textbackslash{}"; break;
case DocSymbol::At: m_t << "@"; break;
case DocSymbol::Less: if (m_insidePre) m_t << "<"; else m_t << "$<$";
break;
case DocSymbol::Greater: if (m_insidePre) m_t << ">"; else m_t << "$>$"; break;
case DocSymbol::Amp: m_t << "\\&"; break;
case DocSymbol::Dollar: m_t << "\\$"; break;
case DocSymbol::Hash: m_t << "\\#"; break;
case DocSymbol::DoubleColon: m_t << "::"; break;
case DocSymbol::Percent: m_t << "\\%"; break;
case DocSymbol::Pipe: m_t << "$|$"; break;
case DocSymbol::Copy: m_t << "\\copyright{}"; break;
case DocSymbol::Tm: m_t << "\\texttrademark{}"; break;
case DocSymbol::Reg: m_t << "\\textregistered{}"; break;
case DocSymbol::Apos: m_t << "'"; break;
case DocSymbol::Quot: m_t << "\""; break;
case DocSymbol::Lsquo: m_t << "`"; break;
case DocSymbol::Rsquo: m_t << "'"; break;
case DocSymbol::Ldquo: m_t << "``"; break;
case DocSymbol::Rdquo: m_t << "''"; break;
case DocSymbol::Ndash: m_t << "--"; break;
case DocSymbol::Mdash: m_t << "---"; break;
case DocSymbol::Uml:
if (s->letter()=='i')
m_t << "\\\"{\\i}";
else
m_t << "\\\"{" << s->letter() << "}";
break;
case DocSymbol::Acute:
if (s->letter()=='i')
m_t << "\\'{\\i}";
else
m_t << "\\'{" << s->letter() << "}";
break;
case DocSymbol::Grave:
if (s->letter()=='i')
m_t << "\\`{\\i}";
else
m_t << "\\`{" << s->letter() << "}";
break;
case DocSymbol::Circ:
if (s->letter()=='i')
m_t << "\\^{\\i}";
else
m_t << "\\^{" << s->letter() << "}";
break;
case DocSymbol::Slash: if (tolower(s->letter())=='o')
m_t << "{\\" << s->letter() << "}";
else
m_t << s->letter();
break;
case DocSymbol::Tilde: m_t << "\\~{" << s->letter() << "}"; break;
case DocSymbol::Szlig: m_t << "{\\ss}"; break;
case DocSymbol::Cedil: m_t << "\\c{" << s->letter() << "}"; break;
case DocSymbol::Ring: m_t << "\\" << s->letter() << s->letter(); break;
case DocSymbol::Nbsp: m_t << "~"; break;
case DocSymbol::AElig: m_t << "{\\AE}"; break;
case DocSymbol::Aelig: m_t << "{\\ae}"; break;
case DocSymbol::GrkGamma: m_t << "{$\\Gamma$}"; break;
case DocSymbol::GrkDelta: m_t << "{$\\Delta$}"; break;
case DocSymbol::GrkTheta: m_t << "{$\\Theta$}"; break;
case DocSymbol::GrkLambda: m_t << "{$\\Lambda$}"; break;
case DocSymbol::GrkXi: m_t << "{$\\Xi$}"; break;
case DocSymbol::GrkPi: m_t << "{$\\Pi$}"; break;
case DocSymbol::GrkSigma: m_t << "{$\\Sigma$}"; break;
case DocSymbol::GrkUpsilon: m_t << "{$\\Upsilon$}"; break;
case DocSymbol::GrkPhi: m_t << "{$\\Phi$}"; break;
case DocSymbol::GrkPsi: m_t << "{$\\Psi$}"; break;
case DocSymbol::GrkOmega: m_t << "{$\\Omega$}"; break;
case DocSymbol::Grkalpha: m_t << "{$\\alpha$}"; break;
case DocSymbol::Grkbeta: m_t << "{$\\beta$}"; break;
case DocSymbol::Grkgamma: m_t << "{$\\gamma$}"; break;
case DocSymbol::Grkdelta: m_t << "{$\\delta$}"; break;
case DocSymbol::Grkepsilon: m_t << "{$\\varepsilon$}"; break;
case DocSymbol::Grkzeta: m_t << "{$\\zeta$}"; break;
case DocSymbol::Grketa: m_t << "{$\\eta$}"; break;
case DocSymbol::Grktheta: m_t << "{$\\theta$}"; break;
case DocSymbol::Grkiota: m_t << "{$\\iota$}"; break;
case DocSymbol::Grkkappa: m_t << "{$\\kappa$}"; break;
case DocSymbol::Grklambda: m_t << "{$\\lambda$}"; break;
case DocSymbol::Grkmu: m_t << "{$\\mu$}"; break;
case DocSymbol::Grknu: m_t << "{$\\nu$}"; break;
case DocSymbol::Grkxi: m_t << "{$\\xi$}"; break;
case DocSymbol::Grkpi: m_t << "{$\\pi$}"; break;
case DocSymbol::Grkrho: m_t << "{$\\rho$}"; break;
case DocSymbol::Grksigma: m_t << "{$\\sigma$}"; break;
case DocSymbol::Grktau: m_t << "{$\\tau$}"; break;
case DocSymbol::Grkupsilon: m_t << "{$\\upsilon$}"; break;
case DocSymbol::Grkphi: m_t << "{$\\varphi$}"; break;
case DocSymbol::Grkchi: m_t << "{$\\chi$}"; break;
case DocSymbol::Grkpsi: m_t << "{$\\psi$}"; break;
case DocSymbol::Grkomega: m_t << "{$\\omega$}"; break;
case DocSymbol::Grkvarsigma: m_t << "{$\\varsigma$}"; break;
case DocSymbol::Section: m_t << "{$\\S$}"; break;
case DocSymbol::Degree: m_t << "\\textdegree"; break;
case DocSymbol::Prime: m_t << "'"; break;
case DocSymbol::DoublePrime: m_t << "''"; break;
case DocSymbol::Infinity: m_t << "{$\\infty$}"; break;
case DocSymbol::EmptySet: m_t << "{$\\emptyset$}"; break;
case DocSymbol::PlusMinus: m_t << "{$\\pm$}"; break;
case DocSymbol::Times: m_t << "{$\\times$}"; break;
case DocSymbol::Minus: m_t << "-"; break;
case DocSymbol::CenterDot: m_t << "{$\\cdot$}"; break;
case DocSymbol::Partial: m_t << "{$\\partial$}"; break;
case DocSymbol::Nabla: m_t << "{$\\nabla$}"; break;
case DocSymbol::SquareRoot: m_t << "{$\\surd$}"; break;
case DocSymbol::Perpendicular: m_t << "{$\\perp$}"; break;
case DocSymbol::Sum: m_t << "{$\\sum$}"; break;
case DocSymbol::Integral: m_t << "{$\\int$}"; break;
case DocSymbol::Product: m_t << "{$\\prod$}"; break;
case DocSymbol::Similar: m_t << "{$\\sim$}"; break;
case DocSymbol::Approx: m_t << "{$\\approx$}"; break;
case DocSymbol::NotEqual: m_t << "{$\\ne$}"; break;
case DocSymbol::Equivalent: m_t << "{$\\equiv$}"; break;
case DocSymbol::Proportional: m_t << "{$\\propto$}"; break;
case DocSymbol::LessEqual: m_t << "{$\\le$}"; break;
case DocSymbol::GreaterEqual: m_t << "{$\\ge$}"; break;
case DocSymbol::LeftArrow: m_t << "{$\\leftarrow$}"; break;
case DocSymbol::RightArrow: m_t << "{$\\rightarrow$}"; break;
case DocSymbol::SetIn: m_t << "{$\\in$}"; break;
case DocSymbol::SetNotIn: m_t << "{$\\notin$}"; break;
case DocSymbol::LeftCeil: m_t << "{$\\lceil$}"; break;
case DocSymbol::RightCeil: m_t << "{$\\rceil$}"; break;
case DocSymbol::LeftFloor: m_t << "{$\\lfloor$}"; break;
case DocSymbol::RightFloor: m_t << "{$\\rfloor$}"; break;
default:
err("unknown symbol found\n");
const char *res = get_symbol_latex(s->symbol());
if (res)
{
if (((s->symbol() == DocSymbol::Sym_lt) || (s->symbol() == DocSymbol::Sym_Less))&& (!m_insidePre))
{
m_t << "$<$";
}
else if (((s->symbol() == DocSymbol::Sym_gt) || (s->symbol() == DocSymbol::Sym_Greater)) && (!m_insidePre))
{
m_t << "$>$";
}
else
{
m_t << res;
}
}
else
{
err("LaTeX: non supported HTML-entity found: &%s;\n",get_symbol_item(s->symbol()));
}
}
......
......@@ -293,7 +293,9 @@ static void writeDefaultHeaderPart1(FTextStream &t)
"\\usepackage{makeidx}\n"
"\\usepackage{multicol}\n"
"\\usepackage{multirow}\n"
"\\PassOptionsToPackage{warn}{textcomp}\n"
"\\usepackage{textcomp}\n"
"\\usepackage[nointegrals]{wasysym}\n"
"\\usepackage[table]{xcolor}\n"
"\n";
......
......@@ -75,42 +75,15 @@ void ManDocVisitor::visit(DocWhiteSpace *w)
void ManDocVisitor::visit(DocSymbol *s)
{
if (m_hide) return;
switch(s->symbol())
const char *res = get_symbol_man(s->symbol());
if (res)
{
case DocSymbol::BSlash: m_t << "\\\\"; break;
case DocSymbol::At: m_t << "@"; break;
case DocSymbol::Less: m_t << "<"; break;
case DocSymbol::Greater: m_t << ">"; break;
case DocSymbol::Amp: m_t << "&"; break;
case DocSymbol::Dollar: m_t << "$"; break;
case DocSymbol::Hash: m_t << "#"; break;
case DocSymbol::DoubleColon: m_t << "::"; break;
case DocSymbol::Percent: m_t << "%"; break;
case DocSymbol::Pipe: m_t << "|"; break;
case DocSymbol::Copy: m_t << "(C)"; break;
case DocSymbol::Tm: m_t << "(TM)"; break;
case DocSymbol::Reg: m_t << "(R)"; break;
case DocSymbol::Apos: m_t << "'"; break;
case DocSymbol::Quot: m_t << "\""; break;
case DocSymbol::Lsquo: m_t << "`"; break;
case DocSymbol::Rsquo: m_t << "'"; break;
case DocSymbol::Ldquo: m_t << "``"; break;
case DocSymbol::Rdquo: m_t << "''"; break;
case DocSymbol::Ndash: m_t << "--"; break;
case DocSymbol::Mdash: m_t << "---"; break;
case DocSymbol::Uml: m_t << s->letter() << "\\*(4"; break;
case DocSymbol::Acute: m_t << s->letter() << "\\*(`"; break;
case DocSymbol::Grave: m_t << s->letter() << "\\*:"; break;
case DocSymbol::Circ: m_t << s->letter() << "\\*^"; break;
case DocSymbol::Slash: m_t << s->letter(); break; /* todo: implement this */
case DocSymbol::Tilde: m_t << s->letter() << "\\*~"; break;
case DocSymbol::Szlig: m_t << "s\\*:"; break;
case DocSymbol::Cedil: m_t << s->letter() << "\\*,"; break;
case DocSymbol::Ring: m_t << s->letter() << "\\*o"; break;
case DocSymbol::Nbsp: m_t << " "; break;
default:
// unsupport symbol for man page :-(
break;
m_t << res;
}
else
{
// no error or warning to be supplied
// err("man: non supported HTML-entity found: &%s;\n",get_symbol_item(s->symbol()));
}
m_firstCol=FALSE;
}
......
......@@ -41,6 +41,7 @@
#include "namespacedef.h"
#include "membergroup.h"
#include "section.h"
#include "util.h"
#define PERLOUTPUT_MAX_INDENTATION 40
......@@ -540,140 +541,66 @@ void PerlModDocVisitor::visit(DocWhiteSpace *)
void PerlModDocVisitor::visit(DocSymbol *sy)
{
char c = 0;
const char *s = 0;
const char *accent = 0;
const char *symbol = 0;
switch(sy->symbol())
const DocSymbol::PerlSymb *res = get_symbol_perl(sy->symbol());
const char *accent;
if (res-> symb)
{
case DocSymbol::At: c = '@'; break;
case DocSymbol::Less: c = '<'; break;
case DocSymbol::Greater: c = '>'; break;
case DocSymbol::Amp: c = '&'; break;
case DocSymbol::Dollar: c = '$'; break;
case DocSymbol::Hash: c = '#'; break;
case DocSymbol::DoubleColon: s = "::"; break;
case DocSymbol::Percent: c = '%'; break;
case DocSymbol::Pipe: c = '|'; break;
case DocSymbol::Quot: c = '"'; break;
case DocSymbol::Lsquo: s = "\\\'"; break;
case DocSymbol::Rsquo: s = "\\\'"; break;
case DocSymbol::Ldquo: c = '"'; break;
case DocSymbol::Rdquo: c = '"'; break;
case DocSymbol::Ndash: c = '-'; break;
case DocSymbol::Mdash: s = "--"; break;
case DocSymbol::Nbsp: c = ' '; break;
case DocSymbol::Uml: accent = "umlaut"; break;
case DocSymbol::Acute: accent = "acute"; break;
case DocSymbol::Grave: accent = "grave"; break;
case DocSymbol::Circ: accent = "circ"; break;
case DocSymbol::Slash: accent = "slash"; break;
case DocSymbol::Tilde: accent = "tilde"; break;
case DocSymbol::Cedil: accent = "cedilla"; break;
case DocSymbol::Ring: accent = "ring"; break;
case DocSymbol::BSlash: s = "\\\\"; break;
case DocSymbol::Copy: symbol = "copyright"; break;
case DocSymbol::Tm: symbol = "trademark"; break;
case DocSymbol::Reg: symbol = "registered"; break;
case DocSymbol::Szlig: symbol = "szlig"; break;
case DocSymbol::Apos: s = "\\\'"; break;
case DocSymbol::Aelig: symbol = "aelig"; break;
case DocSymbol::AElig: symbol = "AElig"; break;
case DocSymbol::GrkGamma: symbol = "Gamma"; break;
case DocSymbol::GrkDelta: symbol = "Delta"; break;
case DocSymbol::GrkTheta: symbol = "Theta"; break;
case DocSymbol::GrkLambda: symbol = "Lambda"; break;
case DocSymbol::GrkXi: symbol = "Xi"; break;
case DocSymbol::GrkPi: symbol = "Pi"; break;
case DocSymbol::GrkSigma: symbol = "Sigma"; break;
case DocSymbol::GrkUpsilon: symbol = "Upsilon"; break;
case DocSymbol::GrkPhi: symbol = "Phi"; break;
case DocSymbol::GrkPsi: symbol = "Psi"; break;
case DocSymbol::GrkOmega: symbol = "Omega"; break;
case DocSymbol::Grkalpha: symbol = "alpha"; break;
case DocSymbol::Grkbeta: symbol = "beta"; break;
case DocSymbol::Grkgamma: symbol = "gamma"; break;
case DocSymbol::Grkdelta: symbol = "delta"; break;
case DocSymbol::Grkepsilon: symbol = "epsilon"; break;
case DocSymbol::Grkzeta: symbol = "zeta"; break;
case DocSymbol::Grketa: symbol = "eta"; break;
case DocSymbol::Grktheta: symbol = "theta"; break;
case DocSymbol::Grkiota: symbol = "iota"; break;
case DocSymbol::Grkkappa: symbol = "kappa"; break;
case DocSymbol::Grklambda: symbol = "lambda"; break;
case DocSymbol::Grkmu: symbol = "mu"; break;
case DocSymbol::Grknu: symbol = "nu"; break;
case DocSymbol::Grkxi: symbol = "xi"; break;
case DocSymbol::Grkpi: symbol = "pi"; break;
case DocSymbol::Grkrho: symbol = "rho"; break;
case DocSymbol::Grksigma: symbol = "sigma"; break;
case DocSymbol::Grktau: symbol = "tau"; break;
case DocSymbol::Grkupsilon: symbol = "upsilon"; break;
case DocSymbol::Grkphi: symbol = "phi"; break;
case DocSymbol::Grkchi: symbol = "chi"; break;
case DocSymbol::Grkpsi: symbol = "psi"; break;
case DocSymbol::Grkomega: symbol = "omega"; break;
case DocSymbol::Grkvarsigma: symbol = "sigma"; break;
case DocSymbol::Section: symbol = "sect"; break;
case DocSymbol::Degree: symbol = "deg"; break;
case DocSymbol::Prime: s = "\\\'"; break;
case DocSymbol::DoublePrime: c = '"'; break;
case DocSymbol::Infinity: symbol = "inf"; break;
case DocSymbol::EmptySet: symbol = "empty"; break;
case DocSymbol::PlusMinus: s = "+/-"; break;
case DocSymbol::Times: c = '*'; break;
case DocSymbol::Minus: c = '-'; break;
case DocSymbol::CenterDot: c = '.'; break;
case DocSymbol::Partial: symbol = "partial"; break;
case DocSymbol::Nabla: symbol = "nabla"; break;
case DocSymbol::SquareRoot: symbol = "sqrt"; break;
case DocSymbol::Perpendicular: symbol = "perp"; break;
case DocSymbol::Sum: symbol = "sum"; break;
case DocSymbol::Integral: symbol = "int"; break;
case DocSymbol::Product: symbol = "prod"; break;
case DocSymbol::Similar: c = '~'; break;
case DocSymbol::Approx: symbol = "approx"; break;
case DocSymbol::NotEqual: s = "!="; break;
case DocSymbol::Equivalent: symbol = "equiv"; break;
case DocSymbol::Proportional: symbol = "propto"; break;
case DocSymbol::LessEqual: s = "<="; break;
case DocSymbol::GreaterEqual: s = ">="; break;
case DocSymbol::LeftArrow: s = "<-"; break;
case DocSymbol::RightArrow: s = "->"; break;
case DocSymbol::SetIn: symbol = "in"; break;
case DocSymbol::SetNotIn: symbol = "notin"; break;
case DocSymbol::LeftCeil: symbol = "lceil"; break;
case DocSymbol::RightCeil: symbol = "rceil"; break;
case DocSymbol::LeftFloor: symbol = "lfloor"; break;
case DocSymbol::RightFloor: symbol = "rfloor"; break;
case DocSymbol::Unknown: err("unknown symbol found\n");
break;
}
if (c != 0)
{
enterText();
m_output.add(c);
}
else if (s != 0)
{
enterText();
m_output.add(s);
}
else if (symbol != 0)
{
leaveText();
openItem("symbol");
m_output.addFieldQuotedString("symbol", symbol);
closeItem();
}
else if (accent != 0)
switch (res->type)
{
case DocSymbol::Perl_string:
enterText();
m_output.add(res->symb);
break;
case DocSymbol::Perl_char:
enterText();
m_output.add(res->symb[0]);
break;
case DocSymbol::Perl_symbol:
leaveText();
openItem("symbol");
m_output.addFieldQuotedString("symbol", res->symb);
closeItem();
break;
default:
switch(res->type)
{
case DocSymbol::Perl_umlaut:
accent = "umlaut";
break;
case DocSymbol::Perl_acute:
accent = "acute";
break;
case DocSymbol::Perl_grave:
accent = "grave";
break;
case DocSymbol::Perl_circ:
accent = "circ";
break;
case DocSymbol::Perl_slash:
accent = "slash";
break;
case DocSymbol::Perl_tilde:
accent = "tilde";
break;
case DocSymbol::Perl_cedilla:
accent = "cedilla";
break;
case DocSymbol::Perl_ring:
accent = "ring";
break;
}
leaveText();
openItem("accent");
m_output
.addFieldQuotedString("accent", accent)
.addFieldQuotedChar("letter", res->symb[0]);
closeItem();
break;
}
}
else
{
leaveText();
openItem("accent");
m_output
.addFieldQuotedString("accent", accent)
.addFieldQuotedChar("letter", sy->letter());
closeItem();
err("perl: non supported HTML-entity found: &%s;\n",get_symbol_item(sy->symbol()));
}
}
......
......@@ -56,106 +56,14 @@ class PrintDocVisitor : public DocVisitor
void visit(DocSymbol *s)
{
indent_leaf();
switch(s->symbol())
const char *res = get_symbol_print(s->symbol());
if (res)
{
case DocSymbol::BSlash: printf("\\"); break;
case DocSymbol::At: printf("@"); break;
case DocSymbol::Less: printf("<"); break;
case DocSymbol::Greater: printf(">"); break;
case DocSymbol::Amp: printf("&"); break;
case DocSymbol::Dollar: printf("$"); break;
case DocSymbol::Hash: printf("#"); break;
case DocSymbol::Percent: printf("%%"); break;
case DocSymbol::Pipe: printf("|"); break;
case DocSymbol::Copy: printf("&copy;"); break;
case DocSymbol::Apos: printf("'"); break;
case DocSymbol::Quot: printf("\""); break;
case DocSymbol::Lsquo: printf("&lsquo;"); break;
case DocSymbol::Rsquo: printf("&rsquo;"); break;
case DocSymbol::Ldquo: printf("&ldquo;"); break;
case DocSymbol::Rdquo: printf("&rdquo;"); break;
case DocSymbol::Ndash: printf("&ndash;"); break;
case DocSymbol::Mdash: printf("&mdash;"); break;
case DocSymbol::Uml: printf("&%cuml;",s->letter()); break;
case DocSymbol::Acute: printf("&%cacute;",s->letter()); break;
case DocSymbol::Grave: printf("&%cgrave;",s->letter()); break;
case DocSymbol::Circ: printf("&%ccirc;",s->letter()); break;
case DocSymbol::Tilde: printf("&%ctilde;",s->letter()); break;
case DocSymbol::Szlig: printf("&szlig;"); break;
case DocSymbol::Cedil: printf("&%ccedul;",s->letter()); break;
case DocSymbol::Ring: printf("&%cring;",s->letter()); break;
case DocSymbol::Nbsp: printf("&nbsp;"); break;
case DocSymbol::Aelig: printf("&aelig;"); break;
case DocSymbol::AElig: printf("&AElig;"); break;
case DocSymbol::GrkGamma: printf("&Gamma;"); break;
case DocSymbol::GrkDelta: printf("&Delta;"); break;
case DocSymbol::GrkTheta: printf("&Theta;"); break;
case DocSymbol::GrkLambda: printf("&Lambda;"); break;
case DocSymbol::GrkXi: printf("&Xi;"); break;
case DocSymbol::GrkPi: printf("&Pi;"); break;
case DocSymbol::GrkSigma: printf("&Sigma;"); break;
case DocSymbol::GrkUpsilon: printf("&Upsilon;"); break;
case DocSymbol::GrkPhi: printf("&Phi;"); break;
case DocSymbol::GrkPsi: printf("&Psi;"); break;
case DocSymbol::GrkOmega: printf("&Omega;"); break;
case DocSymbol::Grkalpha: printf("&alpha;"); break;
case DocSymbol::Grkbeta: printf("&beta;"); break;
case DocSymbol::Grkgamma: printf("&gamma;"); break;
case DocSymbol::Grkdelta: printf("&delta;"); break;
case DocSymbol::Grkepsilon: printf("&epsilon;"); break;
case DocSymbol::Grkzeta: printf("&zeta;"); break;
case DocSymbol::Grketa: printf("&eta;"); break;
case DocSymbol::Grktheta: printf("&theta;"); break;
case DocSymbol::Grkiota: printf("&iota;"); break;
case DocSymbol::Grkkappa: printf("&kappa;"); break;
case DocSymbol::Grklambda: printf("&lambda;"); break;
case DocSymbol::Grkmu: printf("&mu;"); break;
case DocSymbol::Grknu: printf("&nu;"); break;
case DocSymbol::Grkxi: printf("&xi;"); break;
case DocSymbol::Grkpi: printf("&pi;"); break;
case DocSymbol::Grkrho: printf("&rho;"); break;
case DocSymbol::Grksigma: printf("&sigma;"); break;
case DocSymbol::Grktau: printf("&tau;"); break;
case DocSymbol::Grkupsilon: printf("&upsilon;"); break;
case DocSymbol::Grkphi: printf("&phi;"); break;
case DocSymbol::Grkchi: printf("&chi;"); break;
case DocSymbol::Grkpsi: printf("&psi;"); break;
case DocSymbol::Grkomega: printf("&omega;"); break;
case DocSymbol::Grkvarsigma: printf("&sigmaf;"); break;
case DocSymbol::Section: printf("&sect;"); break;
case DocSymbol::Degree: printf("&deg;"); break;
case DocSymbol::Prime: printf("&prime;"); break;
case DocSymbol::DoublePrime: printf("&Prime;"); break;
case DocSymbol::Infinity: printf("&infin;"); break;
case DocSymbol::EmptySet: printf("&empty;"); break;
case DocSymbol::PlusMinus: printf("&plusmn;"); break;
case DocSymbol::Times: printf("&times;"); break;
case DocSymbol::Minus: printf("&minus;"); break;
case DocSymbol::CenterDot: printf("&sdot;"); break;
case DocSymbol::Partial: printf("&part;"); break;
case DocSymbol::Nabla: printf("&nabla;"); break;
case DocSymbol::SquareRoot: printf("&radic;"); break;
case DocSymbol::Perpendicular: printf("&perp;"); break;
case DocSymbol::Sum: printf("&sum;"); break;
case DocSymbol::Integral: printf("&int;"); break;
case DocSymbol::Product: printf("&prod;"); break;
case DocSymbol::Similar: printf("&sim;"); break;
case DocSymbol::Approx: printf("&asymp;"); break;
case DocSymbol::NotEqual: printf("&ne;"); break;
case DocSymbol::Equivalent: printf("&equiv;"); break;
case DocSymbol::Proportional: printf("&prop;"); break;
case DocSymbol::LessEqual: printf("&le;"); break;
case DocSymbol::GreaterEqual: printf("&ge;"); break;
case DocSymbol::LeftArrow: printf("&larr;"); break;
case DocSymbol::RightArrow: printf("&rarr;"); break;
case DocSymbol::SetIn: printf("&isin;"); break;
case DocSymbol::SetNotIn: printf("&notin;"); break;
case DocSymbol::LeftCeil: printf("&lceil;"); break;
case DocSymbol::RightCeil: printf("&rceil;"); break;
case DocSymbol::LeftFloor: printf("&lfloor;"); break;
case DocSymbol::RightFloor: printf("&rfloor;"); break;
default:
printf("unknown symbol found\n");
printf("%s",res);
}
else
{
printf("print: non supported HTML-entity found: &%s;\n",get_symbol_item(s->symbol()));
}
}
void visit(DocURL *u)
......
This diff is collapsed.
......@@ -19,115 +19,20 @@
#include <qdir.h>
#include "textdocvisitor.h"
#include "message.h"
#include "util.h"
//-------------------------------------------------------------------------
void TextDocVisitor::visit(DocSymbol *s)
{
switch(s->symbol())
const char *res = get_symbol_text(s->symbol());
if (res)
{
case DocSymbol::BSlash: m_t << "\\"; break;
case DocSymbol::At: m_t << "@"; break;
case DocSymbol::Less: m_t << "&lt;"; break;
case DocSymbol::Greater: m_t << "&gt;"; break;
case DocSymbol::Amp: m_t << "&amp;"; break;
case DocSymbol::Dollar: m_t << "$"; break;
case DocSymbol::Hash: m_t << "#"; break;
case DocSymbol::DoubleColon: m_t << "::"; break;
case DocSymbol::Percent: m_t << "%"; break;
case DocSymbol::Pipe: m_t << "|"; break;
case DocSymbol::Copy: m_t << "&copy;"; break;
case DocSymbol::Tm: m_t << "&tm;"; break;
case DocSymbol::Reg: m_t << "&reg;"; break;
case DocSymbol::Apos: m_t << "'"; break;
case DocSymbol::Quot: m_t << "\""; break;
case DocSymbol::Lsquo: m_t << "&lsquo;"; break;
case DocSymbol::Rsquo: m_t << "&rsquo;"; break;
case DocSymbol::Ldquo: m_t << "&ldquo;"; break;
case DocSymbol::Rdquo: m_t << "&rdquo;"; break;
case DocSymbol::Ndash: m_t << "&ndash;"; break;
case DocSymbol::Mdash: m_t << "&mdash;"; break;
case DocSymbol::Uml: m_t << "&" << s->letter() << "uml;"; break;
case DocSymbol::Acute: m_t << "&" << s->letter() << "acute;"; break;
case DocSymbol::Grave: m_t << "&" << s->letter() << "grave;"; break;
case DocSymbol::Circ: m_t << "&" << s->letter() << "circ;"; break;
case DocSymbol::Slash: m_t << "&" << s->letter() << "slash;"; break;
case DocSymbol::Tilde: m_t << "&" << s->letter() << "tilde;"; break;
case DocSymbol::Szlig: m_t << "&szlig;"; break;
case DocSymbol::Cedil: m_t << "&" << s->letter() << "cedil;"; break;
case DocSymbol::Ring: m_t << "&" << s->letter() << "ring;"; break;
case DocSymbol::Nbsp: m_t << "&nbsp;"; break;
case DocSymbol::Aelig: m_t << "&aelig;"; break;
case DocSymbol::AElig: m_t << "&AElig;"; break;
case DocSymbol::GrkGamma: m_t << "&Gamma;"; break;
case DocSymbol::GrkDelta: m_t << "&Delta;"; break;
case DocSymbol::GrkTheta: m_t << "&Theta;"; break;
case DocSymbol::GrkLambda: m_t << "&Lambda;"; break;
case DocSymbol::GrkXi: m_t << "&Xi;"; break;
case DocSymbol::GrkPi: m_t << "&Pi;"; break;
case DocSymbol::GrkSigma: m_t << "&Sigma;"; break;
case DocSymbol::GrkUpsilon: m_t << "&Upsilon;"; break;
case DocSymbol::GrkPhi: m_t << "&Phi;"; break;
case DocSymbol::GrkPsi: m_t << "&Psi;"; break;
case DocSymbol::GrkOmega: m_t << "&Omega;"; break;
case DocSymbol::Grkalpha: m_t << "&alpha;"; break;
case DocSymbol::Grkbeta: m_t << "&beta;"; break;
case DocSymbol::Grkgamma: m_t << "&gamma;"; break;
case DocSymbol::Grkdelta: m_t << "&delta;"; break;
case DocSymbol::Grkepsilon: m_t << "&epsilon;"; break;
case DocSymbol::Grkzeta: m_t << "&zeta;"; break;
case DocSymbol::Grketa: m_t << "&eta;"; break;
case DocSymbol::Grktheta: m_t << "&theta;"; break;
case DocSymbol::Grkiota: m_t << "&iota;"; break;
case DocSymbol::Grkkappa: m_t << "&kappa;"; break;
case DocSymbol::Grklambda: m_t << "&lambda;"; break;
case DocSymbol::Grkmu: m_t << "&mu;"; break;
case DocSymbol::Grknu: m_t << "&nu;"; break;
case DocSymbol::Grkxi: m_t << "&xi;"; break;
case DocSymbol::Grkpi: m_t << "&pi;"; break;
case DocSymbol::Grkrho: m_t << "&rho;"; break;
case DocSymbol::Grksigma: m_t << "&sigma;"; break;
case DocSymbol::Grktau: m_t << "&tau;"; break;
case DocSymbol::Grkupsilon: m_t << "&upsilon;"; break;
case DocSymbol::Grkphi: m_t << "&phi;"; break;
case DocSymbol::Grkchi: m_t << "&chi;"; break;
case DocSymbol::Grkpsi: m_t << "&psi;"; break;
case DocSymbol::Grkomega: m_t << "&omega;"; break;
case DocSymbol::Grkvarsigma: m_t << "&sigmaf;"; break;
case DocSymbol::Section: m_t << "&sect;"; break;
case DocSymbol::Degree: m_t << "&deg;"; break;
case DocSymbol::Prime: m_t << "&prime;"; break;
case DocSymbol::DoublePrime: m_t << "&Prime;"; break;
case DocSymbol::Infinity: m_t << "&infin;"; break;
case DocSymbol::EmptySet: m_t << "&empty;"; break;
case DocSymbol::PlusMinus: m_t << "&plusmn;"; break;
case DocSymbol::Times: m_t << "&times;"; break;
case DocSymbol::Minus: m_t << "&minus;"; break;
case DocSymbol::CenterDot: m_t << "&sdot;"; break;
case DocSymbol::Partial: m_t << "&part;"; break;
case DocSymbol::Nabla: m_t << "&nabla;"; break;
case DocSymbol::SquareRoot: m_t << "&radic;"; break;
case DocSymbol::Perpendicular: m_t << "&perp;"; break;
case DocSymbol::Sum: m_t << "&sum;"; break;
case DocSymbol::Integral: m_t << "&int;"; break;
case DocSymbol::Product: m_t << "&prod;"; break;
case DocSymbol::Similar: m_t << "&sim;"; break;
case DocSymbol::Approx: m_t << "&asymp;"; break;
case DocSymbol::NotEqual: m_t << "&ne;"; break;
case DocSymbol::Equivalent: m_t << "&equiv;"; break;
case DocSymbol::Proportional: m_t << "&prop;"; break;
case DocSymbol::LessEqual: m_t << "&le;"; break;
case DocSymbol::GreaterEqual: m_t << "&ge;"; break;
case DocSymbol::LeftArrow: m_t << "&larr;"; break;
case DocSymbol::RightArrow: m_t << "&rarr;"; break;
case DocSymbol::SetIn: m_t << "&isin;"; break;
case DocSymbol::SetNotIn: m_t << "&notin;"; break;
case DocSymbol::LeftCeil: m_t << "&lceil;"; break;
case DocSymbol::RightCeil: m_t << "&rceil;"; break;
case DocSymbol::LeftFloor: m_t << "&lfloor;"; break;
case DocSymbol::RightFloor: m_t << "&rfloor;"; break;
default:
err("unknown symbol found\n");
m_t << res;
}
else
{
err("text: non supported HTML-entity found: &%s;\n",get_symbol_item(s->symbol()));
}
}
......
This diff is collapsed.
......@@ -26,6 +26,7 @@
#include <ctype.h>
#include "types.h"
#include "sortdict.h"
#include "docparser.h"
//--------------------------------------------------------------------
......@@ -454,5 +455,19 @@ void convertProtectionLevel(
int *outListType2
);
DocSymbol::SymType code_symbol(const QCString &symName);
const char *get_symbol_item(DocSymbol::SymType symb);
const char *get_symbol_UTF8(DocSymbol::SymType symb);
const char *get_symbol_html(DocSymbol::SymType symb);
const char *get_symbol_print(DocSymbol::SymType symb);
const char *get_symbol_text(DocSymbol::SymType symb);
const char *get_symbol_xml(DocSymbol::SymType symb);
const char *get_symbol_docbook(DocSymbol::SymType symb);
const char *get_symbol_latex(DocSymbol::SymType symb);
const char *get_symbol_man(DocSymbol::SymType symb);
const char *get_symbol_rtf(DocSymbol::SymType symb);
const DocSymbol::PerlSymb *get_symbol_perl(DocSymbol::SymType symb);
int get_num_standard_symbols(void);
void validate_html_entities(void);
#endif
......@@ -70,110 +70,14 @@ void XmlDocVisitor::visit(DocWhiteSpace *w)
void XmlDocVisitor::visit(DocSymbol *s)
{
if (m_hide) return;
switch(s->symbol())
const char *res = get_symbol_xml(s->symbol());
if (res)
{
case DocSymbol::BSlash: m_t << "\\"; break;
case DocSymbol::At: m_t << "@"; break;
case DocSymbol::Less: m_t << "&lt;"; break;
case DocSymbol::Greater: m_t << "&gt;"; break;
case DocSymbol::Amp: m_t << "&amp;"; break;
case DocSymbol::Dollar: m_t << "$"; break;
case DocSymbol::Hash: m_t << "#"; break;
case DocSymbol::DoubleColon: m_t << "::"; break;
case DocSymbol::Percent: m_t << "%"; break;
case DocSymbol::Pipe: m_t << "|"; break;
case DocSymbol::Copy: m_t << "<copy/>"; break;
case DocSymbol::Tm: m_t << "<trademark/>"; break;
case DocSymbol::Reg: m_t << "<registered/>"; break;
case DocSymbol::Apos: m_t << "'"; break;
case DocSymbol::Quot: m_t << "\""; break;
case DocSymbol::Lsquo: m_t << "<lsquo/>"; break;
case DocSymbol::Rsquo: m_t << "<rsquo/>"; break;
case DocSymbol::Ldquo: m_t << "<ldquo/>"; break;
case DocSymbol::Rdquo: m_t << "<rdquo/>"; break;
case DocSymbol::Ndash: m_t << "<ndash/>"; break;
case DocSymbol::Mdash: m_t << "<mdash/>"; break;
case DocSymbol::Uml: m_t << "<umlaut char=\"" << s->letter() << "\"/>"; break;
case DocSymbol::Acute: m_t << "<acute char=\"" << s->letter() << "\"/>"; break;
case DocSymbol::Grave: m_t << "<grave char=\"" << s->letter() << "\"/>"; break;
case DocSymbol::Circ: m_t << "<circ char=\"" << s->letter() << "\"/>"; break;
case DocSymbol::Tilde: m_t << "<tilde char=\"" << s->letter() << "\"/>"; break;
case DocSymbol::Szlig: m_t << "<szlig/>"; break;
case DocSymbol::Cedil: m_t << "<cedil char=\"" << s->letter() << "\"/>"; break;
case DocSymbol::Ring: m_t << "<ring char=\"" << s->letter() << "\"/>"; break;
case DocSymbol::Slash: m_t << "<slash char=\"" << s->letter() << "\"/>"; break;
case DocSymbol::Nbsp: m_t << "<nonbreakablespace/>"; break;
case DocSymbol::Aelig: m_t << "<aelig/>"; break;
case DocSymbol::AElig: m_t << "<AElig/>"; break;
case DocSymbol::GrkGamma: m_t << "<Gamma/>"; break;
case DocSymbol::GrkDelta: m_t << "<Delta/>"; break;
case DocSymbol::GrkTheta: m_t << "<Theta/>"; break;
case DocSymbol::GrkLambda: m_t << "<Lambda/>"; break;
case DocSymbol::GrkXi: m_t << "<Xi/>"; break;
case DocSymbol::GrkPi: m_t << "<Pi/>"; break;
case DocSymbol::GrkSigma: m_t << "<Sigma/>"; break;
case DocSymbol::GrkUpsilon: m_t << "<Upsilon/>"; break;
case DocSymbol::GrkPhi: m_t << "<Phi/>"; break;
case DocSymbol::GrkPsi: m_t << "<Psi/>"; break;
case DocSymbol::GrkOmega: m_t << "<Omega/>"; break;
case DocSymbol::Grkalpha: m_t << "<alpha/>"; break;
case DocSymbol::Grkbeta: m_t << "<beta/>"; break;
case DocSymbol::Grkgamma: m_t << "<gamma/>"; break;
case DocSymbol::Grkdelta: m_t << "<delta/>"; break;
case DocSymbol::Grkepsilon: m_t << "<epsilon/>"; break;
case DocSymbol::Grkzeta: m_t << "<zeta/>"; break;
case DocSymbol::Grketa: m_t << "<eta/>"; break;
case DocSymbol::Grktheta: m_t << "<theta/>"; break;
case DocSymbol::Grkiota: m_t << "<iota/>"; break;
case DocSymbol::Grkkappa: m_t << "<kappa/>"; break;
case DocSymbol::Grklambda: m_t << "<lambda/>"; break;
case DocSymbol::Grkmu: m_t << "<mu/>"; break;
case DocSymbol::Grknu: m_t << "<nu/>"; break;
case DocSymbol::Grkxi: m_t << "<xi/>"; break;
case DocSymbol::Grkpi: m_t << "<pi/>"; break;
case DocSymbol::Grkrho: m_t << "<rho/>"; break;
case DocSymbol::Grksigma: m_t << "<sigma/>"; break;
case DocSymbol::Grktau: m_t << "<tau/>"; break;
case DocSymbol::Grkupsilon: m_t << "<upsilon/>"; break;
case DocSymbol::Grkphi: m_t << "<phi/>"; break;
case DocSymbol::Grkchi: m_t << "<chi/>"; break;
case DocSymbol::Grkpsi: m_t << "<psi/>"; break;
case DocSymbol::Grkomega: m_t << "<omega/>"; break;
case DocSymbol::Grkvarsigma: m_t << "<sigmaf/>"; break;
case DocSymbol::Section: m_t << "<sect/>"; break;
case DocSymbol::Degree: m_t << "<deg/>"; break;
case DocSymbol::Prime: m_t << "<prime/>"; break;
case DocSymbol::DoublePrime: m_t << "<Prime/>"; break;
case DocSymbol::Infinity: m_t << "<infin/>"; break;
case DocSymbol::EmptySet: m_t << "<empty/>"; break;
case DocSymbol::PlusMinus: m_t << "<plusmn/>"; break;
case DocSymbol::Times: m_t << "<times/>"; break;
case DocSymbol::Minus: m_t << "<minus/>"; break;
case DocSymbol::CenterDot: m_t << "<sdot/>"; break;
case DocSymbol::Partial: m_t << "<part/>"; break;
case DocSymbol::Nabla: m_t << "<nabla/>"; break;
case DocSymbol::SquareRoot: m_t << "<radic/>"; break;
case DocSymbol::Perpendicular: m_t << "<perp/>"; break;
case DocSymbol::Sum: m_t << "<sum/>"; break;
case DocSymbol::Integral: m_t << "<int/>"; break;
case DocSymbol::Product: m_t << "<prod/>"; break;
case DocSymbol::Similar: m_t << "<sim/>"; break;
case DocSymbol::Approx: m_t << "<asymp/>"; break;
case DocSymbol::NotEqual: m_t << "<ne/>"; break;
case DocSymbol::Equivalent: m_t << "<equiv/>"; break;
case DocSymbol::Proportional: m_t << "<prop/>"; break;
case DocSymbol::LessEqual: m_t << "<le/>"; break;
case DocSymbol::GreaterEqual: m_t << "<ge/>"; break;
case DocSymbol::LeftArrow: m_t << "<larr/>"; break;
case DocSymbol::RightArrow: m_t << "<rarr/>"; break;
case DocSymbol::SetIn: m_t << "<isin/>"; break;
case DocSymbol::SetNotIn: m_t << "<notin/>"; break;
case DocSymbol::LeftCeil: m_t << "<lceil/>"; break;
case DocSymbol::RightCeil: m_t << "<rceil/>"; break;
case DocSymbol::LeftFloor: m_t << "<lfloor/>"; break;
case DocSymbol::RightFloor: m_t << "<rfloor/>"; break;
default:
err("unknown symbol found\n");
m_t << res;
}
else
{
err("XML: non supported HTML-entity found: &%s;\n",get_symbol_item(s->symbol()));
}
}
......
......@@ -1897,7 +1897,48 @@ void generateXML()
err("Cannot open file %s for writing!\n",fileName.data());
return;
}
f.writeBlock(compound_xsd,qstrlen(compound_xsd));
/*
* If the compound_xsd contyains the special string
* write part till special string
* for each html entity
* write xsd entry with xml element name without enclosing < and />
* write part after special string
* otherwise
* write original compound_xsd
*/
QCString cmp_org(compound_xsd);
QCString ins("<!-- Automatically insert here the HTML entities -->");
if (cmp_org.contains(QRegExp(ins)))
{
QCString xsd_txt;
QCString xsd_tmp;
QCString cmp_tmp1;
QCString cmp_tmp2;
QRegExp beg("^<");
QRegExp end("/>$");
cmp_tmp1 = cmp_org;
cmp_tmp1 = cmp_tmp1.replace(QRegExp(" *"+ins+".*"),"");
f.writeBlock(cmp_tmp1,qstrlen(cmp_tmp1));
int num_std = get_num_standard_symbols();
for (int i = 0; i < num_std; i++)
{
xsd_tmp = QCString(get_symbol_xml((DocSymbol::SymType)i));
if (xsd_tmp.contains(beg))
{
xsd_txt = " <xsd:element name=\"";
xsd_txt += xsd_tmp.replace(beg,"").replace(end,"");
xsd_txt += "\" type=\"docEmptyType\" />\n";
f.writeBlock(xsd_txt,qstrlen(xsd_txt));
}
}
cmp_tmp2 = cmp_org;
cmp_tmp2 = cmp_tmp2.replace(QRegExp(".*"+ins),"");
f.writeBlock(cmp_tmp2,qstrlen(cmp_tmp2));
}
else
{
f.writeBlock(compound_xsd,qstrlen(compound_xsd));
}
f.close();
fileName=outputDirectory+"/index.xml";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment