BibLaTeX long URL extending into border despite using biburllcpenalty












6














MWE:



test.tex:



% !TeX program = xelatex
documentclass[paper=A4,fontsize=12pt]{scrartcl}
usepackage[left=3cm, right=3cm, bottom=3cm, top=3cm]{geometry}
usepackage{fontspec}
usepackage[backend=biber,style=authoryear,citestyle=authoryear]{biblatex}
DeclareNameAlias{sortname}{last-first}
DeclareNameAlias{default}{last-first}
setcounter{biburllcpenalty}{7000}
setcounter{biburlucpenalty}{9999}
addbibresource{resources.bib}
begin{document}
cite{Test.2018}
printbibliography
end{document}


resources.bib:



@misc{Test.2018,
author = {{testauthor test author testauthor}},
year= {2018},
title = {{testfile test file testfile}},
url = {http://abcdefghijklmnopqrstuvwxy.com/phrrFK5dS1ztTjiaCmveRARXpGBtV01U%20B93FcrxkOVhj2CceIguNuUPpwDaUD4GjTTWh9cL30D6rLgWxapYlhegDXQGFlE0hao7B2YS227ca%20keoWHWNmQVKVcNOUFxfsCp0SwCElfTVtpMv6DKqiSwhWgO2zrHvstd4UNBo99UQBSCTkzL7lD2UyRLTRy6xXdJ}
}


Here the URL does not break properly due to the fontspec package changing the parindent. How can I fix this?



begingroup
sloppy
printbibliography
endgroup


This makes the URL look extremely ugly with the first line not even justified. It is just this one weird character extending into the border. I do not want to use any weird workarounds like using the url package and changing the bibliography when BibLaTeX supports URLs natively with Biber.










share|improve this question









New contributor




Young Un is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
















  • 1




    Young Un Thank you for helping keep things into the QA structure in the other question. It definitely works better this way. If I may, I have another suggestion. How about you use in your question the actual URL that's giving you trouble? If you provide us with an arbitrarily long made up URL, the only general solution may be to use something of the kind of sloppy. But usually real URL are less badly behaved (even if nasty enough!), so the real case might get you a better solution.
    – gusbrs
    Dec 16 at 18:29












  • You could also use setcounter{biburlnumpenalty}{9900} (or some other value), to also allow breakpoints after numbers.
    – Skillmon
    Dec 16 at 18:33










  • Thanks for staying with me! Actually the real url is of a similar length and also composed of a similar length of random characters (or base64 strings) after the tld. This is what confuses me. The url is literally a string of random characters and latex decides not to break at one random point that is at the end of the regular line but instead after the next character. I tried setting biburlnumpenalty, it did not have an impact either.
    – Young Un
    Dec 16 at 18:36












  • Mmh, In this case, let's see what folks have to say.
    – gusbrs
    Dec 16 at 18:39






  • 2




    As to your comment "I do not want to use any weird workarounds like using the url package and changing the bibliography when biblatex supports urls natively with biber." Actually biblatex loads the url package and it is url that provides biblatex's support for urls. So, you might as well use its options, if they do get things better.
    – gusbrs
    Dec 16 at 18:47


















6














MWE:



test.tex:



% !TeX program = xelatex
documentclass[paper=A4,fontsize=12pt]{scrartcl}
usepackage[left=3cm, right=3cm, bottom=3cm, top=3cm]{geometry}
usepackage{fontspec}
usepackage[backend=biber,style=authoryear,citestyle=authoryear]{biblatex}
DeclareNameAlias{sortname}{last-first}
DeclareNameAlias{default}{last-first}
setcounter{biburllcpenalty}{7000}
setcounter{biburlucpenalty}{9999}
addbibresource{resources.bib}
begin{document}
cite{Test.2018}
printbibliography
end{document}


resources.bib:



@misc{Test.2018,
author = {{testauthor test author testauthor}},
year= {2018},
title = {{testfile test file testfile}},
url = {http://abcdefghijklmnopqrstuvwxy.com/phrrFK5dS1ztTjiaCmveRARXpGBtV01U%20B93FcrxkOVhj2CceIguNuUPpwDaUD4GjTTWh9cL30D6rLgWxapYlhegDXQGFlE0hao7B2YS227ca%20keoWHWNmQVKVcNOUFxfsCp0SwCElfTVtpMv6DKqiSwhWgO2zrHvstd4UNBo99UQBSCTkzL7lD2UyRLTRy6xXdJ}
}


Here the URL does not break properly due to the fontspec package changing the parindent. How can I fix this?



begingroup
sloppy
printbibliography
endgroup


This makes the URL look extremely ugly with the first line not even justified. It is just this one weird character extending into the border. I do not want to use any weird workarounds like using the url package and changing the bibliography when BibLaTeX supports URLs natively with Biber.










share|improve this question









New contributor




Young Un is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
















  • 1




    Young Un Thank you for helping keep things into the QA structure in the other question. It definitely works better this way. If I may, I have another suggestion. How about you use in your question the actual URL that's giving you trouble? If you provide us with an arbitrarily long made up URL, the only general solution may be to use something of the kind of sloppy. But usually real URL are less badly behaved (even if nasty enough!), so the real case might get you a better solution.
    – gusbrs
    Dec 16 at 18:29












  • You could also use setcounter{biburlnumpenalty}{9900} (or some other value), to also allow breakpoints after numbers.
    – Skillmon
    Dec 16 at 18:33










  • Thanks for staying with me! Actually the real url is of a similar length and also composed of a similar length of random characters (or base64 strings) after the tld. This is what confuses me. The url is literally a string of random characters and latex decides not to break at one random point that is at the end of the regular line but instead after the next character. I tried setting biburlnumpenalty, it did not have an impact either.
    – Young Un
    Dec 16 at 18:36












  • Mmh, In this case, let's see what folks have to say.
    – gusbrs
    Dec 16 at 18:39






  • 2




    As to your comment "I do not want to use any weird workarounds like using the url package and changing the bibliography when biblatex supports urls natively with biber." Actually biblatex loads the url package and it is url that provides biblatex's support for urls. So, you might as well use its options, if they do get things better.
    – gusbrs
    Dec 16 at 18:47
















6












6








6


0





MWE:



test.tex:



% !TeX program = xelatex
documentclass[paper=A4,fontsize=12pt]{scrartcl}
usepackage[left=3cm, right=3cm, bottom=3cm, top=3cm]{geometry}
usepackage{fontspec}
usepackage[backend=biber,style=authoryear,citestyle=authoryear]{biblatex}
DeclareNameAlias{sortname}{last-first}
DeclareNameAlias{default}{last-first}
setcounter{biburllcpenalty}{7000}
setcounter{biburlucpenalty}{9999}
addbibresource{resources.bib}
begin{document}
cite{Test.2018}
printbibliography
end{document}


resources.bib:



@misc{Test.2018,
author = {{testauthor test author testauthor}},
year= {2018},
title = {{testfile test file testfile}},
url = {http://abcdefghijklmnopqrstuvwxy.com/phrrFK5dS1ztTjiaCmveRARXpGBtV01U%20B93FcrxkOVhj2CceIguNuUPpwDaUD4GjTTWh9cL30D6rLgWxapYlhegDXQGFlE0hao7B2YS227ca%20keoWHWNmQVKVcNOUFxfsCp0SwCElfTVtpMv6DKqiSwhWgO2zrHvstd4UNBo99UQBSCTkzL7lD2UyRLTRy6xXdJ}
}


Here the URL does not break properly due to the fontspec package changing the parindent. How can I fix this?



begingroup
sloppy
printbibliography
endgroup


This makes the URL look extremely ugly with the first line not even justified. It is just this one weird character extending into the border. I do not want to use any weird workarounds like using the url package and changing the bibliography when BibLaTeX supports URLs natively with Biber.










share|improve this question









New contributor




Young Un is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











MWE:



test.tex:



% !TeX program = xelatex
documentclass[paper=A4,fontsize=12pt]{scrartcl}
usepackage[left=3cm, right=3cm, bottom=3cm, top=3cm]{geometry}
usepackage{fontspec}
usepackage[backend=biber,style=authoryear,citestyle=authoryear]{biblatex}
DeclareNameAlias{sortname}{last-first}
DeclareNameAlias{default}{last-first}
setcounter{biburllcpenalty}{7000}
setcounter{biburlucpenalty}{9999}
addbibresource{resources.bib}
begin{document}
cite{Test.2018}
printbibliography
end{document}


resources.bib:



@misc{Test.2018,
author = {{testauthor test author testauthor}},
year= {2018},
title = {{testfile test file testfile}},
url = {http://abcdefghijklmnopqrstuvwxy.com/phrrFK5dS1ztTjiaCmveRARXpGBtV01U%20B93FcrxkOVhj2CceIguNuUPpwDaUD4GjTTWh9cL30D6rLgWxapYlhegDXQGFlE0hao7B2YS227ca%20keoWHWNmQVKVcNOUFxfsCp0SwCElfTVtpMv6DKqiSwhWgO2zrHvstd4UNBo99UQBSCTkzL7lD2UyRLTRy6xXdJ}
}


Here the URL does not break properly due to the fontspec package changing the parindent. How can I fix this?



begingroup
sloppy
printbibliography
endgroup


This makes the URL look extremely ugly with the first line not even justified. It is just this one weird character extending into the border. I do not want to use any weird workarounds like using the url package and changing the bibliography when BibLaTeX supports URLs natively with Biber.







biblatex xetex line-breaking koma-script






share|improve this question









New contributor




Young Un is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




Young Un is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited Dec 17 at 7:31









Peter Mortensen

53536




53536






New contributor




Young Un is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked Dec 16 at 18:17









Young Un

905




905




New contributor




Young Un is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Young Un is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Young Un is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.








  • 1




    Young Un Thank you for helping keep things into the QA structure in the other question. It definitely works better this way. If I may, I have another suggestion. How about you use in your question the actual URL that's giving you trouble? If you provide us with an arbitrarily long made up URL, the only general solution may be to use something of the kind of sloppy. But usually real URL are less badly behaved (even if nasty enough!), so the real case might get you a better solution.
    – gusbrs
    Dec 16 at 18:29












  • You could also use setcounter{biburlnumpenalty}{9900} (or some other value), to also allow breakpoints after numbers.
    – Skillmon
    Dec 16 at 18:33










  • Thanks for staying with me! Actually the real url is of a similar length and also composed of a similar length of random characters (or base64 strings) after the tld. This is what confuses me. The url is literally a string of random characters and latex decides not to break at one random point that is at the end of the regular line but instead after the next character. I tried setting biburlnumpenalty, it did not have an impact either.
    – Young Un
    Dec 16 at 18:36












  • Mmh, In this case, let's see what folks have to say.
    – gusbrs
    Dec 16 at 18:39






  • 2




    As to your comment "I do not want to use any weird workarounds like using the url package and changing the bibliography when biblatex supports urls natively with biber." Actually biblatex loads the url package and it is url that provides biblatex's support for urls. So, you might as well use its options, if they do get things better.
    – gusbrs
    Dec 16 at 18:47
















  • 1




    Young Un Thank you for helping keep things into the QA structure in the other question. It definitely works better this way. If I may, I have another suggestion. How about you use in your question the actual URL that's giving you trouble? If you provide us with an arbitrarily long made up URL, the only general solution may be to use something of the kind of sloppy. But usually real URL are less badly behaved (even if nasty enough!), so the real case might get you a better solution.
    – gusbrs
    Dec 16 at 18:29












  • You could also use setcounter{biburlnumpenalty}{9900} (or some other value), to also allow breakpoints after numbers.
    – Skillmon
    Dec 16 at 18:33










  • Thanks for staying with me! Actually the real url is of a similar length and also composed of a similar length of random characters (or base64 strings) after the tld. This is what confuses me. The url is literally a string of random characters and latex decides not to break at one random point that is at the end of the regular line but instead after the next character. I tried setting biburlnumpenalty, it did not have an impact either.
    – Young Un
    Dec 16 at 18:36












  • Mmh, In this case, let's see what folks have to say.
    – gusbrs
    Dec 16 at 18:39






  • 2




    As to your comment "I do not want to use any weird workarounds like using the url package and changing the bibliography when biblatex supports urls natively with biber." Actually biblatex loads the url package and it is url that provides biblatex's support for urls. So, you might as well use its options, if they do get things better.
    – gusbrs
    Dec 16 at 18:47










1




1




Young Un Thank you for helping keep things into the QA structure in the other question. It definitely works better this way. If I may, I have another suggestion. How about you use in your question the actual URL that's giving you trouble? If you provide us with an arbitrarily long made up URL, the only general solution may be to use something of the kind of sloppy. But usually real URL are less badly behaved (even if nasty enough!), so the real case might get you a better solution.
– gusbrs
Dec 16 at 18:29






Young Un Thank you for helping keep things into the QA structure in the other question. It definitely works better this way. If I may, I have another suggestion. How about you use in your question the actual URL that's giving you trouble? If you provide us with an arbitrarily long made up URL, the only general solution may be to use something of the kind of sloppy. But usually real URL are less badly behaved (even if nasty enough!), so the real case might get you a better solution.
– gusbrs
Dec 16 at 18:29














You could also use setcounter{biburlnumpenalty}{9900} (or some other value), to also allow breakpoints after numbers.
– Skillmon
Dec 16 at 18:33




You could also use setcounter{biburlnumpenalty}{9900} (or some other value), to also allow breakpoints after numbers.
– Skillmon
Dec 16 at 18:33












Thanks for staying with me! Actually the real url is of a similar length and also composed of a similar length of random characters (or base64 strings) after the tld. This is what confuses me. The url is literally a string of random characters and latex decides not to break at one random point that is at the end of the regular line but instead after the next character. I tried setting biburlnumpenalty, it did not have an impact either.
– Young Un
Dec 16 at 18:36






Thanks for staying with me! Actually the real url is of a similar length and also composed of a similar length of random characters (or base64 strings) after the tld. This is what confuses me. The url is literally a string of random characters and latex decides not to break at one random point that is at the end of the regular line but instead after the next character. I tried setting biburlnumpenalty, it did not have an impact either.
– Young Un
Dec 16 at 18:36














Mmh, In this case, let's see what folks have to say.
– gusbrs
Dec 16 at 18:39




Mmh, In this case, let's see what folks have to say.
– gusbrs
Dec 16 at 18:39




2




2




As to your comment "I do not want to use any weird workarounds like using the url package and changing the bibliography when biblatex supports urls natively with biber." Actually biblatex loads the url package and it is url that provides biblatex's support for urls. So, you might as well use its options, if they do get things better.
– gusbrs
Dec 16 at 18:47






As to your comment "I do not want to use any weird workarounds like using the url package and changing the bibliography when biblatex supports urls natively with biber." Actually biblatex loads the url package and it is url that provides biblatex's support for urls. So, you might as well use its options, if they do get things better.
– gusbrs
Dec 16 at 18:47












2 Answers
2






active

oldest

votes


















7














You could insert a bit stretchable space:



documentclass[paper=A4,fontsize=12pt]{scrartcl}
usepackage[left=3cm, right=3cm, bottom=3cm, top=3cm]{geometry}
usepackage{fontspec}

usepackage[backend=biber,style=authoryear,citestyle=authoryear]{biblatex}
DeclareNameAlias{sortname}{last-first}
DeclareNameAlias{default}{last-first}
setcounter{biburllcpenalty}{100}
setcounter{biburlucpenalty}{100}
setcounter{biburlnumpenalty}{100}
addbibresource{resource.bib}

renewcommand*{biburlsetup}{%
Urlmuskip=0mu plus 3murelax
mathchardefUrlBigBreakPenalty=100relax
mathchardefUrlBreakPenalty=200relax
defUrlBigBreaks{do:do-}%
defUrlBreaks{%
do.do@do/do\do!do_do|do;do>do]do)do}%
do,do?do'do+do=do#do$do&do*do^do"}%
ifnumgreater{value{biburlnumpenalty}}{0}
{defdo##1{apptoUrlSpecials{do##1{mathchar`##1 mskip 0mu plus 1mupenaltyvalue{biburlnumpenalty}}}}%
do1do2do3do4do5do6do7do8do9do}
{}%
ifnumgreater{value{biburlucpenalty}}{0}
{defdo##1{apptoUrlSpecials{do##1{mathchar`##1 mskip 0mu plus 1mupenaltyvalue{biburlucpenalty}}}}%
doAdoBdoCdoDdoEdoFdoGdoHdoIdoJ
doKdoLdoMdoNdoOdoPdoQdoRdoSdoT
doUdoVdoWdoXdoYdoZ}
{}%
ifnumgreater{value{biburllcpenalty}}{0}
{defdo##1{apptoUrlSpecials{do##1{mathchar`##1 mskip 0mu plus 1mupenaltyvalue{biburllcpenalty}}}}%
doadobdocdoddoedofdogdohdoidoj
dokdoldomdondoodopdoqdordosdot
doudovdowdoxdoydoz}
{}%
letdo=noexpand}

begin{document}


cite{Test.2018}
printbibliography
end{document}


enter image description here






share|improve this answer





















  • +1 I played with this definition quite a lot, to no avail. But why does placing the glue inside UrlSpecials differs from setting a larger glue in Urlmuskip?
    – gusbrs
    Dec 16 at 20:36






  • 1




    Urlmuskip has an effect only at the dot and the slash. It doesn't affect the problematic line.
    – Ulrike Fischer
    Dec 16 at 20:39










  • Ah! so that's why I had to go up to 10mu just to get a lousy result...
    – gusbrs
    Dec 16 at 20:41



















3














try



usepackage[style=authoryear,citestyle=authoryear]{biblatex}
usepackage{xurl}


enter image description here






share|improve this answer























  • Tried, did not work at all. The url now overshoots the page by about 10 cm.
    – Young Un
    Dec 16 at 19:25










  • see edited answer
    – Herbert
    Dec 16 at 19:51










  • Is using a whole different mono font the only way to fix one single linebreak?
    – Young Un
    Dec 16 at 19:52










  • this font is only an example!
    – Herbert
    Dec 16 at 19:54






  • 1




    I'm sorry, I can not follow. Your example literally changes the font and my problem is about an url not breaking the way I want it to.
    – Young Un
    Dec 16 at 21:42











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "85"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});






