SlideShare ist ein Scribd-Unternehmen logo
1 von 13
Downloaden Sie, um offline zu lesen
Indian TEX Users Group

URL: http://www.river-valley.com/tug

Creating Float . . .
Figure Placement
Customizing . . .

9

Using Graphics . . .
Rotating and . . .

Title Page

A
On-line Tutorial on LTEX
The Tutorial Team
Indian TEX Users Group, SJP Buildings, Cotton Hills
Trivandrum 695014, INDIA
2000
Prof. (Dr.) K. S. S. Nambooripad, Director, Center for Mathematical Sciences, Trivandrum, (Editor); Dr. E. Krishnan,
Reader in Mathematics, University College, Trivandrum; Mohit Agarwal, Department of Aerospace Engineering,
Indian Institute of Science, Bangalore; T. Rishi, Focal Image (India) Pvt. Ltd., Trivandrum; L. A. Ajith, Focal Image
(India) Pvt. Ltd., Trivandrum; A. M. Shan, Focal Image (India) Pvt. Ltd., Trivandrum; C. V. Radhakrishnan, River
Valley Technologies, Software Technology Park, Trivandrum constitute the Tutorial team
A
A
This document is generated from LTEX sources compiled with pdfLTEX v. 14e in an
INTEL Pentium III 700 MHz system running Linux kernel version 2.2.14-12. The
packages used are hyperref.sty and pdfscreen.sty

c 2000, Indian TEX Users Group. This document may be distributed under the terms of the
A
A
LTEX Project Public License, as described in lppl.txt in the base LTEX distribution, either
version 1.0 or, at your option, any later version

Page 1 of 13

Go Back

Full Screen

Close

Quit
9 The Figure Environment
Creating Float . . .
Figure Placement
Customizing . . .

Figures are really problematical to present in a document because they never split between
pages. These leads to bad page breaks which leave blank space at the bottom of pages. For the
fine-tuning of that document, typesetter has to adjust the page breaks manually.
A
But LTEX provides floating figures which automatically move to suitable locations. So the
A
positioning of figures is the duty of LTEX.

9.1.

Using Graphics . . .

Title Page

Rotating and . . .

Creating Floating Figures
Floating figures are created by putting commands in a figure environment. The contents of the
figure environment always remains in one chunk, floating to produce good page breaks. The
following commands put the graphic from figure.eps inside a floating figure

Page 2 of 13

Go Back

begin{figure}
centering
includegraphics{figure.eps}
caption{This is an inserted EPS graphic}
label{fig1}
end{figure}

Full Screen

Close

Quit
Features
The optional label command, can be used with the ref,
and pageref commands to reference the caption. The
label command must be placed immediately after the

¤¥ ¤¢ 
¦ £ ¡

caption

Customizing . . .
¤¨ ¤!¨ "
% $ #

