mirror of
https://gitlab.com/parroquia-san-leandro/cancionero-web.git
synced 2025-06-07 07:23:13 +02:00
Nuevo generador de cancioneros en línea.
This commit is contained in:
parent
3d9bb9a26b
commit
c622a27e34
13 changed files with 5870 additions and 0 deletions
1
res_gen/static/res/.htaccess
Normal file
1
res_gen/static/res/.htaccess
Normal file
|
@ -0,0 +1 @@
|
|||
Deny from all
|
66
res_gen/static/res/acordes.sty
Normal file
66
res_gen/static/res/acordes.sty
Normal file
|
@ -0,0 +1,66 @@
|
|||
% Base del estilo con acordes
|
||||
\ProvidesPackage{acordes}
|
||||
|
||||
% Incluimos el paquete que genera el libro de acordes con la opción chorded
|
||||
\RequirePackage[chorded]{songs}
|
||||
% Formato del papel: A4 (297x210) con todos los márgenes de 15mm
|
||||
\RequirePackage[paperheight=297mm,paperwidth=210mm,margin=15mm,heightrounded]{geometry}
|
||||
% Incluimos el paquete básico de estilo, ver estilo.sty en la misma carpeta
|
||||
\RequirePackage{estilo}
|
||||
% Notas que se deben reconocer como las notas La, Si, Do, Re, Mi, Fa, Sol
|
||||
% Esto sirve para transponer canciones automáticamente y para cambiar los nombres
|
||||
% por los que se quiera: ver siguiente instrucción
|
||||
\notenamesin{A}{B}{C}{D}{E}{F}{G}
|
||||
% Imprime las notas con nombres romances con la primera en mayúscula.
|
||||
% Se puede cambiar a cualquier conjunto de 7 palabras.
|
||||
\notenamesout{La}{Si}{Do}{Re}{Mi}{Fa}{Sol}
|
||||
% Este paquete no sé por qué lo incluí, pero no me atrevo a quitarlo
|
||||
\RequirePackage{etoolbox} % TODO: probar a quitar
|
||||
% Esto permite hacer un índice con múltiples columnas (solo para el índice secuencial)
|
||||
% Los índices alfabéticos y por autor son internos del paquete "songs".
|
||||
\RequirePackage[toc]{multitoc}
|
||||
% Configura el número de columnas de los índices a 2
|
||||
\renewcommand{\multicolumntoc}{2}
|
||||
% Coloca una barra vertical de ancho 1pt entre cada columna del índice.
|
||||
%\setlength{\columnseprule}{1pt}
|
||||
% Incluimos el paquete hyperref, para poder tener enlaces clicables en los índices.
|
||||
% Esto es muy útil a la hora de navegar por el documento en un ordenador.
|
||||
\RequirePackage[bookmarks]{hyperref}
|
||||
|
||||
% Ver último ajuste en letra.sty
|
||||
\songpos{1}
|
||||
|
||||
% Configuración del título (ver letra.sty), similar pero con otras dimensiones
|
||||
\renewcommand\makeprelude{%
|
||||
\resettitles
|
||||
\checkoddpage
|
||||
\ifoddpage
|
||||
\begin{minipage}{70mm}
|
||||
{
|
||||
\raggedright
|
||||
{\fontsize{15pt}{17pt}\sffamily\bfseries\songtitle} \par
|
||||
{\fontsize{9pt}{\baselineskip}\extendprelude}
|
||||
}
|
||||
\end{minipage}
|
||||
\hfill
|
||||
\begin{minipage}{12mm}
|
||||
{\hfill \printsongnum{\thesongnum}}
|
||||
\end{minipage}
|
||||
\else
|
||||
\begin{minipage}{12mm}
|
||||
\printsongnum{\thesongnum}
|
||||
\end{minipage}
|
||||
\hfill
|
||||
\begin{minipage}{70mm}
|
||||
{
|
||||
\raggedleft {\fontsize{15pt}{17pt}\sffamily\bfseries\songtitle} \par
|
||||
{\fontsize{9pt}{\baselineskip}\extendprelude}
|
||||
}
|
||||
\end{minipage}
|
||||
\fi
|
||||
}
|
||||
|
||||
% TODO Para añadir las canciones al índice numérico
|
||||
% https://tex.stackexchange.com/questions/192157/latex-songs-use-tableofcontents/192160?r=SearchResults#192160
|
||||
|
||||
|
142
res_gen/static/res/changepage.sty
Normal file
142
res_gen/static/res/changepage.sty
Normal file
|
@ -0,0 +1,142 @@
|
|||
%% LaTeX2e file `changepage.sty'
|
||||
%% generated by the `filecontents' environment
|
||||
%% from source `changepage' on 2009/10/20.
|
||||
%%
|
||||
\NeedsTeXFormat{LaTeX2e}
|
||||
\ProvidesPackage{changepage}[2009/10/20 v1.0c check page and change page layout]
|
||||
|
||||
% Don't use this with memoir
|
||||
\newcommand*{\cp@whoopsusingmemoir}{}
|
||||
\@ifclassloaded{memoir}{\def\cp@whoopsusingmemoir{\endinput}}
|
||||
\cp@whoopsusingmemoir
|
||||
|
||||
% New \verb|\if| for the strict option
|
||||
\newif\ifstrictpagecheck
|
||||
\strictpagecheckfalse
|
||||
|
||||
% User commands for switching strict page checking on/off
|
||||
\newcommand*{\strictpagecheck}{\strictpagechecktrue}
|
||||
\newcommand*{\easypagecheck}{\strictpagecheckfalse}
|
||||
|
||||
% Declare and process options
|
||||
\DeclareOption{strict}{\strictpagechecktrue}
|
||||
\ProcessOptions\relax
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
%% New commands for strict checking of odd/even page.
|
||||
%% Works by writing a label and then checking its pageref.
|
||||
|
||||
\newif\ifoddpage
|
||||
\newcounter{cp@cntr}
|
||||
\newcount\cp@tempcnt % instead of \verb|\@memcnta|
|
||||
\newcommand{\cplabel}{^_}
|
||||
|
||||
\gdef\thepmemc@@page{\the\c@page}
|
||||
|
||||
\long\def\pmemprotected@write#1#2#3{% modified \verb|\protected@write|
|
||||
\begingroup
|
||||
\let\thepmemc@@page\relax
|
||||
#2%
|
||||
\let\protect\@unexpandable@protect
|
||||
\edef\reserved@a{\write#1{#3}}%
|
||||
\reserved@a
|
||||
\endgroup
|
||||
\if@nobreak\ifvmode\nobreak\fi\fi}
|
||||
|
||||
\newcommand*{\pmemlabel}[1]{\@bsphack
|
||||
\pmemprotected@write\@auxout{}%
|
||||
{\string\newpmemlabel{#1}{\thepmemc@@page}}%
|
||||
\@esphack}
|
||||
|
||||
\newcommand*{\newpmemlabel}[2]{{\global\@namedef{m@#1}{#2}}}
|
||||
\newcommand*{\pmemlabelref}[1]{%
|
||||
\expandafter\ifx\csname m@#1\endcsname\relax
|
||||
0% % 0 if there is no label yet in the aux file
|
||||
\else
|
||||
\csname m@#1\endcsname
|
||||
\fi}
|
||||
|
||||
\DeclareRobustCommand{\checkoddpage}{%
|
||||
\oddpagefalse%
|
||||
\ifstrictpagecheck%
|
||||
\stepcounter{cp@cntr}\pmemlabel{\cplabel\thecp@cntr}%
|
||||
\cp@tempcnt=\pmemlabelref{\cplabel\thecp@cntr}\relax
|
||||
\ifodd\cp@tempcnt\oddpagetrue\fi
|
||||
\else
|
||||
\ifodd\c@page\oddpagetrue\fi
|
||||
\fi}
|
||||
|
||||
% End newcommands for strict checking of odd/even page.
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
% Copy of some of the code from the ifmtarg package to save requiring ifmtarg
|
||||
\begingroup
|
||||
\catcode`\Q=3
|
||||
\long\gdef\@ifmtarg#1{\@xifmtarg#1QQ\@secondoftwo\@firstoftwo\@nil}
|
||||
\long\gdef\@xifmtarg#1#2Q#3#4#5\@nil{#4}
|
||||
\endgroup
|
||||
|
||||
% Set the page output parameters
|
||||
\DeclareRobustCommand{\ch@ngetext}{%
|
||||
\setlength{\@colht}{\textheight}\setlength{\@colroom}{\textheight}%
|
||||
\setlength{\vsize}{\textheight}\setlength{\columnwidth}{\textwidth}%
|
||||
\if@twocolumn%
|
||||
\advance\columnwidth-\columnsep \divide\columnwidth\tw@%
|
||||
\@firstcolumntrue%
|
||||
\fi%
|
||||
\setlength{\hsize}{\columnwidth}%
|
||||
\setlength{\linewidth}{\hsize}}
|
||||
|
||||
\DeclareRobustCommand{\changetext}[5]{%
|
||||
\@ifmtarg{#1}{}{\addtolength{\textheight}{#1}}%
|
||||
\@ifmtarg{#2}{}{\addtolength{\textwidth}{#2}}%
|
||||
\@ifmtarg{#3}{}{\addtolength{\evensidemargin}{#3}}%
|
||||
\@ifmtarg{#4}{}{\addtolength{\oddsidemargin}{#4}}%
|
||||
\@ifmtarg{#5}{}{\addtolength{\columnsep}{#5}}%
|
||||
\ch@ngetext}
|
||||
|
||||
\DeclareRobustCommand{\changepage}[9]{%
|
||||
\@ifmtarg{#1}{}{\addtolength{\textheight}{#1}}%
|
||||
\@ifmtarg{#2}{}{\addtolength{\textwidth}{#2}}%
|
||||
\@ifmtarg{#3}{}{\addtolength{\evensidemargin}{#3}}%
|
||||
\@ifmtarg{#4}{}{\addtolength{\oddsidemargin}{#4}}%
|
||||
\@ifmtarg{#5}{}{\addtolength{\columnsep}{#5}}%
|
||||
\ch@ngetext%
|
||||
\@ifmtarg{#6}{}{\addtolength{\topmargin}{#6}}%
|
||||
\@ifmtarg{#7}{}{\addtolength{\headheight}{#7}}%
|
||||
\@ifmtarg{#8}{}{\addtolength{\headsep}{#8}}%
|
||||
\@ifmtarg{#9}{}{\addtolength{\footskip}{#9}}}
|
||||
|
||||
\newenvironment{adjustwidth}[2]{%
|
||||
\begin{list}{}{%
|
||||
\topsep\z@%
|
||||
\listparindent\parindent%
|
||||
\parsep\parskip%
|
||||
\@ifmtarg{#1}{\setlength{\leftmargin}{\z@}}%
|
||||
{\setlength{\leftmargin}{#1}}%
|
||||
\@ifmtarg{#2}{\setlength{\rightmargin}{\z@}}%
|
||||
{\setlength{\rightmargin}{#2}}%
|
||||
}
|
||||
\item[]}{\end{list}}
|
||||
|
||||
\newenvironment{adjustwidth*}[2]{%
|
||||
\begin{list}{}{%
|
||||
\topsep\z@%
|
||||
\listparindent\parindent%
|
||||
\parsep\parskip%
|
||||
\checkoddpage
|
||||
\ifoddpage% odd numbered page
|
||||
\@ifmtarg{#1}{\setlength{\leftmargin}{\z@}}%
|
||||
{\setlength{\leftmargin}{#1}}%
|
||||
\@ifmtarg{#2}{\setlength{\rightmargin}{\z@}}%
|
||||
{\setlength{\rightmargin}{#2}}%
|
||||
\else% even numbered page
|
||||
\@ifmtarg{#2}{\setlength{\leftmargin}{\z@}}%
|
||||
{\setlength{\leftmargin}{#2}}%
|
||||
\@ifmtarg{#1}{\setlength{\rightmargin}{\z@}}%
|
||||
{\setlength{\rightmargin}{#1}}%
|
||||
\fi}
|
||||
\item[]}{\end{list}}
|
||||
|
||||
\endinput
|
||||
|
65
res_gen/static/res/estilo.sty
Normal file
65
res_gen/static/res/estilo.sty
Normal file
|
@ -0,0 +1,65 @@
|
|||
% Base del estilo general del cancionero: aquí ajusto cosas generales para ambos cancioneros
|
||||
% y cargo los paquetes necesarios para diversas funciones
|
||||
\ProvidesPackage{estilo}
|
||||
|
||||
% Para poder poner acentos y letras como la Ñ
|
||||
\RequirePackage[utf8]{inputenc}
|
||||
% Para que los títulos de los índices sean en español
|
||||
\RequirePackage[spanish]{babel}
|
||||
% Cargar la fuente Arial 030 para usarla en los números
|
||||
\RequirePackage[scaled]{uarial}
|
||||
% Ajustamos la codificación de las fuentes a T1 (necesario para Arial)
|
||||
\RequirePackage[T1]{fontenc}
|
||||
% Cargar la fuente Helvetica para usarla por defecto en todo el texto
|
||||
% sans serif
|
||||
\RequirePackage[scaled]{helvet}
|
||||
% Este paquete nos da el comando \includepdf que sirve para insertar
|
||||
% cualquier PDF como una página más
|
||||
\RequirePackage[final]{pdfpages}
|
||||
% Para la nota musical
|
||||
\RequirePackage{textcomp}
|
||||
% Para el indice general (secuencial)
|
||||
\RequirePackage{tocloft}
|
||||
|
||||
% Para que las páginas no tengan cabecera ni pie de página (numeración y capítulo actual)
|
||||
\pagestyle{empty}
|
||||
% Para que el paquete de canciones no numere las estrofas (queda demasiado formal).
|
||||
% Se podría reactivar para hacer diapositivas o hojas cortas de canciones
|
||||
\noversenumbers
|
||||
% Hacemos que las letras de las canciones sean sans serif
|
||||
\renewcommand{\lyricfont}{\sffamily}
|
||||
% Número con la fuente URW Arial 030 (similar a los números magnéticos que hay en la parroquia)
|
||||
\renewcommand{\printsongnum}[1]{\fontfamily{ua1}\selectfont\bfseries\LARGE#1}
|
||||
% Esto está comentado, si se descomenta cambiaría los estribillos a cursiva
|
||||
%\renewcommand{\chorusfont}{\slshape}
|
||||
% Esto está comentado, si se descomenta cambiaría los estribillos a negrita
|
||||
%\renewcommand{\chorusfont}{\bfseries}
|
||||
|
||||
% Necesitamos este paquete y la opción para saber si estamos en página par o impar (alineación de números)
|
||||
\RequirePackage{changepage}
|
||||
\strictpagecheck
|
||||
|
||||
% Añade un nuevo campo a las canciones para mostrar en qué melodía están basadas
|
||||
\newsongkey{m}{\def\melody{}}{\def\melody{\textmusicalnote #1\par}}
|
||||
|
||||
% Añade un nuevo campo para definir el índice (toc={...})
|
||||
\newcommand\toctitle{}
|
||||
\newcommand\toclink{}
|
||||
{\makeatletter\gdef\toclink{\@ifundefined{href}{}{{song\theSB@songsnum-\thesongnum
|
||||
.\ifnum\value{section}=0 1\else2\fi}}}}
|
||||
\newcommand\addtotoc[1]{\addtocontents{toc}{\protect\contentsline
|
||||
{\ifnum\value{section}>0sub\fi section}{\numberline\thesongnum#1}{\thepage}\toclink}}
|
||||
\newsongkey{toc}
|
||||
{\def\toctitle{\resettitles\addtotoc\songtitle}}
|
||||
{\def\toctitle{\addtotoc{#1}}}
|
||||
|
||||
% Modifica el preludio (cabecera) de cada canción para incluir melody y toctitle
|
||||
\renewcommand{\extendprelude}{
|
||||
\showrefs\showauthors
|
||||
\melody\toctitle
|
||||
}
|
||||
|
||||
% En la tabla de contenidos, evita que aparezca el número de página (innecesario)
|
||||
\cftpagenumbersoff{chapter}
|
||||
\cftpagenumbersoff{section}
|
||||
\cftpagenumbersoff{subsection}
|
3808
res_gen/static/res/songs.sty
Normal file
3808
res_gen/static/res/songs.sty
Normal file
File diff suppressed because it is too large
Load diff
37
res_gen/static/res/template.tex
Normal file
37
res_gen/static/res/template.tex
Normal file
|
@ -0,0 +1,37 @@
|
|||
\documentclass{book}
|
||||
|
||||
% \ifchorded
|
||||
%CHORDED% \usepackage{acordes}
|
||||
% \else
|
||||
%LYRICS% \usepackage[lyric,noshading,%SONGCOLUMNS%]{songs}
|
||||
%LYRICS% \usepackage{estilo}
|
||||
%LYRICS% \usepackage[paperwidth=%PAPERWIDTH%mm,paperheight=%PAPERHEIGHT%mm,margin=%MARGIN%cm]{geometry}
|
||||
%LYRICS% \renewcommand{\lyricfont}{\fontsize{%FONTSIZE%}{%LINESKIP%}\sffamily}
|
||||
|
||||
\usepackage{hyperref}
|
||||
\songpos{0} % 0 a 3, cuanto mas alto menos se cortan las canciones
|
||||
|
||||
\ifchorded
|
||||
\else
|
||||
\renewcommand\makeprelude{%
|
||||
\resettitles%
|
||||
{%
|
||||
\raggedright%
|
||||
%LYRICS% {\fontsize{%TITLEFONTSIZE%}{%TITLELINESKIP%}\sffamily\bfseries\songtitle} \par
|
||||
%LYRICS% {\fontsize{%SUBTITLEFONTSIZE%}{\baselineskip}\extendprelude}
|
||||
}%
|
||||
}%
|
||||
\fi
|
||||
|
||||
|
||||
\begin{document}
|
||||
|
||||
\songsection{\normalfont \textsc{\huge %TITLE%}}
|
||||
\begin{songs}{}
|
||||
%SONGCOLNUM%
|
||||
%IFCOLUMNSEP%\columnsep=%COLUMNSEP%cm
|
||||
%SONGLIST%
|
||||
\end{songs}
|
||||
|
||||
\end{document}
|
||||
|
1160
res_gen/static/res/tocloft.sty
Normal file
1160
res_gen/static/res/tocloft.sty
Normal file
File diff suppressed because it is too large
Load diff
35
res_gen/static/res/uarial.sty
Normal file
35
res_gen/static/res/uarial.sty
Normal file
|
@ -0,0 +1,35 @@
|
|||
\ProvidesPackage{uarial}%
|
||||
[2006/03/21 1.0 (WaS)]
|
||||
\RequirePackage{keyval}
|
||||
\define@key{UaI}{scaled}[.95]{%
|
||||
\expandafter\def\csname ua1@Scale\endcsname{#1}}
|
||||
\def\ProcessOptionsWithKV#1{%
|
||||
\let\@tempc\relax
|
||||
\let\UaI@tempa\@empty
|
||||
\ifx\@classoptionslist\relax\else
|
||||
\@for\CurrentOption:=\@classoptionslist\do{%
|
||||
\@ifundefined{KV@#1@\CurrentOption}%
|
||||
{}%
|
||||
{%
|
||||
\edef\UaI@tempa{\UaI@tempa,\CurrentOption,}%
|
||||
\@expandtwoargs\@removeelement\CurrentOption
|
||||
\@unusedoptionlist\@unusedoptionlist
|
||||
}%
|
||||
}%
|
||||
\fi
|
||||
\edef\UaI@tempa{%
|
||||
\noexpand\setkeys{#1}{%
|
||||
\UaI@tempa\@ptionlist{\@currname.\@currext}%
|
||||
}%
|
||||
}%
|
||||
\UaI@tempa
|
||||
\let\CurrentOption\@empty
|
||||
}
|
||||
\ProcessOptionsWithKV{UaI}
|
||||
\AtEndOfPackage{%
|
||||
\let\@unprocessedoptions\relax
|
||||
}
|
||||
\renewcommand{\sfdefault}{ua1}
|
||||
\endinput
|
||||
%%
|
||||
%% End of file `ua1.sty'.
|
Loading…
Add table
Add a link
Reference in a new issue