Young Un is a new contributor. Be nice, and check out our Code of Conduct.










draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f466114%2fbiblatex-long-url-extending-into-border-despite-using-biburllcpenalty%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























2 Answers
2






active

oldest

votes








2 Answers
2






active

oldest

votes









active

oldest

votes






active

oldest

votes









7














You could insert a bit stretchable space:



documentclass[paper=A4,fontsize=12pt]{scrartcl}
usepackage[left=3cm, right=3cm, bottom=3cm, top=3cm]{geometry}
usepackage{fontspec}

usepackage[backend=biber,style=authoryear,citestyle=authoryear]{biblatex}
DeclareNameAlias{sortname}{last-first}
DeclareNameAlias{default}{last-first}
setcounter{biburllcpenalty}{100}
setcounter{biburlucpenalty}{100}
setcounter{biburlnumpenalty}{100}
addbibresource{resource.bib}

renewcommand*{biburlsetup}{%
Urlmuskip=0mu plus 3murelax
mathchardefUrlBigBreakPenalty=100relax
mathchardefUrlBreakPenalty=200relax
defUrlBigBreaks{do:do-}%
defUrlBreaks{%
do.do@do/do\do!do_do|do;do>do]do)do}%
do,do?do'do+do=do#do$do&do*do^do"}%
ifnumgreater{value{biburlnumpenalty}}{0}
{defdo##1{apptoUrlSpecials{do##1{mathchar`##1 mskip 0mu plus 1mupenaltyvalue{biburlnumpenalty}}}}%
do1do2do3do4do5do6do7do8do9do}
{}%
ifnumgreater{value{biburlucpenalty}}{0}
{defdo##1{apptoUrlSpecials{do##1{mathchar`##1 mskip 0mu plus 1mupenaltyvalue{biburlucpenalty}}}}%
doAdoBdoCdoDdoEdoFdoGdoHdoIdoJ
doKdoLdoMdoNdoOdoPdoQdoRdoSdoT
doUdoVdoWdoXdoYdoZ}
{}%
ifnumgreater{value{biburllcpenalty}}{0}
{defdo##1{apptoUrlSpecials{do##1{mathchar`##1 mskip 0mu plus 1mupenaltyvalue{biburllcpenalty}}}}%
doadobdocdoddoedofdogdohdoidoj
dokdoldomdondoodopdoqdordosdot
doudovdowdoxdoydoz}
{}%
letdo=noexpand}

