Unpleasant high frames of citation or reference in paragraphs












5














When both a citation (or reference of equations) and a math object appear in the same line in a paragraph, the frame of the citation is higher than normal. Any ideas how to fix this but keep the frame? Thank you in advance!



documentclass{article}
usepackage{amsmath}
usepackage[round]{natbib}
usepackage{hyperref}
begin{document}
Since $X_noverset{p}{to}X$ as $ntoinfty$, we then have...

end{document}


![enter image description here][1]










share|improve this question
























  • Thanks but I want to keep the frames.
    – Daryl
    Jul 31 '14 at 17:24










  • Sorry, then it wasn't clear from your question. Can you post a minimal example that illustrates the problem?
    – Alan Munn
    Jul 31 '14 at 17:29










  • That's my fault. Here is a simple example: documentclass[a4paper, 11 pt]{article} usepackage{amsmath,amssymb,amsthm,mathrsfs,amsfonts} usepackage[round]{natbib} usepackage{hyperref} begin{document} Since $X_noverset{L}{to}X$ as $ntoinfty$, by citet{Davydov1998local}, we then have... bibliography{D:/Dropbox/Common/mybibliography} end{document}
    – Daryl
    Jul 31 '14 at 17:39








  • 1




    You can edit your question to include the example (I've done that for you); however, since the same problem arises with a reference to an equation, you could make the problem more self-contained by not using a citation in the example. Or see How to write a MWEB (Minimal working example with Bibliography)? for how to include a sample .bib file in your example.
    – Alan Munn
    Jul 31 '14 at 17:42












  • Thank you! The reason I didn't include a reference to an equation is that I believe the problem is on the hyperref package not the way I refer or cite, when a math object appears on the same line. Therefore, the same problem arises if you refer to a theorem, lemma or corollary.
    – Daryl
    Jul 31 '14 at 18:06
















5














When both a citation (or reference of equations) and a math object appear in the same line in a paragraph, the frame of the citation is higher than normal. Any ideas how to fix this but keep the frame? Thank you in advance!



documentclass{article}
usepackage{amsmath}
usepackage[round]{natbib}
usepackage{hyperref}
begin{document}
Since $X_noverset{p}{to}X$ as $ntoinfty$, we then have...

end{document}


![enter image description here][1]










share|improve this question
























  • Thanks but I want to keep the frames.
    – Daryl
    Jul 31 '14 at 17:24










  • Sorry, then it wasn't clear from your question. Can you post a minimal example that illustrates the problem?
    – Alan Munn
    Jul 31 '14 at 17:29










  • That's my fault. Here is a simple example: documentclass[a4paper, 11 pt]{article} usepackage{amsmath,amssymb,amsthm,mathrsfs,amsfonts} usepackage[round]{natbib} usepackage{hyperref} begin{document} Since $X_noverset{L}{to}X$ as $ntoinfty$, by citet{Davydov1998local}, we then have... bibliography{D:/Dropbox/Common/mybibliography} end{document}
    – Daryl
    Jul 31 '14 at 17:39








  • 1




    You can edit your question to include the example (I've done that for you); however, since the same problem arises with a reference to an equation, you could make the problem more self-contained by not using a citation in the example. Or see How to write a MWEB (Minimal working example with Bibliography)? for how to include a sample .bib file in your example.
    – Alan Munn
    Jul 31 '14 at 17:42












  • Thank you! The reason I didn't include a reference to an equation is that I believe the problem is on the hyperref package not the way I refer or cite, when a math object appears on the same line. Therefore, the same problem arises if you refer to a theorem, lemma or corollary.
    – Daryl
    Jul 31 '14 at 18:06














5












5








5







When both a citation (or reference of equations) and a math object appear in the same line in a paragraph, the frame of the citation is higher than normal. Any ideas how to fix this but keep the frame? Thank you in advance!



documentclass{article}
usepackage{amsmath}
usepackage[round]{natbib}
usepackage{hyperref}
begin{document}
Since $X_noverset{p}{to}X$ as $ntoinfty$, we then have...

end{document}


![enter image description here][1]










share|improve this question















When both a citation (or reference of equations) and a math object appear in the same line in a paragraph, the frame of the citation is higher than normal. Any ideas how to fix this but keep the frame? Thank you in advance!



documentclass{article}
usepackage{amsmath}
usepackage[round]{natbib}
usepackage{hyperref}
begin{document}
Since $X_noverset{p}{to}X$ as $ntoinfty$, we then have...

end{document}


![enter image description here][1]







hyperref






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 8 mins ago

























asked Jul 31 '14 at 17:17









Daryl

397249




397249












  • Thanks but I want to keep the frames.
    – Daryl
    Jul 31 '14 at 17:24










  • Sorry, then it wasn't clear from your question. Can you post a minimal example that illustrates the problem?
    – Alan Munn
    Jul 31 '14 at 17:29










  • That's my fault. Here is a simple example: documentclass[a4paper, 11 pt]{article} usepackage{amsmath,amssymb,amsthm,mathrsfs,amsfonts} usepackage[round]{natbib} usepackage{hyperref} begin{document} Since $X_noverset{L}{to}X$ as $ntoinfty$, by citet{Davydov1998local}, we then have... bibliography{D:/Dropbox/Common/mybibliography} end{document}
    – Daryl
    Jul 31 '14 at 17:39








  • 1




    You can edit your question to include the example (I've done that for you); however, since the same problem arises with a reference to an equation, you could make the problem more self-contained by not using a citation in the example. Or see How to write a MWEB (Minimal working example with Bibliography)? for how to include a sample .bib file in your example.
    – Alan Munn
    Jul 31 '14 at 17:42












  • Thank you! The reason I didn't include a reference to an equation is that I believe the problem is on the hyperref package not the way I refer or cite, when a math object appears on the same line. Therefore, the same problem arises if you refer to a theorem, lemma or corollary.
    – Daryl
    Jul 31 '14 at 18:06


















  • Thanks but I want to keep the frames.
    – Daryl
    Jul 31 '14 at 17:24










  • Sorry, then it wasn't clear from your question. Can you post a minimal example that illustrates the problem?
    – Alan Munn
    Jul 31 '14 at 17:29










  • That's my fault. Here is a simple example: documentclass[a4paper, 11 pt]{article} usepackage{amsmath,amssymb,amsthm,mathrsfs,amsfonts} usepackage[round]{natbib} usepackage{hyperref} begin{document} Since $X_noverset{L}{to}X$ as $ntoinfty$, by citet{Davydov1998local}, we then have... bibliography{D:/Dropbox/Common/mybibliography} end{document}
    – Daryl
    Jul 31 '14 at 17:39








  • 1




    You can edit your question to include the example (I've done that for you); however, since the same problem arises with a reference to an equation, you could make the problem more self-contained by not using a citation in the example. Or see How to write a MWEB (Minimal working example with Bibliography)? for how to include a sample .bib file in your example.
    – Alan Munn
    Jul 31 '14 at 17:42












  • Thank you! The reason I didn't include a reference to an equation is that I believe the problem is on the hyperref package not the way I refer or cite, when a math object appears on the same line. Therefore, the same problem arises if you refer to a theorem, lemma or corollary.
    – Daryl
    Jul 31 '14 at 18:06
















Thanks but I want to keep the frames.
– Daryl
Jul 31 '14 at 17:24




Thanks but I want to keep the frames.
– Daryl
Jul 31 '14 at 17:24












Sorry, then it wasn't clear from your question. Can you post a minimal example that illustrates the problem?
– Alan Munn
Jul 31 '14 at 17:29




Sorry, then it wasn't clear from your question. Can you post a minimal example that illustrates the problem?
– Alan Munn
Jul 31 '14 at 17:29












That's my fault. Here is a simple example: documentclass[a4paper, 11 pt]{article} usepackage{amsmath,amssymb,amsthm,mathrsfs,amsfonts} usepackage[round]{natbib} usepackage{hyperref} begin{document} Since $X_noverset{L}{to}X$ as $ntoinfty$, by citet{Davydov1998local}, we then have... bibliography{D:/Dropbox/Common/mybibliography} end{document}
– Daryl
Jul 31 '14 at 17:39






That's my fault. Here is a simple example: documentclass[a4paper, 11 pt]{article} usepackage{amsmath,amssymb,amsthm,mathrsfs,amsfonts} usepackage[round]{natbib} usepackage{hyperref} begin{document} Since $X_noverset{L}{to}X$ as $ntoinfty$, by citet{Davydov1998local}, we then have... bibliography{D:/Dropbox/Common/mybibliography} end{document}
– Daryl
Jul 31 '14 at 17:39






1




1




You can edit your question to include the example (I've done that for you); however, since the same problem arises with a reference to an equation, you could make the problem more self-contained by not using a citation in the example. Or see How to write a MWEB (Minimal working example with Bibliography)? for how to include a sample .bib file in your example.
– Alan Munn
Jul 31 '14 at 17:42






You can edit your question to include the example (I've done that for you); however, since the same problem arises with a reference to an equation, you could make the problem more self-contained by not using a citation in the example. Or see How to write a MWEB (Minimal working example with Bibliography)? for how to include a sample .bib file in your example.
– Alan Munn
Jul 31 '14 at 17:42














Thank you! The reason I didn't include a reference to an equation is that I believe the problem is on the hyperref package not the way I refer or cite, when a math object appears on the same line. Therefore, the same problem arises if you refer to a theorem, lemma or corollary.
– Daryl
Jul 31 '14 at 18:06




Thank you! The reason I didn't include a reference to an equation is that I believe the problem is on the hyperref package not the way I refer or cite, when a math object appears on the same line. Therefore, the same problem arises if you refer to a theorem, lemma or corollary.
– Daryl
Jul 31 '14 at 18:06










1 Answer
1






active

oldest

votes


















5














The size of links is dependent on the size of other things in the same line (roughly) as the link, and so since your inline math causes the line height to be larger (which it does) then the box will be larger. For a more detailed discussion of the problem, see the following question:




  • Constant height and depth of hyperref link boxes


As a workaround, you can put your citation or reference into an mbox but this will have the problem of not allowing the link to break across lines, yielding overfull boxes. Here's an example of this. (This is also an example of how to make a minimal example with a bibliography.)



% !TEX TS-program = pdflatex
% !BIB TS-program = bibtex
documentclass{article}
usepackage{filecontents}
begin{filecontents}{jobname.bib}
@article{Westerstahl1998,
Author = {D Westerstahl},
Journal = {Linguistics and Philosophy},
Pages = {635-643},
Title = {On Mathematical Proofs of the Vacuity of Compositionality (Remarks On {Kazmi} and {Pelletier}, {`Is Compositionality Formally Vacuous?'})},
Volume = {21},
Year = {1998}}
end{filecontents}
usepackage[round]{natbib}
usepackage{amsmath}
usepackage{hyperref}
bibliographystyle{kluwer}
begin{document}
parindent=0pt

This is a line that contains a reference cite{Westerstahl1998}.

This is a line that contains $X_noverset{L}{to}X$ as $ntoinfty$ and a reference cite{Westerstahl1998}.

This is a line that contains $X_noverset{L}{to}X$ as $ntoinfty$ and a reference mbox{cite{Westerstahl1998}}.

setlength{emergencystretch}{2.5em} This is a line that contains $X_noverset{L}{to}X$ as $ntoinfty$ and a reference mbox{cite{Westerstahl1998}}.
bibliography{jobname}
end{document}


This document produces the following warning because the mbox containing the citation overlaps into the right margin. We can cause the line to wrap by increasing the emergency stretch but this will make the math look quite ugly, as in the fourth line.



Overfull hbox (6.43889pt too wide) in paragraph at lines 27--1


output of code






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%2f194182%2funpleasant-high-frames-of-citation-or-reference-in-paragraphs%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









    5














    The size of links is dependent on the size of other things in the same line (roughly) as the link, and so since your inline math causes the line height to be larger (which it does) then the box will be larger. For a more detailed discussion of the problem, see the following question:




    • Constant height and depth of hyperref link boxes


    As a workaround, you can put your citation or reference into an mbox but this will have the problem of not allowing the link to break across lines, yielding overfull boxes. Here's an example of this. (This is also an example of how to make a minimal example with a bibliography.)



    % !TEX TS-program = pdflatex
    % !BIB TS-program = bibtex
    documentclass{article}
    usepackage{filecontents}
    begin{filecontents}{jobname.bib}
    @article{Westerstahl1998,
    Author = {D Westerstahl},
    Journal = {Linguistics and Philosophy},
    Pages = {635-643},
    Title = {On Mathematical Proofs of the Vacuity of Compositionality (Remarks On {Kazmi} and {Pelletier}, {`Is Compositionality Formally Vacuous?'})},
    Volume = {21},
    Year = {1998}}
    end{filecontents}
    usepackage[round]{natbib}
    usepackage{amsmath}
    usepackage{hyperref}
    bibliographystyle{kluwer}
    begin{document}
    parindent=0pt

    This is a line that contains a reference cite{Westerstahl1998}.

    This is a line that contains $X_noverset{L}{to}X$ as $ntoinfty$ and a reference cite{Westerstahl1998}.

    This is a line that contains $X_noverset{L}{to}X$ as $ntoinfty$ and a reference mbox{cite{Westerstahl1998}}.

    setlength{emergencystretch}{2.5em} This is a line that contains $X_noverset{L}{to}X$ as $ntoinfty$ and a reference mbox{cite{Westerstahl1998}}.
    bibliography{jobname}
    end{document}


    This document produces the following warning because the mbox containing the citation overlaps into the right margin. We can cause the line to wrap by increasing the emergency stretch but this will make the math look quite ugly, as in the fourth line.



    Overfull hbox (6.43889pt too wide) in paragraph at lines 27--1


    output of code






    share|improve this answer




























      5














      The size of links is dependent on the size of other things in the same line (roughly) as the link, and so since your inline math causes the line height to be larger (which it does) then the box will be larger. For a more detailed discussion of the problem, see the following question:




      • Constant height and depth of hyperref link boxes


      As a workaround, you can put your citation or reference into an mbox but this will have the problem of not allowing the link to break across lines, yielding overfull boxes. Here's an example of this. (This is also an example of how to make a minimal example with a bibliography.)



      % !TEX TS-program = pdflatex
      % !BIB TS-program = bibtex
      documentclass{article}
      usepackage{filecontents}
      begin{filecontents}{jobname.bib}
      @article{Westerstahl1998,
      Author = {D Westerstahl},
      Journal = {Linguistics and Philosophy},
      Pages = {635-643},
      Title = {On Mathematical Proofs of the Vacuity of Compositionality (Remarks On {Kazmi} and {Pelletier}, {`Is Compositionality Formally Vacuous?'})},
      Volume = {21},
      Year = {1998}}
      end{filecontents}
      usepackage[round]{natbib}
      usepackage{amsmath}
      usepackage{hyperref}
      bibliographystyle{kluwer}
      begin{document}
      parindent=0pt

      This is a line that contains a reference cite{Westerstahl1998}.

      This is a line that contains $X_noverset{L}{to}X$ as $ntoinfty$ and a reference cite{Westerstahl1998}.

      This is a line that contains $X_noverset{L}{to}X$ as $ntoinfty$ and a reference mbox{cite{Westerstahl1998}}.

      setlength{emergencystretch}{2.5em} This is a line that contains $X_noverset{L}{to}X$ as $ntoinfty$ and a reference mbox{cite{Westerstahl1998}}.
      bibliography{jobname}
      end{document}


      This document produces the following warning because the mbox containing the citation overlaps into the right margin. We can cause the line to wrap by increasing the emergency stretch but this will make the math look quite ugly, as in the fourth line.



      Overfull hbox (6.43889pt too wide) in paragraph at lines 27--1


      output of code






      share|improve this answer


























        5












        5








        5






        The size of links is dependent on the size of other things in the same line (roughly) as the link, and so since your inline math causes the line height to be larger (which it does) then the box will be larger. For a more detailed discussion of the problem, see the following question:




        • Constant height and depth of hyperref link boxes


        As a workaround, you can put your citation or reference into an mbox but this will have the problem of not allowing the link to break across lines, yielding overfull boxes. Here's an example of this. (This is also an example of how to make a minimal example with a bibliography.)



        % !TEX TS-program = pdflatex
        % !BIB TS-program = bibtex
        documentclass{article}
        usepackage{filecontents}
        begin{filecontents}{jobname.bib}
        @article{Westerstahl1998,
        Author = {D Westerstahl},
        Journal = {Linguistics and Philosophy},
        Pages = {635-643},
        Title = {On Mathematical Proofs of the Vacuity of Compositionality (Remarks On {Kazmi} and {Pelletier}, {`Is Compositionality Formally Vacuous?'})},
        Volume = {21},
        Year = {1998}}
        end{filecontents}
        usepackage[round]{natbib}
        usepackage{amsmath}
        usepackage{hyperref}
        bibliographystyle{kluwer}
        begin{document}
        parindent=0pt

        This is a line that contains a reference cite{Westerstahl1998}.

        This is a line that contains $X_noverset{L}{to}X$ as $ntoinfty$ and a reference cite{Westerstahl1998}.

        This is a line that contains $X_noverset{L}{to}X$ as $ntoinfty$ and a reference mbox{cite{Westerstahl1998}}.

        setlength{emergencystretch}{2.5em} This is a line that contains $X_noverset{L}{to}X$ as $ntoinfty$ and a reference mbox{cite{Westerstahl1998}}.
        bibliography{jobname}
        end{document}


        This document produces the following warning because the mbox containing the citation overlaps into the right margin. We can cause the line to wrap by increasing the emergency stretch but this will make the math look quite ugly, as in the fourth line.



        Overfull hbox (6.43889pt too wide) in paragraph at lines 27--1


        output of code






        share|improve this answer














        The size of links is dependent on the size of other things in the same line (roughly) as the link, and so since your inline math causes the line height to be larger (which it does) then the box will be larger. For a more detailed discussion of the problem, see the following question:




        • Constant height and depth of hyperref link boxes


        As a workaround, you can put your citation or reference into an mbox but this will have the problem of not allowing the link to break across lines, yielding overfull boxes. Here's an example of this. (This is also an example of how to make a minimal example with a bibliography.)



        % !TEX TS-program = pdflatex
        % !BIB TS-program = bibtex
        documentclass{article}
        usepackage{filecontents}
        begin{filecontents}{jobname.bib}
        @article{Westerstahl1998,
        Author = {D Westerstahl},
        Journal = {Linguistics and Philosophy},
        Pages = {635-643},
        Title = {On Mathematical Proofs of the Vacuity of Compositionality (Remarks On {Kazmi} and {Pelletier}, {`Is Compositionality Formally Vacuous?'})},
        Volume = {21},
        Year = {1998}}
        end{filecontents}
        usepackage[round]{natbib}
        usepackage{amsmath}
        usepackage{hyperref}
        bibliographystyle{kluwer}
        begin{document}
        parindent=0pt

        This is a line that contains a reference cite{Westerstahl1998}.

        This is a line that contains $X_noverset{L}{to}X$ as $ntoinfty$ and a reference cite{Westerstahl1998}.

        This is a line that contains $X_noverset{L}{to}X$ as $ntoinfty$ and a reference mbox{cite{Westerstahl1998}}.

        setlength{emergencystretch}{2.5em} This is a line that contains $X_noverset{L}{to}X$ as $ntoinfty$ and a reference mbox{cite{Westerstahl1998}}.
        bibliography{jobname}
        end{document}


        This document produces the following warning because the mbox containing the citation overlaps into the right margin. We can cause the line to wrap by increasing the emergency stretch but this will make the math look quite ugly, as in the fourth line.



        Overfull hbox (6.43889pt too wide) in paragraph at lines 27--1


        output of code







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Apr 13 '17 at 12:35









        Community

        1




        1










        answered Jul 31 '14 at 20:23









        Alan Munn

        158k27423698




        158k27423698






























            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.





            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%2f194182%2funpleasant-high-frames-of-citation-or-reference-in-paragraphs%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

            サソリ

            広島県道265号伴広島線

            Setup Asymptote in Texstudio