I would like to create an internal link to a section in my rmarkdown document, but the section is a tab, and the standard linking approach doesn't seem to work.
Standard approach would be:
---
title: "Untitled"
output: html_document
---
# Section to link to
text and more
# Next section
See [this section](#section-to-link-to)
Works!
In my case the section I want to link to is part of a tabset:
---
title: "Untitled"
output: html_document
---
# Section {.tabset}
## Subsection to link to
text and more
## Next subsection
text and more
# Next section
See [this section](#subsection-to-link-to)
Doesn't work :(
EDIT: to be clear -- my question is not how to create a tabset, or how to create an internal link/anchor, it's the intersection: how to create an internal link to a tabbed section. The output should look like this:
I've tried some of the alternative anchor approaches (like naming the section to link to, and using that name in the link). But no joy. The link is highlighted in the output, suggesting it should work, but it doesn't work when clicked.
I haven't found anything that says you can't link a tabbed section, so I'm asking here to see if there's way, or just no way.
thx!
This appears to a bug that's labelled as won't fix. Not supported by design, please see the issue on GitHub.
I just followed this answer. If you want to link the bigger section (Section), you could use this: #section.
Code:
---
title: "Untitled"
output: html_document
---
# Section {.tabset}
## Subsection to link to
text and more
## Next subsection
text and more
# Next section
See [this section](#section)
This seems to work
To link the subsection, as you mentioned, you could use this: [this section](#subsection-to-link-to).
Code:
---
title: "Untitled"
output: html_document
---
# Section {.tabset}
## Subsection to link to
text and more
## Next subsection
text and more
# Next section
See [this section](#subsection-to-link-to)
This seems to work
Related
My goal is to create a set of PDF documents using Sphinx in an automated process, except I've found I'm too limited in what document specific information I can pass using latex_documents tuple in conf.py. I'll try to explain what I've tried so far, how this is limits what I would like to do and an example "hypothetical" solution.
What I've tried so far:
As stated, my goal is to create a set of documents and my configuration uses a single conf.py. To create a set of documents from a single conf.py, the "latex_documents" keyword references document specific information. It does so using a list of tuples, one tuple per document. This tuple, for example, contains reference to each specific document's index file, author and title (the index file then references the relevant restructured text etc).
This is great because I can update the name of the document's specific author and title on each title page, and the body of the text is picked up from the index.
Here is an example of a single tuple, representing one document, associated with the latex_documents keyword:
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [('path/to/index', 'document_name', 'my document title', 'JSt', 'howto')]
In this example, Sphinx can make JSt, the author's name, appear on the title page.
What is the limitation?
But what if we also wanted to pass to each document's title page, automatically, more information: an executive summary, reviewer name, approver name, document number and even more. This is information, like author, is document specific and will be placed on the generic title page and / or headers and footers (and therefore cannot be put in the restructuredtext or markdown input either).
Hypothetical solution
An example solution, if latex_documents input wasn't / isn't prescriptive, could be as follows.
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title,
# author, reviewer, approver, document number, documentclass [howto, manual, or own class]).
latex_documents = [('path/to/index', 'document_name', 'my document title', 'JSt', 'ABc', 'ZYx', 'DOC007' 'howto')]
Which by calling in the title page as somthing like:
\#author
\#reviewer
\#approver
\#docnum
Will create something like the following in the tex.
\author{JSt}
\reviewer{ABc}
\approver{ZYx}
\docnum{DOC007}
Does anyone have advice on passing additional document specific information to the title page, headers and footers of a document in the same way author is?
Thanks in advance.
I want to add linkedin link in latex and I want it to show only my name and logo, not complete link. I am using this line of code.
\linkedin {https://www.linkedin.com}
It shows complete link https://www.linkedin.com in pdf also my username is very large and it look odd in pdf. SO I want to show my name instead. I tried googling but didn't find any solution in this reference.
There are two approaches to solving your problem:
Approach #1: use altacv.cls from git
Then you need to do the following 2 things:
in the altacv.cls file: find linkin, then include your linkedin link in the [https://]
in your.tex file: do "\linkedin{your name here}"
or
Approach #2: write your own
in your.cls file include this line: "\newcommand{linkedin[2]{\infofield{\faLinkedin}{\href{#2}{#1}}}"
--please note this assumes you have inlcuded the href package and fontawesome5 --
in your.tex file: do "\linkedin{your name here}{https to your linkedin profile}
Hope this helps
Link alias is not displayed in JIRA comment. Why?
Here is the text I am trying out in a comment section:
[Test link|https://www.google.com/]
Here is what I see in the result of the comment:
As you can see I do not see an alias, but I see the actual alias markup here.
What am I missing here?
Thank you.
Switch the editor into the text mode (not visual) and make the link look like this
[Test link|https://www.google.com/]
without additional brackets around the url.
By default, Sphinx documentation outputs a PDF that's formatted for duplex printing. So there is a blank page between the title page and the TOC, the TOC and the introduction, the introduction and the first section, etc.
My users are always going to look at the PDF online. So I would like to remove these blank pages.
This seems to be a vexed issue in Sphinx. See this email thread.
This user suggests two solutions, but neither work for me. Curiously, the first solution:
latex_elements = {
'classoptions': ',oneside',
}
gives me
! Package babel Error: You haven't specified a language option.
The second option:
latex_font_size = '10pt,oneside'
runs, but produces a PDF that only has the odd-numbered pages of my document. Alas.
Does anyone know how to produce a PDF without these blank pages?
Put this in your source/conf.py configuration file in the "Options for LaTeX output" section:
latex_elements = {
'extraclassoptions': 'openany,oneside'
}
I use this LaTeX code to add a bibliography section:
\bibliographystyle{plain}
\bibliography{bp}
The first page looks fine. It contains the Bibliography title, no header and a list of citations. However on the next page is a header with the title of the previous section. Is there a way to remove this header?
alt text http://imagebin.ca/img/9u-wk68W.jpg
The first page is typeset with pagestyle plain. The following pages have the pagestyle of the rest of the document, which (apparently) you modified using fancyhdr.
In the documentation of fancyhdr, see the \markright and \markleft commands, which can modify the headers in your document. Probably a \markright{} can solve your problem.
I'm sorry, I've realized that the fact that the first page of a section is without the heading was explicitly defined in the style I was using. I thought it was \bibliography that was clearing the header on the first page.
I've solved it by adding this after the last section:
\clearpage
\pagestyle{plain}
(\clearpage was necessary, because otherwise it removed headers also from the last section)