Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 09-10-2017, 07:48 PM
wordnew wordnew is offline Rtl text aligned right and ltr text aligned to left in one line - HOW? Windows 10 Rtl text aligned right and ltr text aligned to left in one line - HOW? Office 2007
Novice
Rtl text aligned right and ltr text aligned to left in one line - HOW?
 
Join Date: Sep 2017
Posts: 6
wordnew is on a distinguished road
Default Rtl text aligned right and ltr text aligned to left in one line - HOW?

Hello,



i need to format a dictionary for layout. The first language of the dictionary is LTR and the second one is a RTL language. Now i have seen in other dictionaries that they have managed to align the LTR language to left and the RTL language to the right side in the same line. I need to do that as well. I am uploading an example file, where the RTL text starts with °° and ends with °°°.

Example of my current data: (see attachment for more details)

abats n.m.pl. °°د بوده ګانو لړمون°°°.
abat-son (pl. ~-~s). °°کوزې خوا ته د غږ د راماتولو ترتیبات°°°.
abattage n.m. °°وهنه (د ونې) ؛ حلالونه، کوتنه، وژنه°°°.
abattement n.m. °° ۱ـ بېسېکي ؛ نا امیدي ۲ـ د مالیې تنقیص °°°.
abatteur n.m. °°د ونو وهونکی°°°.
abattis n.m.pl. °°د چرګانو سر او پښې او لړمون ؛ د انسان لاسونه او پښې (.pop) ؛ د نړول شوؤ شیانو کوټه°°°.
abattoir n.m. °°مسلخ، کوتنځی، کوتلځی°°°.


I found some examples which suggest that it is possible what i want to do. The question is: how to?






Can anyone here help me solve this problem?

Note: This thread is also posted to excelforum.com with following link:
https://www.excelforum.com/word-form...ml#post4739817
Attached Files
File Type: docx ltr_and_rtl_in_one_line_example_for_forum.docx (28.1 KB, 16 views)

Last edited by wordnew; 09-10-2017 at 11:44 PM. Reason: examples
Reply With Quote
  #2  
Old 09-11-2017, 05:10 AM
Charles Kenyon Charles Kenyon is offline Rtl text aligned right and ltr text aligned to left in one line - HOW? Windows 10 Rtl text aligned right and ltr text aligned to left in one line - HOW? Office 2013
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,083
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

You would use a two-column borderless table. (Or, if you want two columns of words/definitions as in your screenshot, a four-column borderless table.) The first (and third) column would be set for left-alignment, the second (and fourth) for right-alignment.
4. Use Tables and Tabs to Arrange Text in Microsoft Word
Tables

You could use one paragraph style in the first column and another in the second. These could have the proofing language set appropriately as well as the allignment.
Reply With Quote
  #3  
Old 09-11-2017, 09:29 PM
wordnew wordnew is offline Rtl text aligned right and ltr text aligned to left in one line - HOW? Windows 10 Rtl text aligned right and ltr text aligned to left in one line - HOW? Office 2007
Novice
Rtl text aligned right and ltr text aligned to left in one line - HOW?
 
Join Date: Sep 2017
Posts: 6
wordnew is on a distinguished road
Default

Dear Charles Kenyon,
thank you very much for your reply to my thread.

I tried the method you have kindly suggested but the columns remain fixed sized in this method. I mean i can change their width but that width remains for all other words. I am rather looking for a solution which will make my layout like in the image examples i have posted in my first post.

In the examples that I have posted there are no fixed columns for words and meanings. Some times is the meaning longer and sometimes the word takes more place than the word befor it. And my task is to get to that solution where for each word and its meaning there is no fixed width.

The original word file of my dictionary has over 1500 pages. My hope is that i can find an automated solution for the whole file, after which my layout looks like in one of the example images i have posted in this thread.
Reply With Quote
  #4  
Old 09-11-2017, 11:32 PM
macropod's Avatar
macropod macropod is offline Rtl text aligned right and ltr text aligned to left in one line - HOW? Windows 7 64bit Rtl text aligned right and ltr text aligned to left in one line - HOW? Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

