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

Multiline initial #1491

Open
wants to merge 28 commits into
base: ctan
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
dfc3b55
Force rebuild of font database (including metrics) before building docs
rpspringuel Dec 3, 2019
22db9a2
Refactor `\gre@initiallines` to `\gre@count@initiallines`
rpspringuel Mar 1, 2020
45e40be
Remove obsolete code error for biginitial style
rpspringuel Mar 8, 2020
7d77fde
Refactor gre@setinitial
rpspringuel Mar 8, 2020
cc53d4a
Remove gre@biginitial flag
rpspringuel Mar 9, 2020
4a5cd3f
Use GNU sed for the checking scripts
rpspringuel Mar 9, 2020
63612e5
Undo develop only changes
rpspringuel Mar 9, 2020
3d2f93c
Fix typos
rpspringuel Mar 9, 2020
ba9ecb4
Update documentation to account for refactoring
rpspringuel Mar 9, 2020
0647b72
Remove backup line adjustment
rpspringuel Mar 10, 2020
74592b0
Move initial setting to main
rpspringuel Mar 15, 2020
a47d949
Rename gre@knownline to gre@count@knownline
rpspringuel Mar 16, 2020
8a28943
Stop double counting initialraise
rpspringuel Mar 16, 2020
aaa54b6
Refactor initial height calculation
rpspringuel Mar 16, 2020
096fcfa
Account for number of staff lines in initial placement
rpspringuel Mar 16, 2020
8106316
Use existing staffheight
rpspringuel Mar 17, 2020
f4358ab
Comment not needed anymore
rpspringuel Mar 17, 2020
522774a
Refactoring to make more use of staffheight where appropriate
rpspringuel Mar 17, 2020
53fc493
Refactor
rpspringuel Mar 17, 2020
4ff485e
Allow initials to occupy an arbitrary number of lines.
rpspringuel Mar 18, 2020
db016df
Add semi-manual mode for determining where initials end
rpspringuel Mar 18, 2020
d242e0d
Merge branch 'ctan' into multiline_initial
rpspringuel Feb 7, 2021
a24036b
Find GNU sed
rpspringuel Feb 7, 2021
dfab895
Convert the initial ending style flag to a boolean
rpspringuel Feb 8, 2021
c8fa392
Documentation for current state of multi-line initials
rpspringuel Feb 8, 2021
4393a2d
Merge branch 'ctan' into multiline_initial
rpspringuel Feb 8, 2021
01b6dc2
Merge branch 'ctan' into multiline_initial
rpspringuel Feb 18, 2021
39d9496
Trying to lower the initial to match the right baseline when dealing …
rpspringuel Feb 21, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 39 additions & 28 deletions def_check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,17 @@

HERE=`pwd`

if sed --version 2&> /dev/null; then
SED=sed
elif gsed --version 2&> /dev/null; then
SED=gsed
else
echo "I can't find GNU sed."
echo "Please install it and try again."
return 1
fi


TEXFILE=$HERE/tex.txt
CFILE=$HERE/c.txt
DIFFFILE=$HERE/diff.txt
Expand All @@ -26,30 +37,30 @@ grep -hE '\\let\\Gre.*' *.tex *.sty >> $TEXFILE
grep -h '\\gredefsymbol{Gre.*' *.tex *.sty >> $TEXFILE

#remove deprecated code
sed -i.temp 's:.*OBSOLETE.*::' $TEXFILE
sed -i.temp 's:.*DEPRECATED.*::' $TEXFILE
$SED -i.temp 's:.*OBSOLETE.*::' $TEXFILE
$SED -i.temp 's:.*DEPRECATED.*::' $TEXFILE

#Isolate function names
sed -i.temp 's:Gre:\
$SED -i.temp 's:Gre:\
Gre:g' $TEXFILE
sed -i.temp '/Gre/!d' $TEXFILE
sed -i.temp 's:\(Gre[a-zA-Z]*\).*:\1:' $TEXFILE
$SED -i.temp '/Gre/!d' $TEXFILE
$SED -i.temp 's:\(Gre[a-zA-Z]*\).*:\1:' $TEXFILE

