Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
doxverilog
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
doxverilog
Commits
dc37f6c2
Commit
dc37f6c2
authored
Dec 09, 2014
by
Dimitri van Heesch
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #253 from albert-github/feature/bug_687576
Bug 687576 - Add support for LATEX_EXTRA_STYLESHEET
parents
23701448
222753a9
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
87 additions
and
10 deletions
+87
-10
config.xml
src/config.xml
+18
-5
doxygen.cpp
src/doxygen.cpp
+28
-0
latexgen.cpp
src/latexgen.cpp
+23
-2
latexgen.h
src/latexgen.h
+2
-0
util.cpp
src/util.cpp
+12
-3
util.h
src/util.h
+4
-0
No files found.
src/config.xml
View file @
dc37f6c2
...
...
@@ -1797,13 +1797,13 @@ doxygen -w html new_header.html new_footer.html new_stylesheet.css YourConfigFil
since it does not replace the standard style sheet and is therefore more
robust against future updates. Doxygen will copy the style sheet files to
the output directory.
\note The order of the extra stylesheet files is of importance (e.g. the last
stylesheet in the list overrules the setting of the previous ones in the list).
\note The order of the extra style
sheet files is of importance (e.g. the last
style
sheet in the list overrules the setting of the previous ones in the list).
]]>
</docs>
<docs
doxywizard=
'0'
doxyfile=
'0'
>
<![CDATA[
Here is an example stylesheet that gives the contents area a fixed width:
Here is an example style
sheet that gives the contents area a fixed width:
\verbatim
body {
background-color: #CCC;
...
...
@@ -1858,7 +1858,7 @@ hr.footer {
<docs>
<![CDATA[
The \c HTML_COLORSTYLE_HUE tag controls the color of the HTML output.
Doxygen will adjust the colors in the stylesheet and background images
Doxygen will adjust the colors in the style
sheet and background images
according to this color. Hue is specified as an angle on a colorwheel,
see http://en.wikipedia.org/wiki/Hue for more information.
For instance the value 0 represents red, 60 is yellow, 120 is green,
...
...
@@ -2173,7 +2173,7 @@ The \c DOCSET_PUBLISHER_NAME tag identifies the documentation publisher.
JavaScript, DHTML, CSS and frames is required (i.e. any modern browser).
Windows users are probably better off using the HTML help feature.
Via custom stylesheets (see \ref cfg_html_extra_stylesheet "HTML_EXTRA_STYLESHEET")
Via custom style
sheets (see \ref cfg_html_extra_stylesheet "HTML_EXTRA_STYLESHEET")
one can further \ref doxygen_finetune "fine-tune" the look of the index.
As an example, the default style sheet generated by doxygen has an
example that shows how to put an image at the root of the tree instead of
...
...
@@ -2534,6 +2534,19 @@ EXTRA_PACKAGES=times
used inside the footer.
<br>
Note: Only use a user-defined footer if you know what you are doing!
]]>
</docs>
</option>
<option
type=
'list'
id=
'LATEX_EXTRA_STYLESHEET'
format=
'file'
defval=
''
depends=
'GENERATE_LATEX'
>
<docs>
<![CDATA[
The \c LATEX_EXTRA_STYLESHEET tag can be used to specify additional
user-defined \f$\mbox{\LaTeX}\f$ style sheets that are included after the standard
style sheets created by doxygen. Using this option one can overrule
certain style aspects. Doxygen will copy the style sheet files to
the output directory.
\note The order of the extra style sheet files is of importance (e.g. the last
style sheet in the list overrules the setting of the previous ones in the list).
]]>
</docs>
</option>
...
...
src/doxygen.cpp
View file @
dc37f6c2
...
...
@@ -9161,6 +9161,33 @@ static void readTagFile(Entry *root,const char *tl)
parseTagFile
(
root
,
fi
.
absFilePath
().
utf8
());
}
//----------------------------------------------------------------------------
static
void
copyLatexStyleSheet
()
{
QStrList
latexExtraStyleSheet
=
Config_getList
(
"LATEX_EXTRA_STYLESHEET"
);
for
(
uint
i
=
0
;
i
<
latexExtraStyleSheet
.
count
();
++
i
)
{
QCString
fileName
(
latexExtraStyleSheet
.
at
(
i
));
if
(
!
fileName
.
isEmpty
())
{
QFileInfo
fi
(
fileName
);
if
(
!
fi
.
exists
())
{
err
(
"Style sheet '%s' specified by LATEX_EXTRA_STYLESHEET does not exist!
\n
"
,
fileName
.
data
());
}
else
{
QCString
destFileName
=
Config_getString
(
"LATEX_OUTPUT"
)
+
"/"
+
fi
.
fileName
().
data
();
if
(
!
checkExtension
(
fi
.
fileName
().
data
(),
latexStyleExtension
))
{
destFileName
+=
latexStyleExtension
;
}
copyFile
(
fileName
,
destFileName
);
}
}
}
}
//----------------------------------------------------------------------------
static
void
copyStyleSheet
()
{
...
...
@@ -11365,6 +11392,7 @@ void generateOutput()
g_outputList
->
add
(
new
LatexGenerator
);
LatexGenerator
::
init
();
copyLatexStyleSheet
();
// copy static stuff
copyExtraFiles
(
"LATEX_EXTRA_FILES"
,
"LATEX_OUTPUT"
);
}
...
...
src/latexgen.cpp
View file @
dc37f6c2
...
...
@@ -269,8 +269,29 @@ static void writeDefaultHeaderPart1(FTextStream &t)
t
<<
"% Packages required by doxygen
\n
"
"
\\
usepackage{fixltx2e}
\n
"
// for \textsubscript
"
\\
usepackage{calc}
\n
"
"
\\
usepackage{doxygen}
\n
"
"
\\
usepackage{graphicx}
\n
"
"
\\
usepackage{doxygen}
\n
"
;
QStrList
extraLatexStyle
=
Config_getList
(
"LATEX_EXTRA_STYLESHEET"
);
for
(
uint
i
=
0
;
i
<
extraLatexStyle
.
count
();
++
i
)
{
QCString
fileName
(
extraLatexStyle
.
at
(
i
));
if
(
!
fileName
.
isEmpty
())
{
QFileInfo
fi
(
fileName
);
if
(
fi
.
exists
())
{
if
(
checkExtension
(
fi
.
fileName
().
data
(),
latexStyleExtension
))
{
// strip the extension, it will be added by the usepackage in the tex conversion process
t
<<
"
\\
usepackage{"
<<
stripExtensionGeneral
(
fi
.
fileName
().
data
(),
latexStyleExtension
)
<<
"}
\n
"
;
}
else
{
t
<<
"
\\
usepackage{"
<<
fi
.
fileName
().
utf8
()
<<
"}
\n
"
;
}
}
}
}
t
<<
"
\\
usepackage{graphicx}
\n
"
"
\\
usepackage[utf8]{inputenc}
\n
"
"
\\
usepackage{makeidx}
\n
"
"
\\
usepackage{multicol}
\n
"
...
...
src/latexgen.h
View file @
dc37f6c2
...
...
@@ -22,6 +22,8 @@
class
QFile
;
static
const
char
*
latexStyleExtension
=
".sty"
;
/** Generator for LaTeX output. */
class
LatexGenerator
:
public
OutputGenerator
{
...
...
src/util.cpp
View file @
dc37f6c2
...
...
@@ -6561,16 +6561,25 @@ QCString rtfFormatBmkStr(const char *name)
return
*
tag
;
}
QCString
stripExtension
(
const
char
*
fName
)
bool
checkExtension
(
const
char
*
fName
,
const
char
*
ext
)
{
return
(
QCString
(
fName
).
right
(
QCString
(
ext
).
length
())
==
ext
);
}
QCString
stripExtensionGeneral
(
const
char
*
fName
,
const
char
*
ext
)
{
QCString
result
=
fName
;
if
(
result
.
right
(
Doxygen
::
htmlFileExtension
.
length
())
==
Doxygen
::
htmlFileExtension
)
if
(
result
.
right
(
QCString
(
ext
).
length
())
==
QCString
(
ext
)
)
{
result
=
result
.
left
(
result
.
length
()
-
Doxygen
::
htmlFileExtension
.
length
());
result
=
result
.
left
(
result
.
length
()
-
QCString
(
ext
)
.
length
());
}
return
result
;
}
QCString
stripExtension
(
const
char
*
fName
)
{
return
stripExtensionGeneral
(
fName
,
Doxygen
::
htmlFileExtension
);
}
void
replaceNamespaceAliases
(
QCString
&
scope
,
int
i
)
{
...
...
src/util.h
View file @
dc37f6c2
...
...
@@ -340,6 +340,10 @@ QCString rtfFormatBmkStr(const char *name);
QCString
linkToText
(
SrcLangExt
lang
,
const
char
*
link
,
bool
isFileName
);
bool
checkExtension
(
const
char
*
fName
,
const
char
*
ext
);
QCString
stripExtensionGeneral
(
const
char
*
fName
,
const
char
*
ext
);
QCString
stripExtension
(
const
char
*
fName
);
void
replaceNamespaceAliases
(
QCString
&
scope
,
int
i
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment