Frequently Asked Questions - Linux

Useful Starman commands.
Using the perl based Starman webserver is the easiest way to run LedgerSMB locally (and quite possibly for production use as well).

At the terminal, and from your LedgerSMB directory:

Start Starman

starman  tools/starman.psgi

Default port is 5000.

starman -l :8080 tools/starman.psgi

Start with 8080 specified as the port.

Note: some documentation specifies the switch

--preload-app

It has been sugggested that this may give performance advantages in a production environment but isn't recommended while developing.
The manpage has more to say on this.

man starman

Based on that we currently would not recommend using --preload-app even on a production server

While Starman is running

Reload Starman

pkill -HUP -f "starman master"

Restart Starman

pkill -TERM -f "starman master"

Release the port if Starman is terminated

NOTE: try Restart Starman before doing this.

pkill -KILL -f "starman master"
Release: 
FAQ Category: 

The short answer is that TeX doesn't know how to deal with UTF-8 (or rather non-ASCII) characters. XeTeX has been designed to work around these limitations. The easiest way to generate PDFs is to install Xe(La)TeX and use the 'xedemo' templates - these templates have been 'ported' from LaTeX to XeLaTeX.

Distribution specific install instructions listed below.

Debian / Ubuntu 

Install texlive-xetex that includes xelatex

apt-get install texlive-xetex

but you need to patch LaTeX::Driver
Install liblatex-{driver,encode,table}-perl for latex

apt-get install liblatex-{driver,encode,table}-perl

and libmoosex-followpbp-perl for Template::Plugin::Latex

apt-get install libmoosex-followpbp-perlafter that:

apt-get install libtemplate-plugin-latex-perl  (or cpan Template::Plugin::Latex)

 

LedgerSMB xelatex configuration

Install xelatex and change the LedgerSMB configuration from the menu:
System -> System Defaults -> Templates directory
Change to "xedemo"

Change a path

From the mailing list: (Chris Travers)
Right now, I am open to suggestions on a better approach, as the Template::Latex api's don't seem to work to do this, but I resorted to changing the paths in LaTeX::Driver::Paths directly (find the location with locate LaTeX/Driver/Paths.pm). This file gets written at installation time for the LaTeX::Driver module and so I consider it reasonably editable.

locate LaTeX/Driver/Paths.pm

If locate is not installed you can do:  find /usr . |grep "LaTeX/Driver/Paths.pm"
/usr/share/perl5/LaTeX/Driver/Paths.pm  ( Debian / Ubuntu )

Make a backup copy of  LaTeX/Driver/Paths.pm (you have to have root priviliges to do this or use sudo)

cp /usr/share/perl5/LaTeX/Driver/Paths.pm /usr/share/perl5/LaTeX/Driver/Paths.pm.backup(Change the path to your path for LaTeX/Driver/Paths.pm)

User your text editor to edit LaTeX/Driver/Paths.pm  (you have to have root priviliges to do this or use sudo)

In LaTeX/Driver/Paths.pm change

$program_path{pdflatex} = '/path/to/pdflatex;

to

$program_path{pdflatex} = '/path/to/xelatex';

 

This is the error you get, if you do not change:
/usr/share/perl5/LaTeX/Driver/Paths.pm  (Debian path)  :


Error!

latex error - pdflatex exited with errors:
!
l.26 \RequireXeTeX
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
! Fatal fontspec error: "cannot-use-pdftex"
!
! The fontspec package requires either XeTeX or LuaTeX to function.
!
! You must change your typesetting engine to, e.g., "xelatex" or "lualatex"
! instead of plain "latex" or "pdflatex".
!
! See the fontspec documentation for further information.
!
! For immediate help type H <return>.
!...............................................
l.38 }




 

The utf8 character "hack fix"

Before making this change will UTF8 characters appear as squares in the PDF file. To print utf8 characters in pdf files, you must make the following change:

These are the steps:
su root
open /usr/share/perl5/LaTeX/Driver.pm
in your text editor
go to line 174 on Debian Squeeze (6.x) and line 176 on Debian Wheexy (7.x)
you see "write_file( ..." there
change

".tex", $source

to

".tex", {binmode=>':utf8'}, $source

 

Font fix

In order for Verdana to work, install the package ttf-mscorefonts-installer (Debian/Ubuntu)

apt-get install ttf-mscorefonts-installer

In versions 1.3.28 and up, the demo templates no longer depend on Verdana though, but use the non-proprietary Liberation font set, which can be installed using

apt-get install fonts-liberation

 

Code reference to LedgerSMB

The code for this is LedgerSMB/Template/Latex.pm

Component: 
Base

In general: neither. The advice is to have the full source tree in /opt/ledgersmb/<version>.

Installing the LedgerSMB modules in the standard Perl search path works, but interferes with running different versions side-by-side.