#remove bar lines (these names are assembled piecemeal, not whole)
sed -i.temp 's:^GreDivisioFinalis$::' $TEXFILE
sed -i.temp 's:^GreDivisioMaior$::' $TEXFILE
sed -i.temp 's:^GreDivisioMinima$::' $TEXFILE
sed -i.temp 's:^GreDivisioMinor$::' $TEXFILE
sed -i.temp 's:^GreDominica$::' $TEXFILE
sed -i.temp 's:^GreVirgula$::' $TEXFILE
sed -i.temp 's:^GreFinalDivisioFinalis$::' $TEXFILE
sed -i.temp 's:^GreFinalDivisioMaior$::' $TEXFILE
sed -i.temp 's:^GreInDivisioFinalis$::' $TEXFILE
sed -i.temp 's:^GreInDivisioMaior$::' $TEXFILE
sed -i.temp 's:^GreInDivisioMinima$::' $TEXFILE
sed -i.temp 's:^GreInDivisioMinor$::' $TEXFILE
sed -i.temp 's:^GreInDominica$::' $TEXFILE
sed -i.temp 's:^GreInVirgula$::' $TEXFILE
$SED -i.temp 's:^GreDivisioFinalis$::' $TEXFILE
$SED -i.temp 's:^GreDivisioMaior$::' $TEXFILE
$SED -i.temp 's:^GreDivisioMinima$::' $TEXFILE
$SED -i.temp 's:^GreDivisioMinor$::' $TEXFILE
$SED -i.temp 's:^GreDominica$::' $TEXFILE
$SED -i.temp 's:^GreVirgula$::' $TEXFILE
$SED -i.temp 's:^GreFinalDivisioFinalis$::' $TEXFILE
$SED -i.temp 's:^GreFinalDivisioMaior$::' $TEXFILE
$SED -i.temp 's:^GreInDivisioFinalis$::' $TEXFILE
$SED -i.temp 's:^GreInDivisioMaior$::' $TEXFILE
$SED -i.temp 's:^GreInDivisioMinima$::' $TEXFILE
$SED -i.temp 's:^GreInDivisioMinor$::' $TEXFILE
$SED -i.temp 's:^GreInDominica$::' $TEXFILE
$SED -i.temp 's:^GreInVirgula$::' $TEXFILE


#label file
Expand All @@ -68,20 +79,20 @@ grep -hE '\\\\Gre.*' gabc-notes-determination.l >> $CFILE
grep -hE '\\\\Gre.*' gabc-score-determination.y >> $CFILE

#remove deprecated code
sed -i.temp 's:.*OBSOLETE.*::' $CFILE
sed -i.temp 's:.*DEPRECATED.*::' $CFILE
$SED -i.temp 's:.*OBSOLETE.*::' $CFILE
$SED -i.temp 's:.*DEPRECATED.*::' $CFILE

#Isolate function names
sed -i.temp 's:Gre:\
$SED -i.temp 's:Gre:\
Gre:g' $CFILE
sed -i.temp '/Gre/!d' $CFILE
sed -i.temp 's:\(Gre[a-zA-Z]*\).*:\1:' $CFILE
$SED -i.temp '/Gre/!d' $CFILE
$SED -i.temp 's:\(Gre[a-zA-Z]*\).*:\1:' $CFILE

#remove prefixes of assembled function names
sed -i.temp 's:^Gre$::' $CFILE
sed -i.temp 's:^GreCP$::' $CFILE
sed -i.temp 's:^GreFinal$::' $CFILE
sed -i.temp 's:^GreIn$::' $CFILE
$SED -i.temp 's:^Gre$::' $CFILE
$SED -i.temp 's:^GreCP$::' $CFILE
$SED -i.temp 's:^GreFinal$::' $CFILE
$SED -i.temp 's:^GreIn$::' $CFILE

#label file
echo "00 Macros Written by C" >> $CFILE
Expand Down
10 changes: 8 additions & 2 deletions doc/Command_Index_User.tex
Original file line number Diff line number Diff line change
Expand Up @@ -912,14 +912,20 @@ \subsubsection{Text Elements}

\textbf{Nota Bene:} Usually the argument of this command should be an \verb=\includegraphics= command, but you may use what ever you want as the illuminated initial.

