Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sat 20 Jul 2019, 23:09
All times are UTC - 4
 Forum index » House Training » Users ( For the regulars )
Two columns in leafpad or geany ??
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 6 [84 Posts]   Goto page: 1, 2, 3, 4, 5, 6 Next
Author Message
greengeek


Joined: 20 Jul 2010
Posts: 5584
Location: Republic of Novo Zelande

PostPosted: Wed 27 Mar 2019, 03:19    Post subject:  Two columns in leafpad or geany ??  

I like to use leafpad for typing up documents as it is quick and clean and I can dump text from a web page or other source without worrying about strange artefacts from formatting characters. I just end up with straight text, without images or scripts that may have been on the webpage.

I can add formatting later if necessary by using a word processor.

But one feature eludes me: I would like to turn the page into landscape mode and divide the page into two columns.

EXAMPLE:

i use leafpad for my daily ToDo list and would like to have my work-related items in the left column (pane) and my personal related items in the right column (pane).

Does anyone have any idea if such a thing is possible in leafpad or geany? Or possibly in some other very basic notepad style utility?

cheers!

PS: it would be great if the "dual pane" formatted document could then be read by other text editors without special plugins - by which i mean that the seperation into columns is done by spaces or tabs and transparent to other editors - not requiring understanding of special markup formatting. Is such a thing possible??

EDIT:
Possible solutions or alternatives:
Xournal see http://murga-linux.com/puppy/viewtopic.php?p=1025669#1025669

greengeek gui (based on fredx and 6502coder work) to form two-column html output from two separate input files:
http://www.murga-linux.com/puppy/viewtopic.php?p=1026802#1026802

RTFeditor solution: http://www.murga-linux.com/puppy/viewtopic.php?p=1026731#1026731
(Be wary of rtf incompatibilities between different word processing programs)

Abiword used in it's native .abw format instead of rtf may be a good solution which avoids incompatibilities with other WPs. Abiword has good control of formatting and printing. http://www.murga-linux.com/puppy/viewtopic.php?p=1026862#1026862
.

Last edited by greengeek on Sat 04 May 2019, 13:17; edited 4 times in total
Back to top
View user's profile Send private message 
Semme


Joined: 07 Aug 2011
Posts: 8011
Location: World_Hub

PostPosted: Wed 27 Mar 2019, 05:05    Post subject:  

Not that I went too deep, Mate, but, something similar to this, correct?
tools-menu-mate.jpg
 Description   
 Filesize   54.41 KB
 Viewed   360 Time(s)

tools-menu-mate.jpg


_________________
>>> Living with the immediacy of death helps you sort out your priorities. It helps you live a life less trivial <<<
Back to top
View user's profile Send private message 
musher0

Joined: 04 Jan 2009
Posts: 14232
Location: Gatineau (Qc), Canada

PostPosted: Wed 27 Mar 2019, 09:44    Post subject:  

Hi g/g.

Forget geany for putting columns of text side by side. The < paste > or < join > GNU
utilities were designed for it. < join > operates on the line number in an outside field,
like a database, whereas < paste > operates with the texts directly.

If it's the same text you wish to have in two or three columns, you can use a straight
Code:
split -n 2 FullText.txt
where N (2 or 3 or 4 ) is the number of columns you wish
to have. But you will have to fiddle with the top and bottom text lines in the parts,
because this parameter of < split > chops the text at the equal number of bytes.

Using the < -l > parm of split is more intelligent, since it splits the text on the nearest
number (in case of odd number) representing half the lines in your text:
Code:
A="`wc -l < FullText.txt | awk '{ print int($1/2) }'`" # awk does the calculating.
split -l $A FullText.txt
# Optionally, use < fmt > here. (Pls see below.)
paste -d " " Part1 Part2 > FullText-2columns.txt
# -d " | " also produces a nice effect as the column separator, I find.

As an option, you may wish to pass the "Parts" split gave you through the < fmt >
utility before you < paste > them, to make sure the lines themselves are pretty: no
"zig-zags", no "chimneys", and similar. So it's easier on the reader's eyes.
(< fmt > operates on the length of lines.)

Now you know all that I know on this subject.

IHTH.

_________________
musher0
~~~~~~~~~~
Je suis né pour aimer et non pas pour haïr. (Sophocle) /
I was born to love and not to hate. (Sophocles)
Back to top
View user's profile Send private message 
greengeek


Joined: 20 Jul 2010
Posts: 5584
Location: Republic of Novo Zelande

PostPosted: Wed 27 Mar 2019, 12:47    Post subject:  

Semme wrote:
Not that I went too deep, Mate, but, something similar to this, correct?
Thanks Semme,
From the picture that looks like two seperate documents i think? I am trying to have just one document but split into two colunms so that I can type (with word wrap) in the left column - leaving the right column for later use.