begin{document}


cite{Test.2018}
printbibliography
end{document}


enter image description here






share|improve this answer





















  • +1 I played with this definition quite a lot, to no avail. But why does placing the glue inside UrlSpecials differs from setting a larger glue in Urlmuskip?
    – gusbrs
    Dec 16 at 20:36






  • 1




    Urlmuskip has an effect only at the dot and the slash. It doesn't affect the problematic line.
    – Ulrike Fischer
    Dec 16 at 20:39










  • Ah! so that's why I had to go up to 10mu just to get a lousy result...
    – gusbrs
    Dec 16 at 20:41
















7














You could insert a bit stretchable space:



documentclass[paper=A4,fontsize=12pt]{scrartcl}
usepackage[left=3cm, right=3cm, bottom=3cm, top=3cm]{geometry}
usepackage{fontspec}

usepackage[backend=biber,style=authoryear,citestyle=authoryear]{biblatex}
DeclareNameAlias{sortname}{last-first}
DeclareNameAlias{default}{last-first}
setcounter{biburllcpenalty}{100}
setcounter{biburlucpenalty}{100}
setcounter{biburlnumpenalty}{100}
addbibresource{resource.bib}

renewcommand*{biburlsetup}{%
Urlmuskip=0mu plus 3murelax
mathchardefUrlBigBreakPenalty=100relax
mathchardefUrlBreakPenalty=200relax
defUrlBigBreaks{do:do-}%
defUrlBreaks{%
do.do@do/do\do!do_do|do;do>do]do)do}%
do,do?do'do+do=do#do$do&do*do^do"}%
ifnumgreater{value{biburlnumpenalty}}{0}
{defdo##1{apptoUrlSpecials{do##1{mathchar`##1 mskip 0mu plus 1mupenaltyvalue{biburlnumpenalty}}}}%
do1do2do3do4do5do6do7do8do9do}
{}%
ifnumgreater{value{biburlucpenalty}}{0}
{defdo##1{apptoUrlSpecials{do##1{mathchar`##1 mskip 0mu plus 1mupenaltyvalue{biburlucpenalty}}}}%
doAdoBdoCdoDdoEdoFdoGdoHdoIdoJ
doKdoLdoMdoNdoOdoPdoQdoRdoSdoT
doUdoVdoWdoXdoYdoZ}
{}%
ifnumgreater{value{biburllcpenalty}}{0}
{defdo##1{apptoUrlSpecials{do##1{mathchar`##1 mskip 0mu plus 1mupenaltyvalue{biburllcpenalty}}}}%
doadobdocdoddoedofdogdohdoidoj
dokdoldomdondoodopdoqdordosdot
doudovdowdoxdoydoz}
{}%
letdo=noexpand}

