Plain Text - Tex commands added

For my appendix the following code is created:

\part{Anhänge}
\label{scrivauto:57}
\appendix

\protect\href{LaTeX.org - Index page}{
}\printendnotes
\addcontentsline{toc}{chapter}{Fußnoten}

\bibliographystyle{unsrt}
\bibliography{//Users/xxx/Documents/…bib}

\printindex

I do not understand where the the following code comes from:
\href{LaTeX.org - Index page}{
}

My Project format does not contain this code and for my appendix i use the following code:

\protect

\printendnotes

\addcontentsline{toc}{chapter}{Fußnoten}

\bibliographystyle{unsrt}

\bibliography{//Users/xxx/Documents/…bib}

I want to scupress this \href code. How to do that?

Moved to a more appropriate category.

The short answer is that it would be coming from the Compile command. Look at the Section Layout that you’re using for the Appendix.

I suspect this is coming from the content in the binder, in this case. All the “Appendix” Section Layout adds to the text is:

\part{Section Title}
\label{scrivauto:<$linkID>}
\appendix

So anything after that point would be coming either from the “Appendix” folder (check to see if the folder has a little sheet of paper badge in the bottom right corner, and switch off the group view mode to examine it if so—but by default this Layout will not print folder text), or more likely, the first text section within that folder.

How hyperlinks themselves are marked up can be found in the Markup compile format option pane, at the very top. The stock Format does not add \protect, for one thing, and the formation of that link is kind of weird otherwise, in that it seems to have the visible text in the first argument, which should be the URL, and no argument for the visible text in the second bracket pair (which is valid I believe, it would just print the URL directly in that case). So I don’t quite know what is going on there, you may have modified your Markup settings, but the chances are high there is a URL somewhere in your content that is being treated as a hyperlink.

But there may be some confusion in the translation, as you pasted raw code without a code block into the forum here, so there is an actual hyperlink in your sample text, but that might be obscuring what the original was (the forum does try to pretty up raw URLs). If you edit your post, and use the </> button in the composition bar, you can paste code snippets between the markers and have it printed verbatim (like I did above).

Thanks for the tipps. There had been maby a hidden text. I tapped in the commands anew and a voila, no links any more. I am not familiar with rtf as a source format, so maybe some links are in the file but not visable?

Just a thought.

That may be a possibility. If it happens again, you could try selecting the region around where the link appears, right-clicking, and using the “Remove Link” command. If you don’t see that command then it detected no links and the problem remains mysterious, but that will otherwise nuke any and all link formatting from within the selection (including internal links between binder sections).

A Scrivener setting you might want to toggle is in the Corrections tab. Look for the checkbox that will detect URLs and turn them into links. If you do want to print URLs, but not have them be clickable in the PDF, then you would want that setting disabled.

Writing LaTeX content in an RTF editor can sometimes be a bit weird, but it does have its advantages as well (such as freeform editing highlights, purely cosmetic formatting, neatly presented footnotes/annotations, etc.).

1 Like