How I can remove formatting from text and convert it to URL?
I need to remove any type of formatting from a text to get an URL multi-formatting.
By keeping the following model, I have tried various solutions but without having the desired result.
Would anyone know how to find a solution?
newcommand{link}[1]{
%
% ?
%
href{#1_WITHOUT_FORMATTING_AND_COMMANDS}{#1_WITH_FORMATTING}
}
begin{document}
link{http://www.site.com/page.php?key1=textcolor{red}{value1}&textit{key2=value2}/textbf{page2}/page3}
end{document}
Thanks.
formatting url
New contributor
add a comment |
I need to remove any type of formatting from a text to get an URL multi-formatting.
By keeping the following model, I have tried various solutions but without having the desired result.
Would anyone know how to find a solution?
newcommand{link}[1]{
%
% ?
%
href{#1_WITHOUT_FORMATTING_AND_COMMANDS}{#1_WITH_FORMATTING}
}
begin{document}
link{http://www.site.com/page.php?key1=textcolor{red}{value1}&textit{key2=value2}/textbf{page2}/page3}
end{document}
Thanks.
formatting url
New contributor
You should define a fixed set of formatting commands for showing a URL, in order to get better consistency across your document. Then you can apply David's suggestion with the set of formatting commands.
– egreg
41 mins ago
add a comment |
I need to remove any type of formatting from a text to get an URL multi-formatting.
By keeping the following model, I have tried various solutions but without having the desired result.
Would anyone know how to find a solution?
newcommand{link}[1]{
%
% ?
%
href{#1_WITHOUT_FORMATTING_AND_COMMANDS}{#1_WITH_FORMATTING}
}
begin{document}
link{http://www.site.com/page.php?key1=textcolor{red}{value1}&textit{key2=value2}/textbf{page2}/page3}
end{document}
Thanks.
formatting url
New contributor
I need to remove any type of formatting from a text to get an URL multi-formatting.
By keeping the following model, I have tried various solutions but without having the desired result.
Would anyone know how to find a solution?
newcommand{link}[1]{
%
% ?
%
href{#1_WITHOUT_FORMATTING_AND_COMMANDS}{#1_WITH_FORMATTING}
}
begin{document}
link{http://www.site.com/page.php?key1=textcolor{red}{value1}&textit{key2=value2}/textbf{page2}/page3}
end{document}
Thanks.
formatting url
formatting url
New contributor
New contributor
New contributor
asked 1 hour ago
BnG
111
111
New contributor
New contributor
You should define a fixed set of formatting commands for showing a URL, in order to get better consistency across your document. Then you can apply David's suggestion with the set of formatting commands.
– egreg
41 mins ago
add a comment |
You should define a fixed set of formatting commands for showing a URL, in order to get better consistency across your document. Then you can apply David's suggestion with the set of formatting commands.
– egreg
41 mins ago
You should define a fixed set of formatting commands for showing a URL, in order to get better consistency across your document. Then you can apply David's suggestion with the set of formatting commands.
– egreg
41 mins ago
You should define a fixed set of formatting commands for showing a URL, in order to get better consistency across your document. Then you can apply David's suggestion with the set of formatting commands.
– egreg
41 mins ago
add a comment |
1 Answer
1
active
oldest
votes
documentclass{article}
usepackage{hyperref,color}
newcommand{link}[1]{%
{%
deftextcolor##1##2{##2}%
deftextbf##1{##1}%
deftextit##1{##1}%
edef&{string&}%
xdeftmp{noexpandhref{#1}}}%
tmp{#1}%
}
begin{document}
link{http://www.site.com/page.php?key1=textcolor{red}{value1}&textit{key2=value2}/textbf{page2}/page3}
end{document}
replacinglink
byurl
in your code (hencelink
definition can also be removed) gives very strange error withmodule
undefined in file supp-pdf.mkii
– jfbu
56 mins ago
any idea about howundefined module
pops out from usingurl
(I did not trace it)
– jfbu
53 mins ago
@jfbu the supp-pdf file gets read with%
not being a comment
– David Carlisle
48 mins ago
indeed, thanks.
– jfbu
46 mins ago
1
I'd prefer the first brace beingbegingroup
and finishing withedeftmp{endgroupnoexpandhref{#1}}tmp{#1}
– egreg
39 mins ago
add a comment |
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
});
}
});
BnG is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f468033%2fhow-i-can-remove-formatting-from-text-and-convert-it-to-url%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
documentclass{article}
usepackage{hyperref,color}
newcommand{link}[1]{%
{%
deftextcolor##1##2{##2}%
deftextbf##1{##1}%
deftextit##1{##1}%
edef&{string&}%
xdeftmp{noexpandhref{#1}}}%
tmp{#1}%
}
begin{document}
link{http://www.site.com/page.php?key1=textcolor{red}{value1}&textit{key2=value2}/textbf{page2}/page3}
end{document}
replacinglink
byurl
in your code (hencelink
definition can also be removed) gives very strange error withmodule
undefined in file supp-pdf.mkii
– jfbu
56 mins ago
any idea about howundefined module
pops out from usingurl
(I did not trace it)
– jfbu
53 mins ago
@jfbu the supp-pdf file gets read with%
not being a comment
– David Carlisle
48 mins ago
indeed, thanks.
– jfbu
46 mins ago
1
I'd prefer the first brace beingbegingroup
and finishing withedeftmp{endgroupnoexpandhref{#1}}tmp{#1}
– egreg
39 mins ago
add a comment |
documentclass{article}
usepackage{hyperref,color}
newcommand{link}[1]{%
{%
deftextcolor##1##2{##2}%
deftextbf##1{##1}%
deftextit##1{##1}%
edef&{string&}%
xdeftmp{noexpandhref{#1}}}%
tmp{#1}%
}
begin{document}
link{http://www.site.com/page.php?key1=textcolor{red}{value1}&textit{key2=value2}/textbf{page2}/page3}
end{document}
replacinglink
byurl
in your code (hencelink
definition can also be removed) gives very strange error withmodule
undefined in file supp-pdf.mkii
– jfbu
56 mins ago
any idea about howundefined module
pops out from usingurl
(I did not trace it)
– jfbu
53 mins ago
@jfbu the supp-pdf file gets read with%
not being a comment
– David Carlisle
48 mins ago
indeed, thanks.
– jfbu
46 mins ago
1
I'd prefer the first brace beingbegingroup
and finishing withedeftmp{endgroupnoexpandhref{#1}}tmp{#1}
– egreg
39 mins ago
add a comment |
documentclass{article}
usepackage{hyperref,color}
newcommand{link}[1]{%
{%
deftextcolor##1##2{##2}%
deftextbf##1{##1}%
deftextit##1{##1}%
edef&{string&}%
xdeftmp{noexpandhref{#1}}}%
tmp{#1}%
}
begin{document}
link{http://www.site.com/page.php?key1=textcolor{red}{value1}&textit{key2=value2}/textbf{page2}/page3}
end{document}
documentclass{article}
usepackage{hyperref,color}
newcommand{link}[1]{%
{%
deftextcolor##1##2{##2}%
deftextbf##1{##1}%
deftextit##1{##1}%
edef&{string&}%
xdeftmp{noexpandhref{#1}}}%
tmp{#1}%
}
begin{document}
link{http://www.site.com/page.php?key1=textcolor{red}{value1}&textit{key2=value2}/textbf{page2}/page3}
end{document}
edited 54 mins ago
answered 1 hour ago
David Carlisle
482k3811141852
482k3811141852
replacinglink
byurl
in your code (hencelink
definition can also be removed) gives very strange error withmodule
undefined in file supp-pdf.mkii
– jfbu
56 mins ago
any idea about howundefined module
pops out from usingurl
(I did not trace it)
– jfbu
53 mins ago
@jfbu the supp-pdf file gets read with%
not being a comment
– David Carlisle
48 mins ago
indeed, thanks.
– jfbu
46 mins ago
1
I'd prefer the first brace beingbegingroup
and finishing withedeftmp{endgroupnoexpandhref{#1}}tmp{#1}
– egreg
39 mins ago
add a comment |
replacinglink
byurl
in your code (hencelink
definition can also be removed) gives very strange error withmodule
undefined in file supp-pdf.mkii
– jfbu
56 mins ago
any idea about howundefined module
pops out from usingurl
(I did not trace it)
– jfbu
53 mins ago
@jfbu the supp-pdf file gets read with%
not being a comment
– David Carlisle
48 mins ago
indeed, thanks.
– jfbu
46 mins ago
1
I'd prefer the first brace beingbegingroup
and finishing withedeftmp{endgroupnoexpandhref{#1}}tmp{#1}
– egreg
39 mins ago
replacing
link
by url
in your code (hence link
definition can also be removed) gives very strange error with module
undefined in file supp-pdf.mkii– jfbu
56 mins ago
replacing
link
by url
in your code (hence link
definition can also be removed) gives very strange error with module
undefined in file supp-pdf.mkii– jfbu
56 mins ago
any idea about how
undefined module
pops out from using url
(I did not trace it)– jfbu
53 mins ago
any idea about how
undefined module
pops out from using url
(I did not trace it)– jfbu
53 mins ago
@jfbu the supp-pdf file gets read with
%
not being a comment– David Carlisle
48 mins ago
@jfbu the supp-pdf file gets read with
%
not being a comment– David Carlisle
48 mins ago
indeed, thanks.
– jfbu
46 mins ago
indeed, thanks.
– jfbu
46 mins ago
1
1
I'd prefer the first brace being
begingroup
and finishing with edeftmp{endgroupnoexpandhref{#1}}tmp{#1}
– egreg
39 mins ago
I'd prefer the first brace being
begingroup
and finishing with edeftmp{endgroupnoexpandhref{#1}}tmp{#1}
– egreg
39 mins ago
add a comment |
BnG is a new contributor. Be nice, and check out our Code of Conduct.
BnG is a new contributor. Be nice, and check out our Code of Conduct.
BnG is a new contributor. Be nice, and check out our Code of Conduct.
BnG 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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f468033%2fhow-i-can-remove-formatting-from-text-and-convert-it-to-url%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
You should define a fixed set of formatting commands for showing a URL, in order to get better consistency across your document. Then you can apply David's suggestion with the set of formatting commands.
– egreg
41 mins ago