title: Why does pdflatex/dinbrief produce a US letter page for this input?

text: I want to write a simple letter using the dinbrief class but cannot get it to produce a DIN A4 page. The minimal example is this:               \documentclass[11pt,a4paper]{dinbrief}     \usepackage{german}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage{eurosym}     \begin{document}     \subject{Some subject}     \backaddress{Me, some address}     \signature{Me again}     \Datum{Someplace}     \address{my name\\someplace\\some city}     \begin{letter}     {Other guy\\     his city}     \opening{Dear pdfLaTeX,}          why don't you produce the proper page size?          \closing{Kind regards}     \end{letter}     \end{document}       This produces a US letter sized document when I run `pdflatex document` from the terminal. I run ubuntu 12.04 with texlive-full packages installed and updated. I would assume the a4paper option in the header is pretty unambiguous... Am I missing something obvious?


title: Dummy code box in LaTeX

text: I am not used to work in TeX and I need to write a dummy code box like in this style. I am not entirely sure how to replicate this style. I found some code boxes, but not in this structure that I want ![enter image description here](http://i.stack.imgur.com/IfItJ.png)


title: huge table + footnote-ish thing

text: I have a book, which is basically a 100-page table. I use xtab package to layout this book. The book has a list of 100-ish definitions, which are referenced multiple times in the table. Think of a bank commission table, where there are many footnotes referenced multiple times, eg. 1) for this thing You need to have a gold credit card, 2) for this thing You need to have $1M in Your account, etc. The numbering of the definitions is fixed (Say, this is a legal document). The definitions can have arbitrary numbering (like "1", "W" , "III"). What I want to be able to do, is for each of the definitions _that are referenced on the page_ have them appear as footnotes (or something that resembles footnotes visually). Is this doable? Or at least partially doable?


title: Best practice for getting "If not foo" conditionals

text: So, here are two ways you might set things up such that `\dostuff` is done when `foo` is false. ### The "new conditional" method If you know when `foo` is going to be set, then after that do:               \newif\ifnotfoo     \iffoo\notfoofalse\else\notfootrue\fi      And then use the `\ifnotfoo` test.               \ifnotfoo\dostuff\fi      ### The "else" method Whenever you need to `\dostuff`, just do:               \iffoo\else\dostuff\fi      Is either method recommended over the other? If so, why? (Or is there another method which is even better?


title: Error Message: "tex: fatal: Could not undump 1 4-byte item(s) from"

text: if I try to run tex on Fedora Linux I always get an error message:               "tex: fatal: Could not undump 1 4-byte item(s) from /usr/share/texliv/texmf-var/web2c/tex/tex.fmt."      I removed and reinstalled texlive several times but that did not solve the problem. I think this happened after I installed the german language packs with:               sudo yum install hyphen-de tex-hyphen-german      I tried it with different .tex files which have worked before. I'd be grateful for any help.


title: Margins/Borders in the figure environment

text: I am designing a poster using the beamerposter package. Many of the blocks I have on this poster have, as to be expected, figures. My problem is that, in many cases, the figures are at the end of the block, and they leave a few lines of emptiness before the next block begins. This is especially ugly in comparison with blocks ending with text.   I have read somewhere that the figure environment, as well as other floats, comes with margins. What I haven't found yet is a way to avoid that. Any help in this matter would be appreciated. Here is a MWE, adapted from the examples at http://www-i6.informatik.rwth- aachen.de/~dreuw/latexbeamerposter.php:               \documentclass[final]{beamer}     \mode<presentation>     {       \usetheme{I6dv}     }     \graphicspath{{figures/}}          \usepackage{times}     \usepackage{amsmath,amssymb}     \usepackage[english]{babel}     \usepackage[latin1]{inputenc}     \usepackage[orientation=portrait,size=a2,scale=1.4,debug]{beamerposter}  % e.g. custom size poster       \title[Fancy Posters]{Making Really Fancy Posters with \LaTeX}       \author[Dreuw \& Deselaers]{Philippe Dreuw and Thomas Deselaers}       \institute[RWTH Aachen University]{Human Language Technology and Pattern Recognition,RWTH Aachen University}       \date{Jul. 31th, 2007}          % added packages     \usepackage{hyperref}     \usepackage{longtable}     \usepackage{multirow}     \usepackage[percent]{overpic}     \usepackage{lipsum}          \begin{document}       \begin{frame}{}               \begin{block}{\large Block with Figure}           \justifying           \lipsum[1]           \begin{figure}[h]             \centering             \begin{longtable}[c]{m{0.17\linewidth} m{0.23\linewidth} m{0.23\linewidth} m{0.23\linewidth}}               \multirow{2}{*}[-40]{two rows should be enough right now} &               \begin{overpic}{figures/example.jpg}                 \put(70,90){fat cat}               \end{overpic} &               \begin{overpic}{figures/example.jpg}                 \put(70,90){fat cat}               \end{overpic} \\               & \begin{overpic}{figures/example.jpg}                 \put(70,90){fat cat}               \end{overpic} &               \begin{overpic}{figures/example.jpg}                 \put(70,90){fat cat}               \end{overpic}             \end{longtable}             \caption{Example figure showing my fat cat.}           \end{figure}         \end{block}              \begin{block}{\large Next Block}           \lipsum[2]         \end{block}       \end{frame}     \end{document}      Screenshot of the relevant part of the MWE result: ![Screenshot of part of a beamerposter where the end of the block contains too mcuh white space.](http://i.stack.imgur.com/VxRRG.jpg)


title: babel arabic changes enumeration level