Maybe there is some way i could use the geany split window plugin to edit two documents seperately, then combine them into my A4Landscape ToDo list as a seperate final step.

The aim is to end up with ONE document, with two columns, all printed in basic text with very little formatting. It needs to be printable by leafpad or geany (not a word processor).

Maybe the real answer is to have a utility that scans both originating documents (from the geany split view) and assembles snippets of each document line by line - using spaces, tabs or Pipe characters on each line to seperate each half.

Here is the sort of output i would like:
leafpad_columned.jpg
 Description   
 Filesize   27.89 KB
 Viewed   311 Time(s)

leafpad_columned.jpg


Last edited by greengeek on Mon 29 Apr 2019, 12:02; edited 2 times in total
Back to top
View user's profile Send private message 
greengeek


Joined: 20 Jul 2010
Posts: 5584
Location: Republic of Novo Zelande

PostPosted: Wed 27 Mar 2019, 12:50    Post subject:  

musher0 wrote:
Forget geany for putting columns of text side by side. The < paste > or < join > GNU
utilities were designed for it. < join > operates on the line number in an outside field,
like a database, whereas < paste > operates with the texts directly.
Thanks musher, this sounds promising. I will try to get my head around this.
cheers!
Back to top
View user's profile Send private message 
greengeek


Joined: 20 Jul 2010
Posts: 5584
Location: Republic of Novo Zelande

PostPosted: Wed 27 Mar 2019, 13:56    Post subject:  

You know, I'm actually wondering if fields.awk might be one way to go about this. The final document could be prepared by formatting database output into two columns.
Hmmm, I will try to get back to my fields.awk testing.
Back to top
View user's profile Send private message 
B.K. Johnson

Joined: 12 Oct 2009
Posts: 740

PostPosted: Wed 27 Mar 2019, 15:13    Post subject:  

@greengeek
Try Geany as Semme suggested. You'll find it is what you want.
Here are 3 screenshots
original text > 450 lines
Text in 2 panels after Tools > Split Window >Side by side
Text in 2 panels after scrolling only right panel
To revert: Tools >Split window > unsplit
original_text.jpg
 Description   original text with more than 450 lines
 Filesize   95.12 KB
 Viewed   253 Time(s)

original_text.jpg

text after scrolling right panel.jpg
 Description   text after scrolling right panel
 Filesize   78.51 KB
 Viewed   255 Time(s)

text after scrolling right panel.jpg

text in 2 panels with RHSW having bottom.jpg
 Description   text in 2 panels with right panel opening with the ending portion
 Filesize   67.32 KB
 Viewed   258 Time(s)

text in 2 panels with RHSW having bottom.jpg


_________________
B.K. Johnson
tahrpup-6.0.5 PAE (upgraded from 6.0 =>6.0.2=>6.0.3=>6.0.5 via quickpet/PPM=Not installed); slacko-5.7 occasionally. Frugal install, pupsave file, multi OS flashdrive, FAT32 , SYSLINUX boot, CPU-Dual E2140, 4GB RAM

Back to top
View user's profile Send private message 
6502coder


Joined: 23 Mar 2009
Posts: 633
Location: Western United States

PostPosted: Wed 27 Mar 2019, 15:48    Post subject:  

This isn't really a solution, as it doesn't result in a text document, but when I've had need to create a two-column document of this type I've resorted to HTML, using a one-row table with two cells, each containing a TEXTAREA, like this:

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>
</head>

<body>
   
<table>
<tr>
    <th>Work</th>
    <th>Personal</th>
</tr>
<tr>
    <td><textarea cols=30 rows=40></textarea></td>
    <td><textarea cols=30 rows=40></textarea></td>
</tr>
</table>

</body>

</html>


I fill in the text in the textareas and then take a screenshot for printing.
Back to top
View user's profile Send private message 
musher0

Joined: 04 Jan 2009
Posts: 14232
Location: Gatineau (Qc), Canada

PostPosted: Thu 28 Mar 2019, 10:50    Post subject:  

greengeek wrote:
You know, I'm actually wondering if fields.awk might
be one way to go about this. The final document could be prepared by
formatting database output into two columns.
Hmmm, I will try to get back to my fields.awk testing.

Hi, greengeek.

As well, it would be a cinch to get what you want in gnumeric, I think, with
a simple template. E.g., you load your "to-do" template, you fill it in, and
once done, you save it under today's date.

Tomorrow you do the same, and the next day, and so on.

Just a thought. BFN.

_________________
musher0
~~~~~~~~~~
Je suis né pour aimer et non pas pour haïr. (Sophocle) /
I was born to love and not to hate. (Sophocles)
Back to top
View user's profile Send private message 
greengeek


Joined: 20 Jul 2010
Posts: 5584
Location: Republic of Novo Zelande

PostPosted: Sun 31 Mar 2019, 15:26    Post subject:  