To undo installation in /usr/local:

  • remove /usr/local/share/perl/5.XX.X/LedgerSMB/
  • delete /usr/local/share/perl/5.XX.X/LedgerSMB.pm; and
  • find and remove the .pl files that come in LedgerSMB's project root directory and bin/ and LedgerSMB/Scripts/ directories.
Component: 
Base
FAQ Category: 

When trying to use XeLaTeX, you may get a message like:

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! You are attempting to make a LaTeX format from a source file
! That is more than five years old.
!
! If you enter to scroll past this message then the format
! will be built, but please consider obtaining newer source files
! before continuing to build LaTeX.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

! LaTeX source files more than 5 years old!.
l.545 ...aTeX source files more than 5 years old!}

?
! Emergency stop.
l.545 ...aTeX source files more than 5 years old!}

No pages of output.
Transcript written on xelatex.log.
Error: `xetex -ini -jobname=xelatex -progname=xelatex -etex xelatex.ini' failed

###############################################################################
fmtutil: Error! Not all formats have been built successfully.
Visit the log files in directory
/var/lib/texmf/web2c
for details.
###############################################################################

This is a summary of all `failed' messages and warnings:
`xetex -ini -jobname=xelatex -progname=xelatex -etex xelatex.ini' failed

This is confirmed to be a problem on CentOS 6, Scientific Linux 6, Red Hat Enterprise Linux 6, and Fedora Core 13.

You can correct this issue (as root) by:

cd /usr/var/texmf/web2c
xetex -ini -jobname=xelatex -progname=xelatex -etex xelatex.ini

Once you type this you will get the same message, but have the option to press return and generate the file anyway.

Component: 
Base
Release: 
FAQ Category: 
Topic: 

Useful Starman commands.
Using the perl based Starman webserver is the easiest way to run LedgerSMB locally (and quite possibly for production use as well).

At the terminal, and from your LedgerSMB directory:

Start Starman

starman  tools/starman.psgi

Default port is 5000.

starman -l :8080 tools/starman.psgi

Start with 8080 specified as the port.

Note: some documentation specifies the switch

--preload-app

It has been sugggested that this may give performance advantages in a production environment but isn't recommended while developing.
The manpage has more to say on this.

man starman

Based on that we currently would not recommend using --preload-app even on a production server

While Starman is running

Reload Starman

pkill -HUP -f "starman master"

Restart Starman

pkill -TERM -f "starman master"

Release the port if Starman is terminated

NOTE: try Restart Starman before doing this.

pkill -KILL -f "starman master"
Release: 
FAQ Category: 

The short answer is that TeX doesn't know how to deal with UTF-8 (or rather non-ASCII) characters. XeTeX has been designed to work around these limitations. The easiest way to generate PDFs is to install Xe(La)TeX and use the 'xedemo' templates - these templates have been 'ported' from LaTeX to XeLaTeX.

Distribution specific install instructions listed below.

Debian / Ubuntu 

Install texlive-xetex that includes xelatex

apt-get install texlive-xetex

but you need to patch LaTeX::Driver
Install liblatex-{driver,encode,table}-perl for latex

apt-get install liblatex-{driver,encode,table}-perl

and libmoosex-followpbp-perl for Template::Plugin::Latex

apt-get install libmoosex-followpbp-perlafter that:

apt-get install libtemplate-plugin-latex-perl  (or cpan Template::Plugin::Latex)

 

LedgerSMB xelatex configuration

Install xelatex and change the LedgerSMB configuration from the menu:
System -> System Defaults -> Templates directory
Change to "xedemo"

Change a path

From the mailing list: (Chris Travers)
Right now, I am open to suggestions on a better approach, as the Template::Latex api's don't seem to work to do this, but I resorted to changing the paths in LaTeX::Driver::Paths directly (find the location with locate LaTeX/Driver/Paths.pm). This file gets written at installation time for the LaTeX::Driver module and so I consider it reasonably editable.

locate LaTeX/Driver/Paths.pm

If locate is not installed you can do:  find /usr . |grep "LaTeX/Driver/Paths.pm"
/usr/share/perl5/LaTeX/Driver/Paths.pm  ( Debian / Ubuntu )

Make a backup copy of  LaTeX/Driver/Paths.pm (you have to have root priviliges to do this or use sudo)

cp /usr/share/perl5/LaTeX/Driver/Paths.pm /usr/share/perl5/LaTeX/Driver/Paths.pm.backup(Change the path to your path for LaTeX/Driver/Paths.pm)

User your text editor to edit LaTeX/Driver/Paths.pm  (you have to have root priviliges to do this or use sudo)

In LaTeX/Driver/Paths.pm change

$program_path{pdflatex} = '/path/to/pdflatex;

to

$program_path{pdflatex} = '/path/to/xelatex';

 

This is the error you get, if you do not change:
/usr/share/perl5/LaTeX/Driver/Paths.pm  (Debian path)  :


Error!

latex error - pdflatex exited with errors:
!
l.26 \RequireXeTeX
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
! Fatal fontspec error: "cannot-use-pdftex"
!
! The fontspec package requires either XeTeX or LuaTeX to function.
!
! You must change your typesetting engine to, e.g., "xelatex" or "lualatex"
! instead of plain "latex" or "pdflatex".
!
! See the fontspec documentation for further information.
!
! For immediate help type H <return>.
!...............................................
l.38 }




 

The utf8 character "hack fix"

Before making this change will UTF8 characters appear as squares in the PDF file. To print utf8 characters in pdf files, you must make the following change:

These are the steps:
su root
open /usr/share/perl5/LaTeX/Driver.pm
in your text editor
go to line 174 on Debian Squeeze (6.x) and line 176 on Debian Wheexy (7.x)
you see "write_file( ..." there
change

".tex", $source

to

".tex", {binmode=>':utf8'}, $source

 

Font fix

In order for Verdana to work, install the package ttf-mscorefonts-installer (Debian/Ubuntu)

apt-get install ttf-mscorefonts-installer

In versions 1.3.28 and up, the demo templates no longer depend on Verdana though, but use the non-proprietary Liberation font set, which can be installed using

apt-get install fonts-liberation

 

Code reference to LedgerSMB

The code for this is LedgerSMB/Template/Latex.pm

Component: 
Base

In general: neither. The advice is to have the full source tree in /opt/ledgersmb/<version>.

Installing the LedgerSMB modules in the standard Perl search path works, but interferes with running different versions side-by-side.

To undo installation in /usr/local:

  • remove /usr/local/share/perl/5.XX.X/LedgerSMB/
  • delete /usr/local/share/perl/5.XX.X/LedgerSMB.pm; and
  • find and remove the .pl files that come in LedgerSMB's project root directory and bin/ and LedgerSMB/Scripts/ directories.
Component: 
Base
FAQ Category: 

Useful Starman commands.
Using the perl based Starman webserver is the easiest way to run LedgerSMB locally (and quite possibly for production use as well).

At the terminal, and from your LedgerSMB directory:

Start Starman

starman  tools/starman.psgi

Default port is 5000.

starman -l :8080 tools/starman.psgi

Start with 8080 specified as the port.

Note: some documentation specifies the switch

--preload-app

It has been sugggested that this may give performance advantages in a production environment but isn't recommended while developing.
The manpage has more to say on this.

man starman

Based on that we currently would not recommend using --preload-app even on a production server

While Starman is running

Reload Starman

pkill -HUP -f "starman master"

Restart Starman

pkill -TERM -f "starman master"

Release the port if Starman is terminated

NOTE: try Restart Starman before doing this.

pkill -KILL -f "starman master"
Release: 
FAQ Category: 

The short answer is that TeX doesn't know how to deal with UTF-8 (or rather non-ASCII) characters. XeTeX has been designed to work around these limitations. The easiest way to generate PDFs is to install Xe(La)TeX and use the 'xedemo' templates - these templates have been 'ported' from LaTeX to XeLaTeX.

Distribution specific install instructions listed below.

Debian / Ubuntu 

Install texlive-xetex that includes xelatex

apt-get install texlive-xetex

but you need to patch LaTeX::Driver
Install liblatex-{driver,encode,table}-perl for latex

apt-get install liblatex-{driver,encode,table}-perl

and libmoosex-followpbp-perl for Template::Plugin::Latex

apt-get install libmoosex-followpbp-perlafter that:

apt-get install libtemplate-plugin-latex-perl  (or cpan Template::Plugin::Latex)

 

LedgerSMB xelatex configuration

Install xelatex and change the LedgerSMB configuration from the menu:
System -> System Defaults -> Templates directory
Change to "xedemo"

Change a path

From the mailing list: (Chris Travers)
Right now, I am open to suggestions on a better approach, as the Template::Latex api's don't seem to work to do this, but I resorted to changing the paths in LaTeX::Driver::Paths directly (find the location with locate LaTeX/Driver/Paths.pm). This file gets written at installation time for the LaTeX::Driver module and so I consider it reasonably editable.

locate LaTeX/Driver/Paths.pm

If locate is not installed you can do:  find /usr . |grep "LaTeX/Driver/Paths.pm"
/usr/share/perl5/LaTeX/Driver/Paths.pm  ( Debian / Ubuntu )

Make a backup copy of  LaTeX/Driver/Paths.pm (you have to have root priviliges to do this or use sudo)

cp /usr/share/perl5/LaTeX/Driver/Paths.pm /usr/share/perl5/LaTeX/Driver/Paths.pm.backup(Change the path to your path for LaTeX/Driver/Paths.pm)

User your text editor to edit LaTeX/Driver/Paths.pm  (you have to have root priviliges to do this or use sudo)

In LaTeX/Driver/Paths.pm change

$program_path{pdflatex} = '/path/to/pdflatex;

to

$program_path{pdflatex} = '/path/to/xelatex';

 

This is the error you get, if you do not change:
/usr/share/perl5/LaTeX/Driver/Paths.pm  (Debian path)  :


Error!

latex error - pdflatex exited with errors:
!
l.26 \RequireXeTeX
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
! Fatal fontspec error: "cannot-use-pdftex"
!
! The fontspec package requires either XeTeX or LuaTeX to function.
!
! You must change your typesetting engine to, e.g., "xelatex" or "lualatex"
! instead of plain "latex" or "pdflatex".
!
! See the fontspec documentation for further information.
!
! For immediate help type H <return>.
!...............................................
l.38 }




 

The utf8 character "hack fix"

Before making this change will UTF8 characters appear as squares in the PDF file. To print utf8 characters in pdf files, you must make the following change:

These are the steps:
su root
open /usr/share/perl5/LaTeX/Driver.pm
in your text editor
go to line 174 on Debian Squeeze (6.x) and line 176 on Debian Wheexy (7.x)
you see "write_file( ..." there
change

".tex", $source

to

".tex", {binmode=>':utf8'}, $source

 

Font fix

In order for Verdana to work, install the package ttf-mscorefonts-installer (Debian/Ubuntu)

apt-get install ttf-mscorefonts-installer

In versions 1.3.28 and up, the demo templates no longer depend on Verdana though, but use the non-proprietary Liberation font set, which can be installed using

apt-get install fonts-liberation

 

Code reference to LedgerSMB

The code for this is LedgerSMB/Template/Latex.pm

Component: 
Base

Perl is a high-level, general-purpose, interpreted, dynamic programming language. Perl was originally developed by Larry Wall in 1987 [ http://en.wikipedia.org/wiki/Perl ]

Perl 5 is a highly capable, feature-rich programming language with over 24 years of development.
http://www.perl.org/


Learn Perl
http://www.perl.org/learn.html


The Bernard Chan Perl Tutorial
http://geek.scorpiorising.ca/lcms/index.php?page=perl

http://www.cbkihong.com/index.pl?op=perltut&lang=e



In general: neither. The advice is to have the full source tree in /opt/ledgersmb/<version>.

Installing the LedgerSMB modules in the standard Perl search path works, but interferes with running different versions side-by-side.

To undo installation in /usr/local:

  • remove /usr/local/share/perl/5.XX.X/LedgerSMB/
  • delete /usr/local/share/perl/5.XX.X/LedgerSMB.pm; and
  • find and remove the .pl files that come in LedgerSMB's project root directory and bin/ and LedgerSMB/Scripts/ directories.
Component: 
Base
FAQ Category: 

When trying to use XeLaTeX, you may get a message like:

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! You are attempting to make a LaTeX format from a source file
! That is more than five years old.
!
! If you enter to scroll past this message then the format
! will be built, but please consider obtaining newer source files
! before continuing to build LaTeX.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

! LaTeX source files more than 5 years old!.
l.545 ...aTeX source files more than 5 years old!}

?
! Emergency stop.
l.545 ...aTeX source files more than 5 years old!}

No pages of output.
Transcript written on xelatex.log.
Error: `xetex -ini -jobname=xelatex -progname=xelatex -etex xelatex.ini' failed

