How can my LaTeX files detect if they're being compiled on Overleaf?How can I test if a document is being compiled by XeLaTeX?How can I fix `amssymb` in wsu in overleafHow can I write a big set in overleafCross-referencing between two files in overleafWhere do I find aux files in Overleaf?How can I transfer from using IEEEconf in Overleaf to ShareLaTeX?Syncing Overleaf to access .tex files in DropboxHow do I push a pdf from Overleaf to GitHub?Overleaf cannot render any LaTexOverleaf V2 - How to get BBL File?

What options are left, if Britain cannot decide?

Recruiter wants very extensive technical details about all of my previous work

Sailing the cryptic seas

What is the rarity of this homebrew magic staff?

In a future war, an old lady is trying to raise a boy but one of the weapons has made everyone deaf

PTIJ: Who should I vote for? (21st Knesset Edition)

Use of undefined constant bloginfo

What approach do we need to follow for projects without a test environment?

Is it normal that my co-workers at a fitness company criticize my food choices?

Time travel from stationary position?

Are there other languages, besides English, where the indefinite (or definite) article varies based on sound?

What exactly is this small puffer fish doing and how did it manage to accomplish such a feat?

AG Cluster db upgrade by vendor

Can a druid choose the size of its wild shape beast?

What are substitutions for coconut in curry?

Professor being mistaken for a grad student

Site Collection Administrator has left the building

Employee lack of ownership

Life insurance that covers only simultaneous/dual deaths

Existence of subset with given Hausdorff dimension

Why is the BSI not using powers of two?

Do the common programs (for example: "ls", "cat") in Linux and BSD come from the same source code?

Are ETF trackers fundamentally better than individual stocks?

newcommand: Combine (optional) star and optional parameter



How can my LaTeX files detect if they're being compiled on Overleaf?


How can I test if a document is being compiled by XeLaTeX?How can I fix `amssymb` in wsu in overleafHow can I write a big set in overleafCross-referencing between two files in overleafWhere do I find aux files in Overleaf?How can I transfer from using IEEEconf in Overleaf to ShareLaTeX?Syncing Overleaf to access .tex files in DropboxHow do I push a pdf from Overleaf to GitHub?Overleaf cannot render any LaTexOverleaf V2 - How to get BBL File?













5















I have a LaTeX file that executes an external shell command to get some information; this works on my local machine but fails on Overleaf. That's okay, not a big deal—if I can wrap the code in an if-then conditional that checks if it's executing on Overleaf.



Problem: how can I make my LaTeX code check if being run on Overleaf?



Clarification added 2017-07-31: I already know how to test for shell escapes, and conditionalize my code appropriately. The problem is not whether shell escapes work; the problem is really about testing for Overleaf versus other environments.










share|improve this question



















  • 1





    surely you don't want o know if it's on overleaf but if shell escape is enabled?, which you can test for the integer value of pdfshellescape or shellescape or in lua status.shell_escape dependin on the tex flavour in use.

    – David Carlisle
    Jul 31 '17 at 7:28











  • No; in fact, shell escapes do work, and I already test for that in my code. But the command involves getting information using git, and this works differently in my local environment versus in Overleaf. I have given up trying to figure out why the command fails. I just want to skip the whole thing when running on Overleaf.

    – mhucka
    Jul 31 '17 at 15:01











  • oh in that case you could shell escape and look at the environment variables, surely overleaf must have some environment variable set with a distinguished value?

    – David Carlisle
    Jul 31 '17 at 15:28











  • That would work, but I have not found anything relevant in their documentation so far. I was hoping someone here would have already done something like this and knew the answer.

    – mhucka
    Jul 31 '17 at 15:31











  • just look at the output of the command env and pick one:-)

    – David Carlisle
    Jul 31 '17 at 15:33















5















I have a LaTeX file that executes an external shell command to get some information; this works on my local machine but fails on Overleaf. That's okay, not a big deal—if I can wrap the code in an if-then conditional that checks if it's executing on Overleaf.



Problem: how can I make my LaTeX code check if being run on Overleaf?



Clarification added 2017-07-31: I already know how to test for shell escapes, and conditionalize my code appropriately. The problem is not whether shell escapes work; the problem is really about testing for Overleaf versus other environments.