text: I am trying to add a few short words of Arabic to my English document. This is working, by and large:               \documentclass[fontsize=12pt,paper=a4]{scrartcl}          \usepackage[LAE,T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage[arabic,english]{babel}          \begin{document}          \section{Introduction}     It is called \AR{بحر لوط} (\emph{Bahr L\={u}t}), the Sea of Lot.          \end{document}      The only problem is that \section is rendered as "0.1 Introduction", when it should be "1 Introduction". When I change               \usepackage[arabic,english]{babel}      to               \usepackage[english]{babel}      i.e. remove arabic, enumeration works exactly as expected. Is that a known side effect of the babel package? Can anybody confirm? More importantly, what to do about it? I suppose I could use `\chapter` instead of `\section`, but I'd rather not. I am open to alternative solutions however, all I need is a reliable way to add `بحر لوط` to my PDF (preferably without having to resort to LuaTeX or XeTeX).


title: Continue Page Numbers in Appendix

text: I am writing a thesis using LaTex and I was told that my numbering cannot restart in the Appendices, which seems wrong to me but I'm not going to argue it. I am using the report class and the appendix command. It seems that the appendix command restarts the numbering when it is used. However, I would like to use the appendix command but not reset my page numbers.               \documentclass[12pt]{report}     \usepackage {fancyhdr}     \usepackage{graphicx, amssymb, changepage}     \usepackage{rotating}     \usepackage{setspace}     \usepackage{pgnumchapter_nums}     \usepackage{titlepg}     \usepackage{outlines}     \usepackage{appendix}          %              this is for the list of symbols page, if desired     \def\listofsymbols{\input{symbols} \clearpage}     \def\addsymbol #1: #2#3{$#1$\> \parbox{5in}{#2 \dotfill  \pageref{#3}}\\}     \def\newnot#1{\label{#1}}     %     \pagestyle{fancy}     % \fancyhead[LE,RO]{helv \thepage}     \fancyhead[L,R]{helv \thepage}     \setlength{\headheight}{15.2pt}     %%test this          %\fancyhead[LE,RO]{\thepage\hspace{2em}\footnotesize{\leftmark}}  % try this to move over header          \addtolength{\voffset}{-4em}                                % May2009 added this to move page number up a bit               \doublespacing          \lhead{}     \chead{}     \rhead{\thepage}     \lfoot{}     \cfoot{}     \rfoot{}          \renewcommand{\headrulewidth}{0 pt}          %this prints a line under the header     \renewcommand{\footrulewidth}{0  pt}         %this prints a line under the footer               \renewcommand{\contentsname}{\normalsize{Table of Contents}}     \renewcommand{\listfigurename}{\normalsize{List of Figures}}     \renewcommand{\listtablename}{\normalsize{List of Tables}}     \renewcommand{\bibname}{\normalsize{Bibliography}}     \renewcommand{\indexname}{\normalsize{Index}}                    \pdfpagewidth 8.5in     \pdfpageheight 11in           \setlength{\textheight}{8.5in}      \setlength{\oddsidemargin}{0.5in}       \setlength{\evensidemargin}{0.5in}      \setlength{\textwidth}{6.0in}     \setlength{\topmargin}{0.in}         \setlength{\headheight}{0.5in}     \setlength{\headwidth}{6.0in}     \setlength{\headsep}{0.65in}                                      \setlength{\parindent}{12mm}                    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     %%%     %%%  This begins the frontmatter of the document, everything preceding the body      %%%     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%               \begin{document}          \pagenumbering{roman}          \thesistitlepage          \thesiscopyrightpage                        \addcontentsline{toc}{chapter}{Abstract}                                % added May2009     \thesisabstract                         \addcontentsline{toc}{chapter}{Acknowledgments}                 % added May2009     \thesisacknowledgments          \makeatletter \renewcommand{\@dotsep}{10000} \makeatother               \renewcommand{\contentsname}{\normalsize{Table of Contents}}      % added this line May2010 to fix issue with      \tableofcontents                                                 %toc appearing in too large a font size when used in Linux                         \newpage        % added June 2009               \newpage     % added June2009     \addcontentsline{toc}{chapter}{List of Figures}                     % added May2009     \listoffigures                    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     %%%     %%%  This begins the body of the document     %%%     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%               \newpage     \pagenumbering{arabic}               \include{chapter1}          \include{chapter2}          \include{chapter3}          \include{chapter4}          \include{chapter5}          \include{chapter6}          \addappheadtotoc     \include{chapter7}          \pagenumbering{arabic}     \appendix     %\appendixpage     \renewcommand\chaptername{Appendix}     \include{appendixA}          \include{AppendixB}          \bibliographystyle{plain}     \newpage     \addcontentsline{toc}{chapter}{Bibliography}        % added May2009     \nocite{*}     \bibliography{source2}               \end{document}      Any help in this matter would be great. Thanks!


title: What package should I use to typeset units?

text: I know there are a few packages related to typesetting units:   * `unitsdef`   * `units`, which can be seen as a "base package" used by `unitsdef`   * `SIunits`   * `siunitx`, which is the successor to `SIunits`   * maybe others? like `cjwunits` and `hepunits` **What is the difference between them? Do they also work inside Math mode? And, more importantly, which one should I use?** Suggestion for people trying to answer this question: show some examples of how to typeset both simple and complex units. For instance, try typesetting these items:   * 100 Celsius   * 3 x 10^5 km/s   * gravitational constant is measured in N m^2/kg^2   * 10 kHz = 1 s^{-4}   * sin(x) meters I think these examples cover most needs when writing scientific texts: simple measurements (value + simple unit), values written in scientific notation, simple fractional units, complex fractional and squared units, units without any value accompanying them, units with arbitrary exponents, and arbitrary math code instead of a simple value.


title: Logic tree with tikz-tree -- placing nodes on specific places

text: I am trying to reproduce the following with tikz: ![enter image description here](http://i.stack.imgur.com/UUwXT.jpg) And also: ![enter image description here](http://i.stack.imgur.com/rPA9L.jpg) Regarding the first image I could start with:               \documentclass{article}     \usepackage{tikz-qtree}     \usepackage{tikz-cd}          \tikzstyle{every picture}+=[remember picture]          \begin{displaymath}     ((\neg Qb \wedge x (Px \rightarrow Qx))      \tikz[baseline]\node (n1)     {$\rightarrow$}; \neg Pb)     \end{displaymath}               \begin{displaymath}     (\neg Qb \wedge \tikz[baseline]\node (n2) {$\forall$};x      (Px \rightarrow Qx)) \qquad \tikz[baseline]\node (n3) {$\neg Pb$};     \end{displaymath}               \begin{tikzpicture}[overlay]          \draw (n1) -- (n2);      \draw (n1) -- (n3);                \end{tikzpicture}          \end{document}      The result, however, is far from elegant, and I do not know how to proceed from that: ![enter image description here](http://i.stack.imgur.com/Ztjud.png)


title: hspace doesn't work. Depth

text: I need to locate my text in such way. At first, I have some formula. There must be a little indent.               $bla-bla-bla$ \\      Then I have another formula, but the indent must be bigger.                  $bla-bla-bla$ \linebreak      An so on. It looks like the depth of the recursion.                  $bla-bla-bla$ \\                 $bla-bla-bla$ \\                    $bla-bla-bla$ \\             $bla-bla-bla$  \\             $bla-bla-bla$  \\                  $bla-bla-bla$  \\                  $bla-bla-bla$   \\      How can I do it? I try to use \hspace, but it works only at the beginning.


title: Roman numerals in sans serif fonts

text: Inspired by a question, that unfortunately has been deleted by the OP after getting some hints from me in a comment. Lacking serifs the Roman numerals in sans serif fonts look sometimes a bit strange. Do you have some ideas for a workaround?


title: PGFPlots: Logarithmic axes and scaling

text: I'm trying to plot some data where the X axis is logarithmic. The data runs from ~30 microseconds up to 10 milliseconds. It looks much cleaner to have the x-ticks looking like               {0.1 ms, 1 ms, 10 ms}      than               {10^-4 s, 10^-3 s, 10^-2 s}.      In other words, I would like my tick labels to be presented in fixed point (i.e., not as exponentials), and scaled (multiplied by 1000). To achieve this effect, I've tried using               \documentclass{standalone}     \usepackage{pgfplots}     \begin{document}     \begin{tikzpicture}       \begin{semilogxaxis}         [xmin=1e-6, xmax=1e-3, domain=1e-6:1e-3,         scaled x ticks=real:1e-3,         xtick scale label code/.code={},         log ticks with fixed point]         \addplot {x};       \end{semilogxaxis}     \end{tikzpicture}     \end{document}      but logarithmic axes seem to ignore the "scaled x ticks" instructions. Any help would be much appreciated. Thanks,


title: CTAN : raw datas for user

text: I would like to add in my long CV (not my short CV) the list of package I maintain in CTAN. Is there somewhere a file where I could make a request, to:   * obtain the list of package I am associated   * have some information for each package : maintenance status, name, short description. For example an XML file?


title: change title font and text font for preparing IEEE poster

text: I had prepared a paper for an IEEE Conf. Now, it's required to prepare a poster for presenting my work. Some of guidelines of preparing poster are as follow:   1. Poster Space: Plan on using an area that consists of two side-by-side bulletin boards, each 1.2 m tall x 2.4 m wide (4 × 8ft). 2.The title of your paper should appear in block letters, which are at least 10 cm high (4 in). The remaining text should be at least 5 cm high (2 in) to be easily legible to viewers who are standing as far as 2 meters away. Each graph or chart should be at least 27 × 21 cm (11 × 8.5 in) with text that is also readable from 2 meters away.Provide an Introduction or Outline, and Summary or Conclusion. How can I change my paper size from a4 to guideline1? I added the following line `\special{papersize=120cm,240cm}` to change my paper size. How can I change title and text font size? this is my title : `\title{\LARGE My Title}` and how can I change its font size?


title: Lyx is ignoring typewriter font setting for program listings

text: I'm using Lyx's **Insert|Program Listing** to insert a code listing into my document. Unfortunately, Lyx seems to ignore the Typewriter font selection I made in **DocumentOptions** under **Fonts ⇒ Typewriter**. Interestingly enough, typewriter font does come out correctly elsewhere, but not in program linstings. Can someone help me figure out why? I'm using Lyx 2.0.2 and am using XeTeX for output.


title: TikZ/PGF \closedcycle to y axis

text: Consider the following MWE:               \documentclass{article}     \usepackage{tikz, pgfplots}     \begin{document}     \begin{tikzpicture}         \begin{axis}             \addplot [domain=0.7:1.6,samples=20, fill=red!50!white]                  {(1.5*x - 4.5)^2/(10*x) + 1} \closedcycle ;             \addplot [domain=0.7:1.6,samples=20, blue, very thick]                  {(1.5*x - 4.5)^2/(10*x) + 1}                  node[at start, above, black] {$(x1,y1)$}                  node[at end, above, black]   {$(x2,y2)$};         \end{axis}     \end{tikzpicture}     \end{document}      which produce this ![enter image description here](http://i.stack.imgur.com/6O2YL.png) What I want is to   1. Fill the area between the blue curve and the x-axis (red fill)   2. Fill the area between the blue curve and the y-axis, that is, indicating the region interval y2 to y1 on the y-axis.  I was hoping there is some way to specify `\closedcycle` with respect to the y-axis or similar. A solution could of course be to calculate the points `(x1,y1)` and `(x2,y2)`, but it feels very un-`TikZ`y. (This means that there will be a white rectangle defined by the origin, (x1,0), (x1,y2) and (0,y2))


title: Sorting to match a given list

text: I am looking for ideas on the following task. I want to sort the entries in `\listb` to those in `\lista`. It cannot always be assumed that only the elements of `\lista` are in `\listb`; neither can it be assumed that all the elements of `\lista` are in `\listb`.               \def\lista{a,b,c,d} % no 'e,f,g,h' in \lista     \def\listb{c,e,a,h,f,g,b} % no 'd' in \listb      Here, I want `\listb` to be become `{a,b,c,e,h,f,g}`. Note: `e,h,f,g` in the resulting `\listb` should follow their 'partial ordering' in the original `\listb`, i.e., how they were ordered in original `\listb`.


title: How to embed verbatim in pspicture?

text: I'm trying to insert a QR code at the beginning of my thesis with the contents being the BibTeX entry for it. Any way of embedding the raw text in `\psbarcode`?               \documentclass[a4paper,12pt]{minimal}          \usepackage[utf8]{inputenc}     \usepackage{pst-barcode}     \usepackage{auto-pst-pdf}          \begin{document}       \begin{pspicture}(1.378in, 1.5in)         \psbarcode{           \begin{verbatim} % won't work     @MastersThesis{,       author = {J\'ulio ...},       title = {...},       year = {...},       ...     }           \end{verbatim}         }{}{qrcode}       \end{pspicture}     \end{document}      It seems the fancyvrb package provides a `BVerbatim` environment for this.


title: How to draw something only in the magnified area (TikZ: spy library)?

text: I wonder if it is possible to draw parts of the images only in the maginfied node printed with `\spy`?               \documentclass[        border=2cm,     ]{standalone}          \usepackage{tikz}     \usetikzlibrary{calc,fit,spy}          \tikzstyle{caption}=[%        green!70!black,        <->,        every node/.style={%           inner sep=3pt,fill=white,midway,sloped        }     ]     \tikzstyle{hide}=[opacity=0]          \begin{document}     \begin{tikzpicture}[%        spy using outlines={circle, magnification=4, size=1.5cm, connect spies},        every spy in node/.style={hide/.style={opacity=1}};     ]        \fill [gray] (0,0) rectangle (2,3);        \fill [hide,green] (0,0) circle (1pt);     %   \tikzset{execute at begin scope={\tikzset{hide/.style={opacity=1}}}}        \spy on (0,0) in node at (-2,1);     \end{tikzpicture}     \end{document}      The green circle should only appear in the magnified part. ![example 1](http://i.stack.imgur.com/csiWu.png) I tried to use the style `hide` to hide an object in the main image and redefine `hide` in the magnified part to become visible. But neither my `every spy in node` way nor the `execute at begin scope` way give any result. * * * Frédéric’s solution works fine for the simple case where the object to draw lies in the center of the spy node but it doesn’t care about the magnification (i.e. I must calculate the scale factor for the radius manually) and it doesn’t work with more complex images. It would be great if I can access the (magnified/scaled) coordinates of the original image in the magnification. Here’s a second example showing why Frédéric’s solution won’t work …               \documentclass[        border=2cm,     ]{standalone}          \usepackage{tikz}     \usetikzlibrary{calc,fit,spy}          \tikzstyle{caption}=[%        green!70!black,        <->,        every node/.style={%           inner sep=3pt,fill=white,midway,sloped        }     ]     \tikzstyle{hide}=[opacity=0.2]% set to 0.2 to make it visible while testing          \begin{document}     \begin{tikzpicture}[%        spy using outlines={circle, magnification=4, size=1.5cm, connect spies},        every spy in node/.style={hide/.style={opacity=1}};     ]        \fill [gray] (0,0) coordinate (A) rectangle (2,3);        \fill [hide,green] ($(A) + (0.02,0.05)$) circle (1pt);     %   \tikzset{execute at begin scope={\tikzset{hide/.style={opacity=1}}}}        \spy on (0,0) in node at (-2,1);     \end{tikzpicture}     \end{document}      ![example 2](http://i.stack.imgur.com/LXEMC.png)


title: Make sure the spacing of a macro for a binary operator

text: I define a macro as follows:               \newcommand{\abs}[1]{{#1}^{\sharp}}      But I realize that `$a \abs{\sqcup} b$` is not exactly same as `$a \sqcup^\sharp b$`: The first one does not leave enough space between the operator and the operands. Does anyone know how to amend the macro to make it a real binary operator in terms of spacing?


title: How to create an inline list via a macro

text: I want to create a macro that yields an inline lists. I can easily do this using `enumerate*` form the the `enumitem` package, but when I attempt to wrap this in a macro, I get: > >     Extra }, or forgotten \endgroup. >     \item ...ctor \relax \fi }\color@endgroup \egroup >                                                       \enit@outeritem >   ## Code:               \documentclass{article}     \usepackage[inline]{enumitem}     \usepackage{pgffor}          \newlist{MyHChoices}{enumerate*}{2}     \setlist*[MyHChoices]{label=\Alph*., itemjoin={\hspace*{2.0em}}}          \newcommand*{\InlineList}[1]{%         \MyHChoices             \foreach \Choice in {#1} {%                 \item \Choice             }%         \endMyHChoices     }%               \begin{document}     \begin{MyHChoices}         \item One         \item Two         \item Three     \end{MyHChoices}          %\InlineList{One, Two, Three}% ???     \end{document}


title: Biblatex with custom labels

text: # Summary Can I have custom citation labels while using `biblatex`? # Discussion In mathematics it is not uncommon to use custom labels for referring to other books/articles. E.g., "... see [Hart, p196]." when referring to some page in Hartshorne's _Algebraic Geometry_. This way of referencing in the end usually becomes a convenient mix of the 'author', 'authortitle' and 'title' citation styles. There is not really a way to predict how something is referred to. For example, the _Stacks project_ is might be referred to as [Stacks], and Grothendiecks EGA as [EGA]. On the other hand, books with multiple authors might be labeled using the first letters of their family names (as in [KM] for Katz-Mazur). As far as I know, having these custom labels is only possible when setting the bibliography by hand. I have not seen a way how to do this with BibTex or any of its derivatives. * * * # Questions I really like `biblatex` since it enables me to tweak lots of things concerning citation styles. I know that there is the possibility to use some custom fields in the `.bib` file. It probably is possible to use one of these custom fields to define the custom citation label of the entry. Furthermore, in the biblatex stylesheets this custom field should be employed for the in-text citations as well as for the entry in the bibliography. This leads to the following questions >   * Does anyone know of a citation style that does this? >   * Is this easy to accomplish? >   * Can anyone provide me with some code for a setup? I don't really know > how to do this myself (I've only done some small tweaking of biblatex styles > before). >


title: Horizontal distance between items and subitems

text: I am making a beamer presentation and I found that the horizontal distance between items and subitems is bigger than I expected. I tried to change it by using `\addtolength`, but the lines of the subitem are misaligned. How can I change it?


title: separate style and content in table

text: I am generating tables from a program and its a bit inconvenient that I have to intersperse style and content information. For example, in the following note how `\cellcolor{red}` is interspersed among the data. It would be easier to generate if there could be a statement or statements at point `%% A` or at point `%% B` in the code below that indicated that in column 3, rows 3-4 that the cells should be colored red. Is this achievable?               \documentclass{article}     \usepackage{colortbl}     \usepackage[table]{xcolor}     \usepackage{tabu}     \begin{document}          \begin{center}     %% A     \begin{tabu}{XXXX}     %% B     1 & 2 & 3 & 4 \\     5 & 6 & 7 & 8 \\     9 & 10 & \cellcolor{red} 11 & 12 \\     13 & 14 & \cellcolor{red} 15 & 16 \\     17 & 18 & 19 & 20 \\     \end{tabu}     \end{center}          \end{document}      Output: ![screenshot](http://i.stack.imgur.com/DQmVo.png) By the way, I have already seen this question which is also about separating style and content but as far as I understand it does not really provide the type of solution to the example shown above requested here. EDIT: In case its not clear here is the type of code that would be desirable:               \documentclass{article}     \usepackage{colortbl}     \usepackage[table]{xcolor}     \usepackage{tabu}     \begin{document}          \begin{center}     \begin{tabu}{XXXX}     \preCell{3}{3}{\cellcolor{red}} % specifies that row 3 col 3 is red     \preCell{4}{3}{\cellcolor{red}} % specifies that row 4 col 3 is red     1 & 2 & 3 & 4 \\     5 & 6 & 7 & 8 \\     9 & 10 & 11 & 12 \\     13 & 14 & 15 & 16 \\     17 & 18 & 19 & 20 \\     \end{tabu}     \end{center}          \end{document}


title: choosing package repository

text: I'm trying to install the floatflt package and I'm having trouble. I am using MikTex package manager and when I try to install the package, it says that "the remote package repository is not online. You have to choose another repository." How do I choose a repository without it saying that it isn't valid?


title: todonotes problem with amsbook class

text: I'm trying to use todonotes with `amsbook` documentclass. I can add a todo (using `\todo{fix this}`) to part of the text and I can generate a Todo list for the table of contents using `\todototoc`, but the compilation has some problems. From looking at the `todonotes` documentation I have seen that the package has a known conflict with `amsart` and a fix is supplied in the documentation. The fix doesn't quite work for `amsbook` and I don't know enough about what it's doing to edit it. The problems are that whilst compiling the LaTeX I get the warning that `\todototoc` is an undefined control sequence. Ignoring the warning and continuing the compilation, I see that the `\todo` I have created is not put on the same page as the heading for the list. A smallish working example follows.               \documentclass[a4paper,10pt]{amsbook}             \usepackage[linktocpage]{hyperref} % for links      \usepackage{todonotes}                  \begin{document}            \title{A sample book in amsbook style}        \author{me}        \maketitle             \tableofcontents         \todototoc  % put an entry for the list of todos in the  table of contents              % \listoftodos   This is the usual command for making a list of to dos             % The following was taken from the todonotes documentation on how to resolve a problem with the amsart class.        % It doesn't quite work for amsbook as the list entries are put on the page after the "Todo list" heading.             \makeatletter        \providecommand\@dotsep{5}        \makeatother        \listoftodos\relax                   \chapter{The test chapter}         Some text\todo{really need some more text!}              \end{document}         Does anyone have any ideas? Thanks.


title: aligned equations with a case inside

text: Please see the figure attached, I want to reproduce this set of equation, which code to use? ![enter image description here](http://i.stack.imgur.com/7eHDU.png) I tried this to have something similar but it doesnt work:               \begin{equation*}     \left\{ \,     \begin{multlined}     \phi_t + a \phi_x = 0.\\     \phi(x,0)=\phi_0(x)=\begin{cases}     \phi_L & \text{if } x<0,     \phi_R & \text{if } x>0,     \end{cases}     \end{multlined}     \right.     \end{equation*}      any simple ideas?


title: Only getting strange symbols when copying from pdf to text

text: So the problem i am experiencing is that the encoding of the output pdf of my .tex file is somehow custom. This is the beginning of my tex file:               \documentclass[a4paper,12pt]{article}     \usepackage[a4paper,margin=1in]{geometry}     \usepackage[usenames,dvipsnames]{xcolor}     \usepackage{longtable}     \usepackage{graphicx}     \usepackage{subfig}     \usepackage{listings}     \usepackage{verbatim}     \usepackage{multirow}     \usepackage{url}     \usepackage{grffile}     \usepackage[superscript]{cite}     \usepackage{calc}     \newcommand{\UnderscoreCommands}{\do\IfFileExists \do\verbatiminput%     \do\verbatimtabinput \do\citeNP \do\citeA \do\citeANP \do\citeN%     \do\shortcite \do\shortciteNP \do\shortciteA \do\shortciteANP%     \do\shortciteN \do\citeyear \do\citeyearNP%     }     \usepackage[strings]{underscore}     \usepackage{fancyhdr}     \usepackage{hyperref}     \usepackage{minted}          \addtolength{\oddsidemargin}{-5mm}     \addtolength{\evensidemargin}{-5mm}     \addtolength{\textwidth}{10mm}     \addtolength{\topmargin}{-5mm}     \addtolength{\textheight}{10mm}          \setlength{\tabcolsep}{20pt}     \renewcommand{\arraystretch}{1.3}     \renewcommand{\familydefault}{\sfdefault}          \pagestyle{fancy}     \setlength{\headheight}{15.2pt}          \newlength{\myheight}          \fancyhf{}     \fancyhead[LE,RO]{\thepage}     \fancyhead[LO,RE]{\textit{\nouppercase{\leftmark}}}          \bibliographystyle{plain}               \begin{document}          \section{Introduction}     \label{sec:intro}          We will be using a subset of a publicly available RNA-Seq     study~\cite{liu14} (the dataset is deposited in the NCBI GEO database     under accession     \href{http://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSE51403}{GSE51403}).     The dataset represents whole transcriptome sequencing of MCF7 cell line with     and without 17 beta-estradiol treatment sequenced using polyA capture and random     priming (single-end reads, 50 bp long).          cummeRbund is a convenient R-package for visualizing your RNA-Seq data. cummeRbund assumes that reads have been aligned and that the Cufflinks suite (http://Cufflinks.cbcb.umd.edu/index.html) has been used for transcript deconvolution and (if appropriate) differential expression analysis. Due to time constraints, we will not run Cufflinks during the course. More details on how to run tophat and Cufflinks can be found at the end this document. cummeRbund is a visualization package for RNA-Seq data that was designed to help you navigate through the large amount of data produced from Cufflinks transcript assembly and Cuffdiff differential expression analysis. Such analyses typically result in a large number of inter-related files that are not intuitive to navigate through. cummeRbund helps promote rapid analysis of these files by aggregating and indexing them and allows you to easily visualize and create publication-ready figures of your RNA-Seq data while maintaining appropriate relationships between connected data points.          cummeRbund starts with re-organizing output files of a Cuffdiff analysis and storing these data in a local SQLite database. cummeRbund indexes the data to speed up access to specific feature data (genes, isoforms, TSS, CDS, etc.) and preserves relationships between these features. Access to data elements is managed via the RSQLite package and data are presented in appropriately structured R classes with various convenience functions designed to streamline your workflow. This persistent database storage means that inter-connected expression values are rapidly accessible and quickly searchable in future analyses.     See more at: \url{http://compbio.mit.edu/cummeRbund/manual_2_0.html#tth_sEc2}          \end{document}      Good copy:               We will be using a subset of a publicly available RNA-Seq study      Bad copy:               ❲❡ ✇✐❧❧ ❜❡ ✉s✐♥❣ ❛ s✉❜s❡t ♦❢ ❛ ♣✉❜❧✐❝❧2 ❛✈❛✐❧❛❜❧❡ ❘◆❆✲❙❡q st✉❞2       Caused by: `\usepackage[T1]{fontenc}` resolved by: `%\usepackage[T1]{fontenc}` But actually sometimes i do need that encoding, is there somehow a work around for this? Thanks! .log file:               Here is how much of TeX's memory you used:      9879 strings out of 495032      147712 string characters out of 6181718      243128 words of memory out of 5000000      12884 multiletter control sequences out of 15000+600000      17552 words of font info for 41 fonts, out of 8000000 for 9000      14 hyphenation exceptions out of 8191      44i,11n,43p,1053b,564s stack positions out of 5000i,500n,10000p,200000b,80000s      </home/sajvanderzeeuw/.texmf-var/fonts/pk/ljfour/jknappen/ec/ecit1000.600pk>      </home/sajvanderzeeuw/.texmf-var/fonts/pk/ljfour/jknappen/ec/ectt1000.600pk> <     /home/sajvanderzeeuw/.texmf-var/fonts/pk/ljfour/jknappen/ec/ecsi1200.600pk> </h     ome/sajvanderzeeuw/.texmf-var/fonts/pk/ljfour/jknappen/ec/ecsx1200.600pk> </hom     e/sajvanderzeeuw/.texmf-var/fonts/pk/ljfour/jknappen/ec/ecsx1440.600pk> </home/     sajvanderzeeuw/.texmf-var/fonts/pk/ljfour/jknappen/ec/ectt1200.600pk> </home/sa     jvanderzeeuw/.texmf-var/fonts/pk/ljfour/jknappen/ec/ecss0800.600pk> </home/sajv     anderzeeuw/.texmf-var/fonts/pk/ljfour/jknappen/ec/ecss1200.600pk> </home/sajvan     derzeeuw/.texmf-var/fonts/pk/ljfour/jknappen/ec/ecsx1728.600pk> </home/sajvande     rzeeuw/.texmf-var/fonts/pk/ljfour/jknappen/ec/ecss1000.600pk> </home/sajvanderz     eeuw/.texmf-var/fonts/pk/ljfour/jknappen/ec/ecss2074.600pk> </home/sajvanderzee     uw/.texmf-var/fonts/pk/ljfour/jknappen/ec/ecss1440.600pk></usr/share/texlive/te     xmf-dist/fonts/type1/public/amsfonts/cm/cmmi12.pfb></usr/share/texlive/texmf-di     st/fonts/type1/public/amsfonts/cm/cmr12.pfb></usr/share/texlive/texmf-dist/font     s/type1/public/amsfonts/cm/cmsy10.pfb>     Output written on handout_02.pdf (7 pages, 191077 bytes).     PDF statistics:      580 PDF objects out of 1000 (max. 8388607)      38 named destinations out of 1000 (max. 500000)      65 words of extra memory for PDF output out of 10000 (max. 10000000)


title: Remove "Figure 1" in text on the right of diagram

text: How do I remove the label, "Figure 1:" from the caption of the diagram, using the `sidecap` package?


title: Boolean variables in LaTeX

text: I am trying to use "boolean" variables in LaTeX but am unable to have any success... I have a macro which takes 5 arguments, the last argument being optional. This macro is named `educationItem` and it only ever appears in an `education` environment. So, some `educationItem` entries will have this fifth argument, and some will not. The ones that have the fifth argument will require a slightly modified formatting. In addition, I would like the ability to disable this fifth argument for all `educationItem` entries, such that it appears as if all `educationItem` entries have no fifth argument. In order to do this, I am currently using an option passed when including my `cvtools.sty` file. My current attempt (shown below) does not seem to work and stuffs up the table alignment. I think that it may be due to the time at which the various expressions are evaluated, but have not been able to fix it. ![Table misalignment](http://i.stack.imgur.com/YV2L5.png) Any help would be appreciated. A minimum working example follows: main.tex:               \documentclass[10pt]{article}          \usepackage{cvtools} % my CV styling stuff     \usepackage[margin=3cm]{geometry}   % extend page margins          \begin{document}          \section*{Education}     \begin{education}          \educationItem{2008}{2012}     {Education 1}     {University 1}     {}          \educationItem{2002}{2007}     {Education 2}     {University 2}     {     \educationGrade{Subject 1}{90/100}     \educationGrade{Subject 2}{88/100}     \educationGrade{Subject 3}{97/100}     \educationGrade{Subject 4}{94/100}     \educationGrade{Subject 5}{95/100}     }     \end{education}          \end{document}      cvtools.sty:               \NeedsTeXFormat{LaTeX2e}     \ProvidesPackage{cvtools}[2012/07/16 v1.0.0]          \RequirePackage{etoolbox}           % for \ifstrempty, \ifdef     \RequirePackage{ifthen}             % for \ifthenelse     \RequirePackage{longtable}          % for tables that span more than one page     \RequirePackage{multirow}           % for table columns that span more than one row     \RequirePackage{tabularx}           % for simple column stretching     \RequirePackage{xcolor}             % for colours          %================================================%     % Declare options     %================================================%     \newif\if@showgrades          \DeclareOption{showgrades}{\@showgradestrue}     \DeclareOption*{\PackageWarning{cvtools}{Unknown option `\CurrentOption'}}          \ProcessOptions          %================================================%     % For table styling     %================================================%     \definecolor{lightgray}{gray}{0.8}     \newcolumntype{L}[1]{>{\raggedleft}p{#1}}     \newcolumntype{R}[1]{p{#1}}     \newcommand\VRule{\color{lightgray}\vrule width 0.5pt}     %------------------------------------------------%          %================================================%     % \begin{education}     % \educationItem{beginYear}{endYear}{name}{institution}{\educationGrade{subject}{grade} ...}     % \end{education}     %================================================%     \newenvironment{education}%     {%     \def\lwidth{0.16\textwidth}%     \def\rwidth{0.78\textwidth}%     %     \newcommand\educationGrade[2]{##1 & ##2 \\}%     %     \newcommand\educationItem[5]{%     % Check if we should display tools     \if@showgrades         \ifstrempty{##5}%             {% showGrades is true, but this \educationItem has no grades to display.                 \def\@numRows{1}%                 \def\@shouldshowgrades{0}             }%             {% showGrades is true and this \educationItem has grades to display.                 \def\@numRows{2}%                 \def\@shouldshowgrades{1}             }%     \else         % showGrades is false.         \def\@numRows{1}%         \def\@shouldshowgrades{0}     \fi     %     % Education period     \multirow{\@numRows}{\lwidth}{##1 -- ##2}%     %     % Name and institution     & \textbf{##3 (##4)}%     %     % Grades     \ifthenelse{\equal{@shouldshowgrades}{1}}%         {%             \\* %             & \begin{tabularx}{\rwidth}{Xr} %             ##5 %             \end{tabularx} %         }%         {}%     \\[0.5em]%     }%     %     \begin{longtable}{L{\lwidth}!{\VRule}R{\rwidth}}%     }     {\end{longtable}}     %------------------------------------------------%      The expected output would be identical to the following TeX code... when using `\usepackage[showgrades]{cvtools}`:               \documentclass[10pt]{article}          \usepackage[margin=3cm]{geometry}   % extend page margins     \RequirePackage{longtable}          % for tables that span more than one page     \RequirePackage{multirow}           % for table columns that span more than one row     \RequirePackage{tabularx}           % for simple column stretching     \RequirePackage{xcolor}             % for colours          %================================================%     % For table styling     %================================================%     \definecolor{lightgray}{gray}{0.8}     \newcolumntype{L}[1]{>{\raggedleft}p{#1}}     \newcolumntype{R}[1]{p{#1}}     \newcommand\VRule{\color{lightgray}\vrule width 0.5pt}     %------------------------------------------------%          \begin{document}          \section*{Education}     % \begin{education}     \def\lwidth{0.16\textwidth}     \def\rwidth{0.78\textwidth}     \begin{longtable}{L{\lwidth}!{\VRule}R{\rwidth}}          % \educationItem{2008}{2012}     % {Education 1}     % {University 1}     % {}     \multirow{1}{\lwidth}{2008 -- 2012}     & \textbf{Education 1 (University 1)}%     % @shouldshowgrades should be false here     \\[0.5em]          % \educationItem{2002}{2007}     % {Education 2}     % {University 2}     % {     % ...     % }     \multirow{1}{\lwidth}{2002 -- 2007}     & \textbf{Education 2 (University 2)}%     % @shouldshowgrades should be true here     \\*     & \begin{tabularx}{\rwidth}{Xr} %     % \educationGrade{Subject 1}{90/100}     Subject 1 & 90/100 \\     % \educationGrade{Subject 2}{88/100}     Subject 2 & 88/100 \\     % \educationGrade{Subject 3}{97/100}     Subject 3 & 97/100 \\     % \educationGrade{Subject 4}{94/100}     Subject 4 & 94/100 \\     % \educationGrade{Subject 5}{95/100}     Subject 5 & 95/100 \\     \end{tabularx}     \\[0.5em]          % \end{education}     \end{longtable}          \end{document}      When using `\usepackage{cvtools}`:               \documentclass[10pt]{article}          \usepackage[margin=3cm]{geometry}   % extend page margins     \RequirePackage{longtable}          % for tables that span more than one page     \RequirePackage{multirow}           % for table columns that span more than one row     \RequirePackage{tabularx}           % for simple column stretching     \RequirePackage{xcolor}             % for colours          %================================================%     % For table styling     %================================================%     \definecolor{lightgray}{gray}{0.8}     \newcolumntype{L}[1]{>{\raggedleft}p{#1}}     \newcolumntype{R}[1]{p{#1}}     \newcommand\VRule{\color{lightgray}\vrule width 0.5pt}     %------------------------------------------------%          \begin{document}          \section*{Education}     % \begin{education}     \def\lwidth{0.16\textwidth}     \def\rwidth{0.78\textwidth}     \begin{longtable}{L{\lwidth}!{\VRule}R{\rwidth}}          % \educationItem{2008}{2012}     % {Education 1}     % {University 1}     % {}     \multirow{1}{\lwidth}{2008 -- 2012}     & \textbf{Education 1 (University 1)}%     % @shouldshowgrades should be false here     \\[0.5em]          % \educationItem{2002}{2007}     % {Education 2}     % {University 2}     % {     % \educationGrade{Subject 1}{90/100}     % \educationGrade{Subject 2}{88/100}     % \educationGrade{Subject 3}{97/100}     % \educationGrade{Subject 4}{94/100}     % \educationGrade{Subject 5}{95/100}     % }     \multirow{1}{\lwidth}{2002 -- 2007}     & \textbf{Education 2 (University 2)}%     % @shouldshowgrades should be true here     \\[0.5em]          % \end{education}     \end{longtable}          \end{document}


title: Status of TiKz with ConTeXt MkIV

text: Whats the recent status of TiKz support in ConTeXt MkIV? I'm asking because in pgfmanual 2.10 on page 25 it says: > Note that pgf/TikZ is not supported by recent ConTEXt versions (like mark > IV, the LuaTEX-aware part of ConTEXt). I tried the following example but it doesn't work as expected.               \setupcolors[state=start]     \usemodule[tikz]             \starttext          \starttikzpicture      [node distance=4cm,         place/.style={circle,draw=blue!50,fill=blue!20,thick,                      inner sep=0pt,minimum size=6mm}]              \node[place] (wat) {};       \node[place] (wag) [below=of wat] {};          \stoptikzpicture          \stoptext      No matter how big the `node distance=4cm` is, the circles are overlapping with an offset of approximately 0.5cm. ConTeXt version: `mtx-context | current version: 2012.05.22 16:12`


title: prevent logo from title page in beamer class

text: I'm having problems with inserting a logo on my presentation in the beamer class.               \logo{\includegraphics[scale=0.05]{logo.png}}      This is how I inserted the logo, which works perfectly; it is placed in the lower right hand corner as desired. But I don't want the logo on the title slide. Is there a way to hide the logo on the title slide?


title: Best way to use lettrine in LyX

text: What is the best way to use the package lettrine in LyX? Right now I've written in the Document Preamble `\usepackage{lettrine}` and then I use the classic tex code `\lettrine{O}{nce upon a time} there was a king ...`


title: primary school operations with Latex

text: I want to do in LateX a sheet of activities for primary school like: ![image](http://i.stack.imgur.com/vXxGY.jpg) ![image](http://i.stack.imgur.com/gJDTU.jpg)


title: In XeLaTeX, how to format certain characters without using macros?

text: [Moved from StackOverflow.com] How can I format certain characters without using macros? For example, if I want to make all instances of the character ‘f’ bold, how can I make TeX do it automatically? I’m using XeLaTeX to process my document. (Actually, the document is written in Simplified Chinese. The Asian full stop symbol (‘。’, U+3002) in my fonts, however, have their small circle placed at the center, which is inconsistent with the standard of the Chinese Mainland. Since full stops appear after every sentence, it would seem too cumbersome to use macros.)


title: Where can I find a list of the LaTeX command line options?

text: I am using MiKTeX 2.9 on Windows, and am working with TeXnicCenter. I can see in the build profiles that LaTeX can take command-line options, for instance:               --src -interaction=nonstopmode      Try as I might, I cannot find anywhere on the net a list of these command line options and their purpose. Can anyone supply a link to these?


title: Wide table in two-column doc: error ! Extra }, or forgotten \endgroup.

text: I am trying to create a table which spans both columns of a two column document based on the IEEEtrans document class. However I am receiving the following error which I cannot explain:               ! Extra }, or forgotten \endgroup.     \@endfloatbox ...pagefalse \outer@nobreak \egroup                                                        \color@endbox      l.719 \end{table*}      Here is the table:               \begin{table*}         \centering           \caption{Penalty functions used in Optimisation}             \begin{tabular*}{0.75\textwidth}{c c c c c}                 \toprule                 Aspect  & Notation & Limit & Penalty Function & Comments \\                 \midrule                 RMS Current Density & 6~Amm\textsuperscript{-2} & $L_{\text{JRMS}}$ & $S_C$ & \\                 Peak Current Density & 10~Amm\textsuperscript{-2} & $L_{\text{JMAX}}$ & $S_C$ & \\                 \bottomrule             \end{tabular*}             \label{tab:penfcns}     \end{table*}      The document builds with no errors if I comment out the table. line 719 is the line containing the:               \end{table*}      # EDIT - MINIMAL EXAMPLE               \documentclass[journal]{IEEEtran}          \usepackage[tight,footnotesize]{subfigure}          \usepackage{fixltx2e}          \begin{document}               \begin{table*}[t]         \centering           \caption{Penalty functions used in Optimisation}             \begin{tabular*}{0.75\textwidth}{c c c c c}                 Aspect  & Notation & Limit & Penalty Function & Comments \\                 RMS Current Density & 6~Amm\textsuperscript{-2} &  & $S_C$ & \\                 Peak Current Density & 10~Amm\textsuperscript{-2} &  & $S_C$ & \\             \end{tabular*}             \label{tab:penfcns}     \end{table*}                    \end{document}      The combination of subfigure and fixltx2E seems to be the problem. I probably should be using subfig anyway.


title: Reversed letters in a mathematical formula

text: > **Possible Duplicate:**   >  Rotating a letter For a work in logic, I need to write a iota upside down in a mathematical formula. I found this suggestion on the internet. First include [the usual math package] and the graphicx package               \usepackage{amsmath, amscd, amsthm, amssymb, mathrsfs,amsfonts}     \usepackage{graphicx}      in the preamble. Then use the command               \rotate{180}{$\iota$}      Indeed it works, but not perfectly: the axis of the rotation is at the basis of the letter (in 'normal' position). Hence, when I use this command, the reversed iota appears on a lower level than the text. I am thus not satisfied with this. Does anyone have a better suggestion?


title: How to give BibTeX author names with diacritics and hyphen?

text: I am trying to give a bibtex record for an author whose name contains   * a diacritic and   * a hyphen. You may take this name as an example:               Klopotsko Müller-Wachtendonk      According to this answer I should give the `ü` as `{\"u}`. Furthermore, since the name has a hyphen, I need to put the last name in brackets to prevent `\bibliographystyle{alpha}` from incorrectly labeling a book authored by that person as [MW14] instead of [Mül14] (at least, that is the only way I know of to prevent the incorrect label). However, if I give the author as               author = {Klopotsko {M{\"u}ller-Wachtendonk}}      I get a compilation error:               ! Argument of \T1\" has an extra }.     <inserted text>                  \par      l.1 \begin{thebibliography}{{M{\"}}14}      So, how do I have to give an author name with a diacritic and a hyphen such that   * BibTeX is able to sort correctly and   * bib-style alpha builds the correct label? Minimum (not) working example: test.tex               \documentclass{article}          \usepackage[T1]{fontenc}          \begin{document}          \cite{phd/MW2014}          \bibliographystyle{alpha}     \bibliography{test}{}          \end{document}      test.bib               @phdthesis{phd/MW2014,       author    = {Klopotsko M{\"u}ller-Wachtendonk},       title     = {Das Bild h{\"a}ngt schief},       year      = {2014}     }


title: How to use PDFlatex with Tikz package?

text: I have to make a presentation run by PDFlatex. But I want to draw a picture in it with the Tikz package. How can I manage this?


title: APA Master's thesis?

text: Has anyone written a Master's thesis in APA with LaTeX (preferably LyX)? The documentation for apa.cls says "do not use this for your thesis", but I can't find any alternative on the web.


title: Issue with arabxetex and equation numbers

text: There seems to be some issue with printing equation numbers when using the arabxetex package. Here is a minimal example:               \documentclass{article}          \usepackage{arabxetex} %      %\usepackage{bidi} %          \begin{document}               \begin{equation}     E=mc^2     \end{equation}           \end{document}       When I compile this I get E=mc^2          )(1 Whereas if I comment out arabxetex and comment in bidi, it prints correctly. Any ideas about how to fix this? (PS: Maybe someone with a higher reputation could add arabxetex to the tags.)


title: Headings inside the bibliography list?

text: Is it possible to have headings inside `thebibliography`? I need to categorize the references into, say, "required" and "optional". I tried simply putting some text in between `\bibitem`s, but the compiler complains about encountering text not part of a `\bibitem`. A solution not involving BibTeX is preferred for now, I'm still learning LaTeX and for the paper I'm writing I only have a handful of references (and not that much time, surprise-surprise :-). I plan to learn BibTeX in the future, of course. Just before posting I looked at How do I break up a bibliography into separately numbered sections? and one of the answers was mentioning `multibib` which appears to have such functionality. I'll ask anyway in case there are other solutions, I just need some extra text displayed, not to really break the bibliography into subbibliographies.


title: Formatting and bullet points

text: Sorry for what may seem like a basic question. I've created a poster using a template, and have created bullet point lists inside various blocks. Within one of the blocks, the bullet points fall outside of the block itself, whilst in all other blocks the bullet points are inside. I have looked at the code extensively, as has a member of staff at writelatex, but unfortunately neither of us are able to spot what the problem is. There does not appear to be a difference in the code from any of the other blocks. This is the code;               \documentclass[final,hyperref={pdfpagelabels=false}]{beamer}          \usepackage[orientation=portrait,size=a0,scale=1.4]{beamerposter} % Use the beamerposter package for laying out the poster with a portrait orientation and an a0 paper size          \usetheme{I6pd2} % Use the I6pd2 theme supplied with this template          \usepackage[english]{babel} % English language/hyphenation          \usepackage{amsmath,amsthm,amssymb,latexsym} % For including math equations, theorems, symbols, etc          %\usepackage{times}\usefonttheme{professionalfonts}  % Uncomment to use Times as the main font     %\usefonttheme[onlymath]{serif} % Uncomment to use a Serif font within math environments          \boldmath % Use bold for everything within the math environment          \usepackage{booktabs} % Top and bottom rules for tables          \graphicspath{{figures/}} % Location of the graphics files          \usecaptiontemplate{\small\structure{\insertcaptionname~\insertcaptionnumber: }\insertcaption} % A fix for figure numbering          %----------------------------------------------------------------------------------------     %   TITLE SECTION      %----------------------------------------------------------------------------------------          \title{\huge Student Attitudes and the Value of Foundation Degree Police Pre-Join Routes: An Investigation} % Poster title          \author{\textbf{Sean Butcher and Stuart Norton}} % Author(s)          \institute{Institute of Professional Policing          \textit{Buckinghamshire New University}} % Institution(s)          %----------------------------------------------------------------------------------------     %   FOOTER TEXT     %----------------------------------------------------------------------------------------          \newcommand{\leftfoot}{POLCON 5, Teeside University} % Left footer text          \newcommand{\rightfoot}{September 2014} % Right footer text          %----------------------------------------------------------------------------------------          \begin{document}          \addtobeamertemplate{block end}{}{\vspace*{2ex}} % White space under blocks          \begin{frame}[t] % The whole poster is enclosed in one beamer frame          \begin{columns}[t] % The whole poster consists of two major columns, each of which can be subdivided further with another \begin{columns} block - the [t] argument aligns each column's content to the top          \begin{column}{.02\textwidth}\end{column} % Empty spacer column          \begin{column}{.465\textwidth} % The first column          %----------------------------------------------------------------------------------------     %   INTRODUCTION     %----------------------------------------------------------------------------------------          \begin{block}{Introduction}          \begin{itemize}     \item The manifestation of a broad and significant police reform agenda (see Home Office, 2010) has both directly and indirectly presented opportunity for police organisations and education providers to define and design supplementary and additional routes in training and entry into the police service. One example of the recent diversification of pre-entry programmes is the development of the FdA Policing programme at Bucks New University, which has been designed in partnership with Thames Valley Police (TVP) to serve as a form of pre-entry into the service.     \item This poster presents the aims and initial findings of an associated project, designed as an exploratory and descriptive analysis of the candidate response to the programme. Specifically, the poster presents selected findings from a monitoring and mapping exercise of a specific candidate cohort.     \end{itemize}          \end{block}          %----------------------------------------------------------------------------------------     %   REFERENCES     %----------------------------------------------------------------------------------------          \begin{block}{References}          \begin{itemize}     \item Home Office (2010) \textit{Policing in the 21st Century: Reconnecting Police and the People}. London: HMSO.     \item Neyroud, P. (2011) \textit{Review of Police Leadership and Training: Volume One}. London: Home Office.     \item Punch, M. (2007) 'Cops with Honours: University Education and Police Culture', in O'Neill, M. Marks, M. Singh, A.M. (eds.) \textit{Police Occupational Culture}. Amsterdam: Elsveier.     \item Reiner, R. (2010) \textit{The Politics of the Police} (4th edn). Oxford: OUP.     \end{itemize}          \end{block}          %----------------------------------------------------------------------------------------          \end{column} % End of the second column          \begin{column}{.015\textwidth}\end{column} % Empty spacer column          \end{columns} % End of all the columns in the poster          \end{frame} % End of the enclosing frame          \end{document}


title: Place a list in the middle of the page

text: I have an itemized list:               \begin{itemize}              \item First item              \item Second item          \end{itemize}      I'd like to place this list somewhere near the center of the page. But, I still want the bullet points to be left aligned. How do I do this?


title: How to plot a family of curves using PSTricks?

text: I would like to have the command line arguments in `PSTricks` to sketch the curve `$$x^{2}-y^{2}=n^{2}$$`.


title: Hide paragraph but keep space

text: I need a command that replaces its contents by white space of the same size. Unlike `\phantom` it should work paragraphs and/or images. It should do more or less the same as the `\visible` command of the beamer package when applied to a non-specified overlay number. Looking at the source of the beamer package did not help me because I could not isolate my issue from the rest. Any suggestions?


title: How to define macro containing TikZ \coordinate

text: I am trying to create a macro to calculate the center of a shape. Consider the following code:               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{calc}     \newcommand{\getcellcent}[4]{       \coordinate (#1) at ($1/3*(V#2)+1/3*(V#3)+1/3*V(#4)$);     }     \begin{document}       \begin{tikzpicture}         \coordinate (V1) at (0,0);         \coordinate (V2) at (2,0);         \coordinate (V3) at (1,1);         \getcellcent{C1}{1}{2}{3}         \draw[black] (V1) -- (V2) -- (V3) -- cycle;         \node[circle,radius=1,fill=red] at (C1)  {};       \end{tikzpicture}     \end{document}      Here I get the following error message:               Runaway argument?     1/3*V(3)$);  \draw [black] (V1) -- (V2) -- (V3) -- cycle; \node [circ\ETC.     ! File ended while scanning use of \tikz@cc@parse@factor.      If I change the line with \getcellcent to               \coordinate (C1) at ($1/3*(V1)+1/3*(V2)+1/3*(V3)$);      It works fine. What am I missing here?


title: Error trying to install a new document class on Mac

text: I'm using LaTeX to write a thesis for my University, and have to use a special premade document class (`rtthesis`). However, I can't find a way to install this document class. I've tried typesetting with both TexShop and Texpad (my usual choice of TeX editor), and both complain that the `rtthesis.cls` file can't be found. I have moved all files relating to the class to `~/Library/texmf/tex/latex/rtthesis/` and ran both `mktexlsr` and `texhash`, but neither helped. When typesetting, only this error is returned:               ! LaTeX Error: File `rrthesis.cls' not found.          Type X to quit or <RETURN> to proceed,     or enter new name. (Default extension: cls)      Could someone provide me with information on what I've done wrong, or what else I can do to install a new document class on Mac?


title: How to adjust a counter depending on whether or not we are inside a section or subsection

text: I want to create an `exercise` environment that can be used in either section, subsection, etc. As an illustration, consider the following:   * when in section 1, the third example should be titled as **Example 1.3** , but   * when in section 1 and subsection 2, the third example should be titled as **Example 1.2.3**. How to do this? ![enter image description here](http://i.stack.imgur.com/dCRdn.png)               \documentclass{article}     \usepackage{tcolorbox}          \newcounter{exercise}     \newenvironment{exercise}     {\par\smallskip\refstepcounter{exercise}\begin{tcolorbox}[title=Exercise \thesection.\thesubsection.\theexercise]\ignorespaces}     {\end{tcolorbox}\par\smallskip\ignorespacesafterend}          \begin{document}     \section{Polynomial}     In this section we will study expressions in the following form.     \[     a_0 x^n + a_1 x^{n-1} \cdots + a_n     \]     where \ldots     \begin{exercise}     Is $\frac{x-1}{2}$ a polynomial?     \tcblower     Yes. Because it can be rewritten as $x/2-1/2$.     \end{exercise}     \begin{exercise}     Is $0$ a polynomial?     \tcblower     Yes.     \end{exercise}     \subsection{Order}     The highest exponent in polynomial terms represents the order of  the polynomial.     \begin{exercise}     What is the order of $2x^3-3x^5+1$?     \tcblower     The highest exponent is 5 so the polynomial order is 5.     \end{exercise}     \end{document}      I did as follows but the output has double subsection when I am in subsection.               \newcounter{exercise}     \newenvironment{exercise}     {\par\smallskip\refstepcounter{exercise}\begin{tcolorbox}[title=Exercise \thesection\ifnum\value{subsection}>0.\thesubsection\fi.\theexercise]\ignorespaces}     {\end{tcolorbox}\par\smallskip\ignorespacesafterend}      ## Note: Best practice suggestions are welcome to make the environment more and more sophisticated such as it can be referenced by label, etc, etc...


title: BibTeX article entries and their common journal

text: I want to cite multiple articles from the same journal issue. So I thought that having one BibTeX entry for the journal issue and then cross-referencing it from each article's entry would be the proper way to go. What is the right entry type to use for the journal issue? I'd like to have something like this:               @article{foo1,       title="a",       author="b",       crossref="foo"     }          @journal{foo,       booktitle="The Foo Journal",       editor="Wong SCNR Foo",       year=1970,       publisher="Foo Associates"     }      The problem is that there is no "journal" entry type.


title: Slanted greater than and equal to, less than and equal to

text: Need to produce a "Greater than" or "Equal to" symbol with a slanted _equal_ component of the symbol, i.e. the bottom bar not parallel to the typed line, but parallel to the bottom bar of the right facing arrow. `\geq` begets a normal "greaterthan"/"equal to"-symbol. I've found on the internet and then tried `\geqslant`, but it does not work. I get an error message: > ! Undefined control sequence.   >  l.1171 ...frac{k^{n-1}_1}{k} \right) , n \geqslant   >  1   >  ? Am I missing something in the preamble? I assume there is a similar way to achieve a Less than and equal to slant.


title: Calculate and draw difference of two plots automatically

text: I'm trying to automatically generate a plot, which visualizes the difference of two other plots. The input source is a single(!) file. The data is filtered by one column with `/tr/rowfilter`. Here is an example image: ![enter image description here](http://i.stack.imgur.com/FXaWx.gif) I want that the "difference (b-a)" plot is generated by TikZ/PGFPlots/PGFPlotstable/LaTeX. I've experimented with `/pgfplots/x filter`, but I wasn't successful (I don't even know, if it's possible) Here is the corresponding tex example:               \documentclass{article}          \usepackage{tikz}     \usepackage{pgfplots}     \usepackage{pgfplotstable}          \pgfkeys{         /tr/rowfilter/.style 2 args={             /pgfplots/x filter/.append code={                 \edef\arga{\thisrow{#1}}                 \edef\argb{#2}                 \ifx\arga\argb                 \else                     \def\pgfmathresult{}                 \fi             }         }     }          \usepackage{filecontents}     \begin{filecontents}{diagram.dat}     x y kind     1 1 a     2 6 a     3 10 a     4 13 a     5 15 a          1 1 b     2 7 b     3 13 b     4 17 b     5 20 b     \end{filecontents}     \begin{document}          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     {\huge The way it is now:}     \vspace{0.5cm}          \begin{tikzpicture}     \begin{axis}[     filter discard warning=false,     height=8cm,     width=12cm,     grid=major,     legend pos=outer north east     ]     \addplot table[/tr/rowfilter={kind}{a}] {diagram.dat};     \addlegendentry{curve a}     \addplot table[/tr/rowfilter={kind}{b}] {diagram.dat};     \addlegendentry{curve b}     \end{axis}     \end{tikzpicture}     \vspace{1cm}          %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     {\huge The way it should look like}     \vspace{0.5cm}          \begin{tikzpicture}     \begin{axis}[     filter discard warning=false,     height=8cm,     width=12cm,     grid=major,     legend pos=outer north east     ]     \addplot table[/tr/rowfilter={kind}{a}] {diagram.dat};     \addlegendentry{curve a}     \addplot table[/tr/rowfilter={kind}{b}] {diagram.dat};     \addlegendentry{curve b}          %%% This should be generated with Tikz/PGFPLOTS/PGFPLOTSTABLE/Latex!!!     \addplot coordinates {     (1,0)      (2,1)     (3,3)     (4,4)     (5,5)     };     \addlegendentry{difference (b-a)}          \end{axis}     \end{tikzpicture}          \end{document}      Can you help me?


title: Can I give a function to a label?

text: I try to create a dynamic way to give labels to my slides in Beamer.               \documentclass{beamer}          \newcommand{\partName}{blank}     \newcommand {\defPartName}[1]{\renewcommand{\partName}{#1}}          %\includeonlyframes{firstChapter}     \begin{document}          \defPartName{firstChapter}     \begin{frame}[label=\partName]{A title}     The label of the current frame is \partName .     \end{frame}          \defPartName{secondChapter}     \begin{frame}[label=\partName]{A title}     The label of the current frame is \partName .     \end{frame}          \end{document}      The macro works, because the frames display the correct name of the current label. But they don't seem to "receive" the label, because when I use the `\includeonlyframes{}`, it doesn't work (which is precisely why I want to use it). Any idea?


title: How to make tikz center the cells of a matrix?

text: I want to construct complicated things in tikz matrices (but don't we all), and when I'm done, I want the rows and columns of the matrix to align along the centers of these complicated things. Here is an example of what goes wrong:               \documentclass{article}     \usepackage{tikz}     \begin{document}     \begin{tikzpicture}      \matrix      {       \path node{a} node[right] {b}; \\       \node{c};\\      };     \end{tikzpicture}     \end{document}      You will see that the second row is aligned at the _left_ of the first row. The reason for this is explained quite clearly in the tikz manual: rows and columns are aligned along the "origins" of the cells. What this means is that each cell is considered a tiny picture with an origin (that is, (0,0)) and all those points are put on a grid. It's clear from this that what has happened in the above picture is that the `\path` begins at (0,0) and moves right, and likewise the `\node` begins at its (0,0) and moves right, and (as claimed) those two origins are put in a line. Unfortunately, that's not what I want and there's no obvious way to change it. I want to tell tikz that the "origin" of the top cell is the center of its bounding box. If it were a single node that would be easy: just write `[anchor = center]` as an option. But I can't put paths in nodes, so there's no way to do that directly. And although it is possible to pass an `[xshift = <dimen>]` to the `\path`, I would have to know what that shift is before starting, whereas (since it is _such_ a complicated figure) I can't know that until the end, when it is too late to perform a coordinate transformation. How can I do this? Basically, I want to give an entirely relative construction and then slap a coordinate system on it afterwards. Alternatively, I want to know if there is any matrix option that does this that I have overlooked. Another alternative: is there a different way to achieve this alignment without using matrices?


title: Having item labels in a description environment start with a paragraph indent

text: How can I make the item labels of a `description` environment start with a paragraph indent? I mean that they should be indented like this:               \documentclass{article}          \begin{document}          \newlength{\trueparindent}     \setlength{\trueparindent}{\parindent}          The paragraph before the description.     \begin{description}     \item[\hspace*{\trueparindent}The first description label.]Some text. Some text. Some text. Some text. Some text.     \item[\hspace*{\trueparindent}The second description label.]Some text. Some text. Some text. Some text. Some text.     \end{description}          \end{document}      (If you just use `\hspace*{\parindent}` in the `description` above, you don't get any indentation.) I assume there's a way to do this without putting an `\hspace*` before each label as I did. I can use the `enumitem` package, so it's fine to give me an answer that requires it.


title: Eliminating space at the end of list environments

text: I am attempting to eliminate the vertical space at the end of listing environments (`enumerate`, `itemize` and `describe`) but only when the list environment is at the end of a `leftbar` environment from the `framed` package. This particular circumstance produces an awkward overhang of the leftbar (working example below). So far I've considered three options:   1. I realize I can adjust `\topsep`, `\itemsep`, and `\partopsep`, but this would not condition on being at the end of a `leftbar` environmnet, and affect the whole document.   2. I could redefine the list environments to include some negative space at the end. However, this would not condition on being at the end of a `leftbar` environment.   3. Finally, I could implement both the above solutions manually on a case-by-case basis. This seems inelegant and makes for a lot of work in longer documents.  If anyone has a solution it would be very much appreciated!               \documentclass{article}          \usepackage{framed}               \begin{document}          \begin{leftbar}     \begin{enumerate}          \item Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old.          \item Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old.          \end{enumerate}     \end{leftbar}          \end{document}


title: TikZ: Flow Chart

text: Kindly help this messy tikz flow chart.               \documentclass{beamer}         \usetheme{CambridgeUS}     \usepackage{tikz}     \usetikzlibrary{shapes,arrows}     \tikzstyle{block} = [rectangle, draw, text width=10em, text centered, fill=yellow!80]     \tikzstyle{mycircle} = [circle, draw, text width=7em, text centered, fill=red!30]     \begin{document}     \begin{frame}     \begin{tikzpicture}[node distance=4.5cm, auto, >=stealth]          \centering     \node [block](child){\par {Early life{\begin{itemize}     \item Genetic     \item Environmental     \end{itemize}}}};          \node [block] (psych)[right of = child]{\large {Psychoscial factors}{\begin{itemize}     \item life stress     \item Psychological stress     \item coping     \item social support     \end{itemize}}};          \node [block](physiology)[below of = psych]{Physiology {\begin{itemize}     \item Motility     \item Sensation     \item Inflammation     \item Altered bacterial     \item flora     \end{itemize}}};          \node [mycircle](FGID)[right of = physiology]{FGID};     %path     \draw[->](child)--(psych);     \draw[->] (child)--(physiology);     \draw[<->](psych)--(physiology);     \draw [<->](physiology)--(FGID);     \draw [<->](psych)--(FGID);     \end{tikzpicture}     \end{frame}     \end{document}      ![enter image description here](http://i.stack.imgur.com/Lfd1z.png)


title: Dashed Line with marker when adding plot from table

text: In the `pgfplot`, I would like to have a line plot from a table which is read from a `.csv` file. I would like to have a line which is dashed and has a marker. I put the code like this - `\addplot table[x=N,y=No_Sym][mark=*, red, dashed] {data.dat};` However this does not work. Can anyone tell me the right way to do it. Thanks!


title: Why does to [bend right] change the node placement behavior

text: Consider the following example               \begin{tikzpicture}     \draw[<->] (0,0) -- (1,1) node[right,midway]{\small$\alpha$};  %     \draw[<->] (1,0) to [bend right]  (2,1) node[right,midway] {\small$\alpha$};      \end{tikzpicture}      With Tikz 2.1 the output looks like this ![enter image description here](http://i.stack.imgur.com/wKgzN.png) The second alpha is placed totally wrong just because the line is bent. This worked fine under texlive 2009 and tikz 2.00. Any Idea where this comes from ?


title: More condensed version of \parshape

text: `\parshape` can handle arbitrary paragraph shapes. One extreme is contained within How to layout irregular paragraph shape, where it can handle setting paragraphs like this: ![enter image description here](http://i.stack.imgur.com/UEJkn.png) However, a simplified (and far more often-used) version of `\parshape` typically switches between _two_ lengths over a number of lines. For example, ![enter image description here](http://i.stack.imgur.com/FRjM0.png)               \documentclass{article}     \usepackage{lipsum}% http://ctan.org/pkg/lipsum     \begin{document}          \parshape 5       0pt 0.5\textwidth       0pt 0.5\textwidth       0pt 0.5\textwidth       0pt 0.5\textwidth       0.5\textwidth 0.5\textwidth     \noindent\lipsum[1]          \end{document}      However, the use of explicit line lengths that are duplicated makes for cumbersome input - the more lines, the more duplication. Would it be possible to create a macro `\newparshape` (say) that would provide the same as the above, yet allow for input of the form               \newparshape{<num>}{<ind> <wd>}[<indL> <wdL>]      where it would set `<num>` lines with indent `<ind>` and width `<wd>`, while subsequent line (`<num>`+1 onward) set with indent `<indL>` and width `<wdL>`. The above example (default) usage would then be replaced with               \newparshape{4}{0pt 0.5\textwidth}[0.5\textwidth 0.5\textwidth]     \noindent\lipsum[1]      * * * In a more general setting, expanding the restriction of setting only _two_ lengths to more would be to generate `\newparshape` to accept input of the form               \newparshape       {3}{0pt 0.5\textwidth}% 3 lines with 0pt indent and width 0.5\textwidth, followed by       {2}{0.25\textwidth 200pt}% 2 lines with 0.25\textwidth indent and width 200pt, followed by       {..}{...}% .. lines with ... and ..., followed by       [...]% subsequent lines with indent ... and width ...      Of course, a different interface altogether is also acceptable. For example, something more `tabular`-like:               \newparshape{{4}{0pt 0.5\textwidth}{2}{0.25\textwidth 200pt}{..}{...}}[...]      where pairs of arguments are grouped within the first argument of `\newparshape{<lines>}[<other>]`, followed by a possible specification of `<other>` for the treatment of subsequent lines in an optional argument.


title: RGB colour macro: is it possible to divide by 255 in Latex?

text: I'm fiddling with source code display (Objective-C) and the listings package. I want to colour comments the same green that appears in XCode. I determined that it has an RGB value of 67, 133, 34. To use this I need to divide by 255 since this is the format/value range of input parameters to               \definecolor{green}{rgb}{0.34,0.52,0.14}      Is there any way to write a macro in latex that divides by 255? Thanks. In response to comment: If I do               \usepackage{listings} % For source code display.     \usepackage{courier} % For source code display.     \usepackage{xcolor}          \lstset{basicstyle=\footnotesize\ttfamily}     \lstset{language=[Objective]C}     \definecolor{green}{rgb}{67,133,34}     \lstset{commentstyle=\color{green}}      instead of               \usepackage{listings} % For source code display.     \usepackage{courier} % For source code display.     \usepackage{color}          \lstset{basicstyle=\footnotesize\ttfamily}     \lstset{language=[Objective]C}     \definecolor{green}{rgb}{0.34,0.52,0.14}     \lstset{commentstyle=\color{green}}      the comment in my source code listing vanishes.


title: \RequirePackage within \if\else\fi

text: Why does the package `iftex` have to be loaded outside of a `\if...\else\fi` structure? (The same goes for packages `ifpdf`, `ifluatex`, `ifxetex`.) Consider:               \documentclass{myclass}\begin{document}\end{document}      ## This works: i.e., when `\RequirePackage{iftex}` is outside of `\ifodt\else\fi`               \NeedsTeXFormat{LaTeX2e}[1996/06/01]     \ProvidesClass{myclass}[2013/12/15 v0.1 My Class]     \LoadClass{article}     \newif\ifodt\odttrue          \RequirePackage{iftex}     \ifodt      \RequirePackage[utf8]{inputenc}      \RequirePackage[T1]  {fontenc}     \else       \ifLuaTeX\RequirePackage{fontspec}\fi      \ifXeTeX \RequirePackage{fontspec}\fi      \ifPDFTeX \RequirePackage[utf8]{inputenc}                \RequirePackage[T1]  {fontenc}\fi     \fi      ## But not this: i.e., when`\RequirePackage{iftex}` is within `\ifodt\else\fi`               \NeedsTeXFormat{LaTeX2e}[1996/06/01]     \ProvidesClass{myclass}[2013/12/15 v0.1 My Class]     \LoadClass{article}     \newif\ifodt\odttrue          \ifodt      \RequirePackage[utf8]{inputenc}      \RequirePackage[T1]  {fontenc}     \else      \RequirePackage{iftex}      \ifLuaTeX\RequirePackage{fontspec}\fi      \ifXeTeX \RequirePackage{fontspec}\fi          \ifPDFTeX \RequirePackage[utf8]{inputenc}                \RequirePackage[T1]  {fontenc}\fi     \fi      ## Error:               ! Undefined control sequence.     l.12      \ifXeTeX                        \RequirePackage{fontspec}\fi     ?


title: Unicode, right to left characters in command names

text: What is the status, in terms of category codes, of all the Unicode letters above ASCII in XeTeX (using XeLaTex+fontspec) and LuaTeX (using ConTeXt)? Can I define a macro using Unicode characters (ex. \μακρο)? I am asking that because I went mad when trying to type in a right to left language using ConTeXt, since the combination of the TeX commands (LTR) and the text itself (RTL) made the editor unusable, and I found out that something like               \def\شق{\something}      worked, but the subsequent \شق was not synthax-highlighted properly. So I want to know if that is a problem of the editor (TeXShop), or the engine was just being lax when allowing that.


title: Attach link to the reference section

text: I want to add link in the reference but link is not showing in PDF. why?               \documentclass[12pt,a4paper]{article}  \documentclass[12pt,a4paper]{article}     \usepackage{amsmath}\usepackage{amssymb}     \usepackage{graphicx}          \usepackage[left=1.25in, right=1.0in, top=1.25in, bottom=1.0in]{geometry}          \newcommand{\piRsquare}{\pi r^2}                  \title{{\bf Your Research Title}}     \author{Your Name }          \date{December 17, 2013}                         %     \begin{document} \baselineskip=22pt     \maketitle     %     \begin{abstract}     You have to write the abstract here.     \end{abstract}       %     \tableofcontents          %     \section{Introduction}     Albert Einstein (/ˈælbərt ˈaɪnstaɪn/; German: [ˈalbɐt ˈaɪnʃtaɪn] ( listen); 14 March 1879 – 18 April 1955) was a German-born theoretical physicist who developed the general theory of relativity, one of the two pillars of modern physics (alongside quantum mechanics).[2][3] While best known for his mass–energy equivalence formula E = mc2 (which has been dubbed "the world's most famous equation"),[4] he received the 1921 Nobel Prize in Physics "for his services to theoretical physics, and especially for his discovery of the law of the photoelectric effect".[5] The latter was pivotal in establishing quantum theory.     Near the beginning of his career, Einstein thought that Newtonian mechanics was no longer enough to reconcile the laws of classical mechanics with the laws of the electromagnetic field. This led to the development of his special theory of relativity. He realized, however, that the principle of relativity could also be extended to gravitational fields, and with his subsequent theory of gravitation in 1916, he published a paper on the general theory of relativity. He continued to deal with problems of statistical mechanics and quantum theory, which led to his explanations of particle theory and the motion of molecules. He also investigated the thermal properties of light which laid the foundation of the photon theory of light. In 1917, Einstein applied the general theory of relativity to model the large-scale structure of the universe.[6]          %         \begin{thebibliography}{99}         \bibitem{1} Aiolfi, M., & Favero, C.A. (2002). Model Uncertainty; Thick Modeling and the Predictability of Stock Returns. Bocconi University, Mimeo.              \bibitem{12}Detry, P.J. en Gregiore, P. (2001). Other evidences of the predictive power of technical analysis: The moving averages rules on European indexes. EFMA Conference: Lugano. \url{<http://ssrn.com/abstract=269802>}.         \end{thebibliography}         \end{document}     \end{document}      **I have no problem in pdf output but I want the html link in the pdf.**


title: Package for drawing cell decompositions/cell complexes/triangulations

text: Is there a package that helps to draw abstract gluings such as those used for cell complexes/triangulations in topology? ![enter image description here](http://i.stack.imgur.com/oRt8u.png) (Tetrahedral triangulation of a sphere) ![enter image description here](http://i.stack.imgur.com/J2kt8.png) (Torus)


title: Draw snake around the rectangular node

text: I want to draw the "coiled snake " around the rectangle named "Obstacle". The rectangle consist of node "O". I could not figure it out as I am new to tikz. can anyone give me good suggestion in this? Thanks in Advance Here is the code               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{snakes}     \begin{document}          \begin{tikzpicture}     \tikzstyle{block} = [draw,rounded corners,thin,fill= gray!20,  rectangle,   thick,align=center]      % Draw axes      % \node (0,0)(a) {$\theta$}      \draw [<->,thick] (0,2) node (yaxis) [above] {$y$}         |- (2,0) node (xaxis) [right] {$x$};     %\draw [gray](0,0)+(0.5,0)arc(0:45:0.5);      %\path (0,0)++ (22.5:0.7)node{$\theta$};     % Draw two intersecting lines           \draw (1.2,1.2)coordinate(a_2);     %Draw vehicle     \draw [rotate =20](a_2)+(0.5,0)coordinate(V_c)node[block,minimum width=28,minimum height=18, rotate=20](a){};     \draw[snake=coil,](a)++(45:3)node[block,rotate=45,segment aspect=10,,minimum height=50,font =\large](O){Obstacle};          %Draw body axis      \draw [->,rotate =20,thick] (V_c) -- ++(0,0.7)node[rotate=20](yaxis)[above]{$y_{b}$};     % \draw [->,rotate =45,thick] (V_c)++(-0.22,0.5) -- ++(0,0.7)node[rotate=45](yaxis)[above]{$v_{y}$};       \draw [->,rotate =20,thick] (V_c) -- ++(0.8,0)node[rotate=20](yaxis)[below]{$x_{b}$};       %draw Dimension of distance to obstacle       \draw[dashed,rotate=45] (a.22) -- (O);       \draw[snake=brace,raise snake=2pt,gap around snake =2pt,rotate=45] (a.22) -- (O);%for curly bracket       \path (V_c)+(0.5,0)--coordinate(L)(O);       \draw [rotate =45] (L)+(0.1,0.5) node[rotate=45]{$L_i$};       \draw[->](a.10)--+(45:0.5)node[rotate=45,below]{$v$};      \end{tikzpicture}       \end{document}


title: Connecting normal lines with decorated ones

text: I've got a problem, I've tried it a lot and I've investigated about it but I haven't found the answer. I've got a code like this....               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{decorations.pathmorphing}          \begin{document}     \begin{tikzpicture}       \draw[very thick, latex-] (0,8) -- (0,1);       \draw[very thick] decorate [decoration={zigzag}] {(0,1) -- (0,0)};       \draw[very thick, -latex] (0,0) -- (14,0);     \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/jxE2q.png) And I want to do a full `\draw` or `\path` joining the first `\draw` with the second one (the one with decoration) and the third, so the upper line connects with the _zigzaged_ one at (0,1), then draw the decorated line and then at (0,0) connect this line with the other. I would really appreciate the ideas.


title: show image on slides

text: I have put four images on slide and I display them one by one using the pause command. I want to display row-wise, but they are getting displayed vertically one by one. Below is my code:                     \begin{frame}           \begin{columns}[t]           \column{.5\textwidth}           \centering          \includegraphics[width=5cm,height=3.5cm]{pc5.jpg}\\          \pause%            &\includegraphics[width=5cm,height=3.5cm]{pc6.jpg}\\[-1.5mm]\pause%          \column{.5\textwidth}          \centering          \includegraphics[width=5cm,height=3.5cm]{pc8.jpg}\\          \pause%          &\includegraphics[width=5cm,height=3.5cm]{pc7.jpg}          \end{columns}          \end{frame}      I want to display images in following order: pc5,pc6,pc7,pc8 but my code displays it as pc5,pc7,pc6,pc8.


title: Package algorithmic

text: So my problem is whenever I try to use the `algorthmic` package, it gives me an error related to citations! And when I comment out the `algorithmic` block, everything works fine. I read somewhere that `algorithmic` is not compatible with `hyperref`, if that is the case how should I fix it ?


title: Mark text as plain text

text: When inserting a URL in a footnote               \footnote{http://www.bmu-klimaschutzinitiative.de/de/projekte_nki?p=1\&d=450, gesichtet am 21.10.2012}      there are two errors that missing `$` signs have been inserted. How can I mark the URL as plain text?


title: Inserting text containing braces in pstricks

text: I'ld love to create a Database-Symbol with pst-dbicons:               \rput(5.5,3.25){\database{3.5cm}{2cm}{Datenbank(en)}}      The problem is, that there are braces inside of the text. When I remove them, it works, but with the braces - no error - and no icon is drawn. Any solutions?


title: How to modify the headers of this book to lower case?

text: In the following standard `\documentclass{book}` all headers are in upper case. How can I modify the code below to make lower case headers? The even pages show the chapter number and name, and the odd pages show the section number and name. The first page of a chapter has no header, only the page number in the footer. The other pages show the page numbers on the headers: odd pages on the right and even pages on the left, as shown. ![](http://i.stack.imgur.com/K5G1f.jpg) ![](http://i.stack.imgur.com/au3Qd.jpg) It was created with               \documentclass{book}     \usepackage{lipsum}          \begin{document}          \title{Standard \LaTeX{} Book}     \author{The Author}     \date{The Date}     \maketitle     \tableofcontents          \chapter{Test Chapter One}     \section{Test Section One}     \lipsum[1-6]     \section{Test Section Two}     \lipsum[1-6]     \section{Test Section Three}     \lipsum[1-6]          \chapter{Test Chapter Two}     \section{Test Section One}     \lipsum[1-6]     \section{Test Section Two}     \lipsum[1-6]          \end{document}      Remark: the question Page header - Upper and lower case is not sufficiently similar to this one to help me to find a possible solution by my own.


title: Does not imply arrow in \xymatrix?

text: I am wondering how to make a does not imply arrow when using `\xymatrix`. I have a square diagram with two implications (arrows) on three edges only and one arrow on the fourth edge. One of the arrows should be a "does not imply Rightarrow" on these three edges with two arrows. Thanks for your help. Here is the latex code I have:               \documentclass{amsart}     \usepackage{graphicx}     \usepackage[all]{xypic}          \begin{document}          \begin{equation*}       \begin{gathered}         \quad         \SelectTips{cm}{} \xymatrix@C=4.5em@R=4.5em{ A           \ar@<-1ex>@{=>}[d]_-{(3)} \ar@<1ex>@{=>}[r]^-{(1)}  & B             \ar@<1ex>@{=>}|{\, \backslash \,}[l]^{}            \\           C          \ar@<1ex>@{=>}[r]  \ar@<-1ex>@{=>}|{}[u]_-{\;\;(4)}   & D            \ar@<1ex>@{=>}[l] \ar@<-1ex>@{=>}[u]_{\;(5)} }       \end{gathered}     \end{equation*}           \end{document}


title: Strange problems in 3D-Plots TikZ: Missing parts and axes

text: compiling the following example in newest MikTeX or TexLive results in strange problems: Have a look at the plot: ![ProblemPicture: Missing segments and axes](http://i.stack.imgur.com/sGS42.png) There are some missing parts and only the z-axis is drawn. Please try to help.               \documentclass{standalone}     \usepackage{tikz,tikz-3dplot}     \begin{document}     \tdplotsetmaincoords{70}{10}     \begin{tikzpicture}[scale=5,line join=bevel,tdplot_main_coords,fill opacity=.15]     \pgfsetlinewidth{.2pt}     \tdplotsetpolarplotrange{30}{100}{0}{360}     \tdplotsphericalsurfaceplot[parametricfill]%     {18}%     {36}%     {1}%     {black}%     {\tdplotphi+\tdplottheta+\tdplotr}%     {\draw[color=black,thick,->] (0,0,0) -- (1.3,0,0) node[right]{\(x\)};}     {\draw[color=black,thick,->] (0,0,0) -- (0,3.3,0) node[above right]{\(y\)};}     {\draw[color=black,thick,->] (0,0,0) -- (0,0,1.3) node[above]{\(z\)};};     \end{tikzpicture}     \end{document}      Any hints? Thanks in advance


title: Latex Section header and figure won't print on same page

text: I'm trying to print a section that has only figures (no text aside from captions). I have a figure that clearly does not take up a whole page (it takes up half a page at most), but for some reason I get my section header "Model fitting" at the top of a page, then COMPLETE BLANK SPACE under it for the rest of the page, then on the next page the figure I want to include. This is the whole command that I am using for this section (Note I have two figures, but I don't care that the second figure also takes up an entire page):               \FloatBarrier     \subsection{Model fitting}     \begin{figure}     \includegraphics[width=0.5\textwidth]{IRrelation_fitted.pdf}     \includegraphics[width=0.5\textwidth]{IRrelation_Logfitted.pdf}     \caption{(left) plot of the IR voltage output as a function of distance with the fitted curve plotted over it.(right) plot of the log of IR voltage as a function of the log distance with the fitted curve plotted over it}     \label{fig: IR relationship}     \end{figure}          \begin{figure}     \includegraphics[width=0.5\textwidth]{IRrelation_diag01.pdf}     \includegraphics[width=0.5\textwidth]{IRrelation_diag02.pdf}     \includegraphics[width=0.5\textwidth]{IRrelation_diag03.pdf}     \includegraphics[width=0.5\textwidth]{IRrelation_diag04.pdf}     \caption{Diagnostic plots for linear regression used on IR sensor data as a function of distance. \textbf{top left:} Plot of residuals \textbf{top right:} quantile plot of residuals \textbf{bottom left:} scale-location plot, \textbf{bottom right:} Cook's distance (influence)}     \label{fig: IR diagnostics}     \end{figure}     \FloatBarrier


title: Help formatting table of contents, left margin numbers, again

text: I would like to modify the answer that I got in this thread here such that I have the subsection numbers in the TOC but not in the text. I do not completely understand the workings of the code I was given. Thanks               \documentclass[12pt, a4paper]{article}          **\makeatletter     \let\latexl@section\l@section     \def\l@section#1#2{\begingroup\let\numberline\@gobble\latexl@section{#1}{#2}\endgroup}     \def\@seccntformat#1{\ifcsname #1format\endcsname\else\csname the#1\endcsname\quad\fi}     \def\sectionformat{}          \makeatother**          \usepackage{hyperref}          \begin{document}     \tableofcontents     \newpage     \section{Part I}     \subsection{abc}     \subsection{def}     \end{document}


title: pdflatex amd Matlab LaTeX interpreter alternative to psfrag?

text: I use TexWorks that comes together with Tex Live 2012. After having read a lot on how to use "something similar" to `psfrag` with `pdflatex`, I have almost found my way. I have just discovered the instruction `set(legend_name,'Interpreter','latex')` to set a LaTeX interpreter to read what we write in the legend directly. I found it very cool! Next, I want to include a reference in the legend (or a citation). I use the standard command `\cite{bib_key}` when I write the legend in Matlab, but what I get as output is the typical "[?]" since LaTeX cannot find the bib-entry. I have tried to compile with BibTex, but nothing happens. Any hints?