What are the degree symbols for?
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #5  
Old 09-12-2017, 12:32 AM
wordnew wordnew is offline Rtl text aligned right and ltr text aligned to left in one line - HOW? Windows 10 Rtl text aligned right and ltr text aligned to left in one line - HOW? Office 2007
Novice
Rtl text aligned right and ltr text aligned to left in one line - HOW?
 
Join Date: Sep 2017
Posts: 6
wordnew is on a distinguished road
Default

Dear Macropod, I had added bevor and after each field (Word, Grammar Identities, Translation) different symbols, with the hope that these symbols will help me in possible automised solution. In other words these symbols can just be deleted.

I am uploading first three pages of real file with this post.
Attached Files
File Type: docx Exmaple_real_data.docx (26.2 KB, 9 views)
Reply With Quote
  #6  
Old 09-12-2017, 05:03 AM
Charles Kenyon Charles Kenyon is offline Rtl text aligned right and ltr text aligned to left in one line - HOW? Windows 10 Rtl text aligned right and ltr text aligned to left in one line - HOW? Office 2013
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,083
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

Quote:
Originally Posted by wordnew View Post
Dear Charles Kenyon,
thank you very much for your reply to my thread.

I tried the method you have kindly suggested but the columns remain fixed sized in this method. I mean i can change their width but that width remains for all other words. I am rather looking for a solution which will make my layout like in the image examples i have posted in my first post.

In the examples that I have posted there are no fixed columns for words and meanings. Some times is the meaning longer and sometimes the word takes more place than the word befor it. And my task is to get to that solution where for each word and its meaning there is no fixed width.

The original word file of my dictionary has over 1500 pages. My hope is that i can find an automated solution for the whole file, after which my layout looks like in one of the example images i have posted in this thread.
Then I would suggest setting right tabs and using the tab to align your text on the right. See Alignment / Justification of Text in Microsoft Word
It is more work than a two-column table but will allow text on the left and right to overlap. This is what is called Flush justification in Wordperfect.

Note that this workaround is imperfect and requires a great deal of manual tweaking.
  • The right tab setting must be inside the right indent or otherwise you can get text running off the page.
  • If text wraps to the next line, it will not be right-aligned but will wrap and fill from the left indent.
  • You can use a manual line break followed by a tab for wrapping text. See below.
00 deleteme 2.png
Reply With Quote
  #7  
Old 09-12-2017, 02:21 PM
macropod's Avatar
macropod macropod is offline Rtl text aligned right and ltr text aligned to left in one line - HOW? Windows 7 64bit Rtl text aligned right and ltr text aligned to left in one line - HOW? Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Perhaps you can get what you want with some major reformatting, for which you might use a macro like:
Code:
Sub Demo()
Application.ScreenUpdating = False
Dim i As Long, Rng As Range
Set Rng = Selection.Range
With ActiveDocument
  With .Range
    With .Find
      .ClearFormatting
      .Replacement.ClearFormatting
      .Forward = True
      .Format = False
      .MatchWildcards = True
      .Wrap = wdFindContinue
      .Text = "°°°"
      .Replacement.Text = ""
      .Execute Replace:=wdReplaceAll
      .Text = "°°"
      .Replacement.Text = "^p"
      .Execute Replace:=wdReplaceAll
      .Wrap = wdFindStop
      .Text = "^t*^13*^13"
      .Replacement.Text = "^p"
      .Execute
    End With
    Do While .Find.Found
      i = i + 1
      If i Mod 100 = 0 Then DoEvents
      .ParagraphFormat.TabStops.ClearAll
      With .Paragraphs.Last.Range.ParagraphFormat
        .FirstLineIndent = 0
        .LeftIndent = 0
        .RightIndent = InchesToPoints(0.5)
        .Alignment = wdAlignParagraphJustify
        .ReadingOrder = wdReadingOrderRtl
      End With
      .Paragraphs.First.Range.Select
      Selection.InsertStyleSeparator
      .Collapse wdCollapseEnd
      .Find.Execute
    Loop
  End With
End With
Rng.Select
Application.ScreenUpdating = True
End Sub
With your initial attachment, the file gets reformatted as per the attachment to this post.
Attached Files
File Type: docx ltr_and_rtl_in_one_line_example_for_forum.docx (35.3 KB, 18 views)
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]

