Use of linkcolor option in hyperrefoptions for appearance of links in hyperrefI cannot get a (properly)...

What is a term for a function that when called repeatedly, has the same effect as calling once?

What is the difference between a forward slip and a side slip?

Is it possible to make a clamp function shorter than a ternary in JS?

Can we carry rice to Japan?

Can throughput exceed the bandwidth of a network

Non-Italian European mafias in USA?

Dystopian novel where telepathic humans live under a dome

Is the withholding of funding notice allowed?

What happened to QGIS 2.x LTR?

School performs periodic password audits. Is my password compromised?

How can I be pwned if I'm not registered on the compromised site?

Was it really inappropriate to write a pull request for the company I interviewed with?

Get length of the longest sequence of numbers with the same sign

Starting index at zero

When was drinking water recognized as crucial in marathon running?

Plagiarism of code by other PhD student

I can't die. Who am I?

A bug in Excel? Conditional formatting for marking duplicates also highlights unique value

Six real numbers so that product of any five is the sixth one

How to evaluate the limit where something is raised to a power of x?

lead or lag function to get several values, not just the nth

Can I become debt free or should I file for bankruptcy? How do I manage my debt and finances?

The need of reserving one's ability in job interviews

In Adventurer's League, is it possible to keep the Ring of Winter if you manage to acquire it in the Tomb of Annihilation adventure?



Use of linkcolor option in hyperref


options for appearance of links in hyperrefI cannot get a (properly) underlined hyperlink in blueTexmaker Illegal unit of measureFigure reference numbers off by one with cleverefautoref to dmath (from breqn package) generates wrong link textReferencing formula before defining itHow to refer to pgfplot legend labels with hyperref?Possibility to exclude coloring certain links using hyperrefHow to discolor *ONE* particular link/citation in hyperref?Retain hyperref and url links after including multiple PDF files in a collective PDF fileHow can I deactivate hyperref but keep the bookmarks bar?













2















This question is posted as a requested follow-on from options for appearance of links in hyperref , to clear up some odd behaviour in hyperref.



In the snippet below, the two usepackage commands both work, but linkcolor=. throws an error when combined with colorlinks=true (error text shown at end of post).



documentclass{article}

usepackage[colorlinks=true,linkcolor=]{hyperref}
%usepackage[linkcolor=.]{hyperref}

begin{document}

See Figure~ref{fig}

begin{figure}
caption{This is an empty figure label{fig}}
end{figure}
end{document}


If I use the line



usepackage[colorlinks=true,linkcolor=.]{hyperref}


(note the dot), I get error text:




LaTeX Error: Undefined color




and the error comes immediately after the closing brace of ref{}



The effect I wanted to achieve was to remove boxes around links and leave all links text color except actual URLs, so when I used this command I also had urlcolor=blue in the options, but that was not needed to reproduce the error. But the following line did work, in that all links but URLs were invisible:



usepackage[colorlinks=true,urlcolor=blue,linkcolor=]{hyperref}


Using MiKTeX-pdfTeX 2.9.6959 (1.40.20) (MiKTeX 2.9.6960) on Windows 10










share|improve this question




















  • 1





    Add usepackage{xcolor}.

    – Ulrike Fischer
    yesterday











  • Of course you get an error with linkcolor=. as this is setting the colour to ., which is a non-existent colour. SImialrly, with linkcolor= you are remving all colour so the lins are invisible. Doesn't usepackage[colorlinks=true,linkcolor=black]{hyperref} give what you want?

    – Andrew
    yesterday













  • Thank you for your advice to add xcolor. Perhaps hyperref should be loading it? I did not want to assume text was black. linkcolor=. is supposed to match the current text colour. See the discussion linked in the question for context. linkcolor=. works under some circumstances. The dot on its own is not necessarily an error.

    – Dr Darren
    yesterday
















2















This question is posted as a requested follow-on from options for appearance of links in hyperref , to clear up some odd behaviour in hyperref.



In the snippet below, the two usepackage commands both work, but linkcolor=. throws an error when combined with colorlinks=true (error text shown at end of post).



documentclass{article}

