RE: Patch to support printout internationalization

2016-06-17 Thread Roland Winkler
On Wed Jun 8 2016 Vincent Belaïche wrote:
> My contribution does not change this approach. Just it splits the existing
> styles files in a way that allows more easilly to select what language you 
> want
> to format the address book.
> 
> In other words all the macros that are language specific (e.g.\today) are
> placed in a separate .tex file.
> 
> I had also to modify bbdb-print.tex in order to remove these
> macros from there, and bbdb-print.el so that the new language
> specific .tex file is in the include-file alist cell.

I think that using TeX (instead of LaTeX) is really an outdated
approach for printing bbdb records.  Modern LaTeX has lots of fancy
packages to support, for example, language-specific stuff.
Therefore, a re-write of bbdb-print should provide a way to exploit
these LaTeX features effectively (instead of reinventing the wheel
by defining \today for different languages / different tastes).

Also, it should be possible to include bbdb records in LaTeX
documents using something like

\begin{bbdbrecord}
...
\end{bbdbrecord}

with a (customizable) LaTeX environment bbdbrecord that knows how to print
a bbdb record.

Roland

--
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports. http://sdm.link/zohomanageengine
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/

RE: Patch to support printout internationalization

2016-06-08 Thread Vincent Belaïche
Dear Roland,


Answering to myself, in order to note two limitations in the current code 
w.r.t. to the possibility to replace the current tex code by XeLaTeX or LaTeX 
code:


1) Lisp makes some direct code generation in bbdb-print.el like this


  (dolist (dim '(hsize vsize hoffset voffset))
(if (setq tmp (cdr (assoc dim alist)))
(insert (format "\\%s=%s\n" dim tmp


it should be possible to replace (format "\\%s=%s\n" dim tmp) by something 
else, for instance


   (format "\\PassOptionsToClass{%s=%s}{bbdb}\n" dim tmp)


if ever somebody makes some bbdb class to do same job. So the code should be:


  (dolist (dim '(hsize vsize hoffset voffset))
(if (setq tmp (cdr (assoc dim alist)))
(insert (funcall bbdb-format-page-layout-fun dim tmp


with bbdb-format-page-layout-fun a new defcustom.



2) final message


   "Process this file with TeX (not LaTeX)"


   should also be a defcustom, rather than wired in the code.



   Vincent.


--
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/

RE: Patch to support printout internationalization

2016-06-08 Thread Vincent Belaïche
Dear Roland,


My contribution does not change this approach. Just it splits the existing 
styles files in a way that allows more easilly to select what language you want 
to format the address book.

In other words all the macros that are language specific (e.g.\today) are 
placed in a separate .tex file.

I had also to modify bbdb-print.tex in order to remove these macros from there, 
and bbdb-print.el so that the new language specific .tex file is in the 
include-file alist cell.


BR,

   Vincent.


De : Roland Winkler 
Envoyé : mercredi 8 juin 2016 13:55:32
À : Vincent Belaïche
Cc : BBDB info list
Objet : Re: Patch to support printout internationalization

On Tue Jun 7 2016 Vincent Belaïche wrote:
> Here is attached a patch for printout to be in another language
> than English.
>
> BTW, the 'P' keymap is no longer active for bbdb-print. Any plan
> to resurrect it or make some other mapping ?

I have a (so far incomplete) re-write of bbdb-print based on the
idea that the bbdb records should be written to a (La)TeX file using
some generic LaTeX commands for the fields of each record (like
\name{first}{last}, \phone{label}{number}, etc)

Then one can more easily define new LaTeX classes (or even style
files to be used with any other LaTeX class files) which (re)define
these LaTeX commands.

I hope I can complete this not too far in the future.

Roland
--
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/

Re: Patch to support printout internationalization

2016-06-08 Thread Roland Winkler
On Tue Jun 7 2016 Vincent Belaïche wrote:
> Here is attached a patch for printout to be in another language
> than English.
> 
> BTW, the 'P' keymap is no longer active for bbdb-print. Any plan
> to resurrect it or make some other mapping ?

I have a (so far incomplete) re-write of bbdb-print based on the
idea that the bbdb records should be written to a (La)TeX file using
some generic LaTeX commands for the fields of each record (like
\name{first}{last}, \phone{label}{number}, etc)

Then one can more easily define new LaTeX classes (or even style
files to be used with any other LaTeX class files) which (re)define
these LaTeX commands.

I hope I can complete this not too far in the future.

Roland

--
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
___
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/