1

I want to cite web pages here and there in a math paper. I use TeXShop in a Mac.

What does not work is below.

  Citation   \cite{A}

  \bibliographystyle{amsplain}
  \begin{thebibliography}{10}
  \bibitem {A} https://math.stackexchange.com/questions/3369742/looking-for-references-to-pythagorean-triple-subsets
  \end{thebibliography}

It shows

 Citation [1]

                                         References

 1. https://math.stackexchange.com/questions/3369742/looking-for-references-to-pythagorean-triple-subsets

Is there way to make this bibitem clickable in the generated PDF?

Alan Munn
  • 218,180
poetasis
  • 219
  • 2
    You can use hyperref \href. But do you really want to do your bibliography manually? If you do then the links will be automatic when you use hyperref. – Alan Munn May 12 '20 at 16:32
  • Can you show me an example of where it goes in the bibliography? I can't get it to work. – poetasis May 12 '20 at 16:47

1 Answers1

3

You really shouldn't be doing bibliographies by hand. Instead you should learn to use natbib/bibtex or biblatex/biber (see bibtex vs. biber and biblatex vs. natbib for the distinction.) But if you really need to do this, then you can use either the \url macro (which just takes a single argument) or the \href macro which takes a url and a link description as arguments.

\documentclass{article}
\usepackage{hyperref}
\begin{document}
\cite{A}
\cite{B}

\bibliographystyle{amsplain}
  \begin{thebibliography}{10}
  \bibitem {A} \url{https://math.stackexchange.com/questions/3369742/looking-for-references-to-pythagorean-triple-subsets}
  \bibitem {B} \href{https://math.stackexchange.com/questions/3369742/looking-for-references-to-pythagorean-triple-subsets}{A Stackexchange link}
  \end{thebibliography}
\end{document}
Alan Munn
  • 218,180
  • I have what I need now. I might look into the other stuff later. Right now, the \cite and the \bibitem are many pages apart and they work. I have only one book to reference and I know how to do that. Thanks again. – poetasis May 12 '20 at 17:41
  • @poetasis I'm not saying it won't work, just that you're going to end up doing a lot of manual formatting, that you wouldn't need to do if you used the more automatic methods. So in the long run (assuming you will write more papers) you should learn to use them. – Alan Munn May 12 '20 at 17:52
  • This is my first paper and I only have one more with no bibliographic info in mind. I have to enter the \cite and \bibitem somewhere. I've seen how keeping a separate file of bibitems is referenced from somewhere in the document by name but it looks like more work. Thanks for the having my best interest in mind. BTW, the URL shown is my request to find prior art on the topic I'm writing about if you are curious. – poetasis May 12 '20 at 18:01
  • 1
    @poetasis Fair enough! For small one-time tasks, the method you're using is fine, although it's not really much more work to enter into a .bib file. Since many of us here are academics, we tend to use references a lot, so having a database means entering the information once in your career. :) – Alan Munn May 12 '20 at 18:05
  • TMI, but I left college in 1979 and I ended a multi-decade career in IT after an independent audit almost ruined the company I was working for. Arthur Anderson (remember Enron?) was their creative accounting firm... Now I'm a mechanic who dabbles in math and I am excited about my discovery... noted in the URL. They don't like long discussions in these forums so I'll end it. here. Thanks again. – poetasis May 12 '20 at 18:14