Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project!

## Home

help (3)

This is ReText wiki.

Some useful pages:

## FAQ

#### For which platforms is ReText available?

ReText is officially supported on Linux.

For Mac OS X, there is a Homebrew repository at https://github.com/samueljohn/homebrew-python

brew tap homebrew/python
brew install retext


Theoretically it can be run on any other platform. If you want to port ReText to your platform, please file a bug and describe required changes.

#### Why is ReText better than my favourite text editor (Gedit, KWrite)?

It supports text formatting and can save to different file formats (PDF, HTML).

#### Why is ReText better than my favourite word processor (LibreOffice Writer, KWord, AbiWord)?

Most word processors are very complicated and leave a lot of mess in their output files. ReText gives you the power to control all output formatting. Markdown and reST are WYSIWYM markup languages, so if you save a document as plain text, anyone will be able to see how it has been formatted. ReText also has support for tabs.

#### What are Markdown and reStructuredText?

Markdown is a text markup language which allows you to create documents of all types (this page is written using Markdown). Some links: website, sourceforge.net guide, basics, syntax, and online renderer.

You may also want to have a look at odt2txt or odt2pandoc scripts that convert ODT files to Markdown files.

reStructuredText is another popular markup language. Some links: website, quick reference, example document, cheat sheet, and online renderer.

#### Can I use math formulas?

Yes, see MathJax page for details.

#### Can I use page breaks?

Yes, you can do this in Markdown mode by using "page-break-before: always" style. Example:

Some text here.

Another page starts here.
{: style="page-break-before: always" }


You should enable attr_list Markdown extension before using this (see Configuration file for details).

#### Why doesn't ReText display title of my reStructuredText document?

When you put a header in the beginning of the file, it's considered as document title, so it won't be displayed. But if you export your document to PDF/HTML, this will be displayed as a title.

According to the specification:

A lone top-level section title can be treated as the document title. Similarly, a lone second-level section title immediately after the "document title" can become the document subtitle. The rest of the sections are then lifted up a level or two. See the DocTitle transform for details.

To work around this issue, put this to your docutils configuration file (i.e. ~/.docutils):

[standalone reader]
doctitle_xform = false


#### I want to translate ReText into my language.

Anyone is welcome to translate ReText!
There are two ways to do this. The first way is via Transifex web interface.

Alternatively, you can translate the .ts files manually using Qt Linguist. Here are the instructions:

• Install Qt4 and PyQt4 dev tools (On Ubuntu you need packages qt4-dev-tools, pyqt4-dev-tools, libqt4-dev)
• Get the code (from Git) and go to its directory
• Run pylupdate4 retext.py -ts retext_%LANG%.ts (replace %LANG% with code of your language, i.e. retext_fr.ts or retext_pt_BR.ts)
• Open the generated .ts file with Qt Linguist and make the translation (you can read the one minute guide first)
• Create a ticket and attach the .ts file there so that we can include it to ReText source code tree
• Until then, you can compile the translation into a .qm file via Qt Linguist and use it.

<< < 1 2 3 4 5 > >> (Page 4 of 5)

• Anonymous
2014-09-18

Months later ... it works!! Thanks.

• Anonymous
2014-03-28

I tried to install the last version 4.1.2 but if I run sudo python setup.py install I get this error:

running install_lib
byte-compiling /usr/local/lib/python2.7/dist-packages/ReText/webpages.py to webpages.pyc
File "/usr/local/lib/python2.7/dist-packages/ReText/webpages.py", line 31
print('Exception occured: %s' % e, file=sys.stderr)
^
SyntaxError: invalid syntax

running install_scripts
copying build/scripts-2.7/retext.py -> /usr/local/bin
copying build/scripts-2.7/wpgen.py -> /usr/local/bin
changing mode of /usr/local/bin/retext.py to 755
changing mode of /usr/local/bin/wpgen.py to 755
renaming /usr/local/bin/retext.py to /usr/local/bin/retext
renaming /usr/local/bin/wpgen.py to /usr/local/bin/wpgen
running install_data
running install_egg_info
Removing /usr/local/lib/python2.7/dist-packages/ReText-4.1.2.egg-info
Writing /usr/local/lib/python2.7/dist-packages/ReText-4.1.2.egg-info


I looked in webpages.py but don't know what to change. (should it be == ?)

Tim

• That's because you have Python 2.7, and ReText needs at least Python 3.1.

• Anonymous
2014-03-29

ReText 4.1.2 workes for me now as external toll within JetBrains http://www.jetbrains.com/
apps (PyCharm) ReText 4.1.1 somehow did hang

thanks a lot

• GlennSmth
2014-04-03

Hi, I'm new te ReText. I've looked in the wiki but couldn't find the answer to my question. I want to use spellcheck in french. I added "fr", "fr-fr" and "FR" but always get the error "Dictionary for language 'xx' could not be found". Where is ReText looking for the dictionary? How do I get additional dictionaries? Thx.

• ReText is using Enchant, which supports different backends.

If you install French dictionary for aspell/myspell/voikko/etc, that should work.

• GlennSmth
2014-04-08