begin{document}


cite{Test.2018}
printbibliography
end{document}


enter image description here






share|improve this answer





















  • +1 I played with this definition quite a lot, to no avail. But why does placing the glue inside UrlSpecials differs from setting a larger glue in Urlmuskip?
    – gusbrs
    Dec 16 at 20:36






  • 1




    Urlmuskip has an effect only at the dot and the slash. It doesn't affect the problematic line.
    – Ulrike Fischer
    Dec 16 at 20:39










  • Ah! so that's why I had to go up to 10mu just to get a lousy result...
    – gusbrs
    Dec 16 at 20:41














7












7








7






You could insert a bit stretchable space:



documentclass[paper=A4,fontsize=12pt]{scrartcl}
usepackage[left=3cm, right=3cm, bottom=3cm, top=3cm]{geometry}
usepackage{fontspec}

usepackage[backend=biber,style=authoryear,citestyle=authoryear]{biblatex}
DeclareNameAlias{sortname}{last-first}
DeclareNameAlias{default}{last-first}
setcounter{biburllcpenalty}{100}
setcounter{biburlucpenalty}{100}
setcounter{biburlnumpenalty}{100}
addbibresource{resource.bib}

renewcommand*{biburlsetup}{%
Urlmuskip=0mu plus 3murelax
mathchardefUrlBigBreakPenalty=100relax
mathchardefUrlBreakPenalty=200relax
defUrlBigBreaks{do:do-}%
defUrlBreaks{%
do.do@do/do\do!do_do|do;do>do]do)do}%
do,do?do'do+do=do#do$do&do*do^do"}%
ifnumgreater{value{biburlnumpenalty}}{0}
{defdo##1{apptoUrlSpecials{do##1{mathchar`##1 mskip 0mu plus 1mupenaltyvalue{biburlnumpenalty}}}}%
do1do2do3do4do5do6do7do8do9do}
{}%
ifnumgreater{value{biburlucpenalty}}{0}
{defdo##1{apptoUrlSpecials{do##1{mathchar`##1 mskip 0mu plus 1mupenaltyvalue{biburlucpenalty}}}}%
doAdoBdoCdoDdoEdoFdoGdoHdoIdoJ
doKdoLdoMdoNdoOdoPdoQdoRdoSdoT
doUdoVdoWdoXdoYdoZ}
{}%
ifnumgreater{value{biburllcpenalty}}{0}
{defdo##1{apptoUrlSpecials{do##1{mathchar`##1 mskip 0mu plus 1mupenaltyvalue{biburllcpenalty}}}}%
doadobdocdoddoedofdogdohdoidoj
dokdoldomdondoodopdoqdordosdot
doudovdowdoxdoydoz}
{}%
letdo=noexpand}

