0

My document looks like this:

\documentclass{article}
\usepackage{url}
\DeclareUrlCommand\url{\def\UrlLeft{<}\def\UrlRight{>} \urlstyle{tt}}
\def\footurl#1{\footnotemark\footnotetext{\noindent\url{#1}}}
\begin{document}
\footurl{https://www.google.cz/webhp?hl=cs&sa=X&ved=0ahUKEwjV3ZOP8aPSAhWExRQKHeJVBWwQPAgD#hl=cs&q=some+long+url}
\footurl{Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi lacinia fringilla accumsan. Curabitur lacinia tellus.}
\footurl{http://docs.opencv.org/2.4/modules/imgproc/doc/structural_analysis_and_shape_descriptors.html}
\end{document}

It should put url in footnote and it works fine, but for some urls that are longer than one line, it indents first line.

Placing \noindent in front of \url doesn't work and I quess it has something to do with hyphenation.

Well, I have just fixed it by removing \urlstyle{tt}, but I don't know what does it mean, because it is from style, so it isnt my work.

1
  • Welcome to TeX.SX! Please help us help you and add a minimal working example (MWE) that illustrates your problem. Reproducing the problem and finding out what the issue is will be much easier when we see compilable code, starting with \documentclass{...} and ending with \end{document}. Feb 22 '17 at 9:44
0

Simply remove the space in the \DeclareUrlCommand call:

\DeclareUrlCommand\url{\def\UrlLeft{<}\def\UrlRight{>}\urlstyle{tt}}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.