summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authordimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2010-10-09 08:04:33 (GMT)
committerdimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2010-10-09 08:04:33 (GMT)
commita32c2461bfbe6705159abfcae92fb11f1309b37c (patch)
treefac3e1fdcea37381cbfa5042e20155883cf97372 /src
parenta80f9320bf9fdd879869cee2cea1ec3f9af822f8 (diff)
downloadDoxygen-a32c2461bfbe6705159abfcae92fb11f1309b37c.zip
Doxygen-a32c2461bfbe6705159abfcae92fb11f1309b37c.tar.gz
Doxygen-a32c2461bfbe6705159abfcae92fb11f1309b37c.tar.bz2
Release-1.7.2
Diffstat (limited to 'src')
-rw-r--r--src/commentscan.l7
-rw-r--r--src/config.xml23
-rw-r--r--src/configoptions.cpp32
-rw-r--r--src/doxygen.cpp19
-rw-r--r--src/htmldocvisitor.cpp36
-rw-r--r--src/htmlgen.cpp18
-rw-r--r--src/htmlhelp.cpp6
-rw-r--r--src/latexdocvisitor.cpp8
-rw-r--r--src/pre.l3
-rw-r--r--src/translator_eo.h68
10 files changed, 197 insertions, 23 deletions
diff --git a/src/commentscan.l b/src/commentscan.l
index d4f7f0e..5926d7c 100644
--- a/src/commentscan.l
+++ b/src/commentscan.l
@@ -211,7 +211,7 @@ static DocCmdMap docCmdMap[] =
{ "copydetails", 0, TRUE },
{ "date", 0, TRUE },
{ "dotfile", 0, TRUE },
- { "htmlinclude", 0, TRUE },
+ { "htmlinclude", 0, FALSE },
{ "image", 0, TRUE },
{ "include", 0, TRUE },
{ "includelineno", 0, TRUE },
@@ -236,7 +236,7 @@ static DocCmdMap docCmdMap[] =
{ "throw", 0, TRUE },
{ "throws", 0, TRUE },
{ "until", 0, TRUE },
- { "verbinclude", 0, TRUE },
+ { "verbinclude", 0, FALSE },
{ "version", 0, TRUE },
{ "warning", 0, TRUE },
{ 0, 0, FALSE }
@@ -720,6 +720,7 @@ static inline void setOutput(OutputContext ctx)
else
{
pOutputString = &current->doc;
+ inContext = OutputDoc; // need to switch to detailed docs, see bug 631380
}
break;
case OutputXRef:
@@ -2556,7 +2557,7 @@ bool parseCommentBlock(/* in */ ParserInterface *parser,
newEntryNeeded = needNewEntry;
// if we did not proceed during this call, it does not make
- // sence to continue, since we get stuck. See bug 567346 for situations
+ // sense to continue, since we get stuck. See bug 567346 for situations
// were this happens
if (parseMore && position==inputPosition) parseMore=FALSE;
diff --git a/src/config.xml b/src/config.xml
index 8919ab3..6441508 100644
--- a/src/config.xml
+++ b/src/config.xml
@@ -555,8 +555,9 @@ If the value of the INPUT tag contains directories, you can use the
FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
and *.h) to filter out the source-files in the directories. If left
blank the following patterns are tested:
-*.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx
-*.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90
+*.c *.cc *.cxx *.cpp *.c++ *.d *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh
+*.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py
+*.f90 *.f *.vhd *.vhdl
'>
<value name='*.c'/>
<value name='*.cc'/>
@@ -984,6 +985,24 @@ not supported properly for IE 6.0, but are supported on all modern browsers.
Note that when changing this option you need to delete any form_*.png files
in the HTML output before the changes have effect.
' defval='1' depends='GENERATE_HTML'/>
+ <option type='bool' id='USE_MATHJAX' docs='
+Enable the USE_MATHJAX option to render LaTeX formulas using MathJax
+(see http://www.mathjax.org) which uses client side Javascript for the
+rendering instead of using prerendered bitmaps. Use this if you do not
+have LaTeX installed or if you want to formulas look prettier in the HTML
+output. When enabled you also need to install MathJax separately and
+configure the path to it using the MATHJAX_RELPATH option.
+' defval='0'/>
+ <option type='string' id='MATHJAX_RELPATH' docs='
+When MathJax is enabled you need to specify the location relative to the
+HTML output directory using the MATHJAX_RELPATH option. The destination
+directory should contain the MathJax.js script. For instance, if the mathjax
+directory is located at the same level as the HTML output directory, then
+MATHJAX_RELPATH should be ../mathjax. The default value points to the
+mathjax.org site, so you can quickly see the result without installing
+MathJax, but it is strongly recommended to install a local copy of MathJax
+before deployment.
+' defval='http://www.mathjax.org/mathjax'/>
<option type='bool' id='SEARCHENGINE' docs='
When the SEARCHENGINE tag is enabled doxygen will generate a search box
for the HTML output. The underlying search engine uses javascript
diff --git a/src/configoptions.cpp b/src/configoptions.cpp
index 24c0375..0dbee23 100644
--- a/src/configoptions.cpp
+++ b/src/configoptions.cpp
@@ -402,7 +402,7 @@ void addConfigOptions(Config *cfg)
"causing a significant performance penality.\n"
"If the system has enough physical memory increasing the cache will improve the\n"
"performance by keeping more symbols in memory. Note that the value works on\n"
- "a logarithmic scale so increasing the size by one will rougly double the\n"
+ "a logarithmic scale so increasing the size by one will roughly double the\n"
"memory usage. The cache size is given by this formula:\n"
"2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,\n"
"corresponding to a cache size of 2^16 = 65536 symbols",
@@ -801,8 +801,9 @@ void addConfigOptions(Config *cfg)
"FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp\n"
"and *.h) to filter out the source-files in the directories. If left\n"
"blank the following patterns are tested:\n"
- "*.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx\n"
- "*.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90"
+ "*.c *.cc *.cxx *.cpp *.c++ *.d *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh\n"
+ "*.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py\n"
+ "*.f90 *.f *.vhd *.vhdl"
);
cl->addValue("*.c");
cl->addValue("*.cc");
@@ -1461,6 +1462,29 @@ void addConfigOptions(Config *cfg)
cb->addDependency("GENERATE_HTML");
//----
cb = cfg->addBool(
+ "USE_MATHJAX",
+ "Enable the USE_MATHJAX option to render LaTeX formulas using MathJax\n"
+ "(see http://www.mathjax.org) which uses client side Javascript for the\n"
+ "rendering instead of using prerendered bitmaps. Use this if you do not\n"
+ "have LaTeX installed or if you want to formulas look prettier in the HTML\n"
+ "output. When enabled you also need to install MathJax separately and\n"
+ "configure the path to it using the MATHJAX_RELPATH option.",
+ FALSE
+ );
+ //----
+ cs = cfg->addString(
+ "MATHJAX_RELPATH",
+ "When MathJax is enabled you need to specify the location relative to the\n"
+ "HTML output directory using the MATHJAX_RELPATH option. The destination\n"
+ "directory should contain the MathJax.js script. For instance, if the mathjax\n"
+ "directory is located at the same level as the HTML output directory, then\n"
+ "MATHJAX_RELPATH should be ../mathjax. The default value points to the mathjax.org site, so you can quickly see the result without installing\n"
+ "MathJax, but it is strongly recommended to install a local copy of MathJax\n"
+ "before deployment."
+ );
+ cs->setDefaultValue("http://www.mathjax.org/mathjax");
+ //----
+ cb = cfg->addBool(
"SEARCHENGINE",
"When the SEARCHENGINE tag is enabled doxygen will generate a search box\n"
"for the HTML output. The underlying search engine uses javascript\n"
@@ -1480,7 +1504,7 @@ void addConfigOptions(Config *cfg)
"using Javascript. Doxygen will generate the search PHP script and index\n"
"file to put on the web server. The advantage of the server\n"
"based approach is that it scales better to large projects and allows\n"
- "full text search. The disadvances is that it is more difficult to setup\n"
+ "full text search. The disadvantages are that it is more difficult to setup\n"
"and does not have live searching capabilities.",
FALSE
);
diff --git a/src/doxygen.cpp b/src/doxygen.cpp
index 4d78e16..3efe75d 100644
--- a/src/doxygen.cpp
+++ b/src/doxygen.cpp
@@ -8628,6 +8628,7 @@ static void parseFiles(Entry *root,EntryNav *rootNav)
static QCString resolveSymlink(QCString path)
{
int sepPos=0;
+ int oldPos=0;
QFileInfo fi;
QDict<void> nonSymlinks;
QDict<void> known;
@@ -8651,7 +8652,8 @@ static QCString resolveSymlink(QCString path)
if (fi.isSymLink())
{
QString target = fi.readLink();
- if (QFileInfo(target).isRelative())
+ bool isRelative = QFileInfo(target).isRelative();
+ if (isRelative)
{
target = QDir::cleanDirPath(oldPrefix+"/"+target.data());
}
@@ -8667,12 +8669,22 @@ static QCString resolveSymlink(QCString path)
sepPos = 0;
if (known.find(result)) return QCString(); // recursive symlink!
known.insert(result,(void*)0x8);
+ if (isRelative)
+ {
+ sepPos = oldPos;
+ }
+ else // link to absolute path
+ {
+ sepPos = 0;
+ oldPrefix = "/";
+ }
}
else
{
nonSymlinks.insert(prefix,(void*)0x8);
+ oldPrefix = prefix;
}
- oldPrefix = prefix;
+ oldPos = sepPos;
}
}
while (sepPos!=-1);
@@ -10473,7 +10485,8 @@ void generateOutput()
//writeDirDependencyGraph(Config_getString("HTML_OUTPUT"));
- if (Doxygen::formulaList.count()>0 && Config_getBool("GENERATE_HTML"))
+ if (Doxygen::formulaList.count()>0 && Config_getBool("GENERATE_HTML")
+ && !Config_getBool("USE_MATHJAX"))
{
msg("Generating bitmaps for formulas in HTML...\n");
Doxygen::formulaList.generateBitmaps(Config_getString("HTML_OUTPUT"));
diff --git a/src/htmldocvisitor.cpp b/src/htmldocvisitor.cpp
index 7de6e52..cfe229e 100644
--- a/src/htmldocvisitor.cpp
+++ b/src/htmldocvisitor.cpp
@@ -490,14 +490,36 @@ void HtmlDocVisitor::visit(DocFormula *f)
forceEndParagraph(f);
m_t << "<p class=\"formulaDsp\">" << endl;
}
- m_t << "<img class=\"formula"
+
+ if (Config_getBool("USE_MATHJAX"))
+ {
+ QCString text = f->text();
+ bool closeInline = FALSE;
+ if (!bDisplay && !text.isEmpty() && text.at(0)=='$' &&
+ text.at(text.length()-1)=='$')
+ {
+ closeInline=TRUE;
+ text = text.mid(1,text.length()-2);
+ m_t << "\\(";
+ }
+ m_t << convertToHtml(text);
+ if (closeInline)
+ {
+ m_t << "\\)";
+ }
+ }
+ else
+ {
+ m_t << "<img class=\"formula"
<< (bDisplay ? "Dsp" : "Inl");
- m_t << "\" alt=\"";
- filterQuotedCdataAttr(f->text());
- m_t << "\"";
- /// @todo cache image dimensions on formula generation and give height/width
- /// for faster preloading and better rendering of the page
- m_t << " src=\"" << f->relPath() << f->name() << ".png\"/>";
+ m_t << "\" alt=\"";
+ filterQuotedCdataAttr(f->text());
+ m_t << "\"";
+ /// @todo cache image dimensions on formula generation and give height/width
+ /// for faster preloading and better rendering of the page
+ m_t << " src=\"" << f->relPath() << f->name() << ".png\"/>";
+
+ }
if (bDisplay)
{
m_t << endl << "</p>" << endl;
diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp
index 991bab9..e682583 100644
--- a/src/htmlgen.cpp
+++ b/src/htmlgen.cpp
@@ -902,6 +902,24 @@ static void writeDefaultHeaderFile(FTextStream &t, const char *title,
t << "<link href=\"" << relPathStr << "search/search.css\" rel=\"stylesheet\" type=\"text/css\"/>\n";
t << "<script type=\"text/javaScript\" src=\"" << relPathStr << "search/search.js\"></script>\n";
}
+ if (Config_getBool("USE_MATHJAX"))
+ {
+ QCString path = Config_getString("MATHJAX_RELPATH");
+ if (!path.isEmpty() && path.at(path.length()-1)!='/')
+ {
+ path+="/";
+ }
+ if (path.isEmpty() || path.left(2)=="..") // relative path
+ {
+ path.prepend(relPathStr);
+ }
+ t << "<script src=\"" << path << "MathJax.js\">\n";
+ t << " MathJax.Hub.Config({\n";
+ t << " extensions: [\"tex2jax.js\"],\n";
+ t << " jax: [\"input/TeX\",\"output/HTML-CSS\"],\n";
+ t << "});\n";
+ t << "</script>\n";
+ }
t << "<link ";
t << "href=\"";
if (Config_getString("HTML_STYLESHEET").isEmpty())
diff --git a/src/htmlhelp.cpp b/src/htmlhelp.cpp
index 32077e7..c4d4e9e 100644
--- a/src/htmlhelp.cpp
+++ b/src/htmlhelp.cpp
@@ -483,6 +483,7 @@ void HtmlHelp::createProjectFile()
t << s << endl;
s = indexFiles.next();
}
+ // items not found by the html help compiler scan.
t << "tabs.css" << endl;
t << "tab_a.png" << endl;
t << "tab_b.png" << endl;
@@ -490,10 +491,11 @@ void HtmlHelp::createProjectFile()
t << "tab_s.png" << endl;
t << "nav_h.png" << endl;
t << "nav_f.png" << endl;
+ t << "bc_s.png" << endl;
if (Config_getBool("HTML_DYNAMIC_SECTIONS"))
{
- t << "open.gif" << endl;
- t << "closed.gif" << endl;
+ t << "open.png" << endl;
+ t << "closed.png" << endl;
}
f.close();
}
diff --git a/src/latexdocvisitor.cpp b/src/latexdocvisitor.cpp
index 60dc956..46b9299 100644
--- a/src/latexdocvisitor.cpp
+++ b/src/latexdocvisitor.cpp
@@ -1411,6 +1411,10 @@ void LatexDocVisitor::startDotFile(const QCString &fileName,
{
m_t << "[height=" << height << "]";
}
+ else
+ {
+ m_t << "[width=\\textwidth]";
+ }
m_t << "{" << baseName << "}";
if (hasCaption)
@@ -1474,6 +1478,10 @@ void LatexDocVisitor::startMscFile(const QCString &fileName,
{
m_t << "[height=" << height << "]";
}
+ else
+ {
+ m_t << "[width=\\textwidth]";
+ }
m_t << "{" << baseName << "}";
if (hasCaption)
diff --git a/src/pre.l b/src/pre.l
index db5bf28..7bb5c1d 100644
--- a/src/pre.l
+++ b/src/pre.l
@@ -1863,6 +1863,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
}
}
<SkipCommand>"endif" {
+ g_expectGuard = FALSE;
decrLevel();
if (--g_ifcount<0)
{
@@ -2629,7 +2630,7 @@ void preprocessFile(const char *fileName,BufStr &input,BufStr &output)
BEGIN( Start );
- g_expectGuard = TRUE;
+ g_expectGuard = guessSection(fileName)==Entry::HEADER_SEC;
g_lastGuardName.resize(0);
g_guardExpr.resize(0);
diff --git a/src/translator_eo.h b/src/translator_eo.h
index 59d47ec..2dc830b 100644
--- a/src/translator_eo.h
+++ b/src/translator_eo.h
@@ -14,6 +14,8 @@
* input used in their production; they are not affected by this license.
*
*/
+
+ /* Tradukita kaj ĝisdatigata de Ander Martinez. */
#ifndef TRANSLATOR_EO_H
#define TRANSLATOR_EO_H
@@ -40,7 +42,7 @@
Translator class (by the local maintainer) when the localized
translator is made up-to-date again.
*/
-class TranslatorEsperanto : public TranslatorAdapter_1_6_3
+class TranslatorEsperanto : public Translator
{
public:
@@ -1809,6 +1811,70 @@ class TranslatorEsperanto : public TranslatorAdapter_1_6_3
return "Nenia kongruo";
}
+//////////////////////////////////////////////////////////////////////////
+// new since 1.6.3 (missing items for the directory pages)
+//////////////////////////////////////////////////////////////////////////
+
+ /*! introduction text for the directory dependency graph */
+ virtual QCString trDirDependency(const char *name)
+ {
+ return (QCString)"Diagramo de dependecoj dosierujaj por "+name;
+ }
+
+ /*! when clicking a directory dependency label, a page with a
+ * table is shown. The heading for the first column mentions the
+ * source file that has a relation to another file.
+ */
+ virtual QCString trFileIn(const char *name)
+ {
+ return (QCString)"Dosiero en "+name;
+ }
+
+ /*! when clicking a directory dependency label, a page with a
+ * table is shown. The heading for the second column mentions the
+ * destination file that is included.
+ */
+ virtual QCString trIncludesFileIn(const char *name)
+ {
+ return (QCString)"Inkluzivas dosieron en "+name;
+ }
+
+ /** Compiles a date string.
+ * @param year Year in 4 digits
+ * @param month Month of the year: 1=January
+ * @param day Day of the Month: 1..31
+ * @param dayOfWeek Day of the week: 1=Monday..7=Sunday
+ * @param hour Hour of the day: 0..23
+ * @param minutes Minutes in the hour: 0..59
+ * @param seconds Seconds within the minute: 0..59
+ * @param includeTime Include time in the result string?
+ */
+ virtual QCString trDateTime(int year,int month,int day,int dayOfWeek,
+ int hour,int minutes,int seconds,
+ bool includeTime)
+ {
+ static const char *days[] = { "lundo","mardo","merkredo",
+ "ĵaŭdo","vendredo","sabato",
+ "dimanĉo" };
+
+ static const char *months[] = { "Januaro", "Februaro", "Marto",
+ "Aprilo", "Majo", "Junio",
+ "Julio", "Aŭgusto", "Septembro",
+ "Oktobro", "Novembro",
+ "Decembro"
+ };
+ QCString sdate;
+ sdate.sprintf("%s, %d-a de %s %d",days[dayOfWeek-1],day,months[month-1],year);
+ if (includeTime)
+ {
+ QCString stime;
+ stime.sprintf(" %.2d:%.2d:%.2d",hour,minutes,seconds);
+ sdate+=stime;
+ }
+ return sdate;
+ }
+
+
};
#endif