Commit graph

99 commits

Author SHA1 Message Date
albert-github
cfcc2ed462 issue #10608 GitHub Flavored Markdown
Implementation of the GitHub Alerts by means of translating it to doxygen commands.
2024-02-01 14:44:48 +01:00
Dimitri van Heesch
7780d51498
issue #7688 Include markdown file in mainpage.dox 2023-11-21 21:38:57 +01:00
Dimitri van Heesch
ca65fd0bbb
Refactoring: make use of C++17 structured bindings 2023-05-18 13:37:08 +02:00
Dimitri van Heesch
ac511df261
Refactoring: Remove raw pointer use from cmdmapper 2023-04-15 21:23:24 +02:00
Dimitri van Heesch
a3de007be2
Renamed \doxysetting to \doxyconfig
Some other minor optimisations
2023-03-26 15:21:33 +02:00
albert-github
989e11b35e Merge branch 'master' into feature/bug_config_value
# Conflicts:
#	src/cmdmapper.h
#	src/docparser.cpp
#	src/docparser.h
#	src/doctokenizer.l
2023-03-26 13:24:35 +02:00
albert-github
47ebd4bb7b Merge branch 'master' into feature/bug_thead
# Conflicts:
#	doc/htmlcmds.doc
#	src/cmdmapper.cpp
#	src/cmdmapper.h
#	src/docparser.cpp
2023-03-25 13:39:23 +01:00
Dimitri van Heesch
feb7f8dbae
Replace generated @anchor in markdown with internal @ianchor 2023-02-21 21:09:48 +01:00
albert-github
1078bbf9b3 Merge branch 'master' into feature/issue_7802_2
# Conflicts:
#	src/cmdmapper.h
#	src/commentscan.l
#	src/docparser.cpp
#	src/doctokenizer.h
#	src/doctokenizer.l
#	src/markdown.cpp
#	src/pyscanner.l
2022-08-17 18:14:26 +02:00
albert-github
bbe70d5075 Merge branch 'master' into feature/bug_showdate
# Conflicts:
#	doc/index.doc
#	src/cmdmapper.h
#	src/docparser.cpp
#	src/docparser.h
#	src/doctokenizer.h
#	src/doctokenizer.l
#	src/translator_am.h

This command  (`\showdate`) is also useful for the internal doxygen documentation at the gh-pages as here the `HTML_TIMESTAMP` is set to `NO` for "Disable HTML_TIMESTAMP in generated output to reduce gh-pages changes"
2022-08-15 14:53:04 +02:00
Dimitri van Heesch
ceb573f825
issue #9409: Error-message and Line-Number is NOT related to document 2022-06-26 11:10:34 +02:00
albert-github
afb0a4465e Show date in a customized form
Show a specified or the current date in a specified format.
This format translates also the name of the weekday and the name of the month to the names used according to the `OUTPUT_LANGUAGE` setting.
When the `<data>` is not specified the current date is used and this can be used for e.g. automatically adjusting the copyright message in the documentation (see e.g. `index.doc`)

(The names are derived by means of a python script from the python distribution).
2022-02-11 14:35:26 +01:00
Dimitri van Heesch
bc29a23edc
Merge branch 'master' into feature/bug_htmltag_details 2021-12-22 13:52:58 +01:00
albert-github
a55934e83f Adding HTML tag <cite>
Adding the HTML `<cite>` tag as a style change tag.
2021-12-20 18:30:47 +01:00
Dimitri van Heesch
f461a68a06
Merge pull request #8951 from albert-github/feature/bug_688384
bug_688384 JavaDoc @link does not use code font
2021-12-08 23:21:50 +01:00
Dimitri van Heesch
db7747d129
Merge pull request #8949 from albert-github/feature/issue_8590
issue #8590 XML: Issue with spacing around <programlisting>
2021-12-08 23:20:16 +01:00
Dimitri van Heesch
9c07ff6a3e
Merge pull request #7482 from albert-github/feature/bug_double_rtfonly
Remove double entry of rtfonly command from list of commands
2021-12-08 13:09:23 +01:00
albert-github
22ada22cdf bug_688384 JavaDoc @link does not use code font
When looking at the JavaDoc definition we see:
```
{@link  package.class#member  label}
    Inserts an in-line link with visible text label that points to the documentation for the specified package, class or member name of a referenced class.
```
and
```
{@linkplain  package.class#member  label}
    Identical to {@link}, except the link's label is displayed in plain text than code font.
```

