Sphinx renders :ref: with italics -- How can I remove this? - restructuredtext

I have two different pages where one links to the other for example:
file 1
.. _create-title:
How to create a title
-----------------------
file 2
to :ref:`create <create-title>` a title ....
Sphinx renders this to
<em>create</em>

It seems that when I do this instead:
.. _create_title:
Sphinx will not render the text into italics:
to :ref:`create <create_title>` a title ....

Related

Link R markdown title in flexdashboard to a page in the app

I have an R markdown document that uses flexdashboard and shiny. The document/app has several pages and I would like to be able to link the navbar title defined in the YAML header to the first page so that a user gets the feeling of being redirected to the "Home" page when clicking the title.
I've attached a very simple example of an .Rmd file that uses flexdashboard and has 2 pages. In this example the user should be directed to Page 1 when clicking on App title.
---
title: "App title"
output: flexdashboard::flex_dashboard
runtime: shiny
---
Page 1
====================================================================================
This is some random text on page 1...
Page 2
========================================================================================
And some even more random text on page 2....
I have seen examples where pages are linked within an external .yml file (bookdown) or where the logo/title is linked to an external site, but I couldn't find examples of how to link the navbar title to a section/page within the R markdown document itself.
To add complexity: in my app, the document is used for several applications and the title is therefore read in via an environment variable:
---
title: '`r Sys.getenv("TIER")`'
Any help is much appreciated!
To make the title clickable as link you can use additional JavaScript.
<script>
document.querySelector(".navbar-header").innerHTML =
"<a href=\"path_to_destination\" class=\"navbar-brand navbar-inverse\">
My Dashboard
</a>";
</script>
The querySelector looks for the title element and replaces it with a custom one. Here I replace it with a link to the path_to_destination. You can see the class names which are added to the link, to format the link according to the predefined classes. Otherwise the link is not formatted like the title.
As you said the title is based on some variable we can insert R code like in every other place in the document:
<script>
document.querySelector(".navbar-header").innerHTML =
"`r 2+2`";
</script>

PPTXGENJS Is there a way to insert an HTML formatted text inside a slide?

Is it possible to insert HTML formatted texts inside a slide?
I need to insert a set of HTML formatted texts that was entered in a WYSIWYG input from TinyMCE in a powerpoint slide generated by PPTXGENJS.
If this is possible, I am looking for examples on how to do it. Articles or samples will be greatly appreciated.
This solutions worked for me.
You need to create a table in html.
<table id="table-id">
</table>
Then you can append WYSIWYG (tinyMCE) content to this table.
$('#table-id').html('<tbody><tr><td>' + tinymce.activeEditor.getContent() + '</td></tr></tbody>');
Then use tableToSlides method.
pptx.tableToSlides('table-id');

Highlight very simple code tag in wordpress?

In a self hosted wordpress blog, I'm trying to hightlight this code : [xml], inline.
If I put this :
[code language="ps" light="true"][xml][/code]
It outputs as 1
Which html source is :
<div class="line number1 index0 alt2">
<code class="powershell plain">1</code>
</div>
How can I tell the syntaxt highlight engine to ignore the [xml] tag and render it as is?
Is it possible to hightlight some words in a sentence? (like the ``code`` construct in SO)
[edit] I also tried :
[code language="ps" light="true"][xml][/code]
But it outputs [xml]
Use this plugin to highlight code snippets
https://wordpress.org/plugins/crayon-syntax-highlighter/

Drupal content print by parts

I create a content type with fields title header and body and in the page.tpl I want to print in only the header because I have a css that make the header in a box i tried with render($content['header']);
but is not working
ok well i finish with this I made a tpl.php for every node i wanted to edit and in drupal 7 i have to put hidden($content[heder]) or whatever the name of the file in the node is and after print the content for that node I kept the different modifications in variables and I print the variables

Drupal: Views titles

I have a View that outputs a page. Under Basic Settings I set a "title". When I load the page, I see that title as the page title (at top of the browser) - all good.
How can I print this value out in the "Display output" .tpl file? The $title variable doesn't seem to hold any value here. Do I need to use a preprocess function?
Thanks
Does drupal_get_title() work?
You can get the details of the full view using
You can get the title of all the displays there
$view2=views_get_current_view();
$view2->display['default']->display_options['title'];
If you just want to print the title than no need to write the .tpl file.
In views you will find header region and there you can add the global text are and by using it , you can add the title text over there.

Resources