Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for concatenation (Base.:*) #54

Closed
XQP-Munich opened this issue Oct 14, 2021 · 1 comment
Closed

Support for concatenation (Base.:*) #54

XQP-Munich opened this issue Oct 14, 2021 · 1 comment

Comments

@XQP-Munich
Copy link

XQP-Munich commented Oct 14, 2021

Currently, the concatenation of two LaTeXStrings using the operator * yields a String, not a LaTeXString.

I propose to overload Base.:*, to the effect of something like

function Base.:*(lhs::LaTeXString, rhs::LaTeXString)
	return LaTeXString(lhs.s[1:end-1]*rhs.s[2:end])
end

Note that this example is not a valid implementation, since LaTeXStrings do not need to start and end with $, for example when they contain text.

@stevengj
Copy link
Member

stevengj commented Nov 3, 2021

Duplicate of #17.

@stevengj stevengj closed this as completed Nov 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant