f

#### longtable tablewidth?

Hi,

In longtable, is there a dimen or box from which I can calculate the
table width?
I've read through the source, but I didn't find it on my own.

I'm working on code within \LT@makecaption.

thanks,
--Tim Arnold


 0
a_jtim (62)
11/11/2006 7:43:57 PM
comp.text.tex 39029 articles. 3 followers.

4 Replies
1463 Views

Similar Articles

[PageSpeed] 29

Tim Arnold wrote:
> In longtable, is there a dimen or box from which I can calculate the
> table width?
> I've read through the source, but I didn't find it on my own.
>
> I'm working on code within \LT@makecaption.

I'm a complete LaTeX n00b, but I happen to be working with longtable at the
moment. Does the below help?

\documentclass{article}
\usepackage[latin1]{inputenc}
\usepackage[a4paper,landscape,
dvips]{geometry}  % dvps required for landscape printing via CUPS
\usepackage{longtable}

\begin{document}

text\hfill text
\par
text\hfill text

\setlength\LTleft{0pt}
\setlength\LTright{0pt}
\begin{longtable}{|p{.1\linewidth}|p{.5\linewidth}@{\extracolsep{\fill}}r|l|r|
}
\hline
Part & Description & Price & Quantity & Amount \\
\hline
\hline
A & B & C & Total & Z \\
\hline
\endlastfoot
A & B & C & D & E \\
1900 & Max Planck proposes quantum theory & X & Y & Z \\
2000 & Decoding of 90\% of human genome completed & X & Y & Z \\
\hline
\end{longtable}

\end{document}

There's also some stuff about LTcapwidth in the documentation - locate
longtable.dvi finds it on my system.

Since I'm not sure exactly what you're trying to do - I probably don't
understand what you want "within \LT@makecaption"  because I'm not well vesed
in the terminology of LaTeX - I can't comment further, but post the above
snippet in case you find it helpful.

Stroller.

 0
stroller (34)
11/11/2006 8:37:17 PM
"Tim Arnold" <a_jtim@bellsouth.net>  schrieb:

> Hi,
>
> In longtable, is there a dimen or box from which I can calculate the
> table width?

longtable is storing the information about the widths of the entries in
the aux-file, so in theory one could get the table width from there,
but I don't think that a command that calculates it has be written yet.

You could try to store the whole table in a box and then use the width
of the box.

--
Ulrike Fischer
e-mail: zus�tzlich meinen Vornamen vor dem @ einf�gen.
e-mail: add my first name between the news and the @.

 0
news9686 (1970)
11/12/2006 1:26:19 PM
Ulrike Fischer wrote:
> "Tim Arnold" <a_jtim@bellsouth.net>  schrieb:
> > In longtable, is there a dimen or box from which I can calculate the
> > table width?
>
> longtable is storing the information about the widths of the entries in
> the aux-file, so in theory one could get the table width from there,
> but I don't think that a command that calculates it has be written yet.
>
> You could try to store the whole table in a box and then use the width
> of the box.

Thanks, now I see entries in the aux like this, with the roman numeral
incremented for each longtable: this is for the second table in the
doc:

\gdef \LT@ii {\LT@entry
{5}{68.95642pt}\LT@entry
{1}{49.71115pt}\LT@entry
{5}{135.17511pt}\LT@entry
{1}{185.15732pt}}

It looks like the second argument of the LT@entry is the column width.
Other constructs in the longtable code are local I guess (I was trying
to use the width of \LT@save@row, for example).

What I'm trying to accomplish:
Table caption left-aligned (i.e. left-aligned with the textblock).
With a left-aligned longtable, that's no problem. However, with a
centered longtable, I must shift the caption, so I need the table width
to calculate that hskip. Since I'm working inside makecaption, I can't
box the table and check its width (at least I don't think I can).

I suppose my answer is to write a loop to sum those column widths. If
you have a better idea -- maybe a construct already present in the
longtable code that I don't see -- please let me know.

thanks,
--Tim


 0
a_jtim (62)
11/13/2006 2:22:57 PM
Ulrike Fischer <news@nililand.de> wrote:

> "Tim Arnold" <a_jtim@bellsouth.net>  schrieb:
>
> > In longtable, is there a dimen or box from which I can calculate the
> > table width?
>
> longtable is storing the information about the widths of the entries in
> the aux-file, so in theory one could get the table width from there,
> but I don't think that a command that calculates it has be written yet.

\documentclass{article}
\usepackage{longtable}

\makeatletter
\newlength\LongtableWidth
\newcommand*{\org@longtable}{}
\let\org@longtable\longtable
\def\longtable{%
\begingroup
\edef\x{LT@\romannumeral\c@LT@tables}%
\global\LongtableWidth\z@
\@ifundefined{\x}{%
% longtable width not available
}{%
\def\LT@entry##1##2{%
}%
\@nameuse{\x}%
}%
% debug output
\typeout{* \x: \the\LongtableWidth}%
\endgroup
\ifdim\LongtableWidth>\z@
\setlength{\LTcapwidth}{\LongtableWidth}%
\fi
\org@longtable
}
\makeatother

