title: The \alph counter representation has strange effects with the glossaries package

text: This is a follow-up question here How could glossaries' numberlabel use the manually defined number of Sections(or other Sectional Units)? A suspect BUG. The parameter `\alph` doesn't work fine in my MAC OSX, when the counter is bigger than 6, in the section it is 2f, 2g, 2h, there will be something wrong. So I have to use `\newcommand{\alphstring}` and define `\GlsAddXdyAlphabet{alph}` from a to z manually same as greekstring and greek. The mininal.tex: I just copy the `\sectionalph{Linux}` of your solution code and then paste after it for some times.               \documentclass{book}     \renewcommand\thesection{\arabic{section}}     \usepackage[counter=section,xindy]{glossaries}          \newcounter{sectionalph}     \newcounter{sectiongreek}          \renewcommand{\thesectionalph}{\thesection\alph{sectionalph}}     \renewcommand{\thesectiongreek}{\thesection\greekstring{sectiongreek}}          \newcommand{\greekstring}[1]{%       \ifcase\value{#1}\relax       \or        alpha%       \or        beta%       \or        gamma%       \or        delta%       \or        epsilon%       \or        zeta%       \or        eta%       \or        theta%       \or        iota%       \or        kappa%       \or        lambda%       \or        mu%       \or        nu%       \or        omicron%       \or        pi%       \or        rho%       \or        sigma%       \or        tau%       \or        upsilon%       \or        phi%       \or        chi%       \or        xi%       \or        psi%       \or        omega%       \fi     }          \GlsAddXdyCounters{sectionalph}     \GlsAddXdyCounters{sectiongreek}          \GlsAddXdyAlphabet{greek}{"alpha" "beta" "gamma" "delta"     "epsilon" "zeta" "eta" "theta" "iota" "kappa" "lambda" "mu"     "nu" "omicron" "pi" "rho" "sigma" "tau" "upsilon" "phi"     "chi" "xi" "psi" "omega"}          \GlsAddXdyLocation{sectiongreek}{       "arabic-numbers" "greek"}          \makeglossaries          \newcommand{\sectionalph}[1]{%       \refstepcounter{sectionalph}%       \section*{\thesectionalph\quad #1}%     }          \newcommand{\sectiongreek}[1]{%       \refstepcounter{sectiongreek}%       \section*{\thesectiongreek\quad #1}%     }          \newglossaryentry{Unix}{     name={Unix},     description={a multitasking, multi-user computer operating system}     }     \newglossaryentry{Unix-like}{     name={Unix-like},     description={operating system is one that behaves in a manner     similar to a Unix system}     }     \newglossaryentry{Linux}{     name={Linux},     description={Linux was originally developed as a free operating     system}     }     \newglossaryentry{FreeBSD}{     name={FreeBSD},     description={a free Unix-like operating system, an operating system}     }     \newglossaryentry{Windows}{     name={Windows},     description={a series of graphical interface operating systems}     }     \newglossaryentry{Mobile Operating System}{     name={Mobile Operating System},     description={the operating system that operates a smartphone...}     }               \begin{document}     \section{Unix}     Unix \glsadd{Unix} (officially trademarked as UNIX, sometimes also     written as Unix) is a multitasking, multi-user computer operating     system originally developed in 1969 by a group of AT\&T employees at     Bell Labs.          \section{Unix-like}     A Unix-like \glsadd{Unix-like}(sometimes referred to as UN*X or     *nix) operating system is one that behaves in a manner similar to a     Unix system, while not necessarily conforming to or being certified     to any version of the Single UNIX Specification.          \sectionalph{Linux}     Linux \glsadd[counter=sectionalph]{Linux}was originally developed as a free operating     system for Intel x86-based personal computers. It has since been     ported to more computer hardware platforms than any other operating     system.     \sectionalph{Linux}     Linux \glsadd[counter=sectionalph]{Linux}was originally developed as a free operating     system for Intel x86-based personal computers. It has since been     ported to more computer hardware platforms than any other operating     system.     \sectionalph{Linux}     Linux \glsadd[counter=sectionalph]{Linux}was originally developed as a free operating     system for Intel x86-based personal computers. It has since been     ported to more computer hardware platforms than any other operating     system.     \sectionalph{Linux}     Linux \glsadd[counter=sectionalph]{Linux}was originally developed as a free operating     system for Intel x86-based personal computers. It has since been     ported to more computer hardware platforms than any other operating     system.     \sectionalph{Linux}     Linux \glsadd[counter=sectionalph]{Linux}was originally developed as a free operating     system for Intel x86-based personal computers. It has since been     ported to more computer hardware platforms than any other operating     system.     \sectionalph{Linux}     Linux \glsadd[counter=sectionalph]{Linux}was originally developed as a free operating     system for Intel x86-based personal computers. It has since been     ported to more computer hardware platforms than any other operating     system.     \sectionalph{Linux}     Linux \glsadd[counter=sectionalph]{Linux}was originally developed as a free operating     system for Intel x86-based personal computers. It has since been     ported to more computer hardware platforms than any other operating     system.     \sectionalph{Linux}     Linux \glsadd[counter=sectionalph]{Linux}was originally developed as a free operating     system for Intel x86-based personal computers. It has since been     ported to more computer hardware platforms than any other operating     system.     \sectionalph{Linux}     Linux \glsadd[counter=sectionalph]{Linux}was originally developed as a free operating     system for Intel x86-based personal computers. It has since been     ported to more computer hardware platforms than any other operating     system.          \sectiongreek{FreeBSD}     FreeBSD \glsadd[counter=sectiongreek]{FreeBSD} is a free Unix-like operating system     descended from AT\&T UNIX via BSD UNIX.  Although for legal reasons     FreeBSD cannot be called "UNIX".          \section{Windows}     Microsoft Windows \glsadd{Windows}is a series of graphical interface     operating systems developed, marketed, and sold by Microsoft.          \sectiongreek{Mobile Operating System}     A mobile operating system \glsadd[counter=sectiongreek]{Mobile Operating System}, also     referred to as mobile OS, is the operating system that operates a     smartphone, tablet, PDA, or other digital mobile devices.          \printglossary     \end{document}      There are pics: ![enter image description here](http://i.stack.imgur.com/CI90d.jpg) ![enter image description here](http://i.stack.imgur.com/cSG9n.jpg)


title: Complex tables - commentry

text: I have a table which I need to go over multiple pages, hence I am using `\usepackage{longtable}`. However I am also using `\multirow` as my comments are simply too long to fit into one! But there are still issues.... So I have twiddled with it, but still no luck! Any help would be greatly appreciated. I need it so that I have row names and corresponding information. Similarity ideal needs to go across two rows. The comment must fit in the table! So a Minimum working example is as follows:               \documentclass[a4paper,12pt]{article}     \usepackage[margin=2cm]{geometry}     \usepackage{fancyhdr}     \usepackage[parfill]{parskip}     \usepackage{graphicx}     \usepackage{multirow}      \usepackage{longtable}     \pagestyle{fancyplain}     \fancyhf{}     \rhead{\fancyplain{}{\today}}     \cfoot{\fancyplain{}{\thepage}}               \begin{document}      \maketitle           \begin{longtable}[H]      \caption{\label{labelname}Table Caption}      \footnotesize          Painting    &   Lucien Freud, A Man and his Daughter, 1963-4.jpg    \\       Comment & \multirow{3}{*}{  This painting is in the style of Lucien Freud.     Initially, the 3rd colour is significant. This is over Lucien Freud's 3rd significant     colour. The last attribute, the painting's contrast is greatly unbroken, when the image     is at a scaled to 20. There are either warm or cool colours but not both, so the image is not very varied. The contrast for this painting is very larger than Lucien Freud's.      } \\         Similarity  & freud & 1.0   \\       &    Bacon & 0.0    \\       Classification  &   Freud   \\ \hline             \end{tabular} \scriptsize \par}     \end{longtable}


title: biblatex format for online sources

text: The Council of Science Editors Name-Year Citation Style prescribes the following format for online documents: > Author(s). Date of publication. Title [medium designator]. Edition. Place of > Publication: Publisher; [date update; date cited]. Available from: URL. Here, "medium designator" maybe microfiche, CD-ROM, DVD, or Internet. For online documents, the medium designator "Internet" applies. Here is an example. > Kruse JS. 2007. Framework for sustainable soil management: literature review > and synthesis [Internet]. Ankeny (IA): Soil and Water Conservation Society; > [cited 2008 Aug 3]. Available from: > http://www.swcs.org/documents/filelibrary/BeyondTliteraturereview.pdf The bibliography entry has at least the following format.   1. The title is not italicized and in sentence format.   2. There are no dots after the initials of the author(s). Putting all together the guides and some answers to posts I found in this site, notably Guidelines for customizing biblatex styles, I have the following `biblatex.cfg`               \ProvidesFile{biblatex.cfg}          \ExecuteBibliographyOptions{     firstinits=true,     isbn=true,     dashed=false,     eprint=true,     maxbibnames=99,     alldates=long,     doi=true,     uniquename=init     }          \DefineBibliographyStrings{english}{%       references = {Cited References},     }          \NewBibliographyString{available}     \NewBibliographyString{cited}          \DefineBibliographyStrings{english}{%       available = {Available from},     }               % Redefined url+urldate macro          \DeclareFieldFormat{url}{\bibstring{available}\addcolon\space\url{#1}}     \DeclareFieldFormat{urldate}{#1}          \renewbibmacro*{url+urldate}{%       \iffieldundef{urlyear}         {}         {\setunit*{\addspace}%          }       \printtext{[}%       \printtext{cited}\addcolon\space%         \printurldate       \printtext{].}\space%       \printfield{url}%       }          % Change how the publisher, location and dates are printed          \renewbibmacro{publisher+location+date}{       \iflistundef{publisher}         {}         {\printtext{}%         \iflistundef{location}             {}             {\printlist{location}}%             \printtext{\addcolon\space}%          \printlist{publisher}%                 \printtext{\addsemicolon\space}         }     }          % Remove parentheses around dates          \renewbibmacro*{date+extrayear}{%         \iffieldundef{year}           {}           {\printtext{%          \addperiod\space\printfield{labelyear}%          \printfield{extrayear}}}}          % Print last name first before first name          \DeclareNameAlias{sortname}{last-first}     \DeclareNameAlias{default}{last-first} % for good measure, changes that of the editor and others          \DeclareFieldFormat{title}{#1}          \DeclareBibliographyDriver{online}{%       \usebibmacro{bibindex}%       \usebibmacro{begentry}%       \usebibmacro{author/translator+others}%       \setunit{\labelnamepunct}\newblock       \usebibmacro{title}%       \newunit       \printlist{language}%       \newunit\newblock       \usebibmacro{byauthor}%       \newunit\newblock       \usebibmacro{bytranslator+others}%       \newunit\newblock       \printfield{version}%       \newunit\newblock         \usebibmacro{publisher+location+date}         \newunit\newblock         \usebibmacro{url+urldate}       \usebibmacro{finentry}}          \endinput      Here are a minum working `.tex` file and an output.               \documentclass[10pt]{article}          \usepackage[style=authoryear,backend=biber]{biblatex}     \usepackage{lipsum}     \usepackage{filecontents}          \begin{filecontents}{\jobname.bib}     @online{kruse,     author = {John S. Kruse},     title = {Framework for Sustainable Soil Management: Literature Review and Synthesis},     year = {2007},     url = {http://www.swcs.org/documents/filelibrary/BeyondTliteraturereview.pdf},     publisher= {Soil and Water Conservation Society},     location={Ankeny (IA)},     urldate = {2008-08-03},     }     \end{filecontents}          \addbibresource{\jobname.bib}          \begin{document}     \lipsum[1]     \nocite{*}     \printbibliography          \end{document}      Now to my questions. (I can't separate the questions in this case. Please bear with me.)   1. How do I remove the dots after the initials; and,   2. How can I automatically put a medium designator right after the title, before the period?   3. And how can I write the `urldate` as 2008 Aug 3?   4. I've seen somewhere how to make the titles in sentence case but I can't find it anymore. Can someone please point me to it? :) Answers may be partial. But of course if someone can give a full solution then that is preferred. **Note:** This is related to a previous post: Biblatex Style or Package for Council of Science Editors Citation Format ![enter image description here](http://i.stack.imgur.com/AXEop.png)


title: How can I tell LaTeX to only make pagebreaks on new sections?

text: I'm working on a document where it's important that sections are in the same page. How can I tell LaTeX to only make a page break (if necessary) when I write a new `\section` without having to manually add `\newpages` manually?


title: How do I change in-built themes?

text: > **Possible Duplicate:**   >  beamer: Create own headline theme I'd like to change the frame title of the `Berlin` theme in latex to be similar to the `Singapore` theme (fade out color). Is there a way of accessing the code for the Berlin and Singapore theme so that I can edit theme directly? I have used the beamer user guide, but it's a bit slim as far as creating/editing themes goes. Is there a comprehensive guide/list for theme creation/editing, with all the `\setbeamerxxxx` and `\beamerthemexxxx` commands?


title: How to make text in math mode which would cause an `overfull \hbox` automatically start on the next line?

text: I have text within `$`s following normal text, which runs off the end of the line and creates an `overfull \hbox` warning. By default, LaTeX doesn't let the stuff in math mode run off the end of the line, but it creates a line break at a certain place in the code. How do I tell it to instead, by default, put a line break before the text in the `$`s starts?               \documentclass{article}     \begin{document}          Here is text which starts off the line.     We can write $A^n$ as $\bigcup_{a^{n-1} \in A^{n-1}} \{(a^{n-1}, a) \,:\, a \in A \}$.          More text, then I have something like the following     $(-3, 3)^{C} \textrm{ in } A = (-\infty, -3] \cup [3, \infty)$.          \end{document}      I'm getting line breaks after the `:` in the first sentence, and after the `\cup` in the second sentence. P.S. Also, might there be a better way of creating a "such that" sign within a set written in math mode, instead of `\,:\,`? Ideally, a `|` would be nice, preceded by and following spaces...


title: How to write the unit milli tesla meter?

text: Right now I am using mTm (code: `\unit{10}{\milli\tesla\meter}`). I wanted the output to look like mT-m. The SIunits package documents talks about half-high dot but doesn't mention any hyphen. Any ideas?


title: Math font change for subscript only

text: **Goal:** I want a macro that changes the math font of only subscript and superscript. In TeX terms, I think this means I want to change only S, S' styles, which are typeset using scriptfont. Graphically, I'd want               \bfscript{v_i}      to be displayed as `$v_{\mathbf{i}}$`. **Tries:** I've been trying to do it the TeX way; that is, something like               \def\bfscript#1{\hbox{$\scriptfont0=\tenbf #1$}}      but this fails miserably, as scriptfont and the likes seem completely ignored by LaTeX. It seems that LaTeX only allows to make distinctions on the fontsize, with `\DeclareMathSizes`. **Nota:** I was first interested in this as a real-life case, but I'm not even sure I'll need it any longer; I'm just really wondering what the answer is.


title: Cross Platform LaTeX Build System

text: I am on Windows 7 Professional (64 bit) and would like to be able to execute one command to completely compile a **PDF** from source .tex files (including all required runs to get the table of contents, bibliography, etc). I've seen LatexMake and Rubber. When I run LatexMake on Windows using Make for Windows I get the following error:               '[' is not recognized as an internal or external command,     operable program or batch file.     A subdirectory or file . already exists.     Error occurred while processing: ..     make: *** [.] Error 1      I wanted to try Rubber but it has *nix-specific setup instructions. Perhaps somebody can give me some pointers on getting this running on Windows? Searching Google for combinations of `Windows`, `Rubber`, and `LaTeX` has proven ineffective, for obvious reaons (need a latex rubber seal on your windows?). Also, how would I use Rubber to make PDFs? According to the LaTeXMake page generating pdfs with Rubber is an "extra feature." I would also like to build the same documents using the same solution on *nix systems if at all possible so I can leave the makefiles (or whatever ends up being used) in the source repository. In the worst-case scenario, I can try using cygwin.


title: Centering text flanked by 2 images using tex4ht

text: I am trying to create an HTML page using tex4ht using the following code:               \rput[r](-2pt,6pt){\psvectorian[color=black,width=2cm]{41}}     \hfill{}     {\Large \url{Title Text}}     \hfill{}     \rput[l](0,6pt){\psvectorian[color=black,width=2cm]{42}}     \section{New Section}     This is a section. This is a section.       What I get is this: ![centering](http://i.stack.imgur.com/B8FuJ.png) Is there a better way to center the text and push the images to left/right? **Edit #1:** I also want to mention that this problem is only for tex4ht/HTML. For latex + dvipdf, I get: ![latex + dvipdf](http://i.stack.imgur.com/yrrOP.png) **Edit #2:** I just wanted to post the output from the wonderful answer provided by michal.h21. tex4ht is no doubt powerful, but I find the documentation very hard to understand. Hope this is of help to others: ![solution](http://i.stack.imgur.com/qbfYP.png)


title: Appending to Variables

text: The following code works:               \def \robble {robble}     \def \robbles {\robble\robble}      But the following but doesn't:               \def \robbles {robble}     \def \robbles {\robbles robble}      The overall goal is to get `robbles` to be robblerobble. I need something like the second example, where I am appending on to the current value of a variable. The way it is written right now causes a stack overflow. Is there a way to append to variables in LaTeX?


title: Keep "Appendix #" in the appendix title, but remove the appendix from the table of contents

text: I'm writing a PhD thesis, and my university requires that I list the appendices in a "List of Appendices" (LOA) that is separate from the main table of contents (TOC). I've successfully created a LOA using the `tocloft` package. The problem is that the appendices are still also listed in the TOC. One unsatisfactory workaround is to use the asterisk'ed forms of `\chapter` and `\section` in the appendices. Among other reasons, I don't like this because it removes the appendix letter from the appendices' title pages. How can I keep the appendix numbers in the LOA, but remove them from the TOC? I am using the `appendices`, `tocloft` and `quotchap` packages. Below is a minimal compilable example.               \documentclass[12pt,draft,letterpaper]{report}     \usepackage{quotchap}     \usepackage[titles]{tocloft}     \usepackage{appendix}          \newlistof{appendixchapter}{apx}{List of Appendices}          \newcommand{\appendixchapter}[1]{%       % These three lines are needed to list the appendix letter in the List Of       % Appendices even when using \chapter*       \refstepcounter{appendixchapter}%       \refstepcounter{chapter}%       \providecommand{\DOTIS}[1]{\DOCH \DOTI{#1}}            % '*' removes the appendix from the table of contents.       \chapter*{#1}            % Lists the appendix in the List of Appendices.       \addcontentsline{apx}{appendixchapter}{Appendix \protect\numberline{\theappendixchapter}#1}\par%       \vspace {-1.47cm}}          \renewcommand{\theappendixchapter}{\Alph{appendixchapter}}          \begin{document}          \tableofcontents     \listofappendixchapter\addcontentsline{toc}{section}{List of Appendices}          \chapter{My first chapter}     This is Chapter 1's body.          \appendixchapter{My first appendix}     This is Appendix A's body.          \appendixchapter{My second appendix}     This is Appendix B's body.          \end{document}


title: Memoir suitable amsthm customization

text: I'm using the memoir class to write my master thesis. It's math related so there are lot's of Theorems, Definitions and stuff. I know how to customize theorems by using `amsthm`. e.g.               \newtheoremstyle{mainth}     {11pt}% hSpace abovei     {11pt}% hSpace belowi     {\itshape}% hBody fonti     {}% hIndent amounti1     {\ttfamily\bfseries}% hTheorem head fonti     { }% hPunctuation after theorem headi     {\newline}% hSpace after theorem headi2     { }% hTheorem head spec      I want to give my document an elegant and modern look. Therefore I played a bit with the `\newtheoremstyle` options, but I couldn't get a satisfying solution. E.g. I don't know what fonts are available, what space suits the memoir look,... Has somebody examples of nice looking customized theoremstyles. Like Theorem, Definition, Remark.


title: \pgfresetboundingbox is undefined control sequence?

text: I'm sure this question has a simple answer that I'm missing: I'm trying to use pgfplots to put two graphs right next to each other with no space in between. I thought I could do this by using the \pgfresetboundingbox command found in the manual. However, LaTeX gives me an undefined control sequence error on this command. What am I doing wrong?               \begin{tikzpicture}     \begin{axis}[     ylabel={$\hat{\delta}$},     xlabel={$x$}     ]     \addplot table[x index=0, y index=2, header=false]{probset1.txt};     \end{axis}     \pgfresetboundingbox     \end{tikzpicture}     \hspace{0cm}     \begin{tikzpicture}     \begin{axis}[     xlabel={$x$},     ytick=\empty     ]     \addplot table[x index=0, y index=3, header=false]{probset1.txt};     \end{axis}     \end{tikzpicture}


title: Crossing out sentences

text: I had to cross out a sentence and I did it the following way, which is kinda sloppy.               $ \rlap{\textbf{-------------------------------------------------------------------------------------------------}}%     {\mbox{Its derivative should be}}$ $2z + 2\bar{z} =4Re[z]$ So are its critical points all over the real axis?       is there a better way to do this and get the same result?


title: How can one predict pgfplots memory overload?

text: I have some legitimate data sets that overload the memory available to TeX. Of course the recommended step is to cut the number of data points instead of changing the "main memory size". (In my case the overflow occurs a the `axis` level since it is mainly the number of coexisting curves what produces the overflow.) The question is, does anybody found a rule of thumb of what is the size of the dataset that takes the whole default memory available? Is the number of points what can tell if the memory will be full? Is the number of characters enclosed in a `coordinates` environment? Is the number of points multiplied by the number of curves to draw a given point in the data? To be specific, what is the maximum number of points that can be plotted in a `no markers` style? The idea is that one can (e.g. programmaticaly) tell in advance if a certain set can be plotted and depending on that resample the data.


title: Extra space for numbered titles in table of contents

text: ## Background A manual with chapters, sections, subsections, and sub-subsections. Using KOMA Script v2. ## Problem The spacing between the heading title and its number is too close to the number in some cases: ![enter image description here](http://i.stack.imgur.com/JeiIa.png) After reading the `tocloft` package, I do not see how to adjust the spacing between the heading title and the number. ## Question How do you increase the space before the section title a consistent amount? ## Ideas Tried including the following package:               \usepackage[tocindentauto]{tocstyle}      Tried setting linewidth:               \setlength{\linewidth}{15em}      Tried setting the dottedtocline:               \makeatletter     \renewcommand*{\l@section}{\@dottedtocline{1}{4.5em}{5.3em}}     \makeatother      The last attempt looks promising, but it is tricky to adjust the margins correctly. ## References   * Roman numerals become “too wide” in table of contents   * http://www.mail-archive.com/lyx-users@lists.lyx.org/msg10853.html


title: Insert new line in table

text: I am trying to put part of a header of a table on a new line. This is my code:               \documentclass[a4paper,11pt]{article}     \begin{document}     \title{}     \author{My name}     \date{\today}     \maketitle          \section{}               \begin{table}[!htbp] \centering        \caption{This is a table}        \label{}      \begin{tabular}{@{\extracolsep{5pt}} lll}      \\[-1.8ex]\hline      \hline \\[-1.8ex]     \textbf{Rownames} & \textbf{Quite a long}\\\textbf{header} &  \textbf{Short header} \\      \hline \\[-1.8ex]      value & $1.330$ & $1.080$ \\      value & $0.440$ & $0.360$ \\      value & $0.730$ & $$-$0.380$ \\      \normalsize      \end{tabular}      \end{table}                \end{document}      This is output: ![enter image description here](http://i.stack.imgur.com/bweTp.jpg) The output table I want should look like: ![enter image description here](http://i.stack.imgur.com/fF9kU.jpg) Note how in my desired output, only the word "header" of "Quite a long header" is on a new line. How can I achieve this table?


title: Conflicting packages in presentation (beamer vs. ethiop)

text: I'm making a presentation and I have to include some text in Ethiopic script. For documents, the ethiop-package is a great help, but when in beamer mode, I get an error: > /usr/share/texlive/texmf-dist/tex/latex/ucs/ucsencs.def:16: Undefined > control sequence. \eth@altchar #1->\def \eth@res {\eth@doaltchar {#1}} l.16 > ...2011/01/21 Fixes to fontencodings LGR, T3] I think there is some conflict between beamer mode and the ethiop package. What should I do?               \documentclass{beamer}          \mode<presentation>     { \usetheme{Warsaw}             \usecolortheme{default}        \usefonttheme{default}         \setbeamertemplate{navigation symbols}{}       \setbeamertemplate{caption}[numbered]}           \usepackage[english]{babel}     \usepackage[utf8x]{inputenc}     \usepackage{ethiop}     \newcommand{\etp}{\selectlanguage{ethiop}}          \begin{document}          \begin{frame}          {\etp 'ana negu'sa wa-'antemu 'agbertya .tabbabt}          \end{frame}          \end{document}      O, and this is my first presentation with LaTeX.


title: Text to appear between the title and the date

text: I have text in two columns. I have the `\maketitle` command. It produces the title and date together. But I want the title, the column and then the date. How do I do it?               \documentclass[12pt]{beamer}     \usetheme{Berkeley}     \usecolortheme{default}     \title{Test}     \date{\today}     \author{}     \begin{document}     \begin{frame}       \begin{columns}[c]     \column{1.5in}     Practical \TeX\ 2005\\     Practical \TeX\ 2005\\     Practical \TeX\ 2005     \column{1.5in}     Hello     \end{columns}     \maketitle     \end{frame}     \end{document}


title: LaTeX: Textbox within article

text: I'm not completely new to LaTeX but I'm not used to work with special layout schemes, so that's why I thought it was a good idea to post my question here. Momently I'm trying to create an article witch has a layout as shown in this picture: ![three coloumns, with the two outer surrounding the middle](http://i.stack.imgur.com/A5eoQ.png) But I'm kind off clueless on how to achieve something like that. Anyone who can push me in the right direction?


title: Desired resolution of images for a Beamer presentation

text: I am working on a Beamer presentation for less-technically-inclined audience, so I want to use many visual aids, pictures, stock photos, etc. Unfortunately, these are mostly raster images, not vector diagrams. From your experience, what minimal resolution is required so that an image would not appear pixelated when covering a full slide? I particularly refer to projecting the presentation from a beamer, not viewing it on a computer screen.


title: How to make a tree more compact?

text: I'm using the `qtree` package, and I've made a tree that stretches far too much, and as a result, won't fit on the page. Here is my code:               \Tree [.1/1 [.1/2 [.1/3 [.1/4  [.1/5 1/6 2/9 ]   [.2/7 3/11 3/10 ]  ] [.2/5  [.3/8 4/11 7/12 ]   [.3/7 5/12 4/9 ]  ] ] [.2/3 [.3/5  [.4/7 5/9 7/12 ]   [.5/8 8/13 7/11 ]  ] [.3/4  [.5/7 7/10 8/11 ]   [.4/5 7/9 5/6 ]  ] ] ] [.2/1 [.3/2 [.4/3  [.5/4 6/5 9/7 ]   [.7/5 11/8 10/7 ]  ] [.5/3  [.8/5 11/7 13/8 ]   [.7/4 12/7 9/5 ]  ] ] [.3/1 [.5/2  [.7/3 9/4 12/5 ]   [.8/3 12/7 11/4 ]  ] [.4/1  [.7/2 10/3 11/3 ]   [.5/1 9/2 6/1 ]  ] ] ] ]      Is there a way to make lines from each node to the next smaller and spacing between everything smaller? Thanks


title: Libertine/Biolinum suddenly missing/corrupted?

text: I'm working with Miktex 2.9 64 Bit on Windows 8 with Texniccenter. Up until yesterday I compiled all my documents without any problems. Today everything seems fine, too, I did _not_ run any Miktex Update overnight (though all packages were up to date the last few days). Texniccenter does not _display_ any errors. But strangely no PDF was produced with pdflatex. Then I looked in the Logfile. At the very end (after the statistics, seems Texniccenter does not expect anything after that for it's own GUI output), there was this: > !pdfTeX error: pdflatex.exe (file LinBiolinumOB-osf-t1--base): Font > LinBiolinumOB-osf-t1--base at 657 not found > > ==> Fatal error occurred, no output PDF file produced! I commented out out every               \usepackage{libertine}      in my preambles. It works again! But with the wrong font, of course... What is causing the problems here? I'm using Libertine just as the TUG font catalogue tells me:               \usepackage{libertine}     \usepackage[T1]{fontenc}


title: How to break long solutions in exam class?

text: I am currently using the exam class to write up the solutions to a take-home exam, but I am having issues when my solutions are too big to fit a page. I either have huge gaps in my paper or solutions that spill over the page and never make it to the next one. So what I need is to find a way to break the solution `\fbox` into multiple boxes. I don't mind a solution where I have to manually tweak the contents of each solution box, but if that can be done automatically that would be even better. I would also really like it if boxes comprising the same solution could be "open-ended" to show that they belong together. Just for the sake of completeness, here's some extra info:   * I tried splitting solutions manually by just adding things like `\end{solution}\newpage\begin{solution}` to no avail.    * I also tried reading `exam.cls` (I have version 2.4, 2011/05/22) to see if I could hack it myself, and saw a comment (line 70) that page breaks were in fact supposed to be possible within the solution environment, but they don't seem to work for me.   * This question reports the same issue, but since there was no solution and my comment would probably not get any attention, I decided to repost the reformulated question including the following MWE:               \documentclass[a4paper,12pt,answers]{exam}     \usepackage{amsmath,amssymb,amsthm}          \begin{document}          \begin{questions}          \question Let $A \in \mathbb{R}^{n \times n}$, possibly singular. Show there exists $\epsilon \neq 0$ such that  $A+\epsilon I$ is n.          \begin{EnvFullwidth}     \begin{solution} \\     01 REALLY LONG SOLUTION \\     02 REALLY LONG SOLUTION \\     03 REALLY LONG SOLUTION \\     04 REALLY LONG SOLUTION \\     05 REALLY LONG SOLUTION \\     06 REALLY LONG SOLUTION \\     07 REALLY LONG SOLUTION \\     08 REALLY LONG SOLUTION \\     09 REALLY LONG SOLUTION \\     10 REALLY LONG SOLUTION \\     11 REALLY LONG SOLUTION \\     12 REALLY LONG SOLUTION \\     13 REALLY LONG SOLUTION \\     14 REALLY LONG SOLUTION \\     15 REALLY LONG SOLUTION \\     16 REALLY LONG SOLUTION \\     17 REALLY LONG SOLUTION \\     18 REALLY LONG SOLUTION \\     19 REALLY LONG SOLUTION \\     20 REALLY LONG SOLUTION \\     21 REALLY LONG SOLUTION \\     22 REALLY LONG SOLUTION \\     23 REALLY LONG SOLUTION \\     24 REALLY LONG SOLUTION \\     25 REALLY LONG SOLUTION \\     26 REALLY LONG SOLUTION \\     27 REALLY LONG SOLUTION \\     28 REALLY LONG SOLUTION \\     29 REALLY LONG SOLUTION \\     30 REALLY LONG SOLUTION \\     31 REALLY LONG SOLUTION \\     32 REALLY LONG SOLUTION \\     33 REALLY LONG SOLUTION \\     34 REALLY LONG SOLUTION \\     35 REALLY LONG SOLUTION \\     36 REALLY LONG SOLUTION \\     37 REALLY LONG SOLUTION \\     38 REALLY LONG SOLUTION \\     39 REALLY LONG SOLUTION \\     40 REALLY LONG SOLUTION \\     41 REALLY LONG SOLUTION \\     42 REALLY LONG SOLUTION \\     43 REALLY LONG SOLUTION \\     44 REALLY LONG SOLUTION \\     45 REALLY LONG SOLUTION \\     46 REALLY LONG SOLUTION \\     47 REALLY LONG SOLUTION \\     48 REALLY LONG SOLUTION \\     49 REALLY LONG SOLUTION \\     50 REALLY LONG SOLUTION \\     51 REALLY LONG SOLUTION \\     52 REALLY LONG SOLUTION \\     53 REALLY LONG SOLUTION \\     54 REALLY LONG SOLUTION \\     55 REALLY LONG SOLUTION \\     56 REALLY LONG SOLUTION \\     57 REALLY LONG SOLUTION \\     58 REALLY LONG SOLUTION \\     59 REALLY LONG SOLUTION \\     60 REALLY LONG SOLUTION \\     \end{solution}     \end{EnvFullwidth}          \end{questions}          \end{document}      Thanks a lot for the attention!


title: Modify case equation's brace

text: I was wondering if there is a way to change, case's symbol(curly brace) to two arrows pointing up/left and down/left.               \documentclass[a4paper,11pt]{article}     \usepackage{kerkis}     \usepackage{amsmath}     \usepackage{amssymb}     \usepackage{amsfonts}     \usepackage{wasysym}     \usepackage{amsthm}     \usepackage{tikz}     \begin{document}     \begin{align}     \mathbf{\nabla}\times \mathbf{E}=&0\;\begin{cases}\mathbf{E}=-\mathbf{\nabla}\Phi \\     \hat{\eta}\times (\mathbf{E_2}-\mathbf{E_1})=0\mbox{(continiuty)}\end{cases}\\     1+1=&2     \end{align}     %TikZ code "illustrating" the new "brace"     \begin{tikzpicture}     \draw[->] (0,0) -- (1,1);     \draw[->] (0,0) -- (1,-1);     \end{tikzpicture}     \end{document}      ![](http://i.imgur.com/IURJj.jpg)


title: How to use MetaPost with TeXlipse?

text: I would like to to use TeXlipse, MetaPost and MetaUML to generate requirements specifications. The problem I have is that I haven't found an easy way to incorporate MetaPost in TeXlipse build. There is configuration for common TeX tools, preferred output format and toolchain to produce it, but MetaPost is not there. Any ideas?


title: Understanding etoolbox \ifdefempty and \ifdefvoid

text: I am trying to understand the `etoolbox` `\ifdefempty` and `\ifdefvoid` macros. The documentation says that `\ifdefempty` > Expands to true if the control sequence is defined and is a parameterless > macro whose replacement text is empty, and to false otherwise. Similarly `\ifdefvoid` > Expands to true if the control sequence is undefined, if is a macro whose > meaning is `\relax`, or a parameterless macro whose replacement text is > empty, and to false otherwise. From these descriptions I thought that `\def\myempty{}`, `\def\myrelax{\relax}`, and `\def\myemptyempty{\myempty}` would all be both "empty" and "void", but `\def\myempty{}` is the only one that is either "empty" or "void". What am I missing?               \documentclass{minimal}     \usepackage{etoolbox}          \begin{document}          \def\myempty{}     \def\myrelax{\relax}     \def\myemptyempty{\myempty}               \ifdefempty{\myempty}{Empty}{Not empty}          \ifdefempty{\myrelax}{Empty}{Not empty}          \ifdefempty{\myemptyempty}{Empty}{Not empty}          \ifdefvoid{\myempty}{Void}{Not void}          \ifdefvoid{\myrelax}{Void}{Not void}          \ifdefvoid{\myemptyempty}{Void}{Not void}          \end{document}


title: no output with \usepackage{emp}

text: I'm trying to embed MetaPost graphics inside a LaTeX file using the `emp` package, with pdflatex. When I include the line:               \usepackage{emp} %part 1      pdflatex doesn't produce any output (it says 0 pages), but doesn't seem to create an error. I've checked that it works without that line, and I've checked that `emp` is installed. I've tried reinstalling MiKTeX, which someone said worked on a similar problem. I haven't even included any MetaPost yet. I've tried it with the lines suggested at this page (which I've divided into part 2 and part 3: http://www.cs.bgu.ac.il/~gwiener/software-engineering/how-to-embed-uml-in- latex/ And I've tried it without. The only way it will give output is if I don't include any of that stuff. If part 1 is there, it just doesn't work. Am I being a complete moron? Attached is a MWE.               \documentclass{article}          %part 1:     \usepackage{emp}          %part 2:     \ifx\pdftexversion\undefined     \usepackage[dvips]{graphicx}     \else     \usepackage[pdftex]{graphicx}     \DeclareGraphicsRule{*}{mps}{*}{}     \fi          \begin{document}     \begin{empfile} %part 3     \begin{empcmds} %part 3     input metauml;  %part 3     \end{empcmds}   %part 3     \section{What is a set?}     A set is a collection of objects.     \end{empfile}   %part 3     \end{document}


title: Use input file in \thanks{}

text: Is it possible to acheive something similar to               \title{\myTitle \thanks{ \input{../acknowledgement} }}      (which doesn't work?) in order to load the content for \thanks on the fly?


title: Arrow with an asterisk superscript and text above?

text: I'm trying to create an arrow (or `\mapsto`) that has text above it and also an asterisk superscript — where the asterisk is only a superscript for the arrow, if that makes sense. I've been trying `\xmapsto{add}^*`; the asterisk seems to be above for the whole thing together, which I think makes sense... but I'm wondering if there's a way I could get the asterisk to just be a superscript to the arrow as if the text wasn't there?


title: TikZ/pgf: How to draw edges that start and end at the same node when using the `graphdrawing` library?

text: I have borrowed this example from http://www.texample.net/. ![enter image description here](http://i.stack.imgur.com/0rf36.png) The graph exhibits a characteristic that I do not know how to reproduce using the `graphdrawing` library: its nodes have edges that start and end at the same node. How would this be done when using the `graphdrawing` library? Here's what I have tried so far. I attempted to force the edge length to be a certain amount, so that the algorithm would have to draw a edge with that length, but then also loop it back. It seems that this command does not _force_ the edge to be a certain length, and thus produces a nonsense result.               \documentclass{standalone}     \usepackage{tikz}     \usetikzlibrary{graphdrawing}     \usetikzlibrary{arrows}     \usetikzlibrary{graphs}     \usegdlibrary{force, layered, trees}          \begin{document}                   \tikz [rounded corners]             \graph [spring layout]             {                 a ->                 {                     b ->[length=3] b                 }             };          \end{document}


title: Custom font size for itemize

text: I am making a checklist to print, where users can check their answers on a printed paper. For this I am using `itemize` and `\renewcommand{\labelitemi}{\Box}`, `\renewcommand{\labelitemii}{\Box}` etc..., which works fine. What I now want is to make items, sub-items and sub-sub-items different sized, so that the higher the hierarchy, the bigger font. Since I have a lot of things to check, I don't want to specify each line in the latex document, but was hoping to use a `\renewcommand{\itemi}{something}` or something like that. Is this possible in any way?


title: How to correctly use geometry package with wrapfig package to avoid wrong layout

text: I am learning the wrapfig package. I noticed that when I include my common latex file, which has common definitions, the text no longer wrap around the figures, but the figure are pushed to the right only (since I set `wrapfig` to do this). This turns out due to my using the `geometry` package in the common latex file, where I set the margin to `2.2cm` for all my documents, which is something I had set long time ago. If I do not use the `geometry` package, then the text will wrap around as expected. I do not see why this setting of the margin should make wrapfig miss-behave so much. I'd like to keep my use of `geometry` package there with the `2.2cm` margin, and still use the wrapfigure. Is this possible? Is there a better way to do this? A MWE example will explain. First will show the problem when using `\usepackage[margin={2.2cm}]{geometry}` ![Mathematica graphics](http://i.stack.imgur.com/0bXyy.png) Now will show the same page, but without the geometry package being used at all. ![Mathematica graphics](http://i.stack.imgur.com/17ukZ.png) So now the text does wrap around. But the margins of the page are too large, and that is why I want to use geometry. It does not matter if I load the `geometry` package after or before `wrapfig`. same problem. Here is the MWE               \documentclass[11pt]{article}     \usepackage{graphicx}     \usepackage{amsmath}     \usepackage[margin={2.2cm}]{geometry}%     \usepackage{wrapfig, blindtext}          \begin{document}     \section{The problem}     \begin{wrapfigure}{R}{0.3\textwidth}     \centering     \rule{0.9\linewidth}{0.75\linewidth}     \caption{\label{fig:d1}Integrating a function}     \end{wrapfigure}     %     To find a numerical value for the integral of a real valued function of a real     variable over a specific range over the real line. This means to     evaluate     \[     I={\displaystyle\int\limits_{a}^{b}}f\left(  x\right)  \ dx     \]     Geometrically, this integral represents the area under $f(x)$     from $a$ to $b$%          \section{Solution}     \begingroup     \begin{wrapfigure}{R}{0.3\textwidth}     \centering     \rule{0.9\linewidth}{0.75\linewidth}     \caption{\label{fig:d2}Numerical integration}     \end{wrapfigure}     \endgroup          We can always approximate the area by dividing it in equal width strips and     then sum the areas of all the strips.          In general, there will always be an error in the estimate of the area using     this method. The error will become smaller the more strips     we use (which implies a smaller strip width). Hence we can write%          \[     {\displaystyle\int\limits_{a}^{b}}     f\left(  x\right)  \ dx=\left(     {\displaystyle\sum\limits_{i=1}^{N}}     \Delta x\ f\left(  x_{i}\right)  \right)  +E     \]          Where $E$ is the error between the actual area and the approximated area using the     above method of numerical integration. $N$ above is the number of strips or     can also be refereed to as the number of integration points.          Instead of keep referring to the 'width of the strip' all the time, we will     call this quantity the weight $w_{i}$ that we will multiply the value of the     function with to obtain the area. Hence the above becomes          \[%     {\displaystyle\int\limits_{a}^{b}}     f\left(  x\right)  \ dx=\left(     {\displaystyle\sum\limits_{i=1}^{N}}     w_{i}\ f\left(  x_{i}\right)  \right)  +E     \]          Using implied summation on indices the above becomes          \[%     {\displaystyle\int\limits_{a}^{b}}     f\left(  x\right)  \ dx=w_{i}\ f\left(  x_{i}\right)  +E     \]          In the above we divided the range of the integration (the distance between the     upper and lower limits of integration) into equal intervals. We can decide to     evaluate $f(x_{i})$ at the middle of the strip or at the start     of the strip or at the end of the strip. In the diagram above we evaluated the     $f(x)$ at the left end of the strip.          Our goal is to evaluate this integral such as the error $E$ is minimum and using     the smallest number of integration points. In a sense this can be considered     an optimization problem with constraints: minimize the error of integration     using the smallest possible number of points.          \end{document}


title: What on earth is iTeX?

text: Is that an hoax? Or is it a real wish from D. Knuth? (http://river-valley.tv/media/conferences/tug-2010/Don-Knuth)


title: Long name of Chapter in TOC. Doesn't work \\ for a new line

text: For a `\documentclass{report}`, how can I make a long chapter name to wrap onto a second line in TOC ? For example : ![screenshot](http://i.stack.imgur.com/8pAeU.jpg)


title: use tikz to draw a rectangle enclosed by an oval

text: ![enter image description here](http://i.stack.imgur.com/MNxZO.png)I use the code below to draw a rectangle enclosed by a oval, however it doesn't work.               \documentclass{beamer}     \usepackage{tikz}     \usepackage{animate}          \usepackage{fp}          % parameterized tikz graphics     \newcommand{\intersect}[1]{%     \def\setA{(0,0) circle (1)}%     \def\setc{(1,0) ellipse (1,2)}%     \def\setB{(#1,0) circle (1)}%     % define the bounding box     \def\boundb{(-2,2) rectangle (4,-2)}%     %     \begin{tikzpicture}         \draw \boundb;         % intersection         \begin{scope}         \clip \setc;         \end{scope}         \begin{scope}[even odd rule]% first circle without the second         \clip \setB \boundb;         \end{scope}          \draw \setc;     \end{tikzpicture}     }          \begin{document}     \begin{frame}     \begin{center}              \begin{animateinline}[autoplay,palindrome]{12}         %first frame, xb=0.0         \gdef\xb{0}% xb initial value         \intersect{\xb}%         %remaining frames, xb=0.1...2.1         \whiledo{\lengthtest{\xb pt < 2.1pt}}{%             \newframe             \FPeval{xb}{\xb+0.1}% new xb             \xdef\xb{\xb}% make \xb global             \intersect{\xb}%         }%         \end{animateinline}          \end{center}     \end{frame}     \end{document}


title: Latex character error while splitting chapters

text: I'm writing a LaTeX document and everything works fine, but as I try to split the document chapters in different `.tex` files, I receive several errors related to the characters in the document (and with the encoding, I suppose). In the document I use a lot of accented letters with direct insertion, such as `ì` or `è`. I used               \usepackage[latin1]{inputenc}       to let this work and it do work as long as the chapter are all together in the main file. But as I try to copy the first chapter in a separate file and use `\input` or `\include` in the main file, I get a series of errors related to the characters. Why does that happens?


title: How to force the alignment of a macro-generated TikZ picture?

text: I am a beginner in LaTeX, trying to use it for industrial documents. The code below draws a series of mechanical keys, whose geometry and color codes are defined by a standard. However when I place the code in the table, the pictures of the keys get misaligned, possibly because the bounding box adjusts to the envelope of eack key. I have been unable to realign properly the vertical zero axis of each key (center of circles) with the table cells. Trying to adjust manually the clipping area may be a way, but not a very clean one. Is there a way to freeze the center of the bounding box on the center of the key diameter? Or to improve this code altogether?               \documentclass{article}      \usepackage[english,]{babel}      \usepackage{tikz}     \usepackage{siunitx}% Handling Si units     \usepackage{ifthen} % Use of tests     %===================================     %BEGIN DRAWING SINGLE KEY FRONT  ---     %\SingleKeyFront{scale}{color}{width1}{angle key1}{rotation angle}     \newcommand{\SingleKeyFront}[5]{%     %=======General dimensions==========     \def\Magnif{#1} %picture Magnification ratio     \def\ClippingLeftPoint{-0.4,-0.4}     \def\ClippingRightPoint{0.4,0.4}     \def\KeyAngleOne{#4} %Angular position of key      %=======Shell dimensions===========     \def\DiaShellMachining{0.925}     \def\DiaExtKey{.76}     \def\DiaExt{0.63}     \def\DiaInt{0.5}     \def\KeyWidthOne{#3}          \begin{tikzpicture}[scale=\Magnif]     \clip (\ClippingLeftPoint) rectangle (\ClippingRightPoint); %cropping picture      \shade[inner color=black!60, outer color=black! 80] (0,0) circle (\DiaInt/2);     \filldraw [draw=black!80, very thick, fill=#2! 75,even odd rule] (0,0) circle(\DiaInt/2) circle(\DiaExt/ 2); %Painted ring at front of key     \begin{scope}[rotate=#5]     \begin{scope}[rotate=\KeyAngleOne-90]     \pgfmathparse{0.5*\DiaExtKey*cos(asin (\KeyWidthOne/(\DiaExtKey)))} \let \Youter\pgfmathresult     \pgfmathparse{0.5*\DiaExt*cos(asin (\KeyWidthOne/(\DiaExt)))} \let\Yinner \pgfmathresult     \pgfmathparse{(\Youter) / (0.5*\KeyWidthOne)} \let\ThetaOne \pgfmathresult % Y coordinate of upper key corners     \pgfmathparse{(\Yinner) / (0.5*\KeyWidthOne)} \let\ThetaTwo \pgfmathresult  %Y coordinate of lower key corners      \pgfmathparse{sqrt ((\Youter)^2)+((0.5*\KeyWidthOne) ^2 )} \let\ra \pgfmathresult     \filldraw[draw=black!75, very thick, fill=black!50] ({atan(\ThetaOne)}:\ra) -- ({atan(\ThetaTwo)}:0.5*\DiaExt) arc({atan(\ThetaTwo)}:{180-atan(\ThetaTwo)}:0.5*\DiaExt) -- ({180-atan(\ThetaOne))}:\ra) arc ({180-atan(\ThetaOne))}: {atan(\ThetaOne)}:\ra) ;     \end{scope}     \end{scope}     \end{tikzpicture}     }%     %END DRAWING SINGLE KEY FRONT -------     %====================================     %====================================     %BEGIN DRAWING DUAL KEY FRONT========     %Routine drawing dual key front------     %\DualKeyFront{scale}{color}{width1}{width2}{angle key1}{angle key2}{rotation angle}     \newcommand{\DualKeyFront}[7]{%     %=======General dimensions==========     \def\Magnif{#1} %picture Magnification ratio     \def\ClippingLeftPoint{-0.4,-0.4}     \def\ClippingRightPoint{0.4, 0.4}     \def\KeyAngleOne{#5} %Angular position of key     \def\KeyAngleTwo{#6} %Angular position of key     %=======Shell dimensions==========     \def\DiaShellMachining{0.925}     \def\DiaExtKey{.76}     \def\DiaExt{0.63}     \def\DiaInt{0.5}     \def\KeyWidthOne{#3}     \def\KeyWidthTwo{#4}          \begin{tikzpicture}[scale=\Magnif]     %\clip (\ClippingLeftPoint) rectangle (\ClippingRightPoint); %cropping picture      \shade[inner color=black!60, outer color=black! 80] (0,0) circle (\DiaInt/2);          \filldraw [draw=black!80, very thick, fill=#2! 75,even odd rule] (0,0) circle(\DiaInt/2) circle(\DiaExt/ 2); %Painted ring at front of key     \begin{scope}[rotate=#7]     \begin{scope}[rotate=\KeyAngleOne-90]     \pgfmathparse{0.5*\DiaExtKey*cos(asin (\KeyWidthOne/(\DiaExtKey)))} \let \Youter\pgfmathresult          \pgfmathparse{0.5*\DiaExt*cos(asin (\KeyWidthOne/(\DiaExt)))} \let\Yinner \pgfmathresult     \pgfmathparse{(\Youter) / (0.5*\KeyWidthOne)} \let\ThetaOne \pgfmathresult % Y coordinate of upper key corners     \pgfmathparse{(\Yinner) / (0.5*\KeyWidthOne)} \let\ThetaTwo \pgfmathresult  %Y coordinate of lower key corners      \pgfmathparse{sqrt ((\Youter)^2)+((0.5*\KeyWidthOne) ^2 )} \let\ra \pgfmathresult          \filldraw[draw=black!75, very thick, fill=black!50] ({atan(\ThetaOne)}:\ra) -- ({atan(\ThetaTwo)}:0.5*\DiaExt) arc({atan(\ThetaTwo)}:{180-atan(\ThetaTwo)}:0.5*\DiaExt) -- ({180-atan(\ThetaOne))}:\ra) arc ({180-atan(\ThetaOne))}: {atan(\ThetaOne)}:\ra) ;     \end{scope}          \begin{scope}[rotate=\KeyAngleTwo-90]     \pgfmathparse{0.5*\DiaExtKey*cos(asin (\KeyWidthOne/(\DiaExtKey)))} \let \Youter\pgfmathresult     \pgfmathparse{0.5*\DiaExt*cos(asin (\KeyWidthOne/(\DiaExt)))} \let\Yinner \pgfmathresult          \pgfmathparse{(\Youter) / (0.5*\KeyWidthTwo)} \let\ThetaOne \pgfmathresult % Y coordinate of upper key corners     \pgfmathparse{(\Yinner) / (0.5*\KeyWidthTwo)} \let\ThetaTwo \pgfmathresult  %Y coordinate of lower key corners           \pgfmathparse{sqrt ((\Youter)^2)+((0.5*\KeyWidthTwo) ^2 )} \let\ra \pgfmathresult          \filldraw[draw=black!75, very thick, fill=black!50] ({atan(\ThetaOne)}:\ra) -- ({atan(\ThetaTwo)}:0.5*\DiaExt) arc({atan(\ThetaTwo)}:{180-atan(\ThetaTwo)}:0.5*\DiaExt) -- ({180-atan(\ThetaOne))}:\ra) arc ({180-atan(\ThetaOne))}: {atan(\ThetaOne)}:\ra) ;     \end{scope}     \end{scope}     \end{tikzpicture}     }%     %END DRAWING DUAL KEY FRONT=======     %===========================     % BEGIN TOP LEVEL COMMAND DRAWING KEY FRONT     % \KeyFront}{scale}{color}{orientation}     \newcommand{\KeyFront}[3]{%     \ifthenelse{\equal{#2}{purple}}{\SingleKeyFront{#1}{#2}{.32}{0}{#3}}{}     \ifthenelse{\equal{#2}{yellow}}{\DualKeyFront{#1}{#2}{.195}{.1}{0}{60}{#3}}{}     \ifthenelse{\equal{#2}{green}}{\DualKeyFront{#1}{#2}{.195}{.1}{0}{120}{#3}}{}     \ifthenelse{\equal{#2}{blue}}{\DualKeyFront{#1}{#2}{.195}{.1}{0}{180}{#3}}{}     \ifthenelse{\equal{#2}{orange}}{\DualKeyFront{#1}{#2}{.195}{.1}{0}{240}{#3}}{}     \ifthenelse{\equal{#2}{white}}{\DualKeyFront{#1}{#2}{.195}{.1}{0}{300}{#3}}{}     \ifthenelse{\equal{#2}{neutral}}{\SingleKeyFront{#1}{gray}{.195}{0}{#3}}{}     }     %END TOP LEVEL COMMAND DRAWING KEY FRONT          \begin{document}          \begin{figure}[h]     \renewcommand{\arraystretch}{0.4}     \centering\bfseries     \begin{tabular}{|>\centering p{2.5cm}|>\centering p{2.5cm}|>\centering p{2.5cm}|>\centering p{2.5cm}|}     \hline\rule[3 ex]{0pt}{0pt}     Key form 10 (neutral)& Key form 01 (purple)&     Key form 02 (yellow)& Key form 03 (green)\tabularnewline &&&\\     \KeyFront{2.5}{neutral}{90}&     \KeyFront{2.5}{purple}{90}&     \KeyFront{2.5}{yellow}{90}&     \KeyFront{2.5}{green}{90}\tabularnewline\hline     \end{tabular}      \caption{Types of available keys}     \end{figure}     \end{document}


title: Break after arrow

text: The length of formula in attached code is getting too long, I would wish to break it short. I try to insert a break after the \rightsquigarrow by failed. How should I insert a break?                  \documentclass[conference]{IEEEtran}              \usepackage{amsmath, amssymb, url, proof}         \newcommand{\srule}[3]{         \infer[ (#1) ]              {#3}              {#2}              \bigskip         }         \begin{document}              {\centering             \begin{minipage}{1\textwidth}                 \srule{if2}                 { \bigwedge\limits_{i=1}^n t_1 \leq t_i}                 {(t_1\Rightarrow P_1,\ldots,t_n\Rightarrow P_n),C,D)                 \stackrel{\tau}\rightsquigarrow                 (P_1, C \land \bigwedge\limits_{i=1}^n t_1 \leq t_i,D+t_1))}             \end{minipage}                  }               \end{document}      ![The expected formula should be like this](http://i.stack.imgur.com/xzeMO.gif)


title: Undesirable lines with multi rows in tables

text: I'd like to get your help with a table where I'm using multi rows. It appears lines from rows, it's undesirable.   Also I have a weird alignment of the text in cells, title in 6th row isn't centered. I attached a figure to depict.               \documentclass{article}     \title{New}          \usepackage{array}          \usepackage{multirow}          \begin{document}     \begin{table}[H]      \caption{Title}      \centering     \begin{tabular}{|>{\centering\arraybackslash}m{30mm} |>{\centering\arraybackslash}m{30mm} |>{\centering\arraybackslash}m{30mm} |}     \hline     \multicolumn{3}{|c|}{\textbf{TEXT}}\\     \hline     \multicolumn{2}{|c|}{text} & \multirow{2}{*}{text}\\     \hline     \center text\newline text & \center Meses\newline text& \\     \hline     \multicolumn{2}{|c|}{TEXT} & TEXT\\     \hline     \multicolumn{2}{|c|}{Text} & \multirow{3}{*}{text text text text text text text text text text text text}\\     \hline     \multicolumn{2}{|>{\centering\arraybackslash}m{60mm}|}{\textbf{TITLE}\newline Text text text text Text text text text Text text text text Text text text text} & \\     \hline      & \textbf{TITLE}\newline Text text text text Text text text text Text text text text Text text text text & \\     \hline     \end{tabular}          \end{table}           \end{document}      ![fig](http://i.stack.imgur.com/rxaqP.png)


title: How to make a hbox several lines under the specified place?

text: Recently I asked How to colourfuly highlight some lines of an algorithm using algorithm2e? I wanted to acheive this effect using the `algorithm2e` package: ![enter image description here](http://i.stack.imgur.com/NwlQV.jpg) Thanks to JLDiaz's answer I know how to do it. JLDiaz suggests that I define a macro using the `xcolor` package like this:               \documentclass{article}     \usepackage[ruled]{algorithm2e} % http://www.ctan.org/pkg/algorithm2e     \usepackage{xcolor} % http://www.ctan.org/tex-archive/macros/latex/contrib/xcolor          % This is the solution:     \def\HiLi{\leavevmode\rlap{\hbox to      \hsize{\color{yellow!50}\leaders\hrule height .8\baselineskip depth .5ex\hfill}}}               \begin{document}     \begin{algorithm}[h]      \caption{Evolutionary algorithm}      initialize population \;      \HiLi\For( \emph{Evolutionary loop}){$g := 1$ to $G_{max}$}      {         \HiLi do things \;         evolve population \;      }      celebrate \;     \end{algorithm}          \end{document}      The problem is that there is no way how to **paint the end statement**. I have never done any LaTeX programming, but I think that a solution could be to make a similar macro that would place a hbox at the place where it is called and an identical hbox a few lines later. The number of lines could be provided manually. Is this possible?


title: How can i create multiple documents from one template - depending on special "variables"?

text: I am currently trying to set up a document template that allows for automated creation of different output files depending on a certain "input".   The "input" could be a variable or a certain kind of command. What i am trying to achieve is something along the lines of               \documentclass{article}          \newcommand{\tool}{Photoshop}          \begin{document}          \section{Install Guide for the tool \tool}          \ldots          After installation, you can find the tool under ``C:\textbackslash Program     Files\textbackslash\tool''. \par\bigskip          Pseudocode starts here: \par\bigskip          if (\textbackslash tool == ``Photoshop''): \newline          The amazing thing about \textbackslash tool\ is: it is quite     expensive\ldots\newline          fi\par\bigskip          else if (\textbackslash tool == ``GIMP''):  \newline          The amazing thing about \textbackslash tool is: it is freeware and     Open-Source as well!\newline          fi\par\bigskip          else: \newline          I don't know what tool you are talking about, please tell me more!           \end{document}      So far, i have only found "if" examples comparing numbers with `\ifnum` or macros with `\ifx`.   This does not seem to work with strings, however. I am aware of the `includeonly` and `excludeonly`packages, which would however require a lot of fiddling once the document grows bigger.   Also, it would probably be difficult to steer `includeonly/excludeonly` from outside of the document (document build will be automatized via `ant`)


title: How to install Type 1 font in MiKTeX 2.9

text: What is the procedure to install Type 1 font in MiKTeX 2.9? Can anybody help me?


title: using mdframed with multicol causes some sort of overflow

text: I'm trying to make a cheatsheet in the style of the OpenGL Quick Reference Card by using multicol and mdframed. It seems to work fine, but at times mdframed's frames are seemingly-randomly cut off, wasting most of a page. This is my source, this is the output. I'm using Gentoo's texlive-2012, which has an outdated `mdframed`; when I switch to the current version of `mdframed`, it looks like this. Note how page three is almost empty despite the absence of manual pagebreaks. I tried removing the `\section`s, but that made no difference. Does anyone know what the problem could be?


title: Creating table of images and only one col having one picture to span all rows

text: I am just adding lots of images into latex and although I know how to apply images to a table, this one is slightly tricker. I have two columns. The first needs a single image which spans all rows, and the second needs three separate images. I realise I need to use multirow and do, but it seems not to be working               \begin{figure}     \centering     \begin{tabular}{ c c }     \multirow{3}{\includegraphics[scale = 0.5]{images/woman-with-black-hat-1909- schiele.jpg}} &  \includegraphics[scale = 5]{images/sal10_24Sal.jpg} \\      & \includegraphics[scale = 5]{images/sal50_24Sal.jpg} \\     & \includegraphics[scale = 5]{images/sal100_24Sal.jpg}\\      \end{tabular}     \caption{unused for the mo}     \label{fig:vincent}     \end{figure}


title: How can I center all tables in a document?

text: ## Background Would like to center all tables within floats, without having to add `\centering` to each table. ## Ideas Tried the following:               \let\originaltabular\tabular     \renewcommand\tabular{\centering\originaltabular}      It compiles, but the tables remain left-justified. ## Question How would you edit the Preamble of a LyX document to make all the floating tables be centred?


title: How to use font in code format?

text: What's the command for displaying `<receive>`, `<reply>` and so on as appearing in the following picture? ![enter image description here](http://i.stack.imgur.com/t5gQD.png)


title: How to typeset a primed vector

text: I write a vector with an arrow above the letter using `\vec{p}` and sometimes the vector needs to be primed using `'` (or `^{\prime}`, equivalently). However, neither               \vec{p}'      ![enter image description here](http://i.stack.imgur.com/kHAGD.png) nor               \vec{p'}      ![enter image description here](http://i.stack.imgur.com/04w0z.png) looks satisfactory (first option: prime dash overlaps with vector arrow, second option: arrow looks misplaced). How would one write a primed vector?


title: Can I draw arrows between two minipages?

text: I have an exam where my students should connect two objects in different columns on a page. The two columns are one with text alternatives and one with pictures/formulae. I want to draw a red line connecting the correct object for the corrected sheet, how can I do it?               \begin{minipage}[t]{0.5\textwidth}     {\bf A} \\ \vspace{10 mm}     (1) Surjektivitet \\ \vspace{20 mm}     (2) Reflexivitet \\ \vspace{20 mm}     (3) Symmetri  \\ \vspace{20 mm}     (4) Injektivitet \\  \vspace{20 mm}     (5) Transitivitet \\ \vspace{30 mm}          Lycka till!     \end{minipage}\begin{minipage}[t]{0.5\textwidth}     {\bf B}  \\ \vspace{10 mm}     (a)\\      \begin{center}     \vspace{-10 mm} \includegraphics[width=0.4\textwidth]{Injection} \\  \vspace{20 mm}     \end{center}     \stepcounter{footnote}     (b) \textbf{$\forall a \in A, \;\; a\mathcal{R}a$ }. \footnote{  $\forall a \in A$, läses ut som för varje element $a$ i mängden $A$ så gäller\dots}\\ \vspace{20 mm}          (c) \textbf{$\forall x,y,z \in X,$ $(x\mathcal{R}y \wedge y\mathcal{R}z  \Rightarrow x\mathcal{R}z)$ }\\ \vspace{20 mm}          (d)\\   \begin{center}       \vspace{-10 mm} \includegraphics[width=0.4\textwidth]{Surjection}\\    \end{center}     \end{minipage}      Ex. (3) connects to (b) with a red arrow.


title: Why can't split with curly-brace be inside align but it can be inside gather?

text: The following code snippet will guide you through the issue chronologically.               \documentclass[preview,border=12pt,12pt]{standalone}     \usepackage{mathtools}     \begin{document}     \section*{gather+aligned}     \begin{gather}         \left\{\!         \begin{aligned}             x &= \cos t\\             y &= \sin t         \end{aligned}\right.\\         x^2 +y^2 =1     \end{gather}               \section*{gather+split}     \begin{gather}         \left\{         \begin{split}             x &= \cos t\\             y &= \sin t         \end{split}\right.\\         x^2 +y^2 =1     \end{gather}               \section*{align+aligned}     \begin{align}         &\left\{\!         \begin{aligned}             x &= \cos t\\             y &= \sin t         \end{aligned}\right.\\         &x^2 +y^2 =1     \end{align}               \section*{align+split}     It cannot be compiled.     %\begin{align}         %&\left\{         %\begin{split}             %x &= \cos t\\             %y &= \sin t         %\end{split}\right.\\         %&x^2 +y^2 =1     %\end{align}          \section*{align+split+nobrace}     It can be compiled.     \begin{align}         &         \begin{split}             x &= \cos t\\             y &= \sin t         \end{split}\\         &x^2 +y^2 =1     \end{align}          \end{document}      ![enter image description here](http://i.stack.imgur.com/ZRb4y.png) Why can't `split` with curly-brace `\left\{` and `\right.` be inside `align` but it can be inside `gather`?


title: MiKTeX 2.9's tex4ht not working

text: According to this document and my own experience. MiKTeX 2.9's version of tex4ht is not working. Using MiKTeX 2.8's tex4ht does work, but is obviously not prefered. Does anybody know how to fix MiKTeX 2.9's version of tex4ht?


title: pdfLaTeX hangs with no errors

text: PdfLateX hangs on a single-line unnumbered equation, here is a (possibly) minimal example:               \documentclass[english,pointlessnumbers, abstracton, headsepline, open=any]{scrreprt}     \usepackage[T1]{fontenc}     \usepackage[latin9]{inputenc}     \usepackage{geometry}     \geometry{verbose,tmargin=3cm,bmargin=3cm,headsep=3cm}     \setcounter{secnumdepth}{3}     \setcounter{tocdepth}{3}     \setlength{\parskip}{\medskipamount}     \setlength{\parindent}{0pt}     \usepackage{babel}     \usepackage{prettyref}     \usepackage{refstyle}     \usepackage{float}     \usepackage{units}     \usepackage{textcomp}     \usepackage{url}     \usepackage{amsmath}     \usepackage{makeidx}     \makeindex     \usepackage{graphicx}     \usepackage{esint}     \PassOptionsToPackage{normalem}{ulem}     \usepackage{ulem}     \usepackage{nomencl}     % the following is useful when we have the old nomencl.sty package     \providecommand{\printnomenclature}{\printglossary}     \providecommand{\makenomenclature}{\makeglossary}     \makenomenclature     \usepackage[unicode=true,      bookmarks=true,bookmarksnumbered=true,bookmarksopen=true,bookmarksopenlevel=4,      breaklinks=false,pdfborder={0 0 0},backref=false,colorlinks=false]      {hyperref}          \makeatletter          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.          \let\pr@chap=\pr@cha     \AtBeginDocument{\providecommand\figref[1]{\ref{fig:#1}}}     \AtBeginDocument{\providecommand\secref[1]{\ref{sec:#1}}}     \AtBeginDocument{\providecommand\eqref[1]{\ref{eq:#1}}}     %% Because html converters don't know tabularnewline     \providecommand{\tabularnewline}{\\}     \RS@ifundefined{subref}       {\def\RSsubtxt{section~}\newref{sub}{name = \RSsubtxt}}       {}     \RS@ifundefined{thmref}       {\def\RSthmtxt{theorem~}\newref{thm}{name = \RSthmtxt}}       {}     \RS@ifundefined{lemref}       {\def\RSlemtxt{lemma~}\newref{lem}{name = \RSlemtxt}}       {}          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.     % Special symbols as (c), �     \usepackage{textcomp}          % Custom enumeration lists     \usepackage{enumerate}          % Line spacing     % \usepackage{setspace}     % \usepackage[onehalfspacing]{setspace}     \usepackage[doublespacing]{setspace}          \usepackage{        %a4wide,                 ellipsis, fixltx2e, mparhack,       % correct errors with margins                 booktabs, longtable                 % better tables     }            \usepackage[automark]{scrpage2}     % Page number at bottom right     \automark[chapter]{chapter}     \clearscrheadfoot     \ohead{\\\headmark}     % Paragraph heading     \ofoot[\pagemark]{\pagemark}     \setheadsepline{1pt}    % Header bottom line     \setfootsepline{0pt}    % Footnote top line     \setfootbotline{0pt}    % Footnote bottom line          % Better justify     \usepackage{microtype}          \usepackage{ifpdf}  % part of the hyperref bundle     \ifpdf      % if pdflatex is used          % Set fonts for nicer pdf view      \IfFileExists{lmodern.sty}{\usepackage{lmodern}}       {\usepackage[scaled=0.92]{helvet}         \usepackage{mathptmx}         \usepackage{courier} }     \fi          % Increase distance between the caption table and the table      \newcommand{\@ldtable}{}     \let\@ldtable\table     \renewcommand{\table}{ %                      \setlength{\@tempdima}{\abovecaptionskip} %                      \setlength{\abovecaptionskip}{\belowcaptionskip} %                      \setlength{\belowcaptionskip}{\@tempdima} %                      \@ldtable}          % Table column height     \renewcommand{\arraystretch}{1.5}               \begin{document}          \tracingall          \[     m=m_{0}+\delta_{M}M_{s},                    % INFINITE LOOP     \]          \end{document}      Gives:               \[  ->\x@protect \[\protect \[            \x@protect #1->\ifx \protect \@typeset@protect \else \@x@protect #1\fi      #1<-\[     {\ifx}     {true}     {\else}     {\relax}          \[  ->\x@protect \[\protect \[            \x@protect #1->\ifx \protect \@typeset@protect \else \@x@protect #1\fi      #1<-\[     {\ifx}     {true}     {\else}     {\relax} ...


title: Nested scope shift in nested tikzpictures?

text: Please consider the following MWE:               \documentclass{book}          \usepackage[a4paper,twoside,hmargin=3cm]{geometry}          \usepackage{tikz,tikzpagenodes}     \usetikzlibrary{calc,positioning}          \newif\ifoutertikznest     \outertikznesttrue     % \outertikznestfalse               \begin{document}          \begin{tikzpicture}[overlay,remember picture,anchor=north west,inner sep=0pt, outer sep=0pt,line width=2pt]                 \node[draw=red,minimum size=2cm,anchor=north west,inner sep=0pt,outer sep=0pt] at (0,0) (A1) {%       \ifoutertikznest %         \begin{tikzpicture}[overlay,remember picture,anchor=north west,inner sep=0pt, outer sep=0pt,line width=2pt] % ***       \else         }; % ***       \fi                 \node[draw=blue,minimum size=2cm,anchor=center,inner sep=0pt,outer sep=0pt] at (current page.center) (A2) {};            \node[draw=green,minimum size=2cm,anchor=north west,inner sep=0pt,outer sep=0pt] at (current page.north west) (A3) {};                 \begin{scope}[shift={(0.5,1.0)}] %         \node[draw=magenta,minimum size=2cm,anchor=north west,inner sep=0pt,outer sep=0pt] at (0,0) (A4) {};         \begin{scope}[shift={(0.5,1.0)}] %           \node[draw=yellow,minimum size=2cm,anchor=north west,inner sep=0pt,outer sep=0pt] at (0,0) (A5) {};         \end{scope}       \end{scope}                 \ifoutertikznest %       \end{tikzpicture} % ***       }; % ***       \fi          \end{tikzpicture}               \end{document}      If you enable the `\outertikznestfalse` line, then there is no additional wrapping in a tikzpicture, and the nested scope shifts look as expected (image left): ![a.png](http://i.stack.imgur.com/Z40vA.png) However, if the rest of the image is "wrapped" under the first node (which requires an extra `tikzpicture`) - and this is the state, if `outertikznesttrue` line is enabled instead - then something is not quite right with the relative shift of the nested `scope`s (image right). While I did expect the extra `tikzpicture` to influence the absolute placement in some way - I didn't expect that it would disturb the relative shifts between the `scope`s. Is this expected behavior? And how could I have the same relative position of the nested scopes (as on image left), even if I have an extra `tikzpicture` wrapper?


title: Environment that obeys spaces

text: I need to build one environment that obeys spaces, but not new lines, and also change tabulation into four spaces. I can't use verbatim because I would also like to use macros in my environment.


title: When to use TikZ styles?

text: I planned to illustrate how a quadtree data structure I'm using is implemented, showing all internal pointers and arrays. The image will look something like this: ![enter image description here](http://i.stack.imgur.com/bb212.png) (Here, if a pointer points at the symbol ∅ it means that it is a null pointer, i.e. it has the value 0) I wanted to use something like in this question to illustrate what the linking looks like. What I noticed is that the code featured in this question defines the style `box` which is used to draw an array that consists of two elements. My first question is: When should a style be used? Why doesn't the code in the question I linked to use a macro for drawing the rectangle that represents the array for example? A second I have question is: How do they work? I haven't been able to find very much about them in the pgf manual (see pages 493–494), so I really don't know at all what is going on when a style is used. Is the code defined in the style kind of like copied and pasted into the place where the style is used, and how exactly does that happen? A third I have question is: If a style is used to draw a rectangle like in this case, how can I make it draw the rectangle so that it is scaled accordingly with the definitions of x and y? For example, I begin my TikZ picture with the code `\begin{tikzpicture}[x={(.035\textwidth,0)},y={(0,.035\textwidth)}]`. The value of `x` and `y` may vary from picure to picture, and so also the scale of what is drawn. How can I make the rectangle use the values of `x` and `y`? I have tried to change `inner sep=2ex` in the code in the question I linked to, which is an absolute distance, to a distance that depends on `x` and `y` but I haven't succeeded.


title: Hyphenation in LaTeX

text: In the last weeks I tried to work with LaTeX hyphenation functionality.                   .es8t .ex1a2 .ex3em .fal6sc .fe6st5a .flu4g3 .furch8 .ga6ner .ge3n4a     \n{.ge5r"o} .ges6 .halb5      so I found out that the beginning or end of a word in hyphenation patterns is marked by a period. But I didn't find out and want to ask what the double quote character is standing for and why many patterns are written with new line commands.


title: custom footer on title page using \maketitle and book document class

text: I'm trying to add a custom footer to the title page of my thesis, in order to insert some text that is required by my university. I'm using `fancyhdr` to do so. However, the footer appears on the second page and not the first. How can I fix this?               \documentclass[11pt,a4paper,twoside]{book}          \usepackage{fancyhdr}          \usepackage{lipsum}          \fancypagestyle{titlepagestyle}     {        \fancyhf{}        \fancyfoot[C]{\emph{This text needs to appear on the title page}}        \renewcommand{\headrulewidth}{0 mm}     }          \pagestyle{plain}           \begin{document}          \title{The title}          \author{The author}          \maketitle     \thispagestyle{titlepagestyle}               \mainmatter          \chapter{The chapter heading}          \lipsum[1]          \end{document}      I've also tried using adding a footnote instead of using `fancyhdr`, with the same result.


title: multiple choice questions type setting querries

text: ![enter image description here](http://i.stack.imgur.com/9LWXr.jpg) I need to have four different question papers in which the order of the above questions only changed and i need to give the answer for the respective question paper in a separate sheet. so kindly help me to prepare those question papers from this. That i need to prepare another question paper by shuffling the questions and i need to give the answer respectively. How should i do?                \documentclass[12pt,a4paper]{exam}         \usepackage{amsmath,amsthm,amsfonts,amssymb,dsfont}         \setlength\parindent{0pt}             %usage \choice{ }{ }{ }{ }             %(A)(B)(C)(D)             \newcommand{\fourch}[4]{             \par                     \begin{tabular}{*{4}{@{}p{0.23\textwidth}}}                     (a)~#1 & (b)~#2 & (c)~#3 & (d)~#4                     \end{tabular}             }                  %(A)(B)             %(C)(D)             \newcommand{\twoch}[4]{                          \begin{tabular}{*{2}{@{}p{0.46\textwidth}}}                     (a)~#1 & (b)~#2                     \end{tabular}             \par                     \begin{tabular}{*{2}{@{}p{0.46\textwidth}}}                     (c)~#3 & (d)~#4                     \end{tabular}             }                  %(A)             %(B)             %(C)             %(D)             \newcommand{\onech}[4]{             \par                   (a)~#1 \par (b)~#2 \par (c)~#3 \par (d)~#4             }                  \newlength\widthcha             \newlength\widthchb             \newlength\widthchc             \newlength\widthchd             \newlength\widthch             \newlength\tabmaxwidth                  \setlength\tabmaxwidth{0.96\textwidth}             \newlength\fourthtabwidth             \setlength\fourthtabwidth{0.25\textwidth}             \newlength\halftabwidth             \setlength\halftabwidth{0.5\textwidth}                \newcommand{\choice}[4]{%           \settowidth\widthcha{AM.#1}\setlength{\widthch}{\widthcha}%           \settowidth\widthchb{BM.#2}%           \ifdim\widthch<\widthchb\relax\setlength{\widthch}{\widthchb}\fi%           \settowidth\widthchb{CM.#3}%           \ifdim\widthch<\widthchb\relax\setlength{\widthch}{\widthchb}\fi%           \settowidth\widthchb{DM.#4}%           \ifdim\widthch<\widthchb\relax\setlength{\widthch}{\widthchb}\fi%           \ifdim\widthch<\fourthtabwidth             \fourch{#1}{#2}{#3}{#4}           \else\ifdim\widthch<\halftabwidth             \ifdim\widthch>\fourthtabwidth               \twoch{#1}{#2}{#3}{#4}             \else               \onech{#1}{#2}{#3}{#4}             \fi           \fi\fi         }         \begin{document}          \begin{questions}         \question If $a = 3 + i$ and $z = 2 - 3i$ then the points on the Argand diagram         representing az, 3az and - az are         \choice{Vertices of a right angled triangle}{ Vertices of an equilateral          triangle}{Vertices of an isosceles triangle}{Collinear}         \question If z represents a complex number then $\arg (z) + \arg\left(\bar z\right)$ is          \choice{$\dfrac{\pi}{4}$}{$\dfrac{\pi}{2}$}{0}{$\dfrac{\pi}{6}$}         \question If the amplitude of a complex number is $\dfrac{\pi}{2}$ then the number is         \choice{ purely imaginary}{purely real}{0}{neither real nor imaginary}         \question The value of $i + i^{22} + i^{23} + i^{24} + i^{25}$ is         \choice{i}{-i}{1}{-1}         \question The volume generated by          rotating the triangle with vertices at         (0, 0), (3, 0) and (3, 3) about x-axis is         \choice{$18\pi$}{$2\pi$}{$36\pi$}{$9\pi$}\end{questions}         \end{document}              \end{document}      ## one more question ## If i want to shuffle the question to prepare four different questions papers having same questions but with the different question numbers what should i do...?? that is i need to mark the question paper given above as Code A. and i need to print another question paper which marked as Code-B and in this question paper the first question code-A should be in question number 5 and similarly others also should have different positions... thank you for your help in advance...


title: Numbers instead of letters with subfloat

text: I have a document with a `figure` environment that looks like this:               \documentclass[a4paper,10pt]{article}     \usepackage{subfig}     \usepackage{tikz}          \makeatletter     \newbox\sf@box     \newenvironment{SubFloat}[2][]%     {\def\sf@one{#1}%     \def\sf@two{#2}%     \setbox\sf@box\hbox     \bgroup}%     { \egroup     \ifx\@empty\sf@two\@empty\relax     \def\sf@two{\@empty}     \fi     \ifx\@empty\sf@one\@empty\relax     \subfloat[\sf@two]{\box\sf@box}%     \else     \subfloat[\sf@one][\sf@two]{\box\sf@box}%     \fi}     \makeatother          \begin{document}          \begin{figure}     \centering     \begin{SubFloat}     {\label{image1}}     \includegraphics[width=0.4\textwidth]{image1.jpg}     \end{SubFloat}     \qquad     \begin{SubFloat}     {\label{image2}}     \includegraphics[width=0.4\textwidth]{image2.jpg}     \end{SubFloat}     \end{figure}          \end{document}      (compiled with `pdflatex`) LaTeX puts letters below each image (`(a)`, `(b)`, `(c)`, etc..) and I want it to put numbers instead. How could I do that?


title: texi2dvi runs forever if the document contains references not in the .bib file

text: If I run the example below with `texi2dvi (GNU Texinfo 5.2) 5381` [texlive 2012], it never stops. How can this be avoided? It's somehow strange. I used to have a lot of references in my files which were not yet in the `.bib` file. It would still create the `.pdf` and display the keys in bold letters. But in the last couple of days it seems to have changed (all I did was an upgrade of Ubuntu to 14.04). When I use `pdflatex`, `bibtex`, `pdflatex`, I get the `.pdf` of course. Please let me know if you need further version numbers etc. (`pdflatex` shows `pdfTeX 3.1415926-2.4-1.40.13 (TeX Live 2012)`)               \documentclass{scrartcl}     \usepackage{filecontents}     \begin{filecontents*}{bib.bib}     @article{mykey,         author={TeX, L.},         journal={Journal of LaTeX questions},         pages={1--10},         title={{Minimal title}},         volume={1},         number={1},         year={2011}}     \end{filecontents*}          \usepackage[backend=bibtex]{biblatex}     \addbibresource{bib.bib}          \begin{document}     Just some reference: \textcite{myfoo}     \printbibliography     \end{document}      Here is the content of the `.blg` file:               This is BibTeX, Version 0.99d (TeX Live 2012)     Capacity: max_strings=35307, hash_size=35307, hash_prime=30011     The top-level auxiliary file: mini.aux     The style file: biblatex.bst     Reallocated singl_function (elt_size=4) to 100 items from 50.     Reallocated singl_function (elt_size=4) to 100 items from 50.     Reallocated singl_function (elt_size=4) to 100 items from 50.     Reallocated singl_function (elt_size=4) to 100 items from 50.     Reallocated singl_function (elt_size=4) to 100 items from 50.     Reallocated wiz_functions (elt_size=4) to 6000 items from 3000.     Reallocated singl_function (elt_size=4) to 100 items from 50.     Reallocated singl_function (elt_size=4) to 100 items from 50.     Reallocated singl_function (elt_size=4) to 100 items from 50.     Reallocated singl_function (elt_size=4) to 100 items from 50.     Reallocated singl_function (elt_size=4) to 100 items from 50.     Database file #1: mini-blx.bib     Database file #2: bib.bib     Warning--I didn't find a database entry for "myfoo"     Biblatex version: 2.6     Reallocated singl_function (elt_size=4) to 100 items from 50.     Reallocated wiz_functions (elt_size=4) to 9000 items from 6000.     You've used 1 entry,                 6019 wiz_defined-function locations,                 1124 strings with 8034 characters,     and the built_in function-call counts, 1306 in all, are:     = -- 64     > -- 58     < -- 1     + -- 41     - -- 24     * -- 23     := -- 295     add.period$ -- 0     call.type$ -- 1     change.case$ -- 0     chr.to.int$ -- 34     cite$ -- 0     duplicate$ -- 12     empty$ -- 92     format.name$ -- 0     if$ -- 289     int.to.chr$ -- 0     int.to.str$ -- 0     missing$ -- 0     newline$ -- 22     num.names$ -- 0     pop$ -- 44     preamble$ -- 1     purify$ -- 0     quote$ -- 0     skip$ -- 74     stack$ -- 0     substring$ -- 117     swap$ -- 1     text.length$ -- 16     text.prefix$ -- 0     top$ -- 1     type$ -- 26     warning$ -- 0     while$ -- 50     width$ -- 0     write$ -- 20     (There was 1 warning)


I have little experience with latex but am using it to write my undergraduate project, recently the error messages have come up and it wont allow me to build my pdf and comes up with the following error messages.               pdfTeX warning (ext4): destination with the same identifier (name{page.1}) has      been already used, duplicate ignored     <to be read again>                         \relax           LaTeX Warning: Citation `ci' on page j undefined on input line k.      I am using an embedded bibliography `\begin{thebibliography}`.


title: Easy LaTeX Editor with SVN or GIT connection and auto-update

text: I've had problems with my current LaTeX editor( Texmaker). It hasn't got an `autosave` option and overwrites the file every time I save them manually . Is there an editor which has an auto update/save option? Preferably connected to `git` or `svn` so that I can view my old versions as well.


title: How can I edit this tikz example to do what I want? (Porter Model diagram)

text: I am trying to change the direction of the arrows and generally figure out how best to manipulate this diagram. I have placed my own text but I want the box with the dotted lines do have a white background and the middle box to have its left and right arrows pointing out the way. I cannot see an obvious way to do this from the code at all! Here is the link to the code. http://www.texample.net/tikz/examples/porter-model/


title: About font and designs

text: I'm new to Latex, I finally decided to learn it after having discovered that LibreOffice writer sucks. I thought it helps you create better text but after having spent almost two hours on this site, I saw questions about drawing shapes, creating book covers and fonts. So I thought I should ask you about it. I don't have Latex on my PC, I use writelatex.com. Anyway:   * Is it possible to draw tears shape?   * Is it possible to write in bloody fonts such as this one?   * Is it possible to draw a flower or a rose? something close to this? only the shape not the details


title: Using the biblatex styles in the CTAN contrib

text: I know how to use `biblatex` and compile it with `pdflatex` -> `bibtex` -> `pdflatex` in TeXworks or TeXShop.               \usepackage[options]{biblatex}     \bibliography{bib-file}          \begin{document}       \autocite{einstein01}       \autocite{feynman47}     \end{document}      How do I start using the different biblatex styles in the CTAN contrib? I want to know how to do it in terms of:   1. Installation   2. Usage in the source code Solutions for MiKTeX or TeX Live are preferred.


title: sidebar logo width

text: I would like to place the institution logo at the bottom of the sidebar as wide as the whole sidebar. I was wondering if there is a command that return the width of the sidebar, somthing similar to `\textwidth`. Thanks in advance for your help Update: Yes, I am using beamer. here is an example of my code:               \documentclass{beamer}     \usepackage[latin1]{inputenc}          \usetheme{Berkeley}     \usecolortheme{seahorse}     \title{Title}     \author{My name}     \institute{My institute}     \date{\today}     \addtobeamertemplate{sidebar left}{}{       \includegraphics[width = 0.15\textwidth]{logo}     }          \begin{document}     \begin{frame}[plain]     \titlepage     \end{frame}          \begin{frame}     Frame content     \end{frame}          \end{document}


title: Adjust indentation of the subsequent lines in description environment

text: How do I control the indentation of subsequent lines without affecting the other settings? That is, I want the spacing of the first three components to remain as is, but when the content of the line spills onto the second line, the second line should be indented further. A _simple_ solution would be to make the second and third items be part of the label, but would prefer not to have to resort to that. ![enter image description here](http://i.stack.imgur.com/uamCf.png) ## Code:               \documentclass{article}     \usepackage{showframe}     \usepackage{enumitem}          \usepackage{ragged2e}          \begin{document}     \begin{description}[         leftmargin=!,          labelwidth=!,         labelsep=5pt,         parsep=0pt,          itemsep=0pt,         itemindent=0pt,         ]\RaggedRight         \item [ABC] DEF GHI abcpdefp-higj-akdf-dggg-vfve-vfvervr-vdfvfdv-dfvdfvfdv-dvfvd         \item [ABC] DEF GHI 1-abcpdefp-higj-akdf-dggg-vfve-vfvervr-vdfvfdv-dfvdfvfdv-dvfvd         \item [XYZ] ABC KYJ efp-higj-akdf-dggg-vfv-abcpdefp-higj-akdf-dggg-vfve-vfvervr-vdfvfdv-dfvdfvfdv-dvfvd     \end{description}%     \end{document}


title: GANTT to long for one page

text: I have made a GANTT chart but it is too long to fit into one landscape page. So I see two solutions.   1. Allow the gantt chart to contiune on next page.   2. Use A3 instead Please help me with both solutions IF a need several A3 pages to fit it in. My example code today is:               \documentclass{article}     \usepackage{pgfgantt}     \usepackage{tikz}     \usepackage{pdflscape}     \usepackage[a4paper]{geometry}     \newgeometry{left=0cm,bottom=0cm,right=0cm,top=0cm}     \usepackage{comment}          \newcommand{\Weck}{\gantttitle{M}{1}      \gantttitle{T}{1}       \gantttitle{O}{1}      \gantttitle{T}{1}      \gantttitle{F}{1}}          \def\pgfcalendarweekdayletter#1{%     \ifcase#1M\or T\or W\or T\or F\or S\or S\fi%     }          \definecolor{foobarblue}{RGB}{0,153,255}     \definecolor{foobaryellow}{RGB}{234,187,0}          \newganttchartelement{foobar}{     foobar/.style={     shape=rectangle,     rounded corners=3pt,     inner sep=0pt,     draw=foobarblue!50!black,     very thick,     top color=white,     bottom color=foobarblue!50     },     foobar incomplete/.style={     /pgfgantt/foobar,     draw=foobaryellow,     bottom color=foobaryellow!50     },     foobar label font=\slshape,     foobar left shift=-.1,     foobar right shift=.1     }          \newganttchartelement*{event}{     event/.style={     shape=circle,     inner sep=0pt,     draw=black,     very thick,     top color=white,     bottom color=pink     },     event incomplete/.style={     /pgfgantt/foobar,     draw=black,     bottom color=black     },     event label font=\scshape,     event left shift=.2,     event right shift=-.2     }          \begin{document}     \begin{landscape}               \begin{figure}[ftbp]          \begin{center}          \begin{ganttchart}[y unit title=0.4cm,     y unit chart=0.5cm,     x unit=3.9mm,     vgrid,hgrid,      title label anchor/.style={below=-1.6ex},     title left shift=.05,     title right shift=-.05,     title height=1,     bar/.append style={fill=green},     bar incomplete/.append style={fill=red},     milestone/.append style={fill=blue},     milestone height=.6,     milestone left shift=.2,     milestone right shift=-.1,     progress label text={},     bar height=0.7,     group right shift=0,     group top shift=.6,     progress=today,     group height=.3,     time slot format=isodate,     today=2014-09-10]{2014-09-03}{2014-12-19}     %Labels     \gantttitlecalendar*{2014-09-03}{2014-12-19}{month=shortname, week=36, day,weekday=letter}\\          %Milestones     \ganttmilestone{Create the Gant}{2014-09-17}  \\          %Tasks to be carried out     %\ganttgroup{CoDeSyS}{2014-04-07}{2014-05-19}\\     \ganttfoobar{Learn to do long Gants}{2014-09-03}{2014-12-17} \\               \end{ganttchart}     \end{center}     \caption{Exemple for long gant}     \end{figure}     \end{landscape}     \restoregeometry     \end{document}


title: Kile structure view

text: I'm discovering Kile. The structure view is useful, but it would be very nice to have numbered sections in this view, in order to be able to jump quickly to section 54 for instance. Do you know if it is possible, or if another tex editor provides this feature?


title: Typesetting exercise sheets

text: I want to typeset weekly exercise sheets for students. Typically, one sheet consists of 2-5 exercises. Additionallly, a version including solutions shall be provided for the tutors. Since more or less the same exercises are given out each year, we want to create a collection of exercises which can then be put together in a custom order. So there shall be one main document with the preamble and everything, which then includes or inputs the exercises. I'm quite happy with the KOMA-Script class scrartcl, the only thing i'd like to have is an automatic numbering for the exercises and the solutions. An easy (yet maybe not elegant) way to have the exercises numbered as i wish is the following:               \documentclass{scrartcl}          \usepackage{titlesec}     \titleformat{\subsection}{\large\bfseries\sffamily}{}{0pt}{Exercise \thesubsection:\quad}          \newcommand{\exercise}[1]{\subsection{#1}}     \newcommand{\solution}[1]{\subsection{#1}}          \begin{document}          \setcounter{section}{1}\setcounter{subsection}{0}     \exercise{This is the Name of the first Exercise}     This is the problem given for the first Exercise.          \exercise{This is the Name of the second Exercise}     This is the problem given for the second Exercise.          \addtocounter{section}{1}\setcounter{subsection}{0}     \exercise{This is the Name of the third Exercise}     This is the problem given for the third Exercise.     \solution{This is the solution for the third exercis.}     However, it should be titled "Solution 2.1" and not "Exercise 2.2".     \end{document}      However, i still need another command for `\solution`, which gives out "Solution X.Y: ...", where X.Y is just the numbering of the last exercise. I know there are a lot of packages like exam, answers, etc. out there, but none did what i wanted yet (could be me, though). In the exercise package i couldn't include figures or minipages the usual way, which i really disliked. By the way, i don't mind commenting in or out the solutions by hand for the different versions. However, if there's an automated version to only include exercises or exercises and solutions, all the better! Does anyone have a nice solution for my problem?


title: Using tabular(*?) with two languages

text: I wish to have an invisible table (using the `tabular` or `tabular*` environments) which should contain two columns - one shall contain sentences in English, and the other - their translations in Hebrew. For that I want the left column to be aligned such it begins at the beginning of the row for English speakers (i.e. left), and the right column - at the beginning of the row for Hebrew speakers (i.e. all the way to the right). How do I do that?


title: Reduce number of consecutive lines with hyphenation

text: How can I reduce the number of consecutive lines ending in a hyphenation? I have a very long document (600 pages) and need an automatic way to tell latex the maximum number of lines ending in a hyphenation. I have seen occurences with 4 consecutive lines with hyphenation, my publisher asks for no more than 3. I use xelatex, koma-script, document-class: scrbook. Edit: a small example with a german lorem ipsum plus extra long words. Please note that this might not be the most minimal, but I thought that e.g. small page sizes (as in my book) might contribute to the problem.               \documentclass[     10pt,      openany,             paper=20.5cm:13.5cm,     ]{scrbook}     \areaset{10.3cm}{17.0cm}      \setlength{\oddsidemargin}{-13.4mm}     \setlength{\evensidemargin}{-5.4mm}      \setlength{\headheight}{10pt}     \setlength{\topmargin}{-13.4mm}       \linespread{0.958}\selectfont     \setlength{\headsep}{0.4485cm}     \usepackage[ngerman]{babel}          \usepackage{fontspec}     \defaultfontfeatures{Numbers=OldStyle, Mapping=tex-text, Ligatures={Common}}     \usepackage{xunicode}     \usepackage{xltxtra}     \setmainfont[]{Garamond}     \setsansfont[]{Garamond}          \begin{document}     Er hörte leise Schritte hinter sich. Das bedeutete nichts Gutes. Wer würde Quartzstaublunge  ihm schon folgen, spät in der Nacht und dazu noch in dieser engen Gasse mitten im übel beleumundeten Hafenviertel? Gerade jetzt, wo er das Ding seines Lebens gedreht hatte Amrolltreppenendeimwegsteher  und mit der Beute verschwinden wollte! Hatte einer seiner zahllosen Kollegen dieselbe Amrolltreppenendeimwegsteher Idee gehabt, Amrolltreppenendeimwegsteher ihn beobachtet Amrolltreppenendeimwegsteher und abgewartet, um ihn nun um die Früchte seiner Arbeit zu erleichtern? Oder gehörten die Schritte hinter ihm zu einem der unzähligen Gesetzeshüter dieser Stadt, und die Amrolltreppenendeimwegsteher stählerne Acht um seine Handgelenke würde gleich zuschnappen? Er konnte die Aufforderung stehen Amrolltreppenendeimwegsteher zu bleiben schon hören. Gehetzt sah er sich um. Plötzlich erblickte er den schmalen Durchgang. Blitzartig drehte er sich nach rechts und verschwand zwischen den beiden Gebäuden. Amrolltreppenendeimwegsteher Beinahe wäre er dabei über den umgestürzten Mülleimer gefallen, der mitten im Weg lag. Er versuchte, Allesvomtischschmeisser sich Amrolltreppenendeimwegsteher in der Dunkelheit seinen Weg zu Amrolltreppenendeimwegsteher ertasten und erstarrte: Anscheinend Fliegenindiesuppemacher gab es keinen anderen Ausweg aus diesem kleinen Hof Haareimbadverteilersystem als den Durchgang, durch den er gekommen war. Die Schritte wurden lauter und lauter, er sah eine dunkle Gestalt um die Ecke biegen. Fieberhaft Amrolltreppenendeimwegsteher irrten seine Augen durch die nächtliche Dunkelheit und suchten einen Ausweg. War jetzt wirklich      \end{document}