begin{document}


cite{Test.2018}
printbibliography
end{document}


enter image description here






share|improve this answer












You could insert a bit stretchable space:



documentclass[paper=A4,fontsize=12pt]{scrartcl}
usepackage[left=3cm, right=3cm, bottom=3cm, top=3cm]{geometry}
usepackage{fontspec}

usepackage[backend=biber,style=authoryear,citestyle=authoryear]{biblatex}
DeclareNameAlias{sortname}{last-first}
DeclareNameAlias{default}{last-first}
setcounter{biburllcpenalty}{100}
setcounter{biburlucpenalty}{100}
setcounter{biburlnumpenalty}{100}
addbibresource{resource.bib}

renewcommand*{biburlsetup}{%
Urlmuskip=0mu plus 3murelax
mathchardefUrlBigBreakPenalty=100relax
mathchardefUrlBreakPenalty=200relax
defUrlBigBreaks{do:do-}%
defUrlBreaks{%
do.do@do/do\do!do_do|do;do>do]do)do}%
do,do?do'do+do=do#do$do&do*do^do"}%
ifnumgreater{value{biburlnumpenalty}}{0}
{defdo##1{apptoUrlSpecials{do##1{mathchar`##1 mskip 0mu plus 1mupenaltyvalue{biburlnumpenalty}}}}%
do1do2do3do4do5do6do7do8do9do}
{}%
ifnumgreater{value{biburlucpenalty}}{0}
{defdo##1{apptoUrlSpecials{do##1{mathchar`##1 mskip 0mu plus 1mupenaltyvalue{biburlucpenalty}}}}%
doAdoBdoCdoDdoEdoFdoGdoHdoIdoJ
doKdoLdoMdoNdoOdoPdoQdoRdoSdoT
doUdoVdoWdoXdoYdoZ}
{}%
ifnumgreater{value{biburllcpenalty}}{0}
{defdo##1{apptoUrlSpecials{do##1{mathchar`##1 mskip 0mu plus 1mupenaltyvalue{biburllcpenalty}}}}%
doadobdocdoddoedofdogdohdoidoj
dokdoldomdondoodopdoqdordosdot
doudovdowdoxdoydoz}
{}%
letdo=noexpand}