\begin{document}
\begin{longtable}{|ll|}
Hello&World\\
foo&bar\\
\caption{Caption for longtable\dotfill}
\end{longtable}
\end{document}

Yours sincerely
Heiko <oberdiek@uni-freiburg.de>

 0
oberdiek (2375)
11/13/2006 3:15:20 PM

Similar Artilces:

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. ------------------ =...

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]". > ...

Text from required text box to read-only text box
Hello, I am fairly new to JavaScript and its use in Acrobat Professional. My situation is this: I have a form with a text box field which is required for the user to enter his/her name. I would like the required text box to display the name in all caps. I also need the user's name to appear in a read-only text box later in the form, which I would like to have the first letter of the user's first, middle initial, and last names to be capitalized. I would also like to have all required fields on the form highlighted in yellow, but the highlighting not printed. Lastly, I would like the...

Converting pain text to TeX
Hi, I am trying to convert a plain text file to TeX format. For this I wrote a awk script to convert double quotes to the correct type in TeX, as in #!/usr/bin/awk -f # DQ2TQ : Converts double qoutes in plaint text file to TeX format # USAGE # dq2tq filename > newfilename BEGIN { count = 0 } /"/ { for (i=1; i<=NF; i++) {if (count % 2 == 0) {sub(/"/,"",$i);count++} else {sub(/"/,"''",$i);count++}} } { print } However this does not seem to work right. Given the following input : " " " " &...

Pages
I have a titel-textfield over a pic (headline) , text is black, background for text transparent. A second textfield should overlapp the first textline..... When i arrange the second field with the same settings like the first, the first text disappear... How can i do, that the second text overpapps the first, all over the pic. Any help appreciated! Thanks for replies! I am german and hope that the engish speaking people understand my problem! Soory! Gerd In article <611db9e2-b085-4fe5-907a-ca714b0c32dd@m74g2000hsh.googlegroups.com>, hurlebaus <gerd.schenk@freenet.de> wrote:...

