Help Please

2024-04-20 Thread Brian Kneller via lyx-users
Hi thanks for the responses they have been most useful. I have a few questions 
below:

 I have decided to use the Manchester Uni thesis format as its very near the 
London Uni version.  I think I am running into unnecessary difficulties because 
I am using my existing directory structure and Lyx  has a preferred in 
/Library/Application Support/Lyx-2.3.  I have not found a preferred structure 
is there one?
 I am stripping out the bits I don’t want from the Thesis Template such as  
figures , headings , labels etc all have an index of some form where should 
these be stored &  how do I ensure these are reset or can I copy the template 
into the template subdirectory , which is currently empty and then start a new 
doc from this.
 I have loaded revtex4-1 into the shared area subdir but cannot see it from the 
Doc/settings in the lyx main menu should it be there?
 I like the use of Letterine for the first char of a section, how is this 
\lettrine{I}{n}and the following invoked :--   Figure~\ref{shuffle_diagram}; 
\label{Shuffle} and where is the definitions of these –I have not found (yet) 
where this is described an indication where I could look would be helpful. I 
suspect they are under the Lyx-Code environment in the dropdown top lefthand 
side of menu – but there is no list below it.

 Sorry for these simple questions but I need to complete this soon

 

Many Thanks

 

Brian K-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Re: Help with gnuplot xtemplate needed

2024-04-20 Thread Tobias Hilbricht
I got it myself after a lot of trying and comparing:

In my file gnuplot.xtemplate I wrote "InputFormat gp", because
"InputFormat" and FileFilter extension are the same in the case of Xfig
(fig) and Inkscape (svg), but not with gnuplot: "InputFormat gnuplot"
and FileFilter .gp works!

For anyone interested I attached my working gnuplot.xtemplate. 

Sorry for making noise!

Tobias


Am Samstag, dem 20.04.2024 um 08:44 +0200 schrieb Tobias Hilbricht:
> Dear LyX-user,
> 
> I would like to have a gnuplot xtemplate. To that end I wrote a shell
> script gnuplot2pdftex.sh like this:
> 
> #!/bin/bash
> GnuplotFile=$1
> BaseName=`basename $GnuplotFile .gp`
> GnuplotName=$BaseName.ptx
> LyxName=$BaseName.pdf_tex
> gnuplot -e "set term cairolatex pdf ; set output '${GnuplotName}' "
> $GnuplotFile
> mv $GnuplotName $LyxName
> 
> This script works on the command line, and I can input the resulting
> file gnuplot.pdf_tex in LyX, and if I put it in a preview box I get a
> preview, and the document compiles.
> 
> I have similar scripts for pstex, png and eps in
> ~/.lyx/scripts and define converters like this:
> 
> \converter "gnuplot" "pdftex2" "$$s/scripts/gnuplot2pdftex.sh $$i
> $$o"
> "needauth"
> 
> and have a file gnuplot.xtemplate written after the model of
> inkscape.xtemplate in ~/.lyx/xtemplate
#
# Gnuplot External Template
#
# This file is part of LyX, the document processor.
# Licence details can be found in the file COPYING.
#
# author Tobias Hilbricht
#
# based on external templates by:
#
# author Asger Alstrup Nielsen
# author Angus Leeming
# author Johnathan Burchill
#
# Full author contact details are available in file CREDITS.