###############################################################################
fmtutil: Error! Not all formats have been built successfully.
Visit the log files in directory
/var/lib/texmf/web2c
for details.
###############################################################################

This is a summary of all `failed' messages and warnings:
`xetex -ini -jobname=xelatex -progname=xelatex -etex xelatex.ini' failed

This is confirmed to be a problem on CentOS 6, Scientific Linux 6, Red Hat Enterprise Linux 6, and Fedora Core 13.

You can correct this issue (as root) by:

cd /usr/var/texmf/web2c
xetex -ini -jobname=xelatex -progname=xelatex -etex xelatex.ini

Once you type this you will get the same message, but have the option to press return and generate the file anyway.

Component: 
Base
Release: 
FAQ Category: 
Topic: 

Useful Starman commands.
Using the perl based Starman webserver is the easiest way to run LedgerSMB locally (and quite possibly for production use as well).

At the terminal, and from your LedgerSMB directory:

Start Starman

starman  tools/starman.psgi

Default port is 5000.

starman -l :8080 tools/starman.psgi

Start with 8080 specified as the port.

Note: some documentation specifies the switch

--preload-app

It has been sugggested that this may give performance advantages in a production environment but isn't recommended while developing.
The manpage has more to say on this.

man starman

Based on that we currently would not recommend using --preload-app even on a production server