musher0 wrote:
If it's the same text you wish to have in two or three columns, you can use a straight
Code:
split -n 2 FullText.txt
where N (2 or 3 or 4 ) is the number of columns you wish to have. .
Hi musher0, when i try "split" it takes the text of my original file, then splits it into two parts as seperate files "xaa" and "xab".

This in itself may be handy for me to use in my final solution, but is this how it is working on your system? It definitely does not format the document into two columns.

I'm on a Slacko 5.6 derivative here so maybe my version of "split" is different.
Back to top
View user's profile Send private message 
greengeek


Joined: 20 Jul 2010
Posts: 5584
Location: Republic of Novo Zelande

PostPosted: Sun 31 Mar 2019, 15:31    Post subject:  

6502coder wrote:
This isn't really a solution, as it doesn't result in a text document, but when I've had need to create a two-column document of this type I've resorted to HTML, using a one-row table with two cells, each containing a TEXTAREA, like this:

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>
</head>

<body>
   
<table>
<tr>
    <th>Work</th>
    <th>Personal</th>
</tr>
<tr>
    <td><textarea cols=30 rows=40></textarea></td>
    <td><textarea cols=30 rows=40></textarea></td>
</tr>
</table>

</body>

</html>


I fill in the text in the textareas and then take a screenshot for printing.


Interesting option. Added to the list of possibilities. cheers
6502.jpg
 Description   
 Filesize   132.22 KB
 Viewed   201 Time(s)

6502.jpg

Back to top
View user's profile Send private message 
musher0

Joined: 04 Jan 2009
Posts: 14232
Location: Gatineau (Qc), Canada

PostPosted: Mon 01 Apr 2019, 00:11    Post subject:  

Hi greengeek.

I suppose it depends on the nature of the text AND on what your needs are.

I just today discovered another GNU utility that does columns and which
is called... < column >! It's good to present data in tables, such as score
cards in sports. Don't ask me how it works, I haven't figured it out yet!
You'll easily find some tutorials on the web, though;
e.g. https://www.howtoforge.com/linux-column-command.

It's in the util-linux package. Puppy does not have it. Please find attached
a copy that I compiled a while back..

If you are a history teacher in a high school and you want to present info
on New-Zealand, you may wish to layout the wikipedia article using the
2-column functions in OpenOffice or Libre Office.

As you mentioned earlier, to create a template for a simple to-do,
fields.awk may be just the tool.

With longer texts, an additional parameter to consider is the # of lines
per page.

To each his/her own.

BFN.
column-2.33.pet
Description  Also contains colrm ("COLumn ReMove").
pet

 Download 
Filename  column-2.33.pet 
Filesize  162.11 KB 
Downloaded  51 Time(s) 

_________________
musher0
~~~~~~~~~~
Je suis né pour aimer et non pas pour haïr. (Sophocle) /
I was born to love and not to hate. (Sophocles)

Last edited by musher0 on Mon 01 Apr 2019, 00:59; edited 1 time in total
Back to top
View user's profile Send private message 
greengeek


Joined: 20 Jul 2010
Posts: 5584
Location: Republic of Novo Zelande

PostPosted: Mon 01 Apr 2019, 00:51    Post subject:  

Does anyne have any idea how to get leafpad to print a file in landscape mode? I can't find the option within leafpad itself. Maybe it is harcoded somehow. It would be nice to get leafpad to wrap at different values.

Maybe it is part of gtk spec or something.
Back to top
View user's profile Send private message 
musher0

Joined: 04 Jan 2009
Posts: 14232
Location: Gatineau (Qc), Canada

PostPosted: Mon 01 Apr 2019, 01:09    Post subject:  

greengeek wrote:
Does anyne have any idea how to get leafpad to print a file in landscape mode? I can't find the option within leafpad itself. Maybe it is harcoded somehow. It would be nice to get leafpad to wrap at different values.

Maybe it is part of gtk spec or something.

Hi, g/g.

In leafpad, Ctrl-P -> layout tab -> bottom right.

IHTH.
leafpad-print-tab.jpg
 Description   
 Filesize   158.25 KB
 Viewed   175 Time(s)

leafpad-print-tab.jpg


_________________
musher0
~~~~~~~~~~
Je suis né pour aimer et non pas pour haïr. (Sophocle) /
I was born to love and not to hate. (Sophocles)
Back to top
View user's profile Send private message 
greengeek


Joined: 20 Jul 2010
Posts: 5584
Location: Republic of Novo Zelande

PostPosted: Mon 01 Apr 2019, 01:18    Post subject:  

Thanks musher - does it allow you to change the orientation? Mine is greyed out and there seems no way to change it. Seems like an enforced default somehow.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 6 [84 Posts]   Goto page: 1, 2, 3, 4, 5, 6 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » Users ( For the regulars )
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1492s ][ Queries: 13 (0.0225s) ][ GZIP on ]