# Tag Info

## New answers tagged links

-1

if used just once or twice, \textit{\url{www.url.com}} or \textit{\href{https://url.com}{URL}}

1

\documentclass{article}% \usepackage{graphicx} \usepackage{hyperref,catchfile}% for the links \usepackage{verbatim}% for the input %To generate a text file for demonstration \begin{filecontents*}{1.txt} https://www.youtube.com/ \end{filecontents*} \usepackage{hyperref,catchfile} \newcommand\hrefFromFile[1]{% \CatchFileDef\myurl{#1}{\catcode`\#=12\...

4

You can use catchfile to load the url: \begin{filecontents*}{1.txt} https://www.youtube.com/ \end{filecontents*} \documentclass{report} \usepackage{hyperref,catchfile} \CatchFileDef\myurl{1.txt}{} \begin{document} \expandafter\url\expandafter{\myurl} \end{document} If the url contains special chars like % or _ or # you can use the last argument of the ...

1

Here is a little improvement of Jake's answer. Problem: The options line width and outer sep are not considered. Therefore the link box is usually to large (only working case is outer sep=0). DrBones addendum does not solve this problem, because it only changes the size of the hyperlink node, but not the hyperlink area itself. Solution: If outer sep is ...

1


1

The comment as an answer: You need to enable the latex_macros extension to have the macros evaluated. From the Manual Macro definitions in LaTeX will be passed through as raw LaTeX only if latex_macros is not enabled. To do this, use something like this: pandoc test.tex --from markdown+latex_macros -o test.html

1

You are creating the target twice as it is moved to the table of contents too. You could e.g. use the NoHyper environment to suppress the target in the table of contents: \documentclass{book} \usepackage[dvipdfm]{hyperref} % Defining a new command for safely creating targets in the section title \newcommand{\targetInTitle}[2]{\texorpdfstring{\protect\...

Top 50 recent answers are included