\macroname{\textbackslash gresetinitiallines}{\{\#1\}}{gregoriotex-syllable.tex}
\macroname{\textbackslash gresetinitiallines}{\{\#1\}}{gregoriotex-main.tex}
Sets the number of lines the score initial requires.

\begin{argtable}
\#1 & number & The number of lines required by the initial. If \texttt{0}, the score will have no separated initial.\\
\end{argtable}

\textbf{Nota Bene:} As currently implemented, you cannot set an initial which is larger than 2 lines and in order to do so you must set manual line breaks in the gabc for the first two lines.
\macroname{\textbackslash gresetinitialend}{\{\#1\}}{gregoriotex-main.tex}
Indicates how the end of the initial is indicated in the gabc.

\begin{argtable}
\#1 & \texttt{manual} & Every line that is next to the initial is ended with a \texttt{z} or \texttt{Z} in the gabc\\
& \texttt{semi-manual} & Only the last line that is next to the initial is ended with a \texttt{z} or \texttt{Z} in the gabc
\end{argtable}

\macroname{\textbackslash gresetmodenumbersystem}{\{\#1\}}{gregoriotex-main.tex}
Sets the number system used for the mode number.
Expand Down
28 changes: 8 additions & 20 deletions doc/Command_Index_internal.tex
Original file line number Diff line number Diff line change
Expand Up @@ -481,20 +481,14 @@ \section{Gregorio\TeX{} Controls}
\macroname{\textbackslash gre@noinitial}{}{gregoriotex-main.tex}
Macro called when no initial is being set.

\macroname{\textbackslash gre@setbiginitial}{}{gregoriotex-main.tex}
Macro which indicates that a 2-line initial is desired.

\macroname{\textbackslash gre@setinitial}{\#1}{gregoriotex-main.tex}
Macro to set the initial in the score.

\macroname{\textbackslash gre@adjustsecondline}{}{gregoriotex.tex}
Macro to call before first syllable, but after \verb=\GreSetInitialClef=.

\macroname{\textbackslash gre@adjustthirdline}{}{gregoriotex-main.tex}
Macro to call during the second line.

\macroname{\textbackslash gre@adjustlineifnecessary}{}{gregoriotex-main.tex}
Macro that calls \verb=\gre@adjustthirdline= if indicated by \verb=\ifgre@thirdlineadjustmentnecessary=.
\macroname{\textbackslash gre@adjustlinesafterinitial}{}{gregoriotex-main.tex}
Macro that call adjusts the line length after the lines next to the initial are completed.

\macroname{\textbackslash gre@addspaceabove}{}{gregoriotex-main.tex}
Macro to increase the space above the lines to account for above lines text.
Expand Down Expand Up @@ -561,7 +555,7 @@ \section{Gregorio\TeX{} Controls}
\macroname{\textbackslash gre@updatelinewidth}{}{gregoriotex-main.tex}
Macro to shorten the lines to account for the presence of the initial.

\macroname{\textbackslash gre@knownline}{}{gregoriotex-main.tex}
\macroname{\textbackslash gre@count@knownline}{}{gregoriotex-main.tex}
A count which keeps track of which line of the score we’re on.

\macroname{\textbackslash gre@lastoflinecount}{}{gregoriotex-main.tex}
Expand Down Expand Up @@ -747,9 +741,6 @@ \section{Gregorio\TeX{} Controls}
\macroname{\textbackslash gre@newglyphcommon}{}{gregoriotex-syllable.tex}
Macro called before each glyph.

\macroname{\textbackslash gre@normalinitial}{}{gregoriotex-main.tex}
Macro called at the end of the score to ensure that a big initial setting doesn’t carry into the next score.

\macroname{\textbackslash greoldcatcode}{}{gregoriotex.tex}
Macro to store the catcode for ``@'' so that we can use said symbol in function names under Plain \TeX\ and then restore the original catcode after the package is done loading.

Expand Down Expand Up @@ -1709,9 +1700,6 @@ \subsection{Flags}
Boolean used to specify whether divisio braces should be drawn by \MP{} as
opposed to rendered via the score font.

\macroname{\textbackslash gre@biginitial}{}{gregoriotex-main.tex}
Count to track whether the initial is big (2-lines) or normal (1-line).

\macroname{\textbackslash ifgre@boxing}{}{gregoriotex-syllable.tex}
Boolean to track whether we’re placing the contents of syllable notes into their box or actually printing that box (helps prevent spurious spaces from occurring when the box is being filled but not printed).

Expand Down Expand Up @@ -1847,9 +1835,6 @@ \subsection{Flags}
\macroname{\textbackslash ifgre@possibleluahyphenafterthissyllable}{}{gregoriotex-syllable.tex}
Boolean set by \verb=\GreSyllable= indicating if the Lua pass may add an hyphen after the syllable, used by \verb=\gre@calculate@eolshift= for protrusion calculation.

\macroname{\textbackslash ifgre@thirdlineadjustmentnecessary}{}{gregoriotex-syllable.tex}
Boolean which indicates that a third-line adjustment to staff line width is necessary.

\macroname{\textbackslash ifgre@scale@stafflinefactor}{}{gregoriotex-spaces.tex}
Boolean indicating whether the stafflinefactor should scale with changes of \texttt{grefactor}, or not.

Expand Down Expand Up @@ -1936,8 +1921,11 @@ \subsection{Flags}
\macroname{\textbackslash ifgre@showabovelinestext}{}{gregoriotex-main.tex}
Boolean indicating whether the above lines text should be shown.

\macroname{\textbackslash gre@initiallines}{}{gregoriotex-syllable.tex}
Number of lines the initial takes up. Currently limited to 0, 1, or 2. Not currently a count, but will be changed to one in 5.0.
\macroname{\textbackslash gre@count@initiallines}{}{gregoriotex-syllable.tex}
Number of lines the initial takes up. Currently limited to 0, 1, or 2.

\macroname{\textbackslash ifgre@manualinitialend}{}{gregoriotex-syllable.tex}
Boolean indicating whether all lines in the initial are indicated with a \texttt{z} or \texttt{Z} in the gabc (true), or if only the list line is so indicated (false).

\macroname{\textbackslash ifgre@rewritethissyllable}{}{gregoriotex-syllable.tex}
Boolean indicating that a syllable should be rewritten to improve ligature rendering.
Expand Down
103 changes: 57 additions & 46 deletions doc_check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,17 @@

HERE=`pwd`

if sed --version 2&> /dev/null; then
SED=sed
elif gsed --version 2&> /dev/null; then
SED=gsed
else
echo "I can't find GNU sed."
echo "Please install it and try again."
return 1
fi


CODEFILE=$HERE/code.txt
DOCFILE=$HERE/doc.txt
DIFFFILE=$HERE/diff.txt
Expand All @@ -32,73 +43,73 @@ grep -h '\\font\\' *.tex *.sty >> $CODEFILE
grep -h '\\gredefsymbol{.*' *.tex *.sty >> $CODEFILE

#remove deprecated code
sed -i.temp 's:.*@empty@.*::' $CODEFILE
sed -i.temp 's:.*OBSOLETE.*::' $CODEFILE
sed -i.temp 's:.*DEPRECATED.*::' $CODEFILE
$SED -i.temp 's:.*@empty@.*::' $CODEFILE
$SED -i.temp 's:.*OBSOLETE.*::' $CODEFILE
$SED -i.temp 's:.*DEPRECATED.*::' $CODEFILE

#remove trailing comments
sed -i.temp 's/%.*$//' $CODEFILE
$SED -i.temp 's/%.*$//' $CODEFILE

#remove whitespace
sed -i.temp 's/^[ \t]*//;s/[ \t]*$//' $CODEFILE
$SED -i.temp 's/^[ \t]*//;s/[ \t]*$//' $CODEFILE

#remove new and trailing code
sed -i.temp 's:.*\\new[a-z]*{*\(\\*[a-zA-Z@]*\)[\\}]*.*:\1:' $CODEFILE
$SED -i.temp 's:.*\\new[a-z]*{*\(\\*[a-zA-Z@]*\)[\\}]*.*:\1:' $CODEFILE

#get rid of work around def
sed -i.temp '/\\def\\x/d' $CODEFILE
$SED -i.temp '/\\def\\x/d' $CODEFILE

#accept only first def on line
sed -i.temp -E 's:\\[gex]?def:special:' $CODEFILE
$SED -i.temp -E 's:\\[gex]?def:special:' $CODEFILE
#remove def and definition
sed -i.temp -E 's:.*special[a-z]*(\\[a-zA-Z@]*)[#{[].*:\1:' $CODEFILE
$SED -i.temp -E 's:.*special[a-z]*(\\[a-zA-Z@]*)[#{[].*:\1:' $CODEFILE

#remove let and definition
sed -i.temp 's:.*\\let[a-z]*\(\\[a-zA-Z@]*\)[\\=].*:\1:' $CODEFILE
$SED -i.temp 's:.*\\let[a-z]*\(\\[a-zA-Z@]*\)[\\=].*:\1:' $CODEFILE

#remove gredefsymbol and definition
sed -i.temp 's:.*\\gredefsymbol{\([A-Za-z]*\)}.*:\\\1:' $CODEFILE
$SED -i.temp 's:.*\\gredefsymbol{\([A-Za-z]*\)}.*:\\\1:' $CODEFILE

#remove csname
sed -i.temp 's:.*\(\\csname.*\\endcsname\).*::' $CODEFILE
$SED -i.temp 's:.*\(\\csname.*\\endcsname\).*::' $CODEFILE

#colors
grep -hE '\\definecolor.*' *.sty >> $CODEFILE
sed -i.temp 's:\\definecolor{\([a-zA-Z]*\)}.*:\1:' $CODEFILE
$SED -i.temp 's:\\definecolor{\([a-zA-Z]*\)}.*:\1:' $CODEFILE

#counts
sed -i.temp 's:.*gre@space@count@\([a-z@]*\).*:\1:' $CODEFILE
$SED -i.temp 's:.*gre@space@count@\([a-z@]*\).*:\1:' $CODEFILE

#distances
grep -h '\\grecreatedim{.*' gsp-default.tex >> $CODEFILE
sed -i.temp 's:\\grecreatedim{\([a-z@]*\)}.*:\1:' $CODEFILE
sed -i.temp 's:.*gre@space@.*::' $CODEFILE
$SED -i.temp 's:\\grecreatedim{\([a-z@]*\)}.*:\1:' $CODEFILE
$SED -i.temp 's:.*gre@space@.*::' $CODEFILE

#styles
sed -i.temp 's:.*endgre@style@::' $CODEFILE
sed -i.temp 's:.*gre@style@::' $CODEFILE
$SED -i.temp 's:.*endgre@style@::' $CODEFILE
$SED -i.temp 's:.*gre@style@::' $CODEFILE

#fonts
sed -i.temp 's:.*\\font\(\\.*\)=.*:\1:' $CODEFILE
$SED -i.temp 's:.*\\font\(\\.*\)=.*:\1:' $CODEFILE

#temp registers
sed -i.temp 's:.*dimen@temp@.*::' $CODEFILE
sed -i.temp 's:.*skip@temp@.*::' $CODEFILE
sed -i.temp 's:.*count@temp@.*::' $CODEFILE
$SED -i.temp 's:.*dimen@temp@.*::' $CODEFILE
$SED -i.temp 's:.*skip@temp@.*::' $CODEFILE
$SED -i.temp 's:.*count@temp@.*::' $CODEFILE

#registers for saved values
sed -i.temp 's:\\gre@saved@.*::' $CODEFILE
sed -i.temp '/\\ifgre@saved@.*/d' $CODEFILE
$SED -i.temp 's:\\gre@saved@.*::' $CODEFILE
$SED -i.temp '/\\ifgre@saved@.*/d' $CODEFILE

#macros used to process options
sed -i.temp 's:\\gre@autocompile::' $CODEFILE
sed -i.temp 's:\\gre@forcecompile::' $CODEFILE
sed -i.temp 's:\\gre@nevercompile::' $CODEFILE
$SED -i.temp 's:\\gre@autocompile::' $CODEFILE
$SED -i.temp 's:\\gre@forcecompile::' $CODEFILE
$SED -i.temp 's:\\gre@nevercompile::' $CODEFILE

#block documented items
sed -i.temp 's:\\gre@pitch.*::' $CODEFILE
sed -i.temp 's:.*gre@char@he@.*::' $CODEFILE
sed -i.temp 's:\\gre@protrusionfactor@.*::' $CODEFILE
$SED -i.temp 's:\\gre@pitch.*::' $CODEFILE
$SED -i.temp 's:.*gre@char@he@.*::' $CODEFILE
$SED -i.temp 's:\\gre@protrusionfactor@.*::' $CODEFILE

#label file
echo "00 Macros Defined in TeX" >> $CODEFILE
Expand All @@ -116,30 +127,30 @@ grep -h '\\begin{gdimension}{.*' *.tex >> $DOCFILE
grep -h '\\begin{gcount}{.*' *.tex >> $DOCFILE

#remove all but name
sed -i.temp 's:\\macroname{\([^}]*\)}.*:\1:' $DOCFILE
$SED -i.temp 's:\\macroname{\([^}]*\)}.*:\1:' $DOCFILE

#replace TeX code with backslash
sed -i.temp 's:\\textbackslash :\\:' $DOCFILE
$SED -i.temp 's:\\textbackslash :\\:' $DOCFILE

#styles
sed -i.temp 's:.*stylename{\([a-z]*\)}.*:\1:' $DOCFILE
$SED -i.temp 's:.*stylename{\([a-z]*\)}.*:\1:' $DOCFILE

#distances
sed -i.temp 's:\\begin{gdimension}{\([a-z@]*\)}.*:\1:' $DOCFILE
$SED -i.temp 's:\\begin{gdimension}{\([a-z@]*\)}.*:\1:' $DOCFILE

#counts
sed -i.temp 's:\\begin{gcount}{\([a-z@]*\)}.*:\1:' $DOCFILE
$SED -i.temp 's:\\begin{gcount}{\([a-z@]*\)}.*:\1:' $DOCFILE

#block documentation items
sed -i.temp 's:.*\.\.\..*::' $DOCFILE
sed -i.temp 's:\\gre@pitch.*::' $DOCFILE
$SED -i.temp 's:.*\.\.\..*::' $DOCFILE
$SED -i.temp 's:\\gre@pitch.*::' $DOCFILE

#Other things which need to be removed
sed -i.temp 's:\\newcommand.*::' $DOCFILE
sed -i.temp 's:MacroName::' $DOCFILE
sed -i.temp 's:\\usepackage::' $DOCFILE
sed -i.temp 's:\\NewDocumentEnvironment.*::' $DOCFILE
sed -i.temp 's:\\begin{gdimension.*::' $DOCFILE
$SED -i.temp 's:\\newcommand.*::' $DOCFILE
$SED -i.temp 's:MacroName::' $DOCFILE
$SED -i.temp 's:\\usepackage::' $DOCFILE
$SED -i.temp 's:\\NewDocumentEnvironment.*::' $DOCFILE
$SED -i.temp 's:\\begin{gdimension.*::' $DOCFILE

#deprecated and obsolete functions (not in documentation because they don't need to be)
cd $HERE/tex
Expand All @@ -148,11 +159,11 @@ grep -h '\\gre@deprecated.*' *.tex | grep -v '\\def\\' >> $DOCFILE
grep -h '\\gre@obsolete.*' *.tex | grep -v '\\def\\' >> $DOCFILE

#remove whitespace
sed -i.temp 's/^[ \t]*//;s/[ \t]*$//' $DOCFILE
$SED -i.temp 's/^[ \t]*//;s/[ \t]*$//' $DOCFILE

sed -i.temp 's:.*\\gre@deprecated{.*::' $DOCFILE
sed -i.temp 's:.*\\gre@obsolete{.*::' $DOCFILE
sed -i.temp 's:}.*::' $DOCFILE
$SED -i.temp 's:.*\\gre@deprecated{.*::' $DOCFILE
$SED -i.temp 's:.*\\gre@obsolete{.*::' $DOCFILE
$SED -i.temp 's:}.*::' $DOCFILE

#label file
echo "00 Macros Documented" >> $DOCFILE
Expand Down
Loading