-1

I can't find the mistake here:

\documentclass[a4paper, 
pointlessnumbers, 
%draft,
parskip=half,
automark
    ]{scrartcl}

\setlength{\parindent}{0pt}

\usepackage[a4paper, left=2.2cm, right=2.2cm, top=2.5cm, bottom=2.5cm,]{geometry} \usepackage{scrpage2} \clearscrheadfoot \pagestyle{scrheadings}

\usepackage[ngerman]{babel}

\usepackage[pdftex]{graphicx,color}

\usepackage[utf8]{inputenc}

\usepackage{amssymb,amsmath,amsthm, amsfonts} \usepackage{latexsym} \usepackage[decimalsymbol=comma]{siunitx}

\usepackage{booktabs} \usepackage{tabulary} \usepackage[dvipsnames]{xcolor} \usepackage[centerlast,small,sc]{caption} \usepackage{here} \usepackage{siunitx}

\usepackage{titling}

\usepackage{subfigure}

\usepackage{hyperref}

\renewcommand{\i}{\mathrm{i}}
\newcommand{\e}{\mathrm{e}}
\newcommand{\diff}{\mathrm{d}}
\newcommand{\figref}[1]{Abb. \ref{#1}} 

\newcommand{\ImNew}{\operatorname{Im}}
\newcommand{\ReNew}{\operatorname{Re}}

\newcommand{\xdot}{\cdot}
\newcommand{\funof}[1]{{\color{gray}(#1)}}

%Titelseite \title{x} \author{x} \date{x}

%Dokument \begin{document} \setcounter{page}{0} \maketitle \thispagestyle{empty} % Keine Seitenzahl auf Titelseite \ofoot{\upshape\thepage}

\clearpage %Inhaltsverzeichnis %\thispagestyle{empty} \tableofcontents

\clearpage %Hauptdokument \pagenumbering{arabic} \ihead{\upshape\scriptsize \leftmark} \ohead{\upshape\scriptsize \thetitle} %\ifoot{\upshape \scriptsize} \ofoot{\upshape\thepage}

\subsection{Quellen} Abbildung $\ref{fig:7}$: $\url{de.wikipedia.org/wiki/Doppelspaltexperiment}$, 13.3.22 13:29Uhr

Abbildung $\ref{fig:8}$: $\url{www.schule-bw.de/faecher-und-schularten/mathematisch-naturwissenschaftliche-faecher/physik/unterrichtsmaterialien/wellen/interferenz/mehrfachspalte.html}$, 13.3.22 13:33Uhr

Abbildung $\ref{fig:8}$: $\url{www.google.com/search?q=dreifachspalt&sxsrf=APq-WBv9xT2QQ0FdNDcDKjurBfK31n_9mA:1647174717822&source=lnms&tbm=isch&sa=X&ved=2ahUKEwjQ7cD_i8P2AhVkSfEDHc4dCIoQ_AUoAXoECAEQAw&biw=1280&bih=607&dpr=2$#:~:text=Schulentwicklung%20NRW,03%3A%$20Optisches%20Gitter}$

Abbildung $\ref{fig:10}$: Giancoli Physik, Pearson Abbildung $\ref{fig:11}$: Giancoli Physik, Pearson Abbildung $\ref{fig:13}$: $\url{de.m.wikipedia.org/wiki/Beugung_(Physik)}[![enter image description here][1]][1]$, 16.3.22, 11:07 Uhr \end{document}

enter image description here

1 Answers1

2

A couple of problems:

  • as said yesterday, don't use obsolete packages, see LaTeX Error: File `scrpage2.sty' not found for more details

  • don't use deprecated class options like pointlessnumbers

  • don't use obsolete package options like decimalsymbol=comma

  • you might want to use the xurl package so your verrrrrrry long urls don't go off the page margins

  • and most importantly: don't wrap your references and urls in math mode. Remove all the incorrect $ around them

  • you shouldn't need the pdftex option for color and graphicx

  • don't load the same package multiple times


\documentclass[a4paper, 
%pointlessnumbers, 
%draft,
parskip=half,
%automark
    ]{scrartcl}

\setlength{\parindent}{0pt}

\usepackage[a4paper, left=2.2cm, right=2.2cm, top=2.5cm, bottom=2.5cm,]{geometry} %\usepackage{scrpage2} %\clearscrheadfoot %\pagestyle{scrheadings}

\usepackage[ngerman]{babel}

\usepackage[ %pdftex ]{graphicx,color}

\usepackage[utf8]{inputenc}

\usepackage{amssymb,amsmath,amsthm, amsfonts} \usepackage{latexsym} \usepackage[ %decimalsymbol=comma ]{siunitx}

\usepackage{booktabs} \usepackage{tabulary} \usepackage[dvipsnames]{xcolor} \usepackage[centerlast,small,sc]{caption} \usepackage{here} %\usepackage{siunitx}

\usepackage{titling}

\usepackage{subfigure}

\usepackage{hyperref}

\renewcommand{\i}{\mathrm{i}}
\newcommand{\e}{\mathrm{e}}
\newcommand{\diff}{\mathrm{d}}
\newcommand{\figref}[1]{Abb. \ref{#1}} 

\newcommand{\ImNew}{\operatorname{Im}}
\newcommand{\ReNew}{\operatorname{Re}}

\newcommand{\xdot}{\cdot}
\newcommand{\funof}[1]{{\color{gray}(#1)}}

%Titelseite \title{x} \author{x} \date{x}

\usepackage{xurl}

%Dokument \begin{document} \setcounter{page}{0} \maketitle \thispagestyle{empty} % Keine Seitenzahl auf Titelseite %\ofoot{\upshape\thepage}

\clearpage %Inhaltsverzeichnis %\thispagestyle{empty} \tableofcontents

\clearpage %Hauptdokument \pagenumbering{arabic} %\ihead{\upshape\scriptsize \leftmark} %\ohead{\upshape\scriptsize \thetitle} %\ifoot{\upshape \scriptsize} %\ofoot{\upshape\thepage}

\subsection{Quellen} Abbildung \ref{fig:7}: \url{de.wikipedia.org/wiki/Doppelspaltexperiment}, 13.3.22 13:29Uhr

Abbildung \ref{fig:8}: \url{www.schule-bw.de/faecher-und-schularten/mathematisch-naturwissenschaftliche-faecher/physik/unterrichtsmaterialien/wellen/interferenz/mehrfachspalte.html}, 13.3.22 13:33Uhr

Abbildung \ref{fig:8}: \url{www.google.com/search?q=dreifachspalt&sxsrf=APq-WBv9xT2QQ0FdNDcDKjurBfK31n_9mA:1647174717822&source=lnms&tbm=isch&sa=X&ved=2ahUKEwjQ7cD_i8P2AhVkSfEDHc4dCIoQ_AUoAXoECAEQAw&biw=1280&bih=607&dpr=2$#:~:text=Schulentwicklung%20NRW,03%3A%$20Optisches%20Gitter}

Abbildung \ref{fig:10}: Giancoli Physik, Pearson Abbildung \ref{fig:11}: Giancoli Physik, Pearson Abbildung \ref{fig:13}: \url{de.m.wikipedia.org/wiki/Beugung_(Physik)}, 16.3.22, 11:07 Uhr \end{document}

enter image description here

  • Thank you that helped a lot! Right now, the URL's are being displayed, but they can't be opened, once I click on them in the pdf. Also, the text of this particular URL "Abbildung $\ref{fig:8}$: \url{www.google.com/search?...}" especially this part is making trouble: "w&biw=1280&bih=607&dpr=2$#:~:text=Schulentwicklung%20NRW,03%3A%$20Optisches%20Gitter}" can not be displayed in 1 link, but its divided into 3 pieces which one can click on separately, which I don't know how to fix, unfortunately – chickenoncrack Jan 26 '23 at 09:52
  • @chickenoncrack They work fine for me. Which pdf viewer do you use? – samcarter_is_at_topanswers.xyz Jan 26 '23 at 09:53
  • the built in texmaker pdf viewer on macOS – chickenoncrack Jan 26 '23 at 09:54
  • Try with adobe reader. Some pdf viewer, like mac preview, are trying to be clever and instead of the latex hyperlink, they try to guess the link from the text in the pdf. – samcarter_is_at_topanswers.xyz Jan 26 '23 at 09:58
  • 3
    Unrelated to latex: are you sure a link to a google search is a good idea? AFAIK the results are personalised so your readers won't see the same page as you and I doubt it will be stable in the long term. Better link to the source of your image. – samcarter_is_at_topanswers.xyz Jan 26 '23 at 10:00
  • Its linked to the specific website, but because latex seperates the link into 3 pieces, once one clicks on the link, one actually only clicks on the first piece of the link instead of the entire link, which is problematic. I put a \ before the $ & % which are part of the link, but still I can't edit the link referencing to fig:8, starting form the w in: "w&biw=1280&bih=607&dpr=2$#:~:text=Schulentwicklung

    %20NRW,03%3A%$20Optisches%20Gitter}". When I press right key on the directional keys, latex jumps directly from the w to the end of this link, so editing it is impossible after the w.

    – chickenoncrack Jan 26 '23 at 10:11
  • 3
    The link works fine and is in one piece with the pdf viewer from texstudio. (but still, I wouldn't consider a link to a page of search results a valid source for an image...) – samcarter_is_at_topanswers.xyz Jan 26 '23 at 10:22
  • 1
  • 1
    @chickenoncrack It's not really the point of the question, but for me your google link does not lead to a single image. It just sends me to a google search with about 40 different pictures. It is not at all clear to me which picture you are referring to. In my book this would definitely not be an appropriate reference. I completely agree with samcarter that you need to the real source of the image. – moewe Jan 27 '23 at 17:01
  • @chickenoncrack The https://www.schule-bw.de/faecher-und-schularten/mathematisch-naturwissenschaftliche-faecher/physik/unterrichtsmaterialien/wellen/interferenz/mehrfachspalte.html link also doesn't work for me. I did find a website under https://www.schule-bw.de/faecher-und-schularten/mathematisch-naturwissenschaftliche-faecher/physik/unterrichtsmaterialien/wellen/interferenz/mehrfachspalte.htm (htm instead of html) that looks like it could be what you want. – moewe Jan 27 '23 at 17:02