-
-
Notifications
You must be signed in to change notification settings - Fork 50
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
✨ Add latex formatter (for songs package) #107
base: master
Are you sure you want to change the base?
Conversation
95dc6e5
to
dc81920
Compare
f105c4f
to
d722f7d
Compare
d722f7d
to
c26a156
Compare
17c3ac8
to
980df5f
Compare
Hey @ftes, sorry to reply this late. Your PR looks nice! Just out of curiosity, do you have an example how this would be rendered by LaTex? There are two issues preventing this from being mergeble: Code Climate is complaining and the branch got out-of-date. Could you perhaps try to rebase the branch? Then I will try to find out what Code Climate is complaining about (it keeps saying it doesn't have an analysis 🤔) |
- Only supports a very limited subset of tags so far (artist, title, subtitle, comment, capo) - Other tags are simply rendered as `\textcomment` - The result has additional newlines, because some tags are filtered out to construct the first `\beginsong` line. If they were the sole item on their previous line, that line remains as an empty line.
980df5f
to
95301aa
Compare
Code Climate has analyzed commit 95301aa and detected 2 issues on this pull request. Here's the issue category breakdown:
View more on Code Climate. |
Code duplication found. Personally I would keep it duplicated rather than extracting 4 lines of code. I can't see how to mark this as |
@ftes Should we try and rebase this PR? CodeClimate does not have the PR analysis available... |
Hey @ftes. Would you like to get your branch merged? If not, I'll plan to use your implementation on a fresh branch (and credit you of course 😉 ) |
Please feel free to use it any way you please. Unfortunately I do not have
any time to spare at the moment. Thanks for asking!
…On Sun, Oct 11, 2020, 09:50 Martijn Versluis ***@***.***> wrote:
Hey @ftes <https://github.com/ftes>. Would you like to get your branch
merged? If not, I'll plan to use your implementation on a fresh branch (and
credit you of course 😉 )
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#107 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAT6LTA3XSYSF7TD23JT3R3SKFPS3ANCNFSM4ITKETBQ>
.
|
formatTag(tag) { | ||
switch (tag.name) { | ||
case COMMENT: | ||
return `\\textcomment{${tag.value}}`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be \\textnote{${tag.value}};
per the docs. \textcomment gives an error for me. However, the songs package does not support Intros, outros, breaks etc. A ''workaround'' for this is to use the \nolyrics option. For example:
\beginverse
{\nolyrics Outro:
\[G] \[D] \[A] \[F\#m] \[Em] \[D] \[A] \[Em]}
\endverse
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure how to implement that though...
\textcomment
\beginsong
line. If they were the sole item on their previous line, that line remains as an empty line.