Annotate ORCID author badges with their profile links

This commit is contained in:
gloamxun committed 2026-10-19 21:37:17 +08:00
1 parent 05d7980561
commit 2076da8f21
8 files changed
+52 -10

No files matched your search

+22
View File
@@ -88,6 +88,28 @@ fn hello_compiles_to_pdf() {
#[test]
fn arxiv_author_orcid_links_have_pdf_annotations() {
let path = PathBuf::from(env!("CARGO_MANIFEST_DIR"))
.join("fixtures")
.join("arxiv-template")
.join("template.tex");
let source = std::fs::read_to_string(&path).expect("read arXiv fixture");
let file_name = path.to_string_lossy().to_string();
let pdf = CompilerSession::default()
.compile(&source, &file_name)
.expect("arXiv PDF");
let text = String::from_utf8_lossy(&pdf);
assert!(
text.contains("/Subtype/Link"),
"ORCID links should be annotations"
);
assert!(
text.contains("orcid.org/0000-0000-0000-0000"),
"annotation should carry the ORCID URL"
);
}
#[test]
fn arxiv_fixture_is_three_letter_pages() {
let path = PathBuf::from(env!("CARGO_MANIFEST_DIR"))
.join("fixtures")