begin{document}


cite{Test.2018}
printbibliography
end{document}


enter image description here







share|improve this answer












share|improve this answer



share|improve this answer










answered Dec 16 at 20:32









Ulrike Fischer

185k7289666




185k7289666












  • +1 I played with this definition quite a lot, to no avail. But why does placing the glue inside UrlSpecials differs from setting a larger glue in Urlmuskip?
    – gusbrs
    Dec 16 at 20:36






  • 1




    Urlmuskip has an effect only at the dot and the slash. It doesn't affect the problematic line.
    – Ulrike Fischer
    Dec 16 at 20:39










  • Ah! so that's why I had to go up to 10mu just to get a lousy result...
    – gusbrs
    Dec 16 at 20:41


















  • +1 I played with this definition quite a lot, to no avail. But why does placing the glue inside UrlSpecials differs from setting a larger glue in Urlmuskip?
    – gusbrs
    Dec 16 at 20:36






  • 1




    Urlmuskip has an effect only at the dot and the slash. It doesn't affect the problematic line.
    – Ulrike Fischer
    Dec 16 at 20:39










  • Ah! so that's why I had to go up to 10mu just to get a lousy result...
    – gusbrs
    Dec 16 at 20:41
















+1 I played with this definition quite a lot, to no avail. But why does placing the glue inside UrlSpecials differs from setting a larger glue in Urlmuskip?
– gusbrs
Dec 16 at 20:36




