Tag Info

New answers tagged

2

As Werner already mentioned use the hyphens option and for the footnote do not use the sloppypar environment: \documentclass{article} \usepackage[T1]{fontenc} \usepackage[hyphens]{url} \usepackage[colorlinks,citecolor=black,linkcolor=black]{hyperref} \begin{document} foo\footnote{% Toshiro Kohmoto and Yuka Koyama (2011). Photo-induced Effect in Quantum ...


1

As stated in the url package documentation: Package Option: hyphens Ordinarily, breaks are not allowed after “-” characters because this leads to confusion. (Is the “-” part of the address or just a hyphen?) The package option “[hyphens]” allows breaks after explicit hyphen characters. The \url command will never ever hyphenate words. This is ...


3

apacite uses \AtBeginDocument to switch to the APACtt URL style, but one may also switch to APACsame. See section 8.2 of the apacite manual for details. \documentclass{article} \usepackage{url} \usepackage{apacite} \AtBeginDocument{\urlstyle{APACsame}} \begin{document} \url{http://www.google.com} \end{document}


3

In verbatim environments the - is made active in order to break ligatures, but \url, among its checks doesn't take care of this. You can fix the behavior in this way: \documentclass{article} \usepackage{fancyvrb} \usepackage{hyperref} \makeatletter \let\ORIGhyper@normalise\hyper@normalise \def\grigg@hyper@normalise{% \begingroup\begingroup\lccode`\~=`\- ...


1

Here's one work-around: \documentclass{article} \usepackage{fancyvrb,hyperref}% http://ctan.org/pkg/{fancyvrb,hyperref} \newcommand{\URL}[1]{\url{\detokenize{#1}}} \begin{document} \begin{Verbatim}[commandchars=\\\{\}] \URL{http://a-z.example} \end{Verbatim} \end{document}


4

biblatex gives some small stretchability in URL breaking using url package \Urlmuskip parameter. This is there whether or not multicolumn is used, it's just that in the narrow measure of a multi column setting the stretchability is more likely to be used if available. There is probably a higher level biblatex setting for this, but this just patches the ...


1

It's not clear why you want to split at the colon; however, this is a different way to cope with the problem. \documentclass{article} \usepackage{xparse,l3regex} \usepackage{hyperref} \ExplSyntaxOn \tl_new:N \l_gecko_prefix_tl \tl_new:N \l_gecko_postfix_tl \NewDocumentCommand{\qname}{m} { \regex_match:nnTF { \: } { #1 } { \tl_set:Nn ...


0

Not sure if this addresses your issue. It uses the stringstrings package to parse the string. \documentclass{article} \RequirePackage{stringstrings} \usepackage{ifthen} \RequirePackage{hyperref} \RequirePackage{url} \newcommand{\prefix}{}% \newcommand{\postfix}{}% \newcounter{index} \newcommand{\qname}[1]{% \whereischar[q]{#1}{:}% ...


4

Please always post a complete document not just a fragment. If you add \show\prefix you will see it is not exactly the characters before : it is > \prefix=\long macro: ->\StrBefore {a:b}{:}. Which presumably does not expand to something hyperref likes. This version just uses an expandable macro to split on : \documentclass{article} ...


0

I discovered that the problem was due to multicolumn. My solution was to disable multicolum for the reference list. If anyone has a solution that doesn't require disabling multicolumn for the reference list I will be very interested.


6

The break points set by package url can be configured by setting \UrlBreakPenalty and \UrlBigBreakPenalty. A value of 10000 prevents the hyphenation: \documentclass[12pt,a4paper,oneside]{report} \usepackage{url} \usepackage{apacite} \usepackage[T1]{fontenc} \usepackage[osf]{libertine} \mathchardef\UrlBreakPenalty=10000 \mathchardef\UrlBigBreakPenalty=10000 ...


5

There are different approaches. First on LaTeX-level you can use \AtEveryCitekey{\clearfield{url}} \AtEveryBibitem works only for \printbibliography. Or you use a Biber solution: \DeclareSourcemap{ \maps[datatype=bibtex ]{ \map{ \step [ fieldset = url , null ] } } } MWE: \documentclass{article} \usepackage{filecontents} ...


5

This is because \url doesn't find an appropriate breaking point in the given URL; you can help it, by adding a new possible breaking point to \UrlBreaks (the default list for possible breaks): \begin{filecontents*}{abcd.bib} @misc{pcons, author = {Energy.Gov}, title = {{Estimating Appliance and Home Electronic Energy Use}}, Howpublished = ...


0

You did not mention which bibliography style you use, but most styles wrap the content of the url field in a \url{...} macro, and provide a very basic definition for it that can not handle special characters like %. The solution is to simply load the url or hyperref package, as those define sophisticated versions of the \url macro that do handle special ...


1

You need to escape the % in your bib file because the % symbol has special meaning in LaTeX. See http://en.wikibooks.org/wiki/LaTeX/Basics#Reserved_Characters. Try replacing % with \% in the URL field in the bib file.


0

The @Jubobs' comment is right. I forgot substitute & and # by \& and #. That is working like that. Thanks.


5

You're correct. The backslash is TeX's (default) escape character; it signals to TeX that what follows is different from "normal text". Therefore, simply typing \ will not produce a backslash in the output. (Incidentally, if you type \ followed by any amount of blank space, you will only produce a so-called control space, not a backslash.) To typeset a ...


0

I wanted to add another working solution here. The href package seems to allow special characters within \address{} using the two-parameter href command. For instance, \href{http://my.web.address/~blah}{http://my.web.address/$\sim$blah} works. However, the single parameter version of the href command, \href{http://my.web.address/~blah}, does not typeset ...


1

Your question is not clear. Do you want to use package biblatex or not? Some of your comments make me think you mixed up BibTeX, biblatex and principles of building bib files. The following MWE shows you the usage of biblatex with some package options to controll the layout of your bibliography. What you at last need you can read in the manual of package ...


1

If you are willing to switch to biblatex (see bibtex vs. biber and biblatex vs. natbib for the many advantages of biblatex), you could use its very complete implementation of the chicago style, biblatex-chicago. It provides an online entry type, which is specifically tailored for online publications / websites (url, date accessed, etc.).


0

you say you want to make biblatex use the urldate field, but the most important thing seems to be missing from your example: \usepackage{biblatex}. ...if you really want to use biblatex: your MWE and your question (title, tags) provide conflicting information. \documentclass[12pt,a4paper]{article} \usepackage[sorting=nyt,firstinits=true]{biblatex} ...


2

Modified answer for UPDATE 1 It is better not to use note. Biblatex offers the opportunity to create new fields, so I would create a new field for the url time (urltime). This can be done with \begin{filecontents}{biblatex-dm.cfg} \DeclareDatamodelFields[type=field,datatype=literal,skipout=false]{urltime} \end{filecontents} then for the formatting ...


5

$\textrm{<http://tex.stackexchange.com/>}$ You don't want math mode there, it is doing nothing other than slowing down the processing as \textrm gets you back to text mode. The < and > do not show up as the expected symbols as you are using the classic OT1 TeX encoding. You could use \usepackage[T1]{fontenc} to use an 8bit encoding in ...


5

You could load the LaTeX package called url and issue the command \urlstyle{same} in the document's preamble. That way, all material contained in various \url{....} directives will be typeset in current text font. A big plus of using the \url directive for typesetting URL strings is that LaTeX will (generally) do a good job finding permissible line breaks ...


7

If you are using the default Computer Modern Fonts, then the Latin Modern fonts might be an alternative, because they are derived from the Computer Modern Fonts. The tilde is lower. Also there is a proportionally spaced typewriter variant that might look better than the mono-spaced font for URLs. \documentclass{letter} \usepackage{url} ...


4

The problem is the underline. Use the command \url{} from the url package. \usepackage{url} \footnote{\url{http://www.cems.uvm.edu/~tlakoba/math337/notes_12.pdf}, page 3.}



Top 50 recent answers are included