Emacs로 Tex 파일 편집할 때 SumatraPdf 와 동기화하기. (SumatraPdf 상에서 특정 부분 더블클릭하면 커서가 tex 파일의 해당 문단으로 이동)
설정환경
Windows XP pro. 32bit
GNU Emacs 23.2.1
AUCTex 11.86-e23.1
SumatraPdf-sync (아래 링크 블로그에서 구할 수 있음)
동기화하기
Inverse search Set the following inverse search command in SumatraPDF (menu 'File\Set inverse search command line'): c:\emacs\bin\emacsclientw.exe +%l "%f"
Make sure the emacs server is started by by running the command server-start from within Emacs or by adding (server-start) to your emacs init file. (See Emacs doc)
Auctex settings - Configure the pdflatex-command from the configure menu in emacs: (LaTeX-command "latex -synctex=-1") - Set 'Latex\Customize Auctex\Tex command\Tex Output View Style\Line containing the phrase <^pdf$>' to C:\Progra~1\SumatraPDF\SumatraPDF.exe %o
Forward search 1- Download the script file sumatra-forward.el 2- Update your init.el or .emacs file to load the sumatra-forward script by adding the following command: (require 'sumatra-forward) 3- Make sure that you have the ddeclient tools. (It is bundled with ntemacs) 4- Restart Emacs 5- Press F8 in the TeX document to trigger a forward-search
Further explanations on how to make Emacs+Auctex work with SumatraPDF are available here.
You will first need to install the package Beamer. Under Debian or Ubuntu, you can type the following command:
Once the latex-class Beamer is installed, you are definitely ready to stat your first presentation!!!
Basic presentation with Beamer
A few explanations:
means that our document is a Beamer presentation
this package enables us to use special letters (with accents, cedillas, etc). You can discard this command when the presentation is in English.
This is our outer theme (color and background). As you can imagine, there are tons of themes. You can refer to Beamer documentation for more details.
this defines the title of the presentation. As you can see, there are two titles: the first one, between brackets. [Making a LaTeX presentation with Beamer] is a substitute title which appears at the bottom of the page. This is useful especially if the original title is long. Since this is anoption only, if it is not mentioned, then the original title is the one shown in the bottom of the page. the second one, between braces, is the principal title of the presentation. The command
defines Nadir Soualem and Astozzia (us!) as the authors of the presentation.
defines where the presentation was held. Finally, we use
as the date.
To define the document, we use the markers
To define a slide of the presentation, we use the markers
To define a page title (frame), we mention it as follows
Introduction will be the title of the page. To define the first page, which contains details such as the title, the author, the date, etc - we use a frame in which we include the \titlepage command
To define a frame containing the layout of the presentation, we proceed as follows:
The layout is therefore mentioned at every section and subsection. You should insert \section and \subsection throughout the presentation and out of the frames:
Animations — Overlays
A good presentation is one that is dynamic and attracts the audience’s interest. Generally, we resort to a dynamic type of presentations. Alternatively stated, when we speak, we simultaneously show significant points of the talk, or hide others, or keep just the important ones. We shall see in this section how animations function in Beamer.
Item-by-item list view: the \pause command
In order to view several items of a list on the same slide, we type the following commands inside a frame:
We will thus see the items of our list, one by one.
Item-by-item list view: the \item command
An alternative way to visualize the elements of a list item by item is to use the \item command, where n is a natural number referring to the slide, beginning from which the item appears.
List item interval and isolated items: the \item and \item
commands
An example is worth a long speech:
\item means that the list item will appear on slides numbered n to m, whereas \item
means that the item will appear on slide p.
Item-by-item long list view: the [<+->] command
Sometimes the lists you want to display are long and it is not practical to use the \item command. An alternative solution is the use of the [<+->] command
Up to now, we have dealt with lists. We shall now see how to use text and slides.
Displaying and hiding text in slides: the \uncover, \uncover and \uncover
commands
\uncover will display the text from slide n on; \uncover means the text element will appear from slide n to m. Finally, \uncover
means that the text will appear on slide p. Here is a case in point of a frame containing the \uncover command.
Be careful not to forget the braces after the \uncover command. The syntax is as follows:
Displaying and hiding text in slides: the \only, \only and \only
commands
\only works like\uncover with the exception that the \only command is not as "cumbersome" on slides. Here is an example:
Here is an other example to better grasp the difference between \only and \uncover
Hide text in slides: the \invisible commands
\invisible makes text invisible on slide n
Another alternative: the \alt{...}{...} commands
As an alternative, one can use the \alt{...}{...} command on a slide. The first argument is the value on slide n. The second is for values other than n. Here is an example:
Highlighting text in red: the \alert{...} command
To highlight text in red on slide n, we use the \alert{...} command.
Successively highlighting list items in red: the <+-| alert@+> command
Using colors in a text on a slide: the \color{...}{...}, \color{...}{...} and\color
{...}{...} commands
The first argument is the red, green, yellow, blue, etc ... The second is the text to be colored
Creating links: the \hyperlink{...}{\beamergotobutton{...}} commands
To define internal links, we should add the following package in the preamble
Then, we should define a label pointing on the frame:
you define MY_LABEL as you please ! Finally, on the frame where the link is to be created, we proceed as follows:
There we are! We can see a button Refer to this page pointing to the frame labeled MY_LABEL.
Thus, the first argument of \hyperlink{...}{\beamergotobutton{...}} is the name of the label to be pointed at and \beamergotobutton{...} has the name of the button as an argument.
Defining blocks inside frames
For important stuff, we define blocks as follows:
As clear as onion soup !!!
Dynamic display of tables: the \pause and \onslide commands
First off, we should add the package colortbl to the preamble
To display rows dynamically, we shall use the \pause command as follows:
To display columns dynamically, we shall use the \onslide command as follows:
Writing on several columns: the \begin{columns}...\end{columns} commands
For two columns, we proceed as follows:
l,r,c refers to the position: left, right, center. The syntax is as follows:
Inserting a figure in a Beamer presentation
To insert an image or a figure, we proceed as in LaTeX by using the \includegraphics command. Here is an example:
In Beamer, we should distinguish between two types of figures: PS type: .eps, .ps and pspicture type (LaTeX) General type: .pdf, .png, .jpg, .jpeg You will need to compile a Beamer-class file.
Compiling a Beamer presentation
I assume that the your file is called file.tex.. There are ways to compile, depending on the type of figure you inserted. For PS-type figures, we shall use the following commands
We shall obtain the file file.pdf.
For general-type figures, we shall use the command
We shall also obtain the file file.pdf.
Conclusion
It goes without saying that explaining all the possibilities that Beamer offers is way too long. This is why I am referring to this exhaustive documentation documentation.
# xorg.conf (X.Org X Window System server configuration file) # # This file was generated by dexconf, the Debian X Configuration tool, using # values from the debconf database. # # Edit this file with caution, and see the xorg.conf manual page. # (Type "man xorg.conf" at the shell prompt.) # # This file is automatically updated on xserver-xorg package upgrades *only* # if it has not been modified since the last upgrade of the xserver-xorg # package. # # If you have edited this file but would like it to be automatically updated # again, run the following command: # sudo dpkg-reconfigure -phigh xserver-xorg
If you come this far without reading the above link, you'll probably get it wrong.
Next MAKE SURE YOU BACKUP YOUR EXISTING xorg.conf! sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf.backup
These instructions assume you have a laptop to the left of your larger LCD panel, and that you want the LCD panel to be the main screen. If this isn't true, you need to pay attention to the "LeftOf" / "RightOf" options in step 3 below, also in step 4 and during the rejigging of the layout using xrandr (more on this below).
Before you start, you will need the ID of your displays from xrandr. Do: sudo xrandr -q
In my case, the displays are called "VGA" and "LVDS". You will need these values when doing step 1 below.
Edit your xorg.conf (from the out-the-box Heron dist version) and make the following changes: 1. In 'Section "Device"', add the 2 lines highlighted in red so the section reads like this: Section "Device" Identifier "Configured Video Device" Option "monitor-VGA" "lcddisp" Option "monitor-LVDS" "laptop" EndSection
Note that the "Option" keys are the 2 values you got in 'sudo xrandr -q' earlier, prefixed bu the string "monitor-". THIS IS IMPORTANT!
2. Change the identifier in 'Section "Monitor"' as shown in red, so it reads like this: Section "Monitor" Identifier "lcddisp" EndSection
3. Immediately below the existing 'Section "Monitor"' add a new 'Section "Monitor"' which looks like this: Section "Monitor" Identifier "laptop" Option "LeftOf" "lcddisp" EndSection
N.B. This assumes your laptop is to the left of your lcd display. If not, change "LeftOf" to "RightOf".
4. In 'Section "Screen"', edit the Monitor to be the one you want as your main screen (in my case 'lcddisp' but you may want 'laptop'): Section "Screen" Identifier "Default Screen" Monitor "lcddisp" Device "Configured Video Device" EndSection
5. Also in the same 'Section "Screen"' add a SubSection as follows: Section "Screen" Identifier "Default Screen" Monitor "lcddisp" Device "Configured Video Device" SubSection "Display" Depth 24 Modes "1680x1050" "1440x900" Virtual 3120 1050 EndSubSection EndSection Note: The Modes options should reflect the 2 modes of your laptop and LCD panel (or just one mode if they are the same resolution.) Also Note: Virtual setting. You should calculate this such that the first figure is the TOTAL width of both displays added together, and the second figger is the larger of the 2 display heights. If you don't know the resolutions you can get them by: sudo xrandr -q
In short, the Virtual section creates a giant virtual screen which must be big enough to hold the 2 screens we are physically using.
OK that's the xorg.conf edited, so....
6. Restart X (CTRL-ALT-BACKSPACE)
Nothing amazing will have happened yet; you now need to use xrandr to move the displays around in the giant virtual screen we just made:
7. sudo xrandr -q to get the system names of the 2 displays. Im my case these are VGA (the LCD panel) and LVDS (the laptop)
8. Whichever display you opted for on the right, now use xrandr to reposition it. In my case: xrandr --output VGA --pos 1440x0
This moved my VGA (lcd) display to position 1440, which is exactly at the right hand edge of my laptop display (within the giant virtual screen.)
is really the only necessary part of these modifications. The virtual line specifies the maximum combined resolution available across all of your screens, and it defaults to the resolution of the highest resolution device you have plugged in when X starts. This means that by default you can't do non-clone dual-head.
However, once you have a specified a (sufficiently large) Virtual size, you can use System->Preferences->Screen Resolution to dynamically handle dual-head. It will also restore your dual-head settings when you log in. That's the way I have my dual-head set up on my laptop, since I tend to swap things around a lot.
__________________ nVidia's binary blob: not quite as bad as fglrx --- Instructions for easy Nouveau driver testing.
Remember: if your problem is not described on a Launchpad bug, it can only be fixed by accident!