usepackage[colorlinks=true,linkcolor=]{hyperref}
%usepackage[linkcolor=.]{hyperref}

begin{document}

See Figure~ref{fig}

begin{figure}
caption{This is an empty figure label{fig}}
end{figure}
end{document}


If I use the line



usepackage[colorlinks=true,linkcolor=.]{hyperref}


(note the dot), I get error text:




LaTeX Error: Undefined color




and the error comes immediately after the closing brace of ref{}



The effect I wanted to achieve was to remove boxes around links and leave all links text color except actual URLs, so when I used this command I also had urlcolor=blue in the options, but that was not needed to reproduce the error. But the following line did work, in that all links but URLs were invisible:



usepackage[colorlinks=true,urlcolor=blue,linkcolor=]{hyperref}


Using MiKTeX-pdfTeX 2.9.6959 (1.40.20) (MiKTeX 2.9.6960) on Windows 10










share|improve this question




















  • 1





    Add usepackage{xcolor}.

    – Ulrike Fischer
    yesterday











  • Of course you get an error with linkcolor=. as this is setting the colour to ., which is a non-existent colour. SImialrly, with linkcolor= you are remving all colour so the lins are invisible. Doesn't usepackage[colorlinks=true,linkcolor=black]{hyperref} give what you want?

    – Andrew
    yesterday













  • Thank you for your advice to add xcolor. Perhaps hyperref should be loading it? I did not want to assume text was black. linkcolor=. is supposed to match the current text colour. See the discussion linked in the question for context. linkcolor=. works under some circumstances. The dot on its own is not necessarily an error.

    – Dr Darren
    yesterday














2












2








2








This question is posted as a requested follow-on from options for appearance of links in hyperref , to clear up some odd behaviour in hyperref.



In the snippet below, the two usepackage commands both work, but linkcolor=. throws an error when combined with colorlinks=true (error text shown at end of post).



documentclass{article}

usepackage[colorlinks=true,linkcolor=]{hyperref}
%usepackage[linkcolor=.]{hyperref}

begin{document}

See Figure~ref{fig}

begin{figure}
caption{This is an empty figure label{fig}}
end{figure}
end{document}


If I use the line



usepackage[colorlinks=true,linkcolor=.]{hyperref}


(note the dot), I get error text:




LaTeX Error: Undefined color




and the error comes immediately after the closing brace of ref{}



The effect I wanted to achieve was to remove boxes around links and leave all links text color except actual URLs, so when I used this command I also had urlcolor=blue in the options, but that was not needed to reproduce the error. But the following line did work, in that all links but URLs were invisible:



usepackage[colorlinks=true,urlcolor=blue,linkcolor=]{hyperref}


Using MiKTeX-pdfTeX 2.9.6959 (1.40.20) (MiKTeX 2.9.6960) on Windows 10










share|improve this question
















This question is posted as a requested follow-on from options for appearance of links in hyperref , to clear up some odd behaviour in hyperref.



In the snippet below, the two usepackage commands both work, but linkcolor=. throws an error when combined with colorlinks=true (error text shown at end of post).



documentclass{article}

usepackage[colorlinks=true,linkcolor=]{hyperref}
%usepackage[linkcolor=.]{hyperref}

begin{document}

See Figure~ref{fig}

begin{figure}
caption{This is an empty figure label{fig}}
end{figure}
end{document}


If I use the line



usepackage[colorlinks=true,linkcolor=.]{hyperref}


(note the dot), I get error text:




LaTeX Error: Undefined color




and the error comes immediately after the closing brace of ref{}



The effect I wanted to achieve was to remove boxes around links and leave all links text color except actual URLs, so when I used this command I also had urlcolor=blue in the options, but that was not needed to reproduce the error. But the following line did work, in that all links but URLs were invisible:



usepackage[colorlinks=true,urlcolor=blue,linkcolor=]{hyperref}


Using MiKTeX-pdfTeX 2.9.6959 (1.40.20) (MiKTeX 2.9.6960) on Windows 10







hyperref






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited yesterday









AndréC

9,71311547




9,71311547










asked yesterday









Dr DarrenDr Darren

293




