Skip to content

Commit

Permalink
Adaptation automatique de la taille de portée à la taille de police (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
jperon committed May 28, 2015
1 parent 71b916c commit 19d85ff
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
3 changes: 3 additions & 0 deletions lyluatex.lua
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ end


function entete_lilypond(facteur, largeur)
if facteur == 0 then
facteur = font.fonts[font.current()].size/39321.6
end
return string.format(
[[%%En-tête
\version "2.18.2"
Expand Down
6 changes: 3 additions & 3 deletions lyluatex.sty
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
{\catcode`p=12 \catcode`t=12 \gdef\un#1pt{#1}}
\newcommand*{\largeur}{\expandafter\un\the\linewidth}
% Taille des partitions
%\newcounter{staffsize}\setcounter{staffsize}{17}
%\newcounter{localstaffsize}\setcounter{staffsize}{17}
\def\staffsize{17}
% Si la valeur est 0, elle sera automatiquement calculée
% à partir de la taille de police.
\def\staffsize{0}
\let\localstaffsize\staffsize


Expand Down
8 changes: 6 additions & 2 deletions test.tex
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
\documentclass[a5paper,12pt]{scrbook}
\documentclass[a5paper,fontsize=12pt]{scrbook}
\usepackage{fontspec}
\usepackage{libertine}
\usepackage[program=lilypond]{lyluatex}
Expand All @@ -7,10 +7,14 @@
\title{}
\author{}

\def\staffsize{20.5}
% Si vous voulez changer globalement la taille des partitions.
% Autrement, elle sera automatiquement adaptée à la taille de police.
%\def\staffsize{20.5}

\begin{document}

Taille de police

% Import d'une partition externe. La commande \includely est strictement équivalente.
\lilypondfile{ly/AveMariaDeLourdes/AveMariaDeLourdes.ly}

Expand Down

0 comments on commit 19d85ff

Please sign in to comment.