input command works inside footnote, but not inside thanks

I have two LaTeX documents (research papers, paper1.tex and paper2.tex) that share the same acknowledgements (“I would like to thank X for comments, Y for funding, …”). These get updated periodically and rather than update them in both papers, I created a acknowledgements.tex file. Elsewhere I tried using a construction like footnote{input{filename.tex}} which worked well and it works here as well as long as I use it in the body of the text. Putting it in a section title at first throws errors which can be fixed using protect or includepackage[stable]{footmisc} (as recommended here). But when I put in the title footnote title{My titlethanks{input{acknowledgements.tex}}, I get the following errors (which neither protect nor includepackage[stable]{footmisc} can resolve):

MWE

Make two .tex documents and put them in the same folder. The first is called paper.tex and contains:

documentclass[pdf, letterpaper, 11pt]{article}

begin{document}
% title{My titleprotectthanks{input{test.tex}}}
% title{My titlethanks{input{test.tex}}}
title{My titlethanks{test}}
author{It's me}

maketitle

end{document}

while the second is called test.tex and just contains the word test. Uncommenting the first or second title in favor of the last replicates the error.

Log file

This is pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX Live 2019) (preloaded format=pdflatex 2020.2.20)  8 SEP 2024 14:23
entering extended mode
 restricted write18 enabled.
 file:line:error style messages enabled.
 %&-line parsing enabled.
**paper.tex
(./paper.tex
LaTeX2e <2018-12-01>
(/usr/local/texlive/2019/texmf-dist/tex/latex/base/article.cls
Document Class: article 2018/09/03 v1.4i Standard LaTeX document class
(/usr/local/texlive/2019/texmf-dist/tex/latex/base/size11.clo
File: size11.clo 2018/09/03 v1.4i Standard LaTeX file (size option)
)
c@part=count80
c@section=count81
c@subsection=count82
c@subsubsection=count83
c@paragraph=count84
c@subparagraph=count85
c@figure=count86
c@table=count87
abovecaptionskip=skip41
belowcaptionskip=skip42
bibindent=dimen102
)

LaTeX Warning: Unused global option(s):
    [pdf].

(./paper.aux)
openout1 = `paper.aux'.

LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 3.
LaTeX Font Info:    ... okay on input line 3.
LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 3.
LaTeX Font Info:    ... okay on input line 3.
LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 3.
LaTeX Font Info:    ... okay on input line 3.
LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 3.
LaTeX Font Info:    ... okay on input line 3.
LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 3.
LaTeX Font Info:    ... okay on input line 3.
LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 3.
LaTeX Font Info:    ... okay on input line 3.
LaTeX Font Info:    External font `cmex10' loaded for size
(Font)              <17.28> on input line 9.
LaTeX Font Info:    External font `cmex10' loaded for size
(Font)              <12> on input line 9.
LaTeX Font Info:    Try loading font information for OMS+cmr on input line 9.
 (/usr/local/texlive/2019/texmf-dist/tex/latex/base/omscmr.fd
File: omscmr.fd 2014/09/29 v2.5h Standard LaTeX font definitions
)
LaTeX Font Info:    Font shape `OMS/cmr/m/n' in size <12> not available
(Font)              Font shape `OMS/cmsy/m/n' tried instead on input line 9.

./paper.tex:9: Use of @xfootnotemark doesn't match its definition.
@ifnextchar ... reserved@d =#1def reserved@a {
                                                  #2}def reserved@b {#3}f...
l.9 maketitle
              
If you say, e.g., `defa1{...}', then you must always
put `1' after `a', since control sequence names are
made up of letters only. The macro here has not been
followed by the required stuff, so I'm ignoring it.

./paper.tex:9: Argument of @iinput has an extra }.
<inserted text> 
                par 
l.9 maketitle
              
I've run across a `}' that doesn't seem to match anything.
For example, `defa#1{...}' and `a}' would produce
this error. If you simply proceed now, the `par' that
I've just inserted will cause me to report a runaway
argument that might be the root of the problem. But if
your `}' was spurious, just type `2' and it will go away.

Runaway argument?
./paper.tex:9: Paragraph ended before @iinput was complete.
<to be read again> 
                   par 
l.9 maketitle
              
I suspect you've forgotten a `}', causing me to apply this
control sequence to too much text. How can we recover?
My plan is to forget the whole thing and hope for the best.

./paper.tex:9: Missing endcsname inserted.
<to be read again> 
                   csnameendcsname 

[THIS ERROR GETS REPEATED 100 TIMES WHICH I WON'T COPY HERE]
              
(That makes 100 errors; please try again.) 
Here is how much of TeX's memory you used:
 229 strings out of 492616
 2688 string characters out of 6129481
 60046 words of memory out of 5000000
 4233 multiletter control sequences out of 15000+600000
 5767 words of font info for 21 fonts, out of 8000000 for 9000
 1141 hyphenation exceptions out of 8191
 36i,5n,33p,117b,245s stack positions out of 5000i,500n,10000p,200000b,80000s

./paper.tex:9:  ==> Fatal error occurred, no output PDF file produced!

6

Place the protect right before input:

documentclass[letterpaper, 11pt]{article}

begin{document}

 title{My titlethanks{protectinput{test.tex}}}
author{It's me}

maketitle

end{document}

1

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật