Both sides previous revision
Previous revision
Next revision
|
Previous revision
Next revision
Both sides next revision
|
tex:triky [2011/12/29 17:36] bejcek problem with hyperref internal names |
tex:triky [2012/09/10 18:28] bejcek fonty |
* tables: //''xtab''// (better than ''longtable'' or ''supertabular''), //''tabulary''// (pretty wrapped text in autosized cells, similar to ''tabularx''), //''booktabs''// (no vertical lines, ''\toprule'', ''\midrule'', ''\bottomrule'' instead of ''\hline'') (all from this [[www.tug.org/pracjourn/2007-1/mori/mori.pdf|compendium]]) | * tables: //''xtab''// (better than ''longtable'' or ''supertabular''), //''tabulary''// (pretty wrapped text in autosized cells, similar to ''tabularx''), //''booktabs''// (no vertical lines, ''\toprule'', ''\midrule'', ''\bottomrule'' instead of ''\hline'') (all from this [[www.tug.org/pracjourn/2007-1/mori/mori.pdf|compendium]]) |
* ''longtable'' or ''xtabular'' environment **cannot** be inside ''table'' environment. (Put it inside ''center'' instead, since you cannot use ''\centering'' as before.) | * ''longtable'' or ''xtabular'' environment **cannot** be inside ''table'' environment. (Put it inside ''center'' instead, since you cannot use ''\centering'' as before.) |
| * **Higher cells/rows in tables** can be achieved either by ''booktabs'' package, or (if you have to use **vertical lines** in tables) by inserting ''\toppadding'' and ''\bottompadding'' in every row:<code> |
| \newcommand\toppadding{\rule{0pt}{2.6ex}} |
| \newcommand\bottompadding{\rule[-1.2ex]{0pt}{0pt}} |
| ... |
| \hline |
| \toppadding First cell\bottompadding & Second cell & Third one \\ |
| \hline |
| ...</code> |
* ''hyperref'' package: | * ''hyperref'' package: |
* If some **links from ToC** point to **incorrect** objects (e.g. section III.2.5 points to the page where the section I.2.5 starts), then the problem is in internal hyperref naming convention (both section in the example are represented as 'section.2.5'). You can change it either by | * If some **links from ToC** point to **incorrect** objects (e.g. section III.2.5 points to the page where the section I.2.5 starts), then the problem is in internal hyperref naming convention (both section in the example are represented as 'section.2.5'). You can change it either by |
* ''naturalnames=true'' (=> 'section.III.2.5'), or | * ''naturalnames=true'' (=> 'section.III.2.5'), or |
* ''hypertexnames=false'' (=> 'section.289') | * ''hypertexnames=false'' (=> 'section.289') |
| * **New** type of **float** and its **List of**<code> |
| \usepackage{tocloft} |
| \newlistof{graphs}{grp}{List of Graphs} % new list, file extension, its name |
| \renewcommand{\cftgrptitlefont}{\sffamily\bfseries\huge} % style of list title |
| \setlength{\cftbeforegrptitleskip}{10ex} % space above list title |
| \setlength{\cftaftergrptitleskip}{4ex} % space below list title |
| % previous three lines alternatively (in pbmlbook class): \cfttitleset{grp} |
| \newlistentry{graph}{grp}{0} % one line of the list (because it will be of type 'graph', not 'graphs', due to float named 'graph') |
| \renewcommand{\cftgraphfont}{\sffamily} % entry style |
| \renewcommand{\cftgraphpagefont}{\sffamily} % page number style |
| \setlength{\cftgraphnumwidth}{2em} % space for graph number |
| % previous three lines alternatively (in pbmlbook class): \cftlineset{graph}{}{2em} |
| |
| \usepackage{float} |
| \newfloat{graph}{ht!}{grp} % new float environment {graph}, "place it here or at the top of page" by default |
| \floatname{graph}{Graph} % each caption is started as "Graph \thegraph: <captioin>" |
| ... |
| \begin{graph} |
| \centering |
| \includegraphics[scale=.8]{obr09} |
| \caption{Graph Caption}\label{graph:first} |
| \end{graph} |
| ... |
| \cleardoublepage\listofgraphs\phantomsection\addcontentsline{toc}{chapter}{List of Graphs}</code> |
| * **Crop** PDF **figure** by LaTeX<code> |
| \graphicspath{{./images/}} |
| \fbox{\includegraphics[scale=.4,trim=70 150 120 110,clip]{filename}}</code> |
| * it't left bottom right top and crop ''./images/filename.pdf''! |
| * ''fbox'' -- for debugging |
| * ''scale'' or ''width'' or ''height'' |
| * other useful: ''bb=10 10 10 10'', ''angle=45'', ''keepaspectratio'', ''draft'' |
| * Special counter/style/... in **enumerate**<code> |
| \renewcommand{\labelenumi}{\Alph{enumi}.} |
| \setcounter{lastenumi}{\theenumi} |
| \begin{enumerate} |
| \setcounter{enumi}{\thelastenumi} |
| ...</code> |
| |
==== počítání slov (a dalších věcí) ==== | ==== počítání slov (a dalších věcí) ==== |
| |
Podrobnosti v dokumentaci: ''texdoc texcount'' | Podrobnosti v dokumentaci: ''texdoc texcount'' |
| |
| ==== Fonts ==== |
| |
| * ''fc-list'' -- list of known fonts |
| * any font in ''~/.fonts'' is immediately found and ready for use |
| * other font directories can be specified in ''~/.fonts.conf'' in ''dir''-element: ''<dir>~/.fonts</dir>'' |
| |
<html><hr/></html> | <html><hr/></html> |
| |
Some PBML and SCTL-specific issues are [[https://wiki.ufal.ms.mff.cuni.cz/tex:pbml|here]]. | Some PBML and SCTL-specific issues are [[https://wiki.ufal.ms.mff.cuni.cz/tex:pbml|here]]. |