restructuredText How to include attributes inside a div - restructuredtext

Let's say I need something like this:
blah
How do I add rel and target in my rst file?

Related

Removing code inside a code html tag

I have text which contains code.
It is possible to recognize because code exist into an html tag like this
<code> print(i)
</code>
I know it is possible to remove html tags in R?
However how is it possible to remove the content into a specific tag like my case?
The code I mention exists in text.
A better example:
You can find an incredible solution if you use <code> print(i) </code> and you will solve your problem.
and I want to remove the specific tag and what it is inside the tag and have only:
You can find an incredible solution if you use and you will solve your problem

Riot.JS: Tag within Tag in HTML Page

I am new to RiotJS (just discovered it yesterday). I just tried to do a little experiment which did NOT work. I created two tag files (navbar.tag and dropdown.tag). Each one was as simple as could be – simply a h3 tag with the name of the file:
// navbar.tag
<h3>Navbar</h3>
// dropdowntag
<h3>Dropdown</h3>
On my index.html page I want to nest the dropdown tag within the navbar tag like this:
<navbar>
<dropdown></dropdown>
</navbar>
That does not to work. Navbar shows up, but not dropdown. Only if I separate the two tags do both work -- i.e., like this:
<navbar></navbar>
<dropdown></dropdown>
Any idea how I can nest different tags within an html page. I know you can nest them within .tag files, but that is not what I want to do. What I want is the flexibility to nest custom tags that I create on ay html page (like I can do with regular html tags).
Any ideas?
Thanks.
You cannot modify the existing structure. RiotJS use this constraint as an advantage to ensure good performance.
To insert another tag into existing tag, use <yield/>.
See JSFiddle.

How to remove the emphasis for the internal hyperlink in sphinx documentation

Cross-referencing in sphinx is done using ref , like:
.. _my-reference-label:
Section to cross-reference
--------------------------
This is the text of the section.
It refers to the section itself, see :ref:`my-reference-label`.
When compiled to HTML, above would introduce a hyperlink after "see", but would also embed it within the <em> tag, making internal references look different from external hyperlinks.
Is there any way to instruct sphinx not to emphasize internal references, that is, not to embed them within the <em> tag?
You can add a line to your CSS file:
a.internal {font-style: normal}
In order for Sphinx to use a custom CSS file you need to edit conf.py:
html_style = 'my_style.css'
Then put the file in the _static directory, or whichever directory you have declared with html_static_path.
Then my_style.css might look like:
#import url("default.css"); /* This should be the file used by your theme */
/* Internal links */
a.internal {font-style: normal}
This will not get rid of the surrounding <em> tag but should work to style your docs correctly.
You could write your own theme and template to do this.

org-mode mindmap export using HTML export + CSS?

Using org-mode to generate mindmaps from heading structure has been elusive. There is a Freemind export, but I don't want to have to fire up an external app, and anyway Freemind mind maps look ugly to me.
What about using org-export-html, along with a custom CSS stylesheet, to generate a mindmap in HTML?
I found this Gist:
pure css mindmap with nest list element
It creates HTML mindmaps by styling list elements such as:
ul>li:nth-child(even):after
For an org-mode mindmap export, you would want a CSS stylesheet that used H1, H2, H3 for its mindmap nodes, instead of using list elements as the above does. Nine heading levels would be more than sufficient. The mindmap's HTML would display only headings, hiding non-heading text using something like:
p, li {display:none}
What would such CSS look like? How would you modify the above gist, or create a new CSS stylesheet, to permit such a mindmap export?

Insert script via CSS content property

Is it possible to insert script tag using content property of CSS?
The example below inserts plain text instead of a html tag
#someDiv:before {
content:"<script>$(function(){ console.log('test');});</script>";
}
Content inserted with the content property will only ever be plain text. This is to prevent recursion. It also helps by preventing people from doing crazy things like inserting script elements with CSS.

Resources