This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
tweaking_your_chant_output [2015/02/28 04:42] bgm [Tweaking your Chant Code] |
tweaking_your_chant_output [2015/03/20 16:14] (current) bgm [Colours] |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== Tweaking your Chant Code ====== | ||
| + | There are some tweaks that cannot be done in gabc code, and must be made, instead, in your tex file. Remember that if you include these in your " | ||
| + | |||
| + | Here are some links to some useful tex tutorials (in case this page doesn' | ||
| + | |||
| + | *[[https:// | ||
| + | *[[https:// | ||
| + | *[[https:// | ||
| + | |||
| + | Also, it is important to note that much of the ``tex`` code can be used right in with the ``gabc`` code. This will allow you to style the actual chant text. | ||
| + | All you have to do is place it in v-tags like this: | ||
| + | < | ||
| + | |||
| + | =====Initials===== | ||
| + | For fancy Initials //(tex)//: | ||
| + | <code Lua> | ||
| + | \newfontface\vectis{Vectis} | ||
| + | \def\greinitialformat# | ||
| + | {\fontsize{24}{24}\vectis #1}} | ||
| + | </ | ||
| + | |||
| + | =====Drop Caps===== | ||
| + | and making matching drop caps with the lettrine package //(tex)//: | ||
| + | <code Lua> | ||
| + | \renewcommand{\LettrineFontHook}{\vectis} | ||
| + | </ | ||
| + | |||
| + | |||
| + | =====Fonts===== | ||
| + | The LaTex package fontspec lets you use TrueType (.ttf) fonts. | ||
| + | <code lua> | ||
| + | \usepackage{fontspec} | ||
| + | </ | ||
| + | |||
| + | And then, if you've installed the font, you can set the font as the main font for your chant text. Now, notice below that //Gentium// is listed three times. | ||
| + | <code lua> | ||
| + | \setromanfont[BoldFont={Gentium Basic Bold}, | ||
| + | </ | ||
| + | |||
| + | If you want to change the font for a single word or two, try this: | ||
| + | <code lua> | ||
| + | \documentclass{article} | ||
| + | \usepackage{fontspec} | ||
| + | |||
| + | \newfontfamily\Gentium[Ligatures=TeX]{Gentium} | ||
| + | |||
| + | \begin{document} | ||
| + | This is in the normal font | ||
| + | \begin{center} | ||
| + | \Gentium\huge | ||
| + | This is in the Gentium font | ||
| + | \end{center} | ||
| + | and back in the normal font. | ||
| + | \end{document} | ||
| + | </ | ||
| + | |||
| + | To install a TrueType Font, place the files in this folder: | ||
| + | <code lua> | ||
| + | |||
| + | See this [[http:// | ||
| + | |||
| + | =====Text Styles===== | ||
| + | There are complete tex references out there, but here are some quickie text styles: | ||
| + | < | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | </ | ||
| + | {{: | ||
| + | |||
| + | |||
| + | =====Colours===== | ||
| + | You can change the colour of text like this: | ||
| + | <code lua> | ||
| + | %or | ||
| + | \textcolor{red}</ | ||
| + | |||
| + | So, for your commentary, try this: | ||
| + | <code lua> | ||
| + | |||
| + | For your annotations, | ||
| + | <code lua> | ||
| + | \setsecondannotation{\fontsize{10}{10}\sc{\textcolor{red}8.}}% | ||
| + | </ | ||
| + | |||
| + | Now, if you want coloured text within your chant text below the staves, then you can add the colour codes right in the gabc file like this: | ||
| + | <code lua>< | ||
| + | or, simply: | ||
| + | <code lua>< | ||
| + | but, for just a single character (such as a *), you have to do this to set the color back to the previous color: | ||
| + | <code lua>< | ||
| + | |||
| + | |||
| + | ++++Here is a sample score for colouring both text and staff right in the gabc file (click to unfold): | | ||
| + | <code lua> | ||
| + | %% | ||
| + | (c4)To(e)ta(e) | ||
| + | < | ||
| + | < | ||
| + | < | ||
| + | </ | ||
| + | |||
| + | ++++ | ||
| + | |||
| + | Here is a [[http:// | ||
| + | |||
| + | =====Annotations===== | ||
| + | Annotations: | ||
| + | <code Lua> | ||
| + | \setfirstannotation{\tiny Ant.}% | ||
| + | \setsecondannotation{\tiny \sc{iii}} | ||
| + | </ | ||
| + | or, in gabc: | ||
| + | < | ||
| + | annotation: Ant.; | ||
| + | annotation: 5; | ||
| + | </ | ||
| + | |||
| + | =====Page Size===== | ||
| + | Place this toward the top of the .tex file somewhere around < | ||
| + | <code Lua> | ||
| + | %set the margins of the outputted page | ||
| + | \usepackage[papersize={4.5in, | ||
| + | %or you can use this: | ||
| + | \geometry{letterpaper} | ||
| + | </ | ||
| + | |||
| + | =====Text Size===== | ||
| + | Toward the end of the .tex file, find where your score-tex file is included.\\ | ||
| + | Wrap that in size tags. You can use any of these: < | ||
| + | <code lua> | ||
| + | \begin{tiny} | ||
| + | \includescore{# | ||
| + | \end{tiny} | ||
| + | </ | ||
| + | You can also use those tags on your title. | ||
| + | <code lua> | ||
| + | \begin{center}\begin{huge}\textsc{My Chant Title}\end{huge}\end{center} | ||
| + | </ | ||
| + | Another thing you should probably do is to install two tex packages (you can use //texlive// just as well as // | ||
| + | <code lua> | ||
| + | %increase the text size to 20 for the entire document | ||
| + | \usepackage[fontsize=20]{scrextend} | ||
| + | </ | ||
| + | Here is a screenshot of the Texlive Manager Package Installer: {{gregowiki: | ||
| + | |||
| + | See also [[http:// | ||
| + | |||
| + | =====Staff Width===== | ||
| + | Place this after the < | ||
| + | <code Lua> | ||
| + | %control the width of the staff and accompanying text | ||
| + | \textwidth 4.5in | ||
| + | </ | ||
| + | |||
| + | =====Red Staff===== | ||
| + | <code lua> | ||
| + | % We set red lines here, comment it if you want black ones. | ||
| + | \redlines | ||
| + | </ | ||
| + | |||
| + | =====Staff Break===== | ||
| + | Adding < | ||
| + | This is useful if you want to force-fill a line. | ||
| + | |||
| + | =====Custos===== | ||
| + | * You can suppress the //custos// at the end of a staff by placing ``\greblockcustos`` in the tex template just after ``\begin{document}`` . | ||
| + | * To add a //custos// within the staff, perhaps before the // | ||
| + | * To manually place a custos anywhere, use ``g+`` or ``h+`` where the letter is the level you want the marker. | ||
| + | |||
| + | |||
| + | =====Nonbreaking Space===== | ||
| + | In the gabc file, there are several things you can do: | ||
| + | * Try putting ``!`` before spaces. | ||
| + | * Put a regular space within the neum's parenthesis: | ||
| + | * Put a space within the text area(the separators are just to show the boundary: | ||
| + | |||
| + | |||
| + | Another thing you can do is to use a //neumatic cut//, which is just this: ``/`` or ``/````/`` | ||
| + | |||
| + | And if you place a ``!`` before a ``/`` then it makes the //neumatic cut// unbreakable across staves: ``!/`` | ||
| + | |||
| + | |||
| + | =====Increase spacing===== | ||
| + | These two tricks can be inserted in your main tex code just before the inclusion of your tex score. | ||
| + | <code lua> | ||
| + | \tolerance=9999 %(or less) | ||
| + | \pretolerance=500 | ||
| + | </ | ||
| + | |||
| + | =====Forced Syllables===== | ||
| + | Say you need to force hyphens to appear between syllables. | ||
| + | <code lua> | ||
| + | |||
| + | =====Change Clefs===== | ||
| + | Changing Clefs midstaff is easy - just type your clef within the parentheses of the last double-bar, like this: ``(::c3)``. | ||
| + | =====Compress Space===== | ||
| + | * Reduce the spacing between syllables or glyphs: ``\hspace{-.2ex}`` | ||
| + | * or, put the syllables or glyphs between inside this: ``\mbox{…}`` | ||
| + | * or, use ``( z)`` to push the neums closer to the start of the staff. | ||
| + | |||
| + | =====Indents===== | ||
| + | * To remove any unwanted indentations, | ||
| + | |||
| + | |||
| + | |||
| + | Back to [[Start]] Page | ||