Tag Info

Hot answers tagged

9

A macro definition is not executed at the point of definition, you can go \newcommand\foo{\any old \rubbish } and as long as {} match up \foo is defined. You may get an error later if you try to use \foo, but you get no error at this point, and if \any and \rubbish are defined by the time you use \foo there is no error. Conversely a box is typeset as it ...


8

It's your PDF viewer's fault: Mac OS X Preview (at least v7.0) recognises URLs and makes them clickable, whether they be typeset with a special package (hyperref, url) or not. To convince yourself, try compiling the following example and open the output in Preview; the URL will be clickable. So there's really nothing you can do about it on the author's ...


7

You should change the anything to do with the bibliography immediately before the bibliography, otherwise it would affect everything following the preamble as in your case. \documentclass[11pt,a4paper]{moderncv} % moderncv themes \moderncvtheme[blue]{classic} % character encoding \usepackage[utf8]{inputenc} \usepackage{bbding} % ...


7

\documentclass{article} \usepackage{hyperref} \newcommand\rurl[1]{\xurl#1\empty\empty\empty\empty\empty\xurl} \def\xurl#1#2#3#4#5#6\xurl{% \def\tmp{#1#2#3#4#5}% \href{\ifx\tmp\xurlhttp \else http://\fi#1#2#3#4#5#6}% {\nolinkurl{#1#2#3#4#5#6}}% } \def\xurlhttp{http:} \begin{document} \rurl{ipython.org}\\ \rurl{http://ipython.org} \end{document}


7

You just need to customise the formatting hyperref uses. For example: \documentclass{article} \usepackage[colorlinks=true,urlcolor=blue]{hyperref} \begin{document} \href{http://google.ru/}{GOOGLE} \end{document}


6

since the purpose of this code is simply to list out the web sites, i have two suggestions: forget align*. instead use the enumerate environment and enter the urls with \verb+...+ as suggested by R. Schumacher. as previous, but instead of \verb, add \usepackage{url} and enter the site addresses as \url{...}. enumerate will take care of numbering and ...


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}}% }% ...


6

csplain is (by default) sensitive to non UTF-8 codes in input. It uses encTeX for this in pdftex engine. The url.sty manipulates with non UTF-8 codes, encTeX is sensive to this more than we need and this yields this error. You can write \input utf8off at beginning of the document. After this, the pdftex treats its input normally as 8bit. If you are using ...


6

I think you are trying to print the paths. If so, you may need this: \documentclass{article} \usepackage[obeyspaces]{url} \begin{document} \path{\\server\folder\folder} \path{\\server\my folder\folder} \end{document}


6