¡ $ £ ¤¤¨ 
) (

Using Graphics . . .
Rotating and . . .

 $ # (
¤ ¤!¤¨ ¦' $ 

If the figure environment contains multiple caption commands, it produces multiple figures which float together.
This is useful in constructing side-by-side graphics or
complex arrangements.

Creating Float . . .
Figure Placement

  
!¨ ¤

If the figure environment contains no caption commands, it produces an unnumbered floating figure.

  ¨
¨  ¤ £ ©§

9.1.1.

Figure 1. This is an inserted EPS
graphic

Title Page

A list of figures is generated by the listoffigures command.
By default, the caption text is used as the caption and also in the list of figures. The caption
has an optional argument which specifies the list-of-figure entry. For example,
caption[List Text]{Caption Text}

causes “Caption Text” to appear in the caption, but “List Text” to appear in the list of
figures. This is useful when using long, descriptive captions.
The figure environment can only be used in outer paragraph mode, preventing it from
being used inside any box (such as parbox or minipage).
Figure environments inside the paragraphs are not processed until the end of the paragraph.
For example:

Page 3 of 13

Go Back

Full Screen

Close

Quit
............. text text text text text text
begin{figure}
.........
end{figure}
............. text text text text text text

Creating Float . . .
Figure Placement
Customizing . . .
Using Graphics . . .
Rotating and . . .

9.2.

Figure Placement
Title Page

The figure environment has an optional argument which allows users to specify possible figure
locations. The optional argument can contain any combination of the letters: h, t, b, p.
h Place the figure in the text where the figure command is located. This option
cannot be executed if there is not enough room remaining on the page.
t Place the figure at the top of the page.
b Place the figure at the bottom of a page.

Page 4 of 13

p Place the figure on a page containing only floats.
Go Back

If no optional arguments are given, the placement options default to [tbp].
Full Screen
A
When we input a float, LTEX will read that float and hold it until it can place that at a better
A
location. Unprocessed floats are those which are read by LTEX but not yet placed on the page.
A
Though the float-placing is done by LTEX, sometimes user has to do something to process
unprocessed floats. Following commands will do that job:

Close

Quit
clearpage

This command places unprocessed floats and starts a new page.

FloatBarrier

This command causes all unprocessed floats to be processed. This
is provided by the placeins package. It does not start a new page,
unlike clearpage.

Creating Float . . .
Figure Placement
Customizing . . .

Since it is often desirable to keep floats in the section in which they were issued, the section
option
usepackage[section]{placeins}

Using Graphics . . .
Rotating and . . .

Title Page

redefines the section command, inserting a FloatBarrier command before each section.
Note that this option is very strict. This option does not allow a float from the old section to
appear at the bottom of the page, since that is after the start of a new section.
The below option
Page 5 of 13

usepackage[below]{placeins}
Go Back

is a less-restrictive version of the section option. It allows floats to be placed after the beginning
of a new section, provided that some of the old section appears on the page.

afterpage/clearpage

The afterpage package provides the afterpage command which
executes a command at the next naturally-ocurring page break.

Full Screen

Close

Quit
Therefore, using afterpage{clearpage} causes all unprocessed floats to be cleared at the
next page break. afterpage{clearpage} is especially useful when producing small floatpage
figures.

9.3.

Customizing Float Placement

Creating Float . . .
Figure Placement
A
LT

The following style parameters are used by EX to prevent awkward-looking pages which
contain too many floats or badly-placed floats.

Customizing . . .
Using Graphics . . .
Rotating and . . .

9.3.1.

Float Placement Counters
Title Page

topnumber

The maximum number of floats allowed at the top of a text page
(the default is 2)

bottomnumber

The maximum number of floats allowed at the bottom of a text
page (the default is 1)

totalnumber

The maximum number of floats allowed on any one text page (the
default is 3)

Page 6 of 13

Go Back

Full Screen
A
These counters prevent LTEX from placing too many floats on a text page. These counters do
A
not affect float pages. Specifying a ! in the float placement options causes LTEX to ignore these
parameters. The values of these counters are set with the setcounter command. For example,

Close

Quit
setcounter{totalnumber}{2}

prevents more than two floats from being placed on any text page.

Creating Float . . .
Figure Placement
Customizing . . .

9.3.2.

Figure Fractions

Using Graphics . . .
Rotating and . . .

The commands in the below table control what fraction of a page can be covered by floats
(where “fraction” refers to the height of the floats divided by textheight). The first three
commands pertain only to text pages, while the last command pertains only to float pages.
A
Specifying a ! in the float placement options causes LTEX to ignore the first three parameters,
but floatpagefraction is always used. The value of these fractions are set by renewcommand.
For example,

Title Page

renewcommand{textfraction}{0.3}

Page 7 of 13

textfraction

The minimum fraction of a text page which must be occupied by
text. The default is 0.2, which prevents floats from covering more
than 80% of a text page.

Go Back

Full Screen

Close

Quit
topfraction

The maximum fraction of a text page which can be occupied by
floats at the top of the page. The default is 0.7, which prevents any
float whose height is greater than 70% of textheight from being
placed at the top of a page.

Creating Float . . .
Figure Placement
Customizing . . .

bottomfraction

floatpagefraction

The maximum fraction of a text page which can be occupied by
floats at the bottom of the page. The default is 0.3, which prevents
any float whose height is greater than 40% of textheight from
being placed at the bottom of a text page.

Using Graphics . . .
Rotating and . . .

Title Page

The minimum fraction of a float page that must be occupied by
floats. Thus the fraction of blank space on a float page cannot be
more than 1-floatpagefraction. The default is 0.5.

Page 8 of 13

9.4.

A
Using Graphics in LTEX

A
A
This section shows the methods to use graphics in LTEX documents. While LTEX can import
virtually any graphics format, Encapsulated PostScript (EPS) is the easiest graphics format to
A
import into LTEX. The ‘eps’ files are inserted into the file using command includegraphics{file.eps}

Go Back

Full Screen

Close

Quit
9.4.1.

The includegraphics Command

includegraphics[options]{filename}
Creating Float . . .

Following are the options available in includegraphics command:

Figure Placement
Customizing . . .

width

The width of the graphics (in any of the accepted TEX units).

height

The height of the graphics (in any of the accepted TEX units).

totalheight

The totalheight of the graphics (in any of the accepted TEX units).

scale

Scale factor for the graphic. Specifying scale=2 makes the graphic twice
as large as its natural size.

angle

Using Graphics . . .

Specifies the angle of rotation, in degrees, with a counter-clockwise
(anti-clockwise) rotation being positive.

Rotating and . . .

Title Page

Page 9 of 13

Go Back

Full Screen

Close

Quit
includegraphics[width=.5textwidth]{filename}
includegraphics[height=2in]{filename}
includegraphics[totalheight=2in]{filename}
includegraphics[scale=2]{filename}
Creating Float . . .
Figure Placement
Customizing . . .
Using Graphics . . .
Rotating and . . .

Title Page

includegraphics[width=1in]{duck}

includegraphics[height=1.5in]{duck}

Page 10 of 13

Go Back

Full Screen

includegraphics[scale=.25,angle=45]{duck}

includegraphics[scale=.25,angle=90]{duck}
Close

Quit
9.4.2.

Graphics Search Path
A
By default, LTEX looks for graphics files in any directory on the TEX search path. In addition to
A
these directories, LTEX also looks in any directories specified in the graphicspath command.
For example,
Creating Float . . .

graphicspath{{dir1/}{dir2/}}

Figure Placement
Customizing . . .
Using Graphics . . .

A
tells LTEX to also look for graphics files in dir1/ and dir2/. For Macintosh, this becomes

graphicspath{{dir1:}{dir2:}}

9.4.3.

Rotating and . . .

Title Page

Graphics Extensions
A
The DeclareGraphicsExtensions command tells LTEX which extensions to try if a file with
no extension is specified in the includegraphics command. For convenience, a default set of
extensions is pre-defined depending on which graphics driver is selected. For example if dvips
is used, the following graphic extensions (defined in dvips.def) are used by default

Page 11 of 13

Go Back

DeclareGraphicsExtensions{.eps,.ps,.eps.gz,.ps.gz,.eps.Z}
Full Screen

With the above graphics extensions specified, includegraphics{file} first looks for file.eps,
then file.ps, then file file.eps.gz, etc. until a file is found. This allows the graphics to be
specified with

Close

Quit
includegraphics{file}

instead of
Creating Float . . .

includegraphics{file.eps}

Figure Placement
Customizing . . .
Using Graphics . . .

9.5.

Rotating and Scaling Objects
In addition to the includegraphics command, the graphicx package includes 4 other comA
mands which rotates and scale any LTEX object: text, EPS graphic, etc.

Rotating and . . .

Title Page

scalebox{2}{includegraphics{file.eps}}
resizebox{4in}{!}{includegraphics{file.eps}}
rotatebox{45}{includegraphics{file.eps}}
Page 12 of 13

produces the same three graphics as
Go Back

includegraphics[scale=2]{file.eps}
includegraphics[width=4in]{file.eps}
includegraphics[angle=45]{file.eps}

For example, the following is produced with

Full Screen

Close

Quit
LA
T
EX

LA
T
EX

rotatebox{45}{fbox{Large
textcolor{blue}{LaTeX}}}

rotatebox{180}{fbox{Large
textcolor{blue}{LaTeX}}}

Creating Float . . .
Figure Placement

However, the includegraphics is preferred because it is faster and produces more efficient
PostScript.

Customizing . . .
Using Graphics . . .
Rotating and . . .

Title Page

Page 13 of 13

Go Back

Full Screen

Close

Quit

Weitere ähnliche Inhalte

Andere mochten auch

7월 첫주 캠페인
7월 첫주 캠페인7월 첫주 캠페인
7월 첫주 캠페인
lhjw7
 
I will be showing you the way in
I will be showing you the way inI will be showing you the way in
I will be showing you the way in
Jordan Booker
 
Olympicchemistry51
Olympicchemistry51Olympicchemistry51
Olympicchemistry51
Mint Minny
 

Andere mochten auch (15)

Iwona light condensed
Iwona light condensedIwona light condensed
Iwona light condensed
 
Columns in ConTeXt
Columns in  ConTeXt Columns in  ConTeXt
Columns in ConTeXt
 
05. Colspan dan rowspan
05. Colspan dan rowspan05. Colspan dan rowspan
05. Colspan dan rowspan
 
7월 첫주 캠페인
7월 첫주 캠페인7월 첫주 캠페인
7월 첫주 캠페인
 
OPTIMIZED TASK ALLOCATION IN SENSOR NETWORKS
OPTIMIZED TASK ALLOCATION IN SENSOR NETWORKSOPTIMIZED TASK ALLOCATION IN SENSOR NETWORKS
OPTIMIZED TASK ALLOCATION IN SENSOR NETWORKS
 
I will be showing you the way in
I will be showing you the way inI will be showing you the way in
I will be showing you the way in
 
Discobol
DiscobolDiscobol
Discobol
 
Szakony
SzakonySzakony
Szakony
 
Chap14 scr
Chap14 scrChap14 scr
Chap14 scr
 
Cover book with post scripts
Cover book with post scriptsCover book with post scripts
Cover book with post scripts
 
Understanding Claims Made Legal Malpractice Insurance
Understanding Claims Made Legal Malpractice InsuranceUnderstanding Claims Made Legal Malpractice Insurance
Understanding Claims Made Legal Malpractice Insurance
 
Olympicchemistry51
Olympicchemistry51Olympicchemistry51
Olympicchemistry51
 
Towards a better life by sabry shaheen - summary
Towards a better life   by sabry shaheen -  summaryTowards a better life   by sabry shaheen -  summary
Towards a better life by sabry shaheen - summary
 
10 tips sample
10 tips sample10 tips sample
10 tips sample
 
Weingarten Beamer
Weingarten BeamerWeingarten Beamer
Weingarten Beamer
 

Ähnlich wie Chap09 scr

Buffer overflow tutorial
Buffer overflow tutorialBuffer overflow tutorial
Buffer overflow tutorial
hughpearse
 

Ähnlich wie Chap09 scr (20)

Chap13 scr
Chap13 scrChap13 scr
Chap13 scr
 
Chap03 scr
Chap03 scrChap03 scr
Chap03 scr
 
Chap07 scr
Chap07 scrChap07 scr
Chap07 scr
 
Chap16 scr
Chap16 scrChap16 scr
Chap16 scr
 
Chap12 scr
Chap12 scrChap12 scr
Chap12 scr
 
La tex basics
La tex basicsLa tex basics
La tex basics
 
Oracle adf performance tips
Oracle adf performance tipsOracle adf performance tips
Oracle adf performance tips
 
Latex workshop
Latex workshopLatex workshop
Latex workshop
 
Applet and graphics programming
Applet and graphics programmingApplet and graphics programming
Applet and graphics programming
 
[ITP - Lecture 16] Structures in C/C++
[ITP - Lecture 16] Structures in C/C++[ITP - Lecture 16] Structures in C/C++
[ITP - Lecture 16] Structures in C/C++
 
Html frames
Html framesHtml frames
Html frames
 
Extending Struts(1)
Extending Struts(1)Extending Struts(1)
Extending Struts(1)
 
02 create first-map
02 create first-map02 create first-map
02 create first-map
 
My 70-480 HTML5 certification learning
My 70-480 HTML5 certification learningMy 70-480 HTML5 certification learning
My 70-480 HTML5 certification learning
 
Flutter State Management Using GetX.pdf
Flutter State Management Using GetX.pdfFlutter State Management Using GetX.pdf
Flutter State Management Using GetX.pdf
 
Latex Tuitorial
Latex TuitorialLatex Tuitorial
Latex Tuitorial
 
HTML Frameset & Inline Frame
HTML Frameset & Inline FrameHTML Frameset & Inline Frame
HTML Frameset & Inline Frame
 
Lecture 22
Lecture 22Lecture 22
Lecture 22
 
Java applet
Java appletJava applet
Java applet
 
Buffer overflow tutorial
Buffer overflow tutorialBuffer overflow tutorial
Buffer overflow tutorial
 

Mehr von Hirwanto Iwan

Mehr von Hirwanto Iwan (20)

01. integral fungsi aljabar
01. integral fungsi aljabar01. integral fungsi aljabar
01. integral fungsi aljabar
 
Analisis Butir Soal PG Matematika Wajib Kelas XII IPA-IPS NFBS Serang
Analisis Butir Soal PG Matematika Wajib Kelas XII IPA-IPS NFBS SerangAnalisis Butir Soal PG Matematika Wajib Kelas XII IPA-IPS NFBS Serang
Analisis Butir Soal PG Matematika Wajib Kelas XII IPA-IPS NFBS Serang
 
Analisis Butir Soal Pilihan Ganda Matematika Wajib Kelas XII IPA
Analisis Butir Soal Pilihan Ganda Matematika Wajib Kelas XII IPAAnalisis Butir Soal Pilihan Ganda Matematika Wajib Kelas XII IPA
Analisis Butir Soal Pilihan Ganda Matematika Wajib Kelas XII IPA
 
Materi Limit Aljabar dan Turunan Aljabar
Materi Limit Aljabar dan Turunan Aljabar Materi Limit Aljabar dan Turunan Aljabar
Materi Limit Aljabar dan Turunan Aljabar
 
Pembahasan Soal Matematika Wajib PTS Kelas XI IPS
Pembahasan Soal Matematika Wajib PTS Kelas XI IPSPembahasan Soal Matematika Wajib PTS Kelas XI IPS
Pembahasan Soal Matematika Wajib PTS Kelas XI IPS
 
Pembahasan Soal Matematika Wajib PTS Kelas XI IPA
Pembahasan Soal Matematika Wajib PTS Kelas XI IPAPembahasan Soal Matematika Wajib PTS Kelas XI IPA
Pembahasan Soal Matematika Wajib PTS Kelas XI IPA
 
Fitur Baru WinEdt 9.1
Fitur Baru WinEdt 9.1Fitur Baru WinEdt 9.1
Fitur Baru WinEdt 9.1
 
Pemasangan WinEdt 9.1
Pemasangan WinEdt 9.1Pemasangan WinEdt 9.1
Pemasangan WinEdt 9.1
 
Kumpulan Soal UM UGM
Kumpulan Soal UM UGMKumpulan Soal UM UGM
Kumpulan Soal UM UGM
 
Membuat Dokumen LaTeX Edisi ke - 33
Membuat Dokumen LaTeX Edisi ke - 33Membuat Dokumen LaTeX Edisi ke - 33
Membuat Dokumen LaTeX Edisi ke - 33
 
LATEX OR INDESIGN
LATEX OR INDESIGN LATEX OR INDESIGN
LATEX OR INDESIGN
 
AGH Beamer
AGH BeamerAGH Beamer
AGH Beamer
 
AFIT Beamer
AFIT BeamerAFIT Beamer
AFIT Beamer
 
Hackd Beamer
Hackd BeamerHackd Beamer
Hackd Beamer
 
LUH Beamer
LUH BeamerLUH Beamer
LUH Beamer
 
Cambridge Beamer
Cambridge BeamerCambridge Beamer
Cambridge Beamer
 
ESOP Beamer
ESOP BeamerESOP Beamer
ESOP Beamer
 
AP Beamer
AP BeamerAP Beamer
AP Beamer
 
Naked Beamer
Naked BeamerNaked Beamer
Naked Beamer
 
TUDelft Beamer
TUDelft BeamerTUDelft Beamer
TUDelft Beamer
 

Kürzlich hochgeladen

Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Kürzlich hochgeladen (20)

Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 

Chap09 scr

  • 1. Indian TEX Users Group URL: http://www.river-valley.com/tug Creating Float . . . Figure Placement Customizing . . . 9 Using Graphics . . . Rotating and . . . Title Page A On-line Tutorial on LTEX The Tutorial Team Indian TEX Users Group, SJP Buildings, Cotton Hills Trivandrum 695014, INDIA 2000 Prof. (Dr.) K. S. S. Nambooripad, Director, Center for Mathematical Sciences, Trivandrum, (Editor); Dr. E. Krishnan, Reader in Mathematics, University College, Trivandrum; Mohit Agarwal, Department of Aerospace Engineering, Indian Institute of Science, Bangalore; T. Rishi, Focal Image (India) Pvt. Ltd., Trivandrum; L. A. Ajith, Focal Image (India) Pvt. Ltd., Trivandrum; A. M. Shan, Focal Image (India) Pvt. Ltd., Trivandrum; C. V. Radhakrishnan, River Valley Technologies, Software Technology Park, Trivandrum constitute the Tutorial team A A This document is generated from LTEX sources compiled with pdfLTEX v. 14e in an INTEL Pentium III 700 MHz system running Linux kernel version 2.2.14-12. The packages used are hyperref.sty and pdfscreen.sty c 2000, Indian TEX Users Group. This document may be distributed under the terms of the A A LTEX Project Public License, as described in lppl.txt in the base LTEX distribution, either version 1.0 or, at your option, any later version Page 1 of 13 Go Back Full Screen Close Quit
  • 2. 9 The Figure Environment Creating Float . . . Figure Placement Customizing . . . Figures are really problematical to present in a document because they never split between pages. These leads to bad page breaks which leave blank space at the bottom of pages. For the fine-tuning of that document, typesetter has to adjust the page breaks manually. A But LTEX provides floating figures which automatically move to suitable locations. So the A positioning of figures is the duty of LTEX. 9.1. Using Graphics . . . Title Page Rotating and . . . Creating Floating Figures Floating figures are created by putting commands in a figure environment. The contents of the figure environment always remains in one chunk, floating to produce good page breaks. The following commands put the graphic from figure.eps inside a floating figure Page 2 of 13 Go Back begin{figure} centering includegraphics{figure.eps} caption{This is an inserted EPS graphic} label{fig1} end{figure} Full Screen Close Quit
  • 3. Features The optional label command, can be used with the ref, and pageref commands to reference the caption. The label command must be placed immediately after the ¤¥ ¤¢  ¦ £ ¡ caption Customizing . . . ¤¨ ¤!¨ " % $ # ¡ $ £ ¤¤¨ ) ( Using Graphics . . . Rotating and . . . $ # ( ¤ ¤!¤¨ ¦' $ If the figure environment contains multiple caption commands, it produces multiple figures which float together. This is useful in constructing side-by-side graphics or complex arrangements. Creating Float . . . Figure Placement !¨ ¤ If the figure environment contains no caption commands, it produces an unnumbered floating figure. ¨ ¨ ¤ £ ©§ 9.1.1. Figure 1. This is an inserted EPS graphic Title Page A list of figures is generated by the listoffigures command. By default, the caption text is used as the caption and also in the list of figures. The caption has an optional argument which specifies the list-of-figure entry. For example, caption[List Text]{Caption Text} causes “Caption Text” to appear in the caption, but “List Text” to appear in the list of figures. This is useful when using long, descriptive captions. The figure environment can only be used in outer paragraph mode, preventing it from being used inside any box (such as parbox or minipage). Figure environments inside the paragraphs are not processed until the end of the paragraph. For example: Page 3 of 13 Go Back Full Screen Close Quit
  • 4. ............. text text text text text text begin{figure} ......... end{figure} ............. text text text text text text Creating Float . . . Figure Placement Customizing . . . Using Graphics . . . Rotating and . . . 9.2. Figure Placement Title Page The figure environment has an optional argument which allows users to specify possible figure locations. The optional argument can contain any combination of the letters: h, t, b, p. h Place the figure in the text where the figure command is located. This option cannot be executed if there is not enough room remaining on the page. t Place the figure at the top of the page. b Place the figure at the bottom of a page. Page 4 of 13 p Place the figure on a page containing only floats. Go Back If no optional arguments are given, the placement options default to [tbp]. Full Screen A When we input a float, LTEX will read that float and hold it until it can place that at a better A location. Unprocessed floats are those which are read by LTEX but not yet placed on the page. A Though the float-placing is done by LTEX, sometimes user has to do something to process unprocessed floats. Following commands will do that job: Close Quit
  • 5. clearpage This command places unprocessed floats and starts a new page. FloatBarrier This command causes all unprocessed floats to be processed. This is provided by the placeins package. It does not start a new page, unlike clearpage. Creating Float . . . Figure Placement Customizing . . . Since it is often desirable to keep floats in the section in which they were issued, the section option usepackage[section]{placeins} Using Graphics . . . Rotating and . . . Title Page redefines the section command, inserting a FloatBarrier command before each section. Note that this option is very strict. This option does not allow a float from the old section to appear at the bottom of the page, since that is after the start of a new section. The below option Page 5 of 13 usepackage[below]{placeins} Go Back is a less-restrictive version of the section option. It allows floats to be placed after the beginning of a new section, provided that some of the old section appears on the page. afterpage/clearpage The afterpage package provides the afterpage command which executes a command at the next naturally-ocurring page break. Full Screen Close Quit
  • 6. Therefore, using afterpage{clearpage} causes all unprocessed floats to be cleared at the next page break. afterpage{clearpage} is especially useful when producing small floatpage figures. 9.3. Customizing Float Placement Creating Float . . . Figure Placement A LT The following style parameters are used by EX to prevent awkward-looking pages which contain too many floats or badly-placed floats. Customizing . . . Using Graphics . . . Rotating and . . . 9.3.1. Float Placement Counters Title Page topnumber The maximum number of floats allowed at the top of a text page (the default is 2) bottomnumber The maximum number of floats allowed at the bottom of a text page (the default is 1) totalnumber The maximum number of floats allowed on any one text page (the default is 3) Page 6 of 13 Go Back Full Screen A These counters prevent LTEX from placing too many floats on a text page. These counters do A not affect float pages. Specifying a ! in the float placement options causes LTEX to ignore these parameters. The values of these counters are set with the setcounter command. For example, Close Quit
  • 7. setcounter{totalnumber}{2} prevents more than two floats from being placed on any text page. Creating Float . . . Figure Placement Customizing . . . 9.3.2. Figure Fractions Using Graphics . . . Rotating and . . . The commands in the below table control what fraction of a page can be covered by floats (where “fraction” refers to the height of the floats divided by textheight). The first three commands pertain only to text pages, while the last command pertains only to float pages. A Specifying a ! in the float placement options causes LTEX to ignore the first three parameters, but floatpagefraction is always used. The value of these fractions are set by renewcommand. For example, Title Page renewcommand{textfraction}{0.3} Page 7 of 13 textfraction The minimum fraction of a text page which must be occupied by text. The default is 0.2, which prevents floats from covering more than 80% of a text page. Go Back Full Screen Close Quit
  • 8. topfraction The maximum fraction of a text page which can be occupied by floats at the top of the page. The default is 0.7, which prevents any float whose height is greater than 70% of textheight from being placed at the top of a page. Creating Float . . . Figure Placement Customizing . . . bottomfraction floatpagefraction The maximum fraction of a text page which can be occupied by floats at the bottom of the page. The default is 0.3, which prevents any float whose height is greater than 40% of textheight from being placed at the bottom of a text page. Using Graphics . . . Rotating and . . . Title Page The minimum fraction of a float page that must be occupied by floats. Thus the fraction of blank space on a float page cannot be more than 1-floatpagefraction. The default is 0.5. Page 8 of 13 9.4. A Using Graphics in LTEX A A This section shows the methods to use graphics in LTEX documents. While LTEX can import virtually any graphics format, Encapsulated PostScript (EPS) is the easiest graphics format to A import into LTEX. The ‘eps’ files are inserted into the file using command includegraphics{file.eps} Go Back Full Screen Close Quit
  • 9. 9.4.1. The includegraphics Command includegraphics[options]{filename} Creating Float . . . Following are the options available in includegraphics command: Figure Placement Customizing . . . width The width of the graphics (in any of the accepted TEX units). height The height of the graphics (in any of the accepted TEX units). totalheight The totalheight of the graphics (in any of the accepted TEX units). scale Scale factor for the graphic. Specifying scale=2 makes the graphic twice as large as its natural size. angle Using Graphics . . . Specifies the angle of rotation, in degrees, with a counter-clockwise (anti-clockwise) rotation being positive. Rotating and . . . Title Page Page 9 of 13 Go Back Full Screen Close Quit
  • 10. includegraphics[width=.5textwidth]{filename} includegraphics[height=2in]{filename} includegraphics[totalheight=2in]{filename} includegraphics[scale=2]{filename} Creating Float . . . Figure Placement Customizing . . . Using Graphics . . . Rotating and . . . Title Page includegraphics[width=1in]{duck} includegraphics[height=1.5in]{duck} Page 10 of 13 Go Back Full Screen includegraphics[scale=.25,angle=45]{duck} includegraphics[scale=.25,angle=90]{duck} Close Quit
  • 11. 9.4.2. Graphics Search Path A By default, LTEX looks for graphics files in any directory on the TEX search path. In addition to A these directories, LTEX also looks in any directories specified in the graphicspath command. For example, Creating Float . . . graphicspath{{dir1/}{dir2/}} Figure Placement Customizing . . . Using Graphics . . . A tells LTEX to also look for graphics files in dir1/ and dir2/. For Macintosh, this becomes graphicspath{{dir1:}{dir2:}} 9.4.3. Rotating and . . . Title Page Graphics Extensions A The DeclareGraphicsExtensions command tells LTEX which extensions to try if a file with no extension is specified in the includegraphics command. For convenience, a default set of extensions is pre-defined depending on which graphics driver is selected. For example if dvips is used, the following graphic extensions (defined in dvips.def) are used by default Page 11 of 13 Go Back DeclareGraphicsExtensions{.eps,.ps,.eps.gz,.ps.gz,.eps.Z} Full Screen With the above graphics extensions specified, includegraphics{file} first looks for file.eps, then file.ps, then file file.eps.gz, etc. until a file is found. This allows the graphics to be specified with Close Quit
  • 12. includegraphics{file} instead of Creating Float . . . includegraphics{file.eps} Figure Placement Customizing . . . Using Graphics . . . 9.5. Rotating and Scaling Objects In addition to the includegraphics command, the graphicx package includes 4 other comA mands which rotates and scale any LTEX object: text, EPS graphic, etc. Rotating and . . . Title Page scalebox{2}{includegraphics{file.eps}} resizebox{4in}{!}{includegraphics{file.eps}} rotatebox{45}{includegraphics{file.eps}} Page 12 of 13 produces the same three graphics as Go Back includegraphics[scale=2]{file.eps} includegraphics[width=4in]{file.eps} includegraphics[angle=45]{file.eps} For example, the following is produced with Full Screen Close Quit
  • 13. LA T EX LA T EX rotatebox{45}{fbox{Large textcolor{blue}{LaTeX}}} rotatebox{180}{fbox{Large textcolor{blue}{LaTeX}}} Creating Float . . . Figure Placement However, the includegraphics is preferred because it is faster and produces more efficient PostScript. Customizing . . . Using Graphics . . . Rotating and . . . Title Page Page 13 of 13 Go Back Full Screen Close Quit