8000 Documenting smartquotes and compose key. · python/python-docs-fr@9e2cca2 · GitHub
[go: up one dir, main page]

Skip to content
Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 9e2cca2

Browse files
committed
Documenting smartquotes and compose key.
1 parent 81dc584 commit 9e2cca2

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

README.rst

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,22 @@ translate untranslated ones (find them using ``make todo``)..
186186
title.
187187

188188

189+
The case of "---"
190+
~~~~~~~~~~~~~~~~~
191+
192+
The english version uses a thing named `smartquotes
193+
<http://docutils.sourceforge.net/docs/user/smartquotes.html>`_, that
194+
tries to be smart, works in english, but soon causes issues in other
195+
languages. So we desactivated it.
196+
197+
Smartquotes is also responsible for the transformation of ``--`` to
198+
en-dash (````), ``---`` to em-dash (````), and `...` to ``.
199+
200+
As we don't have smartquotes we'll also have to "translate" those
201+
manually, so if you see ``---`` in english, you have to translate it
202+
to ```` in french.
203+
204+
189205
The case of "::"
190206
~~~~~~~~~~~~~~~~
191207

@@ -211,6 +227,32 @@ space, so it's still not really valid french. Yes, better learn how to
211227
type no-break space.
212228

213229

230+
How to input em-dash, ellipsis, french quotes, or no-break spaces?
231+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
232+
233+
It really depends on your OS and your keyboard sadly. On Linux you can
234+
use a `Compose Key <https://en.wikipedia.org/wiki/Compose_key>`_, it's
235+
easy to configure either using your graphical keyboard configuration
236+
tool or via ``dpkg-reconfigure keyboard-configuration`. On Windows you
237+
can use `wincompose <https://github.com/SamHocevar/wincompose>`_.
238+
239+
With a compose key (I use ``alt-gr``, you can also use ``caps lock``)
240+
you can use the following compositions:
241+
242+
- Compose ``<`` ``<`` gives ``«``
243+
- Compose ``>`` ``>`` gives ``»``
244+
- Compose space space gives an no-break space
245+
- Compose ``.`` ``.`` ``.`` gives ````
246+
247+
As you noted, almost all compositions are easy to remember, so you can
248+
try others and they should just work:
249+
250+
- Compose ``C`` ``=`` gives ````
251+
- Compose ``1`` ``2`` gives ``½``
252+
- Compose ``'`` ``E`` gives ``É``
253+
- … …
254+
255+
214256
Where to get help
215257
~~~~~~~~~~~~~~~~~
216258

0 commit comments

Comments
 (0)
0