Including a pdf into latex and reference it












1















A friend recommended me to use elsarticle for a report, which I am currently doing. Now I need to add an external pdf which contains a figure. Adding the figure works fine, but I wonder if I can reference it in the text via ref and create a link?



So in the text I would like to refer in the following way:



Figure 1 shows that...



Figure 1 should be a link (what I mean is to click on it takes you to the figure in the document) to an external pdf included in the document. Is that possible? As I mentioned I am using elsarticle, mostly clean in terms of other classes, but I would expect this problem to be the same independent of the class.



Any hints appreciated!



code:



documentclass[authoryear,11pt]{elsarticle}
begin{document}
Figure 1 shows...

includegraphics[width=linewidth, height=textheight,keepaspectratio]{Figure1.pdf} % just use any PDF as a placeholder here

end{document}









share|improve this question























  • Does your figure has a caption? Add label{fig:important} after it and use "Figure~ref{fig:important}} ..."

    – Kurt
    Mar 14 at 16:33











  • @Kurt yes it has a caption, thanks for asking

    – ghx
    Mar 14 at 16:57











  • Please show in your given code how you included caption. Do you use environment figure? Do you load package caption?

    – Kurt
    Mar 14 at 17:03











  • @Kurt I did not include the caption, it was already in the PDF which I added to the document. I am just using includegraphics.

    – ghx
    Mar 14 at 17:07


















1















A friend recommended me to use elsarticle for a report, which I am currently doing. Now I need to add an external pdf which contains a figure. Adding the figure works fine, but I wonder if I can reference it in the text via ref and create a link?



So in the text I would like to refer in the following way:



Figure 1 shows that...



Figure 1 should be a link (what I mean is to click on it takes you to the figure in the document) to an external pdf included in the document. Is that possible? As I mentioned I am using elsarticle, mostly clean in terms of other classes, but I would expect this problem to be the same independent of the class.



Any hints appreciated!



code:



documentclass[authoryear,11pt]{elsarticle}
begin{document}
Figure 1 shows...

includegraphics[width=linewidth, height=textheight,keepaspectratio]{Figure1.pdf} % just use any PDF as a placeholder here

end{document}









share|improve this question























  • Does your figure has a caption? Add label{fig:important} after it and use "Figure~ref{fig:important}} ..."

    – Kurt
    Mar 14 at 16:33











  • @Kurt yes it has a caption, thanks for asking

    – ghx
    Mar 14 at 16:57











  • Please show in your given code how you included caption. Do you use environment figure? Do you load package caption?

    – Kurt
    Mar 14 at 17:03











  • @Kurt I did not include the caption, it was already in the PDF which I added to the document. I am just using includegraphics.

    – ghx
    Mar 14 at 17:07
















1












1








1








A friend recommended me to use elsarticle for a report, which I am currently doing. Now I need to add an external pdf which contains a figure. Adding the figure works fine, but I wonder if I can reference it in the text via ref and create a link?



So in the text I would like to refer in the following way:



Figure 1 shows that...



Figure 1 should be a link (what I mean is to click on it takes you to the figure in the document) to an external pdf included in the document. Is that possible? As I mentioned I am using elsarticle, mostly clean in terms of other classes, but I would expect this problem to be the same independent of the class.



Any hints appreciated!



code:



documentclass[authoryear,11pt]{elsarticle}
begin{document}
Figure 1 shows...

includegraphics[width=linewidth, height=textheight,keepaspectratio]{Figure1.pdf} % just use any PDF as a placeholder here

end{document}









share|improve this question














A friend recommended me to use elsarticle for a report, which I am currently doing. Now I need to add an external pdf which contains a figure. Adding the figure works fine, but I wonder if I can reference it in the text via ref and create a link?



So in the text I would like to refer in the following way:



Figure 1 shows that...



Figure 1 should be a link (what I mean is to click on it takes you to the figure in the document) to an external pdf included in the document. Is that possible? As I mentioned I am using elsarticle, mostly clean in terms of other classes, but I would expect this problem to be the same independent of the class.



Any hints appreciated!



code:



documentclass[authoryear,11pt]{elsarticle}
begin{document}
Figure 1 shows...

includegraphics[width=linewidth, height=textheight,keepaspectratio]{Figure1.pdf} % just use any PDF as a placeholder here

end{document}






elsarticle ref






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 14 at 16:26









ghxghx

465