share|improve this question



















  • 1





    surely you don't want o know if it's on overleaf but if shell escape is enabled?, which you can test for the integer value of pdfshellescape or shellescape or in lua status.shell_escape dependin on the tex flavour in use.

    – David Carlisle
    Jul 31 '17 at 7:28











  • No; in fact, shell escapes do work, and I already test for that in my code. But the command involves getting information using git, and this works differently in my local environment versus in Overleaf. I have given up trying to figure out why the command fails. I just want to skip the whole thing when running on Overleaf.

    – mhucka
    Jul 31 '17 at 15:01











  • oh in that case you could shell escape and look at the environment variables, surely overleaf must have some environment variable set with a distinguished value?

    – David Carlisle
    Jul 31 '17 at 15:28











  • That would work, but I have not found anything relevant in their documentation so far. I was hoping someone here would have already done something like this and knew the answer.

    – mhucka
    Jul 31 '17 at 15:31











  • just look at the output of the command env and pick one:-)

    – David Carlisle
    Jul 31 '17 at 15:33













5












5








5


1






I have a LaTeX file that executes an external shell command to get some information; this works on my local machine but fails on Overleaf. That's okay, not a big deal—if I can wrap the code in an if-then conditional that checks if it's executing on Overleaf.



Problem: how can I make my LaTeX code check if being run on Overleaf?



Clarification added 2017-07-31: I already know how to test for shell escapes, and conditionalize my code appropriately. The problem is not whether shell escapes work; the problem is really about testing for Overleaf versus other environments.










share|improve this question
















I have a LaTeX file that executes an external shell command to get some information; this works on my local machine but fails on Overleaf. That's okay, not a big deal—if I can wrap the code in an if-then conditional that checks if it's executing on Overleaf.



Problem: how can I make my LaTeX code check if being run on Overleaf?



Clarification added 2017-07-31: I already know how to test for shell escapes, and conditionalize my code appropriately. The problem is not whether shell escapes work; the problem is really about testing for Overleaf versus other environments.







conditionals overleaf






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jul 31 '17 at 15:08







mhucka

















asked Jul 31 '17 at 4:36









mhuckamhucka

285311




285311







  • 1





    surely you don't want o know if it's on overleaf but if shell escape is enabled?, which you can test for the integer value of pdfshellescape or shellescape or in lua status.shell_escape dependin on the tex flavour in use.

    – David Carlisle
    Jul 31 '17 at 7:28











  • No; in fact, shell escapes do work, and I already test for that in my code. But the command involves getting information using git, and this works differently in my local environment versus in Overleaf. I have given up trying to figure out why the command fails. I just want to skip the whole thing when running on Overleaf.

    – mhucka
    Jul 31 '17 at 15:01











  • oh in that case you could shell escape and look at the environment variables, surely overleaf must have some environment variable set with a distinguished value?

    – David Carlisle
    Jul 31 '17 at 15:28











  • That would work, but I have not found anything relevant in their documentation so far. I was hoping someone here would have already done something like this and knew the answer.

    – mhucka
    Jul 31 '17 at 15:31











  • just look at the output of the command env and pick one:-)

    – David Carlisle
    Jul 31 '17 at 15:33












  • 1





    surely you don't want o know if it's on overleaf but if shell escape is enabled?, which you can test for the integer value of pdfshellescape or shellescape or in lua status.shell_escape dependin on the tex flavour in use.

    – David Carlisle
    Jul 31 '17 at 7:28











  • No; in fact, shell escapes do work, and I already test for that in my code. But the command involves getting information using git, and this works differently in my local environment versus in Overleaf. I have given up trying to figure out why the command fails. I just want to skip the whole thing when running on Overleaf.

    – mhucka
    Jul 31 '17 at 15:01











  • oh in that case you could shell escape and look at the environment variables, surely overleaf must have some environment variable set with a distinguished value?

    – David Carlisle
    Jul 31 '17 at 15:28











  • That would work, but I have not found anything relevant in their documentation so far. I was hoping someone here would have already done something like this and knew the answer.

    – mhucka
    Jul 31 '17 at 15:31











  • just look at the output of the command env and pick one:-)

    – David Carlisle
    Jul 31 '17 at 15:33







1




1





surely you don't want o know if it's on overleaf but if shell escape is enabled?, which you can test for the integer value of pdfshellescape or shellescape or in lua status.shell_escape dependin on the tex flavour in use.

– David Carlisle
Jul 31 '17 at 7:28





