Tag Info

Hot answers tagged

6

\documentclass{article} \usepackage{url} \usepackage{pgffor} \usepackage{xparse} \usepackage{xstring} \usepackage[colorlinks=true]{hyperref} \NewDocumentCommand{\FormatLinks}{% s% #1 =* not used yet O{}% #2 = optional title m% #3 = Mandatory title m% #4 = URL Link }{% \par \hspace*{1.0cm}\href{#4}{#3\IfValueT{#2}{~#2}}% }% ...


4

Not sure I'd use xstring if you already have l3 and pgf loaded but anyway: \documentclass{article} \usepackage{url} \usepackage{pgffor} \usepackage{xparse} \usepackage{xstring} \usepackage[colorlinks=true]{hyperref} \NewDocumentCommand{\FormatLinks}{% s% #1 =* not used yet O{}% #2 = optional title m% #3 = Mandatory title m% #4 = URL ...


1

The underscore _ is the problem. Normally the underscore is only allowed in math mode to start an index. That is why LaTeX/BibTex reports the error. You should escape the underscore, i.\,e. write \_. BUT, I guess from your question that you are doing somehing fundamentally wrong. Normally, there is the special field url={} that should be used in a bib-file, ...



Only top voted, non community-wiki answers of a minimum length are eligible