Skip to Content.
Sympa Menu

baslinux - Re: [BL] text processors

baslinux AT lists.ibiblio.org

Subject: Baslinux mailing list

List archive

Chronological Thread  
  • From: baslinux AT lists.ibiblio.org
  • To: baslinux AT lists.ibiblio.org
  • Subject: Re: [BL] text processors
  • Date: Sat, 16 Jun 2007 18:07:10 +0300

On Fri, Jun 15, 2007 at 04:21:33AM +0000, keesan AT sdf.lonestar.org wrote:
> There is a tetex howto. In theory you can convert plain text to dvi with
> tex, and defaults are 10 cpi, Roman, L and R justified. Emacs has a TeX
> mode. Tex and latex both produce .tex. Latex appears to be tex with
> added features such as underlines.

LaTeX has a different syntax, and is different from TeX in the way that
its syntax is higher level - you supply LaTeX with the logical structure
of the document.

> Nano does search and replace but it is interactive, meaning you have to
> tell it every time to replace.

Vi's s&r doesn't require interactivity (if you request it for
confirmations for every replace, it can be interactive), and it can map
S&Rs to keys.

> Can sed search and replace \c and \vo with \centerline and \voffset?

Yes (I will use \center, since that's the notation for LaTeX):

---
sed -e 's/\\c/\\center/' file
---

But in vi (use a more capable version, like elvis from SW) it's a simple
matter of an abbreviation:

---
:ab \c \center
---

which, when you enter \c, automatically replaces it with \center. You
can abbreviate it wi

> Could one write a script with sed to do several such replacements in one
> sweep?

Yes.

> Or program Ctrl-F1 etc. to produce these strings?

To call a script via Control-F1, giving current file as a first
parameter:

---
:cmap <C-F1> :!script %
---

> I would probably type the document first and then add the formatting. tex
> is supposed to adjust line lengths to fit the text length (not including
> formatting commands) when converting to dvi, which you can view with xdvi.

Or dvisvga (tmview), if you intend to use it in your usual svgalib-based
work environment.

-snip-

> To use the new menu item I need to restart the desktop. ????

Probably, it referred to *.desktop files, which are used by KDE, GNOME
and XFCE for menu entries... Usually, when a (packaged) program is installed,
a
corresponding .desktop file is copied to /usr/share/applications. And
it's true that sometimes the desktop environment MAY require a restart.

Although this is irrelevant for BL.

Karolis




Archive powered by MHonArc 2.6.24.

Top of Page