How to insert an untitled hyperlink with RestructuredText? - hyperlink

With RestructuredText, I'd just like to insert a link where the address is the text of link. Like this: https://www.example.com/example-of-link.html
I just want the link to appear in the text, with no modification, no title, just the raw link. I can't find a way to do this. All the examples in the doc give titles to the links. Is there a way to do that?
Thanks for your help.

Ok, answering my own question: you just have to write the link and that's it, like this:
https://www.example.com/example-of-link.html
I always seem to forget that and I waste time searching for it. At least now the answer will be on Stackoverflow.

Related

Error: 'Imported XML Content cannot be parsed'

Here's what I'm doing:
=IMPORTXML("https://www.predictit.org/api/marketdata/markets/7164", "/MarketData/Contracts/MarketContract/ID")
The other answers I've seen about this have said that Javascript would be the issue, but the page in question seems to load without it, and I've tried using IMPORTJSON and IMPORTFROMWEB to no avail.
Please help!
You are input incorrect parameter for the xmlpath, a proper formula should be as following and you need to spend sometime to find the correct xmlpath to extract the specific string or information you want,
=IMPORTXML("https://www.predictit.org/api/marketdata/markets/7164","//a/#href")
Here is one example from Google:
=IMPORTXML("https://en.wikipedia.org/wiki/Moon_landing", "//a/#href")

Excel Hyperlink Function - Display Nice Name?

I found this formula online. It takes a cell, and handles the hyperlink, based on the excel spreadsheet being in the root folder, so the files being hyperlinked are in that directory (or sub-directory). This is the formula:
=HYPERLINK(LEFT(CELL("filename"),FIND("|",SUBSTITUTE(CELL("filename"),"\","|",LEN(CELL("filename"))-LEN(SUBSTITUTE(CELL("filename"),"\",""))))) & C2)
I would like to have it say something like "Click Here to Open" or something nice. I can certainly handle that in another cell, if that would be easier, but I'm not seeing a way to do that. Anyone know how to handle this?
We don't want the users to see D:\blah\folder\filename.pdf
It looks messy and would like something nicer.
Thanks!
Nevermind. I found it was as simple as adding
,"nicename")
OR
,A2)
to get the name I want.
Duh.

displaying a full link using NSLog

Simple question, new to iOS and Objective-C, not understand why it's not doing the full link.
NSLog(#"http://iam.colum.edu/portfolio/api/course/%#", setCourseNumber, "?json=True");
output: http://iam.colum.edu/portfolio/api/course/32-2400
Not going to go into what the coursenumber is, no point, the question is that my output is not including the "?json=True" part of the link. I know it must be something small that I am not including, I just am new to Objective-C and can't figure it out. Thank you in advance.
This:
NSLog(#"http://iam.colum.edu/portfolio/api/course/%#", setCourseNumber, "?json=True");
Could be this:
NSLog(#"http://iam.colum.edu/portfolio/api/course/%#?json=True", setCourseNumber);
Looks like Logan beat me too it.
Here's some more information from Apple's documentation on formatting string objects.
Here's a list of string formats. Things like %#, %d, etc.
Because you have two arguments, but using only one:
NSLog(#"http://iam.colum.edu/portfolio/api/course/%#", setCourseNumber, "?json=True");
setCourseNumber is first attribute - %#
"?json=True" is second attribute - ?
So you can modify it like this:
NSLog(#"http://iam.colum.edu/portfolio/api/course/%#%#", setCourseNumber, "?json=True")
Or use
NSLog(#"http://iam.colum.edu/portfolio/api/course/%#?json=True", setCourseNumber)
No matter, where argument is situated - in the middle or in the end.

nokogiri and the href label

I am not sure how to access the label part of the anchor href tag. The other question that looks at this doesnt really answer it for me.
I have this code:
#name = page.css("#content").css("a")[1]
Which gives this result
generation xerox
I want to get at the "generation xerox" bit
I wouldnt mind getting at the href, I dont understand that either. I have read several other SO questions but I can't get it to work
Thanks in advance all
You can access the label with #name.text and the link with #name['href']
See doc

How do I link to a LABEL in org-mode?

In org-mode, I have defined a figure+caption like this:
#+CAPTION: My great figure
#+LABEL: fig:myfigure
[[myfigure.png]]
How do I write "See figure [myfigure]"? I've found the following syntax:
See figure \ref{fig:myfigure}
but this looks ugly in the source file. In particular, you cannot use it for actually jumping to the figure.
You actually don't need '#+NAME', it works fine if you use '#+LABEL', which won't break your short-caption for list of figures.
Orgmode does now offer a 'jumpable', enumerated or link with name of your choice in the exported (latex, html) text if you link with:
see figure [[fig:myfigure]].
or
see figure [[fig:myfigure][figurenameintext]].
I would have added this as a comment, but I don't have the reputation yet.
--
In response to your comment (still can't comment): you do need the '#+NAME' for it to jump within the .org source file; as mentioned in the manual, and i also just confirmed that works. Not sure about the short-captions in the latest version.
With a very recent org-mode, you can use #+name:, see:
http://thread.gmane.org/gmane.emacs.orgmode/62644/focus=62646
#+CAPTION: My great figure
#+LABEL: fig:myfigure
#+name: fig:myfigure
[[test.png]]
See figure [[fig:myfigure][test]].
This works for me to jump from the link , but has no effect when exporting, I'm afraid...

Resources