Browse Source

[WIP][Image size] Seems to work

pull/218/head
Louis 9 years ago
parent
commit
b20cc79b51
  1. 2
      patacrep/data/templates/styles/patacrep.sty
  2. 8
      test/test_book/datadir.tex.control
  3. 66
      test/test_book/syntax.tex.control
  4. 0
      test/test_book/syntax_datadir/img/image.png
  5. 41
      test/test_book/syntax_datadir/songs/images.csg

2
patacrep/data/templates/styles/patacrep.sty

@ -6,8 +6,8 @@
\NeedsTeXFormat{LaTeX2e}[1994/06/01] \NeedsTeXFormat{LaTeX2e}[1994/06/01]
\ProvidesPackage{patacrep}[2014/06/17 Patacrep Package, version 1] \ProvidesPackage{patacrep}[2014/06/17 Patacrep Package, version 1]
\RequirePackage{graphicx,xcolor} %
\RequirePackage[space]{grffile} \RequirePackage[space]{grffile}
\RequirePackage{graphicx,xcolor} %
\RequirePackage{epstopdf} % \RequirePackage{epstopdf} %
\RequirePackage{fancybox} \RequirePackage{fancybox}
\RequirePackage{xstring} \RequirePackage{xstring}

8
test/test_book/datadir.tex.control

@ -111,7 +111,7 @@ Chordpro}[
\lilypond{scores/datadir.ly} \lilypond{scores/datadir.ly}
\image{img/datadir.png} \image[]{img/datadir.png}
\endsong \endsong
@ -138,7 +138,7 @@ Chordpro}[
\lilypond{scores/datadir2.ly} \lilypond{scores/datadir2.ly}
\image{img/datadir2.png} \image[]{img/datadir2.png}
\endsong \endsong
@ -165,7 +165,7 @@ Chordpro}[
\lilypond{@TEST_FOLDER@/datadir_datadir/songs/./relative.ly} \lilypond{@TEST_FOLDER@/datadir_datadir/songs/./relative.ly}
\image{@TEST_FOLDER@/datadir_datadir/songs/./relative.png} \image[]{@TEST_FOLDER@/datadir_datadir/songs/./relative.png}
\endsong \endsong
@ -192,7 +192,7 @@ Chordpro}[
\lilypond{@TEST_FOLDER@/datadir_datadir/songs/./subdir/subdir.ly} \lilypond{@TEST_FOLDER@/datadir_datadir/songs/./subdir/subdir.ly}
\image{@TEST_FOLDER@/datadir_datadir/songs/./subdir/subdir.png} \image[]{@TEST_FOLDER@/datadir_datadir/songs/./subdir/subdir.png}
\endsong \endsong

66
test/test_book/syntax.tex.control

@ -2,8 +2,6 @@
%% Automatically generated document. %% Automatically generated document.
%% You may edit this file but all changes will be overwritten. %% You may edit this file but all changes will be overwritten.
%% If you want to change this document, have a look at %% If you want to change this document, have a look at
@ -91,6 +89,66 @@ guitar,
\addcontentsline{toc}{section}{\songlistname} \addcontentsline{toc}{section}{\songlistname}
\begin{songs}{titleidx,authidx} \begin{songs}{titleidx,authidx}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% songs/./images.csg
\selectlanguage{english}
\beginsong{}[
by={
},
]
\image[]{img/image.png}
\image[]{img/image with spaces.png}
\image[scale=.2]{img/image.png}
\image[scale=.20]{img/image with spaces.png}
\image[scale=1.2]{img/image.png}
\image[width=2cm]{img/image.png}
\image[height=2cm]{img/image with spaces.png}
\image[width=2cm, height=1cm]{img/image.png}
\image[width=2em]{img/image.png}
\image[height=2em]{img/image with spaces.png}
\image[width=2em, height=1em]{img/image.png}
\image[width=50pt]{img/image.png}
\image[height=50pt]{img/image with spaces.png}
\image[width=50pt, height=100pt]{img/image.png}
\image[width=2.5cm]{img/image.png}
\image[height=2.5cm]{img/image with spaces.png}
\image[width=2.5cm, height=1.5cm]{img/image.png}
\image[width=3cm, height=10pt]{img/image.png}
\image[width=10pt, height=3cm]{img/image with spaces.png}
\image[]{img/image.png}
\image[]{img/image.png}
\image[]{img/image with spaces.png}
\image[]{img/image with spaces.png}
\image[]{img/image.png}
\endsong
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% songs/./musicnote.csg %% songs/./musicnote.csg
@ -112,10 +170,6 @@ guitar,
\endsong \endsong
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% songs/./musicnote.csg
TODO Test image sizes
\end{songs} \end{songs}

0
test/test_book/syntax_datadir/img/dices.png → test/test_book/syntax_datadir/img/image.png

Before

Width:  |  Height:  |  Size: 178 KiB

After

Width:  |  Height:  |  Size: 178 KiB

41
test/test_book/syntax_datadir/songs/images.csg

@ -1,25 +1,32 @@
TODO Update with test file from test_song {image: image.png}
{title : Test of image sizes}
{image: dices.png}
{image: "image with spaces.png"} {image: "image with spaces.png"}
{image: dices.png size=20%x} {image: image.png scale=.2 }
{image: "image with spaces.png" size=x20%} {image: "image with spaces.png" scale=.20}
{image: dices.png size=20%x10%} {image: image.png scale=1.2}
{image: dices.png size=20%x}
{image: "image with spaces.png" size=x20%}
{image: dices.png size=20%x10%}
{image: dices.png size=2cmx} {image: image.png size=2cmx}
{image: "image with spaces.png" size=x2cm} {image: "image with spaces.png" size=x2cm}
{image: dices.png size=2cmx1cm} {image: image.png size=2cmx1cm}
{image: dices.png size=2emx} {image: image.png size=2emx}
{image: "image with spaces.png" size=x2em} {image: "image with spaces.png" size=x2em}
{image: dices.png size=2emx1em} {image: image.png size=2emx1em}
{image: dices.png size=50ptx} {image: image.png size=50ptx}
{image: "image with spaces.png" size=x50pt} {image: "image with spaces.png" size=x50pt}
{image: dices.png size=50ptx100pt} {image: image.png size=50ptx100pt}
{image: image.png size=2.5cmx}
{image: "image with spaces.png" size=x2.5cm}
{image: image.png size=2.5cmx1.5cm}
{image: image.png size=3cmx10pt}
{image: "image with spaces.png" size=10ptx3cm}
{image: image.png size=x}
{image: image.png error=foo}
{image: "image with spaces.png" not_a_size}
{image: "image with spaces.png" too many arguments}
{image: image.png size=2exx3km}
{image: }

Loading…
Cancel
Save