surely you don't want o know if it's on overleaf but if shell escape is enabled?, which you can test for the integer value of pdfshellescape or shellescape or in lua status.shell_escape dependin on the tex flavour in use.

– David Carlisle
Jul 31 '17 at 7:28













No; in fact, shell escapes do work, and I already test for that in my code. But the command involves getting information using git, and this works differently in my local environment versus in Overleaf. I have given up trying to figure out why the command fails. I just want to skip the whole thing when running on Overleaf.

– mhucka
Jul 31 '17 at 15:01





No; in fact, shell escapes do work, and I already test for that in my code. But the command involves getting information using git, and this works differently in my local environment versus in Overleaf. I have given up trying to figure out why the command fails. I just want to skip the whole thing when running on Overleaf.

– mhucka
Jul 31 '17 at 15:01













oh in that case you could shell escape and look at the environment variables, surely overleaf must have some environment variable set with a distinguished value?

– David Carlisle
Jul 31 '17 at 15:28





oh in that case you could shell escape and look at the environment variables, surely overleaf must have some environment variable set with a distinguished value?

– David Carlisle
Jul 31 '17 at 15:28













That would work, but I have not found anything relevant in their documentation so far. I was hoping someone here would have already done something like this and knew the answer.

– mhucka
Jul 31 '17 at 15:31





That would work, but I have not found anything relevant in their documentation so far. I was hoping someone here would have already done something like this and knew the answer.

– mhucka
Jul 31 '17 at 15:31













just look at the output of the command env and pick one:-)

– David Carlisle
Jul 31 '17 at 15:33





just look at the output of the command env and pick one:-)

– David Carlisle
Jul 31 '17 at 15:33










2 Answers
2






active

oldest

votes


















4














I think the simplest solution is to determine the home path used by Overleaf and test against that. It's unlikely to match your local home path.



To find Overleaf's home path:



documentclassarticle

makeatletter
begingroupendlinechar=-1relax
everyeofnoexpand%
edefxendgroupdefnoexpandhomepath"kpsewhich --var-value=HOME" x
makeatother

begindocument
HOME: texttthomepath.

enddocument


Then copy the resulting path and test against that:



documentclassarticle

makeatletter
begingroupendlinechar=-1relax
everyeofnoexpand%
edefxendgroupdefnoexpandhomepath"kpsewhich --var-value=HOME" x
makeatother

defoverleafhome/home/whatever% change as appropriate

begindocument
ifxhomepathoverleafhome
Overleaf.
else
Not Overleaf.
fi

enddocument





share|improve this answer


















  • 1





    I used this approach. Based on some testing, that path on Overleaf appears to be /home/wl. Thank you very much for this solution.

    – mhucka
    Aug 7 '17 at 20:00











  • Addendum: I examined other environment variables, per David Carlisle's comments at the top. Unfortunately, no other variable other than HOME seemed safe enough to use (in the sense that I couldn't be sure a collaborator would get the expected behavior if the used the files in their local environment).

    – mhucka
    Aug 7 '17 at 20:02


















0














The solution works well with overleaf and a linux machine, but it doesn't work with windows due to the backslash in the path. Under windows (miktex), an



! Undefined control sequence.
l.1 C:Users


error occurs.



I believe in @@input|"kpsewhich --var-value=HOME" the backslashes need to be escaped, but I couldn't figure out how. Does anyone know how to solve this?





share








