Yes, I would rather to have something more similar to superscript and comma in the normal text
(with maybe bigger space after the comma as it is now in the first example, I want to suppress the space before the comma , #author_strings.join(", ", last: " & ") seems to be ok
I apologize for my messy example, it was confusing (I made code example by removing ORICID part , that introduced innecesary space before superscript), the problem for me is the space after superscript
Hi @danborek,
I marked the lines where you have the problem:
let author_string = [ // <-- Here
#box[
#if authors.len() > 1 {
a.name
super(author_affiliation)
} else {
a.name
}
]
] // <-- And here is your problem
To demonstrate your problem I created a minimal example.
Example
#repr(
[// <-- Here
#box()[test]
]// <-- And here
)
Which results in the following:
Notice the single space content [ ] before and after the block.
To fix it in your example you can either replace the square brackets with curly braces and remove the hash symbol of the block or simply remove the brackets and start with the block directly after the equal, like you did five lines above with the if.
thank you, It your pointing to solves my problem spaces, I want iteratively add authors
for a in authors {
let author_string = {
a.name
if authors.len() > 1 {super(a.affiliation)}
if a.keys().contains("email") {[\*]}
}}
the last thing I want to ensure is that the author names or its affiliation will not be split between lines, does {} around authore_string will have the same properties as box[]?
let author_strings = ()
for a in authors {
let author_string = box[#{
a.name
if authors.len() > 1 {super(a.affiliation)}
if a.keys().contains("email") {[\*]}
}
]
author_strings.push(author_string)
}