title: Increasing indentation in an enumerate

text: I have a slide with an enumerate that's partially in the main slide and partially in a column on the same slide. Here's a minimal example to show my intention:               \documentclass{beamer}     \begin{document}     \begin{frame}{Lorem ipsum}     \begin{enumerate}     \item Lorem     \item ipsum     \begin{columns}     \begin{column}{0.5\textwidth}     \item dolor     \item sit     \end{column}     \begin{column}{0.5\textwidth}     % something else here     \end{column}     \end{columns}     \end{enumerate}     \end{frame}     \end{document}      In the screenshot below, how can I get 3 and 4 to also be indented exactly as 1 and 2? I typically use `0.45\textwidth` for the column width, but for the purposes of this question, I'd like the indentation to be decided independent of the column width (or done programmatically so that I don't have to calculate it). ![enter image description here](http://i.stack.imgur.com/qlmlU.png)


**What is your favorite Emacs and/or AUCTeX command/trick?** The point here is that I don't know what I don't know. I'm an Emacs and AUCTeX user looking to improve my Emacs & AUCTeX use, especially regarding efficiency. I've been using the Emacs–AUCTeX combo for a while (4–5 years) and have a well-established routine at this point. I'm quite satisfied with this combo, but often wonder if I'm doing something in an inefficient way without even knowing it. Thus I am I hoping to learn, for example, some ideas for things to add to my .emacs file or new shortcut keys (though I suspect I already know most of those). So if you have a tip you think I (and others) might benefit from, please share it.


title: ! LaTeX Error: File 'figures/UILogoLG3L' not found

text: I'm trying to follow this tutorial: http://www.matthewjmiller.net/howtos/customized-cover-letter-scripts/ I downloaded the cover letter.tex, and I'm trying to 'typeset' it. So I press the green play button in TeXworks, and that's what I get. > ! LaTeX Error: File `figures/UILogoLG3L' not found. > > See the LaTeX manual or LaTeX Companion for explanation. > > Type H for immediate help. > > ... > > l.14 } % ?


title: Colourful notes - todo list annotations in tables