OK, found how to install the dictionary (it's aspell on my system) - but now I have the badly spelled words underlined correctly, but no action if I right-click. A problem to communicate with aspell ? Is there a logfile somewhere that I can look at ?

• Does this Python code work for you?

import enchant
d = enchant.Dict()
d.suggest(SOME WORD)


It looks like aspell backend should support suggestions, so I don't know what may be wrong here.

• GlennSmth
2014-04-15

Hi, yes that works OK. But the suggestions are coded rather strangely, here's an example:

Python 2.7.3 (default, Feb 27 2014, 19:58:35)
[GCC 4.6.3] on linux2
>>> import enchant
>>> d = enchant.Dict("fr")
>>> d.suggest("pere")
['p\xc3\xa8re', 'p\xc3\xa8res', 'perce', 'perc\xc3\xa9',    'perde','perle'\xa9', 'p\xc3\xa9ri', 'p\xc3\xaane']


I have also noticed that I have to re-specify the language each time I start ReText : it doesn't memorize it.

Last edit: Dmitry Shachnev 2014-04-15
• Please try with Python 3, not Python 2. There should be a different result there (at least without \xAB stuff).

Also, when you run ReText and right-click on the highlighted word, are any errors printed on the console?

• I have also noticed that I have to re-specify the language each time I start ReText: it doesn't memorize it.

Which version of ReText are you using? With 4.1, you should have a "Set as default" checkbox in the dialog.

• GlennSmth
2014-04-15

OK, you're right (I didn't think about p3 vs p2). The suggestions are in correct UTF8. No, nothing is reported back to the console when I right-click.

• I have installed aspell-fr package, and I do get the suggestions list when I right-click on the wrongly spelled word.

Can you please open your ReText/editor.py file, find the “for action in actions[::-1]:” line there (line 101 for me), and insert “print(actions)” line before it (without quotes). Then start ReText and tell me if something is printed.

• Anonymous
2014-04-25

I always get: Unknown interpreted text role "ref".

any workaround available.

ReText 4.1.2
ubuntu 13:10
python 3.4

• There is no role ref in pure reStructuredText. It is a Sphinx-specific role as far as I know.

• Anonymous
2014-05-17

Thanks for a great program. I've noticed some interesting behavior when printing from within ReText.

If I have "Use Webkit renderer" checked then I get the following:

1. Lines at the bottom of the page are often split in two with the top half of the line on one page and the bottom half on the next page.
2. No page numbers at the bottom right corner of the page,
3. Images don't print.
4. But, blockquotes are properly indented.

If I do not check "Use Webkit renderer" then see the following:

1. I don't get the split lines
2. I do get the page numbers
3. I do get my images.
4. But, my blockquotes are only slightly indented.

Is there a way to get the best of both settings -- properly indented blockquotes and lines that don't get split at the end of the page? I know I can export to HTML and then print from my browser, but I'd like to do everything from within ReText itself if possible.

Also, is there a way to permanently set the page margins when printing from within ReText? Either with or without Webkit checked the margins are too narrow for my taste. I'm currently using ReText 4.1.2 with Ubuntu 12.04.

• Unfortunately I can't do anything about this since printing is totally managed by Qt and ReText has no control over it.

Images don't print.

This is strange. Does making paths absolute help?

But, my blockquotes are only slightly indented.

Also, is there a way to permanently set the page margins when printing from within ReText?

Not permanently, but you can set margins in the printer properties dialog (use the button near the printer selection box).

• Anonymous
2014-05-20

Thanks for the help. It's still a great program.

• Anonymous
2014-05-18

For whatever reason, my ReText on Ubuntu no longer displays boldface or headings in bold type. Italics appears as italics, but I've lost boldface. Not sure why this has happened.

• I think there was a bug on Ubuntu 12.04, it was fixed in later Ubuntu versions.

Try setting/changing the default font (using the "Change default font" menu option), the DejaVu Sans is known to work fine, but most other options should also work.

• Anonymous
2014-05-20

Thank you. Changing the editorFont setting to "DejaVu Sans" fixed it.

• Anonymous
2014-06-03

==> Downloading https://downloads.sourceforge.net/project/retext/ReText-4.0/ReText-4.0.0.tar.gz Already downloaded: /Library/Caches/Homebrew/retext-4.0.0.tar.gz ==> python setup.py install --prefix=/usr/local/Cellar/retext/4.0.0 Warning: Formula#python is deprecated and will go away shortly. Error: undefined method xy' for #<PythonDependency: "python" []> Please report this bug: https://github.com/Homebrew/homebrew/wiki/troubleshooting /usr/local/Library/Taps/samueljohn/homebrew-python/retext.rb:26:in install' /usr/local/Library/Homebrew/build.rb:172:in install' /usr/local/Library/Homebrew/formula.rb:267:in brew' /usr/local/Library/Homebrew/formula.rb:588:in stage' /usr/local/Library/Homebrew/resource.rb:62:in unpack' /usr/local/Library/Homebrew/extend/fileutils.rb:21:in mktemp' /usr/local/Library/Homebrew/resource.rb:59:in unpack' /usr/local/Library/Homebrew/resource.rb:52:in stage' /usr/local/Library/Homebrew/formula.rb:586:in stage' /usr/local/Library/Homebrew/formula.rb:262:in brew' /usr/local/Library/Homebrew/build.rb:149:in install' /usr/local/Library/Homebrew/build.rb:43:in main' /usr/local/Library/Homebrew/build.rb:10`
/usr/local/Library/Taps/samueljohn/homebrew-python/retext.rb:33

• This has nothing to do with ReText. Please report the bug to Homebrew as suggested in this message.

P.S. 4.0.0 is outdated version of ReText, the latest one is 4.1.2.

• Anonymous
2014-07-07

Hello! All that's necessary for a Homebrew install is now:

brew tap homebrew/python
brew install retext

The dependencies are handled automatically.

Thanks,
Tim

• Thanks, page updated. It is wiki, so you could just update it yourself.

<< < 1 2 3 4 5 > >> (Page 4 of 5)

Anonymous