Illegal parameter number in definition Unicorn Meta Zoo #1: Why another podcast? ...

How to keep bees out of canned beverages?

How much of a wave function must reside inside event horizon for it to be consumed by the black hole?

When do you need buffers/drivers on buses in a microprocessor design?

What is the term for a person whose job is to place products on shelves in stores?

Contradiction proof for inequality of P and NP?

Why must Chinese maps be obfuscated?

std::unique_ptr of base class holding reference of derived class does not show warning in gcc compiler while naked pointer shows it. Why?

How to not starve gigantic beasts

Is there any pythonic way to find average of specific tuple elements in array?

Is there metaphorical meaning of "aus der Haft entlassen"?

finding a tangent line to a parabola

Why did C use the -> operator instead of reusing the . operator?

My admission is revoked after accepting the admission offer

Scheduling based problem

How to open locks without disable device?

Why do games have consumables?

Will I lose my paid in full property

A faster way to compute the largest prime factor

Did the Roman Empire have penal colonies?

What to do with someone that cheated their way through university and a PhD program?

Was Dennis Ritchie being too modest in this quote about C and Pascal?

Drawing a german abacus as in the books of Adam Ries

Do I need to watch Ant-Man and the Wasp and Captain Marvel before watching Avengers: Endgame?

First instead of 1 when referencing



Illegal parameter number in definition



Unicorn Meta Zoo #1: Why another podcast?
Announcing the arrival of Valued Associate #679: Cesar ManaraHow to style text in hyperref url?“Illegal parameter number” errors, in a macro for writing macro definitions to a fileIllegal parameter number with docsvlistWhy do I get the error “! Illegal parameter number in definition of appendix.”while redefining the appendix command?Issue wrapping a titlesec titleformat in a newcommandIllegal parameter when nesting commandsProblem with underscores in newcommandEmpty parameter in xdef definitionHow to fix Illegal parameter number in definition of a new Tikz command?Illegal parameter number in definition of in a macro that doesn't haveusing newcommand with immediatewrite inside beamer












0















I found a nice solution to edit the look of hyperlinks, but I have another problem:



documentclass{article}