Last edited by Charles Kenyon; 10-29-2019 at 08:34 AM. Reason: Mark as answer
Reply With Quote
  #8  
Old 09-14-2017, 01:53 AM
wordnew wordnew is offline Rtl text aligned right and ltr text aligned to left in one line - HOW? Windows 10 Rtl text aligned right and ltr text aligned to left in one line - HOW? Office 2007
Novice
Rtl text aligned right and ltr text aligned to left in one line - HOW?
 
Join Date: Sep 2017
Posts: 6
wordnew is on a distinguished road
Default

Dear Charles Kenyon and macropod,
thank you both very much for your kind help.
Macropod's VBA Code repaired my whole document at once. God bless you.
Reply With Quote
  #9  
Old 09-14-2017, 01:46 PM
macropod's Avatar
macropod macropod is offline Rtl text aligned right and ltr text aligned to left in one line - HOW? Windows 7 64bit Rtl text aligned right and ltr text aligned to left in one line - HOW? Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

FWIW, the keys to reformatting your document were:
1. Splitting each entry into two paragraphs, one with LTR the other with RTL formatting; and
2. Applying a Style Separator to the first of these paragraphs to remove the gap between them.
You can see the effect if you click on the ¶ symbol on the Ribbon's Home tab to display the formatting marks.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #10  
Old 10-29-2019, 08:20 AM
strftm strftm is offline Rtl text aligned right and ltr text aligned to left in one line - HOW? Windows 10 Rtl text aligned right and ltr text aligned to left in one line - HOW? Office 2016
Novice
 
Join Date: Oct 2019
Posts: 1
strftm is on a distinguished road
Smile

You can use this style that I get it from my customized table of content style, "TOC 1"
______________________
Font: (Default) Cambria, (Complex) Persian (Iran), Complex Script Font: B Nazanin, Right-to-left, Right
Before: 0/63 cm
Hanging: 0/63 cm, Right-to-left
Line spacing: Multiple 1/15 li, Space
After: 5 pt
Tab stops: 0/68 cm, Right + 1/55 cm, Right + 16/69 cm, Left,Leader: …, Bulleted + Level: 1 + Aligned at: 0/63 cm + Indent at: 1/27 cm, Style: Linked, Automatically update, Hide until used, Show in the Styles gallery, Priority: 40
Based on: Normal
Following style: Normal
________________________
I Hope this is helpfull
Reply With Quote
  #11  
Old 09-06-2020, 08:23 AM
Alinaderan Alinaderan is offline Rtl text aligned right and ltr text aligned to left in one line - HOW? Windows 10 Rtl text aligned right and ltr text aligned to left in one line - HOW? Office 2019
Novice
 
Join Date: Sep 2020
Posts: 1
Alinaderan is on a distinguished road
Default LTR -RTL mixed line problem

Dear macropod;
I have the same problem. Could you help me!? I try to follow your steps in file A_style_separator.docx. Two highlighted records are based on your solution. The yellow one misplaces the words. the cyan is left justified instead of fully justified.
The original file is A.docx. LTR paragraph is in English followed by RTL paragraph.
Would you be so kind as to help me out. I would deeply appreciate it.
Attached Files
File Type: docx A.docx (406.4 KB, 6 views)
File Type: docx A_Style_Separator.docx (406.9 KB, 6 views)
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Rtl text aligned right and ltr text aligned to left in one line - HOW? The "body of text" for all odd-numbered pages are all "vertically-centered-aligned". keepcalmandreadabook Word 5 03-27-2017 04:08 PM
Rtl text aligned right and ltr text aligned to left in one line - HOW? Inserting Symbols and Keeping Text Aligned- THANK YOU! StuartS Word 1 07-21-2016 10:00 PM
Rtl text aligned right and ltr text aligned to left in one line - HOW? Position pictures so they are right aligned with margin TomPC Word 2 04-22-2015 01:38 PM
Rtl text aligned right and ltr text aligned to left in one line - HOW? can't get text to stay aligned for printing cherd Word 1 10-06-2011 03:20 AM
Footnote text is not aligned with the corresponding number Patrick1988 Word 0 08-28-2010 09:33 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 06:40 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft