[Templates] a little text formatting

[prev] [thread] [next] [Date index for 2005/03/15]

From: Cahill, Earl
Subject: [Templates] a little text formatting
Date: 21:09 on 15 Mar 2005
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C529A3.542BE24C
Content-Type: text/plain

A start with a line, say

This line is really too long.

 

A length, say 25, and suffix, say '...'.  I would like to be able to do
something like this

 

[% my_truncate(line, 25, '...') %]

 

And end up with 

 

This line is really t...

 

Just wondering if there is something out there that already does this.  I
saw the Wrap and Autoformat stuff and didn't look too close, but it didn't
look promising.  I am happy to contribute a plugin, but don't want to
duplicate the work.  And yes, I know it is a dumb thing, that I will write
in like five minutes.

 

Thanks,

Earl


------_=_NextPart_001_01C529A3.542BE24C
Content-Type: text/html
Content-Transfer-Encoding: quoted-printable

<html xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns=3D"http://www.w3.org/TR/REC-html40">;

<head>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">


<meta name=3DGenerator content=3D"Microsoft Word 11 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
	{font-family:"MS Mincho";
	panose-1:2 2 6 9 4 2 5 8 3 4;}
@font-face
	{font-family:"\@MS Mincho";
	panose-1:0 0 0 0 0 0 0 0 0 0;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0in;
	margin-bottom:.0001pt;
	font-size:12.0pt;
	font-family:"Times New Roman";}
a:link, span.MsoHyperlink
	{color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{color:purple;
	text-decoration:underline;}
span.EmailStyle17
	{mso-style-type:personal-compose;
	font-family:Arial;
	color:windowtext;}
@page Section1
	{size:8.5in 11.0in;
	margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
	{page:Section1;}
-->
</style>

</head>

<body lang=3DEN-US link=3Dblue vlink=3Dpurple>

<div class=3DSection1>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>A start with a line, say<br>
<br>
This line is really too long.<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>A length, say 25, and suffix, say '...'.&nbsp;
I would like to be able to do something like =
this<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>[% my_truncate(line, 25, '...') =
%]<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>And end up with <o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>This line is really =
t...<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>Just wondering if there is something out there that =
already
does this.&nbsp; I saw the Wrap and Autoformat stuff and didn't look =
too
close, but it didn't look promising. &nbsp;I am happy to contribute a
plugin, but don't want to duplicate the work. &nbsp;And yes, I know it =
is
a dumb thing, that I will write in like five =
minutes.<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>Thanks,<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;
font-family:Arial'>Earl<o:p></o:p></span></font></p>

</div>

</body>

</html>

------_=_NextPart_001_01C529A3.542BE24C--

_______________________________________________
templates mailing list
templates@xxxxxxxxxxxxxxxx.xxx
http://lists.template-toolkit.org/mailman/listinfo/templates

[Templates] a little text formatting
Cahill, Earl 21:09 on 15 Mar 2005

Re: [Templates] a little text formatting
Darren Chamberlain 21:16 on 15 Mar 2005

Re: [Templates] a little text formatting
Larry Leszczynski 21:17 on 15 Mar 2005

RE: [Templates] a little text formatting
Cahill, Earl 21:24 on 15 Mar 2005

Re: [Templates] a little text formatting
Darren Chamberlain 21:23 on 15 Mar 2005

Re: [Templates] a little text formatting
Brett Sanger 21:29 on 15 Mar 2005

Re: [Templates] a little text formatting
Darren Chamberlain 21:28 on 15 Mar 2005

RE: [Templates] a little text formatting
Cahill, Earl 21:42 on 15 Mar 2005

RE: [Templates] a little text formatting
Jason Gottshall 22:38 on 15 Mar 2005

Generated at 16:59 on 18 Mar 2005 by mariachi v0.52