0

嗨,我有一个很长的文档,例如下面关于爱丽丝梦游仙境的维基百科条目。我在第一行引用了兔子上的图,但我在文档的最后导入了图。我现在希望该图看起来接近 pdf 中的参考。有没有人有什么建议?[h] 不起作用...

The White Rabbit (Figure \ref{fig:rabbit})
Chapter One – Down the Rabbit Hole: Alice is feeling bored and drowsy while 
sitting on the riverbank with her older sister, who is reading a book with 
no pictures or conversations. She then notices a White Rabbit wearing a 
waistcoat and pocket watch, talking to itself as it runs past. She follows 
it down a rabbit hole, but suddenly falls a long way to a curious hall with 

many locked doors of all sizes. She finds a small key to a door too small 
for her to fit through, but through it she sees an attractive garden. She 
then discovers a bottle on a table labelled DRINK ME, the contents of which 
cause her to shrink too small to reach the key, which she has left on the 
table. She eats a cake with EAT ME written on it in currants as the chapter 
closes.

Chapter Two – The Pool of Tears: Chapter Two opens with Alice growing to 
such a tremendous size that her head hits the ceiling. Alice is unhappy and, 
as she cries, her tears flood the hallway. After shrinking down again due to 
a fan she had picked up, Alice swims through her own tears and meets a 
Mouse, who is swimming as well. She tries to make small talk with him in 
elementary French (thinking he may be a French mouse) but her opening gambit 
Où est ma chatte? (Where is my cat?) offends the mouse and he tries to 
escape her.

Chapter Three – The Caucus Race and a Long Tale: The sea of tears becomes 
crowded with other animals and birds that have been swept away by the rising 
waters. Alice and the other animals convene on the bank and the question 
among them is how to get dry again. The Mouse gives them a very dry lecture 
on William the Conqueror. A Dodo decides that the best thing to dry them off 
would be a Caucus-Race, which consists of everyone running in a circle with 
no clear winner. Alice eventually frightens all the animals away, 
unwittingly, by talking about her (moderately ferocious) cat.

Chapter Four – The Rabbit Sends a Little Bill: The White Rabbit appears 
again in search of the Duchess's gloves and fan. Mistaking her for his 

maidservant, Mary Ann, he orders Alice to go into the house and retrieve 
them, but once she gets inside she starts growing. The horrified Rabbit 
orders his gardener, Bill the Lizard, to climb on the roof and go down the 
chimney. Outside, Alice hears the voices of animals that have gathered to 
gawk at her giant arm. The crowd hurls pebbles at her, which turn into 
little cakes. Alice eats them, and they make her smaller again. Upon leaving 
the house, she comes upon a puppy, with whom she plays for a while before 
finding a mushroom with a hookah-smoking blue Caterpillar.

    Chapter Five – Advice from a Caterpillar: The Caterpillar questions 
 Alice and she admits to her current identity crisis, compounded by her 
 inability to remember a poem. Before crawling away, the caterpillar tells 
Alice that one side of the mushroom will make her taller and the other side 
will make her shorter. She breaks off two pieces from the mushroom. One side 
makes her shrink smaller than ever, while another causes her neck to grow 
high into the trees, where a pigeon mistakes her for a serpent. With some 
effort, Alice brings herself back to her normal height. She stumbles upon a 
small estate and uses the mushroom to reach a more appropriate height.


The Cheshire Cat
Chapter Six – Pig and Pepper: A Fish-Footman has an invitation for the 
Duchess of the house, which he delivers to a Frog-Footman. Alice observes 
this transaction and, after a perplexing conversation with the frog, lets 
herself into the house. The Duchess's Cook is throwing dishes and making a 
soup that has too much pepper, which causes Alice, the Duchess, and her baby 
(but not the cook or grinning Cheshire Cat) to sneeze violently. Alice is 
 given the baby by the Duchess and to her surprise, the baby turns into a 
pig. The Cheshire Cat appears in a tree, directing her to the March Hare's 
house. He disappears, but his grin remains behind to float on its own in the 
air, prompting Alice to remark that she has often seen a cat without a grin 
but never a grin without a cat.

Chapter Seven – A Mad Tea-Party: Alice becomes a guest at a mad tea party   
along with the March Hare, the Hatter, and a very tired Dormouse who falls 
asleep frequently, only to be violently woken up moments later by the March 
Hare and the Hatter. The characters give Alice many riddles and stories, 
including the famous Why is a raven like a writing desk?. The Hatter reveals 
that they have tea all day because Time has punished him by eternally 
standing 
still at 6 pm (tea time). Alice becomes insulted and tired of being 
bombarded with riddles and she leaves, claiming that it was the stupidest 
tea party that she had ever been to. She makes her way back to the hallway 
and, using the pieces of 
mushroom, manages to get the key, unlock the door and enter the garden.

\begin{figure}
\centering
\includegraphics[width=0.4\textwidth]{./Figures/rabit.png}
\caption[Rabbit] {Picture of rabbit.}
\label{fig:rabbit}
\end{figure}
4

1 回答 1

0

恐怕这在纯 LaTeX 中是不可能的。LaTeX 的图形位置仅限于“here”、“top”、“bottom”和“page”。这些都不足以满足您的情况。'here' 中的 'h' 表示靠近定义图形的位置,而不是引用位置。

但是,可以让其他工具处理您的 .tex 文件,以将图形定义移近参考,然后应用“此处”放置,或者根本不将图像设置为浮点数。

可以做到这一点的工具包括 awk 和 perl。

于 2017-09-09T21:50:43.077 回答