EDIT: Added Title clickable (1. just the title cickable and 2. the whole reference clickable) 1. Just the Title reference clickable You can redefine the title macro and add the \href to the title using the DeclareFieldFormat. I edited the default definitions in the biblatex.def file. \DeclareFieldFormat{title}{\myhref{\mkbibemph{#1}}} \DeclareFieldFormat ...


5

url changes the font but you can set it to default to serif to match \href: \documentclass{book} \usepackage{xcolor} \usepackage{hyperref} \hypersetup{colorlinks=true,linkcolor=blue,urlcolor=blue} \urlstyle{rm} \begin{document} url: \url{www.yahoo.com} href: \href{http://www.yahoo.com}{www.yahoo.com} \end{document} Note that \urlstyle{} is from url ...


5

The \url command can be redefined the same way as hyperref. The following example first defines url command \guilurl, which uses single guillemots as angle brackets. Then \url is redefined using \guilurl: \documentclass{article} \usepackage[T1]{fontenc}% \guilsinglleft and \guilsinglright \usepackage{lmodern} \usepackage{amstext} \usepackage{hyperref} ...


4

First of all I recommend you to use biblatex since it is very adaptable and processes information greatly! In the biblatex manual, they are defined as follows: howpublished: A publication notice for unusual publications which do not fit into any of the common categories url: The URL of an online publication. Thus, I recommend you in general to ...


4

How about ps. I do not think it is a good idea to post such a long url in the document. Use a small name and use that for the link. But if this is what you want: \documentclass[10pt,letterpaper]{article} \usepackage{hyperref} \usepackage{longtable} ...


4

Without hyperref no hyperlink is created by LaTeX; however, PDF previewers on Mac OS X have heuristics that try finding URL's (or, more generally, URI's) in the PDF files. Such heuristics often try being too smart and fail. :-( So it's not a LaTeX problem, but of the Apple library PDF viewers are based on (Preview, Skim and others). Since Adobe Reader is ...


4

The above answer by mhp may not provide a solution when PDFLaTeX complains with "Option clash for package url." The cause of this may be because of the package hyperref, which also loads the package. If hyperref is loaded before the url package it gives this error, because the url package is then loaded twice with different options: one without and one with ...


4

You can use the user keys to store additional information. For example: \documentclass[12pt,BCOR=15mm]{scrbook} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage[ngerman]{babel} \usepackage{hyperref} \usepackage[xindy,nonumberlist]{glossaries} \GlsSetXdyCodePage{duden-utf8} \makeglossaries \newglossaryentry{glossaries} { name=Glossaries, ...


4

One way would be to use the background package: Code: \documentclass[10pt,a4paper]{article} \usepackage[all]{background} \usepackage{url} \usepackage{lipsum} \SetBgContents{\url{http://tex.stackexchange.com/}}% Set contents \SetBgPosition{0.25cm,-5.0cm}% Select location \SetBgOpacity{1.0}% Select opacity \SetBgAngle{90.0}% Select rotation of logo ...


4

I usually use a combination of eso-pic, graphicx and rotating as it is easy to adjust in terms of location, angle and size. \documentclass[12pt]{scrartcl} \usepackage{blindtext} \usepackage{eso-pic, rotating, graphicx} \AddToShipoutPicture{\put(30,200){\rotatebox{90}{\scalebox{3}{Examiners copy}}}} \begin{document} \blindtext[4] \end{document}


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 ...


4

If you help biblatex and hyperref figure out which protocol (HTTP, HTTPS, FTP, ...) to use, you should be fine. DOIs appear correctly since biblatex turns the raw doi into the proper hyperlink itself. So the obvious solution is to always specify the protocol properly as in @misc{Hohn.2013, author = {Höhn, Hans-Joachim}, title = {Theologie als ...


4

You have two errors in your hack. First, you leave urldate on stack after your if$ statement. This is how you get two dates. You need to use this instance with swap$ instead of putting the third instance of urldate on stack: FUNCTION {format.urldate} { urldate duplicate$ empty$ { pop$ "" } { "~(Accessed: " swap$ * ")" * } if$ } However, if ...


4

LaTeX will refuse to break a 'word' if it contains, among a few other characters, a /. This has very solid reasoning that's outside the scope of this answer, but the url LaTeX package will handle these things very cleanly. Instead of typing in the file path directly, use Insert -> URL. This will (presumably) wrap the argument in \url{<my text ...


4

There is no need to escape a dollar symbol in a url. \documentclass[a4paper]{article} \usepackage[T1]{fontenc} \usepackage{hyperref} \begin{document} \url{test$test} \end{document}


4

Go to wikipedia and copy its URL as such; then add \ before each %: \documentclass{article} \usepackage{hyperref} \begin{document} \url{http://www.wikiwand.com/pl/Prawo_Lewisa-Mogridge\%E2\%80\%99a} \end{document} EDIT 1 Instead of \url, you can use \href, in case you want the hyperlink: \documentclass{report} \usepackage{hyperref} \begin{document} ...


3

OCG visibility setting for printing is honoured only by Adobe Reader (and perhaps other non-free viewers): \documentclass{article} \usepackage[colorlinks]{hyperref} \usepackage{ocgx} %\usepackage{fixocgx} %dvips+pdf, xelatex, dvipdfmx \begin{document}\Huge See the game \makebox[0pt][l]{% \begin{ocg}[printocg=never]{A}{a}{1} ...


3

Install curl (assuming you use apt-get to install packages) : sudo apt-get install curl and do the following for pdf files: cat document.pdf | grep -ao '[a-zA-Z]\+://[a-zA-Z.-]*[^)]\+' | while read LINE; do curl -o /dev/null --silent --head --write-out '%{http_code}' "$LINE"; echo " $LINE"; done and do the following for tex files : cat myfile.tex ...


3

Are you allowed to load the url package, though? If so, encase the URL in a \url{...} macro. Issue the instruction \urlstyle{rm} to ensure that the font used for the URL string is the same as the main text font. The following code compiles equally well under pdfLaTeX, XeLaTeX, and LuaLaTeX. \documentclass{article} \usepackage{url} \urlstyle{rm} % roman ...


3

The appearance of citation call-outs is affected by the chosen bibliography style only if no citation management package is in use. Which citation management package, if any, are you working with? If you're working with the natbib package, try loading it with the options numbers and square. I.e., type \usepackage[numbers,square]{natbib} in the ...


3

Package apacite sets \urlstyle inside \AtBeginDocument to APACtt. Therefore switching back to rm should be done at a later time, e.g.: \documentclass[12pt]{article} \usepackage{apacite} \usepackage{hyperref} \AtBeginDocument{% \urlstyle{APACrm}% APAC version of rm % \urlstyle{rm}% } \begin{document} ...



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