Re: xr-hyper: reference zu Datei name

"Hendrik Seliger" (via tex-d-l Mailing List) <[email protected]>
Newsgroups gmane.comp.tex.german
Message-ID <[email protected]>
Schöne Sonntag!

Ich benutze dafür das Paket „currfile“, dann bekomme ich z. B. mit 
„\currfilebase“ den Namen (ohne Endung) der aktuell eingelesenen Datei. 
Nutze ich, um mit Python Übungsaufgaben aus einer Sammlung (für xsim) 
auszuwählen und dann den Dateinamen daneben zu setzen, damit ich 
hinterher noch weiß, wo das Ding herkam. Aber das Paket bietet noch 
mehr, Extension, Ordner etc.

  Beste Grüße
Hendrik Seliger

On 26.11.23 08:03, Uwe Brauer (via tex-d-l Mailing List) wrote:
>                                                        Nov 26, 2023 07:59
>
> Hallo
>
> Mit xr-hyper, kann ich zum Beispiel auf Gleichungen, Abschnitte, und
> auch Seiten von anderen Dateien verweisen, hier ist ein MWE
>
> Gibt es eine Möglichkeit auch den Datei Namen anzugeben.
> Also \fileref{B-} oder so etwas?
>
> Gruß
>
> Uwe Brauer
>
> --8<---------------cut here---------------start------------->8---
> \documentclass{article}
> \usepackage{xr-hyper}
> \usepackage[colorlinks]{hyperref}
> \externaldocument[B-]{docB}% <- full or relative path
> \externaldocument[C-]{./external/docC}% <- full or relative path
> \begin{document}
> \section{Introduction}
> \label{sec:introduction}
> This is a test for math.
> \begin{equation}
>    E=mc^2 \label{eq:1}
> \end{equation}
> This is a second test for math.
> \begin{equation}
>    r = \sqrt{x^2 + y^2} \label{eq:2}
> \end{equation}
> In document B Eq.~~(\ref{B-eq:x})
>
> Now test  (\autoref{C-eq:docC:1})
>
> The main result can be found in \nameref{B-sec:main-result}
> \end{document}
> --8<---------------cut here---------------end--------------->8---
>
> Und
>
> --8<---------------cut here---------------start------------->8---
> \documentclass{article}
> \usepackage{xr-hyper}
> \usepackage[colorlinks]{hyperref}
> \externaldocument[A-]{docA}
> \begin{document}
> \setcounter{equation}{5}
> \section{Main result}
> \label{sec:main-result}
>    As was shown in Eq.~(\ref{A-eq:1}) is it
>    ... or in Eq.~(\ref{A-eq:2}) is ...
>    \begin{equation}
>      \mathrm{e}^{i\pi}-1=0 \label{eq:x}
>    \end{equation}
> \end{document}
> --8<---------------cut here---------------end--------------->8---

-- 
FAQ: http://texfragen.de/
Durchsuchbares Archiv: https://www.listserv.dfn.de/sympa/arc/tex-d-l 
Unsubscribe/Verwaltung: https://www.listserv.dfn.de/sympa/info/tex-d-l
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.