|
From: M <mar...@gm...> - 2013-02-01 11:12:43
|
Hi!
Firstly I would like to thank for your project. Good job!
I use jPicEdt working mostly with Emulated Latex files due to the fact
that this kind of pictures can be directly viewed in the internal DVI
viewer in my latex editor (LEd). And there's only one pain in the neck.
Sometimes I'd like to have colored figures. I can't figure out if it can
be done via programme interface. I am able to do it by modifying the
source file. I simply add \color{} command before the part of the
picture that should be coloured.
Unfortunately, that commands are not interpreted by jpicEdt. So after
editing in programme and next saving the picture is black and white
again and the process of editing source code has to be done once more.
Could it be fixed in the next release, please?
Best regards,
Martin
|
|
From: Vincent B. <vin...@gm...> - 2013-02-02 02:57:32
|
Hello, Have you tried to do figures with PStricks or TikZ (TikZ encoding needs the latest version of jPicEdt here http://sourceforge.net/projects/jpicedt/files/jpicedt-devel/1.6-pre1_20130124). Personnally I generally compile to PDF and view with SumatraPDF (I am under MSWindows). There I have no limitation with viewing figures. If you are on Linux and want to use DVI viewing, then you probably use xdvi for viewing. I heard that Evince is a better viewer than xdvi, but I cannot tell because I am not under Linux. Maybe the best solution for you is to change you viewer. Then to answer to your question: no currently there is no way to insert persistent pieces of "transparent" code into the output (transparent meaning that jPicEdt would not interprete it). This is a function which I also had in mind because that would also allow to create animations or other tricks like LaTeX encoding iterations repeating the same objects. I suggest that you shold file a feature request about that. Here is the link http://sourceforge.net/tracker/?group_id=50377&atid=459508&source=navbar BR, Vin,cent. M a écrit : > Hi! > Firstly I would like to thank for your project. Good job! > I use jPicEdt working mostly with Emulated Latex files due to the fact > that this kind of pictures can be directly viewed in the internal DVI > viewer in my latex editor (LEd). And there's only one pain in the neck. > Sometimes I'd like to have colored figures. I can't figure out if it can > be done via programme interface. I am able to do it by modifying the > source file. I simply add \color{} command before the part of the > picture that should be coloured. > Unfortunately, that commands are not interpreted by jpicEdt. So after > editing in programme and next saving the picture is black and white > again and the process of editing source code has to be done once more. > Could it be fixed in the next release, please? > > Best regards, > Martin > > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_d2d_jan > _______________________________________________ > Jpicedt-users mailing list > Jpi...@li... > https://lists.sourceforge.net/lists/listinfo/jpicedt-users > > |
|
From: M <mar...@gm...> - 2013-02-04 22:56:04
|
Thanks for the reply. I also use windows, but as I wrote, in LEd there is a built-in dvi viewer which can be controlled from within the editor. The minus is that this viewer cannot handle neither pstricks nor tikz. But I got used to this handy solution and I stick to it unless it's impossible to make something in pure latex. I'll add a feature request. Best wishes, Martin On 2013-02-02 03:57, Vincent Belaïche wrote:> Hello, > > Have you tried to do figures with PStricks or TikZ (TikZ encoding needs > the latest version of jPicEdt here > http://sourceforge.net/projects/jpicedt/files/jpicedt-devel/1.6-pre1_20130124). > > > Personnally I generally compile to PDF and view with SumatraPDF (I am > under MSWindows). There I have no limitation with viewing figures. > > If you are on Linux and want to use DVI viewing, then you probably use > xdvi for viewing. I heard that Evince is a better viewer than xdvi, but > I cannot tell because I am not under Linux. Maybe the best solution for > you is to change you viewer. > > Then to answer to your question: no currently there is no way to insert > persistent pieces of "transparent" code into the output (transparent > meaning that jPicEdt would not interprete it). This is a function which > I also had in mind because that would also allow to create animations or > other tricks like LaTeX encoding iterations repeating the same objects. > I suggest that you shold file a feature request about that. Here is the > link > http://sourceforge.net/tracker/?group_id=50377&atid=459508&source=navbar > > BR, > Vin,cent. > > M a écrit : >> Hi! >> Firstly I would like to thank for your project. Good job! >> I use jPicEdt working mostly with Emulated Latex files due to the fact >> that this kind of pictures can be directly viewed in the internal DVI >> viewer in my latex editor (LEd). And there's only one pain in the neck. >> Sometimes I'd like to have colored figures. I can't figure out if it >> can be done via programme interface. I am able to do it by modifying >> the source file. I simply add \color{} command before the part of the >> picture that should be coloured. >> Unfortunately, that commands are not interpreted by jpicEdt. So after >> editing in programme and next saving the picture is black and white >> again and the process of editing source code has to be done once more. >> Could it be fixed in the next release, please? >> >> Best regards, >> Martin >> >> >> ------------------------------------------------------------------------------ >> >> Everyone hates slow websites. So do we. >> Make your web apps faster with AppDynamics >> Download AppDynamics Lite for free today: >> http://p.sf.net/sfu/appdyn_d2d_jan >> _______________________________________________ >> Jpicedt-users mailing list >> Jpi...@li... >> https://lists.sourceforge.net/lists/listinfo/jpicedt-users >> > |
|
From: Vincent B. <vin...@gm...> - 2013-02-05 20:17:41
|
Well, you could do some really ugly trick that would work with the
current version of jPicEdt in plain LaTeX:
1) add the following code into your preamble
--8<-----8<-----8<-----8<-----8<-----8<-----8<---
\makeatletter
\newcommand*\setcolorinpic{}
\newcommand*\setcolorinpic@a{}
\def\setcolorinpic#1{%
\color{#1}%
\edef\@tempa{\the\catcode125 }
\catcode125=11 %
\setcolorinpic@a
}
\def\setcolorinpic@a#1#2{%
\catcode125=\@tempa\relax
}
\makeatother
--8<-----8<-----8<-----8<-----8<-----8<-----8<---
2) The put into you picture some text element that contains the
following text (and only this text) where you replace red by whatever
color you like
--8<-----8<-----8<-----8<-----8<-----8<-----8<---
\expandafter}\expandafter}\setcolorinpic{red}
--8<-----8<-----8<-----8<-----8<-----8<-----8<---
The generated code will look like this:
--8<-----8<-----8<-----8<-----8<-----8<-----8<---
%%Created by jPicEdt 1.6-pre1: mixed JPIC-XML/LaTeX format
%%Tue Feb 05 21:06:00 CET 2013
%%Begin JPIC-XML
%<?xml version="1.0" standalone="yes"?>
%<jpic x-min="45" x-max="45" y-min="20" y-max="50" auto-bounding="true">
%<text anchor-point="(45,50)"
% >
%black text
%</text>
%<text anchor-point="(45,35)"
% >
%\expandafter}\expandafter}\setcolorinpic{red}
%</text>
%<text anchor-point="(45,20)"
% >
%red text
%</text>
%</jpic>
%%End JPIC-XML
%LaTeX-picture environment using emulated lines and arcs
%You can rescale the whole picture (to 80% for instance) by using the
command \def\JPicScale{0.8}
\ifx\JPicScale\undefined\def\JPicScale{1}\fi
\unitlength \JPicScale mm
\begin{picture}(45,50)(0,0)
\put(45,50){\makebox(0,0)[cc]{black text}}
\put(45,35){\makebox(0,0)[cc]{\expandafter}\expandafter}\setcolorinpic{red}}}
\put(45,20){\makebox(0,0)[cc]{red text}}
\end{picture}
--8<-----8<-----8<-----8<-----8<-----8<-----8<---
With this the text element with "black text" will be in black and the
text element "red text" will be in red.
Please note that you can put some text before the string
--8<-----8<-----8<-----8<-----8<-----8<-----8<---
\expandafter}\expandafter}\setcolorinpic{red}
--8<-----8<-----8<-----8<-----8<-----8<-----8<---
But you should not put any text after it !
So it will be all account where the text element that contains the color
setting will be place : it could have any (x,y) position when it does
not contain anything else than the color setting, but the Z-order will
matter as anything with greater Z-order will be colored, and anything
with lower Z-order will not be colored.
Hoping that this can help,
Vincent.
PS: I am quite surprised that your dvi viewer can display colors set
with \color, but not colors of a PSTricks or TikZ drawing. Maybe you
should really investigate whether LEd can have another viewer
configured. I use EMACS AUCTeX and with it you can configure whatever
viewer you like.
M a écrit :
> Thanks for the reply.
> I also use windows, but as I wrote, in LEd there is a built-in dvi
> viewer which can be controlled from within the editor. The minus is that
> this viewer cannot handle neither pstricks nor tikz. But I got used to
> this handy solution and I stick to it unless it's impossible to make
> something in pure latex.
> I'll add a feature request.
>
> Best wishes,
> Martin
>
>
> On 2013-02-02 03:57, Vincent Belaïche wrote:> Hello,
> >
> > Have you tried to do figures with PStricks or TikZ (TikZ encoding needs
> > the latest version of jPicEdt here
> >
> http://sourceforge.net/projects/jpicedt/files/jpicedt-devel/1.6-pre1_20130124).
>
> >
> >
> > Personnally I generally compile to PDF and view with SumatraPDF (I am
> > under MSWindows). There I have no limitation with viewing figures.
> >
> > If you are on Linux and want to use DVI viewing, then you probably use
> > xdvi for viewing. I heard that Evince is a better viewer than xdvi, but
> > I cannot tell because I am not under Linux. Maybe the best solution for
> > you is to change you viewer.
> >
> > Then to answer to your question: no currently there is no way to insert
> > persistent pieces of "transparent" code into the output (transparent
> > meaning that jPicEdt would not interprete it). This is a function which
> > I also had in mind because that would also allow to create animations or
> > other tricks like LaTeX encoding iterations repeating the same objects.
> > I suggest that you shold file a feature request about that. Here is the
> > link
> > http://sourceforge.net/tracker/?group_id=50377&atid=459508&source=navbar
> >
> > BR,
> > Vin,cent.
> >
> > M a écrit :
> >> Hi!
> >> Firstly I would like to thank for your project. Good job!
> >> I use jPicEdt working mostly with Emulated Latex files due to the fact
> >> that this kind of pictures can be directly viewed in the internal DVI
> >> viewer in my latex editor (LEd). And there's only one pain in the neck.
> >> Sometimes I'd like to have colored figures. I can't figure out if it
> >> can be done via programme interface. I am able to do it by modifying
> >> the source file. I simply add \color{} command before the part of the
> >> picture that should be coloured.
> >> Unfortunately, that commands are not interpreted by jpicEdt. So after
> >> editing in programme and next saving the picture is black and white
> >> again and the process of editing source code has to be done once more.
> >> Could it be fixed in the next release, please?
> >>
> >> Best regards,
> >> Martin
> >>
> >>
> >>
> ------------------------------------------------------------------------------
>
> >>
> >> Everyone hates slow websites. So do we.
> >> Make your web apps faster with AppDynamics
> >> Download AppDynamics Lite for free today:
> >> http://p.sf.net/sfu/appdyn_d2d_jan
> >> _______________________________________________
> >> Jpicedt-users mailing list
> >> Jpi...@li...
> >> https://lists.sourceforge.net/lists/listinfo/jpicedt-users
> >>
> >
>
>
>
> ------------------------------------------------------------------------------
> Free Next-Gen Firewall Hardware Offer
> Buy your Sophos next-gen firewall before the end March 2013
> and get the hardware for free! Learn more.
> http://p.sf.net/sfu/sophos-d2d-feb
> _______________________________________________
> Jpicedt-users mailing list
> Jpi...@li...
> https://lists.sourceforge.net/lists/listinfo/jpicedt-users
>
>
|
|
From: Vincent B. <vin...@or...> - 2013-02-05 21:25:43
|
By the way, you still can file the feature request about inserting
transparently code to the generated LaTeX file.
Contributions are welcome, be it bug reports, feature requests, or
internationalization translations ;-)
Vincent.
Vincent Belaïche a écrit :
> Well, you could do some really ugly trick that would work with the
> current version of jPicEdt in plain LaTeX:
>
> 1) add the following code into your preamble
>
> --8<-----8<-----8<-----8<-----8<-----8<-----8<---
> \makeatletter
> \newcommand*\setcolorinpic{}
> \newcommand*\setcolorinpic@a{}
> \def\setcolorinpic#1{%
> \color{#1}%
> \edef\@tempa{\the\catcode125 }
> \catcode125=11 %
> \setcolorinpic@a
> }
> \def\setcolorinpic@a#1#2{%
> \catcode125=\@tempa\relax }
> \makeatother
> --8<-----8<-----8<-----8<-----8<-----8<-----8<---
>
> 2) The put into you picture some text element that contains the
> following text (and only this text) where you replace red by whatever
> color you like
>
> --8<-----8<-----8<-----8<-----8<-----8<-----8<---
> \expandafter}\expandafter}\setcolorinpic{red}
> --8<-----8<-----8<-----8<-----8<-----8<-----8<---
>
> The generated code will look like this:
>
> --8<-----8<-----8<-----8<-----8<-----8<-----8<---
> %%Created by jPicEdt 1.6-pre1: mixed JPIC-XML/LaTeX format
> %%Tue Feb 05 21:06:00 CET 2013
> %%Begin JPIC-XML
> %<?xml version="1.0" standalone="yes"?>
> %<jpic x-min="45" x-max="45" y-min="20" y-max="50" auto-bounding="true">
> %<text anchor-point="(45,50)"
> % >
> %black text
> %</text>
> %<text anchor-point="(45,35)"
> % >
> %\expandafter}\expandafter}\setcolorinpic{red}
> %</text>
> %<text anchor-point="(45,20)"
> % >
> %red text
> %</text>
> %</jpic>
> %%End JPIC-XML
> %LaTeX-picture environment using emulated lines and arcs
> %You can rescale the whole picture (to 80% for instance) by using the
> command \def\JPicScale{0.8}
> \ifx\JPicScale\undefined\def\JPicScale{1}\fi
> \unitlength \JPicScale mm
> \begin{picture}(45,50)(0,0)
> \put(45,50){\makebox(0,0)[cc]{black text}}
>
> \put(45,35){\makebox(0,0)[cc]{\expandafter}\expandafter}\setcolorinpic{red}}}
>
>
> \put(45,20){\makebox(0,0)[cc]{red text}}
>
> \end{picture}
> --8<-----8<-----8<-----8<-----8<-----8<-----8<---
>
> With this the text element with "black text" will be in black and the
> text element "red text" will be in red.
>
> Please note that you can put some text before the string
>
> --8<-----8<-----8<-----8<-----8<-----8<-----8<---
> \expandafter}\expandafter}\setcolorinpic{red}
> --8<-----8<-----8<-----8<-----8<-----8<-----8<---
>
> But you should not put any text after it !
>
> So it will be all account where the text element that contains the
> color setting will be place : it could have any (x,y) position when it
> does not contain anything else than the color setting, but the Z-order
> will matter as anything with greater Z-order will be colored, and
> anything with lower Z-order will not be colored.
>
> Hoping that this can help,
> Vincent.
>
> PS: I am quite surprised that your dvi viewer can display colors set
> with \color, but not colors of a PSTricks or TikZ drawing. Maybe you
> should really investigate whether LEd can have another viewer
> configured. I use EMACS AUCTeX and with it you can configure whatever
> viewer you like.
>
> M a écrit :
>> Thanks for the reply.
>> I also use windows, but as I wrote, in LEd there is a built-in dvi
>> viewer which can be controlled from within the editor. The minus is
>> that this viewer cannot handle neither pstricks nor tikz. But I got
>> used to this handy solution and I stick to it unless it's impossible
>> to make something in pure latex.
>> I'll add a feature request.
>>
>> Best wishes,
>> Martin
>>
>>
>> On 2013-02-02 03:57, Vincent Belaïche wrote:> Hello,
>> >
>> > Have you tried to do figures with PStricks or TikZ (TikZ encoding
>> needs
>> > the latest version of jPicEdt here
>> >
>> http://sourceforge.net/projects/jpicedt/files/jpicedt-devel/1.6-pre1_20130124).
>>
>> >
>> >
>> > Personnally I generally compile to PDF and view with SumatraPDF (I am
>> > under MSWindows). There I have no limitation with viewing figures.
>> >
>> > If you are on Linux and want to use DVI viewing, then you probably
>> use
>> > xdvi for viewing. I heard that Evince is a better viewer than
>> xdvi, but
>> > I cannot tell because I am not under Linux. Maybe the best
>> solution for
>> > you is to change you viewer.
>> >
>> > Then to answer to your question: no currently there is no way to
>> insert
>> > persistent pieces of "transparent" code into the output (transparent
>> > meaning that jPicEdt would not interprete it). This is a function
>> which
>> > I also had in mind because that would also allow to create
>> animations or
>> > other tricks like LaTeX encoding iterations repeating the same
>> objects.
>> > I suggest that you shold file a feature request about that. Here
>> is the
>> > link
>> >
>> http://sourceforge.net/tracker/?group_id=50377&atid=459508&source=navbar
>> >
>> > BR,
>> > Vin,cent.
>> >
>> > M a écrit :
>> >> Hi!
>> >> Firstly I would like to thank for your project. Good job!
>> >> I use jPicEdt working mostly with Emulated Latex files due to the
>> fact
>> >> that this kind of pictures can be directly viewed in the internal
>> DVI
>> >> viewer in my latex editor (LEd). And there's only one pain in the
>> neck.
>> >> Sometimes I'd like to have colored figures. I can't figure out if it
>> >> can be done via programme interface. I am able to do it by modifying
>> >> the source file. I simply add \color{} command before the part of
>> the
>> >> picture that should be coloured.
>> >> Unfortunately, that commands are not interpreted by jpicEdt. So
>> after
>> >> editing in programme and next saving the picture is black and white
>> >> again and the process of editing source code has to be done once
>> more.
>> >> Could it be fixed in the next release, please?
>> >>
>> >> Best regards,
>> >> Martin
>> >>
>> >>
>> >>
>> ------------------------------------------------------------------------------
>>
>> >>
>> >> Everyone hates slow websites. So do we.
>> >> Make your web apps faster with AppDynamics
>> >> Download AppDynamics Lite for free today:
>> >> http://p.sf.net/sfu/appdyn_d2d_jan
>> >> _______________________________________________
>> >> Jpicedt-users mailing list
>> >> Jpi...@li...
>> >> https://lists.sourceforge.net/lists/listinfo/jpicedt-users
>> >>
>> >
>>
>>
>>
>> ------------------------------------------------------------------------------
>>
>> Free Next-Gen Firewall Hardware Offer
>> Buy your Sophos next-gen firewall before the end March 2013 and get
>> the hardware for free! Learn more.
>> http://p.sf.net/sfu/sophos-d2d-feb
>> _______________________________________________
>> Jpicedt-users mailing list
>> Jpi...@li...
>> https://lists.sourceforge.net/lists/listinfo/jpicedt-users
>>
>>
>
>
|
|
From: Vincent B. <vin...@gm...> - 2013-02-10 05:40:42
Attachments:
utf8_to_escapedlatin1.cpp
utf8_to_escapedlatin1.7z
|
Thanks a lot, I attached a C++ programme which took me roughly one hour to write and such that utf8_to_escapedlatin1.exe file_in_utf8 file_in_latin1escaped should do the same job as: native2ascii.exe -encoding utf8 file_in_utf8 file_in_latin1escaped well, I tried it on the Russian translation, and native2ascii.exe adds a trailing end of line at the end of file, which my program don't, otherwise outputs are identical on this example. I compiled it for you on MSWindows (.exe is in the zip file which you can unzip with 7z) in case that you don't have any C++ compiler at hand, but of course you can trash the zip file and compile the C++ after reading the 100 lines of code. Good luck with your PHD thesis, and for the translation, take your time, no hurry ;-) VBR, Vincent. PS: If you want any day to come into the project, please get in touch with me, and I send you instructions how to generate from sources: one needs to get two thrid party pieces of code, BSH & MAC OSX jarbundler M a écrit : > Now it works. Thank you very much. > > I'll try to do the translation as you like. I don't have JDK, but I > will use online converter following this tip: > http://sourceforge.net/apps/mediawiki/jump-pilot/index.php?title=How_to_translate_OpenJUMP_into_another_language#Problems_with_.22special.22_characters_.28e.g._translation_of_asian_languages_or_european_accented_characters.29 > > > I wanted to install JDK to help you with this transparent code but > last time a programmed in Java was about 10 years ago and the project > was not even half as complicated as yours. So it'd take long to get me > into project. Unfortunately, I don't have enough time these days. I've > got to finish my phd thesis before June so I have to put this plans > off. Because of that don't expect the translation will be done soon, > either. > > Best regards, > M > > On 2013-02-07 21:55, Vincent Belaïche wrote: >> M a écrit : >>> On 2013-02-05 21:17, Vincent Belaïche wrote:> Well, you could do some >>> really ugly trick that would work with the >>>> current version of jPicEdt in plain LaTeX: >>>> >>>> 1) add the following code into your preamble >>>> >>>> --8<-----8<-----8<-----8<-----8<-----8<-----8<--- >>>> \makeatletter >>>> \newcommand*\setcolorinpic{} >>>> \newcommand*\setcolorinpic@a{} >>>> \def\setcolorinpic#1{% >>>> \color{#1}% >>>> \edef\@tempa{\the\catcode125 } >>>> \catcode125=11 % >>>> \setcolorinpic@a >>>> } >>>> \def\setcolorinpic@a#1#2{% >>>> \catcode125=\@tempa\relax } >>>> \makeatother >>>> --8<-----8<-----8<-----8<-----8<-----8<-----8<--- >>>> >>>> 2) The put into you picture some text element that contains the >>>> following text (and only this text) where you replace red by whatever >>>> color you like >>>> >>>> --8<-----8<-----8<-----8<-----8<-----8<-----8<--- >>>> \expandafter}\expandafter}\setcolorinpic{red} >>>> --8<-----8<-----8<-----8<-----8<-----8<-----8<--- >>>> >>>> The generated code will look like this: >>>> >>>> --8<-----8<-----8<-----8<-----8<-----8<-----8<--- >>>> %%Created by jPicEdt 1.6-pre1: mixed JPIC-XML/LaTeX format >>>> %%Tue Feb 05 21:06:00 CET 2013 >>>> %%Begin JPIC-XML >>>> %<?xml version="1.0" standalone="yes"?> >>>> %<jpic x-min="45" x-max="45" y-min="20" y-max="50" >>>> auto-bounding="true"> >>>> %<text anchor-point="(45,50)" >>>> % > >>>> %black text >>>> %</text> >>>> %<text anchor-point="(45,35)" >>>> % > >>>> %\expandafter}\expandafter}\setcolorinpic{red} >>>> %</text> >>>> %<text anchor-point="(45,20)" >>>> % > >>>> %red text >>>> %</text> >>>> %</jpic> >>>> %%End JPIC-XML >>>> %LaTeX-picture environment using emulated lines and arcs >>>> %You can rescale the whole picture (to 80% for instance) by using the >>>> command \def\JPicScale{0.8} >>>> \ifx\JPicScale\undefined\def\JPicScale{1}\fi >>>> \unitlength \JPicScale mm >>>> \begin{picture}(45,50)(0,0) >>>> \put(45,50){\makebox(0,0)[cc]{black text}} >>>> >>>> >>> \put(45,35){\makebox(0,0)[cc]{\expandafter}\expandafter}\setcolorinpic{red}}} >>> >>> >>>> >>>> >>>> \put(45,20){\makebox(0,0)[cc]{red text}} >>>> >>>> \end{picture} >>>> --8<-----8<-----8<-----8<-----8<-----8<-----8<--- >>>> >>>> With this the text element with "black text" will be in black and the >>>> text element "red text" will be in red. >>>> >>>> Please note that you can put some text before the string >>>> >>>> --8<-----8<-----8<-----8<-----8<-----8<-----8<--- >>>> \expandafter}\expandafter}\setcolorinpic{red} >>>> --8<-----8<-----8<-----8<-----8<-----8<-----8<--- >>>> >>>> But you should not put any text after it ! >>>> >>>> So it will be all account where the text element that contains the >>>> color >>>> setting will be place : it could have any (x,y) position when it does >>>> not contain anything else than the color setting, but the Z-order will >>>> matter as anything with greater Z-order will be colored, and anything >>>> with lower Z-order will not be colored. >>>> >>>> Hoping that this can help, >>>> Vincent. >>> >>> >>> I can't get it working. This is my main file: >>> >>> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% >>> \documentclass{article} >>> \usepackage{color} >>> >>> \begin{document} >>> >>> \makeatletter >>> \newcommand*\setcolorinpic{} >>> \newcommand*\setcolorinpic@{} >>> \def\setcolorinpic#1{% >>> \color{#1}% >>> \edef\@tempa{\the\catcode125 } >>> \catcode125=11 % >>> \setcolorinpic@ >>> } >>> \def\setcolorinpic@{% >>> \catcode125=\@tempa\relax >>> } >>> \makeatother >>> >>> jPicEdt test >>> >>> \input{pic.tex} >>> >>> \end{document} >>> >>> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% >>> a here is the pic.tex code: >>> >>> %%Created by jPicEdt 1.6-pre1: mixed JPIC-XML/LaTeX format >>> %%Wed Feb 06 14:15:46 CET 2013 >>> %%Begin JPIC-XML >>> %<?xml version="1.0" standalone="yes"?> >>> %<jpic x-min="37.5" x-max="45" y-min="33.75" y-max="50" >>> auto-bounding="true"> >>> %<text anchor-point="(45,50)" >>> % > >>> %black text >>> %</text> >>> %<text anchor-point="(37.5,34.38)" >>> % > >>> %\expandafter}\expandafter}\setcolorinpic{red} >>> %</text> >>> %<text anchor-point="(38.12,33.75)" >>> % > >>> %\expandafter}\expandafter}\setcolorinpic{red} >>> %</text> >>> %</jpic> >>> %%End JPIC-XML >>> %LaTeX-picture environment using emulated lines and arcs >>> %You can rescale the whole picture (to 80% for instance) by using the >>> command \def\JPicScale{0.8} >>> \ifx\JPicScale\undefined\def\JPicScale{1}\fi >>> \unitlength \JPicScale mm >>> \begin{picture}(45,50)(0,0) >>> \put(45,50){\makebox(0,0)[cc]{black text}} >>> >>> \put(37.5,34.38){\makebox(0,0)[cc]{\expandafter}\expandafter}\setcolorinpic{red}}} >>> >>> >>> >>> \put(55,50){\makebox(0,0)[cc]{red text}} >>> >>> >>> \end{picture} >>> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% >>> >>> I keep getting the following error: >>> >>> Underfull \hbox (badness 10000) detected at line 27 >>> [][] >>> ! You can't use `\raise' in vertical mode. >>> \put (#1,#2)#3->\@killglue \raise >>> #2\unitlength \hb@xt@ \z@ {\kern #1\unitle... >>> l.29 \put(55,50){\makebox(0,0)[cc]{red text}} >>> >>> ? >>> >>> After deleting the line with "setcolorpic" everything works fine. >>> Any hint? I work on Windows, MikTeX 2.9 >>> >>> So far, for the text objects I simply write: >>> \color{red} $\alpha\dot \beta$ = 7 >>> in the text field, getting the following code in the file: >>> %%%%%%%%%%%%%%%%%%%% >>> \put(28.12,61.88){\makebox(0,0)[cc]{\color{red} $\alpha\dot \beta$ = >>> 7}} >>> %%%%%%%%%%%%%%%%%%%% >>> Maybe it doesn't look pretty in jPicEdt window but it works. >>> >>>> >>>> PS: I am quite surprised that your dvi viewer can display colors set >>>> with \color, but not colors of a PSTricks or TikZ drawing. Maybe you >>>> should really investigate whether LEd can have another viewer >>>> configured. I use EMACS AUCTeX and with it you can configure whatever >>>> viewer you like. >>> >>> As far as I know LEd can't have another viewer. Unfortunately, last >>> LEd realese was in 2009, and the project is rather dead. >>> >>> EMACS -- a bit too sophisticated for me :-). It's easier to ask you >>> for a new feature than to force myself to learn EMACS ;-) >>> >>>> By the way, you still can file the feature request about inserting >>>> transparently code to the generated LaTeX file. >>> >>> Already done. >>> >>>> Contributions are welcome, be it bug reports, feature requests, or >>>> internationalization translations ;-) >>>> >>>> Vincent. >>> >>> I'll keep that in mind. Maybe I'll try to do polish translation in my >>> free time. I'll contact you when I will have it done. >>> >>> >> >> The problem is because you should have `#1#2' after >> `\def\setcolorinpic@' so the definition of \setcolorinpic@ is the >> following >> >> \def\setcolorinpic@#1#2{% >> \catcode125=\@tempa\relax >> } >> >> The purpose of `#1#2' is only to gobble the `}}' that ends the block >> into which you insert `\expandafter}\expandafter}\setcolorinpic{red}'. >> As a matter of fact, those `}}' are no longer useful as they are >> replaced by those inside, >> `\expandafter}\expandafter}\setcolorinpic{red}', one after each >> \expandafter control sequence. >> >> Thank you for your proposal for doing the Polish translation --- is that >> fine if the Polish translation is written in utf-8, and not in latin-2. >> Encoding utf-8 would be simpler for me because I can re-use the same >> coding conversion arguments in the build file as for russian which is >> also in utf-8 (not koi-8). >> >> I attached a file utf8_i18n_pl.properties which is already in UTF-8 and >> where I translated the 3 first keys to Polish we Google translate, >> i.e. : >> >> about.APictureEditorFor=Wektor edytor grafiki dla LaTeX >> about.AboutPicEdt=O jPicEdt >> action.command.DVI.mnemonic=V >> action.command.DVI.tooltip=Uruchom przeglądarkę DVI >> >> If you can read them then the only thing to do is to write the other >> keys. >> >> In order to install the translation to polish at your jPicEdt please >> follow the following procedure: >> 1) first you need to convert utf8_i18n_pl.properties file in UTF-8 >> encoding to utf8_i18n_pl.properties file in LATIN-1 (aka iso-8859-1) >> with the native2ascii tool. This tool is part of the JDK tool set, if >> you don't have this installed send the file to me and I can do the >> conversion. >> 2) place i18n_pl.properties in the same place as other >> i18n_xx.properties files in your installation >> 3) you must restart jPicEdt for it to be effective. >> >> I have not found any way to download only native2ascii.exe without all >> the JDK.exe, anyway it should not be too hard either to write a script >> or a small console application to do the same job in the UTF-8 -> LATIN1 >> case, if you think that you really need that to tune the translation, >> then I can prepare that for you. >> >> VBR, >> Vincent. >> >> file://localhost/c%3A/Programme/Java/doc/Java%20SE%206%20Documentation.mht >> >> Vincent. > > |
|
From: Vincent B. <vin...@or...> - 2013-02-10 05:57:22
|
FYI, I placed the encoder source file here also: http://jpicedt.cvs.sourceforge.net/viewvc/jpicedt/jpicedt/utf8_to_escapedlatin1.cpp?view=markup Vincent Vincent Belaïche a écrit : > Thanks a lot, > > I attached a C++ programme which took me roughly one hour to write and > such that > > utf8_to_escapedlatin1.exe file_in_utf8 file_in_latin1escaped > > should do the same job as: > > native2ascii.exe -encoding utf8 file_in_utf8 file_in_latin1escaped > > well, I tried it on the Russian translation, and native2ascii.exe > adds a trailing end of line at the end of file, which my program > don't, otherwise outputs are identical on this example. > > I compiled it for you on MSWindows (.exe is in the zip file which you > can unzip with 7z) in case that you don't have any C++ compiler at > hand, but of course you can trash the zip file and compile the C++ > after reading the 100 lines of code. > > Good luck with your PHD thesis, and for the translation, take your > time, no hurry ;-) > > VBR, > Vincent. > > PS: If you want any day to come into the project, please get in touch > with me, and I send you instructions how to generate from sources: one > needs to get two thrid party pieces of code, BSH & MAC OSX jarbundler > > M a écrit : >> Now it works. Thank you very much. >> >> I'll try to do the translation as you like. I don't have JDK, but I >> will use online converter following this tip: >> http://sourceforge.net/apps/mediawiki/jump-pilot/index.php?title=How_to_translate_OpenJUMP_into_another_language#Problems_with_.22special.22_characters_.28e.g._translation_of_asian_languages_or_european_accented_characters.29 >> >> >> I wanted to install JDK to help you with this transparent code but >> last time a programmed in Java was about 10 years ago and the project >> was not even half as complicated as yours. So it'd take long to get >> me into project. Unfortunately, I don't have enough time these days. >> I've got to finish my phd thesis before June so I have to put this >> plans off. Because of that don't expect the translation will be done >> soon, either. >> >> Best regards, >> M >> >> On 2013-02-07 21:55, Vincent Belaïche wrote: >>> M a écrit : >>>> On 2013-02-05 21:17, Vincent Belaïche wrote:> Well, you could do some >>>> really ugly trick that would work with the >>>>> current version of jPicEdt in plain LaTeX: >>>>> >>>>> 1) add the following code into your preamble >>>>> >>>>> --8<-----8<-----8<-----8<-----8<-----8<-----8<--- >>>>> \makeatletter >>>>> \newcommand*\setcolorinpic{} >>>>> \newcommand*\setcolorinpic@a{} >>>>> \def\setcolorinpic#1{% >>>>> \color{#1}% >>>>> \edef\@tempa{\the\catcode125 } >>>>> \catcode125=11 % >>>>> \setcolorinpic@a >>>>> } >>>>> \def\setcolorinpic@a#1#2{% >>>>> \catcode125=\@tempa\relax } >>>>> \makeatother >>>>> --8<-----8<-----8<-----8<-----8<-----8<-----8<--- >>>>> >>>>> 2) The put into you picture some text element that contains the >>>>> following text (and only this text) where you replace red by whatever >>>>> color you like >>>>> >>>>> --8<-----8<-----8<-----8<-----8<-----8<-----8<--- >>>>> \expandafter}\expandafter}\setcolorinpic{red} >>>>> --8<-----8<-----8<-----8<-----8<-----8<-----8<--- >>>>> >>>>> The generated code will look like this: >>>>> >>>>> --8<-----8<-----8<-----8<-----8<-----8<-----8<--- >>>>> %%Created by jPicEdt 1.6-pre1: mixed JPIC-XML/LaTeX format >>>>> %%Tue Feb 05 21:06:00 CET 2013 >>>>> %%Begin JPIC-XML >>>>> %<?xml version="1.0" standalone="yes"?> >>>>> %<jpic x-min="45" x-max="45" y-min="20" y-max="50" >>>>> auto-bounding="true"> >>>>> %<text anchor-point="(45,50)" >>>>> % > >>>>> %black text >>>>> %</text> >>>>> %<text anchor-point="(45,35)" >>>>> % > >>>>> %\expandafter}\expandafter}\setcolorinpic{red} >>>>> %</text> >>>>> %<text anchor-point="(45,20)" >>>>> % > >>>>> %red text >>>>> %</text> >>>>> %</jpic> >>>>> %%End JPIC-XML >>>>> %LaTeX-picture environment using emulated lines and arcs >>>>> %You can rescale the whole picture (to 80% for instance) by using the >>>>> command \def\JPicScale{0.8} >>>>> \ifx\JPicScale\undefined\def\JPicScale{1}\fi >>>>> \unitlength \JPicScale mm >>>>> \begin{picture}(45,50)(0,0) >>>>> \put(45,50){\makebox(0,0)[cc]{black text}} >>>>> >>>>> >>>> \put(45,35){\makebox(0,0)[cc]{\expandafter}\expandafter}\setcolorinpic{red}}} >>>> >>>> >>>>> >>>>> >>>>> \put(45,20){\makebox(0,0)[cc]{red text}} >>>>> >>>>> \end{picture} >>>>> --8<-----8<-----8<-----8<-----8<-----8<-----8<--- >>>>> >>>>> With this the text element with "black text" will be in black and the >>>>> text element "red text" will be in red. >>>>> >>>>> Please note that you can put some text before the string >>>>> >>>>> --8<-----8<-----8<-----8<-----8<-----8<-----8<--- >>>>> \expandafter}\expandafter}\setcolorinpic{red} >>>>> --8<-----8<-----8<-----8<-----8<-----8<-----8<--- >>>>> >>>>> But you should not put any text after it ! >>>>> >>>>> So it will be all account where the text element that contains the >>>>> color >>>>> setting will be place : it could have any (x,y) position when it does >>>>> not contain anything else than the color setting, but the Z-order >>>>> will >>>>> matter as anything with greater Z-order will be colored, and anything >>>>> with lower Z-order will not be colored. >>>>> >>>>> Hoping that this can help, >>>>> Vincent. >>>> >>>> >>>> I can't get it working. This is my main file: >>>> >>>> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% >>>> \documentclass{article} >>>> \usepackage{color} >>>> >>>> \begin{document} >>>> >>>> \makeatletter >>>> \newcommand*\setcolorinpic{} >>>> \newcommand*\setcolorinpic@{} >>>> \def\setcolorinpic#1{% >>>> \color{#1}% >>>> \edef\@tempa{\the\catcode125 } >>>> \catcode125=11 % >>>> \setcolorinpic@ >>>> } >>>> \def\setcolorinpic@{% >>>> \catcode125=\@tempa\relax >>>> } >>>> \makeatother >>>> >>>> jPicEdt test >>>> >>>> \input{pic.tex} >>>> >>>> \end{document} >>>> >>>> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% >>>> a here is the pic.tex code: >>>> >>>> %%Created by jPicEdt 1.6-pre1: mixed JPIC-XML/LaTeX format >>>> %%Wed Feb 06 14:15:46 CET 2013 >>>> %%Begin JPIC-XML >>>> %<?xml version="1.0" standalone="yes"?> >>>> %<jpic x-min="37.5" x-max="45" y-min="33.75" y-max="50" >>>> auto-bounding="true"> >>>> %<text anchor-point="(45,50)" >>>> % > >>>> %black text >>>> %</text> >>>> %<text anchor-point="(37.5,34.38)" >>>> % > >>>> %\expandafter}\expandafter}\setcolorinpic{red} >>>> %</text> >>>> %<text anchor-point="(38.12,33.75)" >>>> % > >>>> %\expandafter}\expandafter}\setcolorinpic{red} >>>> %</text> >>>> %</jpic> >>>> %%End JPIC-XML >>>> %LaTeX-picture environment using emulated lines and arcs >>>> %You can rescale the whole picture (to 80% for instance) by using the >>>> command \def\JPicScale{0.8} >>>> \ifx\JPicScale\undefined\def\JPicScale{1}\fi >>>> \unitlength \JPicScale mm >>>> \begin{picture}(45,50)(0,0) >>>> \put(45,50){\makebox(0,0)[cc]{black text}} >>>> >>>> \put(37.5,34.38){\makebox(0,0)[cc]{\expandafter}\expandafter}\setcolorinpic{red}}} >>>> >>>> >>>> >>>> \put(55,50){\makebox(0,0)[cc]{red text}} >>>> >>>> >>>> \end{picture} >>>> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% >>>> >>>> I keep getting the following error: >>>> >>>> Underfull \hbox (badness 10000) detected at line 27 >>>> [][] >>>> ! You can't use `\raise' in vertical mode. >>>> \put (#1,#2)#3->\@killglue \raise >>>> #2\unitlength \hb@xt@ \z@ {\kern #1\unitle... >>>> l.29 \put(55,50){\makebox(0,0)[cc]{red text}} >>>> >>>> ? >>>> >>>> After deleting the line with "setcolorpic" everything works fine. >>>> Any hint? I work on Windows, MikTeX 2.9 >>>> >>>> So far, for the text objects I simply write: >>>> \color{red} $\alpha\dot \beta$ = 7 >>>> in the text field, getting the following code in the file: >>>> %%%%%%%%%%%%%%%%%%%% >>>> \put(28.12,61.88){\makebox(0,0)[cc]{\color{red} $\alpha\dot \beta$ >>>> = 7}} >>>> %%%%%%%%%%%%%%%%%%%% >>>> Maybe it doesn't look pretty in jPicEdt window but it works. >>>> >>>>> >>>>> PS: I am quite surprised that your dvi viewer can display colors set >>>>> with \color, but not colors of a PSTricks or TikZ drawing. Maybe you >>>>> should really investigate whether LEd can have another viewer >>>>> configured. I use EMACS AUCTeX and with it you can configure whatever >>>>> viewer you like. >>>> >>>> As far as I know LEd can't have another viewer. Unfortunately, last >>>> LEd realese was in 2009, and the project is rather dead. >>>> >>>> EMACS -- a bit too sophisticated for me :-). It's easier to ask you >>>> for a new feature than to force myself to learn EMACS ;-) >>>> >>>>> By the way, you still can file the feature request about inserting >>>>> transparently code to the generated LaTeX file. >>>> >>>> Already done. >>>> >>>>> Contributions are welcome, be it bug reports, feature requests, or >>>>> internationalization translations ;-) >>>>> >>>>> Vincent. >>>> >>>> I'll keep that in mind. Maybe I'll try to do polish translation in my >>>> free time. I'll contact you when I will have it done. >>>> >>>> >>> >>> The problem is because you should have `#1#2' after >>> `\def\setcolorinpic@' so the definition of \setcolorinpic@ is the >>> following >>> >>> \def\setcolorinpic@#1#2{% >>> \catcode125=\@tempa\relax >>> } >>> >>> The purpose of `#1#2' is only to gobble the `}}' that ends the block >>> into which you insert `\expandafter}\expandafter}\setcolorinpic{red}'. >>> As a matter of fact, those `}}' are no longer useful as they are >>> replaced by those inside, >>> `\expandafter}\expandafter}\setcolorinpic{red}', one after each >>> \expandafter control sequence. >>> >>> Thank you for your proposal for doing the Polish translation --- is >>> that >>> fine if the Polish translation is written in utf-8, and not in latin-2. >>> Encoding utf-8 would be simpler for me because I can re-use the same >>> coding conversion arguments in the build file as for russian which is >>> also in utf-8 (not koi-8). >>> >>> I attached a file utf8_i18n_pl.properties which is already in UTF-8 and >>> where I translated the 3 first keys to Polish we Google translate, >>> i.e. : >>> >>> about.APictureEditorFor=Wektor edytor grafiki dla LaTeX >>> about.AboutPicEdt=O jPicEdt >>> action.command.DVI.mnemonic=V >>> action.command.DVI.tooltip=Uruchom przeglądarkę DVI >>> >>> If you can read them then the only thing to do is to write the other >>> keys. >>> >>> In order to install the translation to polish at your jPicEdt please >>> follow the following procedure: >>> 1) first you need to convert utf8_i18n_pl.properties file in UTF-8 >>> encoding to utf8_i18n_pl.properties file in LATIN-1 (aka iso-8859-1) >>> with the native2ascii tool. This tool is part of the JDK tool set, if >>> you don't have this installed send the file to me and I can do the >>> conversion. >>> 2) place i18n_pl.properties in the same place as other >>> i18n_xx.properties files in your installation >>> 3) you must restart jPicEdt for it to be effective. >>> >>> I have not found any way to download only native2ascii.exe without all >>> the JDK.exe, anyway it should not be too hard either to write a script >>> or a small console application to do the same job in the UTF-8 -> >>> LATIN1 >>> case, if you think that you really need that to tune the translation, >>> then I can prepare that for you. >>> >>> VBR, >>> Vincent. >>> >>> file://localhost/c%3A/Programme/Java/doc/Java%20SE%206%20Documentation.mht >>> >>> Vincent. >> >> > |