New contributor




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



















    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%2f384066%2fhow-can-my-latex-files-detect-if-theyre-being-compiled-on-overleaf%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









    4














    I think the simplest solution is to determine the home path used by Overleaf and test against that. It's unlikely to match your local home path.



    To find Overleaf's home path:



    documentclassarticle

    makeatletter
    begingroupendlinechar=-1relax
    everyeofnoexpand%
    edefxendgroupdefnoexpandhomepath"kpsewhich --var-value=HOME" x
    makeatother

    begindocument
    HOME: texttthomepath.

    enddocument


    Then copy the resulting path and test against that:



    documentclassarticle

    makeatletter
    begingroupendlinechar=-1relax
    everyeofnoexpand%
    edefxendgroupdefnoexpandhomepath"kpsewhich --var-value=HOME" x
    makeatother

    defoverleafhome/home/whatever% change as appropriate

    begindocument
    ifxhomepathoverleafhome
    Overleaf.
    else
    Not Overleaf.
    fi

    enddocument





    share|improve this answer


















    • 1





      I used this approach. Based on some testing, that path on Overleaf appears to be /home/wl. Thank you very much for this solution.

      – mhucka
      Aug 7 '17 at 20:00











    • Addendum: I examined other environment variables, per David Carlisle's comments at the top. Unfortunately, no other variable other than HOME seemed safe enough to use (in the sense that I couldn't be sure a collaborator would get the expected behavior if the used the files in their local environment).

      – mhucka
      Aug 7 '17 at 20:02















    4














    I think the simplest solution is to determine the home path used by Overleaf and test against that. It's unlikely to match your local home path.



    To find Overleaf's home path:



    documentclassarticle

    makeatletter
    begingroupendlinechar=-1relax
    everyeofnoexpand%
    edefxendgroupdefnoexpandhomepath"kpsewhich --var-value=HOME" x
    makeatother

    begindocument
    HOME: texttthomepath.

    enddocument


    Then copy the resulting path and test against that:



    documentclassarticle

    makeatletter
    begingroupendlinechar=-1relax
    everyeofnoexpand%
    edefxendgroupdefnoexpandhomepath"kpsewhich --var-value=HOME" x
    makeatother

    defoverleafhome/home/whatever% change as appropriate

    begindocument
    ifxhomepathoverleafhome
    Overleaf.
    else
    Not Overleaf.
    fi

    enddocument





    share|improve this answer


















    • 1





      I used this approach. Based on some testing, that path on Overleaf appears to be /home/wl. Thank you very much for this solution.

      – mhucka
      Aug 7 '17 at 20:00











    • Addendum: I examined other environment variables, per David Carlisle's comments at the top. Unfortunately, no other variable other than HOME seemed safe enough to use (in the sense that I couldn't be sure a collaborator would get the expected behavior if the used the files in their local environment).

      – mhucka
      Aug 7 '17 at 20:02













    4












    4








    4







    I think the simplest solution is to determine the home path used by Overleaf and test against that. It's unlikely to match your local home path.



    To find Overleaf's home path:



    documentclassarticle

    makeatletter
    begingroupendlinechar=-1relax
    everyeofnoexpand%
    edefxendgroupdefnoexpandhomepath"kpsewhich --var-value=HOME" x
    makeatother

    begindocument
    HOME: texttthomepath.

    enddocument


    Then copy the resulting path and test against that:



    documentclassarticle

    makeatletter
    begingroupendlinechar=-1relax
    everyeofnoexpand%
    edefxendgroupdefnoexpandhomepath"kpsewhich --var-value=HOME" x
    makeatother

    defoverleafhome/home/whatever% change as appropriate

    begindocument
    ifxhomepathoverleafhome
    Overleaf.
    else
    Not Overleaf.
    fi

    enddocument





    share|improve this answer













    I think the simplest solution is to determine the home path used by Overleaf and test against that. It's unlikely to match your local home path.



    To find Overleaf's home path:



    documentclassarticle

    makeatletter
    begingroupendlinechar=-1relax
    everyeofnoexpand%
    edefxendgroupdefnoexpandhomepath"kpsewhich --var-value=HOME" x
    makeatother

    begindocument
    HOME: texttthomepath.

    enddocument


    Then copy the resulting path and test against that:



    documentclassarticle

    makeatletter
    begingroupendlinechar=-1relax
    everyeofnoexpand%
    edefxendgroupdefnoexpandhomepath"kpsewhich --var-value=HOME" x
    makeatother

    defoverleafhome/home/whatever% change as appropriate

    begindocument
    ifxhomepathoverleafhome
    Overleaf.
    else
    Not Overleaf.
    fi

    enddocument






    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Jul 31 '17 at 16:56









    Nicola TalbotNicola Talbot

    34.4k259105




    34.4k259105







    • 1





      I used this approach. Based on some testing, that path on Overleaf appears to be /home/wl. Thank you very much for this solution.

      – mhucka
      Aug 7 '17 at 20:00











    • Addendum: I examined other environment variables, per David Carlisle's comments at the top. Unfortunately, no other variable other than HOME seemed safe enough to use (in the sense that I couldn't be sure a collaborator would get the expected behavior if the used the files in their local environment).

      – mhucka
      Aug 7 '17 at 20:02












    • 1





      I used this approach. Based on some testing, that path on Overleaf appears to be /home/wl. Thank you very much for this solution.

      – mhucka
      Aug 7 '17 at 20:00











    • Addendum: I examined other environment variables, per David Carlisle's comments at the top. Unfortunately, no other variable other than HOME seemed safe enough to use (in the sense that I couldn't be sure a collaborator would get the expected behavior if the used the files in their local environment).

      – mhucka
      Aug 7 '17 at 20:02







    1




    1





    I used this approach. Based on some testing, that path on Overleaf appears to be /home/wl. Thank you very much for this solution.

    – mhucka
    Aug 7 '17 at 20:00





    I used this approach. Based on some testing, that path on Overleaf appears to be /home/wl. Thank you very much for this solution.

    – mhucka
    Aug 7 '17 at 20:00













    Addendum: I examined other environment variables, per David Carlisle's comments at the top. Unfortunately, no other variable other than HOME seemed safe enough to use (in the sense that I couldn't be sure a collaborator would get the expected behavior if the used the files in their local environment).

    – mhucka
    Aug 7 '17 at 20:02





    Addendum: I examined other environment variables, per David Carlisle's comments at the top. Unfortunately, no other variable other than HOME seemed safe enough to use (in the sense that I couldn't be sure a collaborator would get the expected behavior if the used the files in their local environment).

    – mhucka
    Aug 7 '17 at 20:02











    0














    The solution works well with overleaf and a linux machine, but it doesn't work with windows due to the backslash in the path. Under windows (miktex), an



    ! Undefined control sequence.
    l.1 C:Users


    error occurs.



    I believe in @@input|"kpsewhich --var-value=HOME" the backslashes need to be escaped, but I couldn't figure out how. Does anyone know how to solve this?





    share








    New contributor




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
























      0














      The solution works well with overleaf and a linux machine, but it doesn't work with windows due to the backslash in the path. Under windows (miktex), an



      ! Undefined control sequence.
      l.1 C:Users


      error occurs.



      I believe in @@input|"kpsewhich --var-value=HOME" the backslashes need to be escaped, but I couldn't figure out how. Does anyone know how to solve this?





      share








      New contributor




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






















        0












        0








        0







        The solution works well with overleaf and a linux machine, but it doesn't work with windows due to the backslash in the path. Under windows (miktex), an



        ! Undefined control sequence.
        l.1 C:Users


        error occurs.



        I believe in @@input|"kpsewhich --var-value=HOME" the backslashes need to be escaped, but I couldn't figure out how. Does anyone know how to solve this?





        share








        New contributor




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










        The solution works well with overleaf and a linux machine, but it doesn't work with windows due to the backslash in the path. Under windows (miktex), an



        ! Undefined control sequence.
        l.1 C:Users


        error occurs.



        I believe in @@input|"kpsewhich --var-value=HOME" the backslashes need to be escaped, but I couldn't figure out how. Does anyone know how to solve this?






        share








        New contributor




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








        share


        share






        New contributor




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









        answered 5 mins ago









        BenBen

        1




        1




        New contributor




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





        New contributor





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






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



























            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%2f384066%2fhow-can-my-latex-files-detect-if-theyre-being-compiled-on-overleaf%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

            Isabella Eugénie Boyer Biographie | Références | Menu de navigationmodifiermodifier le codeComparator to Compute the Relative Value of a U.S. Dollar Amount – 1774 to Present.

            Join wedge with single bond in chemfigHow to make only one part of double bond bold with chemfig?Crossing bonds in chemfigjoining atoms in chemfig. Two adjacent molculesHow do I selectively change bond length in chemfig?Ugly bond joints in chemfigchemfig: reaction above arrowUsing the mhchem and chemfig packages in conjunctionBonding to specific element letter using chemfigResonance hybrids in chemfigScale chemfig molecule in beamer with tikzWhy does this chemfig bond with a hook start in the middle of the atom?

            Are small insurances worth itIs insurance worth it if you can afford to replace the item? If not, when is it?Is accident insurance worth it for my kids who play sportsIs insuring property for more than it is worth allowed?At what point does it become worth it to file an insurance claim?Are wage loss insurance programs worth the cost compared to having an emergency fund?When is an event worth insuring against?Is insurance worth it if you can afford to replace the item? If not, when is it?FHA loan just commenced : Any way to get any of the up-front mortgage insurance back?Which types of insurances do I need to buy?Should I carry less renter's insurance if I can self-insure?Mortgage Adviser Signed Me Up For Multiple Home and Life Insurances (UK)Why many travel insurances don't cover country of nationality?