293








  • 1





    Add usepackage{xcolor}.

    – Ulrike Fischer
    yesterday











  • Of course you get an error with linkcolor=. as this is setting the colour to ., which is a non-existent colour. SImialrly, with linkcolor= you are remving all colour so the lins are invisible. Doesn't usepackage[colorlinks=true,linkcolor=black]{hyperref} give what you want?

    – Andrew
    yesterday













  • Thank you for your advice to add xcolor. Perhaps hyperref should be loading it? I did not want to assume text was black. linkcolor=. is supposed to match the current text colour. See the discussion linked in the question for context. linkcolor=. works under some circumstances. The dot on its own is not necessarily an error.

    – Dr Darren
    yesterday














  • 1





    Add usepackage{xcolor}.

    – Ulrike Fischer
    yesterday











  • Of course you get an error with linkcolor=. as this is setting the colour to ., which is a non-existent colour. SImialrly, with linkcolor= you are remving all colour so the lins are invisible. Doesn't usepackage[colorlinks=true,linkcolor=black]{hyperref} give what you want?

    – Andrew
    yesterday













  • Thank you for your advice to add xcolor. Perhaps hyperref should be loading it? I did not want to assume text was black. linkcolor=. is supposed to match the current text colour. See the discussion linked in the question for context. linkcolor=. works under some circumstances. The dot on its own is not necessarily an error.

    – Dr Darren
    yesterday








1




1





Add usepackage{xcolor}.

– Ulrike Fischer
yesterday





Add usepackage{xcolor}.

– Ulrike Fischer
yesterday













Of course you get an error with linkcolor=. as this is setting the colour to ., which is a non-existent colour. SImialrly, with linkcolor= you are remving all colour so the lins are invisible. Doesn't usepackage[colorlinks=true,linkcolor=black]{hyperref} give what you want?

– Andrew
yesterday







Of course you get an error with linkcolor=. as this is setting the colour to ., which is a non-existent colour. SImialrly, with linkcolor= you are remving all colour so the lins are invisible. Doesn't usepackage[colorlinks=true,linkcolor=black]{hyperref} give what you want?

– Andrew
yesterday















Thank you for your advice to add xcolor. Perhaps hyperref should be loading it? I did not want to assume text was black. linkcolor=. is supposed to match the current text colour. See the discussion linked in the question for context. linkcolor=. works under some circumstances. The dot on its own is not necessarily an error.

– Dr Darren
yesterday





Thank you for your advice to add xcolor. Perhaps hyperref should be loading it? I did not want to assume text was black. linkcolor=. is supposed to match the current text colour. See the discussion linked in the question for context. linkcolor=. works under some circumstances. The dot on its own is not necessarily an error.

– Dr Darren
yesterday










2 Answers
2






active

oldest

votes


















5














linkcolor=. causes hyperref to issue color{.}



which produces



