Link to an arbitrary spot in a multimarkdown file - multimarkdown

I'm trying to make the following work:
Here is my markdown text I would like to link to. [link]
Then I write something else.
Then I say [see above](link)
This does not work and I cannot find a way to link to some arbitrary text.
Note: This is not a duplicate of 6695493 as that is a conversation about headers.
This is not a duplicate of any answer that talks about linking to headers.

It looks like the answer is, "No you cannot do this with pure markdown"
You can put some HTML into your file to create a link and then link to that.

Related

How to specify the items in reference list using BibTeX? ChemPhysChem LaTeX requirement

I'm revising a manuscript for ChemPhysChem. They just provided a very simple templet here. However, I have some problems meeting the requirement:
Please follow our house style for references for example: [1] X. Y.
Name, A. B. Name, J. Abbr. 2016, 5, 111-120.
This kind of reference hides the title, and I can not find an existing style to meet the need.
I am using the following latex script:
\documentclass{article}
\usepackage[sorting=none, backend=biber]{biblatex}
\addbibresource{ref_r.bib}
What do I need to do to solve the problem? Do I really need to build a new .bst file? Could anyone share their experience on submitting manuscripts on ChemPhysChem using LaTeX?
Don't use biblatex for journal submissions unless your publisher explicitly states that they do accept it. While it is a nice and flexible tool, biblatex is not yet the standard.
Just follow the instructions from the template and use
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%alternatively you may use
\bibliographystyle{unsrt}
\bibliography{mymanuscript.bib}
%and send the .bib file along with your manuscript
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Don't worry if the resulting style might be a bit different from their requirement, they won't use it anyway but convert your source files with their pipeline.
I changed to my latex using BibTeX back, and built a cpc.bst file for ChemPhysChem using the following command with the help of the youtube video:
latex makebst
It would not be that hard to create the bibliography style file using the guide of the above-mentioned video.
And the result looks like
this.

Referencing another link in a markdown link definition (GitLab)

I have an .MD file with the following reference-style link:
[Test link][test-link]
[test-link]: https://google.com/
Is it possible to reuse the test-link value inside of another link?
I would like to define a base URL and build another link on top of it, meaning that test-link-with-params will render to https://google.com/#search
I imagine it working like this:
[Test link][test-link]
[Test link 2][test-link-with-params]
[test-link]: https://google.com/
[test-link-with-params]: [test-link]#search
No I don't believe it is possible. Perhaps the best way round would be to do a sub/replace on the markdown file after you've written it.

NodeJS Jade (Pug) inline link in dynamic text

I have this NodeJS application, that uses Jade as template language. On one particular page, one text block is retrieved from the server, which reads the text from database.
The problem is, the returned text might contain line-breaks and links, and an operator might change this text at any time. How do I make these elements display correctly?
Most answers suggest using a new line:
p
| this is the start of the para
a(href='http://example.com') a link
| and this is the rest of the paragraph
But I cannot do this, since I cannot know when the a element appears. I've solved how to get newline correct, by this trick:
p
each l in line.description.split(/\n/)
= l
br
But I cannot seem to solve how to get links to render correctly. Does anyone know?
Edit:
I am open to any kind of format for links in the database, whatever would solve the issue. For example, say database contains the following text:
Hello!
We would like you to visit [a("http://www.google.com")Google]
Then we would like that to output text that looks like this:
Hello!
We would like you to visit Google
Looks like what you're looking for is unescaped string interpolation. The link does not work in the output because Pug automatically escapes it. Wrap the content you want to insert with !{} and it should stop breaking links. (Disclaimer: Make sure you don't leave user input unescaped - this only is a viable option if you know for sure the content of your DB does not have unwanted HTML/JS code in it.)
See this CodePen for illustration.
With this approach, you would need to use standard HTML tags (<a>) in your DB text. If you don't want that, you could have a look at Pug filters such as markdown-it (you will still need to un-escape the compilation output of that filter).

Can links to anchors in haddock be labeled?

When linking to a URL, one can provide a label that specifies what the reader will see; for example, <http://www.haskell.org haskell> will have "haskell" for the link text. Unfortunately the documentation does not provide an obvious way to label links to anchors; the link "Data.FooBar#foo" will have "Data.FooBar" for the link text so that it is not obvious to the reader that this link is going to an anchor.
So my question is: is there a trick to label links to anchors in haddock, or is this impossible?
This is now https://github.com/haskell/haddock/issues/262 (submitted by OP).
As I write this, it is open and has not been commented on.
At the moment, when you link to an anchor in haddock using something like "MyModule#anchor", the link on the generated page just says "MyModule". This is very confusing because it looks like the link is taking one to the module page, when really it goes to a specific anchor on that page. It would be great if either the anchor name could be added to the label for the link to make it clear where the links is going, or if there were a way one could manually specify the label of the link --- say, by borrowing the syntax used by URLs to specify the label using a space, such as "MyModule#anchor label goes here".
Its appears they offer no direct way even though their documentation seems to advise on a solution.
REF : http://www.haskell.org/haddock/doc/html/ch03s08.html

LaTeX: Unnumbered section in header of document

I have a document where I want to place an unnumbered section in my header. I use the fancyhdr package, and for a numbered section, I would had done something like this:
\lhead{\leftmark}
But this don't work with unnumbered sections.
I'm solving math-problems in my document, so I don't want part-sections and numbered sections
Anyone, who knows, how this is done?
Use
\chapter*{Preface\markboth{Preface}{}}
for your unnumbered section. (You should replace chapter with whatever you are actually using.)
You can even try
\newcommand{\mysection}[1]{\section*{{#1}\protect\markboth{#1}{}}}
but be careful -- it may create some problems with TOC or references.
Is there anything wrong with
\section*{}
\subsection*{}
\subsubsection*{}

Resources