While Starman is running

Reload Starman

pkill -HUP -f "starman master"

Restart Starman

pkill -TERM -f "starman master"

Release the port if Starman is terminated

NOTE: try Restart Starman before doing this.

pkill -KILL -f "starman master"
Release: 
FAQ Category: 

In general: neither. The advice is to have the full source tree in /opt/ledgersmb/<version>.

Installing the LedgerSMB modules in the standard Perl search path works, but interferes with running different versions side-by-side.

To undo installation in /usr/local:

  • remove /usr/local/share/perl/5.XX.X/LedgerSMB/
  • delete /usr/local/share/perl/5.XX.X/LedgerSMB.pm; and
  • find and remove the .pl files that come in LedgerSMB's project root directory and bin/ and LedgerSMB/Scripts/ directories.
Component: 
Base
FAQ Category: 

Useful Starman commands.
Using the perl based Starman webserver is the easiest way to run LedgerSMB locally (and quite possibly for production use as well).

At the terminal, and from your LedgerSMB directory:

Start Starman

starman  tools/starman.psgi

Default port is 5000.

starman -l :8080 tools/starman.psgi

Start with 8080 specified as the port.

Note: some documentation specifies the switch

--preload-app

It has been sugggested that this may give performance advantages in a production environment but isn't recommended while developing.
The manpage has more to say on this.