LaTeX Error: Undefined color `.'


as there is no colour of that name using the standard color package as loaded by hyperref.



You are possibly thinking of the xcolor package syntax wher . means the current color



usepackage{xcolor}
usepackage[colorlinks=true,linkcolor=.]{hyperref}


works, although specifying coloured links this way seems slightly strange choice rather than just specifying the link border to have width 0.






share|improve this answer
























  • Strange to you. Seemed reasonable to me, with my lack of experience. I didn't want a border, so saying 'colour it instead' and then making the colour like the text seemed reasonable to me.

    – Dr Darren
    yesterday






  • 2





    @DrDarren there is some cost to adding a colour, the resulting pdf will have code to push a colour on to the stack and restore it, just using the current colour, conversely a pdf link always has a border attribute so setting its width to 0 (pdfborder= 0 0 0) is a far more direct and lightweight way of specifyng this

    – David Carlisle
    yesterday











  • Thank you for that advice. All I can say is that I did what I did as a naïve user and to me it seemed logical. It is great to have so much expertise out there, and people willing to give their expertise. I wanted one kind of link to be blue and the rest invisible. Many thanks.

    – Dr Darren
    9 hours ago



















0














To sum up, as noted above, adding



usepackage{xcolor}



fixes the problem with using the dot in the hyperref options. There are other ways of getting the result I wanted that also do not throw errors; thanks to other posters.



Perhaps hyperref should load xcolor instead of color?






share|improve this answer























    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%2f477785%2fuse-of-linkcolor-option-in-hyperref%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









    5














    linkcolor=. causes hyperref to issue color{.}



    which produces



    LaTeX Error: Undefined color `.'


    as there is no colour of that name using the standard color package as loaded by hyperref.



    You are possibly thinking of the xcolor package syntax wher . means the current color



    usepackage{xcolor}
    usepackage[colorlinks=true,linkcolor=.]{hyperref}


    works, although specifying coloured links this way seems slightly strange choice rather than just specifying the link border to have width 0.






    share|improve this answer
























    • Strange to you. Seemed reasonable to me, with my lack of experience. I didn't want a border, so saying 'colour it instead' and then making the colour like the text seemed reasonable to me.

      – Dr Darren
      yesterday






    • 2





      @DrDarren there is some cost to adding a colour, the resulting pdf will have code to push a colour on to the stack and restore it, just using the current colour, conversely a pdf link always has a border attribute so setting its width to 0 (pdfborder= 0 0 0) is a far more direct and lightweight way of specifyng this

      – David Carlisle
      yesterday











    • Thank you for that advice. All I can say is that I did what I did as a naïve user and to me it seemed logical. It is great to have so much expertise out there, and people willing to give their expertise. I wanted one kind of link to be blue and the rest invisible. Many thanks.

      – Dr Darren
      9 hours ago
















    5














    linkcolor=. causes hyperref to issue color{.}



    which produces



    LaTeX Error: Undefined color `.'


    as there is no colour of that name using the standard color package as loaded by hyperref.



    You are possibly thinking of the xcolor package syntax wher . means the current color



    usepackage{xcolor}
    usepackage[colorlinks=true,linkcolor=.]{hyperref}


    works, although specifying coloured links this way seems slightly strange choice rather than just specifying the link border to have width 0.






    share|improve this answer
























    • Strange to you. Seemed reasonable to me, with my lack of experience. I didn't want a border, so saying 'colour it instead' and then making the colour like the text seemed reasonable to me.

      – Dr Darren
      yesterday






    • 2





      @DrDarren there is some cost to adding a colour, the resulting pdf will have code to push a colour on to the stack and restore it, just using the current colour, conversely a pdf link always has a border attribute so setting its width to 0 (pdfborder= 0 0 0) is a far more direct and lightweight way of specifyng this

      – David Carlisle
      yesterday











    • Thank you for that advice. All I can say is that I did what I did as a naïve user and to me it seemed logical. It is great to have so much expertise out there, and people willing to give their expertise. I wanted one kind of link to be blue and the rest invisible. Many thanks.

      – Dr Darren
      9 hours ago














    5












    5








    5







    linkcolor=. causes hyperref to issue color{.}



    which produces



    LaTeX Error: Undefined color `.'


    as there is no colour of that name using the standard color package as loaded by hyperref.



    You are possibly thinking of the xcolor package syntax wher . means the current color



    usepackage{xcolor}
    usepackage[colorlinks=true,linkcolor=.]{hyperref}


    works, although specifying coloured links this way seems slightly strange choice rather than just specifying the link border to have width 0.






    share|improve this answer













    linkcolor=. causes hyperref to issue color{.}



    which produces



    LaTeX Error: Undefined color `.'


    as there is no colour of that name using the standard color package as loaded by hyperref.



    You are possibly thinking of the xcolor package syntax wher . means the current color



    usepackage{xcolor}
    usepackage[colorlinks=true,linkcolor=.]{hyperref}


    works, although specifying coloured links this way seems slightly strange choice rather than just specifying the link border to have width 0.







    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered yesterday









    David CarlisleDavid Carlisle

    493k4111371885




    493k4111371885













    • Strange to you. Seemed reasonable to me, with my lack of experience. I didn't want a border, so saying 'colour it instead' and then making the colour like the text seemed reasonable to me.

      – Dr Darren
      yesterday






    • 2





      @DrDarren there is some cost to adding a colour, the resulting pdf will have code to push a colour on to the stack and restore it, just using the current colour, conversely a pdf link always has a border attribute so setting its width to 0 (pdfborder= 0 0 0) is a far more direct and lightweight way of specifyng this

      – David Carlisle
      yesterday











    • Thank you for that advice. All I can say is that I did what I did as a naïve user and to me it seemed logical. It is great to have so much expertise out there, and people willing to give their expertise. I wanted one kind of link to be blue and the rest invisible. Many thanks.

      – Dr Darren
      9 hours ago



















    • Strange to you. Seemed reasonable to me, with my lack of experience. I didn't want a border, so saying 'colour it instead' and then making the colour like the text seemed reasonable to me.

      – Dr Darren
      yesterday






    • 2





      @DrDarren there is some cost to adding a colour, the resulting pdf will have code to push a colour on to the stack and restore it, just using the current colour, conversely a pdf link always has a border attribute so setting its width to 0 (pdfborder= 0 0 0) is a far more direct and lightweight way of specifyng this

      – David Carlisle
      yesterday











    • Thank you for that advice. All I can say is that I did what I did as a naïve user and to me it seemed logical. It is great to have so much expertise out there, and people willing to give their expertise. I wanted one kind of link to be blue and the rest invisible. Many thanks.

      – Dr Darren
      9 hours ago

















    Strange to you. Seemed reasonable to me, with my lack of experience. I didn't want a border, so saying 'colour it instead' and then making the colour like the text seemed reasonable to me.

    – Dr Darren
    yesterday





    Strange to you. Seemed reasonable to me, with my lack of experience. I didn't want a border, so saying 'colour it instead' and then making the colour like the text seemed reasonable to me.

    – Dr Darren
    yesterday




    2




    2





    @DrDarren there is some cost to adding a colour, the resulting pdf will have code to push a colour on to the stack and restore it, just using the current colour, conversely a pdf link always has a border attribute so setting its width to 0 (pdfborder= 0 0 0) is a far more direct and lightweight way of specifyng this

    – David Carlisle
    yesterday





    @DrDarren there is some cost to adding a colour, the resulting pdf will have code to push a colour on to the stack and restore it, just using the current colour, conversely a pdf link always has a border attribute so setting its width to 0 (pdfborder= 0 0 0) is a far more direct and lightweight way of specifyng this

    – David Carlisle
    yesterday













    Thank you for that advice. All I can say is that I did what I did as a naïve user and to me it seemed logical. It is great to have so much expertise out there, and people willing to give their expertise. I wanted one kind of link to be blue and the rest invisible. Many thanks.

    – Dr Darren
    9 hours ago





    Thank you for that advice. All I can say is that I did what I did as a naïve user and to me it seemed logical. It is great to have so much expertise out there, and people willing to give their expertise. I wanted one kind of link to be blue and the rest invisible. Many thanks.

    – Dr Darren
    9 hours ago











    0














    To sum up, as noted above, adding



    usepackage{xcolor}



    fixes the problem with using the dot in the hyperref options. There are other ways of getting the result I wanted that also do not throw errors; thanks to other posters.



    Perhaps hyperref should load xcolor instead of color?






    share|improve this answer




























      0














      To sum up, as noted above, adding



      usepackage{xcolor}



      fixes the problem with using the dot in the hyperref options. There are other ways of getting the result I wanted that also do not throw errors; thanks to other posters.



      Perhaps hyperref should load xcolor instead of color?






      share|improve this answer


























        0












        0








        0







        To sum up, as noted above, adding



        usepackage{xcolor}



        fixes the problem with using the dot in the hyperref options. There are other ways of getting the result I wanted that also do not throw errors; thanks to other posters.



        Perhaps hyperref should load xcolor instead of color?






        share|improve this answer













        To sum up, as noted above, adding



        usepackage{xcolor}



        fixes the problem with using the dot in the hyperref options. There are other ways of getting the result I wanted that also do not throw errors; thanks to other posters.



        Perhaps hyperref should load xcolor instead of color?







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered yesterday









        Dr DarrenDr Darren

        293




        293






























            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%2f477785%2fuse-of-linkcolor-option-in-hyperref%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 /...