+1 I played with this definition quite a lot, to no avail. But why does placing the glue inside UrlSpecials differs from setting a larger glue in Urlmuskip?
– gusbrs
Dec 16 at 20:36




1




1




Urlmuskip has an effect only at the dot and the slash. It doesn't affect the problematic line.
– Ulrike Fischer
Dec 16 at 20:39




Urlmuskip has an effect only at the dot and the slash. It doesn't affect the problematic line.
– Ulrike Fischer
Dec 16 at 20:39












Ah! so that's why I had to go up to 10mu just to get a lousy result...
– gusbrs
Dec 16 at 20:41




Ah! so that's why I had to go up to 10mu just to get a lousy result...
– gusbrs
Dec 16 at 20:41











3














try



usepackage[style=authoryear,citestyle=authoryear]{biblatex}
usepackage{xurl}


enter image description here






share|improve this answer























  • Tried, did not work at all. The url now overshoots the page by about 10 cm.
    – Young Un
    Dec 16 at 19:25










  • see edited answer
    – Herbert
    Dec 16 at 19:51










  • Is using a whole different mono font the only way to fix one single linebreak?
    – Young Un
    Dec 16 at 19:52










  • this font is only an example!
    – Herbert
    Dec 16 at 19:54






  • 1




    I'm sorry, I can not follow. Your example literally changes the font and my problem is about an url not breaking the way I want it to.
    – Young Un
    Dec 16 at 21:42
