- setting a `{@link ...}` in code font
- implementing `{@linkplain ...}` (JavaDoc @linkplain is not recognized (Origin: bugzilla #688387))
2021-12-08 12:06:53 +01:00
albert-github
6c5b929550 issue #8590 XML: Issue with spacing around <programlisting>
In the JavaDoc documentation we see:
```
{@code  text}
    Equivalent to <code>{@literal}</code>.
```
and
```
{@literal  text}
    Displays text without interpreting the text as HTML markup or nested javadoc tags
```

These commands have been implemented by means of transforming them into doxygen commands.

This implementation also:
- the `{@literal ..}` command, #4953 JavaDoc @literal is not recognized (Origin: bugzilla #688386)
- #4949 JavaDoc @code makes a block element instead of inline element (Origin: bugzilla #688381)
- #4952 JavaDoc @code generates link (Origin: bugzilla #688385)
2021-12-07 13:57:21 +01:00
albert-github
037da647c6 Give markdown verbatim and fenced code blocks their own command.
When we have e.g. ` ``` ` doxygen translates this to a `\code` .. `\endcode` block and this gives some hard to understand warnings when we have in the fenced block the text `\endcode`.
(analogous for a 4 space extra indentation that is seen as a `\verbatim` block). By defining new, internal, commands for this the problem can be overcome.

In Python there is also an under the hood conversion and this benefits also from these new commands.
2021-11-25 15:51:28 +01:00
albert-github
04d662959c HTML tag details
A HTML tag `<details>` gives the possibility to specifies additional details that the user can open and close on demand.
See e.g.: https://www.w3schools.com/tags/tag_details.asp

Found indifferent Fossies pakages.
2021-11-11 18:31:41 +01:00
albert-github
a942aa0fe8 Making settings fro settings file available.
Making the settings from the doxygen settings / configuration file directly available inside the documentation.
2021-09-15 11:58:14 +02:00
albert-github
4176461b84 Incorrect line number in warnings in case of if command
When having a problem like:
```
/// \file

/**
 * aaa
 */
typedef enum {
  /** bbb
   * \line_9
   * @if INTERNAL
   * \line_11
   * @endif
   * \line_13
   */
         BS
} bsb_type_enum;
```
with Doxyfile:
```
JAVADOC_AUTOBRIEF      = NO
ENABLED_SECTIONS       = INTERNAL
GENERATE_LATEX         = NO
INPUT=b.h
QUIET                  = YES
```
we get the warnings:
.../b.h:9: warning: Found unknown command '\line_9'
.../b.h:10: warning: Found unknown command '\line_11'
.../b.h:11: warning: Found unknown command '\line_13'
```
so the line number in the warning is incorrect for the lines after the `if` and `endif` command.
Looking at the output of the commentscanner we see:
```
CommentScanner: .../b.h:8
output=[
brief=[line=-1
]
docs=[line=8
bbb
 \line_9
 \line_11
  \line_13]
inbody=[line=-1
]
]
```
in other words a number of lines "disappear".

As the `if` command is an inline command it is not possible to just replace e.g. the `if` line wit an empty line (as this would be seen as a paragraph break).

With this patch a new internal command `iline` is defined with which it is possible to overrule in the documentation tokenizer the line counter.
2021-06-30 16:05:11 +02:00
Dimitri van Heesch
592aaa4f17
Refactoring: remove implicit conversion from QCString to const char *
This commit changes the following in relation to string use
- The implicit convert from 'QCString' to 'const char *' is removed
- Strings parameters use 'const QCString &' as much as possible in favor
  over 'const char *'
- 'if (s)' where s is a QCString has been replaced by 'if(!s.isEmpty())'
- data() now always returns a valid C-string and not a 0-pointer.
- when passing a string 's' to printf and related functions 'qPrint(s)' is
  used instead of 's.data()'
- for empty string arguments 'QCString()' is used instead of '0'
- The copy() operation has been removed
- Where possible 'qstrcmp(a,b)==0' has been replaces by 'a==b' and
  'qstrcmp(a,b)<0' has been replaced by 'a<b'
- Parameters of string type that were default initialized with '= 0' are
  no initialized with '= QCString()'
2021-04-22 19:34:13 +02:00
Dimitri van Heesch
532f1f394f
Refactoring: modernize cmdmapper 2021-01-22 21:45:18 +01:00
albert-github
b59182f64d Adding commands \rtfinclude, \docbookinclude, \maninclude and \xmlinclude
Adding for consistency with `\*only`, `\htmlincclude` and `\latexinclude` the commands: `\rtfinclude`, `\docbookinclude`, `\maninclude` and `\xmlinclude`
2020-01-09 19:13:16 +01:00
albert-github
667861e2cb Remove double entry of rtfonly command from list of commands
Remove double entry of rtfonly command from list of commands
2020-01-05 12:28:43 +01:00
Dimitri van Heesch
7d658d1a5d
Replaced \_fakeform by \_form 2019-12-26 15:55:11 +01:00
Dimitri van Heesch
f76f1a7cd8
Merge branch 'feature/bug_formula' of https://github.com/albert-github/doxygen into albert-github-feature/bug_formula 2019-12-26 15:46:57 +01:00
Dimitri van Heesch
2d3a014e62
Merge branch 'feature/bug_html_s' of https://github.com/albert-github/doxygen into albert-github-feature/bug_html_s 2019-12-26 13:35:01 +01:00
albert-github
9664e0b46b Better warning in case of @form
When having a problem like:
```
/** \file */

/**
 * The fie
 *
 * @form: the new format
 * @content: the content of the form
 *
 * Sets @form content to be @content.
 *
 * \f$ \alpha \f$ \f[ \beta \f]
 */
void fie(char *form, char *content);
```
we get warnings like:
```
.../aa.h:5: warning: Wrong formula id -1
.../aa.h:6: warning: Found unknown command '\content'
.../aa.h:8: warning: Wrong formula id -1
.../aa.h:8: warning: Found unknown command '\content'
```

The `@form:` is in RST analogue to the doxygen `@param form` but not understood by doxygen.
The result is that it is seen as an formula as doxygen translates the formula commands to `\form`.
For `@content` is handled properly as this is not a doxygen command.

In this patch a more unique name is chosen so these type of conflicts don't appear (that easy). The resulting, better, warnings are now:
```
.../aa.h:5: warning: Found unknown command '\form'
.../aa.h:6: warning: Found unknown command '\content'
.../aa.h:8: warning: Found unknown command '\form'
.../aa.h:8: warning: Found unknown command '\content'
```
2019-11-06 14:36:37 +01:00
Dimitri van Heesch
4a9541d160
Reduce the use of QString in favor of the more efficient QCString 2019-09-21 16:57:24 +02:00
albert-github
c5202a612f Add '<thead>', '<tbody>' and '<tfoot>' HTML tags as dummies
Add '<thead>', '<tbody>' and '<tfoot>' HTML tags but ignore them for the time being.
In case we have a table like:
```
<table>
  <thead>
  <tr>
  <th>Col 1</th>
  <th>Col 2</th>
  </tr>
  </thead> <tbody>
  <tr>
  <td>Row 1 Col 1</td>
  <td>Row 1 Col 1</td>
  </tr>
  </tbody>
</table>
```
the output would be garbled, now we get a table.
2019-08-21 15:15:10 +02:00
albert-github
cf82dae5f6 Adding HTML s tag, XML corrections for other tags
Adding the HTML `<s>` tag (https://www.w3schools.com/tags/tag_s.asp).

Adding 's' and correcting 'inc' to 'ins'  in compound.xsd
2019-08-16 12:46:21 +02:00
albert-github
83db204cd8 Adding HTML tags ins and del
Github does not support the `<u>` tag for underlined text, in HTML there exists the tag `<ins>`. On https://www.w3schools.com/tags/tag_ins.asp is written:
The `<ins>` tag defines a text that has been inserted into a document.
Browsers will normally strike a line through deleted text and underline inserted text.

Most browsers will display the `<ins>` element with the following default values:
```
ins {
  text-decoration: underline;
}
```

analogous there exists the tag `<del>` (https://www.w3schools.com/tags/tag_del.asp):
The `<del>` tag defines text that has been deleted from a document.
Browsers will normally strike a line through deleted text and underline inserted text.

Most browsers will display the `<del>` element with the following default values:
```
del {
  text-decoration: line-through;
}
```

Definitions analogue to the underline and strike through tag the implementation for the other formats has been chosen.
2019-04-04 14:43:57 +02:00
Dimitri van Heesch
5c4d10eb3e Merge branch 'feature/bug_escaped_equal_sign' of https://github.com/albert-github/doxygen into albert-github-feature/bug_escaped_equal_sign 2018-12-26 12:00:40 +01:00
Dimitri van Heesch
c3ee766d0a Improved robustness of the emoji feature
Changes:
- Use of `@emoji name` instead of `:name:`
- Support only GitHub emojis (i.e. without spaces or special characters in the name)
- Provided script to download images for LaTeX support.
- XML output now has <emoji> tag with name an unicode sequence.
2018-12-23 20:08:19 +01:00
albert-github
8292eeebd5 Create command for escaped equal sign
This command writes an equal sign (`=`) to the output. This  character sequence has to be escaped in some cases, because it is used in Markdown header processing.
2018-11-07 19:44:49 +01:00
albert-github
47fee38782 issue_6517: Emoji support
Added issue support for the different output types.

- Sources of the emoji
  - based on the Unicode definition v11.0:
    - https://unicode.org/emoji/charts/full-emoji-list.html
    - http://www.unicode.org/emoji/charts/full-emoji-modifiers.html
  - github definition list:
    - https://api.github.com/emojis

- Input of emoji: :<test>: with the restriction that direct after the opening colon and direct before the closing colon no space is allowed
  - doctokinizer.l, adding detection of emoji and new command `\:`
  - doktokinizer.h, adding "word" type  TK_EMOJI
  - docparser.* handling of new "word" type TK_EMOJI (analogous to HTML Entities), handling of new command `\:`
  - cmdmapper,cpp, cmdmapper.h, adding new command `\:`
  - htmlentity.cpp, adding new definition required for new command `\:`

- Emoji
  - emoji.cpp, emoji.h, class for handling emoji analogous to HTML Entities, including small directions on how to update the code when a new emoji is defined. Not everything is converted to lowercase for comparison and accents are removed.
  - doxygen.cpp possibility to create list of supported emoji

- handling emoji for output types (analogous to HTML Entities), see documentation for different output types
  - docparser.h, *docvisitor.*
  - rtfdocvisitor.* converting output to UTF-16 (based on http://scruss.com/blog/2017/03/12/in-the-unlikely-event-you-need-to-represent-emoji-in-rtf-using-perl/)
  - latexdocvisitor.*, handling arguments for emoji in output (see also latexgen.cpp for meaning of the arguments of doxygenemoji).
  - latexgen.cpp, adding new latex command for doxygen (doxygenemoji) and prevent too many open file (code before documentclass)
  - config.xml, definition of `LATEX_EMOJI_DIRECTORY` with path to images required for LaTeX output

- Documentation:
   - emojisup.doc, user description
   - commands.doc, description of new command `\:`
   - index.doc, reference to emoji chapter
   - xmlcmds.doc, adjust reference to next chapter as a new chapter is added
   - Doxyfile*, adding emoji chapter

Build system
  - CMakeLists.txt adding new files
2018-10-01 18:58:03 +02:00
albert-github
b4e5351978 Bug 667993 - HTML tags <u> and </u> not supported
Added underline possibility and strike through possibility for the different output formats insofar it is possible (other similar possibilities are not always possible for all output formats either).
2018-07-07 14:47:33 +02:00
albert-github
9ae1af9b86 Bug 770660 - Code snippet always shows line numbers from 1
This patch makes the handling of the \snippet and other commands consistent between the different languages (no line numbers anymore with python) and also introduces analogous to \includelineno  the command \snippetlineno.

Some non relevant changes:
- *code.l Calculation of the end line was incorrect, in case of a snippet the end line was the number of lines of the snippet and not reltive to the start line.
- *code.l made consistent over the different laguages, enabling exBlock and inlineFragment
- testing/indexpage.xml in test 14 the \snippet command was used with python and giving line numbers, linenumbers are now gone (consistency)
2016-09-03 11:04:38 +02:00
albert-github
ba84836308 Introducing commands includedoc and snippetdoc
Purpose to have the possibility to have repeating texts not repeated in the comments.
The commands include and snippet introduce code blocks whilst the commands includedoc and snippetdoc inclode the text as is and it will be parsed by doxygen.
2016-08-21 14:17:20 +02:00
Dimitri van Heesch
5487f855ad Bug 756604 - Unable to prevent a numbered list 2015-11-01 16:15:17 +01:00
Dimitri van Heesch
e11b487853 Bump copyright year 2015-02-26 20:39:53 +01:00
Dimitri van Heesch
67e8d626fe Merge branch 'feature/bug_size_latex' of https://github.com/albert-github/doxygen into albert-github-feature/bug_size_latex
Conflicts:
	src/doctokenizer.h
	src/latexgen.cpp
2014-12-20 15:04:50 +01:00
albert-github
329a4ddc03 Limit images sizes and make more uniform (LaTeX)
This patch adjusts some problems regarding image sizes in LaTeX output of doxygen (a.o. Bug 738299 - When using msc or PlantUML, the default latex for the created image should include [width=\linewidth]) this has been done is such a way that all the "image" commands (i.e. image, dot, dotfile, msc, mscfile, diafile, startuml) operate in a similar way / have the same possibilities.

- commands.doc
Adjusted documentation to reflect changes.

- cmdmapper.cpp
- cmdmapper.h
Added utility function to map command id back to command name

- doctokenizer.h
- doctokenizer.l
Handle Caption  and Size indication. Required also that some other rules had to be tightened a bit (like usage of {} in startuml and usage of "" for captions. This was already described in the documentation in this way).

- docparser.cpp
- docparser.h
Created routine to uniformly handle the Caption and size indications and store them in a general way.

- latexgen.cpp
Replaced graphicx package by adjustbox package (includes graphicx) to support "min width" etc.

- doxygen.sty templates\latex
Added commands to make commands with and without caption behave similar.

- docbookvisitor.cpp
- docbookvisitor.h
- htmldocvisitor.cpp
- latexdocvisitor.cpp
- latexdocvisitor.h
- printdocvisitor.h
- xmldocvisitor.cpp
Created routine to uniformly handle the Caption and size indications in a general way.

- indexpage.xml (testing\022)
- indexpage.xml (testing\031)
- class_receiver.xml (testing\037)
- class_sender.xml (testing\037)
Adjusted example output.
2014-11-28 14:44:07 +01:00
Dimitri van Heesch
c6e4122657 Bug 740218 - Full scope needed when making link inside cross-referenced section 2014-11-17 20:42:40 +01:00
Dimitri van Heesch
7506404e64 Bug 731947 - Support for PlantUML 2014-08-10 20:09:33 +02:00
Dimitri van Heesch
385b87e08c Added support for \-- and \--- to prevent interpretation as ndash and mdash 2014-04-13 11:33:52 +02:00
Dimitri van Heesch
1134237afe Added \latexinclude command (thanks to Juan Zaratiegui for the patch) 2014-03-27 21:22:11 +01:00