Referenz zu Anhang Thema ist als GELÖST markiert

Tabellen und Grafiken erstellen und anordnen


basti-fantasti-48
Forum-Century
Forum-Century
Beiträge: 214
Registriert: So 4. Apr 2021, 14:27

Referenz zu Anhang

Beitrag von basti-fantasti-48 »

Hallo ich habe ein Bild das eine Softwarefunktion erklärt. Ich hätte sehr gerne, dass wenn ich auf das Bild klicke ich in den Anhang springe (dort ist der Code). Also wie hyperref bei Zitaten o.ä

Gibt es da was ?

Benutzeravatar
Stefan Kottwitz
Admin
Admin
Beiträge: 2642
Registriert: Di 8. Jul 2008, 00:39
Kontaktdaten:

Re: Referenz zu Anhang

Beitrag von Stefan Kottwitz »

Ja, Du es geht analog mit Grafiken, wie \hyperref[label]{\includegraphics{...}}.

Stefan

basti-fantasti-48
Forum-Century
Forum-Century
Beiträge: 214
Registriert: So 4. Apr 2021, 14:27

Re: Referenz zu Anhang

Beitrag von basti-fantasti-48 »

\documentclass{scrreprt}	


% Bilder einbinden
\usepackage{graphicx}
\graphicspath{{bilder/}}

\usepackage{pgfkeys}
\usepackage{tikz}
\usetikzlibrary{shapes.geometric, arrows}

\usepackage{struktex}

\usepackage{hyperref}
\usepackage[toc,page]{appendix}



\begin{document}

\begin{minipage}{\textwidth} 
	\centering
	\hyperref[label]\includegraphics{funktion.pdf}
	\captionof{figure}{unterschr}
\end{minipage}
\begin{appendices} %Anhang
SOFWARE
	
\end{appendices}
\end{document}
Wo muss ich das einfügen? Ich möchte wenn ich auf das bild gehe in den anhang kommen
Dateianhänge
funktion.pdf
(20.82 KiB) 26-mal heruntergeladen
Zuletzt geändert von basti-fantasti-48 am Mo 24. Jun 2024, 13:11, insgesamt 1-mal geändert.

Benutzeravatar
Stefan Kottwitz
Admin
Admin
Beiträge: 2642
Registriert: Di 8. Jul 2008, 00:39
Kontaktdaten:

Re: Referenz zu Anhang

Beitrag von Stefan Kottwitz »

Na genau da, wo bisher das \includegraphics jetzt schon steht, nur mit dem \hyperref drumrum.

Das Beispiel lässt sich nicht testen, da kommen weird pgfplots-Fehler und listings-Fehler, weil da ein Haufen Zeug drin ist was mit der Frage überhaupt nichts zu tun hat.

Stefan

basti-fantasti-48
Forum-Century
Forum-Century
Beiträge: 214
Registriert: So 4. Apr 2021, 14:27

Re: Referenz zu Anhang

Beitrag von basti-fantasti-48 »

ich schreibe bei label dann irgendwas rein. und dann muss ich im anhang dann \ref machen oder wie ?

Benutzeravatar
Stefan Kottwitz
Admin
Admin
Beiträge: 2642
Registriert: Di 8. Jul 2008, 00:39
Kontaktdaten:

Re: Referenz zu Anhang

Beitrag von Stefan Kottwitz »

\label direkt am Beginn des Anhangs, vmtl. direkt nach dem ersten \section-Befehl im Anhang (bzw. \chapter) weil die ja den Anker für das \label setzen.

\ref nicht, das wäre ja nur ein Querverweis wie \hyperref.

basti-fantasti-48
Forum-Century
Forum-Century
Beiträge: 214
Registriert: So 4. Apr 2021, 14:27

Re: Referenz zu Anhang

Beitrag von basti-fantasti-48 »

\begin{minipage}{\textwidth}
\centering
\hyperref[Anhang]\includegraphics[page=1,width=\textwidth,height=.45\textheight,keepaspectratio]
{funktion.pdf}
\captionof{figure}{Darstellung Funktion \textit{get\_q}}
\label{getq}
\end{minipage}

\begin{appendices} %Anhang
\label{Anhang}
\begin{lstlisting}
%Softwarecode
\end{lstlisting}
\end{appendices}


Meinst du so ? es kommt der Fehler file not found

Benutzeravatar
Stefan Kottwitz
Admin
Admin
Beiträge: 2642
Registriert: Di 8. Jul 2008, 00:39
Kontaktdaten:

Re: Referenz zu Anhang

Beitrag von Stefan Kottwitz »

Ja, nur dass ich im Anhang auch ein \chapter oder \section erwarten würde, so dass der Anhang nicht Teil der letzten Section ist.

"file not found" ist irgendwas anderes, hier ist kein file drin außer natürlich der Grafik.

Stefan

rais
Forum-Guru
Forum-Guru
Beiträge: 413
Registriert: Di 21. Sep 2010, 00:37

Re: Referenz zu Anhang

Beitrag von rais »

basti-fantasti-48 hat geschrieben:
Di 25. Jun 2024, 09:22
\hyperref[Anhang]\includegraphics[page=1,width=\textwidth,height=.45\textheight,keepaspectratio]
{funktion.pdf}
auf diese Weise greift sich \hyperref nur den \includegraphics-Befehl, ohne dessen Argumente zu berücksichtigen.
Dir fehlt schlicht ein Paar geschweifter Klammern:
\hyperref[Anhang]{\includegraphics[page=1,width=\textwidth,height=.45\textheight,keepaspectratio]
{funktion.pdf}}

In Stefans erster Antwort waren die bereits enthalten :roll:

VG
Rainer
One of the joys of travel is visiting new towns and meeting new people---G.Khan (Robert Asprin, Another Fine Myth)

Antworten