title: Vertical alignment in table: m-column, row size - problem in last column

text: Unfortunatly, I have a problem with **m-columns** (`array` package) in tables with **adjusted row height**. Somehow in the **last column** (only there) the text is **not centered** vertically. Check it out: ![enter image description here](http://i.stack.imgur.com/PVN6x.png)               \documentclass{article}     \usepackage{array}          \begin{document}          \begin{tabular}{|m{0.18cm}|m{0.18cm}|m{0.18cm}|}     \hline     a & b & c  \\[2ex]     \hline     0 & 0 & 0  \\     \hline     \end{tabular}          \end{document}


title: Why is the second column of my tabu not vertically aligned to the middle?

text: I'm trying to create a SWOT (strengths, weaknesses, opportunities, threats) table, which is a basic 4x2 table. The cells that aren't part of the header will contain itemized text. All cells have to be vertically and horizontally aligned to the center. I've managed to get it nearly working, as such:               \begin{tabu}{|X[c,m]|X[c,m]|}     \tabucline-      \rowfont{\bfseries} \cellcolor[HTML]{009925} STRENGTHS & \cellcolor[HTML]{D50F25} WEAKNESSES \\[5pt]     \tabucline-      \begin{itemize}         \item Hello         \item This is an item         \item This is another item     \end{itemize}      &     \begin{itemize}         \item Hello         \item This is an item         \item This is another item     \end{itemize} \\     \tabucline-      \rowfont{\bfseries} \cellcolor[HTML]{3369E8} OPPORTUNITIES & \cellcolor[HTML]{EEB211} THREATS \\[5pt]      \tabucline-      \begin{itemize}         \item Hello         \item This is an item         \item This is another item     \end{itemize}      &     \begin{itemize}         \item Hello         \item This is an item         \item This is another item     \end{itemize} \\      \tabucline-      \end{tabu}      This outputs the following table: ![LaTeX output](http://i.stack.imgur.com/yanHA.png) The headers of the second column are not vertically aligned (like with the first). However, the itemize of the second column are vertically aligned, which leads me to think I've made a small mistake. However, I can't manage to figure out what the issue is. Please help.


title: LaTeX, formatting entries in tables

text: I've seen plenty of problems with making tables in LaTeX formatted the way the programmer would prefer. And some of those have helped me fix my own doument to the point I am not at I am creating a "bingo" document. It's 4x4 table. Each entry contains a number in the center. Each "slot" is a square. I have two issues. When I run the code (see below), the numbers in the right-most column aren't centered. They are at the top of the "slot" centered horizontally relative to the "slot". I've tried many different things to get these entries where they need to be.... but I'm not sure what to do now. The other thing I would like is to change the font size of the numbers to make them larger.               \begin{table}[ht]     \begin{center}     \begin{tabular}{| >{\centering\arraybackslash}m{3.5cm} | >{\centering\arraybackslash}m{3.5cm} |  >{\centering\arraybackslash}m{3.5cm} | >{\centering\arraybackslash}m{3.5cm} |}     \hline\hline     \Huge {\bf 12} & \Huge {\bf 0} & \Huge {\bf 9} & \Huge {\bf 19} \\[3.5cm]     \hline     \Huge {\bf 15} & \Huge {\bf 4} & \Huge {\bf 2} & \Huge {\bf 3} \\[3.5cm]     \hline     \Huge {\bf 5} & \Huge {\bf 17} & \Huge {\bf 7} & \Huge {\bf 11} \\[3.5cm]     \hline     \Huge {\bf 16} & \Huge {\bf 18} & \Huge {\bf 8} & \Huge {\bf 14} \\[3.5cm]     \hline     \hline     \end{tabular}     \end{center}     \end{table}      I would like to stay as simple as I can with the code. Do you know how to fix this?


title: How to define a hotkey in LyX to insert an inline listings?

text: In LyX, I can define a hot-key for listing-insert. But in this case, what appears is the `\begin{lstlisting}...\end{lstlisting}` environment. In fact I want to insert a inline listings command `\lstinline{...}`. There is no predefined lyx command for insert an inline listings. How can I do this?


title: Underline different authors in the bibliography by hacking BST file

text: I am updating my CV (`moderncv`) and I am including a list of all my communications (oral and poster) using multibib (I use different `.bib` files for each one). The final output should display my name in bold and the presenting author underlined. So far I have figured out how to do the first bit but have not find solution for the last part. Because the presenting author is not always the same person I was thinking in using the "comment field" to tell BibTeX/LaTex who I want to underline in that specific entry. Because I do not have enough skills to do that I wonder if anyone can give me a help. EDITED I am using a .bst file.


title: TikZ: [baseline] interferes with blur shadow on background layer

text: Using `[baseline]` on a `tikzpicture` with a background layer seems to interfere with the placement of a blur shadow: ![enter image description here](http://i.stack.imgur.com/iXfay.png) MWE (for use with `pdflatex`):               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{shadows.blur}     \usepackage[T1]{fontenc}     \pgfdeclarelayer{background}     \pgfsetlayers{background,main}     \begin{document}          \begin{tikzpicture}[baseline]     \node[text width=0.4\textwidth,inner xsep=4mm,inner ysep=2mm] (A){TEXT};        \begin{pgfonlayer}{background}        \path[draw=black!30, blur shadow, fill=gray!10]           (A.south east) -- (A.south west) -- (A.north west)  -- (A.north east) -- cycle ;%        \end{pgfonlayer}     \end{tikzpicture}          \end{document}      Deleting the `[baseline]` makes everything work fine, as does substituting `drop shadow` for `blur shadow`.


title: tikz: Anchoring to rectangle split?

text: Is there an easy way I can anchor to the center of the second part of a rectangle split node? Here is what I am currently working on:               \documentclass[letterpaper,oneside]{report}     \usepackage{tikz}     \usetikzlibrary{shapes,shapes.multipart}     \begin{document}     \begin{tikzpicture}[node distance=5mm,>=stealth',auto]         \tikzstyle{bucket}=      [rectangle,draw=black!50,fill=black!20,                                   minimum size=5mm,inner sep=0mm]         \tikzstyle{listitem}=    [rectangle split,rectangle split horizontal,                                   rectangle split parts=2,                                   draw=black!50,fill=black!20,                                   inner sep=0mm,text width=5mm,                                   minimum height=4mm,rectangle split part align=center,                                   rectangle split empty part width=2mm]         \tikzstyle{every label}= [font=\footnotesize]                \node[bucket] (B0) [label=above:$B$,label=left:0] {};             \draw (B0.south west) -- (B0.north east);         \node[bucket] (B1) [below of=B0,label=left:1] {};         \node[listitem] (B1') [right of=B1,node distance=1.5cm] {.13 \nodepart{two}}             edge [<-] (B1.center);         \node[listitem](B1'') [right of=B1',node distance=1.5cm] {.16 \nodepart{two}}             edge [<-] (B1'.two);             \draw (B1''.two split south) -- (B1''.north east);     \end{tikzpicture}     \end{document}       Here is what I end up with: (well, I have an image, but can't post it here...) I would like the arrow from B1' to B1'' to start at "B1'.two center", but that anchor does not exist? How can I define it, or at least how can I use what it would be as the start point of my arrow? (See the arrow from B1 to B1' for how I want it to look). Thanks everyone for the help!


title: pgfplots need help with complicated stacked bar chart using selected rows from data table

text: I'm trying to recreate this bar chart from the data table found in the MWE below. ![example chart](http://i.stack.imgur.com/rkTTp.png) It involves doing a couple things that I can't figure out:   1. stack positive and negative bars on the same axis, such that the negative numbers don't merely subtract from the positive ones (this is the default behavior of `xbar stacked`)   2. selecting only certain rows from the table. For the blue bars I need only rows 1-3 (counting the column headers as row 0). For the red bars I need two instances of row 4 and one of row 5.   3. creating the lines that show the values from the SUM columns and creating data labels.   4. creating a legend using the column headers of columns 2 and 3 (even though column 3 contains no real data).   5. reverse the ordering of the items on the y axis. Notice that the categories in the MWE count down from top to bottom; I'd like the opposite. You'll see where I've got so far by looking at the MWE. As for the rest, I'm rather baffled. I need to automate this process and this is the format the data comes in (so reformatting the underlying data table is a suboptimal solution). MWE:               \documentclass{article}          \usepackage{pgfplots}     \usepackage{filecontents}          \begin{document}          \begin{filecontents}{data.dat}     category,value,negvalue     cat1,3,0     cat2,5,0     cat3,1,0     cat1and2n,-6,0     cat3n,-3,0     cat1sum,-3,0     cat2sum,-1,0     cat3sum,-2,0     \end{filecontents}          \pgfplotstableset{col sep=comma}     \pgfplotstableread{data.dat}\datatable          \begin{tikzpicture}     \begin{axis}[     xbar,     yticklabels from table={\datatable}{category},     ytick=data]          \addplot table[     y expr=\coordindex,     x=value]     {data.dat};     \end{axis}     \end{tikzpicture}          \end{document}      I appreciate any help!


title: How to type specifically on this part of the page?

text: I want to type my name in block capitals and in italics in the space highlighted in the blackbox, but I can't seem to be able to. Everything else is fine with the cover letter, I just need to type my name in the space where I have highlighted with the black box in the picture below. My latex code is here:               % Cover letter using letter.sty     \documentclass{letter} % Uses 10pt     %Use \documentstyle[newcent]{letter} for New Century Schoolbook postscript font     % the following commands control the margins:     \topmargin=-1in    % Make letterhead start about 1 inch from top of page      \textheight=8in  % text height can be bigger for a longer letter     \oddsidemargin=0pt % leftmargin is 1 inch     \textwidth=6.5in   % textwidth of 6.5in leaves 1 inch for right margin          \begin{document}          \signature{Susan R. Bumpershoot}           % name for signature      \longindentation=0pt                       % needed to get closing flush left     \let\raggedleft\raggedright                % needed to get date flush left               \begin{letter}{Ms. Terri Roberts \\     Senior Staff Recruiter \\     XYZ Corporation \\     Rt. 56 \\     Anytown, New Jersey 05867}               \begin{flushleft}     {\large\bf Susan R. Bumpershoot}     \end{flushleft}     \medskip\hrule height 1pt     \begin{flushright}     \hfill 1985 Storm Lane, Troy, NY 12180 \\     \hfill (518) 273-0014 or (518) 272-6666      \end{flushright}      \vfill % forces letterhead to top of page               \opening{Dear Ms. Roberts:}           \noindent PARAGRAPH ONE: State reason for letter, name the position or type      of work you are applying for and identify source from  which  you      learned   of   the  opening.  (i.e.  Career  Development  Center,      newspaper, employment service, personal contact).           \noindent PARAGRAPH  TWO:  Indicate why you are interested in the position,      the company, its products, services - above all, stress what  you      can  do  for  the employer. If you are a recent graduate, explain      how your academic background makes you a qualified candidate  for      the  position.  If  you have practical work experience, point out      specific achievements or unique qualifications. Try not to repeat      the  same  information  the reader will find in the resume. Refer      the reader to the enclosed resume or application which summarizes      your  qualifications,  training,  and experiences. The purpose of      this section is to strengthen your resume  by  providing  details      which bring your experiences to life.           \noindent PARAGRAPH THREE: Request a personal interview and  indicate  your      flexibility as to the time and place. Repeat your phone number in      the letter and offer assistance to help in a speedy response. For      example,  state that you will be in the city where the company is      located on a certain date and would like to set up an  interview.      Or,  state  that  you  will  call  on a certain date to set up an      interview. End the letter by thanking  the  employer  for  taking      time to consider your credentials.           \closing{Sincerely yours,}                     \encl{}                 % Enclosures          \end{letter}               \end{document}      ![enter image description here](http://i.stack.imgur.com/6fGo8.jpg)


title: Wrapfigure-Minipage Woes: How do I correctly typeset wrapped text boxes within a \parcolumns environment modified for a two-sided document?

text: This is a follow-up question concerning an experimental chapter layout I'm trying to implement for a novel I'm writing. So. My initial problem of finding a way to modify the innards of the parcolumns package so that it alternates the order of the columns with each page break (producing a layout with outer/inner columns instead of left/right ones) has been solved, with many thanks to alexurba. **However:** in implementing the working modification of the `\pc@placeboxes` macro, whenever the page breaks switch from odd to even, the placement of the minipages inside wrapfigure environments intended to be placed along the inner margin of the outer column cause problems for the inner column. I'll let the code and images below speak for themselves:               \documentclass[11pt,letterpage,twosides]{bookest}     %        \geometry{textheight=9in,vmarginratio=1:1,outermargin=1.5in,innermargin=.5in,%     marginparwidth=1.35in,marginparsep=.1in}     \usepackage{parcolumns}     \usepackage{marginnote}     \usepackage{wrapfig}     \usepackage{lipsum}     \usepackage{changepage}     \strictpagecheck     %      \newcommand{\warfe}{\begin{wrapfigure}{o}[.15in]{1.5in} \begin{minipage}[t]{1.4in} %     \noindent \Large}     \newcommand{\warfo}{\begin{wrapfigure}{i}{1.5in} \begin{minipage}[t]{1.45in} %     \noindent \Large}     \newcommand{\wraf}{\end{minipage} \vspace{-.28in} \end{wrapfigure}}     \newcommand{\stm}{\marginnote}     %     \makeatletter     %     \def\pc@placeboxes{%       \global\let\@tempa\relax%       \hb@xt@\linewidth{%         \vfuzz30ex %         \vbadness\@M%         \splittopskip\z@skip%         \checkoddpage\ifoddpage           \count@\z@%           \loop\ifnum\count@<\pc@columncount%             \advance\count@\@ne%             \my@placeboxes@body%           \repeat%         \else           \count@\pc@columncount%           \loop\ifnum\count@>\z@%             \my@placeboxes@body%             \advance\count@\m@ne%           \repeat%         \fi       }%       \@tempa%     }     %     \def\my@placeboxes@body{%       \expandafter\ifvoid\csname pc@column@\number\count@\endcsname%         \hskip\csname pc@column@width@\number\count@\endcsname%       \else%         \expandafter\setbox\expandafter\@tempboxa%           \expandafter\vsplit\csname pc@column@\number\count@\endcsname%             to \dp\strutbox%         \vbox{\unvbox\@tempboxa}%       \fi%       \expandafter\ifvoid\csname pc@column@\number\count@\endcsname%       \else%         \global\let\@tempa\pc@placeboxes%       \fi%       \ifnum\count@>\z@%         \strut%         \hfill%         \ifpc@rulebetween%           \vrule%           \hfill%         \fi%       \fi%     }     %     \makeatother     %     \begin{document}     %     %\chapter{Sample Experimental Chapter Layout}     %[Code and JPEGs ommitted.]     %     \chapter{My Wrapfigure-Minipage Woes}     %     \begin{parcolumns} %     [sloppy=true, %     sloppyspaces=true, %     nofirstindent=true, %     colwidths={1=3.5in, %     2=2.8in}]{2}     %     \colchunk[1]{\Large \indent \stm{\normalsize \textbf{Sample margin note, always to be on %      the outer margin. \\ ---------- \\ The typesetting of this page is entirely correct, with %     no wrapfigure/minipage environments flying around as in the following page...}} \lipsum[10]%     \lipsum[11] \lipsum[12] \stm{\textbf{\normalsize As one can see quite clearly, the %     typesetting of this page with switched columns is troubled, to put it lightly. \\ %     ---------- \\ While the wrapfigure-minipage boxes themselves are placed correctly, another%     phantom empty box (of the same width) is inserted, flush with the edge of the page at the %     inner margin, pushing the text of the larger column over into the box set in the smaller %     column. \\ ---------- \\ What gives, friends?\\}} \lipsum[13] \lipsum[14]}     %     \colchunk[2]{\small \indent \warfo{Sample  wrapped text box, using a minipage inside a %     wrapfig environment.} \wraf \lipsum[14] \warfo{Note: no problems on the odd pages...} \wraf%     \lipsum[15] \warfe{Another sample wrapped text box, placed along the inner side of the \\ %     column.} \wraf \lipsum[16]  \warfe{Yet another text box.}\wraf \lipsum[17]}     %     \end{parcolumns}     %     \end{document}      ![Example, p.1](http://i.stack.imgur.com/ofKjp.jpg) ![Example, p.2](http://i.stack.imgur.com/bdr5j.jpg) I'll be taking a closer look at the implementation sections of the package documentation for wrapfig and parcolumns, reading against the modification of `\pc@placeboxes` to see if I can make any sense of what exactly might be going on here. I'll update this if I get anywhere near the realm of progress. **UPDATE:** In tinkering around with my code, I've discovered that if I use the `{i}` placement specifier for the wrapfigures on the even pages instead of `{o}`, this problem vanishes, and all is well except that the wrapfigures are on the wrong side of the column on the even pages. Thus, this problem seems to be specific to the wrapfigure not having any wrapped text between it and the adjacent column (or something to that effect, relating to having nothing but the space between columns separating the wrapfigures from the inner column). **Given this development,** I'm now wondering about these two possibilities: **a)** Might be possible to issue a series of commands to move the problemed wrapfigures to the right and have the adjacent wrapping text in the column move to the left after the initial typesetting run in which `parcolumns` first places the columns and boxes on the page? **b)** Looking at the documentation for `parcolumns` has reminded me that there's plenty that the package does after the `\pc@placeboxes` process (i.e., `\pc@alloccolumns`, `\pc@setcolumnwidths`, `\pc@setsinglecolwidth`, and `\pc@setcolumnwidth`, as described on pp. 11-13 of the `parcolumns` documentation). In the (likely) event that the solution wouldn't necessarily have anything to do with setting the wrapfigures on the wrong side of the column (on even pages) and then flipping the positions of the text wrapping around the wrapfigures with that of the wrapfigure-minipage boxes themselves, perhaps the answer lies within the code for one of these post-`\pc@placeboxes` macros? Also (for reference, if anyone needs it): alexurba has updated the answer to my original question with a more detailed explanation of how the `\pc@placeboxes` modification works, so check that out as well if you like.


title: Problem with sorting of umlaute in a glossary (pkg glossaries)

text: I'm currently facing a problem concerning sorting of glossaries. I'm writing my thesis in german, so I also have some umlaute like "ä","ö" and "ü" in my acronyms. For example there is an acronym "ÖGD". Now the problem is that the sorting of acronyms doesn't work as expected. The acronyms with the umlaute are at the top of the list. Normally the "Ö" for example should be after the "O". The following MWE illustrates the problem. I know that there is a parameter -g or -s when using `makeindex`. The problem is that the glossaries package comes with a `makeglossaries`-perl script. I don't want to touch the perl-script. So, is there another possibility to get my glossary and acronyms-list sorted right?               \documentclass[a4paper,12pt,ngerman]{scrreprt}          \usepackage[ngerman]{babel}     \usepackage[utf8]{inputenc}     \usepackage{caption}     \usepackage{bibgerm}     \usepackage[ngerman=ngerman-x-latest]{hyphsubst}          \usepackage[style=longheader,toc,acronym,nonumberlist]{glossaries}          \makeglossaries                   \begin{document}               \newacronym{B2B}{B2B}{Business to Business}      \newacronym{oegd}{\"OGD}{\"offentlicher Gesundheitsdienst}      \newacronym{HL7}{HL7}{Health Level Seven}          \glsaddall          \printglossary[type=\acronymtype]          \end{document}      Currently the acronyms-list is sorted like this:   * ÖGD   * B2B   * HL7


title: Ghostscript error: ERROR -15 closing pdfwrite device

text: Consider the folllowing example:               \documentclass{article}          \usepackage[utf8]{inputenc}     \usepackage{hyperref}          \newif\ifprint     %\printfalse     \printtrue          \makeatletter     \@ifpackageloaded{hyperref}{       \ifprint         \hypersetup{           pdfauthor={Søhest},           pdfsubject={Eksamenssæt}         }       \else         \hypersetup{           pdfauthor={Søhest},           pdfsubject={Eksamenssæt}         }       \fi     }{}     \makeatother          \begin{document}     Test     \end{document}      Note: Of course the code in the example is rather pointless since there is no difference between `\printfalse` and `\printtrue` but I have stripped the code as much a possible (I think). I compile using `latex` --> `dvips` --> `ps2pdf` and get the following error:               GPL Ghostscript 9.07: ERROR -15 closing pdfwrite device. See gs/psi/ierrors.h for code explanation.      I can't figure out how to fix this problem (and a search hasn't given me anything useful). P.S. I upgraded my system from Fedora 18 to 19 yesterday and the problem started occuring thereafter.


title: How to draw straight lines between nodes in commutative diagram without using TikZ matrix library?

text: I want to draw a commutative diagram with `TikZ` as follows:               \usepackage{tikz}     \usetikzlibrary{positioning}          \begin{tikzpicture}[auto]     \node (S1) {$\sigmaSet \cap X_N$};     \node (S2) [below= 2cm and 4cm of S1] {$\sigmaSet \cap X_N$};     \node (S3) [below= 2cm and 4cm of S2] {$\discreteSigmaSet$};     \node (U1) [right= 2cm and 4cm of S1] {$\potentialSpace$};     \node (U2) [below= 2cm and 4cm of U1] {$Y_M$};     \node (U3) [below= 2cm and 4cm of U2] {$\R^M$};     \draw[->] (S1) to node {$F_f$} (U1);     \draw[->] (S2) to node {$\widetilde{F}_f$} (U2);     \draw[->] (S3) to node {$\widehat{F}_f$} (U3);     \draw[->] (S1) to node [swap] {$I$} (S2);     \draw[->] (S2) to node [swap] {$\theta_{B_N}$} (S3);     \draw[->] (U1) to node {$P^{\psprod{E}{\cdot}{\cdot}}_{Y_M}$} (U2);     \draw[->] (U2) to node {$\theta_{C_M}$} (U3);     \end{tikzpicture}      which looks like this: ![enter image description here](http://i.stack.imgur.com/BBCMp.jpg) Note how the horizontal arrows are not straight, but end too high on the right side. Now my question is how I can make TikZ draw the horizontal arrows as straight lines. Is there a way to accomplish this without having to use the matrix library? I want to keep the code above as simple as possible.


title: \varepsilon vs. \epsilon

text: I cannot remember anyone writing the letter epsilon in any other way than `\varepsilon` in any math class; but in LaTeX `\epsilon` and `\varepsilon` are different symbols. Do anyone of you know why there are two different symbols? (I.e. if `\epsilon` is the correct way to write the letter epsilon, why aren't mathematicians use it, and when is, according to the standards today, the correct setting to use each of the symbols?)


title: Sweave outputs gibberish

text: I have this .Rnw file:               \documentclass{article}     \begin{document}     <<>>=     data(cars)     fit <- lm(cars$speed~cars$dist)     summary(fit)     @     \end{document}      I am using RStudio to build the PDF file, and the summary outputs all kinds of special characters in the line specifying significance codes. (I don't have enough rep points to post pictures, but here is a screenshot: ![enter image description here](http://i.stack.imgur.com/N6BRg.png) In the generated .tex file the line reads as               Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1       These are probably the wrong type of quotes; I can fix the problem by manually typing `'` instead of `‘` in the .tex file. I assume it's something to do with Sweave/pdflatex/latex not being able to cope with non-ASCII characters? Is there anything I can set so that it displays correctly in the PDF file?


title: Beamer footcite citation appears twice if used in long caption

text: I noticed strange behaviour of the `\footcite` command when used in captions within beamer. In the working example provided the first frame has a `\footcite` on an itemize item, this works as expected. The second frame has a `\footcite` in a caption within a table, again this works as expected. The third frame is identical to the second, except it has a caption that spans two lines (a long caption). **When the caption is pushed to the next line, as in the case of the third frame, two citations appear at the bottom of the frame when only once is expected.** Both these citations are identical, but the footmark increased (in this case #3 is no where to be found, but #4 was present in the caption). Is there some way around this strange behaviour? I don't really want to cut my citations down so they fit on one line. I am not sure if this is some weird bug or that I am using `\footcite` inappropriately.               \documentclass{beamer}          \begin{filecontents*}{mybibfile.bib}     @ARTICLE{authora,       author = {A. Aaaaa},       title = {Some article},       journal = {Journal of Dummy Article Names},       year = {2012},       volume = {99},       pages = {1-5}     }          @ARTICLE{authorb,       author = {B. Baaaa},       title = {Another article},       journal = {Journal of Dummy Article Names},       year = {2012},       volume = {99},       pages = {6-10}     }          @ARTICLE{authorbb,       author = {B. Baaaa},       title = {Another dup article},       journal = {Journal of Dummy Article Names},       year = {2012},       volume = {99},       pages = {6-10}     }     \end{filecontents*}          \usepackage[style=verbose-note,autocite=footnote,abbreviate=true,backend=bibtex]{biblatex}      \addbibresource{mybibfile.bib}          \usetheme{CambridgeUS}          \title{Beamer}     \author{Anyone}          \begin{document}          \begin{frame}     \frametitle{Introduction}       \begin{itemize}         \item ItemA~\footcite{authora} %This works         \item ItemB       \end{itemize}     \end{frame}          \begin{frame}     \frametitle{Introduction}       \scriptsize       \begin{table}[!tb]         \centering         \begin{tabular}{|l|l|}           \hline 1 & 2 \\           \hline a & b \\           \hline         \end{tabular}         \caption{This only appears once~\footcite{authorb}.}       \end{table}     \end{frame}          \begin{frame}     \frametitle{Introduction}       \scriptsize       \begin{table}[!tb]         \centering         \begin{tabular}{|l|l|}           \hline 1 & 2 \\           \hline a & b \\           \hline         \end{tabular}         \caption{This only appears twice because the caption spans two lines blah blah blah blah?~\footcite{authorbb}.}       \end{table}     \end{frame}          \end{document}


title: Duplicate keys in citation

text: Using bibtex, natbib, consider the following:               \def\grpA{key1,key2,key3}     \def\grpB{key3,key4,key5}          The first set\citep{\grpA} and the second set\citep{\grpB} discuss XYZ.      In total\citep{\grpA,\grpB}, the bla bla bla is in common.      Problem is that, since `key3` is common to grpA and grpB, the total citation set actually puts key3 in twice, which not only breaks the `sort&compress` option of `natbib`, but actually puts the same citation in twice, not recognizing them as being the same. Is there a way to detect and discard duplicates? I am trying to summarize about 500+ papers and defining groups like this is handy, but some keys will be common.


title: MiKTeX Package Manager not installing new packages

text: I have just started using LaTeX as of last week. I have tried using the MiKTeX 2.9 package manager in order to install new packages (such as `cite` for example). However, whenever I try this I get the following error message:               No Data:          Data: Get host by name failed in tcp_connect().      Does anyone have any ideas on what is going wrong and what I can do to amend this? Any help would be much appreciated.


title: define an global variable; error ! Use of \@ doesn't match its definition

text: I want to define some variable for my IPE template, such as the title, affiliation and author etc. The code is listed below. However when I compile it using `pdflatex`, it does not show the result what the `\def` variable should be. When I remove the `\makeatletter` and `\makeatother`, it issued a error message "! Use of \@ doesn't match its definition." Any solutions ?               \documentclass{article}     \usepackage{color}          \makeatletter     \def\title#1{\def\@title{#1}} % Title      \def\displaytitle#1{\def\@displaytitle{#1}} % Display Title     \def\displayauthor#1{\def\@displayauthor{#1}} % Display author     \def\displayaffiliation#1{\def\@displayaffiliation{#1}} % Display affiliation     \makeatother          \title{This is a presentation}%     \displayauthor{Liu Benyuan}%     \displayaffiliation{The Automatic Target Recognition (ATR) Laboratory}%     \displaytitle{Compressive Sensing via Block Sparse Bayesian Learning : Theory and Applications}%          \begin{document}          \begin{minipage}{736pt}     \vspace*{.5em}     \begin{minipage}{650pt}\Large     \textcolor{red}{     {\bf \@displayauthor{}}~~$\cdot$~~{\bf \@displayaffiliation{}}~\hfill$\cdot$\hfill~{\bf NUDT}} \\     \textcolor{blue}{     \bf \@displaytitle{}\hfill \today{}}     \end{minipage}     \hspace*{8em}     \vspace*{.5em}     \end{minipage}          \end{document}


title: Inline equation with set introduces symbols rather than numbers

text: Can someone tell me what is going on here?               \documentclass[a4paper,10pt]{article}          \begin{document}          An inline equation $\cal{A}\subseteq \{0,\dots,n\}\times \{0,\dots,m\}$     with funny characters instead of numbers.          \end{document}      Instead of `0`, `n` and `m`, a backslash, an updownarrow and another symbol are typeset.


title: Why \usebox (is it vestigial)?

text: Despite my inflammatory title, I understand that `\usebox` is employed to display a predefined box. But this question concerns when [the use of the box register, rather than the box content] becomes absolutely essential to a LaTeX operation (for example, as arguments to `\wd`, `\ht`, and `\dp`). [EDITS above and below in brackets, to reflect proper terminology] * * * Clarifying, based on Werner's comments, given the syntax               \newsavebox{\xyz}     \sbox{\xyz}{...}     \def\xyzbox{\usebox{\xyz}}      are there useful things I can perform only upon [the register] `\xyz` that I cannot perform on [the box content] `\xyzbox`? (If not, then maybe `\usebox` is vestigial). * * * For example, consider the LaTeX syntax               \newsavebox{\xyz}     \sbox{\xyz}{...}     \usebox{\xyz}      Why couldn't LaTeX have been constructed so that the last line could have been issued as `\xyz`, without the `\usebox` (saving me a few characters of typing)? I am so frustrated [an exaggeration] with the `\usebox` syntax, that I work around it in both the `verbatimbox` package and the `\stackengine` package. In the former, I allow this syntax:               \begin{myverbbox}[]{\boxname}     ...     \end{myverbbox}     \boxname% <--NOTE: THIS IS NOT \usebox{\boxname}      Internally, `\boxname` actually points to `\usebox{boxnamecontent}` Likewise, in `stackengine`, I allow:               \savestack{\mystack}{VARIOUS STACKING COMMANDS}     \mystack% <---NOTE: THIS IS NOT \usebox{\mystack}      Internally, `\mystack` actually points to `\usebox{\mystackcontent}` So the crux of my question is this? When is the [use of a box register] essential to a LaTeX operation?? I realize things like `\wd`, `\ht`, and `\dp` act on the un-rendered box name itself (without the `\usebox`); however, even these are replaceable by `calc`'s `\widthof`, `\heightof`, and `\depthof`, which act upon the (rendered) `\usebox` version of the box. So what other TeX/LaTeX operations act upon [the box register, rather than the content]? In essence (rhetorically), why do we still need `\usebox` syntax if everything that acts upon a box acts upon the rendered `\usebox` form of the box? [So far, the answers have revealed that I need the box register to set the box, and to use the box. And I can, but don't need to, use the register to measure the box. And in nebulous places where I "need a number, not... a box". Any other usages of the box register?]


title: Adding information on each page in "longtable"

text: At some point in my document I'm using a "longtable", which is spread among different pages. What I'd love to do is to add some text on each of these pages, possibly on the top of the table. Any suggestion on how to achieve this?


title: How to set the height for a specific row in a "longtable"?

text: I have a "longtable" and I need a couple of rows to be "taller" than the others. Is it possible to specify a fixed height for a specific row?


title: mdframed parchment layout

text: I have recently found a very nice example of how to create text boxes with a parchment-style layout: http://www.texample.net/tikz/examples/framed-tikz/ Also, here on tex.stackexchange, there are numerous samples employing the `framed` package to produce this kind of layout. However, in my document, I am already using the `mdframed` package to typeset a different kind of frame/box. Is it possible to produce such a layout using the `mdframed` package as well? If so - how? ## Edit I following the suggestion from Werner, I have played around a little and achieved the following:               \makeatletter     \usetikzlibrary{decorations.pathmorphing, patterns}     \renewrobustcmd*\mdf@tikzbox@tfl[1]{%three or four borders         \path(0,0)rectangle(\mdfboundingboxwidth,\mdfboundingboxheight);% replace \clip by \path         \begin{scope}[mdfcorners]%            \clip[preaction=mdfouterline]%                 [postaction=mdfbackground]%                 [postaction=mdfinnerline]#1;%         \end{scope}%         \path[mdfmiddleline,mdfcorners]#1;       }%     \newenvironment{parchment}[1][]{%       \mdfsetup{%         frametitlebackgroundcolor=none,         innermargin=5pt,         frametitleaboveskip=-\ht\strutbox,         frametitlebelowskip=-\ht\strutbox,         innertopmargin=10pt,         innerbottommargin=10pt,         tikzsetting={           line width=2pt,orange!30!black!10, decorate,            decoration={random steps, segment length=2.5cm, amplitude=1.5mm}         },         everyline=false       }       \ifstrempty{#1}{%         \mdfsetup{%           frametitle={\fcolorbox{black}{white}{Handout}},         }%       }{%         \mdfsetup{%           frametitle={\fcolorbox{black}{white}{Handout: #1}},         }%       }%       \begin{mdframed}[]         \relax%     }{\end{mdframed}}     \makeatother      However, when I use `everyline=true` instead of `everyline=false`, the pagebreaks in my document change. Can anybody explain? ## Edit 2 I have finally found some time to revisit this issue. Please have a look at this MWE:               \documentclass{article}     \usepackage[a4paper]{geometry}     \usepackage{tikz}     \usepackage{etextools}     \usepackage[framemethod=tikz]{mdframed}     \usepackage{lipsum}     \geometry{verbose,tmargin=2.5cm,bmargin=2.5cm,lmargin=2cm,rmargin=3cm,marginparwidth=2.5cm,headheight=15pt}     \usepackage{emerald}          \let\fancyfont\ECFAugie          \makeatletter     \usetikzlibrary{decorations.pathmorphing, patterns}     \renewrobustcmd*\mdf@tikzbox@tfl[1]{%three or four borders         \path(0,0)rectangle(\mdfboundingboxwidth,\mdfboundingboxheight);% replace \clip by \path         \begin{scope}[mdfcorners]%            \clip[preaction=mdfouterline]%                 [postaction=mdfbackground]%                 [postaction=mdfinnerline]#1;%         \end{scope}%         \path[mdfmiddleline,mdfcorners]#1;       }%     \newenvironment{parchment}[1][]{%       \mdfsetup{%         frametitlebackgroundcolor=none,         innermargin=5pt,         frametitleaboveskip=-\ht\strutbox,         frametitlebelowskip=-\ht\strutbox,         innertopmargin=10pt,         innerbottommargin=10pt,         tikzsetting={           line width=2pt,orange!30!black!10, decorate,            decoration={random steps, segment length=2.5cm, amplitude=1.5mm}         },         everyline=false       }       \ifstrempty{#1}{%         \mdfsetup{%           frametitle={\fcolorbox{black}{white}{Handout}},         }%       }{%         \mdfsetup{%           frametitle={\fcolorbox{black}{white}{Handout: #1}},         }%       }%       \begin{mdframed}[]         \relax%     }{\end{mdframed}}     \makeatother          \begin{document}     \begin{parchment}[Lorem ipsum]     \fancyfont     \lipsum[1-60]     \end{parchment}     \end{document}      Here's the list of issues that I would still like to resolve:   * The frame borders are sometimes "chopped off". I think this is related to the bounding box/clipping of TikZ, but I don't know how to resolve it. ![screenshot](http://i.stack.imgur.com/tODvi.png)   * I would like to give the whole thing a background image that is cropped precisely to the drawn border. Additionally, it would be great if the baselines could be slightly curved and tilted to look more like handwritten script - but I guess I can figure out how to do this - perhaps like this: Cthulhu document


title: poem indentation different when text is longer than a page

text: I'm trying to compose a volume of poetry in the `memoir` class and the verse environment. To set the indent on a per-poem basis, I use               \settowidth{\versewidth}{longest line of text here}      as described in the manuals. When a poem is longer than fits on one page, the indentation differs on that second page from the indentation on the first one. Below is an example of what I mean. Any hints what I might do to prevent this behavior, i. e. to have the text on the second page indented exactly as much as the beginning of the text?               \documentclass[a5paper,11pt,draft]{memoir}     \usepackage{mathpazo}     \usepackage[utf8x]{inputenc}     \usepackage[T1]{fontenc}     \usepackage[ngerman]{babel}     \usepackage{verse}     \pagestyle{plain}          % This was suggested as solution, but creates new problems:     % The first text in this example (with somewhat longer lines) doesn't      % break lines correctly anymore after you activate the following line     %\usepackage[margin=1.75in]{geometry}          \newcommand{\attrib}[1]{%       \vskip2ex\nopagebreak{\raggedleft\scriptsize\textit{#1}\par\smallskip}}          \newcommand{\leftpoemtitle}[1]{{\PoemTitlefont{\textbf{#1}}}\\[         \afterPoemTitleskip]}          \begin{document}          \title{Foo}     \author{Bar}          \maketitle     \pagenumbering{arabic}          \chapter[Chapter One][Chapter One]{Chapter One}     \pagebreak               \label{blahblubb}     \settowidth{\versewidth}{terrorism. Schools like mine are increasingly}     \begin{verse}[\versewidth]     \leftpoemtitle{Blahblubb}     \bigskip        The call for global solutions to\\        global problems has become a familiar\\        refrain: If only we could see past our petty\\        \bigskip        national interests\\        we could come together to solve everything\\        from climate change to poverty to\\        terrorism. Schools like mine are increasingly\\        \bigskip        being called upon to educate “global\\        citizens” who belong to the world rather\\        than to their nation of birth or\\        state of\\        choice\\     \attrib{(Washington, 8.12.2013)}     \end{verse}          \pagebreak          \label{text1}     \settowidth{\versewidth}{labore et dolore magna aliquyam}     \begin{verse}[\versewidth]     \leftpoemtitle{Lorem Ipsum}     \bigskip     Lorem ipsum dolor sit amet\\     consetetur sadipscing elitr,\\     sed diam nonumy\\     eirmod tempor invidunt\\     ut labore et dolore magna\\     aliquyam erat, sed diam\\     voluptua.\\     \vin At vero eos\\     \vin et accusam et justo\\     \bigskip     duo dolores et ea rebum.\\     Stet clita kasd gubergren,\\     no sea takimata sanctus est\\     Lorem ipsum dolor sit amet.\\     Lorem ipsum dolor sit amet,\\     consetetur sadipscing elitr,\\     sed diam nonumy\\     eirmod tempor\\     invidunt ut\\     \bigskip     labore et dolore magna aliquyam\\     erat, sed diam voluptua.\\     At vero eos et\\     accusam et justo duo dolores\\     et ea rebum.\\     Stet clita kasd\\     gubergren,\\     no sea takimata sanctus\\     est\\     Lorem ipsum\\     dolor sit amet.\\     \end{verse}     \attrib{(There, then)}          \pagebreak     \end{document}


title: recommendation for a package and bibliography style

text: I appreciate it if you let me know which package and bibliography style should be used to have the bibliography with the following properties: 1- citation in the text should be like this: (Doe et al., 2000) 2- alphabetical sort of the references based on the last name of the first author 3- having this pattern for references with more than one author without abbreviating the first names: LastName_1, FirstName_1, FirstName_2 LastName_2, and FirstName_3 LastName_3 such as: Doe, John, David Dane, and Marry Dewy (2000). "This and that". In: Journal of Deep Understanding of Things.


title: how to change spacing between align environments and equation environments?

text: I am using align and environment for various equations. There is some space that comes before and after the equations that I would like to minimize. Is there a single command that could be used to do that for all environment occurrences? (I think some of it is automatically determined by Latex, but maybe I can give a maximal amount of space allowed?)


title: How can I align this tabular so that true on the right of page?

text: I want to align this tabular so that it is true on the right of page. I tried               \documentclass[a4paper, 12pt]{article}     \usepackage{lipsum}     \begin{document}     \begin{flushleft}     \begin{tabular}{ c c }     \textbf{Long text Long text Long text  } & \hspace{0.5cm} \textbf{Subject Subject}  \\     \textbf{Long text Long text  }  & \hspace{0.5cm} \textbf{Year 2013 - 2014} \\     & \hspace{0.5cm}  \textbf{Mathematica}  \\     &\hspace{0.5cm} (\emph{\textit{Time}: \textbf{90 minutes}})\\      & \hspace{0.5cm}  \rule{1.7in}{1pt}     \end{tabular}     \end{flushleft}     \lipsum[1]     \end{document}      ![enter image description here](http://i.stack.imgur.com/2mhsE.jpg) How can I align it? I changed `\hspace{0.5cm}` to `\hspace{1cm}` and I got ![enter image description here](http://i.stack.imgur.com/5EXdG.jpg)


title: Biblatex: pagebackref reference in the (flush) right margin

text: Since I am not really satisfied with how pages where a bibliographic reference is called in the text are reflected in the bibliography, I tried to modify the `pageref` macro in Biblatex as follows:               \documentclass{article}     \usepackage{times}     \usepackage{csquotes}     \usepackage{xcolor}      \usepackage[style=numeric-comp,backref=true,backend=biber]{biblatex}      \usepackage{filecontents}          \begin{filecontents}{\jobname.bib}     @book{saad00,       title = {Iterative Methods for Sparse Linear Systems},       year = {2000},       author = {Y. Saad}}     \end{filecontents}          \addbibresource{\jobname.bib}          % pagereference in the right margin     \renewbibmacro*{pageref}{%        \iflistundef{pageref}          {}          {\printtext{\hfill\rlap{\hskip15pt\colorbox{blue!5}{\scriptsize\printlist[pageref][-\value{listtotal}]{pageref}}}}}}          \begin{document}     text \cite{saad00}     \printbibliography     \end{document}      The problem, I think, is in the `\hfill` that pushes to the right a punctuation related to a previous block, the `year` entry in the given example. I know how to get rid of this problem by hooking the `\DeclareBibliographyDriver{book}` in the `.bbx` file but I would be happy if there is a simpler solution directly in the `pageref` macro. ![enter image description here](http://i.stack.imgur.com/LhIAG.png)


title: longtabu and scrpage2: line breaks in page header cause compilation errors

text: Please consider the following MWE:               \documentclass{scrartcl}     \usepackage{longtable,tabu}     \usepackage{lipsum}     \usepackage{scrpage2}     \chead[Headline 1\\ Headline 2]{Headline 1\\ Headline 2}     \pagestyle{scrheadings}          \begin{document}     \lipsum[1-5]     \begin{longtabu}{XXX}         Col1 & Col2 & Col3 \\         Col1 & Col2 & Col3 \\         Col1 & Col2 & Col3 \\         Col1 & Col2 & Col3 \\         Col1 & Col2 & Col3 \\         Col1 & Col2 & Col3 \\     \end{longtabu}     \end{document}      I noticed that the compilation of this MWE causes the following error:               ! Misplaced \cr.     \reserved@c ->\ifnum 0=`{}\fi \cr           l.17 \end{longtabu}          I can't figure out why you would want to use a tab mark     or \cr or \span just now. If something like a right brace     up above has ended a previous alignment prematurely,     you're probably due for more error messages, and you     might try typing `S' now just to see what is salvageable.      For one document, I needed a two-line page header and got this error, which -- I guess -- belongs to the `tabu` package. I can't find any error in it and would be delighted about help how I can get a line break in the page header without this error.


title: pgfplots: How to draw line from 0-like value with loglogaxis

text: I want to plot some vertical lines (to mark control points on my histogram). Code to draw the line looks like:               \documentclass{article}     \usepackage{pgfplots}     \begin{document}     \begin{tikzpicture}     \begin{loglogaxis}     \addplot+[sharp plot] coordinates {(14.5, 0.0) (14.5, 1000)};     \end{loglogaxis}     \end{tikzpicture}     \end{document}      But result looks like first point was just dropped, because there is no value in logarithmic coordinate to be equal zero. How can I draw line from X axis?


title: How to install fonts

text: I use MikTeX 2.8. I want to install the greek fonts "GFS neohellenic". I open the MikTeX package manager, I type GFS neohellenic but nothing similar is found. I downloaded the fonts from http://www.greekfontsociety.gr/pages/en_typefaces20th.html I searched through the net for similar issues but nothing seem to be the proper one. How can I get them to work on windows? P.S.:I use TeXNiC CenteR


title: Will it ever be possible to use wrapfig with an enumerate or itemize environment?

text: `wrapfig` is incompatible with the `enumerate` and `itemize` environments. Is there a typographical reason not to wrap a list around a figure or is it a technical limitation of LaTeX? If it is a technical limitation, is there any work (new packages or changes to LaTeX) currently being done to eliminate the limitation in the future? **Edit** : To respond to some of the comments: I realize that there are "gymnastics" which can make this work. I do not have an example of the problem. Whenever I run into a problem with wrapfig because it is near an enumerate or itemize environment, I search for an easy solution, find none, and move the figure elsewhere. In the vast majority of cases, the cost of learning the complex solutions isn't worth the benefit of keeping the figure where I want it.


title: wrapfigure with enumerate

text: I would like to use a `wrapfigure` with `enumerate`. But it doesn't work. With this code:               \documentclass{article}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage{tikz}     \usetikzlibrary{matrix}     \usepackage{wrapfig}     \usepackage{blindtext}          \begin{document}     And now let's do a little test     \begin{wrapfigure}{r}{4cm}     \centering     \begin{tikzpicture}       \matrix (m) [matrix of math nodes,row sep=3em,column sep=4em,minimum width=0em]       {M &N\\        M/N&\\};       \path[-stealth,>=stealth]         (m-1-1)edge node[left]{$p$} (m-2-1)                edge node[above]{$f$}(m-1-2)         (m-2-1)edge[dashed,->]node[below]{$\bar{f}$}(m-1-2);     \end{tikzpicture}     \end{wrapfigure}     \blindtext[1]          \begin{enumerate}     \item\begin{wrapfigure}{r}{4cm}     \centering     \begin{tikzpicture}       \matrix (m) [matrix of math nodes,row sep=3em,column sep=4em,minimum width=0em]       {M  &N\\        M/N&\\};       \path[-stealth,>=stealth]         (m-1-1)edge node[left]{$p$} (m-2-1)                edge node[above]{$f$}(m-1-2)         (m-2-1)edge[dashed,->]node[below]{$\bar{f}$}(m-1-2);     \end{tikzpicture}     \end{wrapfigure}     \blindtext[1]     \item\blindtext[1]     \end{enumerate}     \end{document}      I get this: ![enter image description here](http://i.stack.imgur.com/TgnP5.jpg) Now, with `cutwin` package and this code:               \documentclass{article}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage{tikz}     \usetikzlibrary{matrix}     \usepackage{cutwin}     \usepackage{caption}     \usepackage{lipsum}     \begin{document}     \renewcommand\windowpagestuff{%     \hspace*{25pt}          \begin{tikzpicture}       \matrix (m) [matrix of math nodes,row sep=3em,column sep=4em,minimum width=0em]       { M  &N\\         M/N&\\};       \path[-stealth,>=stealth]         (m-1-1)edge node[left]{$p$} (m-2-1)                edge node[above]{$f$}(m-1-2)         (m-2-1)edge[dashed,->]node[below]{$\bar{f}$}(m-1-2);     \end{tikzpicture}          }     \opencutleft          \begin{cutout}{2}{10pt}{0.5\linewidth}{12}     \begin{enumerate}     {%     \parshape 15 26pt \linewidth 26pt \linewidth 0.5\linewidth 0.5\linewidth       0.5\linewidth 0.5\linewidth  0.5\linewidth 0.5\linewidth  0.5\linewidth 0.5\linewidth       0.5\linewidth 0.5\linewidth   0.5\linewidth 0.5\linewidth   0.5\linewidth 0.5\linewidth        0.5\linewidth 0.5\linewidth   0.5\linewidth 0.5\linewidth   0.5\linewidth 0.5\linewidth       0.5\linewidth 0.5\linewidth   0.5\linewidth 0.5\linewidth 26 pt \linewidth     \item \lipsum[1]     }%     \item \lipsum[2]     \item \lipsum[2]     \end{enumerate}     \end{cutout}     \end{document}      It doesn't work.


title: A mysterious blank line come from an \hskip?

text: I use a very complicated `.sty` file. The main purpose of this `.sty` is to enable a special inline box in which texts can be typeset in a very special way. There is no problem inside the box. The `.sty` provides two macros which can be customized by users (like me) which is placed before and after the box. I define these two macros as two `\hskip`s. Everything works well except when the inline box starts at the beginning of a line inside a paragraph, where one additional blank line exists. MWE:               \documentclass[twoside,10pt]{article}          \makeatletter     \usepackage{CJKutf8,CJKvert}     \usepackage[papersize={294pt,363pt},total={229.9pt,299pt},centering]{geometry}     \parindent=0pt     \parskip=12pt          \usepackage{pdflscape}\PLS@Rotate{90}     \usepackage{gezhu}%https://code.google.com/p/gezhu/     \let\gezhu@debugbox\gezhu@fbox     \everygezhu={\linespread{0.83}\footnotesize\renewcommand\CJKglue{\hskip 3pt}}     \beforegezhu={\hskip 2.5pt plus 0pt minus 0pt}     \aftergezhu={\hskip 2.5pt plus 2pt minus 0pt}          \def\CJKglue{\hskip 1pt plus 0pt minus 0pt}          % Note:     % 230pt = 10pt*21 (characters) + 1pt* 20 (CJKglues)     % In order to make all characters 'fit the grid',      % text inside the box is 8pt per character, 3pt per CJKglue     % total space around a box is 4pt so as to make characters 'fit the grid',     % but (for some unknown reason) additional 0.5pt is needed on each end.     % ccccccccccgccccccccccgccccccccccgcccccccccc     % ccccccccccggccccccccgggccccccccggcccccccccc     \makeatother          \begin{document}     \begin{CJK*}{UTF8}{bsmi}     \begin{withgezhu}     \leavevmode     進行文字測試七八九十一二三四五六七八九十一二三|{朝朝朝朝朝朝朝朝朝落}進行文字測試進行文字測試進行文字測試進行文字測試\par     進行文字測試七八九十一二三四五六七八九十|{朝朝朝朝朝朝朝朝朝落}一二三進行文字測試進行文字測試進行文字測試進行文字測試\par     進行文字測試七八九十一二三四五六七八九十一二三|{朝朝朝朝朝朝朝朝朝落}進行文字測試\par     進行文字測試七八九十一二三四五六七八九十一|{朝朝朝朝朝朝朝朝朝落}二三進行文字測試\par          \clearpage     \beforegezhu={}     \aftergezhu={}     進行文字測試七八九十一二三四五六七八九十一二三|{朝朝朝朝朝朝朝朝朝落}進行文字測試進行文字測試進行文字測試進行文字測試\par     進行文字測試七八九十一二三四五六七八九十|{朝朝朝朝朝朝朝朝朝落}一二三進行文字測試進行文字測試進行文字測試進行文字測試\par     進行文字測試七八九十一二三四五六七八九十一二三|{朝朝朝朝朝朝朝朝朝落}進行文字測試\par     進行文字測試七八九十一二三四五六七八九十一|{朝朝朝朝朝朝朝朝朝落}二三進行文字測試\par          \end{withgezhu}     \end{CJK*}     \end{document}      There are four paragraphs on each page in this MWE. In page 1, the first three paragraphs are good (because the characters 'fit the grid'), but the last one is bad because (1) characters following the box do not 'fit the grid', and more importantly (2) a mysterious blank line from nowhere appears unexpectedly before the box. Can anybody help fix (1) and (2), please?


title: How to add/change dot leaders with an apa6 document class

text: I've been having tremendous difficulty trying to add dot leaders for section titles (or maybe they're chapter titles?) on my thesis, because I'm using the apa6 document class. I can't seem to get any of the commands with the Tocloft package to work because I feel pretty sure the apa6 class doesn't support most of the commands that are provided. I keep getting errors when I try the renewal commands for section/chapter headings that were provided as solutions in other threads with similar questions (only they were for book or article classes I believe). Does anybody have any idea how I could proceed? I hope I won't have to change definitions inside of the document class itself.


title: half parskip in koma scrartcl resulting in space at the end of last line before next paragraph

text: I wrote some things and wanted to have a part of those left aligned and on the same line some words (or formulas) right aligned. I solved that with `\hfill`.   So sad it is not working on the last line before the end of paragraph when using `parskip=half`. How can I change that?   For clarification a mwe:               \documentclass[parskip=half]{scrartcl}     \usepackage{polyglossia}\setdefaultlanguage[spelling=new,babelshorthands=true]{german}      \RequirePackage{mathtools,amsfonts}     \begin{document}     \section{Test}     \paragraph*{Par one}     \(\displaystyle\iint_{G_x}f\,\mathrm{d}G=\int_{a}^{b}\int_{\psi_1\left(x\right)}^{\psi_2\left(x\right)}f\left(x,y\right)\,\mathrm{d}y\,\mathrm{d}x,\hfill f\text{ stetig auf }G_x\)\\     \hbox{\hskip0pt}\hfill\(\displaystyle\iint_{G_y}f\,\mathrm{d}G=\int_{c}^{d}\int_{\varphi_1\left(y\right)}^{\varphi_2\left(y\right)}f\left(x,y\right)\,\mathrm{d}x\,\mathrm{d}y,\hfill f\text{ stetig auf }G_y\)     \paragraph*{Par Two}\hfill\(\displaystyle\iiint f\left(x,y,z\right)\,\mathrm{d}x\,\mathrm{d}y\,\mathrm{d}z=\iiint f\left(u,v\right)\left\lvert\det\frac{\partial\left(x,y,z\right)}{\partial\left(u,v,w\right)}\right\rvert\,\mathrm{d}u\,\mathrm{d}v\,\mathrm{d}w     \)     \end{document}      And here is the result: Please have a look at the second line of `Par one`. ![problem figure](http://i.stack.imgur.com/VBEeP.png)


title: What is the XeTeX equivalent of \pdfcreationdate?

text: I need the time to 1-second resolution. `datetime` uses `\pdfcreationdate` for this, but only under pdf(La)TeX. As a result under XeLaTeX, this:               \usepackage{datetime}     ...     \newtimeformat{hhmmss}{\twodigit{\THEHOUR}\twodigit{\THEMINUTE}\twodigit{\THESECOND}}     \settimeformat{hhmmss}     \currenttime      always produces `00` as the last two digits, eg:               113600


title: Change unit from a read in data table

text: I use pgfplots to create a graph from a csv file. The column that I use for the x-axis contains time values measured in ms. As my timelapse is a bit more as a min I therefor have values between 1000 and 64000. What the graph shows as x-axis marks are numbers from 1 to 7 and a *10^4 mark at the end. What I would like to have are 10 second marks. Is there some way to change the unit (or just divide by 1000 and then tell to show the 10, the 20 etc)?


title: How to define mathematical functions by the action on an element?

text: I would like to define a mathematical function by its action. Something like                    \documentclass{article}          \begin{document}          \[             \begin{array}{cccc}              f\colon & R\times R & \rightarrow & R\times R\\                      & v & \mapsto & f(v)             \end{array}           \]           \end{document}      In this way, spacing is horrible. What is the best way to produce it? I want the elements in the second line centered with respect to the element of the first line.


title: How to align text within a caption?

text: I want to give a survey on several techniques within a figure. It turned out, that there are many techniques, so I employed subcaption with subref to describe the matter. However, as there are too many labels, I found it convenient to put each description in a single line by employing `\\\\\hspace{textwidth}` as linebreak workaround. I do not want to put the info in subcaption below the image, as I don't like it and it would break the format of the whole document, where ever I have subcaptions I will refer to its label (with `\subref`) within the figure caption. As subref labels, consume different width, the left side of the caption looks quite jaggy, angular. A MWE:               \documentclass[oneside,DIV=17]{scrbook}     \usepackage[font={scriptsize,sf},labelfont={scriptsize,sf,bf}]{caption}     \usepackage[subrefformat=parens,labelfont={normalfont,scriptsize,sf},labelsep=space]{subcaption}     \setcapindent{0pt}          \begin{document}      \begin{figure}        \subcaptionbox{\label{fig:a}}{\rule{0.3\textwidth}{0.25\textwidth}}\hfill        \subcaptionbox{\label{fig:b}}{\rule{0.3\textwidth}{0.25\textwidth}}\hfill        \subcaptionbox{\label{fig:c}}{\rule{0.3\textwidth}{0.25\textwidth}}\par        \subcaptionbox{\label{fig:d}}{\rule{0.3\textwidth}{0.25\textwidth}}\hfill        \subcaptionbox{\label{fig:e}}{\rule{0.3\textwidth}{0.25\textwidth}}\hfill        \subcaptionbox{\label{fig:f}}{\rule{0.3\textwidth}{0.25\textwidth}}\par        \subcaptionbox{\label{fig:g}}{\rule{0.3\textwidth}{0.25\textwidth}}\hfill        \subcaptionbox{\label{fig:h}}{\rule{0.3\textwidth}{0.25\textwidth}}\hfill        \subcaptionbox{\label{fig:i}}{\rule{0.3\textwidth}{0.25\textwidth}}\par        \subcaptionbox{\label{fig:j}}{\rule{0.3\textwidth}{0.25\textwidth}}\hfill        \subcaptionbox{\label{fig:k}}{\rule{0.3\textwidth}{0.25\textwidth}}\hfill        \hspace{0.3\textwidth}        \caption{Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vestibulum ut, placerat ac, adipiscing vitae, felis.     Curabitur dictum gravida mauris. Nam arcu libero, nonummy eget, consectetuer id, vulputate a, magna. Donec vehicula augue eu neque.     Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Mauris ut leo. Cras viverra metus rhoncus     sem. Nulla et lectus vestibulum urna fringilla ultrices.\\\hspace{\textwidth}         \subref{fig:a} Short text fit in one line\\\hspace{\textwidth}         \subref{fig:b} Short text fit in one line\\\hspace{\textwidth}         \subref{fig:c} Short text fit in one line\\\hspace{\textwidth}         \subref{fig:d} Short text fit in one line\\\hspace{\textwidth}         \subref{fig:e} Short text fit in one line\\\hspace{\textwidth}         \subref{fig:f} Short text fit in one line\\\hspace{\textwidth}         \subref{fig:g} Short text fit in one line\\\hspace{\textwidth}         \subref{fig:h} Short text fit in one line\\\hspace{\textwidth}         \subref{fig:i} Short text fit in one line\\\hspace{\textwidth}         \subref{fig:j} Short text fit in one line\\\hspace{\textwidth}         \subref{fig:k} Short text fit in one line        }      \end{figure}     \end{document}      which renders to (the redline, highlights the problem): ![jaggy left margin](http://i.stack.imgur.com/36KV5.png) I know, if I would not linebreak the caption text, everything would be ok. But I would argue, that the reader might find it easier to select description from the column, then by searching the label item within the text. Thanks for any suggestions.


title: How to add indentation

text: I am writing my Thesis report using LaTeX, I need to add indentation because every thing is right but only thing is every new paragraph is starting at initial stage but I need to add some indentation. How do I add indentation?


title: Beamer title font color

text: I would like to use the title color of my `beamer` presentation (some kind of blue) to write some inline text with the same color. Therefore I want to know the color definition. Is there a command for using the same color as the title? My preamble definitions are:               \mode<presentation>     {       \usetheme{Warsaw}     }     \usecolortheme{crane}      **EDIT:**               \documentclass{beamer}          \usepackage{caption}          \mode<presentation>     {       \usetheme{Warsaw}     }     \usecolortheme{crane}               \begin{document}         \begin{frame}{\bf This is the title's color I want to ``copy''}             \begin{itemize}                 \item                  I want to use the ``blue'' color from the title for the caption of the table.             \end{itemize}             \vspace{1.5\baselineskip}                  \begin{table}                 \begin{tabular}{c|c}                     table1 & trial \\                     \hline                     \hline                     1 & 2 \\                     3 & 4                 \end{tabular}                 \caption*{My table}             \end{table}              \end{frame}     \end{document}


title: How do I activate the split theme in beamer?

text: I'd like to have the author and the title in the same line in the footline in beamer. Doing               \setbeamertemplate{footline}[split theme]      doesn't make any difference. This did the trick:               \usepackage{beamerouterthemesplit}     \setbeamertemplate{footline}[split theme]      Is this the official solution? Minimal working example:               \documentclass{beamer}     \usepackage{beamerouterthemesplit}     \setbeamertemplate{footline}[split theme]     \title{TITLE}     \author{AUTHOR}     \begin{document}     \begin{frame}\frametitle{Foo}bar\end{frame}     \end{document}


title: pgfplots: plot from csv file starting at a specified row

text: I do have a large csv file which contains more data than that what I actually want to plot. E.g. I have data starting from x=0, but I want to plot it starting from x=2, but still let the axis start at xmin=0. Is it possible to specify a 'starting row' e.g. in the table command?               \documentclass{article}     \usepackage{pgfplots}     \usepackage{filecontents}     \begin{filecontents*}{mydata.csv}     x,       y     1,       0.000004824     2,       0.000004687     3,       0.000009425     4,       0.000004794     5,       0.000004565     \end{filecontents*}          \begin{document}     \begin{tikzpicture}     \begin{axis}[]     \addplot table [col sep=comma] {mydata.csv};     \end{axis}     \end{tikzpicture}     \end{document}


title: bigdelim and text with multiple lines

text: I have a table with a common label for multiple lines. Using `bigdelim` I place brackets to give explanations. My explanation has too much text for one line, so I would like it to break over multiple lines. However, I have no idea how I could enable line breaks (preferably automatically, or manual, if there is no other way). My MWE:               \documentclass{scrbook}     \usepackage{multirow}     \usepackage{bigdelim}     \begin{document}     \begin{tabular}{l p{8cm}}         \hline         One & \rdelim]{3}{*}[And here we have some long text, which I want to wrap over multiple lines please. Is that possible?] \\         Two \\         Three \\         \hline     \end{tabular}     \end{document}      Current result: ![bigdelimExample](http://i.stack.imgur.com/OSQu1.png) [edit] After applying the suggestion given in the comments and changing the enclosing brackets for the text from `[` to `{`, I have the following result: ![bigdelimExample2](http://i.stack.imgur.com/Bqi0H.png) [edit2] Thank you for your suggestions! When trying it out however, I found the following limitations which makes it impossible, to implement them as suggested (apologies if MWE was too minimal):   * There are even/odd numbers of rows which I need to group, the given solutions only work for odd amounts.   * The bracket's length grows based on the amount of text. Sometimes I only a little amount of text, which means, that the bracket does not span all necessary rows. Any solution to fix that?


title: Using footnotes with \par in eledmac's paragraphed footnotes

text: I was asked to do some adoptions to the footnote layout using eledmac. One request I could not implement so far is to combine the "footparagraph" option with a long footnote containing paragraphs itself (and/or line breaks). eledmac offers the `parapparatus` option for "normal" critical footnotes. However, I am looking explicitly for paragraphed familiar footnotes.               \documentclass{article}     \usepackage[parapparatus]{eledmac} % Option only for "normal" footnotes     \footparagraphX{A}          \begin{document}        Test\footnoteA{A test footnote with a\par new paragraph in it.}     \end{document}      I read through the source code of eledmac and tried to modify some routines, e.g. `\newcommand*`->`\newcommand`, but I did not succeed. Does anyone of you have an idea how to do this? Thank you in advance.


title: Singapore Beamer Theme - add bottom bar with author info

text: I made presentation slides using the Singapore Beamer theme. I think this theme looks very professional, but it doesn't include a bottom toolbar that includes my name and institution. How do I add a toolbar that contains this information? If there are two authors, how would I stack their names, instead of placing them next to each other (which is typically the default)?


title: Subtables and lineno incompatibility

text: Is there any incompatibility between packages subcaption and lineno? I cannot compile this (dummy) text:               \documentclass{revtex4-1}          \usepackage{subcaption}          \usepackage[mathlines]{lineno}% Enable numbering of text and display math     \modulolinenumbers[2]% Line numbers with a gap of 5 lines     \linenumbers\relax % Commence numbering lines          \begin{document}          \section{Introduction}          Table~\ref{tab:Taula} 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.          \begin{table*}[h!]     \caption{\label{tab:Taula} Mean uncertainties...}          \begin{subtable}{\linewidth}     \caption{S}         \begin{ruledtabular}     \begin{tabular}{cccccc}     \multicolumn{3}{c}{x} & \multicolumn{3}{c}{y}\\     \cline{1-3} \cline{4-6}     R & G & B & R & G & B\\     \hline     1.8 & 2.2 & 5.5 & 2.0 & 2.4 & 6.3 \\     \end{tabular}     \end{ruledtabular}     \end{subtable}          \begin{subtable}{\linewidth}     \caption{S}         \begin{ruledtabular}     \begin{tabular}{cccccc}     \multicolumn{3}{c}{x} & \multicolumn{3}{c}{y}\\     \cline{1-3} \cline{4-6}     R & G & B & R & G & B\\     \hline     3.3 & 2.3 & 5.6 & 3.9 & 3.0 & 8.1 \\     \end{tabular}     \end{ruledtabular}     \end{subtable}          \end{table*}          \end{document}      I get this kind of errors: > ! Improper \prevdepth. \prevdepth l.16 ...n{\label{tab:Taula} Mean > uncertainties...} You can refer to \spacefactor only in horizontal mode; you > can refer to \prevdepth only in vertical mode; and neither of these is > meaningful inside \write. So I'm forgetting what you said and using zero > instead. ! You can't use `\prevdepth' in restricted horizontal mode. > \nointerlineskip ->\prevdepth -\@m \p@ l.16 ...n{\label{tab:Taula} Mean > uncertainties...} Sorry, but I'm not programmed to handle this case; I'll > just pretend that you didn't ask for it. If you're in the wrong mode, you > might be able to return to the right one by typing`I}' or `I$' or`I\par'. ! > Missing $ inserted. **UPDATE:** It looks like the incompatibility appears when using the revtex documentclass.


title: Error while using itemize in parbox

text: I am using itemize in `\parbox` and getting following error message                \documentclass[11pt,table,a4paper]{article}      \begin{document}      \begin{minipage}[t]{.95\textwidth}        \parbox[t][1.4cm][t]{\linewidth}{ \newline\begin{itemize}\item line1.\item  line2.\item line3.\end{itemize} }       \end{minipage}      \end{document}                     ! LaTeX Error: There's no line here to end.          See the LaTeX manual or LaTeX Companion for explanation.     Type  H <return>  for immediate help.      ...                                                        l.4 ...ne1.\item line2.\item line3.\end{itemize} }      How can i avoid such warning/error?


title: Balanced vertical padding in table & Why does \vphantom has width?

text: I think I have a simpler & better solution to these questions on how to add vertical padding to tabular cells so they looks less crammed. However, my solution which make use of `\vphantom` somehow produces unwanted horizontal space. So, I am asking for how to remove the horizontal space.               \documentclass{standalone}     \newcommand{\balancedVPhantom}[1]{ % gives minimum vertical size         \vphantom{$\vcenter{\hbox{\rule{0pt}{#1}}}$}     }     \newcommand{\newrow}{\balancedVPhantom{2em}\\ \hline}     \begin{document}     \begin{tabular}{|l|l|}         \hline         This row has normal space. \\ \hline         This row has balanced increased space.\newrow         \balancedVPhantom{2em}But why does vphantom has width? \\ \hline     \end{tabular}     \end{document}      ![output of the solution to balanced vertical padding in table](http://i.stack.imgur.com/AHiBx.png) As you can see, the last row is shifted to the right even though I use `\vphantom`.


title: fit nodes inside part of multipart shape (TikZ)

text: Is it possible to use the `fit` library to fit nodes only inside the the second half? # MWE:               \documentclass{article}          \usepackage{tikz}     \usetikzlibrary{shapes.multipart, fit}          \begin{document}         \begin{tikzpicture}[thick,             dot/.style={fill=blue,circle,minimum size=3pt}]                       \node[dot] (a) at (1,1) {};             \node[dot] (b) at (2,2) {};             \node[dot] (c) at (1,2) {};                  \node[draw, rectangle split,                  rectangle split parts=2,fit=(a) (b) (c)]                 {points: \nodepart{second}};              \end{tikzpicture}     \end{document}      # Result ![result](http://i.stack.imgur.com/OVaWM.png) # Hoping for ![what I'm looking for](http://i.stack.imgur.com/uksGL.png)


title: I cannot determine the error between hyperref and hypdvips

text: Look at the following Minimal Non Working Example. It's not correct, because the output pdf will be created. Nevertheless the logfile produces an error. It took me a lot of time and I am still not sure whether its my fault or not. I have downloaded a brand new MiKTeX 2.9.5105 distribution portable version and updated the package. I compile with dvi-ps-pdf batchfile Here is the MWE               \documentclass{scrreprt}     \usepackage[utf8]{inputenc} % Uses the utf8 input encoding     \usepackage{hyperref}     \usepackage{hypdvips}          \begin{document}     \chapter*{Impressum}     \chapter{Zu diesem Dokument}     Dieses Installationsanleitung erläutert alle Themen um den -Client installieren zu     können und ist als Leitfaden mit Zusatzinformationen aufgebaut. Bestimmte abgebildete windowsspezifische Programmelemente können in den Windowsversionen abweichen, gelten aber sinngemäß.      \section{Symbole und Auszeichnungen}          \section{Want to use command from package hypdvips}     \attachfile[description={MNWEB.log},flags=0000000001, mimetype=application/txt]{MNWEB.log}     \end{document}        The errorfile shows the following error.               LaTeX Info: Redefining \ref on input line 25.     LaTeX Info: Redefining \pageref on input line 25.     LaTeX Info: Redefining \nameref on input line 25.      [2               ]     Chapter 1.     ! Missing \endcsname inserted.     <to be read again>                     \@ne      l.29  \section               {Symbole und Auszeichnungen}     The control sequence marked <to be read again> should     not appear between \csname and \endcsname.          ! Missing \endcsname inserted.     <to be read again>                     \@ne      l.29  \section               {Symbole und Auszeichnungen}     The control sequence marked <to be read again> should     not appear between \csname and \endcsname.          ! Missing \endcsname inserted.     <to be read again>                     \BKM@style@\@ne       l.29  \section                   {Symbole und Auszeichnungen}     The control sequence marked <to be read again> should     not appear between \csname and \endcsname.          ! Extra \endcsname.     \KVS@ProcessorDefault ...sname KV@#1@#2\endcsname                                                    \unless \ifcsname KVS@#1@h...     l.29  \section                   {Symbole und Auszeichnungen}     I'm ignoring this, since I wasn't doing a \csname.               ! Package kvsetkeys Error: Undefined key `\BKM@style@\@ne  '.          See the kvsetkeys package documentation for explanation.     Type  H <return>  for immediate help.      ...                                                        l.29  \section               {Symbole und Auszeichnungen}     The keyval family of the key `\BKM@style@\@ne  ' is `BKM'.     The setting of the key is ignored because of the error.          Try typing  <return>  to proceed.     If that doesn't work, type  X <return>  to quit.          Package atveryend Info: Executing hook `BeforeClearDocument' on input line 30.     [3      If no one will see my fault, than it could be a bug, I will report after a view days. Best regrads EDIT2: Compile with this commands.               set B=C:\tex\miktex\bin\     set gs_path=d:\peter\Programme\gs\gs9.10\bin\     %B%latex --enable-write18 --src -interaction=nonstopmode --save-size=80000 MWE.tex     %B%dvips -P pdf -D1200 MWE.dvi"     %gs_path%gswin32c.exe -sPAPERSIZE=a4 -dNOSAFER -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOutputFileMWE.pdf -c save pop -f MWE.ps      Peter


title: Simplify itemize commands typesetting

text: If your document use `itemize` a lot of time, you are likely to get fed up putting `\begin{}...\end{}`. Is there any better way to do this? Something like a org mode of emacs use or lyx use?


title: Insert WMF file

text: I have a bunch of `.wmf` image files. Is there a way that I can insert those in a LaTeX document without having to convert them to `.eps` files? I am on Windows.


title: Troubles with a two column document using tufte-handout

text: I found a LaTeX minimal guide (originally written by Alan Munn), and trying to _translate it_ at the `tufte-handout` class I have a problem. I use an abstract environment that uses the full textblock width, and below lists of packages used for different tasks displayed in two columns. My problem is that the second column crashes with the abstract body and I don't know how to fix it. My code is:               \documentclass[twocolumn]{tufte-handout}     \usepackage[utf8]{inputenx}     \usepackage[T1]{fontenc}          \begin{document}          {\Large \textbf{Summary}}          \begin{abstract}     \begin{fullwidth}         This is a list of the packages that are in my opinion the most useful for writing papers and theses in linguistics. I have made no attempt to justify the choices, but I find almost all of these packages essential in my own work. The essential packages and the basic linguistics packages (relevant to your particular field) should probably be loaded in every document you write. Unless noted, all packages are part of \TeX{}Live and Mik\TeX{}.     \end{fullwidth}     \end{abstract}          \section{Essential packages} % (fold)     \label{sec:essential_packages}              \begin{itemize}             \item \texttt{geometry} set margins and general page layout             \item \texttt{inputenc} accented characters in your source1,2             \item \texttt{fontenc} accented characters in your output3,4             \item \texttt{fancyhdr} headers and footers             \item \texttt{array} improved tables             \item \texttt{booktabs} nice looking tables             \item \texttt{multicol} multiple column text             \item \texttt{graphicx} inclusion of graphics             \item \texttt{natbib} bibliography and citations5                    \end{itemize}     % section essential_packages (end)          \section{Packages for customizing the looks of things} % (fold)     \label{sec:packages_for_customizing_the_looks_of_things}              \begin{itemize}             \item \texttt{titlesec} customization of all section titles             \item \texttt{enumitem} customization of any list environment             \item \texttt{setspace} double and 1.5 spacing             \item \texttt{parskip} unindented paragraphs separated by blank lines         \end{itemize}        % section packages_for_customizing_the_looks_of_things (end)          \section{Font packages} % (fold)     \label{sec:font_packages}              \begin{itemize}             \item \texttt{mathptmx} Times (New) Roman             \item \texttt{mathpazo} Palatino             \item \texttt{helvet}  Helvetica         \end{itemize}          % section font_packages (end)        \end{document}      I'm working with Sublime Text 2 and TeXlive 2013. Thanks


title: Can LaTeX place text by mm coordinates?

text: My system generates LaTex letters and templates; however, my client has to fill out pre-built forms that they have no control over. I'd like to fill out these forms by measuring the coordinates in mm and then placing text using those coordinates in mm as the starting point. I can then print directly on top of the existing paper forms. Ideally I'd like the LaTeX to function something like below:               \command{x coordinate}{y coordinate}{text1}\\     \command{x coordinate}{y coordinate}{text2}\\     \command{x coordinate}{y coordinate}{text3}\\     \command{x coordinate}{y coordinate}{text4}\\     \command{x coordinate}{y coordinate}{text5}\\     \command{x coordinate}{y coordinate}{text6}\\      In the event the customer form changes I can just change the coordinates. Is this approach possible?


title: \renewcommand{\cite} does not work

text: I'm using `\cite` a lot in my document, but now I discovered that I really need `\citep` instead (from natbib). No problem, I thought, just redefine the `\cite` command:               \renewcommand{\cite}[1]{\citep{#1}}      That worked for the `LaTeX` version on my laptop (Mac), but on my Linux box this `\renewcommand` has no effect. How can I safely redefine the `\cite` command, so that it works on all LaTeX distributions? P.S.: The version where it didn't work is this:               pdfTeX 3.1415926-1.40.10-2.2 (TeX Live 2009/Debian)     kpathsea version 5.0.0      Update: After `\let` didn't work either (see answer) I found the source of the trouble: I had the `\usepackage{natbib}` command _after_ my `\renewcommand{\cite}` command. Changing the order fixed it.


title: alignat problem

text: Whenever I try to use the `alignat` environment, it doesn't seem to work on my computer! I tried the following simple code (my file had `\usepackage{amsmath}`):               \begin{alignat}{3}           \min \quad x_1        & + 2x_2 & + 4x_3 &      &   & \\           \text{s.t.} \quad x_1 & + x_2  & + 3x_3 & =    & 5 & \\           2x_1                  & + x_2  & + 6x_3 & =    & 8 & \\           x_1                   &, x_2   &, x_3   & \geq & 0 & .       \end{alignat}      On compilation, I get the following error:                   ! Missing # inserted in alignment preamble.  <to be read again>                       \crcr l.114   \end{alignat}      Any ideas why this might be?


title: Need help to understand xkeyval example

text: I found an "easy" example how to use xkeyval here using the following code:               \ProvidesPackage{myemph}[2011/03/12 v1.0 a test package]          \providecommand\my@emphstyle{\em}          % Note that the argument must be expandable,     % or use xkvltxp package before \documentclass (see manual of xkeyval)     \RequirePackage{xkeyval}     \DeclareOptionX{style}{%     \def\my@emphstyle{\csname my@style@#1\endcsname}}     % predefined styles     \providecommand\my@style@default{\em}     \providecommand\my@style@bold{\bfseries}          \ProcessOptionsX          % For simple key-value commands, keyval would suffie     \define@key{myemph}{code}{%       \def\my@emphstyle{#1}}     \define@key{myemph}{style}{%       \def\my@emphstyle{\csname my@style@#1\endcsname}}     \newcommand\setemph[1]{%       \setkeys{myemph}{#1}}          \renewcommand\emph[1]{%       {\my@emphstyle #1}}          \endinput      Test file:               \documentclass{article}     \usepackage[style=default]{myemph}          \begin{document}     Something \emph{important}          \setemph{style=bold}     Something \emph{important}          \setemph{code=\Large\sffamily}     Something \emph{important}     \end{document}      My first issue is that I dont know what is ment by               \providecommand\my@emphstyle{\em}      I found here and here that usually '@' is a letter of category 12 and not 11 and, therefore, can't be used in macros, except you manualy set '@' to category 11, which has not been done in the above code. However, I can compile the latex code. Why does it work? After ignoring this, I moved on to the line               \DeclareOptionX{style}{%     \def\my@emphstyle{\csname my@style@#1\endcsname}}      which gave me the pleasure to explore what \csname does. As far as I understood, it is used to use commands that make use of letters that are not contained in category 11. However, the function '\my@style' has not been definied yet, so I dont see what is happing there. In addition, I do not know what \DeclareOptionX does anyway. I could not find it with google. After all, I read the offical documentation of the xkeyval package where it was explained how to used it, simply by using the commands '\define@key' and '\setkeys' on page 1. I guess its my bad that I was looking for an easy example to skip the documentation. However, now I am curious how the 'simple' example works.


title: characters ">>" in LaTeX

text: I'm writing about programming language Haskell and I need to describe operators named `>>=` and `>>`. I wrap all references to names from the programming language in `\texttt{ ... }`, for example:               We use operator \texttt{+} to add two numbers.      But when I write `\texttt{>>}`:               We use operator \texttt{>>} to sequence two actions.      I got the "much greater than" sign, which is not what I want (see the image). I found some questions asking similar problem (“<<” sign in Latex), but the solutions proposed there don't work for me: ![Various approaches and how are they rendered](http://s11.postimage.org/5ebbvd5kz/Screenshot_02052013_01_50_53_PM.png) The only solution I found is to break `\texttt{>>}` to `\texttt{>}\texttt{>}`, but it gets painful when I use longer expressions; for example:               To sequence many actions, use \texttt{a1 >> a2 >> a3 >> ... >> a4}      must be broken to               To sequence many actions, use \texttt{a1 >}\texttt{> a2 >}\texttt{> a3 >}\texttt{> ... >}\texttt{> a4}      I'd rather avoid using `\verb`, because:   1. I want to be consistent with the rest of the text using `\texttt`   2. I sometimes need to use formatting in the code snippets to emphasize a variable or something P.S.: I do use               \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}


title: Use of align for multiple alignments needing right-alignment

text: I am currently having issues with the display of this equation below. The code I have inserted is using `align` but I have also tried using `eqnarray`, (which has right-alignment but is deprecated), and am now at the point of considering using a table. The alignment here doesn't appear to do as the documentation says, and when I add extra &'s I can get the format slightly better but not exactly as I want. To be clear, it is the right-alignment of the second column that is giving me most trouble. Code:               \begin{align*}     &\frac{2^{1+k/2}}{k!} &< 1\\     \Leftrightarrow &2^{1+k/2} &< k!\\     \Leftrightarrow& (\sqrt{2})^k\cdot 2 &< \left(\frac{k}{e}\right)^k \sqrt{2 \pi k}     \end{align*}      What it looks like now: ![enter image description here](http://i.stack.imgur.com/cLi2e.png) What I want it to look like: ![enter image description here](http://i.stack.imgur.com/uHiXJ.png)


title: Bibtex plain style for biblatex

text: > **Possible Duplicate:**   >  How to emulate the traditional BibTeX styles (plain, abbrv, unsrt, alpha) > as closely as possible with biblatex? In `bibtex` I use:               \bibliographystyle{plain}      I switched to `biblatex`. I'm trying:               \usepackage[backend=biber,style=plain]{biblatex}      It doesn't work. `style=ieee` and `style=apa` works but I want to have `plain` style in `biblatex`. Is that possible?


title: Multiple alignments

text: If I have a string of equations whose equal signs are aligned and one of the equations is too long and needs to span multiple lines, how do I create a second alignment. For instance, in the following example               \begin{align*}         f(x)&=eqn1\\             &=eqn2_part1+eqn2_part2\\              &           +eqn2_part3\\             &=eqn3\\              &=eqn4\\       \end{align*}      How do I align the equals signs and the plus signs.


title: Can I mark specific lines in lstlisting?

text: I want to give listings and somehow mark a particular set of lines. My preference would be to make them italic. (The purpose of wanting to do this is so I can say "these lines are required but you do not yet need to understand them"). I am open to other ways of marking the lines (bold, putting a star next to them etc. How should I go about doing this?


title: Problem with environments, arabic and tikz

text: Here a question also about my last topic. I want to create an environment that put a pretty box around my theorem and its title. Here is a code with the desired output :               \documentclass{report}               \usepackage[utf8]{inputenc}     \usepackage[english, arabic]{babel}     \usepackage{amsmath, amsfonts, amssymb, amsthm}     \usepackage{tikz}          \usepackage{etoolbox}     \AtBeginEnvironment{tikzpicture}{\selectlanguage{english}}     \tikzset{font=\selectlanguage{arabic}}               \begin{document}               \tikzset{         mybox/.style={             draw=red, fill=blue!20, very thick,             rectangle, rounded corners, inner sep=10pt, inner ysep=20pt         },         fancytitle/.style={                 draw=red, fill=blue!20, text=black, rectangle, rounded corners         }     }     \begin{tikzpicture}     \node [mybox] (box){%     \begin{minipage}{.89\textwidth}          لتكن $f$ دالة مستمرة على المجال $[a,b]$ و قابلة للإشتقاق على $]a,b[$,      حيث $f(a)=f(b)$.     إذن, يوجد عدد حقيقي $c \in ]a,b[$ حيث      $$     f^\prime(c)=0.     $$     \end{minipage}     };     \node[fancytitle, left=10pt] at (box.north east) {\AR{نظـريـة}};     \node[fancytitle, rounded corners] at (box.east) {$\clubsuit$};     \end{tikzpicture}%               \end{document}      Now, if I create the environment `tamtam` to obtain a good looking box around my Arabic text, it doesn't do it               \documentclass{report}               \usepackage[utf8]{inputenc}     \usepackage[english, arabic]{babel}     \usepackage{amsmath, amsfonts, amssymb, amsthm}     \usepackage{tikz}          \usepackage{etoolbox}     \AtBeginEnvironment{tikzpicture}{\selectlanguage{english}}     \tikzset{font=\selectlanguage{arabic}}               \newenvironment{tamtam}[1]{%     \tikzset{         mybox/.style={             draw=red, fill=blue!20, very thick,             rectangle, rounded corners, inner sep=10pt, inner ysep=20pt         },         fancytitle/.style={                 draw=red, fill=blue!20, text=black, rectangle, rounded corners         }     }     \begin{tikzpicture}     \node [mybox] (box){%     \begin{minipage}{.89\textwidth}     #1     \end{minipage}     };     \node[fancytitle, left=10pt] at (box.north east) {\AR{نظـريـة}};     \end{tikzpicture}%     }{}%               \begin{document}               \begin{tamtam}               لتكن $f$ دالة مستمرة على المجال $[a,b]$ و قابلة للإشتقاق على $]a,b[$,      حيث $f(a)=f(b)$.     إذن, يوجد عدد حقيقي $c \in ]a,b[$ حيث      $$     f^\prime(c)=0.     $$          \end{tamtam}          \end{document}      NB: you have to let 2 empty lines between `\begin{tamtam}` and the Arabic text to get a readable Arabic output !!??


title: How to remove the space between the context and the section?

text: \documentclass{article}     \usepackage{fontspec}     \usepackage{ulem}     \setmainfont[BoldFont=黑体]{宋体}     \makeatletter     \renewcommand\subsubsection{\@startsection      {subsubsection}{2}{1em}%name, level, indent      {-\baselineskip}%             beforeskip      {0.5\baselineskip}%            afterskip      {\normalfont\normalsize\itshape}}% style     \makeatother          \makeatletter     \renewcommand\subsection{\@startsection      {subsection}{1}{1em}%name, level, indent      {-\baselineskip}%             beforeskip      {0.5\baselineskip}%            afterskip      {\normalfont\normalsize\itshape}}% style     \makeatother     \begin{document}          \begin{center}     {\Huge\bf 实验报告} \\ [15mm]     \end{center}     \noindent     {\large 课程名称: \makebox[48mm]{\uline{\hfill J2EE应用与开发\hfill}} \space {\large 开课学期：\makebox[40.1mm]{\uline{\hfill 2014年春季学期\hfill}}}} \\ [4mm]     {\large 班级：\makebox[57.2mm]{\uline{\hfill 2011级计算机科学与技术3班\hfill}} \space     {\large 姓名： \makebox[47mm]{\uline{\hfill 某某某\hfill}}}} \\ [4mm]     {\large 学号：\makebox[57.2mm]{\uline{\hfill 020332011xxx\hfill}} \space {\large 联系方式：\makebox[40.1mm]{\uline{\hfill 183××××××××\hfill}}}}\\[4mm]     \noindent     \section{实验名称}     \subsection*{Java面向对象特性}     \section{实验目的}     \subsection{熟悉 Java 开发工具 Eclipse 的安装和使用。}     \subsection{理解面向对象编程的封装、多态、继承等特点。}     \subsection{掌握面向对象技术的编程方法。}          \section{实验要求}     \makeatletter     \renewcommand\thesubsubsection{\textbullet}     \renewcommand\thesubsection{\textbullet}     \renewcommand\subsection{\@startsection      {subsection}{1}{0em}%name, level, indent      {\baselineskip}%             beforeskip      {\baselineskip}%            afterskip      {\normalfont\normalsize\itshape}}% style     \makeatother     \subsection{实验一(必做)}     \subsubsection*{下载并安装 Java 开发环境 Eclispe,熟练应用 Eclipse。}     \subsubsection{熟悉 Eclipse 的基本菜单项,各类视图}     \subsubsection{操作创建 Java 项目。}     \subsubsection{操作创建 Java Class、Interface 等。}     \subsubsection{掌握 Eclipse 的程序调试方法。}     \subsection{实验二(必做)}     \subsubsection*{设计一个银行账户类,其中包括:}     \subsubsection{账户信息,如帐号、姓名、开户时间、身份证号码等。}     \subsubsection{存款方法。}     \subsubsection{取款方法。}     \subsubsection{其他方法如“查询余额”和“显示账户信息”等。}     \subsubsection*{用字符界面模拟存款和取款过程。}          \makeatletter     \renewcommand\subsection{\@startsection      {subsection}{2}{1em}%name, level, indent      {-\baselineskip}%             beforeskip      {0.5\baselineskip}%            afterskip      {\normalfont\normalsize\itshape}}% style     \renewcommand\thesubsection{\thesection.\arabic{subsection}}     \renewcommand\thesubsubsection{\thesubsection.\arabic{subsubsection}}     \makeatother     \section{问题分析}     \section{实验过程、步骤及原始记录}     \section{实验结果}     \section{实验中遇到的问题及解决方法}     \end{document}


title: PDF Bookmarks appear correctly but don't link anywhere

text: I want to use PDF bookmarks with LaTeX->PS->PDF (with MiKTeX 2.9 on Windows 8.1 with DviPs and Ghostscript). The bookmarks appear correctly in the PDF, but clicking them does nothing. If I use pdflatex to compile the same document, the bookmarks appear and work correctly when being clicked. I also tried another document not written by myself which also works in pdflatex but not with latex. I don't get any error or warning concerning bookmarks or hyperref. I included the following packages last:               \usepackage[ps2pdf]{hyperref}     \usepackage{bookmark}      I also tried just `\usepackage{hyperref}`instead of the ps2pdf one. In my document, the structure is as follows:               \chapter{Chapter}\label{cha:Chapter}     \section*{Section}\label{sec:Section}     \subsection{Subsection}\label{sec:Subsection}      Any help would be very appreciated. Edit: Here is a minimal working example:               \documentclass[11pt, a4paper, twoside, fleqn, ngerman]{scrreprt}          \usepackage[ps2pdf]{hyperref}     \usepackage{bookmark}          \begin{document}          \chapter{Chapter 1}\label{cha:Chapter1}          \section*{Section 1}\label{sec:Section1}     Text here          \newpage          \section*{Section 2}\label{sec:Section2}          \newpage     \chapter{Chapter 2}\label{cha:Chapter 2}          \end{document}


title: How to be 100% sure what you see is what everyone else sees?

text: I have been writing my formal documents, such as scientific publications, professional CV, cover letter and so on, with TeX. Basically, **I write every important document with TeX.** # Whistle-blower Recently during a paper submission, the format checker tells me that my document may appear in an unexpected way because I have not embedded all the fonts to the document itself. I successfully embedded all the fonts in by doing the "reexporting it as another PDF" trick. # Concern raised Alerted by this incident, I suddenly realise that **TeX-rendered documents still cannot guarantee what you see is what _everyone_ else sees**, although it does a much better job than Word. However, like I've said before, **all my TeX-rendered files are important files that I must make sure everyone else on any other computer must see the document just as I see it.** (e.g., I would never wish to see my CV gets screwed up when opened on the admission committee's don't-know-which-OS-or- how-old computer) # Questions Besides the "embedding all the fonts" pitfall, what are other pitfalls that make my TeX-rendered documents look different? How may I avoid them, if any?


title: Inserting simple figures in a document

text: I am simply trying to insert some figures in my tex document. I know this is very basic, I also have been following a latex guide, searching for question on stackexchange and asked around. I wrote these two simple pieces of code. The first one for putting two figures one close to the other. The second one for simply plotting a figure.               \documentclass[12pt,a4paper,oneside]{article}     \usepackage{graphicx}     \usepackage{subfigure}     \usepackage{graphics}     \begin{document}          \begin{figure}[htbp]                 \centering     \subfigure[{A}]     {\includegraphics{C:/Users/Me/Dropbox/Me again/Figure A.png}}\qquad\qquad     \subfigure[{B}]     {\includegraphics{C:/Users/Me/Dropbox/Me again/Figure B.png}}     \caption{Try}     \end{figure}               \begin{figure}[htbp]                     \centering     \includegraphics{C:/Users/Me/Dropbox/Me again/Figure A.png}     \caption{Try again}     \end{figure}               \end{document}      I get error messages like "Figure A not found", and/or "cannot determine size of Figure A". Moreover, if I compile a .tex fil with only the figures (without the rest of the paper, as in the example above), it gives me similar results, but sometimes it plots the image in a completely wrong position and way. Two points: 1) is this due to the .png format ? 2) is this due to the fact that the figures are NOT in the same folder of the .tex file? If this is the case, is there a way to avoid to copy everything in the folder of the .tex file? If can helps, I am using MikTex, Texnic center and Texworks


title: Where does LaTeX loose its breath?

text: LaTeX is a markup(typesetting) language typically used to typeset books. It has got a huge collection of classes and packages to work with. Now, obviously, LaTeX cannot be compared to Adobe Products(like Photoshop), but using **TikZ** or **pstricks** , drawings under the _engineering_ domain can be drawn with ease and perfection. LaTeX also provides many other features where Microsoft Word Lacks or rather it becomes tedious to implement like IEEE template. Now my question is, taking into all these considerations, where does LaTeX lack?Is there something that LaTeX misses out?Or becomes too tedious too implement?I am posting this question, on a thought based on my professor's quote: "What ever you do, there is always a room for improvement!"


title: Problems with bibtex

text: I am using TeXmaker and Jabref. When compiling, texmaker creates the proper bibliography page that I want but in addition to that also another page with heading Bibliography and only bibliography number. Below you can seen the pages created by texmaker. I am using `\usepackage[nottoc]{tocbibind}` to show bibliography in ToC and               \bibliographystyle{siam}     \bibliography{Bibliography}     \include{references}      and in the references file i use only `\cite{Name}` and nothing else. Does anyone know how to get rid of the second page? THANKS A LOT ![enter image description here](http://i.stack.imgur.com/jYZQf.png) ![enter image description here](http://i.stack.imgur.com/lcs0h.png)