465













  • Does your figure has a caption? Add label{fig:important} after it and use "Figure~ref{fig:important}} ..."

    – Kurt
    Mar 14 at 16:33











  • @Kurt yes it has a caption, thanks for asking

    – ghx
    Mar 14 at 16:57











  • Please show in your given code how you included caption. Do you use environment figure? Do you load package caption?

    – Kurt
    Mar 14 at 17:03











  • @Kurt I did not include the caption, it was already in the PDF which I added to the document. I am just using includegraphics.

    – ghx
    Mar 14 at 17:07





















  • Does your figure has a caption? Add label{fig:important} after it and use "Figure~ref{fig:important}} ..."

    – Kurt
    Mar 14 at 16:33











  • @Kurt yes it has a caption, thanks for asking

    – ghx
    Mar 14 at 16:57











  • Please show in your given code how you included caption. Do you use environment figure? Do you load package caption?

    – Kurt
    Mar 14 at 17:03











  • @Kurt I did not include the caption, it was already in the PDF which I added to the document. I am just using includegraphics.

    – ghx
    Mar 14 at 17:07



















Does your figure has a caption? Add label{fig:important} after it and use "Figure~ref{fig:important}} ..."

– Kurt
Mar 14 at 16:33





Does your figure has a caption? Add label{fig:important} after it and use "Figure~ref{fig:important}} ..."

– Kurt
Mar 14 at 16:33













@Kurt yes it has a caption, thanks for asking

– ghx
Mar 14 at 16:57





@Kurt yes it has a caption, thanks for asking

– ghx
Mar 14 at 16:57













Please show in your given code how you included caption. Do you use environment figure? Do you load package caption?

– Kurt
Mar 14 at 17:03





Please show in your given code how you included caption. Do you use environment figure? Do you load package caption?

– Kurt
Mar 14 at 17:03













@Kurt I did not include the caption, it was already in the PDF which I added to the document. I am just using includegraphics.

– ghx
Mar 14 at 17:07







@Kurt I did not include the caption, it was already in the PDF which I added to the document. I am just using includegraphics.

– ghx
Mar 14 at 17:07












1 Answer
1






active

oldest

votes


















2














put the includegraphics between begin{figure} --- end{figure} and add a caption with your label you can reference afterwards :)



documentclass[authoryear,11pt]{elsarticle}
begin{document}
Figure ref{fig:document} showsldots

begin{figure}[h!]
includegraphics[width=linewidth, height=textheight,keepaspectratio]{Figure1.pdf} %
caption{label{fig:document}}
end{figure}
end{document}


Off topic note: it is better to use ldots than explicitly typing ....






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%2f479502%2fincluding-a-pdf-into-latex-and-reference-it%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









    2














    put the includegraphics between begin{figure} --- end{figure} and add a caption with your label you can reference afterwards :)



    documentclass[authoryear,11pt]{elsarticle}
    begin{document}
    Figure ref{fig:document} showsldots

    begin{figure}[h!]
    includegraphics[width=linewidth, height=textheight,keepaspectratio]{Figure1.pdf} %
    caption{label{fig:document}}
    end{figure}
    end{document}


    Off topic note: it is better to use ldots than explicitly typing ....






    share|improve this answer






























      2














      put the includegraphics between begin{figure} --- end{figure} and add a caption with your label you can reference afterwards :)



      documentclass[authoryear,11pt]{elsarticle}
      begin{document}
      Figure ref{fig:document} showsldots

      begin{figure}[h!]
      includegraphics[width=linewidth, height=textheight,keepaspectratio]{Figure1.pdf} %
      caption{label{fig:document}}
      end{figure}
      end{document}


      Off topic note: it is better to use ldots than explicitly typing ....






      share|improve this answer




























        2












        2








        2







        put the includegraphics between begin{figure} --- end{figure} and add a caption with your label you can reference afterwards :)



        documentclass[authoryear,11pt]{elsarticle}
        begin{document}
        Figure ref{fig:document} showsldots

        begin{figure}[h!]
        includegraphics[width=linewidth, height=textheight,keepaspectratio]{Figure1.pdf} %
        caption{label{fig:document}}
        end{figure}
        end{document}


        Off topic note: it is better to use ldots than explicitly typing ....






        share|improve this answer















        put the includegraphics between begin{figure} --- end{figure} and add a caption with your label you can reference afterwards :)



        documentclass[authoryear,11pt]{elsarticle}
        begin{document}
        Figure ref{fig:document} showsldots

        begin{figure}[h!]
        includegraphics[width=linewidth, height=textheight,keepaspectratio]{Figure1.pdf} %
        caption{label{fig:document}}
        end{figure}
        end{document}


        Off topic note: it is better to use ldots than explicitly typing ....







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Mar 14 at 16:36

























        answered Mar 14 at 16:34









        Superuser27Superuser27

        71516




        71516






























            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%2f479502%2fincluding-a-pdf-into-latex-and-reference-it%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

            How to send String Array data to Server using php in android

            Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents

            Is anime1.com a legal site for watching anime?