f

Converting \pageref{} numbers to numbers in text

I have a LaTeX document that ends:

\label{lastpage}\end{document}

in order that I may set up such as:

This question paper consists of \pageref{lastpage} pages.

If the last page is, say, page 2, how can I get:

This question paper consists of two pages.

This question paper consists of 2 pages.

?

TIA


 0
3/28/2007 1:38:11 PM
comp.text.tex 39029 articles. 3 followers.

1 Replies
574 Views

Similar Articles

[PageSpeed] 28

"Michael Rolfe" <mumble@ANTISPAMmaths.uct.ac.za> wrote:

> I have a LaTeX document that ends:
>
>     \label{lastpage}\end{document}

It can happen, that this label never goes into the .aux file.

http://www.tex.ac.uk/cgi-bin/texfaq2html?label=nofm
Page numbering <n> of <m>''

Other packages: zref, totpages, count1to, ...

> in order that I may set up such as:
>
>     This question paper consists of \pageref{lastpage} pages.
>
> If the last page is, say, page 2, how can I get:
>
>     This question paper consists of two pages.
>
>
>     This question paper consists of 2 pages.

\usepackage{zref-totpages}
\newcommand*{\NumAsName}[1]{%
\ifcase#1%
zero%
\or one%
\or two%
\or three%
\or four%
\else five or more%
\fi
}
(Perhaps a package exists for this purpose.)

This question paper consists of \NumAsName{\ztotpages} pages.

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

 0
oberdiek (2375)
3/28/2007 3:29:57 PM

Similar Artilces:

