Two columns in leafpad or geany ??
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. ... 69#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/viewto ... 02#1026802
RTFeditor solution: http://www.murga-linux.com/puppy/viewto ... 31#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/viewto ... 62#1026862
.
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. ... 69#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/viewto ... 02#1026802
RTFeditor solution: http://www.murga-linux.com/puppy/viewto ... 31#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/viewto ... 62#1026862
.
Last edited by greengeek on Sat 04 May 2019, 17:17, edited 4 times in total.
Not that I went too deep, Mate, but, something similar to this, correct?
- Attachments
-
- tools-menu-mate.jpg
- (54.41 KiB) Downloaded 413 times
>>> Living with the immediacy of death helps you sort out your priorities. It helps you live a life less trivial <<<
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 straightwhere 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:
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.
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: Select all
split -n 2 FullText.txt
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: Select all
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.
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
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)
Thanks Semme,Semme wrote:Not that I went too deep, Mate, but, something similar to this, correct?
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:
- Attachments
-
- leafpad_columned.jpg
- (27.89 KiB) Downloaded 355 times
Last edited by greengeek on Mon 29 Apr 2019, 16:02, edited 2 times in total.
Thanks musher, this sounds promising. I will try to get my head around this.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.
cheers!
-
- Posts: 807
- Joined: Mon 12 Oct 2009, 17:11
@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
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
- Attachments
-
- original_text.jpg
- original text with more than 450 lines
- (95.12 KiB) Downloaded 302 times
-
- text in 2 panels with RHSW having bottom.jpg
- text in 2 panels with right panel opening with the ending portion
- (67.32 KiB) Downloaded 301 times
-
- text after scrolling right panel.jpg
- text after scrolling right panel
- (78.51 KiB) Downloaded 301 times
[color=blue]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[/color]
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[/color]
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:
I fill in the text in the textareas and then take a screenshot for printing.
Code: Select all
<!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>
Hi, greengeek.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.
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
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)
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".musher0 wrote:If it's the same text you wish to have in two or three columns, you can use a straightwhere N (2 or 3 or 4 ) is the number of columns you wish to have. .Code: Select all
split -n 2 FullText.txt
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.
Interesting option. Added to the list of possibilities. cheers6502coder 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:
I fill in the text in the textareas and then take a screenshot for printing.Code: Select all
<!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>
- Attachments
-
- 6502.jpg
- (132.22 KiB) Downloaded 242 times
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.
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.
- Attachments
-
- column-2.33.pet
- Also contains colrm ("COLumn ReMove").
- (162.11 KiB) Downloaded 116 times
Last edited by musher0 on Mon 01 Apr 2019, 04:59, edited 1 time in total.
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)
Hi, g/g.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.
In leafpad, Ctrl-P -> layout tab -> bottom right.
IHTH.
- Attachments
-
- leafpad-print-tab.jpg
- (158.25 KiB) Downloaded 226 times
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)
Hi, g/g.
Same grey-out here...
~~~~~~~~~
But here is something, concerning the 2-columns layout
But it's "something" to work with. A good chunk of the job is done.
(Source texts and formula are attached.)
IHTH.
BFN.
Same grey-out here...
~~~~~~~~~
But here is something, concerning the 2-columns layout
It's not entirely satisfactory, human editing will be required.split -l 50 NZ-history.txt # Section from wikipedia article
# Fifty lines, or length of article in lines divided by 2.
fmt -w 50 -u -g 50 xaa > xaa-proportional
# For this command, the "50" means "50 characters per line".
fmt -w 50 -u -g 50 xab > xab-proportional
tabs -8;paste xaa-proportional xab-proportional > result
# You can pipe the result to less.
But it's "something" to work with. A good chunk of the job is done.
(Source texts and formula are attached.)
IHTH.
BFN.
- Attachments
-
- 2-columns-test.zip
- (15.01 KiB) Downloaded 83 times
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)
Hi greengeek, another option may be to use markdown and convert to html
For example this markdown code (written in leafpad):
Here you can paste it, preview and export to (styled or not) html:
https://dillinger.io/
(see pic)
Or some other way to convert markdown to html (I think there are programs for that)
Fred
For example this markdown code (written in leafpad):
Code: Select all
| Applications | Others |
| :----------------| :--------------- |
|alsamixer-tray|apulse
|azpainter|broadcom-wl-driver-k4.9.0-3-686-pae
|ceni|conky-cli
|conkyclock|conky
|conkyclock2|libpng12-0
|cputemp|libx264-132
|create-portable|emelfm2
|epdfview|gtkdesklet
|deadbeef-static|gtkdialog
|firefox-esr|guessfstype
|dropboxgui|libmusicbrainz3-6
https://dillinger.io/
(see pic)
Or some other way to convert markdown to html (I think there are programs for that)
Fred
- Attachments
-
- markdown-2-columns.png
- (66 KiB) Downloaded 218 times
Who is it, again, who wanted a TO-DO list on 2 columns?
Voici, mon ami !
Don't worry about the locale for the date. It shows in French in the
picture because it doesn't know any better!
The < date '+%c' > in the script means: "show full date in user's
language." So the date will show in maori style, even, should maori be
set as the default language for that Puppy.
I don't know how you use your TO-DO list for the day, and it's not my
place to recommend anything about it. But If you wish, you can link this
little script as the last item in /root/Startup, and your TO-DO list will be
ready for you to fill out every morning when you boot up your Puppy.
TWYL.
Voici, mon ami !
Code: Select all
#!/bin/ash
# /root/my-applications/bin/to-do-greengeek.sh
####
l="-----------"
line () { echo "$l,$l" >> to-do.csv; }
date '+%c' > to-do.csv
echo ".
WORK,PERSONAL" >> to-do.csv
line
for i in 1 2 3 4 5;do
echo "$i),$i)" >> to-do.csv
done
line
gnumeric to-do.csv 2>/dev/null
# Suggestion : save the gnumeric sheet under the day's date.
picture because it doesn't know any better!
The < date '+%c' > in the script means: "show full date in user's
language." So the date will show in maori style, even, should maori be
set as the default language for that Puppy.
I don't know how you use your TO-DO list for the day, and it's not my
place to recommend anything about it. But If you wish, you can link this
little script as the last item in /root/Startup, and your TO-DO list will be
ready for you to fill out every morning when you boot up your Puppy.
TWYL.
- Attachments
-
- GreenGeek-TODO.jpg
- (167.04 KiB) Downloaded 179 times
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)
You're spoiling me musher0!musher0 wrote:I don't know how you use your TO-DO list for the day, and it's not my place to recommend anything about it. But If you wish, you can link this little script as the last item in /root/Startup, and your TO-DO list will be ready for you to fill out every morning when you boot up your Puppy..
I like the idea of the list popping up as soon as i boot my PC - that's a nice touch.
I didnt initially want to use anything other than leafpad, but the reality seems to be i need to broaden my horizons. Gnumeric may have potential if I can get past the problem with cells hiding the data in adjacent cells.
Is there an adjustable "word wrap" or "character wrap" for spreadsheet cells?
- Attachments
-
- musherTODOgnumeric.jpg
- (7.01 KiB) Downloaded 164 times
Thanks Fred. I tried your suggestion but there seems to be a "tight" linkage between the left and right columns. If i edit the left column it displaces the right column.fredx181 wrote:another option may be to use markdown and convert to html
For example this markdown code (written in leafpad):
...
Here you can paste it, preview and export to (styled or not) html:
https://dillinger.io/
I need to be able to edit them both separately (eg end up with 50 items in work column and maybe only 5 in personal - something like that).
It doesn't seem that leafpad will be able to do this unless i operate on two input files and at the end use a method to combine the two separate files into one leafpad file for printing.
Markup (or markdown? - are they the same thing?) may be a way to set a template.
(EDIT : ok, i see that the dillinger site has a great tutorial about what markup and markdown are. This could be useful for me to know)
- Attachments
-
- DillingerMarkDown.jpg
- (46.48 KiB) Downloaded 160 times