3














try



usepackage[style=authoryear,citestyle=authoryear]{biblatex}
usepackage{xurl}


enter image description here






share|improve this answer























  • Tried, did not work at all. The url now overshoots the page by about 10 cm.
    – Young Un
    Dec 16 at 19:25










  • see edited answer
    – Herbert
    Dec 16 at 19:51










  • Is using a whole different mono font the only way to fix one single linebreak?
    – Young Un
    Dec 16 at 19:52










  • this font is only an example!
    – Herbert
    Dec 16 at 19:54






  • 1




    I'm sorry, I can not follow. Your example literally changes the font and my problem is about an url not breaking the way I want it to.
    – Young Un
    Dec 16 at 21:42














3












3








3






try



usepackage[style=authoryear,citestyle=authoryear]{biblatex}
usepackage{xurl}


enter image description here






share|improve this answer














try



usepackage[style=authoryear,citestyle=authoryear]{biblatex}
usepackage{xurl}


enter image description here







share|improve this answer














share|improve this answer



share|improve this answer








edited Dec 17 at 6:18

























answered Dec 16 at 18:51









Herbert

268k24407716




268k24407716












  • Tried, did not work at all. The url now overshoots the page by about 10 cm.
    – Young Un
    Dec 16 at 19:25










  • see edited answer
    – Herbert
    Dec 16 at 19:51










  • Is using a whole different mono font the only way to fix one single linebreak?
    – Young Un
    Dec 16 at 19:52










  • this font is only an example!
    – Herbert
    Dec 16 at 19:54






  • 1




    I'm sorry, I can not follow. Your example literally changes the font and my problem is about an url not breaking the way I want it to.
    – Young Un
    Dec 16 at 21:42


















  • Tried, did not work at all. The url now overshoots the page by about 10 cm.
    – Young Un
    Dec 16 at 19:25










  • see edited answer
    – Herbert
    Dec 16 at 19:51










  • Is using a whole different mono font the only way to fix one single linebreak?
    – Young Un
    Dec 16 at 19:52










  • this font is only an example!
    – Herbert
    Dec 16 at 19:54






  • 1




    I'm sorry, I can not follow. Your example literally changes the font and my problem is about an url not breaking the way I want it to.
    – Young Un
    Dec 16 at 21:42
















Tried, did not work at all. The url now overshoots the page by about 10 cm.
– Young Un
Dec 16 at 19:25




Tried, did not work at all. The url now overshoots the page by about 10 cm.
– Young Un
Dec 16 at 19:25












see edited answer
– Herbert
Dec 16 at 19:51




see edited answer
– Herbert
Dec 16 at 19:51












Is using a whole different mono font the only way to fix one single linebreak?
– Young Un
Dec 16 at 19:52




Is using a whole different mono font the only way to fix one single linebreak?
– Young Un
Dec 16 at 19:52












this font is only an example!
– Herbert
Dec 16 at 19:54




this font is only an example!
– Herbert
Dec 16 at 19:54




1




1




I'm sorry, I can not follow. Your example literally changes the font and my problem is about an url not breaking the way I want it to.
– Young Un
Dec 16 at 21:42




I'm sorry, I can not follow. Your example literally changes the font and my problem is about an url not breaking the way I want it to.
– Young Un
Dec 16 at 21:42










Young Un is a new contributor. Be nice, and check out our Code of Conduct.










draft saved

draft discarded


















Young Un is a new contributor. Be nice, and check out our Code of Conduct.













Young Un is a new contributor. Be nice, and check out our Code of Conduct.












Young Un is a new contributor. Be nice, and check out our Code of Conduct.
















Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f466114%2fbiblatex-long-url-extending-into-border-despite-using-biburllcpenalty%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

數位音樂下載

When can things happen in Etherscan, such as the picture below?

格利澤436b