text 2 text
I'm rather new to ustation and am having trouble finding replacements for all of my Acad lisp routines. One that I'd like to find changes a selected text string to read like the second selected text string. I realize this can all be done in the text editor but it's not all that quick. Does anyone know of a macro or mdl which can handle this task? Thanks in advance.---Calvin I don't know of any application that will do what you describe, but have you looked at Edit > Find/Replace text? You may also find Bentley's discussion groups of assistance. Over there you can meet other users of Bentley products, exchange ideas, and discuss a wide range of technical subjects. These groups are an excellent technical resource for all users of Bentley products and services. Hope to see you there! For more information take a peek at this page: http://selectservices.bentley.com/discussion/index.htm -- Best Regards, Inga Morozoff [Bentley] www.askinga.com "jgonzales24" <jgonzales24@cox.net> wrote in message news:xcLMb.13975$zs4.2376@fed1read01... > I'm rather new to ustation and am having trouble finding replacements for > all of my Acad lisp routines. One that I'd like to find changes a selected > text string to read like the second selected text string. I realize this > can all be done in the text editor but it's not all that quick. Does anyone > know of a macro or mdl whi... Surrounding text with text I was wondering if it was possible to surround a text body with text like so: +--------------+ |ABCDEFGHIJKLM | |H N| |A Main Body O| |L Text goes P| |B here Q| |-=+_ZYXWVUTSR | | | | | | | | | +--------------+ This seems far-fetched, but just curious. I suppose that I could just move stuff around by hand in the GIMP later on, but there's probably a {better,more {extensible,clean}} way of doing it from (La)TeX. -FreeSmith ptjm@interlog.com (Patrick TJ McPhee) wrote in message news:<bffbhe$per$1@news.eusc.inter... Encryption from text to text... I am looking for an encryption algorithm that converts plain texts into another form, one character to another...What are the nice and simple algorithms out there? Thanks. In article <418f03f8@news.starhub.net.sg>, Kelvin <thefatcat28@hotmail.com> wrote: > I am looking for an encryption algorithm that converts plain texts into > another > form, one character to another...What are the nice and simple algorithms out > there? > > Thanks. You can look on CPAN (<http://search.cpan.org>) for various Crypt:: modules. FYI: this newsgroup is defunct. Try comp.lang.perl.misc in the future. On Mon, 08 Nov 2004 13:35:46 +0800, Kelvin wrote: > I am looking for an encryption algorithm that converts plain texts into > another > form, one character to another...What are the nice and simple algorithms out > there? > > Thanks. I'm not sure how secure you need it to be, you could use the rot13 method. Used in newsgroups... It changes every letter to the letter 13 places ahead of it. The nice thing about it though is that you use the same method of to decode, (there's 26 letters). Not secure, but nice easy and simple.mine not sure how sercure you need it to be, you could use the rot13 method. Used in newsgroups... It changes every letter to the letter 13 places ahead of it. The nice thing about it though is that you use the same method of to decoed, (theres 26 letters). Not sercure, but nice easy and simple. -- Andre... Type-written text to TeX? Slightly OT, but I have several hundred pages of typewritten material already scanned in. (I just have a PDF file with one image per page.) There is a small amount of maths in it, but not much. Can anyone advise me of a good OCR program to use? I'd prefer a Linux program, but am not religious. I tried gocr, which was useless, and am presently trying clara, which looks as though it might work, although it seems to require several degrees in Computer Science to understand and use. Also, is there a program to abstract the images from the PDF file? I've written a little Java program to ... Why does$TEXT() not return text?
I am looking at a file I have created named TMGUSRI2.m This is with GT.M 6.2-002A Here is a stat of the .m file and the .o file kdt0p@poweredge:/opt/worldvista/EHR/p$stat TMGUSRI2.m File: `TMGUSRI2.m' Size: 19171 Blocks: 40 IO Block: 4096 regular file Device: 821h/2081d Inode: 705008 Links: 1 Access: (0744/-rwxr--r--) Uid: ( 1000/ kdt0p) Gid: ( 1000/ kdt0p) Access: 2015-08-10 20:50:51.000000000 -0400 Modify: 2015-06-23 20:23:12.000000000 -0400 Change: 2015-06-23 20:23:11.000000000 -0400 Birth: - kdt0p@poweredge:/opt/worldvista/EH... TeX-Interpreter for static text(GUI)! Hello everybody! I've got the problem that when I type LaTeX-orders like V_{DS} or$V_{DS} $a.s.o. as strings in static text, this orders are not converted. How can I manage, that my LaTeX-orders are interpreted! Thank you very much! Thomas ... change text color with TeX support? All Consider the string involving greek letters to appear in a plot title made with the command: SetaEL='\fontsize{14}{\eta}\fontsize{10}EL\fontsize{10}=' when used in a title argument, the string SetaEL plots like: etaEL= except that eta will be the actual greek letter of course. This works! BUT THE COLOR ID DEFAULT IS BLACK. THE QUESTION: How to change my SetaEL command useing TeX syntax, so it is say red? Thanks in advance....tony Could you be a little more specific? If you want the whole title to be in red (or any other color), I don't think you need to... Convert TeX to normal text (stripping macros) Hi all, Does anyone know a good way to strip a TeX file from its macros in order to run grammar checking from LangauageTool on it? Please also see this bug report for Language Tool: https://sourceforge.net/tracker/index.php?func=detail&aid=2880449&group_id=110216&atid=655717 A Java implementation would be preferred since Language Tool is in Java so it runs platform independently. Thanks, Pander On Mon, 26 Sep 2011 03:39:01 -0700 (PDT), Pander wrote: > Does anyone know a good way to strip a TeX file from its macros I suggest you use one of the tools that convert from dvi/postscript/pdf to text: dvi2tty pstotext pdftotext That is, analyze the output, not the input to (La)TeX. Bob T. ... HELP: Need text output for a .tex document I have a simple document here (actually a Resume) for which I need to get a TEXT equivalent of the output (rather than the normal dvi -> Postscript). It is of type article and doesnt do anything exciting, just uses things like center and the list environment. Im sure that this is possible, its just been SO long since I had to do anything like this. Please, someone, how do I do this. -- Reg.Clemens reg@dwf.com Reg Clemens wrote: > I have a simple document here (actually a Resume) for which I ... using TeX characters in a GUI text box I am trying to use a TeX character such as the Greek letter mu in a GUI textbox, but I cannot get this to work. If I try to set the 'string' property for the GUI object using '\mu' this just displays '\mu'. Is there a way I can use the 'text' command as you would for a figure to put Greek letters into GUI objects? "Sean Larkin" <slarkin71278@sbcglobal.net> wrote in message <gk37he$t7\$1@fred.mathworks.com>... > Is there a way I can put Greek letters into GUI objects? I don't know for sure, but you might be able to do this using ...

free TeX-aware text editor for Windows
Syn http://syn.sourceforge.net/ Hadn't seen this noted here previously and it's not listed at http://home.nexgo.de/itsfd/texwin.htm (just sent them a note on that). Doesn't support handwriting recognition on my pen slate (still using WinTeXShell for that), but otherwise very serviceable. William -- William Adams http://members.aol.com/willadams Sphinx of black quartz, judge my vow. willadams@aol.com (William F. Adams) wrote in message news:<20040214144824.18962.00002250@mb-m28.aol.com>... > Syn > > http://syn.sourceforge.net/ > > Hadn't seen this n...

Reading Text File, Text Scrolling and erase line from a text file
Hi , How can I Reading Text File, then Text Scrolling by means of keys "page UP" "page Down" and erase a specific line from a text file , when press "F2" key? Best Regards, Lidia from Poland -- ========================================= Pozdrawiam Lidiaa Lidiaa schrieb: > Hi , > > How can I Reading Text File, then Text Scrolling by means of > keys "page UP" "page Down" and erase a specific line from a text > file , when press "F2" key? > > ...

color Text In Plot Titles witj TeX commands ?
All This is a slight revision of a previous question: Consider the string involving greek letters to appear in a plot title made with the command: St='{\eta}EH='; when used in a title argument, the string SetaEL plots like: etaEL= except that eta will be the actual greek letter of course. This works! BUT THE COLOR ID DEFAULT IS BLACK. ------------------------------------------------- THE QUESTION: How to change my St='{\eta}EH=' command USING TeX syntax, so it is say red? ( I do not want to use handles ) Thanks in advance....tony One response suggested: ...

Plain TeX macros for text-flowing-around-figures
Are there any public domain macros to do the title task? More specifically: texttexttexttexttexttexttexttexttexttexttext texttexttexttexttexttexttexttexttexttexttext texttexttexttexttexttexttexttexttexttexttext texttexttexttexttexttexttexttexttexttexttext texttexttexttext ----------------------- texttexttexttext | | texttexttexttext | Figure box | texttexttexttext | inserted by | texttexttexttext | \BoxedEPSF{ ...} | texttexttexttext | | texttexttexttext ----------------------- texttexttexttext ...

(La)TeX math -> fixed width text
Hello ctt, I was playing around with Unicode and I made a HTML page with some mathematical expressions using fixed-width characters: http://wiki.auf-trag.de/textmath.html Is there a program that would make something like that automatically from LaTeX math code? (I know it's ugly, I'm just asking out of curiosity) Regards, Stephan Stephan Walter wrote: > Hello ctt, > > I was playing around with Unicode and I made a HTML page with some > mathematical expressions using fixed-width characters: > > http://wiki.auf-trag.de/textmath.html > > Is there a prog...

Fit text in a Text Box
Hello friends, I have a curious doubt, imagine I have a text box, and inside, a text that I dont know the lenght. Depending on the box's size and letter's size, I can fit the box. But the box's size is fixed, so I just can modify the size's letter. How can I be right with letter's size, if I dont know the lenght of string (text)? Is there any simple function for this case? Thanks in advance, greetings. Pedro Moreno On 10-08-31 04:25 PM, pedro moreno wrote: > I have a curious doubt, imagine I have a text box, and inside, a text > that I dont know the lenght. Depe...

Text in images to a text file
Hello, Does anyone know of any software for Linux which converts text in images to a text file. I have loads of paper documents that I intend to scan. The contents of these documents needs to eventually end up on a web site but as text. Darren <bobblebob@gmail.com> wrote in message news:1151612491.407262.124690@75g2000cwc.googlegroups.com > Does anyone know of any software for Linux which converts text in > images to a text file. I have loads of paper documents that I intend > to scan. The contents of these documents needs to eventually end up > on a web site but as text....

rich text in text field
I am using GUIDE for my UI work. (MATLAB 2009b) I would like to display some rich-text (font size change, bold, underline etc) inside a panel. Can I put some rich-text, using html tags, in a text field? For example: <html><b> this is bold </b></html> I know you can do it in table headers. Thank you. ...

Web resources about - longtable tablewidth? - comp.text.tex

aircraft production - production conference - flight production - 1955 - 0152 - Flight Archive
152 FLIGHT PRODUCTION CONFERENCE . . . G. W. RICHARDS, replying: forging pressures might, at an indeter-minate date, be reduced to about 12-14 ...

Resources last updated: 3/11/2016 10:45:59 AM