GeneralHi and request for help integrating Frescobaldi in texworks

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
dodgyg1
Posts: 2
Joined: Mon Feb 24, 2014 11:19 am

Hi and request for help integrating Frescobaldi in texworks

Post by dodgyg1 »

Hi guys,

I am a sixty year old newbie from Coventry UK slowly getting my head around Texworks. I am very impressed with the power of Tex. I have successfully managed to get my first lot of code in Texworks to compile and it's looking good. I also have some code in Frescobaldi that works. I now need to get my lilypond code from Frescobaldi to integrate within my Texworks code.

This is what I tried within Texworks.

Code: Select all

\documementclass{article}
\usepackage(lilypond}
\begin{document}
    LOAD OF WORKING LaTeX CODE
\begin{lilypond}
    LOAD OF LILYPOND CODE (WORKING OK IN FRESCOBALDI)
\end{lilypond}
\end{document}
The compiler throws up the error message relating to the second line above

Code: Select all

    ! LaTeX Error: File lilypond.sty not found
I have spent hours on the internet trying to find out what's going wrong to no avail. Any help would be much appreciated. Thanks in anticipation.

Best regards,

dodgyg1
Last edited by cgnieder on Mon Feb 24, 2014 8:31 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Hi and request for help integrating Frescobaldi in texworks

Post by Johannes_B »

The package file is missing from your system, i guess you have a basic MikTeX installed. You can use your distributions package manager to istall missing packages. Miktex can install those on the fly as well.

Btw: Please use the code-button to markup code in your posts.
In later questions, we all will find a minimal working example usefull. Please see MWE for more information.

Best regards and welcome to the board
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
dodgyg1
Posts: 2
Joined: Mon Feb 24, 2014 11:19 am

Hi and request for help integrating Frescobaldi in texworks

Post by dodgyg1 »

Thanks Johannes_B for your reply. I guessed that might have been the problem. I had assumed that lilypond was on the system to be able to run Frescobaldi but that Tex was not pointing to the file. I am still baffled as to how to get Tex to see the file. I am running ubuntu 13.10 as my operating system.

I did find these lines of code on the internet with reference to the missing lilypond.sty file but there was no indication of where or how it should be used. I have entered it in my code but it is just throwing up all kinds of errors.

Code: Select all

\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{lilypond}

\RequirePackage{xkeyval}
\RequirePackage{graphicx}

\newlength{\lilypond@staffsize}
\newlength{\lilypond@betweensystemspace}
  \setlength{\lilypond@betweensystemspace}{20mm}
\DeclareOptionX{staffsize}[0]{\setlength{\lilypond@staffsize}{#1pt}}
\DeclareOptionX{between-system-space}[20]{%
  \setlength{\lilypond@betweensystemspace}{#1mm}}
\ProcessOptionsX

\newcommand{\lilypondfile}[1]{%
  \newwrite\conffile
  \immediate\openout\conffile\jobname.lil
  \immediate\write\conffile{[General]}
  \immediate\write\conffile{filename: #1.ly}
  \immediate\write\conffile{columnwidth: \the\columnwidth}
  \immediate\write\conffile{}
  \immediate\write\conffile{[Options]}
  \immediate\write\conffile{staffsize: \the\lilypond@staffsize}
  \immediate\write%
    \conffile{between-system-space: \the\lilypond@betweensystemspace}
  \immediate\closeout\conffile
  \par
  \IfFileExists{#1.eps}{\noindent\includegraphics{#1}}{}
  \par
}
I hope there is someone out there who can make sense of this code and maybe explain to me what is going on. I am assuming that this code should all go in my preamble before the \begin{document} code??

Best regards,

dodgyg1
hugovdberg
Posts: 133
Joined: Sat Feb 25, 2012 6:12 pm

Hi and request for help integrating Frescobaldi in texworks

Post by hugovdberg »

I don't have any experience using lilypond, but these two pages seem to me to provide all info you need to compile lilypond files using ubuntu:
http://martin-thoma.com/how-to-write-music-with-latex/
https://scottlinux.com/2013/09/15/getti ... ian-linux/

These pages never mention using a package called lilypond.sty, but I guess you found this .sty file on github. If you want to use this package you need to save it in a place where latex can find it, a great manual for this is on TeX.se
Ubuntu 13.10 + Tex Live 2013 + Texmaker / Windows 7 Pro + MikTex 2.9 + TexnicCenter / Android 4.3 + TexPortal + DroidEdit
Post Reply