f

#### multiline TOC entry

Hello,

My documents sometimes have long titles, and these titles
don't fit into one line of TOC (table of content). I managed
to fix the problem by creating a macro:

[code]
% Generalized TOC entry
% #1 -- label
% #2 -- label width
% #3 -- ID
% #4 -- text
% #5 -- text font tuning
\newcommand{\tocX}[5]{%
% setup font
{#5%
% start a hyperlink and a link rectangle
% start a paragraph, reserve space for label and page number
\noindent\leftskip=#2\rightskip=3em% 3em > space + 9--99
% make a label
\hbox to 0pt{\kern-#2#1\hfil}%
% TOC entry text
#4\hfill
% page number
\hbox to 0pt{\hbox to 3em{\hfil\pageref*{#3}}\hss}%
% finish the box and the hyperlink
}}}\par}}
[/code]

TOC entries consist of three parts: label, text and page
number. If text is long and should be splitted on several lines,
then the text occupies only the text area.

Having "tocX", I define styles for actual TOC entries:

[code]
% Toc Entries
% #1 -- label
% #2 -- ID
% #3 -- text
\newcommand{\tocHI}[3]{\vspace{20pt}\tocX{Kapitel
#1}{2cm}{#2}{#3}{\V@SelectTOCFont\bfseries}%
\penalty10000\vspace{2pt}\hrule\penalty10000}
\newcommand{\tocHII}[3]{\vspace{12pt}\tocX{#1}{2.5cm}{#2}{#3}{\V@SelectTOCFont\bfseries}\penalty10000}
\newcommand{\tocHIII}[3]{\tocX{#1}{3cm}{#2}{#3}{\V@SelectTOCFont}}
\newcommand{\tocHIV}[3]{\tocX{#1}{3.5cm}{#2}{#3}{\V@SelectTOCFont}}
\newcommand{\tocHV}[3]{\tocX{#1}{4cm}{#2}{#3}{\V@SelectTOCFont}}
[/code]

and use in a document:

[code]
\toc
\tocHI{9}{id2295978}{Anhang}
\tocHII{9.1}{id2295983}{Weitere Dokumentation von ...}
\tocHII{9.2}{id2296568}{Dokumentation von Zulieferern}
\tocHII{9.3}{id2296683}{Normen}
[/code]

All works fine. I'm sharing the code in hope it will be useful.

My request: please comment how the code can be improved. For
example, I suppose that using "\vbox" is LaTeX is not very good,
but I have no idea for replacement.

Bye!

--
Oleg
 0
usenet5437 (22)
8/31/2004 9:18:22 AM
comp.text.tex 39029 articles. 2 followers.

0 Replies
635 Views

Similar Articles

[PageSpeed] 47

Similar Artilces:

Japanese text entry problem Mac OS X 10.3.4 -- Kotoeri grayed out in i8n text entry palette
I've activated kotoeri text entry (romaji, hiragana, etc) in the internationalization system preferences dialogue. I can successfully enter text in Japanese kana, however, there is no kanji conversion as you would expect with hitting the space key. It's as if the dictionary used is missing. Does anyone know the path to the dictionary file that kotoeri uses, or is there some setup component that I may be missing? I have an older ti powerbook that is upgraded to 10.3.4 Thanks Sean ...

ToC questions -- formatting ToC entries
Hi All, I'm writing a reference document -- think 'encyclopedia-like' -- with a large number of entries in each section. I'd like the individual entries to show up in the ToC, but since they all (tend to) have very short names I don't want to have a huge number of pages that consist mostly of leaders between entry name and page number. The default ToC behavior would give me something like Chapter ...................................................... 1 Section 1 .................................................. 1 EntryA 1 EntryB 1 EntryC 2 EntryD 2 EntryE 3 EntryF 4 EntryG 4 EntryH 5 EntryI 6 What I'd *like* to have is something like Chapter ...................................................... 1 Section 1 .................................................. 1 EntryA 1 EntryD 2 EntryG 4 EntryB 1 EntryE 3 EntryH 5 EntryC 2 EntryF 4 EntryI 6 Spacing's not quit...

Edit Text Uicontrol: Scroll to the top when text is multiline
Good day, I'm wondering how to get an edit text uicontrol to scroll all the way to the top of it's contents, when the text I give it requires scrolling for display. The default behaviour appears to be to go to the bottom of the text. I'm using R14SP3 (7.1) on Windows XP. I appreciate any help/pointers on this. Thanks, WB ^ for hopes that someone knows. I appreciate any pointers. Thanks, WB ...

Entries in TOC
I am contributing one part (Part 'D') of a publication. The formal requirement is that my chapters/sections/tables/figures are numbered with the prefix 'D-'. I have found the packages titlesec, titletoc, and caption for that purpose. - titlesec works fine - titletoc is troublesome. The code below produces unexpected results, whereever I put the 'D'. Both versions give an unexpected '0' and no D as a prefix %\titlecontents{chapter}[0.7cm] % {\vspace{0.3cm}} % {D~\thechapter\sffamily\bfseries\Large \contentslabel{1.7cm}} % {} % {\sffamily\bfseries\Large\hfill\contentspage} %\titlecontents{chapter}[0.7cm] % {\vspace{0.3cm}} % {\thechapter\sffamily\bfseries\Large D~ \contentslabel{1.7cm}} % {} % {\sffamily\bfseries\Large\hfill\contentspage} - The package 'caption' lets me produce Figure Captions like Figure 2- D, but not the desired Figure D-2. I have found numerous questions on that in the FAQ, but no answers that work for my case. All the best, Robert \usepackage{titlesec,titletoc} %%% RJa %% TITLESEC / Modifications of Numbering in Text \titleformat{\chapter} {\normalfont\Large\bfseries} {\thechapter. }{0.5em}{} \titleformat{\section} {\normalfont\Large\bfseries} {\thesection. }{0.5em}{} \titleformat{\subsection} {\normalfont\bfseries} {D-~\thesubsection. }{0.5em}{} % TITLETOC %\titlecontents{chapt...

text-text
Wondering how what I input to my UTF-8 terminal gets passed along through my patched [1] trn ... Cyrillic: А Б В Г Д Е Ж З И Й К Л М Н О П а б в г д е ж з и й к л м н о п IPA: ᴀ ᴁ ᴂ ᴃ ᴄ ᴅ ᴆ ᴇ ᴈ ᴉ ᴊ ᴋ ᴌ ᴍ ᴎ ᴏ ɀ Ɂ ɂ Ƀ Ʉ Ʌ Ɇ ɇ Ɉ ɉ Ɋ ɋ Ɍ ɍ Ɏ ɏ [1] https://groups.google.com/d/msg/comp.sys.raspberry-pi/7Z37Hdrm0DM/6aqD-reXFzAJ ...

text + text
What is "text + text" supposed to do right now? It doesn't seem very useful to me. What about making "text + text" as an equivalent for "text || text"? Most strongly-typed programming languages do this. And MS SQL Server too, I think (CMIIW). -- dave ---------------------------(end of broadcast)--------------------------- TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org Am Freitag, 8. Oktober 2004 12:57 schrieb David Garamond: > What is "text + text" supposed to do right now? Nothing. > What about making "text + text" as an equivalent for "text > || text"? Most strongly-typed programming languages do this. And MS SQL > Server too, I think (CMIIW). What would this gain except for bloat? It's not like SQL is utterly compatible with any programming language; users will still have to learn all the operators anyway. -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---------------------------(end of broadcast)--------------------------- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match Peter Eisentraut wrote: >>What is "text + text" supposed to do right now? > > Nothing. Then are these bugs? (7.4.5 and 8.0.0beta1 give same results). Frankly, the current behaviour is quite strange to me. ------------------ =...

Filtering for blank (no entry) in From, and blank (no entry) in subject line, or no body text
I get lots of messages that have no sender, no subject, no body text. When I click "blah blah blah" I see header information, and a time or two I have replied to the "reply to" email address shown, and it always bounces or is blocked. I have tried setting my filter to From: contains (no entry), and From: contains "", and the same for Subject: contains (no entry), or Subject: contains "". Neither of these work. I would like to be able to filter both these fields or that body text contains "", and send these messages directly to the trash. I contacted my ISP and they instructed me to contact the support of the software that I am using. I don't like these messages as if you preview them or open them, they may be sending back information to some unknown entity that I received their message. When I check these messages I usually get offline, and then delete them. Does Eudora have any way I can filter these messages to the trash??? On 11 Oct 2004 21:24:50 -0700, newsy@bellsouth.net (Claire) wrote: >I get lots of messages that have no sender, no subject, no body text. >When I click "blah blah blah" I see header information, and a time or >two I have replied to the "reply to" email address shown, and it >always bounces or is blocked. > >I have tried setting my filter to From: contains (no entry), and >From: contains "" Instead try: Heade...

how to define a variable to hold a multiline text input in perl from html multiline textbox
Hi, I have a perl script (run when "submit" is clicked) to read all one-line text box inputs. However it has trouble to read a multiline textbox (like user question input) to $question. Do I define the variable wrongly? Thanks a lot. -Dale zhangd@tycoelectronics.com (dale zhang) writes: > I have a perl script (run when "submit" is clicked) to read all > one-line text box inputs. However it has trouble to read a multiline > textbox (like user question input) to$question. Do I define the > variable wrongly? You should just be able to do: my $multiline = param('multiline'); in your script. You are using CGI.pm (or CGI::Lite, or something like that), right? If that doesn't do the trick, or you still don't understand, please read the Posting Guidelines first, and then post a small (10-20 lines is ideal), *COMPLETE* program that shows the problem, along with a description of what is supposed to happen, and what actually happens. -=Eric -- Come to think of it, there are already a million monkeys on a million typewriters, and Usenet is NOTHING like Shakespeare. -- Blair Houghton. dale zhang <zhangd@tycoelectronics.com> wrote: > I have a perl script (run when "submit" is clicked) Perl is not CGI. CGI is not Perl. > Do I define the > variable wrongly? Since you haven't shown us how you are defining the variable we can't very well answer that question, now can we? -- Tad McClel... setting TeX text variable depending on keyval-generated param? (low-level TeX question) I am using keyval to set a "scaled" parameter and am having trouble getting the right behavior, which is: If I \usepackage{package} with no [scaled] option, I want to set a variable to a compile-time-specified default, say "s*[a.b]". If I \usepackage[scaled]{package}, same thing. And if I \usepackage[scaled=x.y], I want to set the variable to "s*[x.y]". (This is for font scaling, and I've used as my model the Helvetica scaled parameter.) The variable name (for the purposes of this conversation) is pnm@scaled. What I have that's not working correctly is: \expandafter\ifx\csname pmn@scaled\endcsname\relax \let\pmn@scaled\@empty \else \edef\pmn@scaled{s*[1.2]}% \fi I think what this says is "if pnm@scaled is not defined (case 1), leave it empty, otherwise set it to "s[1.2]". But the else clause is not working correctly, and I don't know how to differentiate between "defined by keyval but with no value" and "defined by keyval but with a value". Also I'm pretty sure I don't really know the difference between \let and \edef. Any help gratefully appreciated. Thanks. JDO john_owens@yahoo.com schrieb: > I am using keyval to set a "scaled" parameter and am having trouble > getting the right behavior, which is: > > If I \usepackage{package} with no [scaled] option, I want to set a > variable to a compile-time-specified default, say "s*[a.b]". > ... setting entry text I'm trying to set and get a text value in an entry box. The following returns an error that reg1 is undefined. Any ideas? Thanks, Randy ############################ entry .entryAddress1 -textvariable reg1 button .entryButton1 -text "Enter" -command Do grid .entryAddress1 .entryButton1 -row 1 proc Do {} {$reg1 set "asdf" } ############################# randy1200 wrote: > > I'm trying to set and get a text value in an entry box. The following > returns an error that reg1 is undefined. Any ideas? > > Thanks, > Randy > > ###############...

Removing entries from TOC

How to list TOC entries?
Hi, When building our project with static libraries we regulary get TOC overflow warnings. I think that all global functions and variables go into the TOC. But correct me if I am wrong. We have also no problem to change the code to make the TOC smaller. But before we do that we want to know what in the TOC is. Is there a way to list all symbols contained in the TOC? I tried both dump and nm but they don't seem to give the answer I want. Joerg Joerg Richter wrote: > Hi, > > When building our project with static libraries we regulary get TOC > overflow warnings. I think t...

adding text to toc
While writing a book I have been using the toc file to insert lengthy (say 100 words) comments about my progress (or lack thereof) on each chapter and section. Following a \section or \chapter command I have something like \addtocontents{toc}{{\small \hspace*{1cm} Completed June 09, 2005. Basic defns and simple examples. }} though most entries are much longer than this. This works well except that if I have such an entry in the final section of a chapter, then I get the ever-popular error message >>>>>>>>>>>>>>>>>>>>>>>>>>>>> ] (dbk.toc [2 ] ! LaTeX Error: Something's wrong--perhaps a missing \item. See the LaTeX manual or LaTeX Companion for explanation. Type H <return> for immediate help. ... l.38 ...ter}{\numberline {4}Processes}{81} ? <<<<<<<<<<<<<<<<<< for the _following_ chapter. It seems to be the presence of an entry {\relax ..... } in the toc file immediately before a \contentsline {chapter}{\numberline {4}Processes}{81} line. I can deal with this ad hoc by inserting an empty section with no addtocontents command. But does anyone know of a real solution to this problem, or why it happens? I am using latex 2003.2.18, LaTeX2e <2001/06/01> Document Class: book 2001/04/21 v1.4e Standard LaTeX document class Thanks in advance for any help, vanadium@axelridge.co.uk wrote: > While writing a book I...

toc entry is lost
Consider this \documentclass[a4paper]{article} \begin{document} \tableofcontents test \clearpage \addcontentsline{toc}{section}{hest} \begin{figure} \centering \rule{2cm}{2cm} \end{figure} \end{document} on my system (TL09) the toc ends up empty, why? -- /daleif (remove RTFSIGNATURE from email address) LaTeX FAQ: http://www.tex.ac.uk/faq LaTeX book: http://www.imf.au.dk/system/latex/bog/ (in Danish) Remember to post minimal examples, see URL below http://www.tex.ac.uk/cgi-bin/texfaq2html?label=minxampl http://www.minimalbeispiel.de/mini-en.html Lars Madsen <daleif@RTFMSIGNATUREimf.au.dk> wrote: > Consider this > > \documentclass[a4paper]{article} > \begin{document} > > \tableofcontents > > test > > \clearpage > \addcontentsline{toc}{section}{hest} > > \begin{figure} > \centering > \rule{2cm}{2cm} > \end{figure} > > \end{document} > > > on my system (TL09) the toc ends up empty, why? Because the normal output routine is never called after the first page. The \clearpage calls \newpage in \end{document} that adds \par\vfil\penalty-\@M, but at top of a new page glue and penalties are discarded. Thus only the special output routine is called that shipout the remaining floating objects. Without the figure your document wouldn't even have more than one page. If you put something on the page, e.g. \null, then it is shipped out tog...

text entry on window
How can I put a bin text entry on a window in c++ with the windows api? Thanks, -r Robin <r@thevoid1.net> wrote: > How can I put a bin text entry on a window in c++ with the windows > api? The Windows API is not really something you want to be using directly. It's a nightmare. If you are using Visual Studio, learn to use the GUI editor. It's easy to learn. Robin <r...@thevoid1.net> wrote: > How can I put =A0a bin text entry on a window in c++ with the windows > api? Also, you might get more and better help if you ask in a news grou...

Multiline text in wxDC::DrawText()?
Hi all, I'm trying to generate an image containing multiline text. I'm using a wxMemoryDC to Draw the Text() on the bitmap. Does anybody by any chance have any experience in this? The strategy I have so far would involve running through the list of words, constructing the (appropriately sized) sentences by adding the words one by one and checking wether we're still within our limits (wxDC::GetTextExtent). This seems a bit rough, though, so if someone has a better solution/idea, I'd very much like to hear about it. Perhaps we could use a multiline wxTextCtrl...

Bibitem Full entry in text
I am trying to include two bibitems in my text. I am aware of how to cite using the \cite command but what I want is something like this: 1. Author One, Author Two. Title of the paper. Journal of the paper. Year 2. Another Author. Title of another paper.... So I want the bib entry as it appears in my bibliography list to appear in my text (within an enumeration). Is anyone aware of how to do this? Thanks for the help! On Jun 13, 3:07 am, sabkabaap <rahul.s.ku...@gmail.com> wrote: > I am trying to include two bibitems in my text. I am aware of how to > cite using the \cite command but what I want is something like this: > > 1. Author One, Author Two. Title of the paper. Journal of the paper. > Year > 2. Another Author. Title of another paper.... > > So I want the bib entry as it appears in my bibliography list to > appear in my text (within an enumeration). > > Is anyone aware of how to do this? > > Thanks for the help! If you use natbib, take a look at the bibentry package. Or use biblatex and \fullcite. Joseph Wright ...

bibliography entry inside the text.
Hi all, Sorry if this sort of question was already addressed but I found no such topic in here. Besides, I am not a LaTeX, TeX, BibTeX guru so please forgive me if it is straightforward. >From my understanding, the classic use of bibliography is to insert some \cite{} keys in the text and have the citation entries (author, year, journal, title, paper, whatever...) displayed in a separate part of the document (called the bibliography and introduced with the \bibliography{} command). This is how I use LaTeX and BibTeX. 1) Would it be possible, for a book, to have a bibliography page at the end of each chapter (and not at the end of the book)? 2) Is it possible to have a citation entry (obviously formatted as the bibliographystyle in use commands) inserted in the text (like an equation or a figure)? In other words, is there a command to tell LaTeX to issue a citation entry NOW (and not later, as part of a bibliography page). Something like \citation{author:year:key}. Cheers. Thomas "canisso" <lavergnetho@gmail.com> writes: > 1) Would it be possible, for a book, to have a bibliography page at the > end of each chapter (and not at the end of the book)? <URL:http://www.tex.ac.uk/cgi-bin/texfaq2html?label=chapbib> maybe also interesting: <URL:http://www.tex.ac.uk/cgi-bin/texfaq2html?label=multbib> > 2) Is it possible to have a citation entry (obviously formatted as the > bibliographystyle in use commands) inserted in the text (lik...

wrapping the text of tree entry
Hi All, I am using perl/tk to create a tree. I am using following code for this. $Errtxt_tab =$err_frame->NoteBook(); my $treeShow =$Errtxt_tab->add( "Page2", -label => 'Msg Tree', -state => 'normal', -raisecmd =>\&myTreeRaised ); $vialTree =$treeShow->Scrolled( 'Tree', selectmode =>'extended', -scrollbars => 'se', -separator => '/', -opencmd => \&populatechildren, -command => [ \&myTreeSelectedNormal, Ev('x'), Ev('y'), 1 ] ); Some ...

KeyPressFcn with multiline edit text
Hi, I'm trying to make a GUI that has an editable text box with multiple lines of text. I also want to be able to define and use a key press function for this text box. Everything works fine when I use a single-line edit text box, but when i set the 'max' field of the edit text box to 2 to allow multiple lines, the key press function is no longer evaluated on key presses. any ideas why this happens, and how to make the key press function evaluate on key presses in a multiline edit text box? Thanks in advance! danilo "Danilo Scepanovic" <danilos@mit.edu> wrote in...

multiline text boxes yes or no
Is it possible to create multiline text boxes in matlab if yes how, what setting do you need to give the edit box If no is there a work around cheers later jonas Have a look in the property browser help for the property max, min: if max-min>1 for a edit box it is a multiline edit box Titus "jonas" <msomers@mail.ie> wrote in message news:eef897f.-1@webx.raydaftYaTP... > Is it possible to create multiline text boxes in matlab if yes how, > what setting do you need to give the edit box > > If no is there a work around > > cheers > later > jonas ...

Equation numbering for multiline text
I write papers that involve both displayed formulas and displayed text, and I like to be able to number them all consecutively using an equation environment and \label{...}. The standard equation environment is fine so long as the length of a text entry does not exceed the width of the page. Formatting the text as a multiline equation is unsatisfactory, as the spacing between lines is too wide, and it also makes revision cumbersome. So what I'm looking for is something that will do this: <...some text in the body of the document...> (2) <a logical formula> <...some more text in the body of the document...> I would like to be able to have lengthy displayed propositions (3) formatted using mathtext where the lines spacing is the same as the body of the document. I've been using a custom environment instead of equation to deal with this, but for a variety of reasons (e.g., cross referencing is much easier) I'd like to be able to use an equation environment. I've searched extensively for a solution (e.g., embedding a single cell table) but to no avail. Any suggestions would be most welcome. Chris Menzel Chris Menzel wrote: > I write papers that involve both displayed formulas and displayed text, and I > like to be able to number them all consecutively using an equation environment > and \label{...}. The standard equation environment is fine so long as the > length of a text entry does not exceed the width of ...

CSV and multiline text fields
I'm writing a routine to export database tables to CSV format, and everything works fine except for the tricky issue of what to do in the case of text fields consisting of more than one line (e.g. addresses and suchlike). Some programs apparently handle this by just going ahead and dumping the raw field, newline characters and all, but I'm reluctant to do this; it's horribly messy and I've no confidence that all parsers will be able to put the broken CSV line back together. What I'd really like to do is change the line breaks to some normal but little used char...

suppressing numbering of entries in toc
I am putting together some pdf-files usinfg the pdfpages-package like this: \documentclass[a4paper,11pt,twoside,oldtoc]{article} \usepackage[final]{pdfpages} \makeatletter \renewcommand*\l@section {\@dottedtocline{1}{0em}{2.3em}} \makeatother \begin{document} \tableofcontents \cleardoublepage \includepdf[pagecommand={},addtotoc={1,section,1,title of first document,label1}, pages={1-9}]document1.pdf} \cleardoublepage \includepdf[pagecommand={},addtotoc={1,section,1,title of 2nd document,label2}, pages={1-7}]{document2.pdf} \cleardoublepage .. .. .. \end{document} This all works fine except that the table of contents starts with a number for each entry. I would like to suppress that number. Does anyone here now how to do that? sincerely, Hugo Coolens ...

Web resources about - multiline TOC entry - comp.text.tex

NestaDB for iPad on the iTunes App Store

Open Directory - Business: Telecommunications: Equipment: Business Systems
... companies that primarily repair & refurbish telecommunications equipment for other companies or individuals. This equipment includes multiline ...

Wikipedia:AutoWikiBrowser/User manual - Wikipedia, the free encyclopedia
/u int - /u loads a specified (either by user name or by its number in the list of profiles) user profile, and logs into it. Profile must exist, ...

Windows 7 - Wikipedia, the free encyclopedia
less than three years after the release of its predecessor, Windows Vista . Windows 7's server counterpart, Windows Server 2008 R2 , was released ...

NEC PBX & Telephone Systems For Small Business Sydney
The NEC Xen Axis/Master telephone system has been discontinued. We continue to provide spare parts and support for this system through our offices ...

Live market prices from All Stock Exchange. Stock market advice and financial information for active investors. Real-time recommendation leader. ...

ACE Group - A Leading Global Insurance Organization
... is one of the world's leading global commercial property and casualty insurance organizations The ACE Group is one of the world’s largest multiline ...

Upcoming Adobe Reader Update for iOS and Android
Engineering blog for Adobe Reader on mobile platforms

Aite Group Latest Research
... a Member BLOG Home > Press > Press Releases News from Aite Group, LLC Toggle Advanced Search Claims Management Systems for Top-Tier and Multiline ...

Price Drop: Goal ToDo
... categories support.• Calendar and List double Views, both with swap function • Customizable List swapping view• Quick Add Task Entry with multiline ...

Resources last updated: 3/11/2016 5:13:54 PM