如何在Doxygen中更改\ section,\ subsection等的字体大小?

时间:2015-04-30 14:35:34

标签: css formatting doxygen

我想更改doxygen的html输出的\ section和\ subsection字体大小。另外,我想在样式中的部分和(子)子部分添加数字:

1第1节

1.1第1.1小节

1.1.1次级部分

从手册中我发现我应该复制customdoxygen.css并将其更改为代表我的需求。不幸的是我对css一无所知,无法找到负责\ section和\ subsection字体大小的命令。

this question中,据说应该定义一个h4标签。那是对的吗?我怎么能这样做?

1 个答案:

答案 0 :(得分:1)

这是你做的: 在配置doxyfile中:

HTML_EXTRA_STYLESHEET = mystylesheet.css

此样式表中的设置会覆盖其他样式表中的设置。 然后创建文本文件mystylesheet.css。

要更改字体大小,请为mystylesheet.css添加h1样式。例如:

h1 { font-size:1.5em; }

要处理带编号的标题,可以使用带有CSS计数器的样式。这是一个例子:

<!doctype html>
<html>
<head>
<style>
body {counter-reset: h2}
h2 {counter-reset: h3}
h3 {counter-reset: h4}
h4 {counter-reset: h5}
h5 {counter-reset: h6}

h2:before {counter-increment: h2; content: counter(h2) ". "}
h3:before {counter-increment: h3; content: counter(h2) "." counter(h3) ". "}
h4:before {counter-increment: h4; content: counter(h2) "." counter(h3) "." counter(h4) ". "}
h5:before {counter-increment: h5; content: counter(h2) "." counter(h3) "." counter(h4) "." counter(h5) ". "}
h6:before {counter-increment: h6; content: counter(h2) "." counter(h3) "." counter(h4) "." counter(h5) "
</style>
</head>  
<body>
<h1> Demonstration of Numbered Headings</h1>
<p>To create numbered headings, you can use CSS counters. For details search for "CSS counters".</p>
<p>In this example the numbered headings begin from heading level 2. Heading level 1 is reserved for the page title. </p>
<h2>Setting Up the Style</h2>
The css style properties specify when to reset the heading level counter, and when to increment it. 
<h3>Creating the Counter</h3>
<p>You can create a named counter with the counter-reset property.  The value of counter-reset is the name of the counter. For details search for "CSS counter-reset".</p>
<h3>When Does the Value Reset</h3>
<p>It resets when the tag appears of which the counter-reset is a property.</p>
<h2>Displaying the Counters</h2>
<p>The counters are displayed by specifying a before selector for the heading levels, and styling it with content that includes counters for the heading levels preceding the current level, as well as the current level.</p>
<h3>Where is the Example?</h3>
<p>In the style tag of this page.</p>
<h4>I Can't See It</h4>
<p>Use the source, Luke.</p>
</body>
</html>