Questions about special signs in ubuntu manual (latex syntax?)

Asked by Enrico Rosina on 2012-10-28

Hello,

I have been busy this last 2 weeks generating pdfs for the ubuntu french translators.
I think I made progress, but I still have 3 questions about that

(1)

In French there are many places where we put unbreakable spaces. InRosetta we code them as "[nbsp]".
It's a general rule strictly applied when using some punctuation signs.

Problem: in the resulting Ubuntu Manual (pdf), those spaces are giant, and so very ugly.
Is there a way to set their size to a smaller dimension?

(2)

The \dash should be changed in French according this rule:
- normal space before the dash sign
- dash sign
- unbreakable space after the dash sign

I tried to set that in the "um-french.clo" file, with this rule:
\renewcommand{\dash}{\unskip{} \penalty0---\unskip{}\xspace}

The result is not bad, but I am unable to replace that final \xspace
with a tilde or anything else to insert an unbreakable space
Does anybody have an idea?

(3)

I also have problems with quotation marks. I would like to replace
the '' ´´ signs with the corresponding french signs. For instance
« Yesterday, Kevin said, “e Ubuntu Manual project is fun !” »
(some of you will recognize this example, it explains exactly our need)
Can somebody help me on that, please?

Thank you very much for any response you can provide me, explanation or
useful bind would be greatly appreciated.

Best regards
Enrico

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Manual Edit question
Assignee:
No assignee Edit question
Last query:
2012-10-28
Last reply:
2012-10-29
Sylvie Gallet (sylvie-gallet) said : #1

Hi!

Both the tilde and [nbsp] give way too big spaces (bigger than regular spaces)
We need a non breakable thin space, from what I've found on several places on the Internet, it looks like \, gives a thin space, but is it unbreakable, and how to use it, for example in "blablabla :" ?

Best regards

Carsten Gerlach (carsteng) said : #2

Hi,

as Sylvie mentioned, a thin space is created with \, and it is used like this "blablabla\,:"

Greetings, Carsten

Carsten Gerlach (carsteng) said : #3

Hi Enrico,

for your third question: You have to type the right French quotation marks by yourself using »Alt Gr + X« and »Alt Gr + Y«.

Greetings, Carsten

Enrico Rosina (e-rosina) said : #4

Hi Carsten,

What a pity! We just tried to follow the rules given there: http://files.ubuntu-manual.org/style-guide.pdf

In this document, we saw:
Punctuation
Quotation marks otation marks in LATEX are entered as `` and '', not as ". Single quotation marks are entered as ` and '.

We thought it was not allowed to insert those signs: « », due to some latex problem, and that they would be automatically replaced with localization parameters.

I only remark now the sentence which comes after:
"Quotation marks for other languages are entered as their Unicode characters."

What do you think we shall do now? General replacement with a po file ?
It will be difficult not to do mistakes with that!

Thank you for any more hint you could give.
Enrico

Enrico Rosina (e-rosina) said : #5

By the way, in this file
http://bazaar.launchpad.net/~ubuntu-manual/ubuntu-manual/precise-e2/view/head:/um-german.clo

I can see \setquotestyle[guillemets]{german}

... so I suppose a general replacement of the quotes should be possible!

Kevin Godby (godbyk) said : #6

The original text of the style guide was written for the authors of the English edition of the manual.

The csquotes LaTeX package provides a few commands (e.g., \enquote) that would allow for automatic replacement of quotation marks based on the language. So instead of writing, ``Hello, world!'', we'd write \enquote{Hello, world!}. Using the \enquote code, the `` and '' quotation marks will be used in the English edition, guillemets for the German edition, etc.

Since \enquote{...} is more typing than ``...'', I'm not sure that the authors and editors would be very eager to switch, but we can give it a shot if you think it'd help much. I haven't noticed any problems with other translations switching to the appropriate quotation marks during translation, however.

To address the original questions you raised:

(1) You can use ~ as an equivalent of   in HTML. It's an unbreakable word space. This space is likely larger than what you want to use with punctuation marks, however.

Most of the spacing around punctuation marks should be handled automatically by LaTeX (and the polyglossia package). For example, there is extra space before a colon (:) that is inserted automatically in the French translation. If the spacing for other punctuation in the French translation is incorrect, please let me know and I'll look into it. It may be a simple fix on my end.

If you're looking for non-breaking spaces to use in other circumstances, give me a few examples, and I can provide you with the proper spacing commands.

(2) The \dash command in the English edition is used to separate two thoughts in a single sentence—like this.

If the em dash in French is used in a different manner (e.g., to set off quotations), then we may not want to use the \dash command. Can you tell me how you used the \dash command in your translations?

(3) The `` and '' quotation marks in the manual just generate “ and ” since those quotation marks don't exist on the English keyboard. For the French quotation marks « and », you can just insert those marks directly during translation and they should be typeset properly by LaTeX.

Can you help with this problem?

Provide an answer of your own, or ask Enrico Rosina for more information if necessary.

To post a message you must log in.