title: Insert explanatory text into numbered list in LyX

text: I try to insert some explanatory text into numbered list as below:               1. Number 1         explanation of Number 1     2. Number 2      But when I do it in LyX, I try to change the "explanation" line as "Standard", then the second number will change to 1 (I wish it's 2). So the actual result is:               1. Number 1         explanation of Number 1     1. Number 2      What's the right way to do such document? Update: Maybe issue caused by beamer. I am using beamer in lyx.               #LyX 2.1 created this file. For more info see http://www.lyx.org/     \lyxformat 474     \begin_document     \begin_header     \textclass beamer     \use_default_options true     \maintain_unincluded_children false     \language english     \language_package default     \inputencoding auto     \fontencoding global     \font_roman default     \font_sans default     \font_typewriter default     \font_math auto     \font_default_family default     \use_non_tex_fonts false     \font_sc false     \font_osf false     \font_sf_scale 100     \font_tt_scale 100     \graphics default     \default_output_format default     \output_sync 0     \bibtex_command default     \index_command default     \paperfontsize default     \spacing single     \use_hyperref false     \papersize default     \use_geometry true     \use_package amsmath 1     \use_package amssymb 1     \use_package cancel 1     \use_package esint 1     \use_package mathdots 1     \use_package mathtools 1     \use_package mhchem 1     \use_package stackrel 1     \use_package stmaryrd 1     \use_package undertilde 1     \cite_engine basic     \cite_engine_type default     \biblio_style plain     \use_bibtopic false     \use_indices false     \paperorientation portrait     \suppress_date false     \justification true     \use_refstyle 1     \index Index     \shortcut idx     \color #008000     \end_index     \secnumdepth 3     \tocdepth 3     \paragraph_separation indent     \paragraph_indentation default     \quotes_language english     \papercolumns 1     \papersides 1     \paperpagestyle default     \tracking_changes false     \output_changes false     \html_math_output 0     \html_css_as_file 0     \html_be_strict false     \end_header          \begin_body          \begin_layout FragileFrame     \begin_inset Argument 4     status open          \begin_layout Plain Layout     Title     \end_layout          \end_inset               \end_layout          \begin_deeper     \begin_layout Enumerate     item 1     \end_layout          \begin_layout Enumerate     item 2     \end_layout          \begin_layout Standard     what's item 2.     \end_layout          \begin_layout Enumerate     item 3     \end_layout          \end_deeper     \begin_layout FragileFrame          \end_layout          \end_body     \end_document      You can try this exam, the module has been grey out so can not add at all.


title: How to insert blank page after tittle in two sided document

text: I have a two sided document and I want to print. The abstract comes on the back side of the title which is not neat. I want the abstract to be on a separate page (right sided). I will have to do similar thing before table of contents (or may be other places). In another post titled 'Add white page after table of contents before abstract' it was suggest to put following code               \cleardoublepage\null\newpage      However this does not work for me. It does create a blank page after the title page but the abstract is still left-sided. Any ideas please?


title: \label is Undefined when used in \afterpage?

text: I am trying to force a figure and an image to show up on the same page back to back. I read the solution of using the `\afterpage` which works great. Except now the `\label` is undefined and I cannot refer to them! What I have so far:               \afterpage{         \begin{figure}             \centering             \includegraphics[scale=0.28]{PATH_TO_IMAGE}             \caption{Some Caption For My Image}             \label{myFigure}         \end{figure}         \begin{table}             \centering             \caption{Some Caption For My Table}             \label{myTable}             \includegraphics[scale=0.09]{PATH_TO_TABLE}         \end{table}     }       Then I refer to these normally, using `\ref{myFigure}` or `\ref{myTable}`. But the compiler says undefined references, and the PDF shows `??`. If I remove the `/afterpage`, then the reference works just fine. Why? **EDIT** This is for my dissertation paper at my university. The following template is provided by the university to be used. The path to the main `.tex` file is here


title: Missing vertical line in a table, how can I fix it?

text: Here is my code:                   \begin{table}[!htb]         \centering % used for centring table          \begin{tabular}{cccc}            \toprule             \textbf{Thickness} & \textbf{Applied Voltage} & \textbf{$n_1$ Initial Trap Density} & \textbf{$K_D$ De-trap Rate Constant} \\             \midrule        \multirow{3}{*}{\textbf{100$\mu m$}}  &  3kV    &    3.049$\times 10^{-16}$  &    0.0078     \\ \cline{2-4}           \multicolumn{1}{l|}{\textbf{}} & 5kV     &  5.4315$\times 10^{-16}$    &    0.0179   \\ \cline{2-4}         \multicolumn{1}{l|}{\textbf{}} &  7kV &    6.7786$\times 10^{-16}$       &  0.0324 \\ \hline       \multirow{3}{*}{\textbf{108$\mu m$}}    &  5KV         &    6.6479$\times 10^{-16}$ &  0.0075      \\ \cline{2-4}         \multicolumn{1}{l|}{\textbf{}} &  7kV  &   1.1565$\times 10^{-15}$  &  0.0239 \\ \cline{2-4}          \multicolumn{1}{l|}{\textbf{}} &   9kV &  1.4657$\times 10^{-15}$ & 0.0189 \\        \bottomrule       \end{tabular}        \caption{aaaaa } % title of Table        \label{table:parameters}        \end{table}      ![enter image description here](http://i.stack.imgur.com/MFQFO.png)


title: Is there a standard package to create a table like this?

text: Is there a fast and efficient way to create a table with a vertical arrow like this? ![](http://i.stack.imgur.com/XCfpL.png) A suitable reference or a snippet of LaTeX code would be much appreciated.


title: Looking for a similar/exact latex template

text: I'm looking for a specific latex template that I've spent a lot of time looking for, without success. Here is an example: http://faculty.kfupm.edu.sa/ME/mqahtani/Publications/21rib.J.Turbo.pdf Would anyone have any idea of where to find this template? Or a similar one (especially the first page, with the authors on the left, the wide vertical bar, and the title and abstract on the right). Thank you very much for your help.


title: How to avoid rowcolour being applied to \caption in longtabu environment

text: I have used the following code to create table using tabu package, I have applied alternate row colours to the table using `\rowcolors` command. The issue is the colour fill is applied to the caption of the table. How can I avoid it. I tried using `\rowcolor{white}` inside the table but it throws an error.               \documentclass{report}          \usepackage{longtable}     \usepackage{tabu}     \usepackage[table]{xcolor}     \usepackage{booktabs}     \begin{document}          \tabulinesep = 3mm     \rowcolors{2}{white}{lightgray}     \begin{longtabu}{>{\bf}X[l]X[l]X[r]X[r]}     \toprule     \textbf{AssetName} & \textbf{wk\_yr} & \textbf{Energy$kWh$} & \textbf{Power$kW$}      \\ \toprule \endhead       UPS Room & 2014-W25 & 325.45 & 1 \\        UPS Room & 2014-W26 & 348.64 & 2 \\        GF AHU Energy Meter & 2014-W25 & 109.00 & 13.91 \\        GF AHU Energy Meter & 2014-W26 & 171.00 & 27.64 \\        PANTRY AHU Energy Meter & 2014-W25 & 18.00 & 13.49 \\        PANTRY AHU Energy Meter & 2014-W26 & 21.00 & 13.79 \\        1F AHU Energy Meter & 2014-W25 & 19.00 & 9.01 \\        1F AHU Energy Meter & 2014-W26 & 16.00 & 8.97 \\      \toprule     \caption{Table Caption}     \end{longtabu}          \end{document}      ![Output of the latex code](http://i.stack.imgur.com/YwNQL.jpg)


title: Vertically center rule on a page

text: More precisely, I want to get a 18 × 26 cm² landscape box with a rule at the middle. Combining the crop package and this code I got:               \documentclass{article}     \usepackage[paperwidth=18cm,paperheight=26cm]{geometry}     \usepackage[a4,frame,center,noinfo]{crop}          \begin{document}%     \thispagestyle{empty}%     \topskip0pt     \baselineskip0pt     \vspace*{\fill}%     \noindent\makebox[\linewidth]{\rule{\paperwidth}{0.4pt}}%     \vspace*{\fill}%     \end{document}      But as you can see (I reduced the size to 5 × 2 so it's more visible), the rule isn't exactly halfway. ![Halfway rule](http://i.stack.imgur.com/5aXJ3.png) I assume this is due either to the box's margins or the rule's margins. How to work this out?


title: Size of vertices of a graph in Tikz

text: I'm trying to produce a graph in Tikz using the _Simple_ style but the vertices won't get smaller than 6pt or so and I'd like them to be much smaller. The code looks like this and if you try it out, the vertices don't actually shrink to 2pt.               \begin{tikzpicture}     \GraphInit[vstyle=Simple]     \SetGraphUnit{1.5}     \tikzset{VertexStyle/.style = {shape = circle,fill = black,minimum size = 2pt}}     \Vertex{D}     \NOEA(D){A}     \SOEA(A){B}     \SOEA(D){C}              % \Edges{A,B,C,D,A}     \Edges(A,B,C,D,A)     \end{tikzpicture}      Any ideas?


title: Two figures side by side caption issue

text: I have searched around for two hours without luck. So I hope someone can help me this issue. Basically I want to place two different figures side by side to save space in my report. So I don't want subfigures with common caption here. I tried using minipage as follows:               \begin{figure}[ht]     \begin{minipage}[b]{.5\textwidth}     \centering     \includegraphics[width=1\textwidth]{figs/test1.png}     \caption{This is caption of test1.}     \label{fig:HOG_resolution}     \end{minipage}     \hfill     \begin{minipage}[b]{.4\textwidth}     \centering     \includegraphics[width=1\textwidth]{figs/test2.png}     \caption{This caption for test 2 is longer than the caption in test1. It should spread on two lines}     \label{fig:block_overlap}     \end{minipage}     \end{figure}      My figures show up fine, except for the captions. The first caption is missing, the second one shows up at the position of the first one. ![enter image description here](http://i.stack.imgur.com/YIi69.png) My preamble is as follows:               \documentclass[11pt]{report}          \usepackage{graphics}     \usepackage{graphicx}     \usepackage{caption}     \usepackage[caption=false]{subfig}     \usepackage{float}          \usepackage{multirow}     \restylefloat{figure}     \usepackage[top=2.5cm, bottom=2.5cm, left=2.75cm, right=2.75cm]{geometry}          \usepackage[titles,subfigure]{tocloft}          \usepackage[bookmarks]{hyperref}          \lstnewenvironment{code}[1][]       {\minipage{\linewidth}         \lstset{#1}}       {\endminipage}          \newcommand{\myvec}[1]{\bf{#1}}     \newcommand{\mymtrx}[1]{\bf{#1}}      I also tried `\captionof` instead of `\caption` (u probably see I put `\usepackage{caption}` at my preamble) but it doesn't work. I also use package `subfig` because I want to create subfigures side by side as well, and I dont have problem with that.


title: How to draw lemniscate with TikZ

text: How to draw e.g. the given set (known as Brauer Cassini Ovals)                    { z : |z-a|·|z-b| <= c }      in the complex plane The question is just about how to draw this (filled or unfilled) curve, not how to the coordinate system or something else. Is there an easy way to do this with TikZ or do I have to use pstricks / gnuplot / or somethin similar? I would prefer using TikZ only, because I already have a complex plot done in TikZ, to which I want to add some of those lemniscates.


title: How to change bibliography to webography in lyx 2.0.2?

text: I'm writing a report with lyx 2.0.2 and I want to insert in the end a webography which is the same as bibliography but its called webography instead. So what I want basically is either to change the bibliography to webography, or if there's another way of inserting a webography in my report. ## update: Well it's not exactly like a bibliography, the references in the webography are just urls. ## update 2: Actually, I don't just want to change the heading of the bibliography to 'Webography' I want to change the behavior too, 'Webography' will contain references for Urls, just Urls not like bibliography author, and other stuff.   And I'm using the report class. ## update 3: I have this in the head of the lyx document:               \newpage\pagestyle{fancy}\lhead {ISI}\lfoot{Shiny development}\renewcommand{\footrulewidth}{0.4pt}\cfoot{}\fancyfoot[R]{\thepage}     \makeatletter       \let\ps@plain=\ps@empty      \makeatother     \widowpenalty=10000      \clubpenalty=10000      \raggedbottom       \pagenumbering{arabic}      And now after trying @Torbjørn's answer, I keep having this error:               ! Package natbib Error: Bibliography not compatible with author-year citations.      And putting the cursor at this line:               \makeatother      And that happen even when I try to see the DVI version and when I remove the bibliography everything works fine.   By the way this is my first time writing something with lyx or latex.


title: How to prevent hyphenation in title (\maketitle)?

text: I want to have a `\maketitle` title page where every word in the title is not hyphenated. Elsewhere I wouldn't mind hyphenation of the title (e.g., in the Reference List), but on the title page it looks very bad! I'm using the report class. It seemed like an obvious question, but I haven't found answers on Stackexchange nor elsewhere no the web.


title: Is it possible to have italic and bold text, and linebreaks under the \underline{text} command?

text: I was trying to emphasize text with \textbf, \textit and \underline commands. But the text will not automatically wrap to the next line. I also tried the {ulem} package, and it did not work too. Does anybody know how to have italic, bold, underline and linebreaks for some text?


title: Beamer vs. TikZ: uncover nodes step-by-step

text: I'm trying to uncover a TikZ image piece-by-piece like so:               \documentclass{beamer}          \usepackage{tikz}     \usetikzlibrary{positioning}           \begin{document}     \begin{frame}{Linearity}     \begin{center}     \begin{tikzpicture}       \node (Ctx) {\visible<2->{$\Gamma$}};       \node[below right=0.5cm and 0.1cm of Ctx] (E) {$E$};       \node[below right=0.5cm and 0.1cm of E] (psi1) {\visible<3->{$\Psi_1$}};     \end{tikzpicture}     \end{center}     \end{frame}     \end{document}      However, this gives the following error message:               ! Package tikz Error: Giving up on this path. Did you forget a semicolon?.          See the tikz package documentation for explanation.     Type  H <return>  for immediate help.      ...                                                        l.16 \end{frame}      If I use `\only` instead of `\visible`, `pdflatex` runs OK but the output jumps around when going from slide to slide, since the invisible nodes don't take up space and thus the `E` node's position changes. So `\visible` is what I need.


title: Biblatex customization: author name format defined by hyphenation (localization)

text: I try to use biblatex (to be customized) with Hungarian babel language definition files. The babel language for Hungarian is called `magyar` (means: Hungarian). I am writing a text in which I cite English and Hungarian articles also. I managed to create _magyar.lbx_ based on _english.lbx_ to be able to use Hungarian text in the bibliography with the help of specifying `hyphenation = {magyar}` in _bib_ files, and it works like a charm. The problem is that I would like to modify the format of bibliography further, as in Hungarian the last and first name are in reversed order, e.g. in Hungarian _Jules, Verne_ is written like: _Verne Jules_. This is implemented in huplain.bst for using with BibTeX (with the option specifying `huname =1`), but unfortunatelly it does not work with author-year format citation (e.g. natbib or babelbib), that is why I had to look for other solutions. It looks like for me, that modifying biblatex's code is the easiest way. Does anyone have idea about how could I put some conditional statements maybe to `\DeclareNameFormat{labelname}` to be able to list Hungarian names in reverse order without a comma between last and first name? I hope it can be done. Thanks for reading! * * * **Editing** on the bases of @michal.h21's answer: I have made a summary in _Hungarian_ language about the results of this topic based on @michal.h21's answer and comments. You can find it here. Most important features do work, some lesser parts are not so sexy, but will work it out somehow. Any extra comments are welcome!


title: Background colour with minted package: code misplaced

text: With the following example               \listfiles     \documentclass{article}     \usepackage{minted}     \definecolor{bg}{rgb}{0.95,0.95,0.95}     \begin{document}     Some text     \begin{minted}{latex}     A test     \end{minted}          Some text     \begin{minted}[linenos=true]{latex}     A test     \end{minted}          Some text     \begin{minted}[bgcolor=bg]{latex}     A test     \end{minted}     \end{document}      the first two code blocks are typeset below the text, but the last one is to the side: ![Example output](http://i.stack.imgur.com/2oVQo.png) I have Pymentize v1.4 installed, and `\listfiles` gives                *File List*      article.cls    2007/10/19 v1.4h Standard LaTeX document class       size10.clo    2007/10/19 v1.4h Standard LaTeX file (size option)       minted.sty    2010/01/27 v1.6 Yet another Pygments shim for LaTeX       keyval.sty    1999/03/16 v1.13 key=value parser (DPC)     fancyvrb.sty    2008/02/07        color.sty    2005/11/14 v1.0j Standard LaTeX Color (DPC)        color.cfg    2007/01/18 v1.5 color configuration of teTeX/TeXLive       pdftex.def    2010/11/26 v0.05c Graphics/color for pdfTeX        float.sty    2001/11/08 v1.3d Float enhancements (AL)       ifthen.sty    2001/05/26 v1.1c Standard LaTeX ifthen package (DPC)         calc.sty    2007/08/22 v4.3 Infix arithmetic (KKT,FJ)     ifplatform.sty    2010/10/22 v0.4 Testing for the operating system     pdftexcmds.sty    2010/04/01 v0.9 Utility functions of pdfTeX for LuaTeX (HO)     infwarerr.sty    2010/04/08 v1.3 Providing info/warning/message (HO)     ifluatex.sty    2010/03/01 v1.3 Provides the ifluatex switch (HO)      ltxcmds.sty    2010/04/26 v1.7 LaTeX kernel commands for general use (HO)     catchfile.sty    2010/04/28 v1.5 Catches the contents of a file (HO)     etexcmds.sty    2010/01/28 v1.3 Prefix for e-TeX command names (HO)     minted-test.w18     supp-pdf.mkii     minted-test.pyg     minted-test.out.pyg     minted-test.out.pyg     minted-test.out.pyg      ***********      This seems like something that would have been noticed as a bug, so what have I got wrong?


title: What is the right way to use the `\!` spacing command?

text: I have noticed that I hardly ever use the `\negthinspace` command `\\!`. This is because I don't know how to use it properly (I do use other spacing commands quite a bit, because I can better understand the guidelines of when they might be useful). When might it be considered appropriate to use this spacing command?


title: tocloft moving toc onto title page below abstract

text: I am using the `tocloft` package in order to reduce the space between the toc header and the table of contents itself. However, the package is causing the table of contents to move up onto the title page, just below the abstract. Is there a way of stopping this effect? Thank you.               \documentclass[pdftex,11pt,a4paper,notitlepage]{report}     \usepackage{tocloft}     \setlength\cftaftertoctitleskip{0pt}          \begin{document}          % Title     \title{Chaos}     \author{Thomas Hopkins \\ School of Physics, University of Southampton}     \date{6th January 2014}     \maketitle % Output Title     % End Title          % Begin Notes          \begin{abstract}     \noindent      hello     \end{abstract}          \tableofcontents          \chapter{Introduction}     hello             \end{document}


title: Why does this simple \ifx test fail?

text: This should be easy, but I don't understand why the test below fails... I expected _Hurrah!_ to be printed when the `\currentchar` count reaches 90 (i.e. the character code of `Z`). There must be some expansion problem somewhere, but I believe I use `\expandafter` as is necessary, here. What am I doing wrong? Should I take a different approach? ![enter image description here](http://i.stack.imgur.com/o2QVH.png)               \def\mysteryletter{Z}          % loop through A-Z to find out the mystery letter     \newcount\currentchar     \currentchar=65 % <-- charcode of A     \loop       \edef\temp{\char\currentchar}       \temp       \expandafter\expandafter\expandafter\ifx\expandafter\mysteryletter\temp Hurrah!\fi       \advance \currentchar by 1       \unless\ifnum \currentchar>90     \repeat          \bye


title: How can I make the header and footer on my first page the same as on all subsequent pages?

text: Various versions of this question have been asked before, but they either have special issues (such as a title page) or I simply can't understand the answer. Here is the start of my latex:               \documentclass[12pt]{article}     \usepackage{fancyhdr}          \textwidth = 7 in     \textheight = 9.5 in     \oddsidemargin = -0.25 in     \evensidemargin = 0.0 in     \topmargin = -0.25 in     \headheight = 0.0 in     \headsep = 0.0 in     \parskip = 0.1 in     \parindent = 0.0 in          \pagestyle{fancy}     \lhead{}     \rhead{my name}     \cfoot{\thepage}     \renewcommand{\headrulewidth}{0.4pt}          \begin{document}      The result is that on the first page the header overwrites the text, but the page number is in a good position. On all remaining pages the header is fine, but the page number is placed too low. Can anyone offer assistance please?


title: Font management, i.e. problems with StandardSymL-Slant_167

text: my Illustrator doesn't know about the font "StandardSymL-Slant_167", which seems to be used in a picture that I createted with gnuplot+pdflatex. At the moment Illustrator is replacing it with another (quite useless) font. I know where to store fonds for the Illustrator. But I just can't find the .ttf file used by latex to creat the picture. I tryed a workaround already, in the sence that I added               \pdfmapline{psyr Symbol}     \font\sy=psyr      to my header in the creation process. This partly worked, in the sence that Illustrator could handle the font now, but the font wasn't properly rasterized or vectorized (or whatever is done by the two lines ... finally it was just hugh pixels). So could someone please help me? I would of course also use another font which looks similar, just dont know how! Edit: While I created the minimal working example, I already realized that the problem is related to the mathptmx package (the same is true for the T1 package). If I don't use this, the issue is gone, but than my lables are ugly. Here is the minimal example:               #Gnuplot script file for plotting data      set terminal epslatex standalone color header \     "\\usepackage{mathptmx}"          plot sin(x) title '$\sin(\mu)$'      Now I create a .tex file with gnuplot and compile it with pfdlatex. Actually I realized that pdflatex has no T1 font called Helvetica so he uses another "standard" font:               LaTeX Font Warning: Font shape `T1/Helvetica/m/n' undefined     (Font)              using `T1/cmr/m/n' instead on input line 59.      Opening this in the Illustrator will make him complain about missing fonts. Edit: I found a way around the issue. If I compile first with latex and than use dvipdf I don't get the issue. I guess now only ps-fonts (or whatever) are used, which are familiar to Adobe. Still this is not a real solution, but for me it's so far working.


title: Why is \thepage set to \relax in a \protected@write?

text: In the kernel the definition of `protected@write` includes the setting of the `\thepage` to `\relax`. Why is this and are there other means to ensure that `thepage` is not expanded?               \long\def \protected@write#1#2#3{%          \begingroup          \let\thepage\relax          #2%          \let\protect\@unexpandable@protect          \edef\reserved@a{\write#1{#3}}%          \reserved@a          \endgroup          \if@nobreak\ifvmode\nobreak\fi\fi         }


title: Hyperref, \noappendicestocpagenum appendix option, and table of contents

text: In my thesis, I am using both the `appendix` package and the `hyperref` package. When I get to the appendix, I use the following commands:               \appendix     \noappendicestocpagenum     \addappheadtotoc     \appendixpage      In the table of contents, `hyperref` is providing links on just the page numbers, using the `linktocpage=true` option. There is no page number for the "Appendices" page displayed on the table of contents thanks to the `\noappendicestocpagenum` command; however, `hyperref` generates a small empty red box regardless. Is there a way to stop this box from forming? Here is a minimal working example.               \documentclass{report}     \usepackage{appendix}     \usepackage[pdftex,linktocpage=true]{hyperref}          \begin{document}          \tableofcontents          \chapter{Chapter Name}     Here is my document.          \clearpage     \appendix     \noappendicestocpagenum     \addappheadtotoc     \appendixpage          \chapter{Appendix Name}     Here is my appendix.          \end{document}


title: A black cell is showed where I try to create a colored cell.

text: I'm trying to create a colored table with something like this code:               \documentclass[a4paper,twoside]{book}      \usepackage{amsmath}     \usepackage{color}     \usepackage{tabularx}     \usepackage{colortbl}          \pagestyle{empty}     \definecolor{lightblue}{cmyk}{0.5,0,0,0}     \definecolor{lightgrey}{cmyk}{0.25,0,0.25,0}          \begin{document}          \begin{tabularx}{\textwidth}{|X|X|}       \hline       \rowcolor{lightblue}       Item 1 & Item 2 \\        \rowcolor{lightgrey}       $$A=\left(\begin{smallmatrix}0&0&0\\0&0&0\end{smallmatrix}\right)$$ &        $$B=\left(\begin{smallmatrix}1&1&1\\1&1&1\end{smallmatrix}\right)$$ \\       \hline     \end{tabularx}          \end{document}      But in the second row the first cell is completely black! Why?. I tried to change `smallmatrix` to `matrix` but then the cell shows a little black box. I don't understand nothing!


title: Style/macros for outlines in Plain TeX

text: I'm seeking a style file or other macros for creating an outline in Plain TeX, of the traditional indented style, eg.               I.  Big Idea           A.  Sub idea           B.  Sub idea               1.  Thought                   a.  Sub thought      I'd love to write one (some day) if no one has done this yet, and if anyone might be interested in collaborating.


title: URL line breaks with biblatex

text: How do I allow long URLs to have line breaks at any point. This is in the bibliography not the main text. I am trying to save space so don't want extra spaces to be added to make it only break at slashes, for example, as it does by default. I am using `biblatex`+`biber`.


title: Best style (.bst) for Harvard bibliography with Natbib using LyX

text: Learning LaTeX and using LyX. I'm using BibTeX and **natbib.sty** for citing. Which .bst is the best for Harvard bibliographies? **elsearticle-harv.bst** is the closest one I have come across. I have tried to tweak various .bst files for my purposes but it was really not intuitive. But there are no parentheses around the published year and no separation (e.g. "," or ":") between the title and the volume and number information. I would also prefer Vol. and No. before the respective information but it's not a priority.


title: Function and usage of \leavevmode

text: I am beginner of LaTeX. From many examples I found, I notice that it's very common to use command `\leavevmode`. I can't find any information about this command. Could anyone tell me what's the function of it and how to use it?


title: Reserve the place for further overlays

text: I have 3 parts in a `tabular`, I want `onslide1-` to be always displayed. After 1 clic, I want `only2` to be shown; after another clic, at the position of `only2`, I want `only3-` to replace `only2` forever; after another clic, `onslide4-` will appear. The code is as follows:               \documentclass{beamer}     \usetheme{Boadilla}     \usepackage[frenchb]{babel}          \begin{document}          \begin{frame}       \begin{tabular}{ll|ll}         \onslide<1->{           \\\hline onslide1- \\\hline         }              \onslide<2->{         \only<2>{           \\[-2.8ex]           only2\\\vspace{3cm}\\only2           \\\hline         }%              \only<3->{           \\[-2.8ex]           only3-\\\vspace{3cm}\\only3-           \\\hline         }}              \onslide<4->{           \\\hline onslide4- \\\hline         }            \end{tabular}     \end{frame}      The problem is when `onslide1-` is displayed in the very beginning, it doesn't leave the place for `only2` or `only3-` which will appear later. I try to add a `\onslide<2->`, because normally `\onslide` reserve the place, but it doesn't work here... Does anyone know how to solve that? PS: I realize that the following code, which is simpler than previous, has same problem:               \begin{frame}     \begin{tabular}{ll|ll}       \onslide<1->{onslide1\\}       \only<2>{only2\\}%       \only<3->{only3-\\}       \onslide<4->{onslide4-\\}      \end{tabular}     \end{frame}      However, the following code doesn't have this problem. So it seems that it is due to the position of `\\\`, but I do need `\\\\\hline` in the initial code.               \begin{frame}     \begin{tabular}{ll|ll}       \onslide<1->{onslide1}\\       \only<2>{only2}%       \only<3->{only3-}\\       \onslide<4->{onslide4-}\\      \end{tabular}     \end{frame}


title: Using a character as a macro within another macro in (La)TeX

text: Goal: What I would like to do is to allow `_` and `^` to be used to generate sub and superscripts in text mode only within a specific macro. I know that I can make `_` and `^` active throughout the document, but that messes with other packages which assume that they will not be. I've dug around a bit, and haven't found an example that implements something close to what I want. I've been basing my code off of examples like http://www.tex.ac.uk/cgi- bin/texfaq2html?label=actinarg This works for creating a command in which the argument is typeset with `_` and `^` being active:               \documentclass{article}     \begin{document}     \begingroup     \catcode`_=\active%     \gdef_#1{\ensuremath{{}\sb{#1}}}%     \catcode`^=\active%     \gdef^#1{\ensuremath{{}\sp{#1}}}%     \endgroup          \def\subsup{%       \begingroup         \catcode`_=\active         \catcode`^=\active         \Xsubsup     }     \def\Xsubsup#1{%         #1%       \endgroup     }          \subsup{foo_x bar^y baz}          % foo_a bar^b baz % this will cause an error because _ is not active.      Now, if I add the function that I want to embed this in:               \DeclareRobustCommand*\newMacro[2][\null]{       % other processing and formatting not directly relevant to this example       \subsup{#2}%     }          \newMacro{foo_x bar^y baz}     \end{document}      I get math mode errors:               ERROR: Missing $ inserted.          --- TeX said ---     <inserted text>                      $     l.28 \newMacro{foo_x bar^y baz}      So I tried to embed the subsup macros into `newMacro` (I've repeated some of the code from above for ease of copying and pasting.):               \documentclass{article}     \begin{document}     \begingroup     \catcode`_=\active%     \gdef_#1{\ensuremath{{}\sb{#1}}}%     \catcode`^=\active%     \gdef^#1{\ensuremath{{}\sp{#1}}}%     \endgroup          \DeclareRobustCommand*\newMacro[2][\null]{     \def\subsup{%       \begingroup         \catcode`_=\active         \catcode`^=\active         \Xsubsup     }     \def\Xsubsup#1{%         #1%       \endgroup     }       % other processing and formatting not directly relevant to this example       \subsup{#2}%     }          \subsup{foo_x bar^y baz} %this is undefined, and so fails because newMacro hasn't been called yet.          \newMacro{foo_x bar^y baz}          \subsup{foo_x bar^y baz} % this works because it comes after newMacro has been called.     \end{document}      This still doesn't work, but now I get the error:               ERROR: Use of \Xsubsup doesn't match its definition.          --- TeX said ---     \\newMacro  ...\Xsubsup #1{#1\endgroup } \subsup {                                                       #2}     l.28 \newMacro{foo_x bar^y baz}      Why do the two `subsup` functions work only when not embedded in another macro? Why do I get errors that `Xsubsup` doesn't match its definition only when it is embedded within another macro? Is there anyway to get around this?


title: Tokenize and apply command

text: I have a string separated with commas. On that I want to get each element and apply a command. I have the following, which works.               \documentclass[12pt]{article}          \usepackage[trim]{tokenizer}          \newcommand{\cadd}[1]{             \def\Source{#1}         \whiledo{\not\equal{\Source}{}}         {             \GetTokens{TokenOne}{TokenTwo}{\Source}             \textbf{\TokenOne}             \let\Source\TokenTwo         }     }          \begin{document}          \cadd{a,b,c}          \end{document}      But I would like to have the following               \documentclass[12pt]{article}          \usepackage[trim]{tokenizer}          \newcommand{\cadd}[1]{         \whiledo{\not\equal{#1}{}}         {             \GetTokens{TokenOne}{TokenTwo}{#1}             \textbf{\TokenOne}             \let\#1\TokenTwo         }     }          \begin{document}          \cadd{a,b,c}          \end{document}      But the `\let\\#1\TokenTwo` is giving an error. How can I use `#1` with `\let`


title: Plain TeX and underscores

text: We have a bunch of scripts to generate invoices for our customers. It creates plain TeX files from CSV and then PDF files (using the `pdftex` program). This "black box" was created by one of our former employee. Frankly, I don't understand TeX or plain TeX at all. Recently, we added customer that has underscore character in his address. The "black box" stopped working until I googled up, that I have to escape underscore characters like this: `\\_` Scripts are working well again, but a new problem occurred. When I copy & paste the text from final PDF (to email or text editor or somewhere else), the underscore characters disappears (they are replaced with spaces `0x20`). In Acroread or other PDF viewers they are displayed properly. They just cannot be "copied out". It looks like in PDF it is some other character than in other fonts. Please help


title: natbib: combining chicago style and sorting by appearance

text: I would like my citations to be formatted according to the Chicago style, and at the same time numbered by order of appearance. The `sort&compress` option does work as expected using `unsrt` bibliography style, with citations numbered by order of appearance. However, they get automatically sorted alphabetically as soon as I replace `unsrt` with `chicago` for the bibliography style:               \usepackage[numbers, sort&compress]{natbib}          ... document...          \bibliographystyle{chicago}               \bibliography{main}      Is it possible to get citations styled according to `chicago` but sorted according to `unsrt` (that is, by order of appearance)?


title: How to arrange a table and figure side by side with all captions on one side

text: To maximize space, I'm trying to put an table and image side-by-side in a document. As the image is longer than the table, I want to put both captions under the table (if possible). I envisage this looking something like as follows. ![example output](http://i.stack.imgur.com/UCh3w.png) I've followed the steps in this example. However I can't find a way to move the figure caption under the table. Here is some working code:               \documentclass{article}          \usepackage[demo]{graphicx} % for inclusion of graphics     \usepackage{floatrow}     \newfloatcommand{capbtabbox}{table}[][\FBwidth]     \usepackage{booktabs}          \begin{document}          \begin{figure}[t]     \begin{floatrow}     \TopFloatBoxes       \capbtabbox{         \begin{tabular}{ccc} \toprule         Heading 1 & Heading 2 & Heading 3 \\ \midrule           1 & $\{1\}$ & A  \\            2 & $\{1,2\}$ & B   \\            3 & $\{1,2,3\}$ & C  \\            4 & $\{1,2,3,4\}$ & D  \\            5 & $\{1,2,3,4,5\}$ & E  \\            6 & $\{1,2,3,4,5,6\}$ & F  \\            7 & $\{1,2,3,4,5,6,7\}$ & G  \\            8 & $\{1,2,3,4,5,6,7,8\}$ & H  \\           9 & $\{1,2,3,4,5,6,7,8,9\}$ & I  \\            10 & $\{1,2,3,4,5,6,7,8,9,10\}$ & J  \\ \bottomrule         \end{tabular}     }{       {\caption{A caption for a table in a figure and a table side by side}\label{fig:test}}     }     \ffigbox{       \includegraphics[height=8cm]{Images/preNet.pdf}       }{       {\caption{A caption for a figure in a figure and a table side by side}\label{fig:test}}     }     \end{floatrow}     \end{figure}          \end{document}


title: Too long horizontal line

text: I'm creating a table. Under the table I added an horizontal line in order to add a note with *. I used the following string: > >      \hline\noalign{\smallskip} >   Unfortunately the horizontal line seems to be too long respect to the margins of the table.   NB: the caption will be under the note * Any suggestion to solve such simple problem? ![enter image description here](http://i.stack.imgur.com/gv63p.png) Example: > >     ............   >     \bottomrule   >     \end{tabular}   >      }   >     \vspace{0.1cm}   >      \tiny *this is my note.   >      \end{center}   >      \vspace{-0.3cm} >      \hline\noalign{\smallskip} >      \caption[] { >      \footnotesize \textbf{my caption} \\ >       ![my caption is ....][2] >       } \\ >       \label{tab: Table 3.1} >       \end{table*} >       \end{landscape}   >   Best


title: How to specify an arbitrary slope with the vector command?

text: i want to draw a vector with the `vector` command, but it seems like that the slope must be specified in integers less than some limit, thus commands like               \put(0,10){\vector(8,7){200}}      will failed to compile, but this works:               \put(0,10){\vector(1,0){200}}      so how can i specify arbitrary slope, is there a way to specify two endpoints rather than specifying the slope


title: How to make the main ticks of \psgraph get aligned with the main grids of \psgrid?

text: How to make the main ticks of `\psgraph` get aligned with the main grids of `\psgrid`?               \documentclass[pstricks,border=0bp,12pt,dvipsnames]{standalone}     \usepackage{pst-plot}          \usepackage[nomessages]{fp}          \FPset\TrigLabelBase{4}     \FPeval\XMin{0-pi}     \FPeval\XMax{2*pi}     \FPset\YMin{-3}     \FPset\YMax{3}          \FPeval\DeltaX{pi/TrigLabelBase}     \FPeval\DeltaY{1}          \FPeval\Left{XMin-DeltaX/2}     \FPeval\Right{XMax+DeltaX/2}     \FPeval\Bottom{YMin-DeltaY/4}     \FPeval\Top{YMax+DeltaY/4}          \newlength\Width\Width=12cm     \newlength\Height\Height=6cm          \newlength\urx\urx=15pt     \newlength\ury\ury=15pt     \newlength\llx\llx=-5pt     \newlength\lly\lly=-5pt          \newpsstyle{gridstyle}     {         gridwidth=0.4pt,% 0.8pt         gridcolor=red!20,% black         griddots=0,% 0          %=====================================         gridlabels=0pt,% 10pt         gridfont=NimbusSanL-Regu,         gridlabelcolor=blue!50,% black, must not use dvipsnames         %=====================================         subgriddiv=10,% 5         subgridwidth=0.1pt,% 0.4pt         subgridcolor=green!50,% gray         subgriddots=0% 0     }          \psset     {         urx=\urx,         ury=\ury,         llx=\llx,         lly=\lly,         trigLabels,         trigLabelBase=\TrigLabelBase,         xAxisLabel=$x$,         yAxisLabel=$y$,         tickcolor=gray,         ticksize=0 -4pt,         labelFontSize=\scriptstyle,         style=gridstyle,     }                         \begin{document}          \begin{psgraph}[dx=\DeltaX,dy=\DeltaY,linecolor=gray]{->}(0,0)(\Left,\Bottom)(\Right,\Top){\dimexpr\Width-\urx+\llx}{!}%{\dimexpr\Height-\ury+\lly}         \psgrid[xunit=\DeltaX,dx=\DeltaX](\Left,\Bottom)(\Right,\Top)     \end{psgraph}          \end{document}      ![enter image description here](http://i.stack.imgur.com/Axp7J.png)


title: How to change the pointing location of an edge to a state using the TikZ automata package?

text: When there are two nodes pointing to the same node, the picture looks odd because they point to the same location. How can I change the location of pointing? For instance,               \documentclass[10pt,letterpaper]{article}     \usepackage[latin1]{inputenc}     \usepackage[left=1in,right=1in,top=1in,bottom=1in]{geometry}      \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}          \def\xcolorversion{2.00}     \def\xkeyvalversion{1.8}          \usepackage[version=0.96]{pgf}     \usepackage{tikz}     \usetikzlibrary{arrows,shapes,snakes,automata,backgrounds,petri,positioning}          \begin{document}             \textbf{DFA}\\         \begin{tikzpicture}[shorten >=1pt,node distance=3cm,on grid,auto]              \node[state,initial,accepting]      (q_0)                           {$q_0$};             \node[state,accepting]              (q_1)   [right=of q_0]          {$q_1$};             \node[state]                        (q_2)   [right=of q_1]          {$q_2$};                 \node[state,accepting]              (q_3)   [right=of q_2]          {$q_3$};              \node[state]                        (q_4)   [above right=of q_3]    {$q_4$};                 \node[state,accepting]              (q_5)   [below right=of q_3]    {$q_5$};                          \path[->]             (q_0)   edge    [bend right]        node {0}            (q_1)             (q_0)   edge    [bend right]        node {1}            (q_3)                  (q_1)   edge    [above,bend right]  node {0}            (q_0)             (q_1)   edge    [above,bend right]  node {0}            (q_3)                  (q_2)   edge                        node {0}            (q_1)             (q_2)   edge    [above,bend left]   node {0}            (q_4)                  (q_3)   edge                        node {0,1}          (q_5)                  (q_4)   edge                        node {0,1}          (q_3)             (q_5)   edge    [loop below]        node {0,1}          (q_1)                  ; %end path          \end{tikzpicture}     \end{document}        ![Output of code](http://i.stack.imgur.com/Ru1Lh.png) What I want to achieve is one arrow to point to below the circle and the other point to somewhere else.


title: Seamless background of subfigure bodies, but not captions

text: I have 3 sub-figures:               \begin{figure}         \subfloat[Apple]{             \includegraphics{apple}         }         \subfloat[Orange]{             \includegraphics{orange}         }         \subfloat[Cherry]{             \includegraphics{cherry}         }     \end{figure}      I want the background behind the row of images to be a solid black rectangle, with no gaps between the images. How can I achieve this? I have used `colorbox` around the separate images, but this leaves gaps between them. If I wrap the whole thing in a `colorbox` then the captions also have the background color, which I do not want. I have also tried putting a `tikz` node in the top left and bottom right, but using `overlay` puts a black box on top of the images, not below them.


title: Changing babel package inside a single chapter

text: I have a document written in British English and I am using `\usepackage[british]{babel}` in the preamble; however, this same document also has an abstract written in a different language, whose hyphenation is of course all wrong. Is there any way to specify something akin to `\usepackage[british]{babel}`, but just inside a chapter?


title: Abbreviating number ranges in BibLaTeX

text: I'm using `biblatex` for bibliography management, and I'm required to use numbered citation style where references are sorted after citation order. Thus, I've loaded the package like this:               \usepackage[sorting=none]{biblatex}      Now when I cite multiple sources in the same citation               Some statement \cite{source1,source2,source3,source4}.      I get the following result: > Some statement [1, 2, 3, 4]. but I'd rather have the following: > Some statement [1-4]. Ideally, it should let two citations remain as [1, 2], while three or more should become [1-3] etc. I've looked in the documentation for options that define this behavior, but apparently I don't know what I'm looking for. (Most of my internet searches drown in results on how to abbreviate page ranges...)


title: Labels on the left and inline names in pgfgantt

text: I am trying to create what they EU calls a "gantt" chart for the purpose of a research proposal. To do this I need to have multiple elements in the same line with their labels inline, but also a label on the left. E.g.               Label: | |bar 1|             |bar 2|  |bar 3||      How can I achieve it using pgfgantt?


title: How to use three dots and brackets with TikZ to draw Automaton state machine?

text: I tried to add a curly braces below all the states in order to group them, but I couldn't find a way to make it work. Furthermore, how could I draw a three dots as a state since I need to prove a theorem by induction on n. Here is what I have so far.               \documentclass[10pt,letterpaper]{article}     \usepackage[latin1]{inputenc}     \usepackage[left=1in,right=1in,top=1in,bottom=1in]{geometry}      \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage{tikz}     \usetikzlibrary{automata,positioning}          \begin{document}         \begin{tikzpicture}[shorten >=1pt,node distance=2cm,on grid,auto]              \node[state,initial]                (q_0)                           {$a$};             \node[state]                        (q_1)   [right=of q_0]          {$a^2$};             \node[state]                        (q_2)   [right=of q_1]          {$a^3$};             \node[state,accepting]              (q_3)   [right=of q_2]          {$a^n$};                      \path[->]             (q_0)   edge                        node {a}            (q_1)               (q_1)   edge                        node {a}            (q_2)              (q_2)   edge                        node {...}          (q_3)              (q_3)   edge    [loop above]        node {a}            (q_3)             ; %end path          \end{tikzpicture}   \\     \end{document}        This is the picture that illustrates what I meant: ![enter image description here](http://i.stack.imgur.com/OzTZ5.png) Thank you


title: Where to look up argument for a function in TikZ?

text: For instance,               (q_5)   edge    [loop above]        node {a}            (q_5)      This is Automaton package, the one I want to look up is `[loop above]`, I want to know what other options can I put in there. I know there are:   * `[bend left]`   * `[bend right]`   * `[loop above]`   * `[loop below]` I checked at http://www.texample.net/tikz/examples/state-machine/ but all I found were just examples :(. There are no manual or reference to look up optional arguments..., I guess there must be one, but somehow I couldn't find them. So where can I find these documents?


title: Making advanced table. Centering and line above tabular environment, 3 columns

text: I need some help creating the table below. I only need the full sample and parameters columns, and therefore only three columns. However I have issues with centering, top line above the TABLE 3 and Caption. What i ran so far (now I only use 2 columns, so need to add 1). And yes, I want to fill the entire page..:               \documentclass{article}     \usepackage{booktabs,amsmath,caption,dcolumn}     \newcolumntype{d}[1]{D..{#1}}       \begin{document}     \begin{table}[h]     \caption{\textbf {\textsc{Parameter estimates of the No-Arbitrage Yield only model}}}     \label{table:Parameter estimates of the No-Arbitrage Yield only model}     \begin{tabular*}{\textwidth}{@{}l@{\extracolsep{\fill}}d{4}d{4}d{4}@{}}%definerer antall kolonner     \toprule[0.5pt]     \toprule[0.5pt]     Parameters & \multicolumn{2}{c}{Full Sample} \\     \midrule[0.5pt]     \textbf{$\delta_0$}\\     & & \text{Factor autoregressive parameters}\\     $\rho_{LL}$& 1.000 & (0.342) \\     $\rho_{SS}$& 0.999 & (0.233)\\                         & \\             $\lambda_S^0$& &\\             $\lambda_L^0$& &\\             $\lambda_S^1$& 0.0912 &\\             $\lambda_S^1$&-0.1612 &\\             \\             $\sigma_L$   &0.0340 &\\             $\sigma_L$   &0.0795 &\\       \hline \hline     \end{tabular*}      \scriptsize      Notes:\hfill\parbox[t]{14cm}{The table shows the results from the market model estimations. Each column presents the mean and standard deviation for all the companies' CAR in the designated event window period. The first column, (0, 2), reports $\mu$ and $\sigma$ for the event window period spanning from day 0 to 2 days after the dividend announcement (3 day window). Where day [0] is the dividend announcement day. Columns (2), (3) and (4) widens the event window to 5, 11 and 21 days. The t-values are reported below in parentheses and calculated as $\frac{\mu}{\sigma/\sqrt{n}}$. ***, ** and * denote significance at the 1, 5 and 10\% levels, respectively.}     \end{table}     \end{document}      ![Table](http://i.stack.imgur.com/4L56z.png)


title: What is the best referencing tool for LaTeX?

text: I'm using TexShop on Mac and have a .bib file with references exported by Zotero. One disadvantage of this method is that CiteKeys where I can use in- text referencing `\cite{citekeys}` cannot be modified to my own custom keys. I tried using BibDesk but realised a problem where the letter cases of authors and documents are not always capitalised correctly. Furthermore more, when I re-import my `.bib` file to Zotero, it labels all websites as "books" which is very inconvenient for me to change back to the correct label. There are dozens of other pieces software online but I don't know which is the best, also I have been using LaTeX for a week only, so my expertise is very limited on the topic. Similar to Zotero and BibDesk, I'm looking for a program that has these features:   * GUI to enter reference details (author - date etc)   * A way to assign custom Citekeys   * Easy integration with BibTeX   * Compatible with Mac OS X   * Does not have complications (similar to BibDesk)   * Does not need `emacs` or `vim` etc.. Is there such a program that is considered 'one of the best' out there that I haven't found ? Please let me know.


title: How can I make a standard timeline?

text: I am looking to make a standard timeline, nothing fancy, like the one below (although, it does not have to be like that) using any library. How can I go about the achieving this in the best way? ![A standard timeline](http://i.stack.imgur.com/56lT6.png)


title: How to align this long equation which out put from Mathematica

text: I use _Mathematica_ , and use the command TeXForm from _Mathematica_ , I get ![enter image description here](http://i.stack.imgur.com/RUanV.gif)                   \{\{x\to -19,y\to 4,z\to 11,t\to -14,m\to            11,n\to 19\},\{x\to -19,y\to 4,z\to 11,t\to            19,m\to 11,n\to -14\},\{x\to -16,y\to -6,z\to            17,t\to -6,m\to 2,n\to 21\},\{x\to -16,y\to            -2,z\to 5,t\to 19,m\to 14,n\to -8\},\{x\to            -16,y\to -2,z\to 14,t\to -8,m\to 5,n\to            19\},\{x\to -16,y\to 13,z\to 2,t\to -17,m\to            17,n\to 13\},\{x\to -16,y\to 13,z\to 17,t\to            13,m\to 2,n\to -17\},\{x\to -10,y\to 16,z\to            -4,t\to -14,m\to 17,n\to 7\},\{x\to -10,y\to            16,z\to 17,t\to 7,m\to -4,n\to -14\},\{x\to            -8,y\to -14,z\to -8,t\to 19,m\to 19,n\to            4\},\{x\to -8,y\to -14,z\to 19,t\to 4,m\to            -8,n\to 19\},\{x\to -8,y\to 6,z\to 4,t\to            -6,m\to 7,n\to 9\},\{x\to -8,y\to 6,z\to            7,t\to 9,m\to 4,n\to -6\},\{x\to -8,y\to            19,z\to -8,t\to -14,m\to 19,n\to 4\},\{x\to            -8,y\to 19,z\to 19,t\to 4,m\to -8,n\to            -14\},\{x\to -7,y\to -5,z\to -1,t\to 13,m\to            11,n\to 1\},\{x\to -7,y\to -5,z\to 11,t\to            1,m\to -1,n\to 13\},\{x\to -5,y\to 4,z\to            4,t\to -2,m\to 4,n\to 7\},\{x\to -5,y\to            4,z\to 4,t\to 7,m\to 4,n\to -2\},\{x\to            -4,y\to -14,z\to -10,t\to 16,m\to 17,n\to            7\},\{x\to -4,y\to -14,z\to 17,t\to 7,m\to            -10,n\to 16\},\{x\to -4,y\to 1,z\to 2,t\to            7,m\to 5,n\to 1\},\{x\to -4,y\to 1,z\to            5,t\to 1,m\to 2,n\to 7\},\{x\to -4,y\to            6,z\to 2,t\to -3,m\to 5,n\to 6\},\{x\to            -4,y\to 6,z\to 5,t\to 6,m\to 2,n\to            -3\},\{x\to -2,y\to 0,z\to 1,t\to 6,m\to            4,n\to 3\},\{x\to -2,y\to 0,z\to 4,t\to            3,m\to 1,n\to 6\},\{x\to -1,y\to -2,z\to            -1,t\to 7,m\to 5,n\to 4\},\{x\to -1,y\to            -2,z\to 5,t\to 4,m\to -1,n\to 7\},\{x\to            -1,y\to 1,z\to 2,t\to 4,m\to 2,n\to            4\},\{x\to -1,y\to 3,z\to 2,t\to 3,m\to            2,n\to 3\},\{x\to -1,y\to 4,z\to 2,t\to            1,m\to 2,n\to 4\},\{x\to -1,y\to 4,z\to            2,t\to 4,m\to 2,n\to 1\},\{x\to -1,y\to            7,z\to -1,t\to -2,m\to 5,n\to 4\},\{x\to            -1,y\to 7,z\to 5,t\to 4,m\to -1,n\to            -2\},\{x\to -1,y\to 13,z\to -7,t\to -5,m\to            11,n\to 1\},\{x\to -1,y\to 13,z\to 11,t\to            1,m\to -7,n\to -5\},\{x\to 1,y\to 1,z\to            1,t\to 4,m\to 1,n\to 4\},\{x\to 1,y\to 3,z\to            1,t\to 3,m\to 1,n\to 3\},\{x\to 1,y\to 4,z\to            1,t\to 1,m\to 1,n\to 4\},\{x\to 1,y\to 4,z\to            1,t\to 4,m\to 1,n\to 1\},\{x\to 1,y\to 6,z\to            -2,t\to 0,m\to 4,n\to 3\},\{x\to 1,y\to            6,z\to 4,t\to 3,m\to -2,n\to 0\},\{x\to            2,y\to -17,z\to -16,t\to 13,m\to 17,n\to            13\},\{x\to 2,y\to -17,z\to 17,t\to 13,m\to            -16,n\to 13\},\{x\to 2,y\to -3,z\to -4,t\to            6,m\to 5,n\to 6\},\{x\to 2,y\to -3,z\to            5,t\to 6,m\to -4,n\to 6\},\{x\to 2,y\to            1,z\to -1,t\to 4,m\to 2,n\to 4\},\{x\to            2,y\to 1,z\to 2,t\to 4,m\to -1,n\to            4\},\{x\to 2,y\to 3,z\to -1,t\to 3,m\to            2,n\to 3\},\{x\to 2,y\to 3,z\to 2,t\to 3,m\to            -1,n\to 3\},\{x\to 2,y\to 4,z\to -1,t\to            1,m\to 2,n\to 4\},\{x\to 2,y\to 4,z\to            -1,t\to 4,m\to 2,n\to 1\},\{x\to 2,y\to            4,z\to 2,t\to 1,m\to -1,n\to 4\},\{x\to            2,y\to 4,z\to 2,t\to 4,m\to -1,n\to            1\},\{x\to 2,y\to 7,z\to -4,t\to 1,m\to            5,n\to 1\},\{x\to 2,y\to 7,z\to 5,t\to 1,m\to            -4,n\to 1\},\{x\to 4,y\to -6,z\to -8,t\to            6,m\to 7,n\to 9\},\{x\to 4,y\to -6,z\to            7,t\to 9,m\to -8,n\to 6\},\{x\to 4,y\to            -2,z\to -5,t\to 4,m\to 4,n\to 7\},\{x\to            4,y\to -2,z\to 4,t\to 7,m\to -5,n\to            4\},\{x\to 4,y\to 3,z\to -2,t\to 0,m\to            1,n\to 6\},\{x\to 4,y\to 3,z\to 1,t\to 6,m\to            -2,n\to 0\},\{x\to 4,y\to 7,z\to -5,t\to            4,m\to 4,n\to -2\},\{x\to 4,y\to 7,z\to            4,t\to -2,m\to -5,n\to 4\},\{x\to 5,y\to            1,z\to -4,t\to 1,m\to 2,n\to 7\},\{x\to            5,y\to 1,z\to 2,t\to 7,m\to -4,n\to            1\},\{x\to 5,y\to 4,z\to -1,t\to -2,m\to            -1,n\to 7\},\{x\to 5,y\to 4,z\to -1,t\to            7,m\to -1,n\to -2\},\{x\to 5,y\to 6,z\to            -4,t\to 6,m\to 2,n\to -3\},\{x\to 5,y\to            6,z\to 2,t\to -3,m\to -4,n\to 6\},\{x\to            5,y\to 19,z\to -16,t\to -2,m\to 14,n\to            -8\},\{x\to 5,y\to 19,z\to 14,t\to -8,m\to            -16,n\to -2\},\{x\to 7,y\to 9,z\to -8,t\to            6,m\to 4,n\to -6\},\{x\to 7,y\to 9,z\to            4,t\to -6,m\to -8,n\to 6\},\{x\to 11,y\to            -14,z\to -19,t\to 4,m\to 11,n\to 19\},\{x\to            11,y\to -14,z\to 11,t\to 19,m\to -19,n\to            4\},\{x\to 11,y\to 1,z\to -7,t\to -5,m\to            -1,n\to 13\},\{x\to 11,y\to 1,z\to -1,t\to            13,m\to -7,n\to -5\},\{x\to 11,y\to 19,z\to            -19,t\to 4,m\to 11,n\to -14\},\{x\to 11,y\to            19,z\to 11,t\to -14,m\to -19,n\to 4\},\{x\to            14,y\to -8,z\to -16,t\to -2,m\to 5,n\to            19\},\{x\to 14,y\to -8,z\to 5,t\to 19,m\to            -16,n\to -2\},\{x\to 17,y\to -6,z\to -16,t\to            -6,m\to 2,n\to 21\},\{x\to 17,y\to 7,z\to            -10,t\to 16,m\to -4,n\to -14\},\{x\to 17,y\to            7,z\to -4,t\to -14,m\to -10,n\to 16\},\{x\to            17,y\to 13,z\to -16,t\to 13,m\to 2,n\to            -17\},\{x\to 17,y\to 13,z\to 2,t\to -17,m\to            -16,n\to 13\},\{x\to 19,y\to 4,z\to -8,t\to            -14,m\to -8,n\to 19\},\{x\to 19,y\to 4,z\to            -8,t\to 19,m\to -8,n\to -14\}\}      And this is another code from _Mathematica_               {{3, 4, 5}, {5, 12, 13}, {7, 24, 25}, {8, 15, 17}, {9, 12, 15}, {9,        40, 41}, {12, 35, 37}, {15, 20, 25}, {15, 36, 39}, {20, 21,        29}, {21, 28, 35}, {24, 45, 51}, {27, 36, 45}, {28, 45, 53}, {33,        44, 55}, {6, 8, 10}, {10, 24, 26}, {12, 16, 20}, {14, 48, 50}, {16,        30, 34}, {18, 24, 30}, {20, 48, 52}, {24, 32, 40}, {30, 40,        50}, {36, 48, 60}, {40, 42, 58}}      How to align this equations in TeX?


title: Having both EPS and PNG in the same document

text: I am using style files from this link for Latex in WinEdt 7.0. When including figures, If I use **pdflatex** or **PDFTexify** for compiling it doesn't recognize **EPS** files :               ! LaTeX Error: Unknown graphics extension: .eps.      and If I use **Latex** or **Texify** for compiling it doesn't recognize **PNG** files:               ! Undefined control sequence.      Is there any way to include both formats using this style? An example of the tex file:               \documentclass{tADR2e}     \begin{document}     \title{Title}     \maketitle     \section{Module}          \begin{figure}     \begin{center}     \includegraphics{img/1/work1} % the png file     \caption{The process.}     \label{diagram1}     \end{center}     \end{figure}          \begin{figure}     \begin{center}     \includegraphics{img/2/work2} % the eps file     \caption{The process.}     \label{diagram2}     \end{center}     \end{figure}          \end{document}      compiling this tex gives the following error:               ! LaTeX Error: File `img/2/work2' not found.      although there is no extension for the figures and they are even in different folders.               >>pdflatex --version          MiKTeX-pdfTeX 2.9.4307 (1.40.12) (MiKTeX 2.9)     Copyright (C) 1982 D. E. Knuth, (C) 1996-2006 Han The Thanh     TeX is a trademark of the American Mathematical Society.      The \listfile log can be found here.


title: TikZ data visualization fails to load data from file

text: I'm trying to visualize some data with TikZ datavisualization library. Given foo.tex               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{datavisualization}          \begin{document}     \begin{tikzpicture}       \datavisualization [ scientific axes, visualize as scatter ] data [ read from file=foo.dat ];     \end{tikzpicture}     \end{document}      and foo.dat:               x, y     1, 2     3, 4     5, 6      It fails with the following error (repeated multiple times):               ! Package PGF Math Error: Sorry, an internal routine of the floating point unit got an ill-formatted floating point number `'. The unreadable part was near ''..          See the PGF Math package documentation for explanation.     Type  H <return>  for immediate help.      ...                                                        l.7 ... scatter ] data [ read from file=foo.dat ];      If I'd rather include data from foo.dat inline the document compiles normally. What am I missing and how can I fix the problem? I'm running TeXLive 2014 on Windows 7. All files use Unix line ending. **EDIT:** I've removed all commas in my data file and explicitly set separator to \space, now it works. One more quertion: TikZ documentation says: > /pgf/data/separator=<character> (no default, initially ,) What does this mean? What is the difference between initial value and default value?


title: Insert paragraphs and subparagraphs into letter document

text: A few weeks ago I aksed for Insert chapters into letter document but now I need to add paragraphs and subparagraphs into letter document. The previous answer says that I need to copy those commands from book.cls or report.cls, but when I tried to reply the action the user did to import Chapter commands into the document, I saw that it was not a simply copy and paste, but certain lines of code have been accurately selected, and others omitted. So I ask for your help again. Here my preamble               \documentclass[boldsubject,italicsignature,smartindent]{letteracdp}     \usepackage[italian]{babel}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage{layaureo}     \usepackage{lipsum}


title: Table \rowcolor \columncolor \multirow and \multicolumn Alignment

text: I'm trying to recreate this table from Word in LaTeX: ![enter image description here](http://i.stack.imgur.com/9v5ko.png) I'm getting close, but the "Effectiveness" section is not aligned properly, and the "Probability" section is not fully filled in with color. ![enter image description here](http://i.stack.imgur.com/fSTi5.png) Here is the code I have so far, can someone point me in the right direction?               \documentclass[11pt]{article}     \usepackage{multirow}     \usepackage[table]{xcolor}            \begin{document}     \begin{center}     \begin{table}[!htbp]     \noindent     \begin{tabular}{|c|p{3cm}|p{3cm}|p{3cm}|}     \hline     \multirow{2}{3cm}{\centering \cellcolor{gray!50} Effectiveness of Controls} &    \multicolumn{3}{p{9cm}|}{\centering \cellcolor{gray!50} Probability of Threat Occurrence (Natural or Environmental Threats) or Threat Motivation and Capability (Human Threats)} \\     \cline{2-4}     \rowcolor{gray!50}     & Low & Moderate & High \\     \hline     \rowcolor{white!50}     \cellcolor{gray!50} Low & Moderate & High & High \\     \hline     \rowcolor{white!50}     \cellcolor{gray!50} Moderate & Low & Moderate & High \\     \hline     \rowcolor{white!50}     \cellcolor{gray!50} High & Low & Low & Moderate \\     \hline     \end{tabular}     \caption{Risk Classifications}     \label{tab:xyz}          \end{table}     \end{center}     \end{document}


title: How to add more information to title slide

text: I have the following section of TeX:               \documentclass[landscape]{slides}          \usepackage[landscape]{geometry}          \author{My Name}     \title{My Title}     \date{The Date}          \begin{document}          \begin{slide}     \maketitle     \end{slide}          \end{document}      If I try to add anything else to the title slide it is pushed on to the next slide. How can I add my twitter name and a link to my github account to the title page?


title: Prevent vertical distribution of paragraphs over entire page

text: It seems it tries to fill an entire A4, as the image of the next page is too big. So it puts a lot of space between the paragraphs. But, I'd much rather have a big chunk of white at the bottom of the first page: as it looks now, it looks like there are stuff missing (for example figures).


title: Multiple bibliographies with bibtexall and LyX

text: I want to know how to include this script http://wiki.lyx.org/uploads/BibTeX/bibtexall in LyX in order to generate multiple bibliographies for a Master document and its child documents, each one of them having its own BibTeX generated bibliography. In the above mentioned file there is the sentence "Place this file somewhere in your PATH" I want to know what's meant by "PATH" here?


title: Auto generating table

text: In the following scheme, why do I have to hide `&` in a macro (`\samp`) before it works?               \documentclass{article}     \usepackage{catoptions}     \makeatletter     \cptnewcounts{rowcnt,colcnt,maxrow,maxcol}     \def\docols{%       \global\advance\colcnt\@ne       \the\numexpr\rowcnt*\colcnt\relax       \ifnum\colcnt=\maxcol\stopcol\fi       \samp\docols     }     \def\stopcol#1\docols{\fi}     \def\samp{&}     \def\dorows{%       \global\advance\rowcnt\@ne       \global\colcnt\z@       \docols       \ifnum\rowcnt=\maxrow\stoprow\fi       \scr\dorows     }     \def\stoprow#1\dorows{\fi\crcr}     \def\scr{\cr}     \makeatother          \begin{document}     \maxrow4 \maxcol3     $$\vbox{\halign{&\ \hfil#\hfil\strut\cr\dorows}}$$     \end{document}


title: Error when creating a surf plot with matlab2tikz

text: I'm using matlab2tikz to generate the tikz code for my figures. When compiling the document with the figure code as below, i get an error:               Package pgfplots Error: No such element: \pgfplotsarrayselect64\of{pgfpl@cm@mymap}      Now what really bugles my mind is that when i am generating the same figure with another dataset, it works perfectly fine! And as fare as i can see, the actual tikz code is identical except for the data points included. What on earth in the second data-set figure makes it fail when compiling? I updated all packages in Mixtex, but that didn't seem to do much. Any idea's as to what i am doing wrong would be greatly appreciated as i am becoming increasingly desperate to find the issue. Fig1, Working               \begin{tikzpicture}     \begin{axis}[%     view={45}{35},     width=\figurewidth,     height=\figureheight,     scale only axis,     xmin=0.1, xmax=1,     xtick={0.1,1},     xlabel={kh},     xmajorgrids,     ymin=10, ymax=80,     ytick={10,80},     ylabel={HLmax},     ymajorgrids,     zmin=1, zmax=4,     ztick={1,2,3,4},     zlabel={Iteratons},     zmajorgrids,     axis lines*=left]          \addplot3[%     surf,     colormap={mymap}{[1pt] rgb(0pt)=(0,1,1); rgb(63pt)=(1,0,1)},     shader=faceted,     draw=black]     coordinates{      (0.1,10,1)(0.1,20,1)(0.1,30,1)(0.1,40,1)(0.1,50,1)(0.1,60,1)(0.1,70,1)(0.1,80,1)          (0.2,10,1)(0.2,20,1)(0.2,30,1)(0.2,40,1)(0.2,50,1)(0.2,60,1)(0.2,70,1)(0.2,80,1)          (0.3,10,1)(0.3,20,1)(0.3,30,1)(0.3,40,1)(0.3,50,1)(0.3,60,1)(0.3,70,1)(0.3,80,1)          (0.4,10,1)(0.4,20,1)(0.4,30,1)(0.4,40,1)(0.4,50,1)(0.4,60,1)(0.4,70,1)(0.4,80,1)          (0.5,10,1)(0.5,20,1)(0.5,30,1)(0.5,40,1)(0.5,50,1)(0.5,60,1)(0.5,70,1)(0.5,80,1)          (0.6,10,1)(0.6,20,1)(0.6,30,1)(0.6,40,1)(0.6,50,1)(0.6,60,1)(0.6,70,1)(0.6,80,1)          (0.7,10,1)(0.7,20,1)(0.7,30,1)(0.7,40,1)(0.7,50,1)(0.7,60,1)(0.7,70,1)(0.7,80,1)          (0.8,10,1)(0.8,20,1)(0.8,30,1)(0.8,40,1)(0.8,50,1)(0.8,60,1)(0.8,70,1)(0.8,80,1)          (0.9,10,1)(0.9,20,1)(0.9,30,1)(0.9,40,1)(0.9,50,1)(0.9,60,1)(0.9,70,1)(0.9,80,1)          (1,10,1)(1,20,1)(1,30,1)(1,40,1)(1,50,1)(1,60,1)(1,70,1)(1,80,1)          };     \end{axis}     \end{tikzpicture}%      Fig 2, not working               \begin{tikzpicture}          \begin{axis}[%     view={45}{35},     width=\figurewidth,     height=\figureheight,     scale only axis,     xmin=0.1, xmax=1,     xtick={0.1,1},     xlabel={kh},     xmajorgrids,     ymin=10, ymax=80,     ytick={10,80},     ylabel={HLmax},     ymajorgrids,     zmin=1, zmax=4,     ztick={1,2,3,4},     zlabel={Iteratons},     zmajorgrids,     axis lines*=left]          \addplot3[%     surf,     colormap={mymap}{[1pt] rgb(0pt)=(0,1,1); rgb(63pt)=(1,0,1)},     shader=faceted,     draw=black]     coordinates{      (0.1,10,2)(0.1,20,2)(0.1,30,2)(0.1,40,3)(0.1,50,3)(0.1,60,3)(0.1,70,3)(0.1,80,3)          (0.2,10,2)(0.2,20,2)(0.2,30,2)(0.2,40,2)(0.2,50,2)(0.2,60,3)(0.2,70,3)(0.2,80,3)          (0.3,10,2)(0.3,20,2)(0.3,30,2)(0.3,40,2)(0.3,50,2)(0.3,60,2)(0.3,70,3)(0.3,80,3)          (0.4,10,2)(0.4,20,2)(0.4,30,2)(0.4,40,2)(0.4,50,2)(0.4,60,2)(0.4,70,3)(0.4,80,3)          (0.5,10,2)(0.5,20,2)(0.5,30,2)(0.5,40,2)(0.5,50,2)(0.5,60,2)(0.5,70,3)(0.5,80,3)          (0.6,10,1)(0.6,20,1)(0.6,30,2)(0.6,40,2)(0.6,50,2)(0.6,60,2)(0.6,70,3)(0.6,80,3)          (0.7,10,1)(0.7,20,1)(0.7,30,1)(0.7,40,2)(0.7,50,2)(0.7,60,2)(0.7,70,3)(0.7,80,3)          (0.8,10,1)(0.8,20,1)(0.8,30,1)(0.8,40,2)(0.8,50,2)(0.8,60,2)(0.8,70,3)(0.8,80,3)          (0.9,10,1)(0.9,20,1)(0.9,30,1)(0.9,40,1)(0.9,50,2)(0.9,60,2)(0.9,70,3)(0.9,80,3)          (1,10,1)(1,20,1)(1,30,1)(1,40,1)(1,50,2)(1,60,2)(1,70,3)(1,80,3)          };     \end{axis}     \end{tikzpicture}%


title: XeLaTeX on OS X doesn't recognise some diacritics signs

text: I've just moved to OS X 10.8.2 from Ubuntu. I have TeX installed as I guess from tug.org, but I'm not sure since it wasn't me who installed it. All my files created in Ubuntu compiles exept one problem: the diacritic mark \b{h} is not found by XeLaTeX (while it works in LaTeX), in log file there is a warning: > Missing character: There is no ẖ in font [lmroman10-regular]:mapping=tex- > text ! UPDATE Here is part of the document:               documentclass[openany]{book}          \usepackage{setspace}     \usepackage{fontspec}     \usepackage{polyglossia}     \usepackage{indentfirst}     \setlength{\parindent}{0in}          \setmainlanguage{polish}     \setotherlanguage[locale=mashriq]{arabic}     \setromanfont[Mapping=tex-text]{Latin Modern Mono}     \newfontfamily\arabicfont[Script=Arabic,Scale=1.3,Mapping=arabicdigits]{Scheherazade}          \begin{document}          \b{h}ur\=u\v g           \end{document}      All other diacritics are found. I've changed font I was using under Ubuntu (Linux Libertine O) to Latin Modern, but it didn't help the diacritics. Thanks.


title: How to get rid of subcaptions in an array of subfloats

text: I am using an array of figures using subfloat as follows:               \begin{figure}     \centering     \subfloat[]{\includegraphics[width=70px,height=60px]     {img_success/rgb/rgb_001456.eps}}     \subfloat[]{\includegraphics[width=70px,height=60px]     {img_success/rule/region_001456_1.eps}}     \subfloat[]{\includegraphics[width=70px,height=60px]     {img_success/map/region_001456_1.eps}}\\     \caption{Results on our dataset: Success case}     \label{tab:results_success}     \end{figure}      However, I get numberings below the subfigures like (a), (b),... How do I omit them? I tried applying               \renewcommand*{\thesubfigure}{}      But this leaves empty parentheses "()". How do I completely omit them? Thanks. :)


title: Algorithmic: file ended while scanning definition of \ALG\typeout

text: I m trying to the given code given in here: Algorithm and IEEEtran, or some other examples. by `\usepackage{algpseudocode}`. But I am getting this error: `./algpseudocode.sty:12: file ended while scanning definition of \ALG\typeout.` I deleted the algorithm block, and only `\usepackage{algpseudocode}` gives the same error too. I think I have installed algorithm packes using texlive- science.               \documentclass[a4paper,10pt]{report}     \usepackage[utf8]{inputenc}     \usepackage{algpseudocode}     \begin{document}     \end{document}


title: The right way of forcing a long table in place

text: I was wondering what is the right way to include a long table in between pages? I have a table that is an A4 page long, if I use `\begin{table}[h]` it pushes the table to the very end of the document, and if I use `\begin{table}[h!]` it forced some extra white space at some paragraphs. Thanks for the help.


title: Why will my table not come after a section with \FloatBarrier?

text: I have been trying this method to get a table to go after a section heading, but for some reason I am not able to get it to visualize that way.               \section{blah}     %\hlabel{sec:blah}     mytexthere (which is after the table... :( )          \FloatBarrier          \begin{table} \centering         \begin{tabular}{| l | l |}             \hline             \multicolumn{2}{|c|}{config} \\             \hline             blah & DOUBLE BLAH \\                \hline     \end{tabular}     \end{table}          %several other tables     \section{new blah}      Am I misunderstanding what `\FloatBarrier` does? I had assumed it will cause the final output of my document to be something like   1. Section heading    2. mytexthere   3. tables begin here  but rather it is:   1. tables begin here   2. section heading   3. mytexthere I suspect `\FloatBarrier` is simply keeping those on the same page (which it does) but leads my question:   * How do I cause a table to always come after the `section` heading it is within? Can I do this with `\FloatBarrier`, or is there another way?


title: Subfigure without using caption packages?

text: I'd like to create a figure consisting of two subfigures without using the caption or subcaption package since these two packages seem to destroy my template. But all the solutions for subfigures I could find in the Internet use these two packages. What other possibilities do I have? I want the two figures in a 2-column layout to cover both columns and each figure should be 1 column width.


title: Add grid only on y-axis (pgfplots)

text: I would like to add **only** a grid on the **y-axis**. Here is my MWE:               \documentclass{scrreprt}     \usepackage{tikz, pgfplots}          \begin{document}     \begin{tikzpicture}       \begin{semilogyaxis}[         /pgf/number format/.cd,         use comma,         1000 sep={},         enlargelimits = auto,         width = 0.49\textwidth,         ylabel = {ICumCDP},         ymin = 1E-8,         ymax = 1E-4,         xlabel = {Jahr},         xtick = {2012,2011,2010,2009,2008}       ]       \addplot[only marks, color=blue] coordinates {       (2008, 3.52e-07)       (2009, 3.02e-07)       (2010, 1.92e-07)       (2011, 3.68e-07)       (2012, 1.36e-06)     };       \end{semilogyaxis}     \end{tikzpicture}     \hfill     \begin{tikzpicture}       \begin{semilogyaxis}[         /pgf/number format/.cd,         use comma,         1000 sep={},         enlargelimits = auto,         width = 0.49\textwidth,         ylabel = {CCDFmax},         ymin = 1E-8,         ymax = 1E-4,         yticklabel pos=right,         ylabel near ticks,         xlabel = {Jahr},         xtick = {2008,2009,2010,2011,2012}       ]       \addplot[only marks, color=red] coordinates {       (2008, 8.46e-06)       (2009, 4.56e-06)       (2010, 4.96e-06)       (2011, 4.96e-06)       (2012, 3.02e-05)     };       \end{semilogyaxis}     \end{tikzpicture}          \end{document}


title: Dancers font is squished

text: I want to typeset a few secret codes and I thought it would be cool to use the code in "The Dancing Men" by Sir Arthur Conan Doyle. Sure enough, someone (Alan Stanier to be precise) created a `dancers` font in Metafont and it's included in TeXLive 2011 (OS X 10.6.8, using AUCTeX). I tried to use it but the output is all smooshed together. Since I know _very little_ about using fonts in LaTeX I don't know if this is a problem with the font or with my usage of it. I tried               \documentclass{minimal}          \DeclareFontFamily{OT1}{dancers}{}     \DeclareFontShape{OT1}{dancers}{m}{n}{         <->  gen * dancers     }{}          \begin{document}          \usefont{OT1}{dancers}{m}{n}          A B C D E F G H I J K L M N O P Q R S T U V W X Y Z          a b c d e f g h i j k l m n o p q r s t u v w x y z          \end{document}      which produces ![squished dancers](http://i.stack.imgur.com/9m3v7.png). Also putting `\qquad` between characters does not create a discernible difference, so I can't even work around it in that way. I also tried deleting the file `/Users/gvol/Library/texlive/2011/texmf- var/fonts/pk/ljfour/public/dancers/dancers12.56pk` in case I had generated it incorrectly in one of my initial experiments, but it didn't help. Adding `\fontsize{52pt}{14pt}\selectfont` after the `\usefont` gives roughly what I want, but that seems completely wrong and when selecting from the pdf it's far too large (because it's a 52pt font obviously). What have I done wrong and how do I fix it?


title: Pack equations a little denser (setstrech for an equation?)

text: I have an equation which is a little longer than the page margin. I don't want to split it, but I was wondering if it is possible to get it a little more dense (something like setstretch for an equation itself). Appreciate any help. MWE:               \documentclass[twocolumn]{article}     \usepackage{amssymb}     \begin{document}     example text example text example text example text example text example text example text example text example text example text example text example text           equation:      \begin{equation}     x^2 +y^2+z^2+w^2+\int_{\alpha\in \mathbb{R}} d\alpha f(x,y,z,w)\exp{-2y^2+z^2-w^2}     \end{equation}     \end{document}      ![the w^2 part is out of the column](http://i.stack.imgur.com/LJ5Tf.png)


title: Automatically convert "..." to "\ldots"

text: Is there a way to automatically convert a basic string into a command, for example converting instances of `...` to `\ldots`? I have to work with a large number of plaintext files, and doing a dozen find/replace operations for each file is rather inconvenient.


title: Displayed equation is not centered

text: I'm planning to send my research paper to a journal using the provided template. However, i found that displayed math is not centered (paper publish in the journal have equation centered). Below i provide the template and `oeko.cls` (not the whole, too long to be posted here) file of document class.               \documentclass[oeko]{oeko}      %Remove any % below to load the required packages     \usepackage{latexsym}     \usepackage{graphicx}     \usepackage{natbib}     \usepackage{amsmath}     \begin{document}     \title{Persistence......}     \titlerunning{Persistence.....}          \subtitle{Do you have a subtitle?} % Insert a subtitle or remove this line          \gertitle{F\"ugen Sie den dt. Titel hier ein}     \gersubtitle{Haben Sie einen dt. Untertitel?}          \author{Aidil .....}% etc     \thanks{Thanks...}}     \authorrunning{Aidil....}     %     \jel{Insert JEL here}     %     \keywords{Finite elements, Detonation, Safety} %end of abstract     %     \maketitle          \begin{abstract}     My abstract     \end{abstract}          % Start     \section{Introduction}     \label{intro}     Testing of FRUH was based on the premise that the log forward exchange rate $(f_t)$ provides an unbiased predictor of the future log spot rate $(s_{t+1})$ or $E_ts_{t+1}=f_t$ . By subtracting the log spot rate from both sides of the equation, we can obtain the UIP:     \begin{align}     E_ts_{t+1}-s_t=f_t-s_t     \end{align}     Following \cite{fama1984forward}, testing the hypothesis was based on the regression framework of equation (1):     \begin{align}     s_{t+1}-s_t=\beta_1+\beta_2(f_t-s_t)+\varepsilon_{t+1}     \end{align}     \section{Section title}     \label{sec:1}     and           \end{document}          % end of file template.tex      Document class `oeko.cls` (Part of it, hopefully it is suffice to detect the issue)               % DOCUMENT CLASS -- version 1.1 for LaTeX2e             \~}     \NeedsTeXFormat{LaTeX2e}[1995/12/01]     \ProvidesClass{oeko}[2009/05/25     ^^JLaTeX document class for Jahrb?cher - version 1.1]     \newcommand\@ptsize{}     \newif\if@restonecol     \newif\if@titlepage     \@titlepagefalse     \DeclareOption{a4paper}        {\setlength\paperheight {297mm}%         \setlength\paperwidth  {210mm}}     \DeclareOption{10pt}{\renewcommand\@ptsize{0}}     \DeclareOption{twoside}{\@twosidetrue  \@mparswitchtrue}     \DeclareOption{draft}{\setlength\overfullrule{5pt}}     \DeclareOption{final}{\setlength\overfullrule{0pt}}     \DeclareOption{onecolumn}{\@onecolumntrue}     \DeclareOption{fleqn}{\input{fleqn.clo}\AtEndOfClass{\mathindent\z@}}     \let\if@mathematic\iftrue     \let\if@numbook\iffalse     \DeclareOption{numbook}{\let\if@envcntsect\iftrue       \AtEndOfPackage{%        \renewcommand\thefigure{\thesection.\@arabic\c@figure}%        \renewcommand\thetable{\thesection.\@arabic\c@table}%        \renewcommand\theequation{\thesection.\@arabic\c@equation}%        \@addtoreset{figure}{section}%        \@addtoreset{table}{section}%        \@addtoreset{equation}{section}%       }%     }     \DeclareOption{openbib}{%       \AtEndOfPackage{%        \renewcommand\@openbib@code{%           \advance\leftmargin\bibindent           \itemindent -\bibindent           \listparindent \itemindent           \parsep \z@           }%        \renewcommand\newblock{\par}}%     }     %     \let\if@runhead\iffalse     \DeclareOption{runningheads}{\let\if@runhead\iftrue}     \let\if@smartrunh\iffalse     \DeclareOption{smartrunhead}{\let\if@smartrunh\iftrue}     \DeclareOption{nosmartrunhead}{\let\if@smartrunh\iffalse}     \let\if@envcntreset\iffalse     \DeclareOption{envcountreset}{\let\if@envcntreset\iftrue}     \let\if@envcntsame\iffalse     \DeclareOption{envcountsame}{\let\if@envcntsame\iftrue}     \let\if@envcntsect\iffalse     \DeclareOption{envcountsect}{\let\if@envcntsect\iftrue}     \let\if@referee\iffalse     \DeclareOption{referee}{\let\if@referee\iftrue}     \def\makereferee{\def\baselinestretch{2}}     \let\if@instindent\iffalse     \DeclareOption{instindent}{\let\if@instindent\iftrue}     \let\if@smartand\iffalse     \DeclareOption{smartand}{\let\if@smartand\iftrue}     \let\if@spthms\iftrue     \DeclareOption{nospthms}{\let\if@spthms\iffalse}     \let\switch@texts\relax     \DeclareOption{deutsch}{\def\switch@texts{\ds@deutsch}}     \DeclareOption{francais}{\def\switch@texts{\ds@francais}}     %     \let\journalopt\@empty     \DeclareOption*{\InputIfFileExists{oeko.clo}{%     \let\journalopt\CurrentOption}{%     \ClassWarning{Jahrbuecher}{Specified option or subpackage     "\CurrentOption" not found -}\OptionNotUsed}}     \ExecuteOptions{a4paper,twoside,10pt,instindent}     \ProcessOptions     \ifx\journalopt\@empty     \ClassError{Jahrbuecher}{No valid journal specified in option list}{}     \expandafter\stop     \fi     %     \if@smartrunh\AtEndDocument{\islastpageeven\getlastpagenumber}\fi     %     \DeclareMathSymbol{\Gamma}{\mathalpha}{letters}{"00}     \DeclareMathSymbol{\Delta}{\mathalpha}{letters}{"01}     \DeclareMathSymbol{\Theta}{\mathalpha}{letters}{"02}     \DeclareMathSymbol{\Lambda}{\mathalpha}{letters}{"03}     \DeclareMathSymbol{\Xi}{\mathalpha}{letters}{"04}     \DeclareMathSymbol{\Pi}{\mathalpha}{letters}{"05}     \DeclareMathSymbol{\Sigma}{\mathalpha}{letters}{"06}     \DeclareMathSymbol{\Upsilon}{\mathalpha}{letters}{"07}     \DeclareMathSymbol{\Phi}{\mathalpha}{letters}{"08}     \DeclareMathSymbol{\Psi}{\mathalpha}{letters}{"09}     \DeclareMathSymbol{\Omega}{\mathalpha}{letters}{"0A}     %     \setlength\parindent{15\p@}     \setlength\smallskipamount{3\p@ \@plus 1\p@ \@minus 1\p@}     \setlength\medskipamount{6\p@ \@plus 2\p@ \@minus 2\p@}     \setlength\bigskipamount{12\p@ \@plus 4\p@ \@minus 4\p@}     \setlength\headheight{12\p@}     \setlength\headsep   {16.74dd}     \setlength\topskip   {10\p@}     \setlength\footskip{30\p@}     \setlength\maxdepth{.5\topskip}     %     \@settopoint\textwidth     \setlength\marginparsep {10\p@}     \setlength\marginparpush{5\p@}     \setlength\topmargin{-10pt}     \if@twocolumn        \setlength\oddsidemargin {-30\p@}        \setlength\evensidemargin{-30\p@}     \else        \setlength\oddsidemargin {\z@}        \setlength\evensidemargin{\z@}     \fi     \setlength\marginparwidth  {48\p@}     \setlength\footnotesep{8\p@}     \setlength{\skip\footins}{9\p@ \@plus 4\p@ \@minus 2\p@}     \setlength\floatsep    {12\p@ \@plus 2\p@ \@minus 2\p@}     \setlength\textfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@}     \setlength\intextsep   {20\p@ \@plus 2\p@ \@minus 2\p@}     \setlength\dblfloatsep    {12\p@ \@plus 2\p@ \@minus 2\p@}     \setlength\dbltextfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@}     \setlength\@fptop{0\p@}     \setlength\@fpsep{12\p@ \@plus 2\p@ \@minus 2\p@}     \setlength\@fpbot{0\p@ \@plus 1fil}     \setlength\@dblfptop{0\p@}     \setlength\@dblfpsep{12\p@ \@plus 2\p@ \@minus 2\p@}     \setlength\@dblfpbot{0\p@ \@plus 1fil}     \setlength\partopsep{2\p@ \@plus 1\p@ \@minus 1\p@}     \def\@listi{\leftmargin\leftmargini                 \parsep \z@                 \topsep 6\p@ \@plus2\p@ \@minus4\p@                 \itemsep\parsep}     \let\@listI\@listi     \@listi     \def\@listii {\leftmargin\leftmarginii                   \labelwidth\leftmarginii                   \advance\labelwidth-\labelsep                   \topsep    \z@                   \parsep    \topsep                   \itemsep   \parsep}     \def\@listiii{\leftmargin\leftmarginiii                   \labelwidth\leftmarginiii                   \advance\labelwidth-\labelsep                   \topsep    \z@                   \parsep    \topsep                   \itemsep   \parsep}     \def\@listiv {\leftmargin\leftmarginiv                   \labelwidth\leftmarginiv                   \advance\labelwidth-\labelsep}     \def\@listv  {\leftmargin\leftmarginv                   \labelwidth\leftmarginv                   \advance\labelwidth-\labelsep}     \def\@listvi {\leftmargin\leftmarginvi                   \labelwidth\leftmarginvi                   \advance\labelwidth-\labelsep}       %% End of file `oeko.cls'.


title: remove blank pages from ClassicThesis

text: I am using ClassicThesis in LyX. I have problems with the autogeneration of blank pages in the template. At the moment a blank page is inserted infront of a chapter if the chapter would have started on an even page (like a book). Does anybody know how to change the classicthesis-config.tex file to prevent this insertion of blank pages.


title: Every counter with a fullstop at the end

text: Is there an easier way than redefining all commands to have every counter followed by a fullstop? Chapter counter, theorem counter, figure counter etc. should always look like > 1.3.4. and not like the default > 1.3.4 * * * I use the following amsthm-theoremstyle:               \newtheoremstyle{break}       {\topsep}{\topsep}%       {\itshape}{}%       {\bfseries}{}%       {\newline}{}%     \theoremstyle{break}


title: Problem with latex2rtf. Unknown commands. How to solve it?

text: I'm having some difficulties to convert a TeX document into an MS-Word readable one. I'm trying to use `latex2rtf` but I had this output (pastebin). Looks like the main problem is some unrecognized packages, like amsmath. Several usual commands appears as unknown:               main.tex:11  Package/option 'epsfig' unknown.     main.tex:11  Package/option 'psfrag' unknown.     main.tex:12  Package/option 'multirow' unknown.     main.tex:12  Package/option 'colortbl' unknown.     main.tex:12  Package/option 'array' unknown.     main.tex:13  Package/option 'subfig' unknown.     main.tex:69  Unknown command '\mathbb'     ...      Please take a look in pastebin to see all the output and problems. How can I solve this? How can I convert a compilable `.tex` file into an MS- Word file with all the things working fine? I have tried to use `tex2word` on Windows, but while the file compiles normally in TeXStudio, when I open it using `tex2word` I have an infinite loop. Opening the file with MS-Word, the unrecognized things appear like this: ![error](http://i.stack.imgur.com/5PBx5.png)


title: Not rounded beamer blocks

text: I want my blocks to be not rounded. I added this like to my style but without any success.               \setbeamertemplate{blocks}[rounded=false, shadow=true]       How to make not rounded boxes in beamer? Edit: I am using this theming in `ddbeamer.sty`:               \usetheme{Madrid}                                                                                \useinnertheme{rectangles}                                                                                \usefonttheme{professionalfonts}                                                                                \usecolortheme{structure}                                                                                \usepackage{times}       Using `\setbeamertemplate{blocks}[default,shadow=true]` also does not work. Minimal not working example:               \documentclass[english,10pt,blackandwhite,compress]{beamer}                                                                         \usepackage[utf8]{inputenc}                                                                                \usepackage[T1]{fontenc}                                                                                \usepackage{xcolor}                                                                                \usepackage{babel}                                                                                \usepackage{ddbeamer}                                                                                \usepackage{lmodern}                                                                                \begin{frame}       \begin{block}{Hi}           Bye       \end{block}     \end{frame}


title: How can the dimensions of a box be retrieved with LaTeX

text: One can specify a box in LaTeX, using various methods for example:                \newsavebox{\Abox}      \savebox{\Abox}{\parbox{4cm}{\lorem}}      \usebox{\Abox}       How can I retrieve the width, height and depth of the box. TeX has the primitives \wd, \ht and \dp. However in order for these to be used it is necessary to know the number of the box for example box13.


title: Change \textwidth and \textheight in mid-environment

text: First, this is not a copy of Change \textwidth and \textheight in mid-document as I can't set a manual `\pagebreak` and `\newgeometry` or `\restoregeometry` thereafter. I want to change the footer size for the first page of a document to include some kind of legend. The main content is a longtable with varying(!) content length. The legend should only be included on the first page and the footer should only be extended on this page also. This works after the lontable finishes (see `lipsum` text) but not while it continues. The footer stays big, although it does not contain the legend anymore. I'm in serious doubt at the moment that it is possible with pdflatex to do what I want, but I'd like to see that I'm wrong and there is a way to do it as intended.               \documentclass[a4paper,11pt]{article}          \usepackage[top=2cm,left=2cm,right=2.5cm,bottom=5.5cm,includeheadfoot]{geometry}     \usepackage{booktabs}     \usepackage{longtable}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{fancyhdr}     \usepackage{lipsum}               % Header, Footer      \setlength{\headheight}{26pt}     % Pagestyle firstpage     \fancypagestyle{firstpagestyle}     {       \setlength{\textheight}{620pt}       \setlength{\footskip}{160pt}       \lhead{This is my header}%       \chead{}%       \rhead{\today}%       \lfoot{           \smash         {%  % hide vertical stretch of the following content           \parbox[b]{\textwidth}           {             \Legende             This is my normal footer text.           }         }           }%       \cfoot{}       \rfoot{\thepage}%       \renewcommand\headrulewidth{0.35pt}%       \renewcommand\footrulewidth{0.35pt}%     }               % Pagestyle all other pages     \fancypagestyle{mypagestyle}     {       \setlength{\textheight}{660.2pt}       \setlength{\footskip}{30pt}       \lhead{This is my header}%       \chead{}%       \rhead{\today}%       \lfoot{This is my normal footer text.}       \cfoot{}       \rfoot{\thepage}%       \renewcommand\headrulewidth{0.35pt}%       \renewcommand\footrulewidth{0.35pt}%     }               \newcommand{\Legende}{        \parbox{0.9\textwidth}{some \\ lines \\with \\ a \\ lot \\of \\text     }\\[1.5ex]}          %Dummy text for table     \newcommand{\bla}{bla \\ blubb \\ bla \\blubb \\bla \\}     \newcommand{\blubb}{\bla\bla\bla\bla\bla\bla}               \begin{document}     \pagestyle{mypagestyle}     \thispagestyle{firstpagestyle}          \renewcommand{\arraystretch}{1.25}     \begin{longtable}{c}       \toprule       \blubb \blubb \blubb       \bottomrule \\[0em]     \end{longtable}          \lipsum \lipsum[1-4]          \end{document}


title: probsoln's solution environment in beamer documentclass

text: When compiling this piece of code               \documentclass{beamer}          %%% save beamer's `solution' environment as `beamersolution':     %\let\beamersolution\solution     %\let\endbeamersolution\endsolution          %%% "delete" the `solution' environment:     %\let\solution\relax          \usepackage{color}     \usepackage{probsoln}          \renewcommand{\solutionname}{Answer}          \begin{defproblem}{prob1}      \begin{onlyproblem}      To be or not to be?     \end{onlyproblem}      \begin{onlysolution}      \begin{solution}     That was the question. This is the answer.     \end{solution}      \end{onlysolution}      \end{defproblem}     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \begin{document}         \color{red}         \useproblem{prob1}              \showanswers         \useproblem{prob1}     \end{document}      in article document class everything works as it should, that is: ![enter image description here](http://i.stack.imgur.com/JtlUC.png) All text is red and the name of the solution environment is "Answer". Unfortunately beamer document class has got its own solution environment and presented code doesn't affect solution environment provided by probsoln. I get ![enter image description here](http://i.stack.imgur.com/SXWZq.png) Uncommenting commented lines helps with the problem in exsheets package, but it doesn't work with probsoln. What should I do to get solution environment colored in red and change its name?


title: How to extend angled lines?

text: In words what I'm trying to do is: "Extend the three green lines from their specified point of origin at their specified angle to meet the blue line" How would you recommend doing this?               \def \tubeLength{10}     \def \lightLength{5}     \def \angleDown{340}     \def \lightSpacing{1}          \begin{document}     \begin{tikzpicture}[scale=.5]          % tube     \draw (0,0) -- (\angleDown:\tubeLength);     \draw (0,0) ++(\angleDown-270:4*\lightSpacing) -- ++(\angleDown:\tubeLength);          % diffracted light     \foreach \y in {\lightSpacing, 2*\lightSpacing, 3*\lightSpacing}       \draw[green] (0,\y) -- ++(\angleDown:\lightLength);          % lense center line     \path (0,0) -- (\angleDown:\lightLength) coordinate (A)       node[below left] {A};     \path [draw, very thick, blue] (A) -- ++(\angleDown-270:4*\lightSpacing)       coordinate (B)       node[above right,black] {B};          \end{tikzpicture}      ![enter image description here](http://i.stack.imgur.com/LT2wn.jpg)


title: Different \marginparsep for odd and even pages?

text: What is the most robust way of increase the effective `\marginparsep` on even pages only? I have been playing with outdented lists, section heads etc. which leads to an issue with margin notes: I need to increase the effective `\marginparsep` on even pages to allow for the outdents. Since this is a length, I cannot simply include a macro such as KOMA's `\ifthispageodd`. If possible, I would like a solution that works with the standard `\marginpar` as well as with `marginnote` or similar packages. **Update:** Werner's answer below almost solves the problem, but there is a bug closely related to that fixed by `mparhack`. This MWE demonstrates the problem:               \documentclass[twoside]{scrbook}     \usepackage{etoolbox}     \usepackage{lipsum}% http://ctan.org/pkg/lipsum     \usepackage{everyshi}% http://ctan.org/pkg/everyshi     \usepackage{xifthen}% http://ctan.org/pkg/xifthen     \usepackage{mparhack}          \begin{document}     \EveryShipout{%       \ifthenelse{\isodd{\value{page}}}%         {\global\marginparsep=22pt}% Next page is even         {\global\marginparsep=11pt}% Next page is odd     }     \lipsum[1]     \marginpar[This is a paragraph in the left margin]{This is a paragraph in the right margin}     \lipsum[2]          \begin{itemize}       \def\do#1{\item This is a line #1 and should have a note with the same         number:\marginpar{Note #1 and a bit.}}       \docsvlist{1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20}     \end{itemize}          \lipsum[3-5]     \marginpar[This is a paragraph in the left margin]{This is a paragraph in the right margin}     \lipsum[6-8]     \marginpar[This is a paragraph in the left margin]{This is a paragraph in the right margin}     \lipsum[9-10]     \end{document}      ![enter image description here](http://i.stack.imgur.com/TPI41.png) Note 17 at the top of the second page does not receive the proper adjustment. If the `mparhack` package is not used, then this note also appears on the wrong side of the page, so the full solution probably involves somehow applying a similar patch. Is there a simple way of doing this?


title: text4ht and LuaTeX

text: There is a specific command to run tex4ht with XeTeX: `htxelatex` (which doesn't really work actually as far as I'm concerned). What is the command to run text4ht with LuaTeX instead?


title: Inconsolata italics?

text: Please see http://stackoverflow.com/questions/23975828/how-to-specify-non- standard-font-in-fancyvrb-verbatim/ for the start of this discussion. I am using `fancyvrb` to create a fancy `Verbatim` environment. I have               \usepackage{inconsolata}      to load the Inconsolata font, then               \DefineVerbatimEnvironment{VerbOut}       {Verbatim}{fontfamily=zi4,fontsize=\relsize{-1}}      for the environment itself. I would like it to display in italics, but it appears the `inconsolata` package doesn't load an italicized version of that font. Is there some other package that does, or some other way I can get it?