Text file with numbers and text, want to just read numbers
I have a series of text files I want to read. The files begin with header information. The number of rows of header information changes, there is no commenting symbol such as %%, and the header information sometimes has numbers such as a date or a time. I want to read in the number and only the numbers. This is an example of a file: (Again, the header info changes, different # of lines, different text) Vector Signal [Measurement4]: 09/27/2006, 09:05:24 Units: EU Time Real 0 0.053732 9.6e-005 0.11968 0.000192 0.085483 0.000288 ...

text field only for text
Hi I would like some help about the following : I have a text field and I don't want it contains any numbers. How can I limit this situation ? So far, I couldn't find literature exacly about this here in the newsgroup. TIA Paulo "Paulo Rodrigues" <amigo.alf@netvisao.pt> wrote in message news:<newscache$kgmtmh$bb1\$1@newsfront4.netvisao.pt>... > Hi > > I would like some help about the following : > > I have a text field and I don't want it contains any numbers. How can I > limit > this situation ? > > So far, I couldn't...

convert text to number
I have a column of string values characterized as either 'wet' or 'dry'. What I would like to do is convert the 'wet' strings to a 1 and the 'dry' to zero. My code is : n=length(Wet_Dry); wetdry=zeros(n,1);   %initialize wetdry field for i=1:n     if Wet_Dry(i)=='Wet'         wetdry(i)=1;     else wetdry(i)=2;     end end  I'm getting an error with the equal sign and it is not clear what I am doing wrong. Any help would be much apprecia...

Converting Number to Text
Hi, I have two tables. One of them has a text field, and the other has a numeric (integer) field that serves a similar purpose. I want to connect (UNION actually) the two tables, and store the text from the first table in the same field as the number from the other. For example: SELECT TextID AS ID FROM W1 UNION SELECT NumericID AS ID FROM W2 The above query results in a type mismatch error due to trying to store an Int in a text field. I have tried the SQL CONVERT function, but the docs seem to indicate that it is just for Dates. In any case, it hasn't worked for me. An...

Converting numbers to text
Has been discussed in this group many times, and the best solution seems to be the one from Terje Mathisen, which later made its way, uncredited, into the AMD manuals. Now, I'm using Virtual Pascal, and Terje's code <https://groups.google.com/d/msg/comp.lang.asm.x86/rBzgsQdkq8c/JCv8EkPgCS4J> is about four times as fast as the code in the VP RTL, (OK, probably somewhat less, as that divide-by-10 cater for Pascal formatting code does a bit more), and with (currently) 225,002 calls to the RTL "_StrInt" routine, it would be nice to shave off a few more, there we ...

Converting a number to Text
Hi, I'm having a tough time with my SQL statement when I try to join two table. One table has a field named doc_no and is numeric while the other table has a field named record_key and is text. When i write "doc_no = record_key" and run the report, I get an error message about data types not being equal. How can I force the doc_no to be casted as text so I can join the tables? Please Help. Thank You, Chaim Bochner chaboch wrote: > Hi, > > I'm having a tough time with my SQL statement when I try to join two > table. One table has a field named doc_no and is numeric while the > other table has a field named record_key and is text. When i write > "doc_no = record_key" and run the report, I get an error message about > data types not being equal. > > How can I force the doc_no to be casted as text so I can join the > tables? > > Please Help. Thank You, > > Chaim Bochner You are stuffed! text is a dumb blob type and there isn't much you can do with it. Not even cast it. If you can make record_key a (say) lvarchar, or even a char (I am guessing your text is not very long, if all you expect to do with it is to compare it with integers), then you can join the two tables with no other requirement. A word of warning: comparing different data types (and in particular, casting every single row to an integer) may be a rather inefficient business -- Cia...

Converting Number To Text
Hi Is it possible to have Filemaker convert a number to a text string, for example: 54 to fifty four TIA Ben Not without a lengthy calculation. There is a Custom Function at http://www.briandunning.com/cf/19 that will work as a straight field calculation. As is, it is money-oriented, converting the number 123.15 to "One Hundred Twenty Three Dollars and Fifteen Cents." If you don't want dollars and cents, there are a couple of Case statements to remove, and probably change the "and" to "point"? Matt Ben wrote: > Hi > > Is it possible to h...

problem with importing text with number and text
i am trying to import a csv file (~49000 rows x 52 cols) with numbers text and characters in it and not getting through. xlsread works fine with all my data except the first column of data which is a time stamp. it converts the time stamps into a constant value through the entire column. To add to the problem, when opened as a text file, every row of the file starts with a comma. I got very close with textscan/textread with all the data coming in but all the rows are transposed into one column one above the other ( imagine 49000 rows 52 cells long transposed one above the other in one column c...

Extract numbers from table containing text and numbers
Hello, I am trying to extract 2 columns from a file with 425 header lines and then the following: Q (upper-edge --0.1250E-03 AmP )= 0.98880E-02+- 0.28300E-03 units/alpha/round Q (upper-edge --0.2500E-03 AmP )= 0.19648E-01+- 0.39412E-03 units/alpha/round Q (upper-edge --0.3750E-03 AmP )= 0.18384E-01+- 0.38318E-03 units/alpha/round Q (upper-edge --0.5000E-03 AmP )= 0.17536E-01+- 0.37040E-03 units/alpha/round Q (upper-edge --0.6250E-03 AmP )= 0.16064E-01+- 0.36000E-03 units/alpha/round Q (upper-edge --0.7500E-03 AmP )= 0.15888E-01+- 0.35954E-03 units/alpha/round Here is my attempt, using textscan, and the output I am getting: >> clear >> clc >> fid1=fopen('rqm7yxk1.out','rt'); >> fmt1=[' %s' '%s' '%s%s%f' '%s' '%s' ' %f%s%s' ' %f' '%s']; >> set_m=textscan(fid1, fmt1,'delimiter',' ','headerlines',425,'CollectOutput',true); %skip 425 header lines and then read in the data >> fclose(fid1); >> set_m set_m = Columns 1 through 4 {1x4 cell} [0x1 double] {0x1 cell} [0x1 double] Columns 5 through 7 {0x2 cell} [0x1 double] {0x1 cell} >> set_m{1} ans = '' 'E' '(upper-edge' '--0.1250E-03' Question: I need the 3 columns that contain the numbers. Only the first 4 colu...

converting a text field to number
I have a table with over a million rows and one of the fields contains amounts of money in text format. What is the most efficient way of converting this field to a number format that I can sum on? Regards, Ciar�n Hi Ciaran, Before converting the type of the col, make sure that there are no invalid values in that column. You can pull them out by SELECT colName FROM tabName WHERE IsNumeric(colName) = 0 Alter your column type by ALTER TABLE tableName ALTER COLUMN colName NUMERIC *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...g...

Union of Text Converting to Numbers
Does anyone know why the query below would return numbers? I'm attempting to produce a report that shows in *one* column the names that appear in multiple columns in a single table. Table Name: project col1 = project_id col2 = manager col3 = participant1 col4 = participant 2 col5 = participant 3 Query: SELECT [project].[manager] FROM [project]; UNION SELECT [project].[participant1] FROM [project]; UNION SELECT [project].[participant2] FROM [project]; UNION SELECT [project].[participant3] FROM [project]; Instead of a single column of names, I'm receiving numbers. What's ...

reading in file with text and numbers to be able to access numbers
Hi. I am trying to read in a file that was created by another application. The first two lines of this file are composed of text that I don't need. Following are 100 lines of numbers that I do need. Any idea on how to load this file without making an overly specific script? The number of rows of numbers the other application generates varies. Thank you for any tips! Look at the TEXTREAD function. One of the options is 'headerlines', to tell it the number of lines to skip at the beginning of the file. So you would do something like this: n = textread('myfile.txt','...

Converting text strings in numbers (count)
Hi, Here it is the problem: I have a text field with some categories (let us say apples oranges and lemons) all those three categories are repeated many times in the DB (Filemaker 8.5 adv. Win XP). Is there a way to create another variable that report how many records are in the "apples" category, how many in the "oranges" category and so on. Put in other words, is there a way to store the frequency of each category in another field, as number ? I think should be easily done but a quick search through the functions could not help me to figure it out. Thank you always Di...

Need help in converting number to text
i have a colomn of vectors number consist of 1,2,3 or 4. if lets say i want to convert from number to characters How shld be source code be? i am new pls help me. is there anything wrong ? 1="typeA", 2="typeB,3="typeC",4="typeD" [C,index] = max(sim_output16,[],2); if index==1 T ='D-line touching shell'; if index==2 T = 'centering out'; if index==3 T = 'top noise ranking'; if index==4 T = 'accepted'; end I am not sure I understand you fully but you could mean one of two possibilities: 1. convert an number to string: help spr...

numbers to text ?
Hi I am new to programming but wonderd if anyone knew a way of tranlating this code (which im sure is just text) back to text. Its from a VB application and this is from a DAT file within it. 044034046039039051042116 044034046049046060048 044034046049046060048 008000075050035055052104115126100018040027015027018011082013078018081016117041027003010025079020008065085030 Many Thanks in advance. Depends on the encoding. For example if you knew these are consecutive ASCII codes you could use something like: Dim str As String, substr As String, c As String, result As String Dim i As Integer, va...

Number to Text?
Is there a way to convert a number ("4") to text ("four") in LaTeX? -- % Randy Yates % "Bird, on the wing, %% Fuquay-Varina, NC % goes floating by %%% 919-577-9882 % but there's a teardrop in his eye..." %%%% <yates@ieee.org> % 'One Summer Dream', *Face The Music*, ELO http://www.digitalsignallabs.com On Sep 25, 8:09=A0pm, Randy Yates <ya...@ieee.org> wrote: > Is there a way to convert a number ("4") to text ("four") in LaTeX? This only works for digits, but how about some variant of the following? \def\digittonum#1{\ifcase#1 zero\or one\or two\or three\or four\or five \or six\or seven\or eight\or nine\else#1\fi} If it isn't a single digit, it just displays the argument so \digittonum5 -> five while \digittonum{55} -> 55. -- Steve Checkoway Randy Yates <yates@ieee.org> wrote: > Is there a way to convert a number ("4") to text ("four") in LaTeX? Yes, package "numname". There is also an Italian oriented package, itnumpar :) Ciao Enrico Randy Yates wrote: > Is there a way to convert a number ("4") to text ("four") in LaTeX? The fmtcount package can do that. Regards Nicola Talbot -- Home: http://theoval.cmp.uea.ac.uk/~nlct/ LaTeX Related Information: http://theoval.cmp.uea.ac.uk/~nlct/latex/ Nicola Talbot <n.talbot@uea.ac.uk> writes: > Randy Yates wrot...

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

numbers to text
How do you change a list of numbers say,: [1,6] will give me a result of [s,i,x,t,e,e,n] [1,3] will give me: [t,h,i,r,t,e,e,n] [1,9,0,0] will result: [o,n,e,t,h,o,u,s,d,n,i,n,e,h,u,n,d,r,e,d] On Mon, 10 Nov 2008 06:39:54 -0800 (PST), equinox <aditya15417@gmail.com> wrote: >How do you change a list of numbers say,: > >[1,6] > >will give me a result of > >[s,i,x,t,e,e,n] > >[1,3] > >will give me: > >[t,h,i,r,t,e,e,n] > >[1,9,0,0] > >will result: > >[o,n,e,t,h,o,u,s,d,n,i,n,e,h,u,n,d,r,e,d] You change by writing program in...

number to text
hi all ! i have a number field in a table which i need to do some calculations. however after i have calculated it i need to convert it to a text field. how can i do this ?? thanks brino > i have a number field in a table which i need to do some calculations. > however after i have calculated it i need to convert it to a text > field. > how can i do this ?? Take a look at this page: http://www.mvps.org/access/modules/mdl0001.htm -- PBsoft di Gabriele Bertolucci www.pbsoft.it skype: pbsoftsolution ...

How to convert Number Field to Text Field
I'm newbie in Filemaker, currently I'm using Filemaker pro v 6.01 on Windows XP. I have a small problem. I'm trying to make a solution for Hotel Rate. I want to change the USD. 0.00 to "Included" for breakfast rate which already included in the room rate. Anybody can help, will be much appreciated. Thanks. "Adhie" <priyadi77@yahoo.com> wrote in message news:ba1b5c27.0404080446.21e110b2@posting.google.com... > I'm newbie in Filemaker, currently I'm using Filemaker pro v 6.01 on > Windows XP. I have a small problem. I'm trying to make a ...

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

Loss of Data Converting Text to Number
Hi everyone- I'm trying to convert social security numbers from a text data type to a number data type, but I lose data on some of the social security numbers, especially SS#s with 0's in them. For example: 123-45-6789 might become 45-6789. This happens in about 20% of the SS#s. I tried opening the table then switching text to number. I also tried creating a new table, changing the field from text to number, then running an append query, but I still lose data and get incomplete SS#s. Can anybody give me any suggestions. I'm not much of a VBA coder yet. Thanks a bunch! Megan O...

Number of Numbers
Hi! i need help... there is a function that would let me now the number of numbers in a string? Thanks Hi! i need help... is there a function that would let me Know the number of numbers in a string? Thanks On Sep 10, 1:22=A0pm, misschupito <cristinap...@gmail.com> wrote: > =A0Hi! i need help... is there a function that would let me Know the > number of numbers in a string? > > =A0 Thanks Not sure if tehre is an easier way but this would work data test; char=3D'abdj 34 fffk 45fg'; num_of_digits=3Dlength(compress (char,'0''1''2''3''4''5''6''7''8''9','k'); run; ...

Re: Converting Text to Number Enterprise Guide
Hi, string = PUT(number,format.); number = INPUT(string,format.); In EG when you go to Edit Filter, on the Expression Builder form on the Functions tab either look under the "All Functions" Category or under the "Special" Category. Hope this is helpful. Mark Terjeson Senior Programmer Analyst, IM&R Russell Investment Group Russell Global Leaders in Multi-Manager Investing -----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Virtual Athlete Sent: Monday, December 04, 2006 8:31 AM To: SAS-L@LISTSERV.UGA.EDU Subj...

Web resources about - Converting \pageref{} numbers to numbers in text - comp.text.tex

PastBook’s Filepicker.io Integration Eases Process Of Converting Facebook Content To Books
PastBook , one of several companies that allow Facebook users to publish their content on the social network in actual books , announced the ...

Facebook No Longer Converting Groups Into Pages

Zwartz Laminating-Converting B.V. on the App Store on iTunes
Get Zwartz Laminating-Converting B.V. on the App Store. See screenshots and ratings, and read customer reviews.

"Occupier" Thanked Former Soviet Citizen for "Converting" Him to Capitalism, Pro-Israel, Pro-USA - YouTube ...
May Day Demonstration on Union Square in New York City Zionism & Birth of Modern Israel in 1948: Former Soviet Citizen Pays Tribute to Ben-Gurion ...

Converting dry air to water: solution to Broken Hill's water crisis gains support
A one-man crusade by a Broken Hill resident to solve the historic town's water crisis by introducing air to water converters is gaining support. ...

Click go fears of converting print files
Is there a way to convert a print queue item to a .RTF or .PDF file? I like to save or email them. - The Sydney Morning Herald

Sudanese woman ordered to hang under sharia law for converting to Christianity gives birth
Khartoum, Sudan: A Christian Sudanese woman sentenced to hang for apostasy has given birth in jail, a Western diplomat said on Tuesday.

Imams warn against radicalism to Aboriginal inmates converting to Islam
The prison system has enlisted the help of ASIO to crack down on radicalisation behind bars amid revelations that Aboriginals are converting ...

Converting the world's companies one by one - The Science Show - ABC Radio National (Australian Broadcasting ...
Image: Trucks carrying logs make their way up a road in Jambi, Indonesia. A vast area of the Sumatran forest, and orangutan habitat, is being ...

Resources last updated: 3/11/2016 9:38:55 AM