f



Stick left AND right

Hello,

I am preparing an index which is typeset in a multi-column layout.
Keywords are aligned with the left margin, the corresponding page
number is aligned with the right margin. Naively, I use \hfill
for this purpose:

\newcommand{\Entry}[2]{#1\hfill #2}

\Entry{key}{1234}
\Entry{keyword}{1234}
\Entry{word}{4332}

results in:

key            1234
keyword        1234
word           4332

However, with the occasional very long keywords (columns are wide
enough to hold ca. 95% of keywords+page number in one line), the
page number wraps into the next line, and the pagenumber appears
at the left margin of the column:

verylongkeyword
1234

How can I achieve that the page number sticks to the right side, like

verylongkeyword
             1234

Thank you for suggestions and hints!

Oliver.


-- 
Dr. Oliver Corff              e-mail:    corff@zedat.fu-berlin.de
0
corff2 (49)
12/5/2008 9:15:59 AM
comp.text.tex 39029 articles. 3 followers. Post Follow

2 Replies
374 Views

Similar Articles

[PageSpeed] 40

 Oliver Corff <corff@samoa.zedat.fu-berlin.de> writes:
>I am preparing an index which is typeset in a multi-column layout.
>Keywords are aligned with the left margin, the corresponding page
>number is aligned with the right margin. Naively, I use \hfill
>for this purpose:
>
>\newcommand{\Entry}[2]{#1\hfill #2}
>
>\Entry{key}{1234}
>\Entry{keyword}{1234}
>\Entry{word}{4332}
>
>results in:
>
>key            1234
>keyword        1234
>word           4332
>
>However, with the occasional very long keywords (columns are wide
>enough to hold ca. 95% of keywords+page number in one line), the
>page number wraps into the next line, and the pagenumber appears
>at the left margin of the column:
>
>verylongkeyword
>1234
>
>How can I achieve that the page number sticks to the right side, like
>
>verylongkeyword
>             1234

see texbook p.106, zz-paragraph after exercise 14.30

(i've adapted that for a latex macro in a project i was doing; it's
not difficult.)
-- 
Robin Fairbairns, Cambridge
0
rf10 (3613)
12/5/2008 11:22:04 AM
Robin Fairbairns <rf10@cl.cam.ac.uk> wrote:
:  Oliver Corff <corff@samoa.zedat.fu-berlin.de> writes:
: >I am preparing an index which is typeset in a multi-column layout.
: >Keywords are aligned with the left margin, the corresponding page
: >number is aligned with the right margin. Naively, I use \hfill

: see texbook p.106, zz-paragraph after exercise 14.30

: (i've adapted that for a latex macro in a project i was doing; it's
: not difficult.)

Dear Robin,

Thank you, that one did the trick.

Oliver.

-- 
Dr. Oliver Corff              e-mail:    corff@zedat.fu-berlin.de
0
corff2 (49)
12/6/2008 1:10:32 PM
Reply:

Similar Artilces:

Text widget with mixed left-to-right and right-to-left Unicode text abilities?
Hi, is there one of these? If not I might have a go at writing a simple one of them.... Apologies if this is a FAQ, I did search the archive a bit before posting. Best, Charles. ...

textarea: get text left and right from selected text
Hello everybody, I am looking for a method to get the text on the left and the right side if a user selects some text in a textarea. Regards Mario *** mariomueller escribi�/wrote (23 Aug 2006 12:31:43 -0700): > I am looking for a method to get the text on the left and the right > side if a user selects some text in a textarea. This article may help: http://www.quirksmode.org/js/selected.html -- -+ http://alvaro.es - �lvaro G. Vicario - Burgos, Spain ++ Mi sitio sobre programaci�n web: http://bits.demogracia.com +- Mi web de humor con rayos UVA: http://www.demogracia.com -- Hi ...

what does SHIFT-left-or-right of up-down-left-right do?
Well, I know about shift up-and-down: shift-right ("red" or whatever) up and down on choose-box, HIST, things like that, take the cursor all the way to the beginning or the end. shift-left ("white") on up and down scroll the screen-full up or down (the FIRST such click *stupidly* goes to the final CURRENTLY-ON-SCREEN choice or whatever (meaning TWO double-button-pushes to scroll-down that FIRST time.) What are some of the OTHER possibilities, ie with the left and right arrows? Oh, apparantely undocumented, I&#...

text-align left AND text-align-right in same container (on same line)
Is it possible to have a box (div) which sets a background-color and which contains (on the same line) text which is left aligned and text which is right aligned. (as in a table: two td's left one left aligned, right one right aligned). Thanxs!! At approximately 2006/09/21 15:46, Sjef Janssen typed these characters: >Is it possible to have a box (div) which sets a background-color and which >contains (on the same line) text which is left aligned and text which is >right aligned. (as in a table: two td's left one left aligned, right one >right aligned)....

Right-to-left text
I come back to right-to-left text such as Arabic and Hebrew. (Previous thread was "non-Latin-1 in iCab 3".) My test page http://www.unics.uni-hannover.de/nhtcapri/right-to-left.html lists all HTML and CSS constructs for bidirectional text. It uses only ASCII digits! You do not need to know Arabic or Hebrew; you don't even need fonts with Arabic or Hebrew letters. If your browser passes this test, it is likely to display Arabic and Hebrew pages correctly. ...

LEFT + LEFT vs LEFT + RIGHT
In order to do a full outer join in MySQL one must use a union. Is there any good reason to do SELECT ... LEFT JOIN UNION SELECT ... RIGHT JOIN rather than SELECT ... LEFT JOIN UNION SELECT ... LEFT JOIN with the tables swapped on the latter LEFT JOIN? Paul Lautman wrote: > In order to do a full outer join in MySQL one must use a union. > Is there any good reason to do > > SELECT ... > LEFT JOIN > > UNION > > SELECT ... > RIGHT JOIN > > rather than > > SELECT ... > LEFT JOIN > > UNION > > SELECT ... > LEFT JOIN > ...

does PHP read left to right or right to left?
I've two functions. currentHeadline looks in $_GET for a variable called 'image' and prints what it finds. showThumbnail takes an image for a parameter and resizes it before sending it to the screen. But when I do this: <?php showThumbnail(currentImage(), 20, 20); ?> showThumbnail is telling me that it is not being given a file name, and currentImage is printing the file name to the screen. How is that possible? What is the right way to do this? lawrence k wrote: > I've two functions. currentHeadline looks in $_GET for a variable > called 'image' and pr...

Text and Image inside table <td> Alight Text Left and Image right in same cell ??
Is that possible? How? <td > <asp:Label ID="StartDateLabel" runat="server" Text="Start Date:"> <asp:imagebutton ID="Imagebutton1" width=18 Height=18 CommandName=SetDate imageUrl="../cal.jpg" runat=server /> </asp:Label> </td> <td > On 2006-10-24, Jason <jason@cyberpine.com> wrote: > Is that possible? How? Set text-align: left on the cell as usual (it's likely to be the default), and make the image float: right. To work around a Firefox float bug, better to put the image befor...

Changing x-axis plot from right to left to left to right
Hi, For mathematical reasons, I need to change the way that gnuplots my data along the X axis from right to left to left to right (that is, at the minute it plots from 20 down to 1, not from 1 to 20) I am aware of set xrange reverse but this just inverts the whole graph and displays from 17 .... 1 down along the x-axis rather than plotting the other way round. I'm rather stuck and would appreciate some advice. Regards Jamie On 14.08.2012 17:52, Jamie Rees wrote: > For mathematical reasons, I need to change the way that gnuplots my > data along the X axis from ri...

right to left text field
just i want to change the direction of the writing in the text field to be from right to left. I tried Font.layoutGlyphVector but I don't know how to set the arguments especailly the first and the second arguments. Am i in the right way or there is another way? pls help. polaris wrote: > just i want to change the direction of the writing in the text field > to be from right to left. I tried Font.layoutGlyphVector but I don't > know how to set the arguments especailly the first and the second > arguments. Am i in the right way or there is another way? pls help. > Mayb...

input text right to left
Hi, I am new to java. Am creating a math page for teachers. I have math problems where the input needs to be right to left (e.g. adding two several digit numbers in a column). Is there an easy way to specify that the text insertion point needs to move from right to left instead on the standard left to right? I tried the direction property, but that doesn't seem to work. kd ROBT NISHIDA <kddran.6.26.83@verizon.net> wrote: > I am new to java. Am creating a math page for teachers. I have math > problems where the input needs to be right to left (e.g. adding two several &g...

Right to left text area
Hi, I have been trying to get right to left text working for a while now. What I want is a JTextArea, with my own very specific font (for a middle-eastern language that is RTL). I have the TTF font, and I can get the JTextArea to type with this font. I have even devised a way to map key strokes on the keyboard to the glyphs from the font that I want. What I cannot figure out is how to make this text start and flow from the right to the left. I have tried all variations of setComponentOrientation() and setAlignmentX(). I have even tried creating my own DefaultKeyTypedAction() that...

Skybuck presents ShiftLeft( Left, Right, Shift ) and ShiftRight( Right, Left, Shift )
Hello, I think these two functions will come in very handy to solving the "write longword bits" problem. ShiftLeft( Left, Right, Shift ) ShiftRight( Right, Left, Shift ) Shifting with extra inputs is what is required to solve it nicely. // Begin of Code *** program Project1; {$APPTYPE CONSOLE} { Skybuck presents ShiftLeft( Left, Right, Shift ) and ShiftRight( Right, Left, Shift ) version 0.01 created on 5 may 2008 by Skybuck Flying. Be carefull though, the shift parameter must be 0 to 31. } uses SysUtils; // make overloaded versions for easy coding // display in big e...

how to let the text align to the left and right
well, I am writing my Acknowledgements for my thesis work, and at last, I will write the date and my name, like (let xxx represents the text) xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxx. Frankfurt, May 02 Bill Gates the "Frankfurt, May 02 should be at the very left side", and "Bill Gates" should be at the very right side, how? Am 2 May 2007 02:12:28 -0700 schrieb hallohallo2002@hotmail.com: > well, I am writing my Acknowledgements for my thesis work, and at...

Web resources about - Stick left AND right - comp.text.tex

Ratings: MSNBC Democratic Debate Draws 4.5 Million Viewers — Lowest This Cycle
The first head-to-head showdown of Democratic front-runners Hillary Clinton and Bernie Sanders didn’t make much of a ratings impact on Thursday, ...

Catch Up on the Super Bowl During Half Time and Still Manage to Watch the End Live
If you’re going to miss the first part of the Super Bowl, you can always record it and catch up during the halftime show. You’ll miss Coldplay, ...

UN Panel: Julian Assange ‘Arbitrarily Detained’
There whereabouts of Julian Assange have ranged from mysterious to contentious to “arbitrary,” according to a panel at the United Nations. They ...

Tableau beats Q4 earnings estimates and reports quarterly revenue rising 42%, but stock drops over 45% ...
Brian Solomon / Forbes : Tableau beats Q4 earnings estimates and reports quarterly revenue rising 42%, but stock drops over 45% on weak forecast ...

Consumer Reports Shares Mosquito Repellent Ratings For Zika Virus Prevention
Even if you’ve only been half paying attention to the news, you’ve heard something about the Zika virus, even if it’s only that a bunch of people ...

Sanders lukewarm on jobs report
Democratic presidential hopeful Bernie Sanders on Friday said the recent jobs report, which shows the unemployment rate dropping below 5 percent ...

Android Wear 1.4 brings new gestures, speech-to-text messaging, voice calling
While Google's Android blog post doesn't specifically identify the release number, other Google sources have verified the update is Android OS ...

Earth, Wind & Fire 'September'
Traffic sucks, so why not start your morning off with some music? You provide the toast and we’ll provide the jams. Read more...

New York City crane collapse leaves 1 dead, 3 injured
CNN New York City crane collapse leaves 1 dead, 3 injured CNN New York (CNN) One person was killed and three others injured when a 565-foot ...

Apple Stores Will Now Trade Broken iPhones For A Brand New One
Apple stores everywhere are launching a new program in which they’ll offer credit towards a brand new device when customers trade in their old, ...

Resources last updated: 2/5/2016 7:13:05 PM