man starman

Based on that we currently would not recommend using --preload-app even on a production server

While Starman is running

Reload Starman

pkill -HUP -f "starman master"

Restart Starman

pkill -TERM -f "starman master"

Release the port if Starman is terminated

NOTE: try Restart Starman before doing this.

pkill -KILL -f "starman master"
Release: 
FAQ Category: 

The short answer is that TeX doesn't know how to deal with UTF-8 (or rather non-ASCII) characters. XeTeX has been designed to work around these limitations. The easiest way to generate PDFs is to install Xe(La)TeX and use the 'xedemo' templates - these templates have been 'ported' from LaTeX to XeLaTeX.

Distribution specific install instructions listed below.

Debian / Ubuntu 

Install texlive-xetex that includes xelatex

apt-get install texlive-xetex

but you need to patch LaTeX::Driver
Install liblatex-{driver,encode,table}-perl for latex

apt-get install liblatex-{driver,encode,table}-perl

and libmoosex-followpbp-perl for Template::Plugin::Latex

apt-get install libmoosex-followpbp-perlafter that:

apt-get install libtemplate-plugin-latex-perl  (or cpan Template::Plugin::Latex)

 

LedgerSMB xelatex configuration

Install xelatex and change the LedgerSMB configuration from the menu:
System -> System Defaults -> Templates directory
Change to "xedemo"

Change a path

From the mailing list: (Chris Travers)
Right now, I am open to suggestions on a better approach, as the Template::Latex api's don't seem to work to do this, but I resorted to changing the paths in LaTeX::Driver::Paths directly (find the location with locate LaTeX/Driver/Paths.pm). This file gets written at installation time for the LaTeX::Driver module and so I consider it reasonably editable.

locate LaTeX/Driver/Paths.pm

If locate is not installed you can do:  find /usr . |grep "LaTeX/Driver/Paths.pm"
/usr/share/perl5/LaTeX/Driver/Paths.pm  ( Debian / Ubuntu )

Make a backup copy of  LaTeX/Driver/Paths.pm (you have to have root priviliges to do this or use sudo)

cp /usr/share/perl5/LaTeX/Driver/Paths.pm /usr/share/perl5/LaTeX/Driver/Paths.pm.backup(Change the path to your path for LaTeX/Driver/Paths.pm)

User your text editor to edit LaTeX/Driver/Paths.pm  (you have to have root priviliges to do this or use sudo)

In LaTeX/Driver/Paths.pm change

$program_path{pdflatex} = '/path/to/pdflatex;

to

$program_path{pdflatex} = '/path/to/xelatex';

 

This is the error you get, if you do not change:
/usr/share/perl5/LaTeX/Driver/Paths.pm  (Debian path)  :


Error!

latex error - pdflatex exited with errors:
!
l.26 \RequireXeTeX
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
! Fatal fontspec error: "cannot-use-pdftex"
!
! The fontspec package requires either XeTeX or LuaTeX to function.
!
! You must change your typesetting engine to, e.g., "xelatex" or "lualatex"
! instead of plain "latex" or "pdflatex".
!
! See the fontspec documentation for further information.
!
! For immediate help type H <return>.
!...............................................
l.38 }




 

The utf8 character "hack fix"

Before making this change will UTF8 characters appear as squares in the PDF file. To print utf8 characters in pdf files, you must make the following change:

These are the steps:
su root
open /usr/share/perl5/LaTeX/Driver.pm
in your text editor
go to line 174 on Debian Squeeze (6.x) and line 176 on Debian Wheexy (7.x)
you see "write_file( ..." there
change

".tex", $source

to

".tex", {binmode=>':utf8'}, $source

 

Font fix

In order for Verdana to work, install the package ttf-mscorefonts-installer (Debian/Ubuntu)

apt-get install ttf-mscorefonts-installer

In versions 1.3.28 and up, the demo templates no longer depend on Verdana though, but use the non-proprietary Liberation font set, which can be installed using

apt-get install fonts-liberation

 

Code reference to LedgerSMB

The code for this is LedgerSMB/Template/Latex.pm

Component: 
Base

In general: neither. The advice is to have the full source tree in /opt/ledgersmb/<version>.

Installing the LedgerSMB modules in the standard Perl search path works, but interferes with running different versions side-by-side.

To undo installation in /usr/local:

  • remove /usr/local/share/perl/5.XX.X/LedgerSMB/
  • delete /usr/local/share/perl/5.XX.X/LedgerSMB.pm; and
  • find and remove the .pl files that come in LedgerSMB's project root directory and bin/ and LedgerSMB/Scripts/ directories.
Component: 
Base
FAQ Category: 

When trying to use XeLaTeX, you may get a message like:

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! You are attempting to make a LaTeX format from a source file
! That is more than five years old.
!
! If you enter to scroll past this message then the format
! will be built, but please consider obtaining newer source files
! before continuing to build LaTeX.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

! LaTeX source files more than 5 years old!.
l.545 ...aTeX source files more than 5 years old!}

?
! Emergency stop.
l.545 ...aTeX source files more than 5 years old!}

