Closed Lamera closed 2 years ago
Hi :)
- Is it possible to shrink down only parts of the document fonts (for ex. one song or one line of a song)? I have some songs where the line doesn't fit into one line and the text runs out of the paper on the right hand.
Well, this isn't supported out of the box, but yes, it is possible using the "HTML" feature that I added as part of issue #9. Basically, in the template, you need to add these two new inline-partial definitions:
{{#*inline "small"}}\small{}{{/inline}}
{{#*inline "/small"}}\normalsize{}{{/inline}}
I recommend adding these just after the verse-label
inline. (You can also use even smaller size than \small
, see here for more.)
After that, in the markdown, you can "call" these two inlines with "html" like this (mind the newline before the start of verse):
<small>
4. If my true love she'll not come
Then I'll surely find another
To pull wild mountain thyme
All around the bloomin' heather.
Will ye go lassie go? !>
</small>
Or even just some part of text like Will <small>ye go las</small>sie go? !>
The only problem with this is I added the feature quite recently and its not released yet. You can download a nightly binary for linux from the CI (in the Artifacts section.) and use that. Unfortunatelly this feature isn't yet documented, I am currently in the process of rewriting the documentation (you can sneak-peek at bard.md), but it's work in progress and there's quite a lot of it to write still.
- Is it possible to format the second chord set side by side instead of on top of each other (to save space for ex. 2nd chord set in brackets)?
Yes, by, modifying the template again. Find the inline that defines chord formatting, it looks like this:
{{#*inline "i-chord"~}}
\begin{tabular}[b]{l}
{{> chord-style}}{ {{{~ pre chord ~}}} }}\\
{{~#if alt_chord}}{{> chord-style}}\color{blue}{ {{{~ pre alt_chord ~}}} }}\\ {{~/if~}}
{{~#each inlines}}{{> (lookup this "type") }}{{/each~}}\mbox{}\end{tabular}
{{~/inline}}
The double slash \\
is what makes a newline in this context. You just need to remove the first double slash and move the second one to the end of line like this:
{{~#if alt_chord}}{{> chord-style}}\color{blue}{ {{{~ pre alt_chord ~}}} }} {{~/if~}}\\
It seemed to me that color distinction is enough, but you can add brackest by wrapping the {{{~ pre alt_chord ~}}}
expression in brackets: ({{{~ pre alt_chord ~}}})
.
- How can I set the !> reference to bold?
Similar thing, in the template, find the i-chord-ref
inline:
{{#*inline "i-chorus-ref"}}{{ prefix_space }}\emph{ {{~ @root.book.chorus_label }}{{ num }}.}{{/inline}}
And replace the \emph
command with \textbf
.
- Setting text to italic doesn't work, but mark text as bold works fine. Is this probably a bug in the handlebars file?
That is strange, it works on my end. This might be a fonts issue. When you add a subtitle (## Something
), is it rendered in italics? It's supposed to.
Wow, Thank you very much! I could follow your steps and it's all working. Number 4 is working now too. Must be a font issue. After replacing «DejaVu Sans» with «Liberation Sans» italic works.
Hi again @vojtechkral :-) I have now translated a few Word documents into Markdown. It works really well! Now it comes to formatting. A few questions:
!>
reference to bold?Thanks for your help.