lundi 29 décembre 2014
vendredi 24 mai 2013
BEAMER customize the navigation bar (tree)
\documentclass{beamer}
\useoutertheme{tree}
\makeatletter
\setbeamertemplate{headline}
{%
\begin{beamercolorbox}[wd=\paperwidth,colsep=1.5pt]{upper separation line head}
\end{beamercolorbox}
\begin{beamercolorbox}[wd=\paperwidth,ht=2.5ex,dp=1.125ex,%
leftskip=.3cm,rightskip=.3cm plus1fil]{title in head/foot}
\usebeamerfont{title in head/foot}\insertshorttitle
\end{beamercolorbox}
\begin{beamercolorbox}[wd=\paperwidth,ht=2.5ex,dp=1.125ex,%
leftskip=.3cm,rightskip=.3cm plus1fil]{section in head/foot}
\usebeamerfont{section in head/foot}%
\ifbeamer@tree@showhooks
\setbox\beamer@tempbox=\hbox{\insertsectionhead}%
\ifdim\wd\beamer@tempbox>1pt%
\hskip2pt\raise1.9pt\hbox{\vrule width0.4pt height1.875ex\vrule width 5pt height0.4pt}%
\hskip1pt%
\fi%
\else%
\hskip6pt%
\fi%
\insertsectionhead
\usebeamerfont{subsection in head/foot}%
\ifbeamer@tree@showhooks
\setbox\beamer@tempbox=\hbox{\insertsubsectionhead}%
\ifdim\wd\beamer@tempbox>1pt%
\ \raise1.9pt\hbox{\vrule width 5pt height0.4pt}%
\hskip1pt%
\fi%
\else%
\hskip12pt%
\fi%
\insertsubsectionhead\hfill\insertframenumber/\inserttotalframenumber\hspace{0.5em}
\end{beamercolorbox}
\begin{beamercolorbox}[wd=\paperwidth,colsep=1.5pt]{lower separation line head}
\end{beamercolorbox}
}
\makeatother
\title{Tree Outer Theme}
\begin{document}
\section{Test Section}
\begin{frame} test \end{frame}
\subsection{Test Subsection One}
\begin{frame} test \end{frame}
\subsection{Test Subsection Two}
\begin{frame} test \end{frame}
\end{document}
vendredi 26 avril 2013
[Latex] use footnote in the caption
- \begin{figure}[!ht]
- \centering
- \includegraphics[]{ch1_architechture.png}
- \caption{Architechture du système \protect\footnotemark}
- \end{figure}
- \footnotetext{http://developer.android.com/guide/basics/what-is-android.html}
- By this means, the link of footnote is correct.
dimanche 17 février 2013
latex \hspace not work at the beginning of a line
jeudi 14 février 2013
[F]No room for a new \dimen when including TikZ
|
Write
just after the \documentclass line (it should be the first loaded package).Original link: http://tex.stackexchange.com/questions/7896/no-room-for-a-new-dimen-when-including-tikz |
jeudi 31 janvier 2013
[FORWARD] Use bold in att
>
> I fail to bold my word using alltt module
>
> \documentclass{article}
> \usepackage{alltt} % for normal formating inside verbat
> \begin{document}
>
> \begin{alltt}
> hello \textbf{hello}
> \end{alltt}
>
> \end{document}
>
> Any suggestions?
txfonts has bold ttfonts. If you just want set the tt font to be txtt,
just invoke :
\renewcommand{\ttdefault}{txtt}
Example :
\documentclass{article}
\usepackage{alltt}
\renewcommand{\ttdefault}{txtt}
\begin{document}
\begin{alltt}
hello \textbf{hello}
\end{alltt}
\end{document}
--
B.R
Original: http://newsgroups.derkeiler.com/Archive/Comp/comp.text.tex/2006-01/msg00179.html
jeudi 24 janvier 2013
[F]LaTeX: Adding Footnotes to Paragraph Titles
LaTeX: Adding Footnotes to Paragraph Titles
\paragraph[foo-title]{foo-title \protect\footnote{bar-footnote}}
original:
http://lesoluzioni.blogspot.fr/2013/01/latex-adding-footnotes-to-paragraph.html
dimanche 20 janvier 2013
[Forward] How to use mathematics in a verbatim-like environment
How to use mathematics in a verbatim-like environment
- Add the alltt package to your document.
- Enter an encapsulated TeX field.
- Type \begin{alltt} to begin the alltt environment.
- Begin entering the content of the verbatim environment.
-
For each mathematical element,
- Type \( to begin mathematics.
- Type the commands for the mathematical statement or symbol you want.
- Type \) to end mathematics.
- Complete the content.
- Type \end{alltt} to close the environment.
- Choose OK.
lundi 3 décembre 2012
latex floatflt.sty not found in mac
mkdir -p /usr/share/texmf-texlive/tex/latex/floatflt cd /usr/share/texmf-texlive/tex/latex/floatflt rm -f floatflt.* float*.tex wget http://mirror.ctan.org/macros/latex/contrib/floatflt/floatflt.ins wget http://mirror.ctan.org/macros/latex/contrib/floatflt/floatflt.dtx latex floatflt.ins texhash /usr/share/texmf-texlive
PS: using mac, the folder is ~/Library/texmf/tex/latex, then go to that directory, and run the command wget ...
Ref: Incidentally, if you want to add files to TEX Live for one particular user, install them in a similar tree~/Library/texmfwhere~/Libraryis the Library folder in that user’s home directory. The folder texmf and other folders for the tree will have to be created. For instance, TEX will find any file in~/Library/texmf/texor a subfolder of this location, LATEX will find any file in~/Library/texmf/tex/latexor a subfolder of this location, and BibTEX will find any .bib file in~/Library/texmf/bibtex/bibor a subfolder of this location, and any .bst file in~/Library/texmf/bibtex/bstor a subfolder of this location. It is not necessary to use texhash when adding files to this local tree.
mercredi 29 août 2012
latex 字体大小
6pt: 字体大小
0.25cm: 行距
vendredi 5 février 2010
How to install style files in TexShop in Mac OSX Machine
I am using the mactex distribution with texshop as my front end.
I have started using a package that does not come with the mactex
distribution, namely cleveref. I have the cleveref.sty file, and
currently if I want to use it I have to keep it in the same directory
as the tex file I am working on.
so, I would like to find out how I can install this package so that I
can use \usepackage{cleveref} from any tex document on my computer.
when I compile I see that texshop looks in the directory /usr/local/
texlive/2007/texmf-dist/tex/latex/ for the standard packages, such as
amsmath. so in this directory I created a new directory cleveref, and
dropped the sty file in it. unfortunately when I try to compile it
says it is missing the cleveref.sty file.
anyone know how I can install this package with my current set up?
Don't put packages not coming with the main distribution there. Rather
use /usr/local/texlive/texmf-local; otherwise the added file will
vanish when an update to the main distribution will be done.
From the Terminal, assuming you are in the directory where thepackage files are:
% sudo mkdir -p /usr/local/texlive/texmf-local/tex/latex/cleveref
% sudo mv cleveref.sty /usr/local/texlive/texmf-local/tex/latex/cleveref
% ...(do the same for the other files)...
% sudo mktexlsr
Here "%" stands for the shell prompt, which will be different.
You can also navigate to /usr/local/texlive/texmf-local in the Finder
and copy the files this way. However you'll need to give the
sudo mktexlsr
anyway from the Terminal. If you don't know about "sudo", just do
as stated, giving your password when requested. Of course, this
assumes you are an administrator of the machine. The "mktexlsr"
command makes TeX know about the added files.
Another way is to put the package files in
~/Library/texmf/tex/latex
(~ stands for your home directory). Other users of your machine will
not be able to use the added package, though. With this technique the
"mktexlsr" command is not needed.
Ciao
Enrico
Cite from: http://newsgroups.derkeiler.com/Archive/Comp/comp.text.tex/2008-05/msg00295.html
lundi 1 février 2010
[转] LaTex 注释
1. 用%注释一行文字, 在%后的文字都不予编译;
2. 用\iffalse .... \fi 包含一段文字, 被包含的文字被注释掉了;
3. 用\begin{comment} ... \end{comment} 包含被注释的文字, 但是需要在引言区包括相应的宏包, 即 \usepackage{verbatim}.
[转] LNCS LaTeX style works
Springer encourages authors to use LaTeX2e, provides a style file for LaTeX, documentation and samples. The samples and instructions are quite good to start writing a paper immediately if
- you know LaTeX, and
- the llncs style is installed.
The problem is that they don’t provide (or I haven’t found) help on installing the style. The number of people that can do it is much smaller of those who know LaTeX.
Fortunately, I’m one from that small group. Here is my way to use the style locally without putting it into the core LaTeX directories.
The style files are stored in the file llncs2e.zip. I unpacked them into the folder “~/univer/gpce05/springer/texmf/tex/latex/llncs2e“. In fact, the path before “texmf” is not important.
First of all, I decided to check the sample file llncs.dem. As dvi-file already exists, I generated pdf:
$ pdflatex llncs.dem $ pdflatex llncs.demThe command was given twice to get correct links. On the first run, the database of links is created, and on the next runs the database is used.
Now goes local installation of the style. I’m not going to comment it. Consider it as magic:
$ export TEXMFLOCAL=~/univer/gpce05/springer/texmf $ texconfig rehash $ file ~/univer/gpce05/springer/texmf/ls-RThe first command specifies location of the local TeX repository. The second commands indexes the repository, and the last one just makes sure that the index is created.
To check, use the sample from the file typeinst.zip. Let me demonstrate a failure first. Open a new window and try to compile the TeX-file:
$ latex typeinst.texYou get an error like:
LaTeX Error: File `llncs.cls' not found.The right way is to specify the location of the repository first:
$ export TEXMFLOCAL=~/univer/gpce05/springer/texmf $ latex typeinst.tex $ latex typeinst.texAgain, I’m running LaTeX twice to get correct links.
Original link: http://uucode.com/blog/2005/04/08/lncs-latex-style-works/
lundi 26 octobre 2009
How to input French in MacTex
\usepackage[T1]{fontenc}
\usepackage[frenchb]{babel}
\usepackage[applemac]{inputenc}
mardi 15 septembre 2009
Footnotes in LaTeX section headings
The \footnote command is fragile, so that simply placing the command in \section’s arguments isn’t satisfactory. Using \protect\footnote isn’t a good idea either: the arguments of a section command are used in the table of contents and (more dangerously) potentially also in page headers. While footnotes will work in the table of contents, it’s generally not thought a “good thing” to have them there; in the page header, footnotes will simply fail. Whatever the desirability of the matter, there’s no mechanism to suppress the footnote in the page header while allowing it in the table of contents, so the footnote may only appear in the section heading itself.
To suppress the footnote in headings and table of contents:
- Take advantage of the fact that the mandatory argument doesn’t ‘move’ if the optional argument is present:
\section[title]{title\footnote{title ftnt}} - Use the footmisc package, with package option
stable— this modifies footnotes so that they softly and silently vanish away if used in a moving argument. With this, you simply need:% in the document preamble
\usepackage[stable]{footmisc}
...
% in the body of the document
\section{title\footnote{title ftnt}}
vendredi 21 août 2009
Latex 排版艺术
Latex 调整表格位置
table
\begin{table}[placement]
body of the table
\caption{table title}
\end{table} Tables are objects that are not part of the normal text, and are usually "floated" to a convenient place, like the top of a page. Tables will not be split between two pages.
Note that there is an *-form: \begin{table*} ... \end{table*}. This form will put the table in a single column when in two column mode; in one column mode it is identical to the non-* form
The optional argument [placement] determines where LaTeX will try to place your table. There are four places where LaTeX can possibly put a float:
- h Here - at the position in the text where the table environment appears.
- t Top - at the top of a text page.
- b Bottom - at the bottom of a text page.
- p Page of floats - on a separate float page, which is a page containing no text, only floats.
The body of the table is made up of whatever text, LaTeX commands, etc., you wish.
The \caption command allows you to title your table.