text: I've decided that I'm going to make LaTeX notes for all of my lectures next year (I'm doing computer science at university). I want a way to brighten my notes up - make them more exiting to read when I'm deep into a month of non- stop revision. My plan was to have a colour scheme for extra reading, important, exam information, connections to other topics, revision strategies, etc... I was thinking of hight-lighting part of the text, but also to have annotations with the `todonotes` package, so I can differentiate between course content and commentary. The problem with this is that `todonotes` annotations doesn't work in tables, the lines from the annotations don't go to the text, and they mess up on some other non-block-text layouts. I suppose its not really designed for them to be left in published work. Does anyone have a way to annotating that does work in these situations? Is there a better way I could go about it? Do you have any tips to produce exciting notes? EDIT: Here is an example.               \documentclass[11pt]{article}     \usepackage[colorinlistoftodos, textwidth=3.5cm]{todonotes}          \newcommand{\summarynote}[1]{\todo[color=yellow!30,size=\small,bordercolor=yellow]{#1}}          \begin{document}     This text has an annotation that works \summarynote{Which is me}\\     \begin{center}     \begin{tabular}{c|c}     \textbf{Fruit} & \textbf{Calories (kcal)}\\     \hline     Banana & 95.0\\     \hline     Grapes & 61.5\\     \hline     Kiwi & 49.0 %\summarynote{This sidenote does not work}     \end{tabular}     \end{center}     \end{document}      When the second `\summarynote` is uncommented, it give the error message `LaTeX Error: Not in outer par mode.`


title: How to only cite references by a certain author

text: > **Possible Duplicate:**   >  biblatex: separating publications of a specific author in the bibliography I have a BibTeX file that includes my own publications as well as many others. I'd like to use this file without modification in my CV, but in the references I only want to show my own publications. Can I do this with biber/BibLaTeX?


title: How do I prevent LaTeX-Suite from opening files automatically when there's an error?

text: I'm using Vim with LaTeX-Suite. Occasionally when I compile a file with errors using `<Leader>ll`, the error in my source is such that the LaTeX compiler registers an error in a file deep in the bowels of my TeX distribution, say `pstricks-add.tex` or something, so it automatically opens this irrelevant file in the window. Since the actual error is in my source, I'd like to surpress this behavior, and only have it open the file when I press `Enter` after selecting it in the `Quickfix` window. * * * Notes: The proper, erroneous line in my source is displayed in the `.log` file window below the `Quickfix` window I have the following in my `.vimrc`:               " compile to pdf                                   let g:Tex_DefaultTargetFormat = 'pdf'           " pdf compile and view settings                                     let g:Tex_ViewRule_pdf = 'open -a Preview'     let g:Tex_CompileRule_pdf = 'latexmk -pdf'          " ignore all warnings below level 4     let g:TCLevel = 4          " one last thing for latex     let g:tex_flavor = 'latex'


title: Change background colour for entire document

text: I would like to change total document background colour; for example to Yellow: I have used two packages:               \usepackage{colour}     \usepackage{xcolour}      But I am unable to get my output, is there any solution?


title: Make volume bold in custom bibliography style .bst

text: Since I could not find the style that met my teacher's requirements for the bibliography I have to do, I created my own `bst` with `latex makebst` on my mac. I had chosen to make the volume `bold` but it does not appear in boldface on my document (I am using LyX). I was wondering if there is a way to make it appear in bold by modifying the `bst` file This is what I have in the volume section               FUNCTION {format.bvolume}     { volume empty$         { "" }         { bbl.volume volume tie.or.space.prefix           "volume" bibinfo.check * *           series "series" bibinfo.check           duplicate$ empty$ 'pop$             { emphasize ", " * swap$ * }           if$           "volume and number" number either.or.check         }       if$     }     FUNCTION {format.number.series}     { volume empty$         { number empty$             { series field.or.null }             { series empty$                 { number "number" bibinfo.check }                 { output.state mid.sentence =                     { bbl.number }                     { bbl.number capitalize }                   if$                   number tie.or.space.prefix "number" bibinfo.check * *                   bbl.in space.word *                   series "series" bibinfo.check *                 }               if$             }           if$         }         { "" }       if$     }      Can someone help me solve this problem ? I tried to add `{\bf }` around `* swap$ *` but it does not seem to be working.


title: pgfplots with 2 x axis, misalignment of upper x xticklabels

text: I need a plot with two x-axes, on at the top the other at the bottom. I try to do this quite successfully with this example code:               \documentclass[12pt,twoside, a4paper]{report}     \usepackage[german]{babel}     \usepackage[T1]{fontenc}     \usepackage[latin1]{inputenc}        \usepackage{tikz}       \usepackage{pgfplots}     \pgfplotsset{compat=1.6}     \begin{document}               \begin{tikzpicture}      %\pgfplotsset{set layers}%Not used     \begin{semilogyaxis}[filter discard warning=false,scale only axis,      width=5.41cm,       height=4.415cm,       xmin=-7.5,xmax=7.5,ymin=0.01,ymax=50,       axis x line*=bottom,      xtick={-6,-4,-2,0,2,4,6},       enlargelimits=false,axis on top=true,       xlabel=lower x scale,ylabel=y scale]      \addplot[color=red,mark=x] coordinates {%just fake data      (-6,0.1) (0,10) (6,0.2)};      \end{semilogyaxis}           \begin{semilogyaxis}[filter discard warning=false,       scale only axis,        width=5.41cm,        height=4.415cm,         xmin=-0.7409,xmax=0.7409,ymin=0.01,ymax=50,         minor tick num=3,        axis x line*=top,        axis y line=none,        enlargelimits=false,axis on top=true,        xlabel=upper x scale]        \end{semilogyaxis}       \end{tikzpicture}       \end{document}      The result is quite nice, as you can see here: ![Misalignment of labels](http://i.stack.imgur.com/TvnBw.png) But due to the '-0.5' on the upper left corner there is a slight misalignment of the labels. How can I get rid of this problem?


title: Safeguard an environment against tabular mode

text: The semantics of a given environment require that it is typeset inside a `minipage` if it is used inside a `tabular`. If I add the minipage declaration for a positive check for "internal" mode in the environment using `\ifinner`, it works: the minipage is added only if in `tabular` mode. (This can be seen in the output because the minipage does not expand over the full text width.) I have the following questions:   1. Why does the check for inner mode succeed when the `kframe` environment is closed? Is TeX in "internal" mode inside a `minipage` environment?   2. Is there a more reliable way to do this detection? Is the detection correct at all? The `kframe` environment is used in code generated by knitr; it should work both inside and outside of a `tabular`.               \documentclass{article}     \pagestyle{empty}          \usepackage{color}     \usepackage{framed}          \newenvironment{kframe}{%       % The \ifinner check below is necessary       \ifinner\begin{minipage}{.8\textwidth}\else\fi%       \def\FrameCommand##1{\colorbox{yellow}{##1}}%       \MakeFramed{}}{%       \endMakeFramed%       % Why does this \ifinner check work?       \ifinner\end{minipage}\fi}          \begin{document}          \begin{kframe}       Any text long enough will do here.       Any text long enough will do here.       Any text long enough will do here.     \end{kframe}          \begin{tabular}{l}     \begin{kframe}       Any text long enough will do here.       Any text long enough will do here.       Any text long enough will do here.     \end{kframe}     \end{tabular}          \end{document}      ![Result of MWE compilation](http://i.stack.imgur.com/uAtZ6.png)


title: Automatic goto in texstudio 2.8

text: I recently changed to texstudio and have been enjoying since. Since I updated the version to 2.8 every time I change the cursor in the tex the viewer also changes and viceversa. I'd rather having to press ctrl+click for this to happen, how can I change it to the previous behaviour?


title: enumerate list embedded in table with custom label

text: I'd like to augment the embedded enumerated list inside tabular to have custom labels. I am using Yiannis Lazarides's tabular example, but would like to add a custom label that can do circled number as in Stefan Kottwitz's solution So combined, this is what I'm trying to do:               \documentclass{article}     \usepackage{enumitem}     \usepackage{tikz}     \usepackage[demo]{graphicx}     \newcommand*\numcircledtikz[1]{\tikz[baseline=(char.base)]{                 \node[shape=circle,draw,inner sep=2pt] (char) {#1};}}          \begin{document}               \begin{table}[!h]      \begin{minipage}{1\textwidth}\centering     \begin{tabular}{p{.8\textwidth} | p{.2\textwidth} }          \raisebox{\dimexpr\ht\strutbox-\height\relax}{\includegraphics[width=0.8\textwidth]{test}}         &         \begin{enumerate}[label=\protect\numcircledtikz{\arabic*}]             \item ext steps\ldots             \item num. circled               \end{enumerate} \\           \end{tabular}\end{minipage}\end{table}          \end{document}      And this is the error messages I get: > >     ! Missing number, treated as zero. <to be read again> >                    \c@*  l.62 ...e}[label=\protect\numcircledtikz{\arabic*} >                                                   ] ? >   When I try something more simple `[label=\textcircled{\arabic*}]`, I get the same error message. How should I fix this error?


title: How to create a command to insert a string, but possibly ignore white space before the command?

text: I would like to define a switch that shows additional comments in some text (containing formulas). As you can see below by setting `showString` to `true`, this works well. However, when I set it to `false`, there is some leftover space before the full stop. I tried to "ignore" it by using `\ignorespaces`, but that's still contains the one blank from after the word "text". How can this be avoided? One solution would be to insert a space before `#1` in `\mystring` and use "This is just some text\mystring{here}" in the example (so removing the space before the command). Is there a more elegant solution?               \documentclass{scrartcl}          \usepackage[T1]{fontenc}     \usepackage[american,ngerman]{babel}     \usepackage{ifthen}     \usepackage{amsmath}          \newboolean{showString}     \setboolean{showString}{false}% use true/false     \newcommand*{\mystring}[1]{\ifthenelse{\boolean{showString}}{\text{\bfseries #1}}{\ignorespaces}}          \begin{document}     This is just some text \mystring{here}.          \begin{align*}       a=b\tag*{\mystring{here}}     \end{align*}     \end{document}


title: Changing a macro's output depending on immediate context

text: I've set up a macro for differential parts as so:               \newcommand{\dd}[1]{\,\mathrm{d}#1}      which is useful for differentials at the end of integrals because of the space. (I realise the argument notation is superfluous in this case but I'm keeping it for my own reasons.)   The trouble is that if I have a differential standing all by itself I don't want to have the space there. Is there a way of defining a macro so that it can detect if there is a character of any kind in the space before it is called, and change its output accordingly?


title: microtype settings for Adobe Caslon Pro?

text: Has anyone developed `microtype` settings for Adobe Caslon Pro? After a lot of searching, I cannot find a definitive upstream source for the `microtype` package, and the latest version I can find (2.5 beta 8) seems not to have settings for Adobe Caslon Pro, hence I was wondering if anyone had developed them independently (again, searching online didn't come up with anything).


title: \centering doesn't seem to center my text

text: I am trying to center this page but it will not work. All is get is for the first line to be indented about one "tab" space to the right, but the second line will not shift. However, the first line's indent does not appear to be centered either. Is it possible that the binding offset or the `indentfirst` package is interacting with this negatively? All of the other pages seem to work just fine. Any help would be appreciated.               \documentclass[12pt, a4paper, twoside]{article}     \usepackage[margin=1in,bindingoffset=15.5mm,heightrounded]{geometry}     \usepackage[T1]{fontenc}     \usepackage{indentfirst}     \begin{document}     \pagestyle{empty}     \vspace*{36 pt}     {\centering     \textbf{\emph{\Huge{Since I Saw You Last,\\There's a Change Upon You}}}     }     \end{document}


title: TikZ plot: centering and units on axis

text: I have the following. ![screenshot in pdf reader](http://i.stack.imgur.com/LPG9I.png) I'm trying to center the plot and putting `\begin{center}` around the TikZ image does not work. Also I'm trying to change the units of the x-axis. The x-axis is used to represent the time. The axis is currently using seconds and I had to zoom in with xmin and xmax to get the result. Now there is a `*10^(-2)` at the bottom but I would like to have milliseconds or microseconds labeled at each tick. This is the code I have now.               \begin{center}     \begin{tikzpicture}     \begin{axis}[xlabel=tijd,         ycomb, ymin=0, ymax=4, xmin=0.0248, xmax=0.0255,         enlarge y limits=false,         width=15cm, height=5cm,         tick align = outside,         grid = major,         %scaled x ticks = false,         yticklabels={X, 0, settings, macroblock, picture},         %x tick label style={/pgf/number format/fixed}         ]     \addplot +[mark=none] table {seperatemb.dat};     \end{axis}     \end{tikzpicture}     \end{center}


title: Linking the columns widths of two tikz matrices

text: I have two figures containing a tikzfigure with a matrix. Both matrices are related, i.e. have the same columns, and I would like tikz to assign them the same column widths, just as if I had all rows in one matrix. An automatic solution would be ideal, without me having to provide manual spacing or having to mark one matrix as the template, i.e. tikz should collect the spacing from all matrices and then apply them (probably requiring recompilations). Is that possible? The following code demonstrates the issue               \documentclass{minimal}     \usepackage{tikz}     \begin{document}     Currently I have two matrices, this:          \begin{tikzpicture}     \matrix{     \node{first matrix with long and}; & \node{short column}; \\     \node{second}; & \node{row}; \\     };     \end{tikzpicture}          and this:          \begin{tikzpicture}     \matrix{     \node{second matrix}; & \node{with another column long}; \\     };     \end{tikzpicture}               I want that is that both matrices look as if they were cut out of this combined matrix:          \begin{tikzpicture}     \matrix{     \node{first matrix with long and}; & \node{short column}; \\     \node{second}; & \node{row}; \\     \node{second matrix}; & \node{with another column long}; \\     };     \end{tikzpicture}     \end{document}      ![The rendered example](http://i.stack.imgur.com/4988S.png) In the example, the text in between is simple, but in the real example, the two matrices could be at totally different positions, e.g. two different floating figures.


title: Can I set the sidenotes on a Tufte-style handout to the left side of the page?

text: In addition, is it possible to have the side of the page on which the sidenotes appear alternate such that, for even-numbered pages, the notes will be to the left, while for odd-numbered pages, they will be to the right?


title: How can I fold sections containing include commands in TeXMaker?

text: I have used Emacs to edit my .tex files and I got used to the fold/unfold option. I am back to TeXMaker for some time and I would like to also fold/unfold sections, subsections and so on. This can be accomplished for the sections using the '-' appearing in the side bar when the pointer is in the line of the `\section` command. But this does not work with the subsection or (most importantly) with the sections containing an `\include` command. Do you have a solution for that? How can I fold/unfold any sections or subsections in TeXMaker? Bonus: Does a shortcut exist for that?


title: Picture over half of the page

text: I would like to have a picture that covers half of the page. The text should be in the rest area of the page. See attached picture, worth thousand words... Can somebody help me? Update: I want only one page of this style, the previous and next pages are "normal", it means without picture, full text witdth. The text should flow from previous page, continue on this "special" page and continue to flow to next page. Every solution I was able to find was based on condition that if you change page layout, the explicit or implicit page break is done. As I want the text to flow from previous page, those solutions were not usable. Update2: As inserting a picture is not problem, the question could be reduced to this: How to let the text flow between pages of different layout (different text width)? (Maybe "flowfram" package could help. But I think it is not possible to mix text flow between "main" document and a flow-frame on single page in the middle of document (?)) ![wanted result](http://i.stack.imgur.com/f2QJy.png)


title: Error: "A document must be saved with an extension (and without spaces or accents in the name) before being used by a command"

text: I am new to LaTeX and was trying out this today:               \documentclass[11pt]{article}     \begin{document}     \title{Latex}     \maketitle     \end{document}      But as I run it, it says Error: `A document must be saved with an extension (and without spaces or accents in the name) before being used by a command`. Can anyone help ?


title: Aligning \item dots partially in minipage

text: ![Item allignment](http://i.stack.imgur.com/4cfmt.jpg) As you can see on my added image, I have added the first `\item` in a `minipage` together with a figure which results in the "item dot" is a little more centred then the two other "item dots". I have tried putting all three \items on the same `minipage` but the page is not big enough which results in the text covering the page number. I have also tried playing with `\usepackage{wrapfig}` with no luck. Does anyone have any ideas ?


title: "Missing \cr inserted", but it looks to me like it's already there!

text: I'm trying to create a Plain TeX macro for typesetting two-column proofs with automatic step-numbering and step cross-referencing; currently, the "best" I have is:               \newcount\stepno     \def\twocols#1{%      \everycr={\advance\stepno by 1}      \def\mkstep##1{%         \expandafter \ifx \csname##1step\endcsname \relax%            \expandafter\edef\csname##1step\endcsname{\the\stepno}%         \else \message{^^JWarning: attempt to define ##1 more than once^^J^^J}%           \stepref{##1}%         \fi}%      \def\stepref##1{%         \expandafter \ifx \csname##1step\endcsname \relax {\tt[##1]}%         \else \csname##1step\endcsname%         \fi}%      $$\vbox{       \offinterlineskip       \halign{        \strut\the\stepno. ##\hfil & \vrule ##\hfil\cr%        %\noalign{\hrule\smallskip}        #1 \cr       }      }$$     }          \twocols{      \mkstep{A} $(p\to q)\land (q\to r)$ & premise \cr      \mkstep{B} $p\to (q\land(q\to r))$ & \stepref{A}, logic07 \cr      $p\to r$ & \stepref{B}, {\it modus ponens}     }          \bye      Unfortunately, trying to typeset this yields the following inexplicable error:               This is pdfTeXk, Version 3.141592-1.40.3 (Web2C 7.5.6)      %&-line parsing enabled.     entering extended mode     (./twocols02.tex     ! Missing \cr inserted.     <inserted text>                     \cr      <to be read again>                        }     \twocols ... ##\hfil & \vrule ##\hfil \cr #1 \cr }                                                        }$$      l.28 }          ? X     No pages of output.     Transcript written on twocols02.log.      Why is it claiming there's a missing `\cr` where there clearly appears to be one? I've tried removing the `\cr` from the macro definition and adding a `\cr` to the end of the macro argument, replacing the `\cr` with `\crcr`, removing the newline between the two closing braces there, using two `\cr`s, dispensing with the macro and trying to typeset what it should expand to, and various combinations thereof, yet I keep getting this error, and I'm out of ideas. What's going on? (Also, I suspect that using `\mkstep` the way I am will cause the resulting reference macros to be scoped to just the column in which `\mkstep` is used, rather than to the whole `\twocols`; is there a way to fix that without making the reference macros global?)


title: Using oldstyle figures of palatino (mathpazo) in math mode

text: I am using `\usepackage[osf]{mathpazo}` for oldstyle figures and the `dcolumn` package to align the contents of tables at their decimal point. The problem is that `dcolumn` automatically sets the aligned content in math mode which sometimes results in a strange mixture of oldstyle numbers and lining numbers. Is there an option to set digits in math mode to oldstyle by default? * * * **Edit** : (I hope editing the post is the right way in the local Netiquette to enhance my question). @Mico I think the siunitx package is the way to go since it allows escaping math mode in tables completely and allows using a different math font in the document. But trying to use siunitx with my tables results in the phenomenon that there is white space for digits in parentheses, when the entry has fewer digits than previous entries (most of my tables are created by the esttab plugin for Stata, by the way). The following MWE illustrates the problem:               \documentclass{scrartcl}          \usepackage{booktabs}     \usepackage{siunitx}     \usepackage[osf]{mathpazo}          %SFor Tables created by estout         \def\sym#1{\ifmmode^{#1}\else\(^{#1}\)\fi} %for symbols in Table          \begin{document}          \begin{tabular*}     {\textwidth}{@{\hskip\tabcolsep\extracolsep\fill}l*{2}{S         [mode=text,         table-auto-round,     %   table-format=4.3,   % how is this supposed to work when we have entry with a different amount of digits?         table-align-text-post=false,         input-open-uncertainty=,         input-close-uncertainty=]         }   }     \toprule     \emph{Age}          &                     &                     \\     \hspace{0.1cm} 18-24&   [-1360.228]\sym{*}  &   -1371.941\sym{*}  \\                         &   (6.915)         &   (-7.953)         \\     \hspace{0.1cm} 25-34&    -219.216         &    -240.271         \\                         &   (514.894)         &   (515.348)         \\     \hspace{0.1cm} 35-44&    -310.715         &    -311.438         \\                         &   (485.780)         &   (486.013)         \\     \hspace{0.1cm} 55+  &      -5.135         &      [2.656]         \\                         &   (53.267)         &   (533.875)         \\     \bottomrule     \end{tabular*}          \end{document}


title: Using operator spacing to indicate precedence

text: I regularly have to typeset equations that are, because of their inherent complexity, difficult to read. To address this I have gotten into the habit of emphasizing operator precedence by horizontal spacing. To give a simple example, because in mathematics `\times` binds stronger than `+`, and `+` binds stronger than `=`, I would do things like this:               \[  a \times b \; + \; c \times d \;\; = \;\; (e + f) \times g  \]      I've found that this immediately makes it easier to understand an equation at a glance. Well, since then I have devised a way that is a _little_ nicer than that, defining a family of custom 'math ligatures' using the `semantic` package:               \[  a `*` b ``+`` c `*` d ```=``` (e + f) `*` g  \]      Increasing the number of backticks exponentially increases the extra space, and I've experimentally come up with lengths that appear most pleasing to the eye. The implementation comes down to the following (though I have left out a number of corner cases and features, such as encoding `\times` as ``*``):               \RequirePackage [ligature] {semantic}          \mathlig{`````}{\mspace{38mu}}     \mathlig{````}{\mspace{23mu}}     \mathlig{```}{\mspace{12mu}}     \mathlig{``}{\mspace{5mu}}      Have other people already attempted something similar? Is there a way to do this better / easier / automatically? * * * On a more philosophical note (and I hope this doesn't violate the spirit of stackexchange; mods, please let me know if I should remove this), I somehow expect this to be a controversial approach. After all, many die-hard TeX users go through great lengths to preserve the beautiful spacing that TeX generates. I would actually like to hear from you. How do you solve the problem of formula readability?


title: The effect of the anonymous letter

text: I'm trying to create an effect as if the text is made up of letters cut from magazines and newspapers and even the same words had different style. It is necessary that each letter in the word had a random parameters (in a predetermined range):   * fonts (from a few pre-selected)   * font size   * turn   * above or below the baseline for a few pt Of course, all this can be set manually, but it will take a long time. How can this be automated?


title: Inserting a pdf into latex with additional text

text: I need to add a content of a pdf file as an appendix to my thesis. I do this with               \chapter{Material used in Turing test experiment}     \label{ch:turing_materials}          \includepdf[pages=-,scale=0.8]{images/task.pdf}      Unfortunately, this pushes the content of the pdf file to the next page, so I get almost empty page only with the title and it does not look nice. Any ideas how to deal with this?


title: How to draw bigger circular states and multiple transitions in automata?

text: I want to draw something like this. I have three difficulties:   1. How to draw bigger circular states and **dashed circular state**?   2. How to draw multiple arrows between states? (Ex. In the state "App components state machines", there are multiple incoming and outgoing arrows.)   3. How to get that surrounded box around transition labels?  ![enter image description here](http://i.stack.imgur.com/eXRSf.png) This is my code:               \documentclass{article}     \usepackage{tikz}     \usepackage[margin=15mm]{geometry}     \usepackage{calc}     \usetikzlibrary{matrix,arrows}     \usetikzlibrary{positioning,arrows}     \usetikzlibrary{shapes,arrows,fit,calc,positioning,automata}                                  \begin{document}                   \begin{tikzpicture}[>=stealth',shorten >=1pt,auto,node distance=9 cm]         %  \tikzstyle{every state}=[fill=white,draw=none,text=black]                  \node[initial,state] (A)                                    {app initialized};             \node[state]         (B) [right of=A]                       {Activity State Machine};             \node[state]         (C) [below of=B]                       {Service State Machine};             \node[state]         (D) [below of=A]                       {App components state machines};                \path[->]                 (A) edge []     node [below,align=center]           {} (B)                 (C) edge []     node [pos=0.75,left,align=center]           {} (D)                 (C) edge []     node [pos=0.75,left,align=center]           {} (B);                        \end{tikzpicture}              \end{document}      Output is something like this: (I want all states of uniform size and new line character within the states) ![enter image description here](http://i.stack.imgur.com/gt84E.png)


title: Chapter title alignment with titleformat

text: I am trying to typeset a title with titleformat as in the following example: ![Example](http://i.stack.imgur.com/x0kX3.png) I like the overall result, but when the title wraps around it is not left- aligned. Is there any way to indent the second line accordingly? This is the code that generates the example:               \documentclass[12pt]{book}          \usepackage{titlesec}     \usepackage{xcolor}          \newfont{\chapterNumber}{eurb10 scaled 5000}          \titleformat{\chapter}[block]%             {\relax}%             {\llap{\color{gray}\chapterNumber\thechapter%             \hspace{10pt}\vline}  }{10pt}%             {\raggedright\LARGE\textsc}          %% Using this instead, the text is left-aligned but the     %% vertical line is not aligned with the body text     % \titleformat{\chapter}[block]%     %         {\relax}%     %         {\llap{\color{gray}\chapterNumber\thechapter%     %         \hspace{10pt}\vline\hspace{10pt}}}{0pt}%     %         {\raggedright\LARGE\textsc}          \begin{document}     \chapter{Long long long long long long long long long long title}     \end{document}      There is an alternative definition that makes the title aligned by putting the `\hspace` inside the `\llap`, but this way the vertical line is shifted left while I'd like it to be aligned with the body text.


title: Exporting graphics wth text labels from OpenOffice.org Draw to ConTeXt

text: I often create graphics in OpenOffice.org Draw, containing vector graphics, text labels, with photos occasionally mixed in. OpenOffice.org supplies a variety of export formats. Is there any way to export the graphics from this software to a format that can be placed in a ConTeXt document, such that the text labels are rendered using the font choices and typography of ConTeXt?


title: Polutoniko Greek in TexLive 2013

text: I can no longer compile files with the polutonikogreek language option to babel in TexLive 2013. Everything was fine in TL2012. There is another question showing the same problem: Ancient Greek hyphenation in LuaLaTeX but the solution given there does nto work for me. In fact, the minimal example given in the answer does not compile on my system. I just upgraded to TL2013 from TL2012 and asked the installer to bring over my old settings from TL2012. Perhaps that's the problem? Help appreciated. EDIT: Problem has been fixed by babel-greek maintainer in version 1.5a


title: How do I include a .pdf_tex file in the align environment?

text: I am writing a math document which contains several pictures. My pictures are `.pdf_tex` files from Inkscape, and usually               \begin{figure}     \centering      \input{<name>.pdf_tex}      \end{figure}      is fine for including them. However, sometimes I would like my pictures to be part of an equation, e.g. (extremely simplified example) if I draw a circle, `circle.pdf_tex`, I might want to calculate its area by               \begin{align}     \text{Area}\left( \input{circle.pdf_tex} \right)=\pi r^2     \end{align}      but of course I cannot simply input `.pdf_tex` in the `align` environment. Does anyone know a nice solution to this?


title: Centering in tabularx and X columns

text: How can I center the column when using X in tabularx environment like in this example?               \begin{tabularx}{\textwidth}{@{}lXXXXX@{}}      1 & 2 & 3 & 4 & 5 \\        \end{tabularx}


title: How to center text in tabularx?

text: > **Possible Duplicate:**   >  Centering in tabularx and X columns I was using `\begin{tabular}` to insert a table in my article. The titles for columns were long which caused the table to extend out across the paper boundary. I searched online and found that `{tabularx}` will wrap the text. I used it which solved the problem. But I want my content to be centered. How do I achieve this in the `{tabularx}` environment? I am new to LaTeX and this is my first article. I have copied my script below:               \begin{table}[ht]     \caption{Clear Zone Deficiency and Crash Severity}      \centering      \begin{tabularx} {\linewidth} {X X X X X X X}     \hline\hline            CLEAR ZONE DEFICIENCY & TOTAL CRASHES & FATAL & INJURY & PDO & \% CRASHES & \% FATAL \\ [0.5ex]      \hline                0ft-4ft & 4 & 0 & 2 & 2 & 7.84 & 0 \\      4ft-8ft & 14 & \textbf{1} & 4 & 9 & 27.45 & 9.09 \\     8ft-12ft & 15 & \textbf{1} & 5 & 9 & 29.41 & 9.09 \\      12ft + & 18 & \textbf{9} & 4 & 5 & 35.29 & \textbf{81.82}\\     \hline     TOTAL & 51 & 11 & 15 & 25 & 100 & 100 \\ [1ex]          \hline      \end{tabularx}     \label{table:CZseverity}      \end{table}


title: Parenthesis style in bibtex citation

text: I am using LyX with `bibtex` and `natbib` for my citations. However, for some reason when I create the pdf, the citation comes out as Author [year] instead of Author (year). Is there a way to change the style of the parenthesis?


title: What are the practical differences between installing LaTeX from MacTeX or MacPorts/Homebrew?

text: When I started using a unix based system it was very natural to install MacTeX, since the installation of it is more "windows-like", though the installation package is _huge_. Later I was introduced to MacPorts, and recently Homebrew, which also provide easy ways of installing LaTeX on my system. However, I find myself unable to distinguish the practical differences between these alternatives and argument for using one or the other.   1. Does MacTeX, MacPorts and Homebrew provide different versions of LaTeX?    2. Downloading and maintaining tex-libraries with MacTeX is quite easy and automatized through the TexLive utility. Are there similar solutions if one choose to install LaTeX with MacPorts or Homebrew?   3. Are there advantages/disadvantages with using one or the other solution?


title: gls style latex

text: I'm using glossary in latex and I wonder if or how can I change the style of the word-hyperlink to an entry which created via `\gls{glossary-item}`? I've tried it via `\newenvironment{*style changes here*}`, but then the hyperlink to the glossary is missing.


title: problem renaming command in SIunits

text: I've developed a package in which I want to define a command `\power`, but that name is taken by a command in the `SIunits` package (which my package uses). I initially named my command `\powr` but decided to try renaming the `\power` command in `SIunits` and use `\power` in my own package. The problem is that I've apparently missed something or done something incorrect because I can't get the intended result. (Note that I don't want to use `siunitx` over `SIunits` at present, although I will migrate to it in the future.) Here is a MWE which does NOT included all the packages my own package uses. My major problem is that `\square` doesn't work as after renaming `\power` and I simply don't understand why. `\sisquare` doesn't work either but I don't use it. What am I missing?               \documentclass{article}     \usepackage{letltxmacro}     \usepackage{SIunits}          \newcommand*{\m}{\ensuremath{\mathrm{m}}          \LetLtxMacro{\sipower}{\power}     \renewcommand{\power}[1]{\ensuremath{#1 \; \mathrm{J/s}}}          \LetLtxMacro{\sisquare}{\square}     \renewcommand*{\square}[1]{\mathrm{#1}^{2}}          \renewcommand*{\squared}{\ensuremath{^{\mathrm{2}}}}     \renewcommand*{\cubic}[1]{\sipower{#1}{3}}     \renewcommand*{\cubed}{\ensuremath{^{\mathrm{3}}}}     \renewcommand*{\fourth}[1]{\sipower{#1}{4}}     \renewcommand*{\reciprocal}[1]{\sipower{#1}{\SIminus1}}     \renewcommand*{\rp}{\ensuremath{^{\mathrm{\SIminus1}}}}     \renewcommand*{\rpsquare}[1]{\sipower{#1}{\SIminus2}}     \renewcommand*{\rpsquared}{\ensuremath{^{\mathrm{\SIminus2}}}}     \renewcommand*{\rpcubic}[1]{\sipower{#1}{\SIminus3}}     \renewcommand*{\rpcubed}{\ensuremath{^{\mathrm{\SIminus3}}}}     \renewcommand*{\rpfourth}[1]{\sipower{#1}{\SIminus4}}          \begin{document}          \sipower{\m}{2} \par     \power{3}       \par     $\sisquare\m$   \par     \square\m       \par     \m\squared      \par     \cubic\m        \par     \m\cubed        \par     \fourth\m       \par     \reciprocal\m   \par     \m\rp           \par     \rpsquare\m     \par     \m\rpsquared    \par     \rpcubic\m      \par     \m\rpcubed      \par     \rpfourth\m          \end{document}


title: Dimensional calculations use newdimen - LaTeX reads over parts of my equation

text: I am trying to do a dimensional calculation, but LaTeX reads over parts of my equation. How do I correctly calculate `BLLa` here? Sorry for the not that minimum example.               \documentclass{article}     \usepackage{etex}     \usepackage{etoolbox}     \usepackage{minted}     \usepackage[skins]{tcolorbox}     \usepackage{lineno}     \makeatletter     \def\gobble#1{}     \renewcommand\DeleteFile[1]{}     \definecolor{mintedbg}{HTML}{F8FAFF}     \definecolor{col1}{HTML}{80B2FF} %4 Outer right borderline     \definecolor{col2}{HTML}{99C2FF} %3     \definecolor{col3}{HTML}{B2D1FF} %2     \definecolor{col4}{HTML}{CCE0FF} %1 Outer left borderline     \newdimen\BLW     \BLW\dimexpr 3pt\relax     \newdimen\BLS     \BLS\dimexpr .5pt\relax     \newdimen\BLLa     \BLLa\dimexpr -.5\BLW-\BLS-.5 *.75\BLW \relax     \newdimen\BLLb     \BLLb\dimexpr -.5\BLW-\BLS-.5(.75\BLW)-\BLS-.5(.75^2 \BLW)\relax     \BeforeBeginEnvironment{Rcode}{%     \begin{trivlist}     \item\begin{tcolorbox}[       width=\linewidth-6pt,       enlarge top by=3pt,       enlarge bottom by=3pt,       enlarge left by=3pt,       enlarge right by=3pt,       frame hidden,boxrule=0pt,       top=1mm,       bottom=1mm,       colback=mintedbg,       freelance,       arc=0pt,       outer arc=0pt,       boxrule=0pt,       frame code={         \draw[col1,line width=\BLW]  % right           ([xshift=0pt]frame.north west) -- ([xshift=0pt]frame.south west);         \draw[col2,line width=\BLW*(3/4)]            ([xshift=\BLLa]frame.north west) -- ([xshift=\BLLa]frame.south west);         \draw[col3,line width=\BLW*(3/4)^2]            ([xshift=\BLLb]frame.north west) -- ([xshift=\BLLb]frame.south west);         \draw[col4,line width=\BLW*(3/4)^3]            ([xshift=-7.5pt]frame.north west) -- ([xshift=-7.5pt]frame.south west);       }     ]}     \AfterEndEnvironment{Rcode}{\end{tcolorbox}\end{trivlist}}%          \pgfkeys{         /terminal/.cd,         caption/.code={\pgfkeyssetvalue{terminal/caption}{\caption{#1}}}, % Double hash for expansion         label/.code={\pgfkeyssetvalue{terminal/label}{\label{#1}}},     }     \pgfkeyssetvalue{terminal/label}{}     \pgfkeyssetvalue{terminal/caption}{\caption{}}     \newenvironment{Rcode}{%       \VerbatimEnvironment       \minted@resetoptions       \setkeys{minted@opt}{}       \begin{center}         \begin{minipage}{\linewidth}               \begin{VerbatimOut}{\jobname.pyg}}     {%           \end{VerbatimOut}           \minted@pygmentize{r}           \DeleteFile{\jobname.pyg}         \end{minipage}         \end{center}}         \makeatother              \begin{document}         \begin{Rcode}     # Here a piece of R code that we've      # all come to know and love     object <- c(1,2,5,8)     \end{Rcode}      \end{document}      I am aware LaTeX will expand all the way to `\BLW` (after *.75), but I don't know how to stop LaTeX from reading that and discarding *.75.


title: Non-commutative fractions

text: There are symbols for non-commutative fractions? I know `\holter` and `\polter` (see here), but they are very ugly (lateral lines are too long for my taste) Edit: By non-comutative fraction I mean a division in non-commutative contest; for example in a non-commutative multiplicative group, we have two possible division, namely `ab^{-1}` and `b^{-1}a`, hence, in order to distinguish them, we cannot write `\frac ab`, but `\holter ab` or `\polter ab`.


title: Labels in xtick with pgfplots

text: I am using Pgfplots to make a very simple graph. I already have the code below               \documentclass{article}     \usepackage{tikz,pgfplots}     \pagestyle{empty}     \begin{document}     \begin{tikzpicture}[>=latex]     \begin{axis}[       axis x line=center,       axis y line=center,       xtick={-5,-4,...,5},       ytick={-5,-4,...,5},       xlabel={$x$},       ylabel={$y$},       xlabel style={below right},       ylabel style={above left},       xmin=-10.5,       xmax=10.5,       ymin=-10.5,       ymax=10.5]     \addplot [mark=none,domain=-4:4] {x};     \end{axis}     \end{tikzpicture}     \end{document}      What I need is to be able to use symbols other than numbers in the axes. So, instead of 1 2 3 4... I would like to have, for instance, + + _ _ + + or other symbols for each point in the axes. How can I do that? I hope my question is clear!


title: In the index, after page number, how to put section number followed by column number?

text: hello respected every one. I am writing a book with multiple column format in latex. I have included the chapter index. My knowledge is very small about it but I am learning gradually. I have seen that the list in index is appearing (so far) in two column format. My questions are: (1) is it possible if i wish, to create the index with 3 columns or more? Will it be suitable? what do you suggest? (2) Moreover, as I said that I am writing the book in multiple column format, so I am willing to know if it is possible that in the index list, after the subject name, followed by page number , there will be another customization as s/m where s/m denotes the appearance of the subject in that specified page in the section number s under the column number m. For example, suppose the word "apple" is in page 20 , section 3.2 in column number 3. And I want the appearance of the word "apple" would be like "apple, 20, 3.2/3". How simply can we do that ? please help me. Thanks in advance


title: pdfpages error : includepdf + addtotoc / addtolist

text: PDFpages produces this error. How could I fix it ?               Package pdfpages Warning: There's something wrong with the entries     (pdfpages)                of `addtotoc'. Not all entries were     (pdfpages)                processed. Check `addtotoc' on input line 144.               Package pdfpages Warning: There's something wrong with the entries     (pdfpages)                of `addtolist'. Not all entries were     (pdfpages)                processed. Check `addtolist' on input line 144.      Here is the code (mindmaps.pdf has 2 pages):                   %!TEX TS-program = pdflatex              \PassOptionsToPackage{table,x11names,svgnames}{xcolor}              \documentclass[10pt,twoside,openright,usletter]{book}         \usepackage{lipsum}         \usepackage{pdfpages}         \usepackage{hyperref}         \usepackage{minitoc}         \usepackage{url}         \usepackage{fancyhdr}                       \hypersetup{              backref=true,                 pagebackref=true,               hyperindex=true,                colorlinks=true,                breaklinks=true,                urlcolor= blue,                 linkcolor= purple,                bookmarks=true,               pdftoolbar=true,                     pdfmenubar=true,                      bookmarksopen=true,                          pdftitle={title of book},                pdfauthor={author of book},                  pdfsubject={subject of book}                   }                    %---------------------------- begin selection of language         %  2 languages, here = second language selected         \mtcselectlanguage{english}   % for minitoc              %   \def\ColorSecondLanguage{\textcolor{DarkViolet}}  % produces an error, why ?             \def\ColorSecondLanguage{}              %\newcommand{\FirstLanguageSecondLanguage}[2]{\ColorSecondLanguage{#2}}         \newcommand{\FirstLanguageSecondLanguage}[2]{#2}                        %---------------------------- begin macro for including a PDF document         % includepdf syntax:         %     addtotoc={⟨page number⟩,⟨section⟩, ⟨level⟩,⟨heading⟩,⟨label⟩}         %     addtolist={⟨page number⟩,⟨type⟩,⟨heading⟩,⟨label⟩}              %            %   \IncludeMyPDFThatBugs         %   {1} %  page number to be included         %   {0.9} % scale         %   {true} %   landscape = true or false         %   {false} %  turn = true or false         %   {subsection,2} % level in TOC: section, subsection, subsubsection + level 1,2,3         %   {TitleTOC} %  heading for TOC / list          %   {Label} %   label: label-toc-#7, label-list-#7, #7-target for hyperlinks         %   {table} %   addtolist = table or figure         %   {mindmaps.pdf} %  file                   \def\MYpagesPDF{2}           \def\pageAddtoTOC{2}         \def\pageAddtoList{2}              \newcommand{\IncludeMyPDFThatBugs}[9]{%         \newpage\hypertarget{#7-target}         {\includepdf[pages={#1},nup=1x1,             scale=#2,landscape=#3,turn=#4,             pagecommand={\thispagestyle{fancy}},             addtotoc={\pageAddtoTOC,#5,#6,label-toc-#7},             addtolist={\pageAddtoList,#8,#6,label-list-#7}]         {#9}}}         %---------------------------- end macro for including a PDF document              \title{Title of book}         \author{Author of book}         \date{\today}              \begin{document}         \frontmatter          \maketitle         \cleardoublepage         \dominitoc         \dominilof          \tableofcontents         \mainmatter         \cleardoublepage              \chapter{Chapter one}         \minitoc         \cleardoublepage         \section{Section one Chapter one}         \lipsum                   \IncludeMyPDFThatBugs         {\MYpagesPDF}         {1}         {false}         {false}         {subsection,2}         {\FirstLanguageSecondLanguage{Nam dui ligula, fringilla}{Hamlet speaks this on his entry to Act 3 scene 1}}         {table-mind-one}         {table}         {mindmaps.pdf}                   \IncludeMyPDFThatBugs         {1}         {0.9}         {false}         {true}         {subsection,2}         {\FirstLanguageSecondLanguage{Nam dui ligula, fringilla a}{Hamlet speaks this on his entry to Act 3 scene 1}}         {figure-mind-one}         {figure}         {mindmaps.pdf}                        \chapter{Chapter two}         \minitoc         \cleardoublepage                 \section{Section one Chapter two}         \lipsum         \section{Section two Chapter two}         \lipsum                   \IncludeMyPDFThatBugs         {1}         {0.9}         {false}         {true}         {subsection,2}         {\FirstLanguageSecondLanguage{Nam dui ligula, fringilla}{To be, or not to be, that is the question}         {figure-mind-two}         {figure}         {mindmaps.pdf}                   \IncludeMyPDFThatBugs         {1}         {0.9}         {false}         {true}         {subsection,2}          {\FirstLanguageSecondLanguage{Nam dui ligula, fringilla}{To be, or not to be, that is the question}         {table-mind-two}         {table}          {mindmaps.pdf}                   \IncludeMyPDFThatBugs         {1}         {0.9}         {false}         {true}         {subsection,2}         {\FrancaisEnglishSubSections{Nam dui ligula, fringilla}{To be, or not to be, that is the question}          {nrp-algo}         {figure}         {mindmaps.pdf}                        \cleardoublepage         \listoftables         \addcontentsline{toc}{chapter}{List of Tables}                        \cleardoublepage         \listoffigures         \addcontentsline{toc}{chapter}{List of Figures}                   \cleardoublepage                   \end{document}      I cloned the code, and took out the language selection. It compiled well afterwards. But - I have to keep the language selection - how could I improve it to make it work adequately ?                           %!TEX TS-program = pdflatex              \PassOptionsToPackage{table,x11names,svgnames}{xcolor}              \documentclass[10pt,twoside,openright,usletter]{book}         \usepackage{lipsum}         \usepackage{pdfpages}         \usepackage{hyperref}         \usepackage{minitoc}         \usepackage{url}         \usepackage{fancyhdr}                       \hypersetup{              backref=true,                 pagebackref=true,               hyperindex=true,                colorlinks=true,                breaklinks=true,                urlcolor= blue,                 linkcolor= purple,                bookmarks=true,               pdftoolbar=true,                     pdfmenubar=true,                      bookmarksopen=true,                          pdftitle={title of book},                pdfauthor={author of book},                  pdfsubject={subject of book}                   }                    %---------------------------- begin selection of language         %  2 languages, here = second language selected         \mtcselectlanguage{english}   % for minitoc              %   \def\ColorSecondLanguage{\textcolor{DarkViolet}}  % produces an error, why ?         %   \def\ColorSecondLanguage{}              %\newcommand{\FirstLanguageSecondLanguage}[2]{\ColorSecondLanguage{#2}}         %\newcommand{\FirstLanguageSecondLanguage}[2]{#2}                        %---------------------------- begin macro for including a PDF document         % includepdf syntax:         %     addtotoc={⟨page number⟩,⟨section⟩, ⟨level⟩,⟨heading⟩,⟨label⟩}         %     addtolist={⟨page number⟩,⟨type⟩,⟨heading⟩,⟨label⟩}              %            %   \IncludeMyPDFThatBugs         %   {1} %  page number to be included         %   {0.9} % scale         %   {true} %   landscape = true or false         %   {false} %  turn = true or false         %   {subsection,2} % level in TOC: section, subsection, subsubsection + level 1,2,3         %   {TitleTOC} %  heading for TOC / list          %   {Label} %   label: label-toc-#7, label-list-#7, #7-target for hyperlinks         %   {table} %   addtolist = table or figure         %   {mindmaps.pdf} %  file                   \def\MYpagesPDF{2}           \def\pageAddtoTOC{2}         \def\pageAddtoList{2}              \newcommand{\IncludeMyPDFThatBugs}[9]{%         \newpage\hypertarget{#7-target}         {\includepdf[pages={#1},nup=1x1,             scale=#2,landscape=#3,turn=#4,             pagecommand={\thispagestyle{fancy}},             addtotoc={\pageAddtoTOC,#5,#6,label-toc-#7},             addtolist={\pageAddtoList,#8,#6,label-list-#7}]         {#9}}}         %---------------------------- end macro for including a PDF document              \title{Title of book}         \author{Author of book}         \date{\today}              \begin{document}         \frontmatter          \maketitle         \cleardoublepage         \dominitoc         \dominilof          \tableofcontents         \mainmatter         \cleardoublepage              \chapter{Chapter one}         \minitoc         \cleardoublepage         \section{Section one Chapter one}         \lipsum                   \IncludeMyPDFThatBugs         {\MYpagesPDF}         {1}         {false}         {false}         {subsection,2}         {Hamlet speaks this on his entry to Act 3 scene 1}         {table-mind-one}         {table}         {mindmaps.pdf}                   \IncludeMyPDFThatBugs         {1}         {0.9}         {false}         {true}         {subsection,2}         {Hamlet speaks this on his entry to Act 3 scene 1}{figure-mind-one}         {figure}         {mindmaps.pdf}                        \chapter{Chapter two}         \minitoc         \cleardoublepage                 \section{Section one Chapter two}         \lipsum         \section{Section two Chapter two}         \lipsum                   \IncludeMyPDFThatBugs         {1}         {0.9}         {false}         {true}         {subsection,2}         {Hamlet speaks this on his entry to Act 3 scene 1}         {figure-mind-two}         {figure}         {mindmaps.pdf}                   \IncludeMyPDFThatBugs         {1}         {0.9}         {false}         {true}         {subsection,2}          {Hamlet speaks this on his entry to Act 3 scene 1}         {table-mind-two}         {table}          {mindmaps.pdf}                   \IncludeMyPDFThatBugs         {1}         {0.9}         {false}         {true}         {subsection,2}         {Hamlet speaks this on his entry to Act 3 scene 1}         {nrp-algo}         {figure}         {mindmaps.pdf}                        \cleardoublepage         \listoftables         \addcontentsline{toc}{chapter}{List of Tables}                        \cleardoublepage         \listoffigures         \addcontentsline{toc}{chapter}{List of Figures}                   \cleardoublepage                   \end{document}


title: Tikz How to?: Shear flow distribution around a box; Adding rectangles to lines

text: I am trying to illustrate the shear flow distribution around two similar boxes for my students using Tikz. The result should look like the two following examples: ![enter image description here](http://i.stack.imgur.com/JfeCm.png) From a previous try, I already have an illustration of the respective boxes. Here the one for the right box:               \begin{tikzpicture}[         x=1.00cm,         y=1.00cm,         scale=2.0,         t1 line/.style={line width=1.0pt,line cap=butt},         pile/.style={thin, dashed, ->, >=stealth', shorten <=4pt, shorten >=4pt},         every node/.style={color=black}         ]              \def\H{0.75}         \def\B{2}              \coordinate (K1)  at (2*\B  , \H);         \coordinate (K2a) at (8*\B/5, \H);         \coordinate (K2b) at (2*\B/5, \H);         \coordinate (K3)  at (   0.0, \H);         \coordinate (K4)  at (   0.0,0.0);         \coordinate (K5a) at (2*\B/5,0.0);         \coordinate (K5b) at (8*\B/5,0.0);         \coordinate (K6)  at (2*\B  ,0.0);              % Linien Umfang         \draw[t1 line] (K1.center)  -- (K2a.center) node[above, midway] {};         \draw[t1 line] (K2a.center) -- (K2b.center) node[above, midway] {};         \draw[t1 line] (K2b.center) -- (K3.center)  node[above, midway] {};         \draw[t1 line] (K3.center)  -- (K4.center)  node[left,  midway] {};         \draw[t1 line] (K4.center)  -- (K5a.center) node[below, midway] {};         \draw[t1 line] (K5a.center) -- (K5b.center) node[below, midway] {};         \draw[t1 line] (K5b.center) -- (K6.center)  node[below, midway] {};         \draw[t1 line] (K6.center)  -- (K1.center)  node[left,  midway] {};              % Linien Stege         \draw[t1 line] (K2a.center)  -- (K5b.center)  node[left,  midway] {};         \draw[t1 line] (K2b.center)  -- (K5a.center)  node[left,  midway] {};     \end{tikzpicture}      Now I ask myself, what is the best way to incorporate the blue rectangles? The effort to code them "by hand" seems a little too high. Is it possbile to define the blue rectangles by using the already defined nodes? Is there a more elegant way?


title: "Environment subfigure undefined" on journal submission

text: I have a LaTeX file with packages               \usepackage{amsmath,amssymb}     \usepackage{graphicx}     \usepackage[colorlinks=true,citecolor=black,linkcolor=black,urlcolor=blue]{hyperref}     \usepackage{tikz,graphics,color,fullpage,float,epsf,caption,subcaption}      and I use the `subfigure` environment:               \begin{figure}     \begin{subfigure}{1\textwidth}     ...     \end{subfigure}          \vspace{5mm}          \begin{subfigure}{1\textwidth}     ...     \end{subfigure}          \end{figure}      This compiles perfectly fine on my machine. However, when I submit the LaTeX file to a journal and looks at the PDF output, it shows an error               ! LaTeX Error: Environment subfigure undefined.      I'm really lost on how to fix this, since as I said, it works fine on my machine. What should I do?


title: LaTeX hyphenation problems in Spanish

text: I am using this preamble on my document, edited with TeXStudio/MiKTeX and I am getting several words not hyphenated and past the margin limits on the right side. As you can probably see, I am very new with LaTeX, so any orientation will be much appreciated               ...old code deleted... check new example      Here is the result I am getting... ![Hyphenation problems](http://i.stack.imgur.com/t2U1Q.jpg) here is a code snippet showing the problem # New test code ...               \documentclass[a4paper,12pt]{book}          \usepackage[spanish]{babel}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage{lmodern}          \usepackage[a4paper, inner=2cm, outer=2cm, top=2cm, bottom=3cm, bindingoffset=1cm]{geometry}          \usepackage{latexsym}     \usepackage{longtable}     \usepackage{graphicx}     \usepackage{fancyhdr}     \usepackage{enumitem}     \usepackage{siunitx}               \fancyhf{}     \fancyhead[LE]{\leftmark}     \fancyhead[RO]{\nouppercase{\rightmark}}     \fancyfoot[LE,RO]{FCA - \thepage}     \pagestyle{fancy}               \begin{document}          \section{El Parto}          Para un buen nacimiento, el parto debe ser:          \begin{description}     \item[NATURAL] Las vacas tienen que parir solas y en ambientes higiénicos. Sobre suelos empastados si es a campo. Las fases del parto tienen que cumplirse todas, por lo que cualquier intervención más que ayudar puede ocasionar trastornos y contaminaciones a las vacas y los terneros. Sólo asistirlas en caso necesario. En el lugar estarán solamente las vacas parturientas evitando cualquier otra categoría o animales de otras especies.     \item[HIGIÉNICO] Mantener la vaca en corrales o piquetes de fácil acceso, limpios, con agua y sombra. Sin accidentes de terreno tales como zanjas, terrenos pantanosos o rocosos ya que las vacas muy pesadas pueden no levantarse si se echan en mala posición. Cuando el parto se realiza en corrales hay que evitar los suelos resbaladizos y las camas húmedas. La sombra será proporcionada por árboles de copa alta, evitando matorrales donde tengan posibilidad de esconderse o bien mediante estructuras artificiales. Las vacas deben ser vistas desde cualquier ángulo. El agua se proporcionará en bebederos.           Para mejores resultados y un control mas fácil es conveniente  contar con una sala de maternidad, que permita una atención individual en un ambiente limpio donde disminuya la posibilidad de infecciones. Es la primer área donde el recién nacido se expone a su nuevo ambiente. La incidencia de problemas de ombligo y diarrea tienen relación directa en el área de parto y su higiene $^{(19)}$.          Las salas deben ser individuales y su cantidad depende de la distribución anual de partos.           La alimentación se hace de noche (Ej. 8 pm) para aumentar la probabilidad de parto durante el día. (Hernández, 2012)$^{(19)}$.Las vacas permanecen en el paridero hasta 24 has después el parto para cumplir con las rutinas sanitarias y verificar la expulsión de la placenta.          \item [RAPIDO] El parto natural es rápido y se divide en tres estados consecutivos $^{(2)}$:     \end{description}          \end{document}      ![Result of above code... check 2nd line right margin...](http://i.stack.imgur.com/tftSb.jpg)


title: How to show the full remainder in polynomial long division?

text: # Original The remainder provided by `polynom.sty` is NOT complete (as shown in the following figure). ![alt text](http://i.stack.imgur.com/IjRZj.png) * * * # My Objective When I was in senior high school, my teacher made the diagram like below. :-) Thus the final step must show the TOTAL remainder and mark it with L-shaped curve. # NOTE I am sorry. The previous post I forgot to put back `-1/4` in the original position. It have made you confused. Now there is no mistake anymore. :-) ![alt text](http://i.stack.imgur.com/agvem.png) * * * # Minimal Code               \documentclass{article}     \usepackage{polynom,array}     \usepackage[table]{xcolor}               \makeatletter     \def\pld@ArrangeResult#1{%         \ifx\pld@remainder\@empty             \@tempcnta\pld@maxcol\relax             \pld@InsertItems@do\pld@lastline                 {\pld@firsttrue\pld@PLD{\pld@R{0}{1}}}%         \fi         \ifnum\pld@currstage>\z@             \pld@Extend\pld@allines{\pld@lastline\cr}%         \else             \pld@InsertFake\pld@lastline         \fi         \pld@iftopresult             \def\pld@lastline{\pld@PrintPoly\pld@divisor%             %====================================================================================             \quad\smash{{\color{red}\rule[-6pt]{\arrayrulewidth}{17pt}}}\kern-\arrayrulewidth&}%             %====================================================================================         \else             \let\pld@lastline\@empty             \ifx B\pld@style\else                 \def\pld@lastline{\pld@leftdelim\strut\pld@rightxdelim&}%             \fi         \fi         \expandafter\pld@AR@col\expandafter\pld@PLD                                \expandafter\pld@lastline#1+\relax+%         \pld@SplitQuotient         \pld@iftopresult             \let\pld@currentline\@empty             \expandafter\pld@AR@col\expandafter\pld@PLD                                    \expandafter\pld@currentline                                                \pld@quotient+\relax+%             \expandafter\pld@AR@col\expandafter\pld@XPLD                                    \expandafter\pld@currentline                                                \pld@shadow+\relax+%             \edef\pld@subline{%                 \noexpand\cline{\tw@-\pld@maxcol}%                 \noalign{\vskip\jot}}%             \pld@Extend\pld@currentline{\expandafter\cr\pld@subline}%         \else             \@tempcnta-\@tempcnta             \advance\@tempcnta\pld@maxcol\relax \advance\@tempcnta\@ne             \edef\pld@span{\the\@tempcnta}%             \ifx B\pld@style               \pld@AddTo\pld@lastline{%                 &\multispan\pld@span${}=%                 \pld@PrintPolyWithDelims\pld@divisor                 \expandafter\pld@IfSum\expandafter{\pld@divisor}{}{\cdot}%                 \expandafter\pld@IfSum\expandafter{\pld@quotient}\pld@true                                                                  \pld@false                 \pld@if \pld@leftdelim                         \pld@PrintPolyShadow                         \pld@rightdelim                   \else \pld@PrintPolyShadow \fi                 \pld@firstfalse                 \expandafter\pld@PrintRemain\expandafter{\pld@remainder}$}%             \else               \pld@AddTo\pld@lastline{%                 &\multispan\pld@span$\pld@leftxdelim\strut\pld@rightdelim                 \pld@div                 \pld@PrintPolyWithDelims\pld@divisor=                 \pld@PrintPolyShadow                 \ifx\pld@remainder\@empty\else                     +{}%                     \setbox\z@=\hbox{$\displaystyle                       \frac{\let\strut\@empty\pld@firsttrue \expandafter                             \pld@PrintRemain\expandafter{\pld@remainder}}%                            {\let\strut\@empty\pld@PrintPoly\pld@divisor}$}%                     \dp\z@=\z@\box\z@                 \fi                 $}%             \fi         \fi     \expandafter\pld@AR@\pld@allines\relax}     \makeatother               \arrayrulecolor{red}     \arrayrulewidth=0.8pt     \def\strut{\rule[-6pt]{0pt}{12pt}}          \begin{document}     \polylongdiv[style=A]{\frac{3}{7}x^9+x^2-\frac{1}{4}}{\frac{9}{5}x^4-1}          \vspace{1cm}     \polylongdiv[style=A]{x^4-1}{x^2-1}     \end{document}      * * *


title: How to insert title in mdframed?

text: How to insert title in mdframed? In my example does not work.               \documentclass{article}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage[framemethod=TikZ]{mdframed}          \begin{document}          \section{mdframed}          \begin{mdframed}[numbers=left,frame=single,framesep=5mm,label=Title]     text          text          text          text          text          text          text     \end{mdframed}          \end{document}      I need \------------title------------ ![enter image description here](http://i.stack.imgur.com/Hbwiw.png) And here tytle vertical position?


title: Dynamic vspace depending on text height

text: I have a fixed layout with some text and **vspace** s and so on.   Sometimes one of the text passages is too long for one line, so it uses two or more lines. Is there any possibility to get the used height of the text and adjust the **vspace**? Here is a little part out of my sty file:               \begin{center}         {\Large\thethema}\\         \vspace{1.6cm}     \end{center}      For one line 1.6 cm is good, but for two lines it is too much and the title page needs two pages. Thanks for any hints.


title: Weird behaviour of \small in list environment

text: I am using `\small` in a list environment in Beamer and facing a problem that the text after closing of `\small` is still small. Following is a minimal working example of the problem:               \documentclass{beamer}     \usetheme{Montpellier}          \begin{document}          \begin{frame}     \frametitle{Weird behaviour of $\setminus$small in the listing env.}      \begin{itemize}     \item This is normal text and \small{this is small text}, and $\setminus$\texttt{small} is closed but this is still small     \item This new item is still small although no \texttt{$\setminus$small} used      \end{itemize}     \end{frame}          \end{document}      The output is as follows: ![enter image description here](http://i.stack.imgur.com/9vREv.png) Appreciate so much if you can show me how to fix this.


title: Have a table-cell spanning entire table with automatic width

text: I'm formatting a table, and I the bottom row has to have the "table notes". I'm not allowed to use the `threeparttable` package (or any other special package). I know I can use something like               \multicolumn{ncols}{p{10cm}}{Contents}      or               \multicolumn{ncols}{p{0.8\textwidth}}{Contents}      but I want the width of this cell to be computed automatically: it should be the width of the table, so something like `\tablewidth` (but that one doesn't exist). Is this possible? If yes, how? Thanks in advance.


title: How to define new command for commands like \frac{} or \int{}^{}?

text: We know that we could define a new command for boldfaced or calligraphic C, for example I can define `\newcommand{\Cx}{\mathbb{C}}`, which will produce the boldfaced C, i.e. `$\mathbb{C}$` for me. But how do I define new command for say more complicated commands, e.g. `\frac{}{}` for getting fractions or say `\int{}^{}` for definite integrals? I tried defining `\newcommand{\fr(,)}{\frac{}{}}`, but it is not working. It seems to me there should be a correct way to define it.


title: Problem with \sum subscript

text: When I use the code below the subscript `j` appears to the side of the sum symbol, not underneath. Has anyone got any idea what I'm doing wrong?               \begin{equation}         \Delta{t}\leq\left[{C_i}\over{{\sum_{j}}{\frac{1}{R_{ij}}}}\right]_{min}         \label{eq:stability_criteria_3}     \end{equation}


title: Index unmatched braces in LaTeX

text: I am trying to make the following work               \documentclass{book}     \usepackage{makeidx}     \makeindex     \begin{document}     \chapter{One}     \section{One}     Let us try to index the characters '()'. \index{()@()} \\     Let us try to index the character '('. \index{(@(} \\     Let us try to index the character ')'. \index{)@)} \\     Let us try to index the characters '{}'. \index{\{\}@\{\}}      Let us try to index the character '{'. \index{\{@\{}      Let us try to index the character '}'. \index{\}@\}}      \backmatter     \printindex     \end{document}      But seems like one cannot escape the characters `{` or `}` in makeidx. The index file generated looks like this               \indexentry{()@()}{1}     \indexentry{(@(}{1}     \indexentry{)@)}{1}     \indexentry{\{\}@\{\}}{1}     \indexentry{\{@\{} Let us try to index the character '}'. \index{\}@\}{1}      What I expected was this -               \indexentry{()@()}{1}     \indexentry{(@(}{1}     \indexentry{)@)}{1}     \indexentry{\{\}@\{\}}{1}     \indexentry{\{@\{}{1}     \indexentry{\}@\}}{1}      How can I escape unmatched `}` and `{` in an index entry. The unmatched `}` and `{` are used as I have a legacy True Type Devanagari font which has special glyphs for these characters.


title: How to make \const{\length{\list}} work without modifying the implementation of \const?

text: `\const` does not work for the current definition. It is defined to easily declared constants in both TeX and PostScript scopes. For example, if I want to define a const `Speed` of a value `300000000`, I can declare it with a single call `\const{Speed}{300000000}` which is known in both PS and TeX scopes. Another example, if I want to create a const `NumberOfElements` in PS and TeX scopes, I can call `\const{NumberOfElements}{\length{\list}}` where `\length` (defined as shown in the MWE) and `\def\list{a,b,c}`. The problem is I have no knowledge **to make`\const{\length{\list}}` work while keeping `\const` works as the original intent**. Here is the MWE.               \documentclass[pstricks,border=12pt]{standalone}          \usepackage{pstricks-add,fp}          % user defined data     \def\listX{1,2,3,4,5,6}     \def\listY{1,2,3}          % to determine the number of elements in a list     \newcounter{x}     \def\length#1{\setcounter{x}{0}\psforeach{\i}{#1}{\stepcounter{x}}\thex}               % to create constants in both TeX and PS scopes     \def\const#1#2{%         \expandafter\FPeval\csname#1\endcsname{#2}%         \pstVerb{/#1 \csname#1\endcsname\space def}%     }                    \const{Nx}{\length{\listX}}     \const{Ny}{\length{\listY}}     \const{CellW}{1}     \const{CellH}{2}               \const{CanvasWidth}{Nx*CellW}     \const{CanvasHeight}{Ny*CellH}               \begin{document}          \begin{pspicture}[showgrid=bottom](\CanvasWidth,\CanvasHeight)         % use other PS constants here     \end{pspicture}          \end{document}      Bonus question: Is there a smarter way to know the number of elements in a list?


title: Syntax error; pgfuseimage

text: > **Possible Duplicate:**   >  Include figure (from macro) with underscore in filename I am trying to make first presentation in LaTeX using **Beamer** environment. In order to include some graphics, I choose **pgf** package since it is automatically loaded with Beamer. I was trying to put a simple picture but my attempt failed. I tried to make it as simple as possible to find out where I am doing the mistake but I did not succeed. I was following this manual: TikZ & PGF Manual for Version 2.10 I am using MikTeX ver 0.4.3. r.857, Beamer from 2012-04-17, Pgf from 2011-11-05. Code:               \documentclass[slidestop,cmpress,mathsefir,red]{beamer}     \usetheme{sidebar}     \usecolortheme{dove}     \setbeamercolor{structure}{green}     \pgfdeclareimage[width=3cm]{Transmitlogo}{transmit_round}     \begin{document}     \section*{Outline}     \frame {         \pgfuseimage{Transmitlogo}         \frametitle{Outline}         \tableofcontents     }     \end{document}      If I comment `\pgfuseimage{Transmitlogo}` everything works OK. Keeping the line I am getting error:               ! Missing $ inserted.     <inserted text>                  $     l.38 }      line 38 is the line with the frame ending `}`. Thanks for any hit.


title: Left-aligned, inline-ish equations

text: I'm attempting to create a template for writing up Physics problems sets. A lot of these problem sets can involve short, simple calculations. For example: ![simple calculation](http://i.imgur.com/eSedBDC.png) I attempt to typeset this calculation with something like               \documentclass{article}     \usepackage{amsmath}     \begin{document}     \begin{enumerate}     \item     \begin{align*}     \omega_{0}&=\sqrt{k_{0}/M}\\     &=\sqrt{5/10}\\     &=\frac{1}{\sqrt{2}}     \end{align*}     \end{enumerate}     \end{document}      But the result ends up looking something like this: ![damn](http://i.imgur.com/xyOLAaH.png) Which looks terrible to me - it's such a short calculation, it looks absurd slapped in the center of the document like that, especially without any text before or after. Alternatively, I can just use the inline equation form,               \documentclass{article}     \begin{document}     \begin{enumerate}     \item     $\omega_{0}=\sqrt{k_{0}/M}$\\     $=\sqrt{5/10}$\\     $=\frac{1}{\sqrt{2}}$     \end{enumerate}     \end{document}      But that yields something like this, which loses the nice formatting of an equation array. ![damn again](http://i.imgur.com/bnITGf4.png) Essentially, what I'm aiming for is a way to typeset the equation as though it were just inline text (i.e. with the $\omega_{0}$ coming directly after the 1., as in the inline form), but preserving the alignment and formatting of an equation array. The closest I've gotten was with the `fleqn` option and a negative `\vspace` to put it on the same line, but even that didn't look right, as `fleqn` just makes the equation _more_ leftward, but doesn't actually align it with the margin of the text.


title: Long Division of Polynomials in LyX

text: I look here for a way to show a long division of polynomials, and I read here about `polynom.sty`, but my question is if there is a way that I can write the whole division and not just give two polynomials as input. i.e. I'm looking for a way to **write** a long division of polynomials. If you have any suggestions I'd like to read!! P.S. I'm using LyX.


title: Section headings overflow gutter

text: ![Overflowing gutter](http://i.stack.imgur.com/uaOCo.png) How can I prevent the title from overflowing the gutter? It seems to only overflow by the amount of space introduced by the numbered part of the title. We are using this style: http://www.acm.org/sigs/publications/acm_proc_article-sp.cls Using the cls referenced above, the example below will produce the issue. (thanks to @Werner for requesting an example).                  \documentclass{acm_proc_article-sp}             \begin{document}                  \section{Introduction with many more computational and other words}        The \textit{proceedings} are the records of a conference. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.             Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.             Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.             Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.        \balancecolumns        % That's all folks!        \end{document}


title: How to use achemso bibliography style without achemso package?

text: I tried to use the `achemso` bibliography style for a document which is not an article I want to submit to a journal. Thus I do not use the `achemso` class neither the `achemso` package. It works but references are not numbered. How can I change this or does it exist a standard bib style which looks like `achemso`?


title: Biblatex: Multiple citation numbers all within same bracket with tthe ieee style

text: I'm using the `ieee` style for `biblatex` and when inserting citations I want > [1,2,6-10] Right now I'm getting > [1],[2],[6-10]. How can I change this?


title: How to create numbering order of exercises with sub-numbering of questions

text: How to number exercises by using this order: > 1.1 2.1 3.1 .....   >  and for any of them a,b,c For example : **Exercise 1.1 (question a)**


title: tikz extending spring with constant number of segments

text: Is there as simple way to create a pdf animation with tikz of an oscillating mass attached to a spring which extends and compresses as the mass oscillates. The number of "spring elements" should be constant during the oscillation. I came up with this pretty solution so far. However, I do not quite understand how to chose the right units for the segment length parameter:               \documentclass[tikz]{standalone}     \usepackage{tikz}     \usetikzlibrary{shadings, calc, decorations.pathmorphing}          \begin{document}          \def\frames{50}     \def\amplitude{1.5}     \def\z0{3.0}     \def\nloops{5.0}          \foreach \n in {0, 1, ..., \frames}     {         \begin{tikzpicture}[x=1cm, y=1cm]              % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%         % calculations         % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%         \pgfmathsetmacro{\height}{\amplitude * cos(2.0 * pi * \n / \frames r) - \z0};         \pgfmathsetmacro{\seglength}{(-\amplitude * cos(2.0 * pi * \n / \frames r) + 3.0) / \nloops * 1cm};                   % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%         % help lines         % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%         \draw[color=white,fill=white] (-1.70, 0.4) rectangle (2.00, -6.0);                   % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%         % the scene         % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%              % the ceiling            \draw[color=black!70, line width=2.0pt, line cap=round] (-1.70, 0) -- (1.70, 0);         \foreach \x in {-1.60, -1.20, ..., 2.0}         {             \draw[color=black!70, line width=1.00pt, line cap=round] (\x, 0) -- ++ (0.35, 0.4);         }         \draw[color=black!70, line width=2.00pt, line cap=round] (-0.5, 0) -- +(0.0, -0.2);         \draw[color=black!70, line width=2.00pt, line cap=round] (+0.5, 0) -- +(0.0, -0.2);                   % the mass         \draw[ball color=orange!90!black!70, rounded corners=1ex] (-1.0, \height) rectangle +(2.0, -0.75);         \draw[color=black!70, line width=2.00pt, line cap=round] (-0.5, \height) -- +(0.0, 0.2);         \draw[color=black!70, line width=2.00pt, line cap=round] (+0.5, \height) -- +(0.0, 0.2);              % the spring         \draw[decorate, color=red!70, line width=2.00pt, line cap=round, decoration={coil, amplitude=0.25cm, segment length=\seglength}] ($(-0.5, \height) + (0, 0.2)$) -- (-0.5, -0.2);              \end{tikzpicture}     }     \end{document}      To the spring should have a minimum extension of 1.5 cm and a maximum extension of 4.5 cm. Here is an image of the spring at minimum extension: ![enter image description here](http://i.stack.imgur.com/97Mt1.png) Can someone point me into the right direction?


title: How to get Tufte-like margins with the KOMA book class?

text: I asked similar question here How to have headers, section headings, and figures expand into the margin? From Document class for designing a book I want to have new insight...               \documentclass[12pt,parskip=half, DIV=calc, BCOR=10mm, x11names]{scrbook}     \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{lmodern, libertine}     \usepackage{amsmath, xcolor, tcolorbox, empheq}     \usepackage[ilines, headsepline]{scrpage2}     \setheadwidth[0pt]{textwithmarginpar}      gives page number in margin. Is there any KOMA option to make the figure to use margine space. I want to center the figure using length "textwidth+marginewidth". Can i use something similar to code below for entire document only for text and equations (Not for tables and figures)               \begin{addmargin}[4em]{0em}     text       \end{addmargin}


title: Align split equation to the margins

text: How to align a two-lined equation such that the first line left aligns with the surrounding text and the second line right aligns with the surrounding text? Example (where the pipes denote the left and right edge of the surrounding text):               |                       |     P(x) =         a + b + c + d + e + f     |                       |      I fiddled around with `flalign`, `multline`, and `multlined`, but did not get it working the way I want. Prepending a `\vphantom` to the second line allows me to right-align the second line of the equation. Appending a `\vphantom` to the first line does not left-align the first line (the `\vphantom` continues to run in the right margin).


title: Is there a way to add a timer to a Beamer presentation?

text: I have seen presentations in Power Point which contain a timer. Can this be done in Beamer using a simple command, or maybe a package? If not a timer, is it possible to at least get a clock on your slides?


title: Timer in beamer footline

text: > **Possible Duplicate:**   >  Is there a way to add a timer to a Beamer presentation? Is there a way to add a timer at the footline of a `beamer` presentation that will tell us how long the presentation has been going on?


title: How to move subscripts to the right and text to the left

text: I have               \[     \sum_{\substack{m \in [1,\dots,n] \\ b \in \{0,1\}}}     P[y_{i_\ell}= z_{i_\ell}\mid xxx]     \]      For space reasons I need to move the subscripts so that they are flush left with the summation sign and then move $P$ to the left so that it directly follows the summation sign and so is above the subscripts. How can you do this?


title: easybmat matrices dotted lines

text: I use the `easybmat` package to typeset some block matrices as follows, where the rows are separated by dotted lines. For some reason, the dotted lines don't always come out right. For example the following MWE:               \documentclass{standalone}     \usepackage{easybmat}     \begin{document}     $\left[     \begin{BMAT}(@){c}{c.c}     A \\ B     \end{BMAT}\right]$     \end{document}      renders as: ![enter image description here](http://i.stack.imgur.com/j231U.png) Notice the extra long right-most dot? The unequal-sized dots are pdf viewer artifacts that may be ignored, but the right-most "dot" really looks ugly in print. Does anyone here know how to fix this?


title: Using multiple bibliography files

text: Related to my previous question about Latex and Thai language, now I have another one: How can I use multiple bibliography files in my document?               \bibliography{sample,ref,etc}      It did not work. I have no idea what's wrong. Now, no need to think of Thai language. I translate name of books and etc. from Thai to Eng already.


title: Bibliographies as a numbered sections in each chapter

text: Related to my previous question about **Latex and Thai language** , now I have another one: How to make bibliography as a section in each chapter **(at the last section of each chapter, such as section “1.10 References”)** **Can we make it as a section in each chapter, such as 2.15 References for Chapter 2, and 15.18 References for Chapter 15?** Now, no need to think of Thai language. I translate name of books and etc. from Thai to Eng already.


title: How can I use \psgraph with polar axes?

text: ## With `pspicture`               \documentclass[pstricks,border=12pt]{standalone}     \usepackage{pst-plot}     \psset{axesstyle=polar,plotpoints=100}     \begin{document}     \begin{pspicture}(-4,-4)(4,4)         \psaxes[axesstyle=polar,linecolor=gray](3,360)         \psplot[algebraic,polarplot,linecolor=red]{0}{TwoPi}{sin(3*x)+2}     \end{pspicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/qSl1C.png) ## With `psgraph`               \documentclass[pstricks,border=12pt]{standalone}     \usepackage{pst-plot}     \psset{axesstyle=polar,plotpoints=100}     \begin{document}     \begin{psgraph}[linecolor=gray](3,360){4cm}{4cm}         \psplot[algebraic,polarplot,linecolor=red]{0}{TwoPi}{sin(3*x)+2}     \end{psgraph}     \end{document}      ![enter image description here](http://i.stack.imgur.com/Ke0qF.png) How can I use `psgraph` with polar axes?


title: Iterate with `\foreach` over multiple variables and '\remember' one of them does not work as expected

text: I'm not so new to TikZ but am now trying something a little more advanced and am puzzled by the following problem. From researching solutions, I see that lots of good answers with good explanations are found on this site! I'd like to iterate with `\foreach` over multiple variables simultaneously and `\remember` one of them to position nodes next to each other. It doesn't work as I had expected, so I narrowed it down to how the list of values is presented to `\foreach` \-- it works for 1 variable if I give a range definition with `...` and only 1 item at the beginning and end of list (1st case below). However, it doesn't work if I spell the list items out (2nd case below). I think I need to spell out the list items as I actually want to combine more than one variable to specify different shapes etc. of each node (see 3rd case below). Here is my MWE:               \documentclass{minimal}     \usepackage{tikz}     \usetikzlibrary{positioning}     \begin{document}            all rectangles next to each other:            \begin{tikzpicture}[every node/.style={draw}]         \node (A) [rectangle] {};         \foreach \x [remember=\x as \lastx (initially A)] in {B,...,E} {           \node (\x) [rectangle,right=of \lastx] {};         }       \end{tikzpicture}            2nd and further rectangles on top of each other:            \begin{tikzpicture}[every node/.style={draw}]         \node (A) [rectangle] {};         \foreach \x [remember=\x as \lastx (initially A)] in {B,C,D,E} {           \node (\x) [rectangle,right=of \lastx] {};         }       \end{tikzpicture}            goal: iterate over 2 variables at the same time:            \begin{tikzpicture}[every node/.style={draw}]         \node (A) [rectangle] {};         \foreach \x/\y [remember=\x as \lastx (initially A)] in {B/circle,C/rectangle,D/circle,E/rectangle} {           \node (\x) [\y,right=of \lastx] {};         }       \end{tikzpicture}          \end{document}      ![](http://i.stack.imgur.com/l0hIO.png) There is a related question (related question) but the solution uses 2 nested `\foreach` loops, where you can, of course, use the `...` notation. However, I don't think I can use the `...` notation in my case. I'm using PGF/TikZ 2.10 (MacTeX 2011).


title: How to add vertical space struts after hline?

text: I know the table trick of adding "struts" in the first line after and the last line before a `\hline`. I use it throughout my document, and it looks good that way. However, now I am working within a `longtable` / `supertabular` environment. If a page break is reached, these environments add a running head, which in my case ends with a `\hline`. Now I've got a problem. While the `longtable` / `supertabular` environment knows where a page break happens, and adds the new header, _I_ don't know that. I cannot add the "above" strut at the appropriate place. The only option that I see is adding a "below" strut to the head's `\hline`. But I don't know how to do that...?!?


title: Ifthenelse variable equality

text: Last week I made simple coordinate transformation in order to define `\tdplotsetcoord` in Cartesian coord. system. My work and support of exp. user can be viewed in this topic. The code looks as follows:               \def\Sx{0} \def\Sy{0} \def\Sz{-3}     \tdplotsetcoord{S}{sqrt((\Sx)^(2) + (\Sy)^(2) + (\Sz)^(2))}{acos(\Sz/(sqrt((\Sx)^(2) + (\Sy)^(2) + (\Sz)^(2))))}{ifthenelse(\Sy<0,-acos(\Sx/(sqrt((\Sx)^(2) + (\Sy)^(2)))),acos(\Sx/(sqrt((\Sx)^(2) + (\Sy)^(2)))))} % {radius}{polar}{asimuth}      However there is a problem with `(0,0,z)` Cartesian coordinates due to `zero` division in those math expressions. Also I'm trying to define transformation from zero C. coordinates manually using `ifthenelse` command: **1)** Why `variable = 0` doesn't work? I'm getting `PGF Math Error: Unknown operator '=' or '=0'`. This is the example of `polar angle` transformation:               \pgfmathsetmacro\polar{ifthenelse(\Sx=0 \AND \Sy=0 \AND \Sz=0,0,acos(\Sz/(sqrt(\Sx^(2) + \Sy^(2) + \Sz^(2)))))}      **2)** I failed also with `\equal` command getting bunch of errors (log file). Can you show me the correct syntax? Thanks.               \pgfmathsetmacro\polar{ifthenelse(\equal{\Sx}{0} \AND \equal{\Sy}{0} \AND \equal{\Sz}{0},0,acos(\Sz/(sqrt(\Sx^(2) + \Sy^(2) + \Sz^(2)))))}      Edit: Working example does not differ from previous topic.   **MWE:**                   \documentclass[a4paper,fleqn,leqno]{article}         \usepackage{tikz,tikz-3dplot}         \usetikzlibrary{arrows.meta,decorations.markings}         \begin{document}         \begin{tikzpicture}[cm={-1,-1,1,0,(0,0)},x=3.85mm,z=-1cm]         \draw[-{Classical TikZ Rightarrow[scale=1.2]},thick] (-2,0,0) -- (5,0,0) node[anchor=north,xshift=-3pt] {$x$};         \draw[-{Classical TikZ Rightarrow[scale=1.2]},thick] (0,-2,0) -- (0,5,0) node[anchor=west] {$y$};         \draw[-{Classical TikZ Rightarrow[scale=1.2]},thick] (0,0,-2) -- (0,0,5) node[anchor=south] {$z$};         \def\Sx{0} \def\Sy{0} \def\Sz{-3}          % code without dealing with zero division         \tdplotsetcoord{S}{sqrt((\Sx)^(2) + (\Sy)^(2) + (\Sz)^(2))}{acos(\Sz/(sqrt((\Sx)^(2) + (\Sy)^(2) + (\Sz)^(2))))}{ifthenelse(\Sy<0,-acos(\Sx/(sqrt((\Sx)^(2) + (\Sy)^(2)))),acos(\Sx/(sqrt((\Sx)^(2) + (\Sy)^(2)))))}          % code implementing zero coordinations definition         \pgfmathsetmacro\polar{ifthenelse(\Sx=0 \AND \Sy=0 \AND \Sz=0,0,acos(\Sz/(sqrt(\Sx^(2) + \Sy^(2) + \Sz^(2)))))}     % plus asimuth angle zero definition...         \tdplotsetcoord{S}{sqrt((\Sx)^(2) + (\Sy)^(2) + (\Sz)^(2))}{\polar}{...}              \draw[-{Stealth[scale=1.5,width=3pt]},color=red,thick] (0,0,0) -- (S) node[midway,anchor=east,font=\footnotesize] {${\vec{r}}_{1}$};         \draw[dashed,color=red!70!white,semithick] (0,0,0) -- (Sxy);         \draw[dashed,color=red!70!white,semithick] (Sxy) -- (S);         \end{tikzpicture}         \end{document}