Edit Links |
Tools /
SVGFilesAndInkscapeCategories: Tools << LyX2OpenOffice | Page list | Otl2lyx >>Directly include SVG-Images in LyX. For a description see Use Inkscape SVG Images. As i cannot upload files i include the source code for the two scripts needed directly. inkscape.cmd (Windows command script)
@echo off
set INKSCAPE_DIR=C:\Program Files\Inkscape
set PNG_BACKGROUND_COLOR="#ffffff"
if "%1" == "EDIT" (
echo start "%INKSCAPE_DIR%\inkscape.exe" "%~f2"
start "%INKSCAPE_DIR%\inkscape.exe" "%~f2"
exit
) ELSE IF "%1" == "SHOW" (
echo "%INKSCAPE_DIR%\inkview.exe" "%~f2"
start "%INKSCAPE_DIR%\inkview.exe" "%~f2"
exit
) ELSE IF "%1" == "PNG" (
echo "%INKSCAPE_DIR%\inkscape.exe" -f "%~f2" -D -b "%PNG_BACKGROUND_COLOR%" -e "%~f3"
call "%INKSCAPE_DIR%\inkscape.exe" -f "%~f2" -D -b "%PNG_BACKGROUND_COLOR%" -e "%~f3"
) ELSE IF "%1" == "EPS" (
echo call "%INKSCAPE_DIR%\inkscape.exe" -E "%~f3" -D -f "%~f2"
call "%INKSCAPE_DIR%\inkscape.exe" -E "%~f3" -D -f "%~f2"
) ELSE IF "%1" == "PDF" (
echo call "%INKSCAPE_DIR%\inkscape.exe" -A "%~f3" -D -f "%~f2"
call "%INKSCAPE_DIR%\inkscape.exe" -A "%~f3" -D -f "%~f2"
) ELSE (
exit
)
inkscape (Cygwin shell script)
INKSCAPE_DIR="/C/Program Files/Inkscape"
PNG_BACKGROUND_COLOR="#ffffff"
if [ "$1" = "EDIT" ]; then
echo "\"$INKSCAPE_DIR/inkscape.exe\"" "$2"
"$INKSCAPE_DIR/inkscape.exe" "$2"
elif [ "$1" == "SHOW" ]; then
echo "\"$INKSCAPE_DIR/inkview.exe\"" "$2"
"$INKSCAPE_DIR/inkview.exe" "$2"
elif [ "$1" == "PNG" ]; then
echo "\"$INKSCAPE_DIR/inkscape.exe\"" -e "$3" -D -b "$PNG_BACKGROUND_COLOR" -f "$2"
"$INKSCAPE_DIR/inkscape.exe" -e "$3" -D -b "$PNG_BACKGROUND_COLOR" -f "$2"
elif [ "$1" == "EPS" ]; then
echo "\"$INKSCAPE_DIR/inkscape.exe\"" -E "$3" -D -f "$2"
"$INKSCAPE_DIR/inkscape.exe" -E "$3" -D -f "$2"
elif [ "$1" == "PDF" ]; then
echo "\"$INKSCAPE_DIR/inkscape.exe\"" -A "$3" -D -f "$2"
"$INKSCAPE_DIR/inkscape.exe" -A "$3" -D -f "$2"
fi
inkscape (Linux shell script)
#!/bin/bash
INKSCAPE_DIR="/usr/bin"
PNG_BACKGROUND_COLOR="#ffffff"
if [ "$1" = "EDIT" ]; then
echo "\"$INKSCAPE_DIR/inkscape\"" "$2"
"$INKSCAPE_DIR/inkscape" "$2"
elif [ "$1" == "SHOW" ]; then
echo "\"$INKSCAPE_DIR/inkview\"" "$2"
"$INKSCAPE_DIR/inkview" "$2"
elif [ "$1" == "PNG" ]; then
echo "\"$INKSCAPE_DIR/inkscape\"" -e "$3" -D -b "$PNG_BACKGROUND_COLOR" -f "$2"
"$INKSCAPE_DIR/inkscape" -e "$3" -D -b "$PNG_BACKGROUND_COLOR" -f "$2"
elif [ "$1" == "EPS" ]; then
echo "\"$INKSCAPE_DIR/inkscape\"" -E "$3" -D -f "$2"
"$INKSCAPE_DIR/inkscape" -E "$3" -D -f "$2"
elif [ "$1" == "PDF" ]; then
echo "\"$INKSCAPE_DIR/inkscape\"" -A "$3" -D -f "$2"
"$INKSCAPE_DIR/inkscape" -A "$3" -D -f "$2"
fi
A "shortcut" (but not correct) method to render TrueType fonts to EPS is by adding the -T (text to path) option before the -E in the EPS output commands. Added the convert to PDF option using the -A parameter Tools |