PreambleDef WarnNotFound
%% Print a warning encased in an fbox.
\def\lyxstripprefix#1>{}
\newcommand{\warnNotFound}[1]{%
\def\lyxtempfilename{#1}%
\fbox{Could not find

\ttfamily\expandafter\lyxstripprefix\meaning\lyxtempfilename!}%
\typeout{Could not find \lyxtempfilename!}%
}
PreambleDefEnd


PreambleDef InputOrWarn
%% Input the file if it exists, using \input, else print a warning
\newcommand{\inputOrWarn}[1]{%
\IfFileExists{#1}{\input{#1}}{\warnNotFound{#1}}}
PreambleDefEnd


Template Gnuplot
GuiName "Gnuplot"
HelpText
A Gnuplot figure.
Note that using this template automatically uses the 
document text in the image (like with the Xfig template).
HelpTextEnd
InputFormat gnuplot
FileFilter "*.{gp}"
AutomaticProduction true
Transform Rotate
Transform Resize
Preview InstantPreview
Format PDFLaTeX
TransformCommand Rotate RotationLatexCommand
TransformCommand Resize ResizeLatexCommand
Product 
"$$RotateFront$$ResizeFront\\input{$$AbsOrRelPathMaster$$Basename.pdf_tex}$$ResizeBack$$RotateBack"
UpdateFormat pdftex2
UpdateResult "$$AbsPath$$Basename.pdf_tex"
Requirement "xcolor"
Requirement "graphicx"
Requirement "mathtools"
# Preamble WarnNotFound
# Preamble InputOrWarn
ReferencedFile pdflatex "$$AbsOrRelPathMaster$$Basename.pdf_tex"
ReferencedFile pdflatex "$$AbsPath$$Basename.pdf"
FormatEnd
Format LaTeX
TransformCommand Rotate RotationLatexCommand
TransformCommand Resize ResizeLatexCommand
Product 
"$$RotateFront$$ResizeFront\\input{$$AbsOrRelPathMaster$$Basename.ps_tex}$$ResizeBack$$RotateBack"
UpdateFormat pstex2
UpdateResult "$$AbsPath$$Basename.ps_tex"
Requirement "xcolor"
Requirement "graphicx"
Requirement "mathtools"
# Preamble WarnNotFound
# Preamble InputOrWarn
ReferencedFile latex "$$AbsOrRelPathMaster$$Basename.ps_tex"
ReferencedFile latex "$$AbsPath$$Basename.eps"
ReferencedFile dvi   "$$AbsPath$$Basename.eps"
FormatEnd
Format Ascii
Product "[InkscapeGraphics: $$FName]"
FormatEnd
Format DocBook
Product ""
UpdateFormat eps
UpdateResult "$$AbsPath$$Basename.eps"
ReferencedFile docbook "$$AbsPath$$Basename.eps"
ReferencedFile docbook-xml "$$AbsPath$$Basename.eps"
FormatEnd
Format XHTML
Product ""
UpdateFormat svg
UpdateResult "$$AbsPath$$Basename.svg"
ReferencedFile xhtml "$$AbsPath$$Basename.svg"
FormatEnd
TemplateEnd

-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users


Help with gnuplot xtemplate needed

2024-04-20 Thread Tobias Hilbricht
Dear LyX-user,

I would like to have a gnuplot xtemplate. To that end I wrote a shell
script gnuplot2pdftex.sh like this:

#!/bin/bash
GnuplotFile=$1
BaseName=`basename $GnuplotFile .gp`
GnuplotName=$BaseName.ptx
LyxName=$BaseName.pdf_tex
gnuplot -e "set term cairolatex pdf ; set output '${GnuplotName}' "
$GnuplotFile
mv $GnuplotName $LyxName

This script works on the command line, and I can input the resulting
file gnuplot.pdf_tex in LyX, and if I put it in a preview box I get a
preview, and the document compiles.

However, if I have similar scripts for pstex, png and eps in
~/.lyx/scripts and define converters like this:

\converter "gnuplot" "pdftex2" "$$s/scripts/gnuplot2pdftex.sh $$i $$o"
"needauth"

and have a file gnuplot.xtemplate written after the model of
inkscape.xtemplate in ~/.lyx/xtemplate, then preview fails and there is
no image in the compiled document.

Despite a defined converter for pdftex and pstex I get error messages
with lyx -dbg graphics related to convert:

Execution of "convert" failed.
Systemcall.cpp (306): Systemcall: 'python3 -tt "/usr/local/share/lyx-
2.4.0~RC4/scripts/convertDefault.py" gp
"/tmp/lyx_tmpdir.hmNUbfzyTaRY/lyx_tmpbuf0/2_home_tobias_gnuplot-
beispiel.gp" ps_tex
"/tmp/lyx_tmpdir.hmNUbfzyTaRY/lyx_tmpbuf0/2_home_tobias_gnuplot-
beispiel.ps_tex"' finished with exit code 1
Error: Die Datei kann nicht konvertiert werden

Keine Information vorhanden, um Dateien im gp-Format nach pstex2 zu
konvertieren.
Definieren Sie einen Konverter in den Einstellungen.
convert-im6.q16: no decode delegate for this image format `GP' @
error/constitute.c/ReadImage/587.
convert-im6.q16: no images defined
`ps_tex:/tmp/lyx_tmpdir.hmNUbfzyTaRY/lyx_tmpbuf0/2_home_tobias_gnuplot-
beispiel.ps_tex' @ error/convert.c/ConvertImageCommand/3229.
/usr/local/share/lyx-2.4.0~RC4/scripts/convertDefault.py ERROR
Execution of "convert" failed.

What is wrong or what is missing? Thanks for helpful hints in advance!

Tobias


 
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users