.zip 必须添加到章节中:
\begin{document}
.....
\chapter{Datasheet}\label{ch:attachment_B}{
\href{file.zip}{Click t download}.
}
\end{document}
顶部使用的包:
\documentclass[11pt,a4]{report}
\usepackage{pythonhighlight}
\usepackage[table]{xcolor}
\usepackage{booktabs,makecell,xltabular}
\usepackage{regexpatch}
\usepackage[os=mac]{menukeys}
\renewmenumacro{\keys}[+]{shadowedroundedkeys}
\renewmenumacro{\menu}[>]{angularmenus}
\xpatchcmd*{\SPACE}{2em}{1em}{}{}
\renewcommand{\tabularxcolumn}[1]{m{#1}}
\renewcommand{\arraystretch}{1.4}
\arrayrulecolor{gray!60!white}
\makeatletter
\renewcommand{\maketitle}{{\centering\sffamily{\LARGE\bfseries\@title}\par\vskip\baselineskip{\large\@date}\par}\vskip\baselineskip}
% nifty commands by Paul Gaborit from http://tex.stackexchange.com/a/236891/226
\def\setmenukeyswin{\def\tw@mk@os{win}}
\def\setmenukeysmac{\def\tw@mk@os{mac}}
\makeatother
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%5
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}
%\renewcommand{\rmdefault}{cmss}
\usepackage{verbatim,amsmath}
\usepackage{enumerate}
\usepackage{fancyhdr,fancyvrb}
\usepackage{graphicx,color,boxedminipage}
\usepackage{ragged2e,colortbl,appendix}
\usepackage{here,multirow,pdfpages}
\usepackage[font=small,labelfont=bf]{caption}
\usepackage{dirtree}
\usepackage{placeins}
\usepackage{xcolor}
\usepackage{lipsum,todonotes}
答案1
欢迎使用 TeX SE!我建议将*.zip
文件上传到某个云存储(例如Dropbox,Google 云端硬盘等),然后使用 进行超链接\href
,即
\documentclass[11pt,a4]{report}
\usepackage{pythonhighlight}
\usepackage[table]{xcolor}
\usepackage{booktabs,makecell,xltabular}
\usepackage{regexpatch}
\usepackage[os=mac]{menukeys}
\renewmenumacro{\keys}[+]{shadowedroundedkeys}
\renewmenumacro{\menu}[>]{angularmenus}
\xpatchcmd*{\SPACE}{2em}{1em}{}{}
\renewcommand{\tabularxcolumn}[1]{m{#1}}
\renewcommand{\arraystretch}{1.4}
\arrayrulecolor{gray!60!white}
\makeatletter
\renewcommand{\maketitle}{{\centering\sffamily{\LARGE\bfseries\@title}\par\vskip\baselineskip{\large\@date}\par}\vskip\baselineskip}
% nifty commands by Paul Gaborit from http://tex.stackexchange.com/a/236891/226
\def\setmenukeyswin{\def\tw@mk@os{win}}
\def\setmenukeysmac{\def\tw@mk@os{mac}}
\makeatother
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%5
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}
%\renewcommand{\rmdefault}{cmss}
\usepackage{verbatim,amsmath}
\usepackage{enumerate}
\usepackage{fancyhdr,fancyvrb}
\usepackage{graphicx,color,boxedminipage}
\usepackage{ragged2e,colortbl,appendix}
\usepackage{here,multirow,pdfpages}
\usepackage[font=small,labelfont=bf]{caption}
\usepackage{dirtree}
\usepackage{placeins}
\usepackage{xcolor}
\usepackage{lipsum,todonotes}
\begin{document}
\chapter{Datasheet}\label{ch:attachment_B}{
\href{<download link from a cloud storage>}{(Click to download)}.
}
\end{document}
如果我理解正确的话,你实际上想要做的是创建一个超链接来下载*.zip
你上传到背页项目。问题是 Overleaf 项目(包括*.zip
文件下载链接)是私有的,除非您决定允许其他用户通过电子邮件或打开链接共享来查看/编辑它。
我建议的解决方案是,您也可以将*.zip
文件上传到其他地方的云存储上
或者
打开 Overleaf 项目的链接共享(仅查看),然后使用里面的链接,\href
以便查看者可以手动导航并下载相应的*.zip
文件。希望这对您有所帮助。