usepackage{hyperref}
newcommand{link}[1]{href{#1}{#1}}

begin{document}

% error: Illegal parameter number in definition of Hy@tempa. ...tes/guides/collections/designfaq.html#a14}
link{https://docs.oracle.com/javase/8/docs/technotes/guides/collections/designfaq.html#a14}
% href{https://docs.oracle.com/javase/8/docs/technotes/guides/collections/designfaq.html#a14}{Test}

end{document}


Why does link{...} not work? Exact the same url does work with href{...}{...}.



Thank you for your help!!









share


















  • 1





    You have url for this

    – JouleV
    5 mins ago






  • 1





    You shouldn't put a full url in an argument. hyperref then no longer can do its catcode magic. There is a reason why the "nice" solution got only one upvote, and my answer got accepted.

    – Ulrike Fischer
    1 min ago











  • If you replace the # in the URL by # it works.

    – marmot
    1 min ago
















0















I found a nice solution to edit the look of hyperlinks, but I have another problem:



documentclass{article}

usepackage{hyperref}
newcommand{link}[1]{href{#1}{#1}}

begin{document}

% error: Illegal parameter number in definition of Hy@tempa. ...tes/guides/collections/designfaq.html#a14}
link{https://docs.oracle.com/javase/8/docs/technotes/guides/collections/designfaq.html#a14}
% href{https://docs.oracle.com/javase/8/docs/technotes/guides/collections/designfaq.html#a14}{Test}

end{document}


Why does link{...} not work? Exact the same url does work with href{...}{...}.



Thank you for your help!!









share


















  • 1





    You have url for this

    – JouleV
    5 mins ago






  • 1





    You shouldn't put a full url in an argument. hyperref then no longer can do its catcode magic. There is a reason why the "nice" solution got only one upvote, and my answer got accepted.

    – Ulrike Fischer
    1 min ago











  • If you replace the # in the URL by # it works.

    – marmot
    1 min ago














0












0








0








I found a nice solution to edit the look of hyperlinks, but I have another problem:



documentclass{article}

usepackage{hyperref}
newcommand{link}[1]{href{#1}{#1}}

begin{document}

% error: Illegal parameter number in definition of Hy@tempa. ...tes/guides/collections/designfaq.html#a14}
link{https://docs.oracle.com/javase/8/docs/technotes/guides/collections/designfaq.html#a14}
% href{https://docs.oracle.com/javase/8/docs/technotes/guides/collections/designfaq.html#a14}{Test}

end{document}


Why does link{...} not work? Exact the same url does work with href{...}{...}.



Thank you for your help!!









share














I found a nice solution to edit the look of hyperlinks, but I have another problem:



documentclass{article}

usepackage{hyperref}
newcommand{link}[1]{href{#1}{#1}}

begin{document}

% error: Illegal parameter number in definition of Hy@tempa. ...tes/guides/collections/designfaq.html#a14}
link{https://docs.oracle.com/javase/8/docs/technotes/guides/collections/designfaq.html#a14}
% href{https://docs.oracle.com/javase/8/docs/technotes/guides/collections/designfaq.html#a14}{Test}

end{document}


Why does link{...} not work? Exact the same url does work with href{...}{...}.



Thank you for your help!!







macros





share












share










share



share










asked 6 mins ago









mrbelamrbela

4751312




4751312








  • 1





    You have url for this

    – JouleV
    5 mins ago






  • 1





    You shouldn't put a full url in an argument. hyperref then no longer can do its catcode magic. There is a reason why the "nice" solution got only one upvote, and my answer got accepted.

    – Ulrike Fischer
    1 min ago











  • If you replace the # in the URL by # it works.

    – marmot
    1 min ago














  • 1





    You have url for this

    – JouleV
    5 mins ago






  • 1





    You shouldn't put a full url in an argument. hyperref then no longer can do its catcode magic. There is a reason why the "nice" solution got only one upvote, and my answer got accepted.

    – Ulrike Fischer
    1 min ago











  • If you replace the # in the URL by # it works.

    – marmot
    1 min ago








1




1





You have url for this

– JouleV
5 mins ago





You have url for this

– JouleV
5 mins ago




1




1





You shouldn't put a full url in an argument. hyperref then no longer can do its catcode magic. There is a reason why the "nice" solution got only one upvote, and my answer got accepted.

– Ulrike Fischer
1 min ago





You shouldn't put a full url in an argument. hyperref then no longer can do its catcode magic. There is a reason why the "nice" solution got only one upvote, and my answer got accepted.

– Ulrike Fischer
1 min ago













If you replace the # in the URL by # it works.

– marmot
1 min ago





If you replace the # in the URL by # it works.

– marmot
1 min ago










1 Answer
1






active

oldest

votes


















1














Why don't use



documentclass{article}

usepackage{hyperref}

begin{document}
url{https://docs.oracle.com/javase/8/docs/technotes/guides/collections/designfaq.html#a14}
end{document}


But take care! Shorten your link or use href with a good description, because such a long link makes the document looks bad.





share
























    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
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f487566%2fillegal-parameter-number-in-definition%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









    1














    Why don't use



    documentclass{article}

    usepackage{hyperref}

    begin{document}
    url{https://docs.oracle.com/javase/8/docs/technotes/guides/collections/designfaq.html#a14}
    end{document}


    But take care! Shorten your link or use href with a good description, because such a long link makes the document looks bad.





    share




























      1














      Why don't use



      documentclass{article}

      usepackage{hyperref}

      begin{document}
      url{https://docs.oracle.com/javase/8/docs/technotes/guides/collections/designfaq.html#a14}
      end{document}


      But take care! Shorten your link or use href with a good description, because such a long link makes the document looks bad.





      share


























        1












        1








        1







        Why don't use



        documentclass{article}

        usepackage{hyperref}

        begin{document}
        url{https://docs.oracle.com/javase/8/docs/technotes/guides/collections/designfaq.html#a14}
        end{document}


        But take care! Shorten your link or use href with a good description, because such a long link makes the document looks bad.





        share













        Why don't use



        documentclass{article}

        usepackage{hyperref}

        begin{document}
        url{https://docs.oracle.com/javase/8/docs/technotes/guides/collections/designfaq.html#a14}
        end{document}


        But take care! Shorten your link or use href with a good description, because such a long link makes the document looks bad.






        share











        share


        share










        answered 2 mins ago









        JouleVJouleV

        15.7k22667




        15.7k22667






























            draft saved

            draft discarded




















































            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.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f487566%2fillegal-parameter-number-in-definition%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

            Why does my Macbook overheat and use so much CPU and energy when on YouTube?Why do so many insist on using...

            How to prevent page numbers from appearing on glossaries?How to remove a dot and a page number in the...

            Puerta de Hutt Referencias Enlaces externos Menú de navegación15°58′00″S 5°42′00″O /...