I am trying to use the doxygen to generate a user help, when I use the command \tableofcontents in the mainpage, nothing shows in the html output.I just don't know why, does anyone know how to use the command of tableofcontents? Some examples will be better, thanks!
Note that the browser is OK.
The solution key is to add a label to your headlines:
This is a level 1 header {#labelid_H1}
========================
This is a level 2 header {#labelid_H2}
------------------------
# This is a level 1 header # {#labelidH1}
## This is level 2 header ## {#labelidH2}
Then table of contents [TOC]
[TOC]
as well as headline links
[Link to first headline](#ref labelid_H1)
[Link to second headline](#labelid_H2)
are working.
Another point to mention is that Doxygen eats up the first line in the file that's used as mainpage (look for "Eat my shorts, Doxygen!" in: Use the README.md file as main page in Doxygen)
Related
I noticed that when GitHub pages with mkdocs have text or images in between numbers it ignores the numbering in the source document and instead restarts numbering. See here for an example of this.
Is there a way to force mkdocs to render the numbers in the original document instead of inventing its own?
If you add them all as 1. space and text, then sub item as image with a tab, it should work. As an example:
1. Option 1
imgage or next text
1. Option 2
You can check this documentation built using mkdocs as an example.
As Zoran mentioned above that was part of it. Things I figured out:
Code must be double tabbed - you cannot use ```
Indented lists must also be double tabbed - I wasn't able to get a single tab to work
Images do not have to be tabbed - they can be in line with the above text
There should not be an empty line when an image follows a numbered list item BUT FOR CODE there must.
I still haven't completely figured out. mkdoc's behavior is not as predictable as regular markdown
I want the pdf document to always have a page break at a section and subsection. I could add
#+latex: \clearpage
before each heading and sub-heading on org-mode. However, I think it makes my org document kind of confusing and visually dirty.
Is there a way to do it all at once, i.e., to force a page break so that all sections and subsections begin always on a new page?
I'd be glad if anyone help me.
You could add
\usepackage{titlesec}
\newcommand{\sectionbreak}{\clearpage}
\newcommand{\subsectionbreak}{\clearpage}
to your header. This has the advantage that it will automatically check if the previous unit actually had content and only add a page break in this case. This means that a section directly followed by a subsection won't be split across empty pages.
Try this:
#+LATEX_HEADER: \let\oldsection\section
#+LATEX_HEADER: \renewcommand{\section}{\clearpage\oldsection}
#+LATEX_HEADER: \let\oldsubsection\subsection
#+LATEX_HEADER: \renewcommand{\subsection}{\clearpage\oldsubsection}
I try to use a proper macro like .Bl with its .It to render list in mandoc (or per say man page) with the following syntax (as seen in mdoc.7)
The arguments are as follows:
.Bl -tag -width Ds
.It Fl v
Print verbose information.
.El
Tried both on macOS and Ubuntu 16.04 by putting into .SH DESCRIPTION, and it doesn't render expected output. All I see is
The arguments are as follows: Print verbose information.
The steps I do this is
Edit mandoc file
Symlink it to target file at /usr/local/share/man/man3/
See result by man <filename>
PS. I didn't go any gzip.
What did I miss? How can I properly render list in mandoc?
Instead, I look at mandoc's code of /usr/share/man/man1/bash.1 in which I view such man page via man /usr/share/man/man1/bash.1 for safety to ensure I view the right file.
It uses the following syntax
.TP 10
.BI Item Name
Item description
.TP
.BI Item Name 2
Item 2 description
This will properly renders those two items in which the first column has 10 character in width. The second item will use the same column width as defined before. Much cleaner and simpler than what I tried but with not success in the question.
You will see the following output using above syntax
I want to reference certain lines from a file in a GitHub repository in an issue. How can I do this without copying and pasting manually? Can I use a link to the source code?
To clarify, here is the file that I want to reference code from:
mysource.py
1: def func1():
2: for i in range(10);
3: print 'hello world'
4:
5: def func2():
6: for i in range(10);
7: print 'hello world'
I want to quote lines 5 to 7 of the file in my issue like this:
5: def func2():
6: for i in range(10);
7: print 'hello world'
You can now do this by selecting a range of lines and using the create issue menu option:
Example
...resulting in:
Steps
Go to the source file
Select the range of lines (e.g., click the first line of interest, then shift + click the last line)
From the ... menu on the left, select create an issue
An issue page will appear with a link to the lines, which renders as view of the source code.
You can add the following hash-fragment.
https://github.com/username/repo/mysource.py#L5-L7
Just tried it without even knowing it was possible.
The key is to get a permalink to the code, that will be automatically converted to the code snippet by GitHub Markdown (GFM). After completing the steps below, the whole thing should look like this after you create an issue or comment:
Live example
Follow these steps:
Go to the page with source code that needs to be referenced. For example: https://github.com/roots/trellis-cli/blob/master/cmd/venv_hook.go
Click on the line number next to the respective code. The selected line should now be colored with yellow, and the three dots button should appear next to the line number, like that:
Tip: if you want to reference multiple lines of code, click on the first line number, then hold Shift and press the second line number.
Click on the three dots button, select "Copy permalink":
Go to the issue where you want to reference the code. Paste the permalink there. The link should look like that:
https://github.com/roots/trellis-cli/blob/a389115eb35e3c322e084183dc41497ffd67e7e0/cmd/venv_hook.go#L25-L27
Notice that the link to the source code now has a commit SHA in the URL instead of the branch name master.
No, this is not possible. However, you can create line comments on the Files Changed tab of pull requests which can reference issues through the standard # referencing.
I know I can have anchors to a certain line, but if the source changes that line might become irrelevant. Example:
...source.php#L33 < line 33 may become line 40 later :(
Is there some way to tell GitHub to link to a certain function or property from the source, without specifying the line?
(The source is written in PHP code.)
AFAIK, no, but you can link to a certain revision of the file, and thus, you can know for sure that line will always point at the start of the function.
The URL looks like /{user}/{repo}/blob/{hash}/{file}#L{line}
To get it, click "Commits", select the last commit, click "Browse code", and find your file and line as usual.
documentation
Yes you can. Newer browsers support highlighting a portion of text and scrolling to it.
Example: common.c#:~:text=static%20ssize_t%20led_current_store
All you have to do is to add this to the end of your URL:
#:~:text=function_name
Some browsers do not support this, though: https://caniuse.com/url-scroll-to-text-fragment
Enjoy!