No pages of output.
Transcript written on xelatex.log.
Error: `xetex -ini -jobname=xelatex -progname=xelatex -etex xelatex.ini' failed

###############################################################################
fmtutil: Error! Not all formats have been built successfully.
Visit the log files in directory
/var/lib/texmf/web2c
for details.
###############################################################################

This is a summary of all `failed' messages and warnings:
`xetex -ini -jobname=xelatex -progname=xelatex -etex xelatex.ini' failed

This is confirmed to be a problem on CentOS 6, Scientific Linux 6, Red Hat Enterprise Linux 6, and Fedora Core 13.

You can correct this issue (as root) by:

cd /usr/var/texmf/web2c
xetex -ini -jobname=xelatex -progname=xelatex -etex xelatex.ini

Once you type this you will get the same message, but have the option to press return and generate the file anyway.

Component: 
Base
Release: 
FAQ Category: 
Topic: 

Useful Starman commands.
Using the perl based Starman webserver is the easiest way to run LedgerSMB locally (and quite possibly for production use as well).

At the terminal, and from your LedgerSMB directory:

Start Starman

starman  tools/starman.psgi

Default port is 5000.

starman -l :8080 tools/starman.psgi

Start with 8080 specified as the port.

Note: some documentation specifies the switch

--preload-app

It has been sugggested that this may give performance advantages in a production environment but isn't recommended while developing.
The manpage has more to say on this.

man starman

Based on that we currently would not recommend using --preload-app even on a production server

While Starman is running

Reload Starman

pkill -HUP -f "starman master"

Restart Starman

pkill -TERM -f "starman master"

Release the port if Starman is terminated

NOTE: try Restart Starman before doing this.

pkill -KILL -f "starman master"
Release: 
FAQ Category: 

The short answer is that TeX doesn't know how to deal with UTF-8 (or rather non-ASCII) characters. XeTeX has been designed to work around these limitations. The easiest way to generate PDFs is to install Xe(La)TeX and use the 'xedemo' templates - these templates have been 'ported' from LaTeX to XeLaTeX.

Distribution specific install instructions listed below.

Debian / Ubuntu 

Install texlive-xetex that includes xelatex

apt-get install texlive-xetex

but you need to patch LaTeX::Driver
Install liblatex-{driver,encode,table}-perl for latex

apt-get install liblatex-{driver,encode,table}-perl

and libmoosex-followpbp-perl for Template::Plugin::Latex

apt-get install libmoosex-followpbp-perlafter that:

apt-get install libtemplate-plugin-latex-perl  (or cpan Template::Plugin::Latex)

 

LedgerSMB xelatex configuration

Install xelatex and change the LedgerSMB configuration from the menu:
System -> System Defaults -> Templates directory
Change to "xedemo"

Change a path

From the mailing list: (Chris Travers)
Right now, I am open to suggestions on a better approach, as the Template::Latex api's don't seem to work to do this, but I resorted to changing the paths in LaTeX::Driver::Paths directly (find the location with locate LaTeX/Driver/Paths.pm). This file gets written at installation time for the LaTeX::Driver module and so I consider it reasonably editable.

locate LaTeX/Driver/Paths.pm

If locate is not installed you can do:  find /usr . |grep "LaTeX/Driver/Paths.pm"
/usr/share/perl5/LaTeX/Driver/Paths.pm  ( Debian / Ubuntu )

Make a backup copy of  LaTeX/Driver/Paths.pm (you have to have root priviliges to do this or use sudo)

cp /usr/share/perl5/LaTeX/Driver/Paths.pm /usr/share/perl5/LaTeX/Driver/Paths.pm.backup(Change the path to your path for LaTeX/Driver/Paths.pm)

User your text editor to edit LaTeX/Driver/Paths.pm  (you have to have root priviliges to do this or use sudo)

In LaTeX/Driver/Paths.pm change

$program_path{pdflatex} = '/path/to/pdflatex;

to

$program_path{pdflatex} = '/path/to/xelatex';

 

This is the error you get, if you do not change:
/usr/share/perl5/LaTeX/Driver/Paths.pm  (Debian path)  :


Error!

latex error - pdflatex exited with errors:
!
l.26 \RequireXeTeX
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
! Fatal fontspec error: "cannot-use-pdftex"
!
! The fontspec package requires either XeTeX or LuaTeX to function.
!
! You must change your typesetting engine to, e.g., "xelatex" or "lualatex"
! instead of plain "latex" or "pdflatex".
!
! See the fontspec documentation for further information.
!
! For immediate help type H <return>.
!...............................................
l.38 }




 

The utf8 character "hack fix"

Before making this change will UTF8 characters appear as squares in the PDF file. To print utf8 characters in pdf files, you must make the following change:

These are the steps:
su root
open /usr/share/perl5/LaTeX/Driver.pm
in your text editor
go to line 174 on Debian Squeeze (6.x) and line 176 on Debian Wheexy (7.x)
you see "write_file( ..." there
change

".tex", $source

to

".tex", {binmode=>':utf8'}, $source

 

Font fix

In order for Verdana to work, install the package ttf-mscorefonts-installer (Debian/Ubuntu)

apt-get install ttf-mscorefonts-installer

In versions 1.3.28 and up, the demo templates no longer depend on Verdana though, but use the non-proprietary Liberation font set, which can be installed using

apt-get install fonts-liberation

 

Code reference to LedgerSMB

The code for this is LedgerSMB/Template/Latex.pm

Component: 
Base

Perl is a high-level, general-purpose, interpreted, dynamic programming language. Perl was originally developed by Larry Wall in 1987 [ http://en.wikipedia.org/wiki/Perl ]

Perl 5 is a highly capable, feature-rich programming language with over 24 years of development.
http://www.perl.org/


Learn Perl
http://www.perl.org/learn.html


The Bernard Chan Perl Tutorial
http://geek.scorpiorising.ca/lcms/index.php?page=perl

http://www.cbkihong.com/index.pl?op=perltut&lang=e



In general: neither. The advice is to have the full source tree in /opt/ledgersmb/<version>.

Installing the LedgerSMB modules in the standard Perl search path works, but interferes with running different versions side-by-side.

To undo installation in /usr/local:

  • remove /usr/local/share/perl/5.XX.X/LedgerSMB/
  • delete /usr/local/share/perl/5.XX.X/LedgerSMB.pm; and
  • find and remove the .pl files that come in LedgerSMB's project root directory and bin/ and LedgerSMB/Scripts/ directories.
Component: 
Base
FAQ Category: 

Make sure you have TexLive installed. Older TeTeX was recommended but according to Ubuntu repositories, TexLive is the new package to install.

You can install this with the following command:

apt-get install texlive-latex-extra

 

Release: 
FAQ Category: 
Operating system: 

Useful Starman commands.
Using the perl based Starman webserver is the easiest way to run LedgerSMB locally (and quite possibly for production use as well).

At the terminal, and from your LedgerSMB directory:

Start Starman

starman  tools/starman.psgi

Default port is 5000.

starman -l :8080 tools/starman.psgi

Start with 8080 specified as the port.

Note: some documentation specifies the switch

--preload-app

It has been sugggested that this may give performance advantages in a production environment but isn't recommended while developing.
The manpage has more to say on this.

man starman

Based on that we currently would not recommend using --preload-app even on a production server

While Starman is running

Reload Starman

pkill -HUP -f "starman master"

Restart Starman

pkill -TERM -f "starman master"

Release the port if Starman is terminated

NOTE: try Restart Starman before doing this.

pkill -KILL -f "starman master"
Release: 
FAQ Category: 

The short answer is that TeX doesn't know how to deal with UTF-8 (or rather non-ASCII) characters. XeTeX has been designed to work around these limitations. The easiest way to generate PDFs is to install Xe(La)TeX and use the 'xedemo' templates - these templates have been 'ported' from LaTeX to XeLaTeX.

Distribution specific install instructions listed below.

Debian / Ubuntu 

Install texlive-xetex that includes xelatex

apt-get install texlive-xetex

but you need to patch LaTeX::Driver
Install liblatex-{driver,encode,table}-perl for latex

apt-get install liblatex-{driver,encode,table}-perl

and libmoosex-followpbp-perl for Template::Plugin::Latex

apt-get install libmoosex-followpbp-perlafter that:

apt-get install libtemplate-plugin-latex-perl  (or cpan Template::Plugin::Latex)

 

LedgerSMB xelatex configuration

Install xelatex and change the LedgerSMB configuration from the menu:
System -> System Defaults -> Templates directory
Change to "xedemo"

Change a path

From the mailing list: (Chris Travers)
Right now, I am open to suggestions on a better approach, as the Template::Latex api's don't seem to work to do this, but I resorted to changing the paths in LaTeX::Driver::Paths directly (find the location with locate LaTeX/Driver/Paths.pm). This file gets written at installation time for the LaTeX::Driver module and so I consider it reasonably editable.

locate LaTeX/Driver/Paths.pm

If locate is not installed you can do:  find /usr . |grep "LaTeX/Driver/Paths.pm"
/usr/share/perl5/LaTeX/Driver/Paths.pm  ( Debian / Ubuntu )

Make a backup copy of  LaTeX/Driver/Paths.pm (you have to have root priviliges to do this or use sudo)

cp /usr/share/perl5/LaTeX/Driver/Paths.pm /usr/share/perl5/LaTeX/Driver/Paths.pm.backup(Change the path to your path for LaTeX/Driver/Paths.pm)

User your text editor to edit LaTeX/Driver/Paths.pm  (you have to have root priviliges to do this or use sudo)

In LaTeX/Driver/Paths.pm change

$program_path{pdflatex} = '/path/to/pdflatex;

to

$program_path{pdflatex} = '/path/to/xelatex';

 

This is the error you get, if you do not change:
/usr/share/perl5/LaTeX/Driver/Paths.pm  (Debian path)  :


Error!

latex error - pdflatex exited with errors:
!
l.26 \RequireXeTeX
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
! Fatal fontspec error: "cannot-use-pdftex"
!
! The fontspec package requires either XeTeX or LuaTeX to function.
!
! You must change your typesetting engine to, e.g., "xelatex" or "lualatex"
! instead of plain "latex" or "pdflatex".
!
! See the fontspec documentation for further information.
!
! For immediate help type H <return>.
!...............................................
l.38 }




 

The utf8 character "hack fix"

Before making this change will UTF8 characters appear as squares in the PDF file. To print utf8 characters in pdf files, you must make the following change:

These are the steps:
su root
open /usr/share/perl5/LaTeX/Driver.pm
in your text editor
go to line 174 on Debian Squeeze (6.x) and line 176 on Debian Wheexy (7.x)
you see "write_file( ..." there
change

".tex", $source

to

".tex", {binmode=>':utf8'}, $source

 

Font fix

In order for Verdana to work, install the package ttf-mscorefonts-installer (Debian/Ubuntu)

apt-get install ttf-mscorefonts-installer

In versions 1.3.28 and up, the demo templates no longer depend on Verdana though, but use the non-proprietary Liberation font set, which can be installed using

apt-get install fonts-liberation

 

Code reference to LedgerSMB

The code for this is LedgerSMB/Template/Latex.pm

Component: 
Base

Perl is a high-level, general-purpose, interpreted, dynamic programming language. Perl was originally developed by Larry Wall in 1987 [ http://en.wikipedia.org/wiki/Perl ]

Perl 5 is a highly capable, feature-rich programming language with over 24 years of development.
http://www.perl.org/


Learn Perl
http://www.perl.org/learn.html


The Bernard Chan Perl Tutorial
http://geek.scorpiorising.ca/lcms/index.php?page=perl

http://www.cbkihong.com/index.pl?op=perltut&lang=e



In general: neither. The advice is to have the full source tree in /opt/ledgersmb/<version>.

Installing the LedgerSMB modules in the standard Perl search path works, but interferes with running different versions side-by-side.

To undo installation in /usr/local:

  • remove /usr/local/share/perl/5.XX.X/LedgerSMB/
  • delete /usr/local/share/perl/5.XX.X/LedgerSMB.pm; and
  • find and remove the .pl files that come in LedgerSMB's project root directory and bin/ and LedgerSMB/Scripts/ directories.
Component: 
Base
FAQ Category: 

Make sure you have TexLive installed. Older TeTeX was recommended but according to Ubuntu repositories, TexLive is the new package to install.

You can install this with the following command:

apt-get install texlive-latex-extra

 

Release: 
FAQ Category: 
Operating system: