title: Perform matrix operations (addition, product, transpose, etc.) in LaTeX?

text: I know the `calc` package can perform infix-notation arithmetic in LaTeX... but I want more! I'd like to perform (not necessarily infix-notation) linear-algebra operations such as scalar multiplication, matrix addition and product in LaTeX, and then print the result in an `array` or in some matrix environment from `amsmath`. Why would I want to do that in LaTeX directly? Why do I not simply use some linear-algebra software, such as Matlab, Mathematica, etc.? Well, suppose I want to walk my readers through a detailed linear-algebra calculation with many numerical examples. Of course, I could perform all the steps manually first and then hardcode the result of each step in my input file. However, this approach   * is prone to errors (LaTeX' `array`s are not very user-friendly to typeset),   * lacks maintainability (I may decide to change the data in my example, which means I have to modify everything that follows). Hence my question: **Is there a way of easily performing linear-algebra operations in LaTeX?** * * * Ideally, I would like to   1. mimick Matlab's syntax for defining matrices (using commas as column separators and semicolons as end-of-row characters), performing operations on them, extracting sub matrices, etc.. The syntax could be something like the following:              \let\A{1,2,3;4,5,6}     \let\b{1;0;0}     \let\c\matrixprod{\A,\b}     \let\d\submatrix{\c}{(2,1)}        2. have a command that typesets a "matrix object" in an `array` or `matrix` environment, e.g.              \typesetmatrix[bmatrix]{A}        3. be able to perform operations on matrices of arbitrary--albeit relatively small--dimensions ( **edit** : not just 2x2 and 3x3 as in the `calculator` package). Is that currently possible with some package? If not, I'm considering rolling up my sleeves and implementing something, but this would probably prove quite difficult, and I would like to avoid reinventing the wheel :) * * * **Edit** about other operations that would be useful:   * diag (extraction of the diagonal of a square matrix)   * trace    * determinant   * norm(s)   * condition number(s)   * inverse Even more advanced matrix operations that would be awesome, but probably tough to implement:   * eigenvalues & eigenvectors,   * QR, least squares etc.   * SVD,   * other common matrix factorisations.


title: drawing a plane and orthonormal system using tikz

text: I want to draw the following image and i face problems especially in the plane on the left :               \documentclass[tikz]{standalone}         \begin{document}      \begin{tikzpicture}      \draw[thick,->] (52,0) -- (60,0) node[anchor=north west] {$x'$};      \draw[thick,->] (56,-04) -- (56,04) node[anchor=south east] {$x_N$};     \draw[red,thick,dashed] (56,0) circle (2cm);      \draw[thick,->] (57.5,1.55) -- (58,2) node[anchor=north west] {$I^{+}(1)$};      \draw[thick,->] (57.5,-1.55) -- (58,-2) node[anchor=north west] {$I(1)$};      \draw (56,0) node[below right] {$O$} node{$\bullet$};      \draw (58,0) node[below right] {$1$} node{};      \draw (54,0) node[below left] {$-1$} node{};      \end{tikzpicture}      \end{document}       ![enter image description here](http://i.stack.imgur.com/UZ8mi.jpg) i draw the orthonormal system using the `tikzpicture` and i didn't know how to continue any help?


title: latex - bold not bold enough in math

text: I tried to get characters in math-environment bold such that they look like this (picture taken from a book - pdf-sample: link): ![Taken from a book on econometrics.](http://i.stack.imgur.com/Rnci8.png) However, neither `\mathbf{xyz}` nor `\boldsymbol{\mathrm{xyz}}` work in order to get the characters bold enough. In fact it is hard to distinguish bold from non-bold characters. This is the code I tried:               \documentclass[english]{scrartcl}     \usepackage[T1]{fontenc}     \usepackage[latin9]{inputenc}     \usepackage{textcomp}     \usepackage{amstext}     \usepackage{babel}     \begin{document}     As an application of these results, consider the case in which $\mathbf{X}_{1}$     is $\mathbf{i}$, a constant term that is a column of 1s in the first     column of $\mathbf{X}$. The solution for $b_{2}$ in this case will     then be the slopes in a regression that contains a constant term.     Using Theorem 3.2 the vector of residuals for any variable in $\mathbf{X}_{2}$     in this case will be          $\mathbf{x\text{\textasteriskcentered}}=\mathbf{x}-\mathbf{X}_{1}(\mathbf{X}_{1}'\mathbf{X}_{1})^{-1}\mathbf{X}_{1}\mathbf{x}$          $\textrm{x\text{\textasteriskcentered}}=\textrm{x}-\textrm{X}_{1}(\textrm{X}_{1}'\textrm{X}_{1})^{-1}\textrm{X}_{1}\textrm{x}$      \end{document}      Is there a trick how one can get "extra-bold" characters? BR Fabian PS: I've tried pretty much all proposals on how to get characters bold that I've found on the internet.


title: hyperref overfull box

text: Sometimes using `hyperref` can produce overfull boxes because `hyperref` does not seem to allow its hyperlinks to be broken into multiple lines![enter image description here](http://i.stack.imgur.com/MWS4T.png) For exampled the italicized text in the highlighted bibliography entry contains a hyperlink which may be broken into two lines. How do I make it happen? I can't use pdflatex as I am using eps images. Using XeLaTeX produces figures at arbitrary places as shown below: ![Figure at wrong place](http://i.stack.imgur.com/aBJOJ.png) I think this happens due to a conflict of packages that I have. These are all the packages that I am currently using:               \documentclass[paper=A4, fontsize=12, toc=listof, toc=bib]{scrreprt}     \usepackage[inner=2.5cm, outer=2cm, bottom=3cm]{geometry}     \usepackage[super,sort&compress]{natbib}     \usepackage{natmove}     \usepackage{graphicx}     \usepackage{amsmath}     \usepackage{amssymb}     \usepackage{amsfonts}     \usepackage{fancyhdr}     \usepackage{setspace}     \usepackage{lmodern}     \usepackage[hypcap]{caption}     \usepackage{imakeidx}     \usepackage[hidelinks]{hyperref}      Only pdf chain produces the correct output except for the overfull hyperlinks ofcourse.


title: Verse Package: unwanted vertical space between lines

text: This is an issue that's been bothering me for a while. I'm interested in typesetting poetry on narrow pages. I'm using the `verse` package to set the poem and the `geometry` package to manage the page size. When the length of a line of text just reaches the margin, a vertical space is inserted below the line. Here's my minimal example:               \documentclass{article}     \usepackage[paperheight=10in,paperwidth=5in,margin=1in]{geometry}     \usepackage{verse}     \begin{document}     \begin{verse}     % Works how I expect:     The quick brown fox jumped over the\\     Lazy dog.          % Make first line a bit longer, and now there is extra space between lines     The quick brown FOX jumped over The\\     Lazy dog.     \end{verse}     \end{document}      ![Picture](http://imgur.com/sG29Osx.png)


title: How to get the res class document to work for a resume?

text: So I tried to start my resume like this:               \documentclass{res}           \usepackage{graphics}     \usepackage{color}     \usepackage{fancyhdr}     \pagestyle{fancy}          \cfoot{Name}     \rfoot{\thepage}     \fancyhead{}     \renewcommand{\headrulewidth}{0pt}               \begin{document}          \name{Name}     \address{Address info}      I got the error Missing \begin{document} I don't know why I keep getting this error. Any help would be appreciated.


title: Beamer themes cannot be found / Ubuntu / I've tried every folder one can imagine

text: I would like to use the theme for `beamer` called `amsterdam` (`\usetheme{amsterdam})`. I'm using Ubuntu 14.04 LTS and Tex Live 2014. I've tried to place that `beamerthemeAmsterdam.sty` to everywhere, but it gives me error that it cannot be found. I've tried these: > /usr/local/texlive/texmf-local/tex/latex/ > > /home/username/texmf/ <--- I created that texmf folder there. > > /usr/local/texlive/2014/texmf-dist/tex/latex/beamer/themes/theme/ > > /usr/local/texlive/texmf-local/tex/latex/local/ What is the problem? Default themes are in here: > /usr/local/texlive/2014/texmf-dist/tex/latex/beamer/themes/theme/ but I cannot use even those; I get the same error! I'm using Sublime Text as an editor (with latextools). Everything else is working fine.


title: How to draw spherical geometries with TeX?

text: I am working in the field of Astrodynamics and have to do many computations using spherical geometry. To visualize some of the concepts I would like to prepare drawings of things like spherical triangles, planes around the earth, or circles projected onto the sphere. Here are some examples (1): ![Examples of plots](http://i.stack.imgur.com/4Atrt.png) ![Examples of plots](http://i.stack.imgur.com/2hJns.png) How is this possible to do in TeX? I had a look whether this could be done with TikZ but could not find any comparable examples. I am convinced that in theory it should be possible to prepare a TikZ extension that does things like this rather simply, but at the moment I am looking for an already existing solution to accomplish such tasks. When I get more experienced with making such plots I might consider writing a basic package. The question is thus actually threefold:   1. _Is_ it possible to make such plots in LaTeX with current packages?    2. If yes, with TikZ? Could you give me an example how to start?   3. If not, what software would you recommend to prepare and include such kind of 3D graphics? Please note that this is not the kind of question you sometimes get here that asks "Please do this for me!" I honestly tried solving this problem but did not get far at all. It would be really great to get an answer, a lot of people in my field would benefit from this. (1) Wertz, James R. (2009). _Orbit & Constellation Design & Management_. New York: Springer.


title: pgfplots won't produce error bars

text: The following error is thrown when I try to compile the MWE below:               Package pgfkeys Error: I do not know the key '/tikz/error' and I am going to ignore it.     Perhaps you misspelled it.      I'm running MacTeX 2012 with a fully up-to-date distro. MWE:               \documentclass[11pt]{standalone}          \usepackage{pgfplots}     \pgfplotsset{compat=1.7}          \begin{document}          \begin{tikzpicture}       \begin{axis}[         xmin = 0,         xmax = 30,         ymin = 0,         ymax = 0.45       ]         \addplot[           color = black,           only marks,           error bars/.cd,             y dir = both,             y explicit,         ] table[           y = set1,           error = stdev% comment out for MWE         ] {           mcg set1   set2   set3   stdev           0   0.0000 0.0000 0.0000 0.0000           5   0.1031 0.0922 0.0819 0.01           10  0.1935 0.2137 0.2132 0.01           15  0.2875 0.2926 0.2888 0.003           20  0.3373 0.3394 0.3462 0.005           30  0.4396 0.4328 0.4362 0.003         };              \addplot[           color = red,           domain = 0:30         ] {-0.0003*x^2 + 0.0224*x - 0.001};       \end{axis}     \end{tikzpicture}          \end{document}


title: Labeling sides and angles of a right triangle for an argument of the Pythagorean Theorem

text: I would like to draw a right triangle so that its sides are not vertical or horizontal. (No coordinate axes.) I would like the legs to be labeled a and b and the hypotenuse to be labeled c. I would like to drop a perpendicular, drawn as a dotted line segment, from the vertex across the hypotenuse to the hypotenuse. (I heard that there was a command to instruct TikZ to do this.) This creates two smaller triangles that are similar to each other. I would like the four acute angles of the two smaller triangles to be marked with arcs; one pair of equal angles marked with "|" through it, and the other pair of equal angles marked with "||" through it. The only code that I could offer is the code for labeling the vertices of the triangle and drawing the line segments between them. I know that there is much more to code. I reckon that it would be more convenient for anybody responding to decide on the coordinates of the vertices himself/herself.


title: How to write tex4ht source files

text: How can I learn how to edit `4ht` files? What should I read? I want to fix a number of issues in `ooffice.4ht` (inconsistent footnote size, style names which mismatch names used by LibreOffice, dangling space at the end of sentences, etc.) I've read the chapter on `tex4ht` in the _LaTeX Web Companion_ , but I'm still unable to read, let alone modify, it.


title: Using `\allowdisplaybreaks` locally for a single chapter / single equation

text: I do have a longer paper. In one chapter I got several multiline equations, which I wrote using the `align` environment from `amsmath`-package. Actually those are quite long computations which should break anywhere for avoiding to much empty space on a page. I want to use something like `\allowdisplaybreaks`, which does exactly what I want. The problem is, that I do not want to allow displaybreaks anywhere else in the document, where I have no control about it. I tried to use `\allowdisplaybreaks` directly before `\begin{align}`, hoping it would only apply on the next following `align`-enviroment. But it applies to every `align`-environment later in the text. Is there any way to "stop" the command again? And yes, I could use `\displaybreak` for single breaks, but I had to use it in many equations and I needed to put it in every single line, since the pagebreak should move, if I add a few more lines anywhere in the chapter. Thanks for your help, Greyfox


title: Pass named arguments to macro

text: I notice that `includegraphics` takes what seems to be named arguments:               \includegraphics[width=50,height=25,trim=1 2 3 4,clip]{an_img.png}      I'd like to wrap a number of my `includegraphics` calls in a macro, so that the following commands               \happygraphics{an_img.png}     \happygraphics{an_img.png}{rotate=90}      expand to               \includegraphics[width=50,height=25,trim=1 2 3 4,clip]{an_img.png}     \includegraphics[width=50,height=25,trim=1 2 3 4,clip,rotate=90]{an_img.png}      respectively. I've tried using               \DeclareDocumentCommand\song{ m g }{       \includegraphics[width=50,height=25,trim=1 2 3 4,clip,rotate=90\IfNoValueF{#2}{,#2}]{#1}     }      but I get the dreaded               ! Package keyval Error: keepaspectratio,trim=0 0 0.5in 0,clip undefined.      error. How should I go about doing this?


title: MonTeX (mls, manju, mongolian) with Latin script with diacritics

text: I am using the `montex` package to type text in Manchu (`manju`). In my documents, I also use Latin script with diacritics. When I load `montex`, these diacritics no longer appear, and when characters with diacritics reach 100, compilation fails altogether because of too many error. The `montex` documentation lists several encodings for Input and Output, the former including `utf-8` (pp. 19-22). As a non-programmer, I don't quite understand this, but it seems to me that none of the encodings listed in Table 4.1. "MonTeX Input Encodings" has one that can handle all the diacritics that I need. Does this mean that MonTeX is in fact incompatible with full `unicode`? Working minimal example without `montex`:               \documentclass{article}     \usepackage{fontspec}     \setmainfont{Linux Libertine O}     \begin{document}     yǐ mǎn zhōng wèn wén\\ %Latin texts with diacritics in Roman and Italics     \emph{yǐ mǎn zhōng wèn wén}     \end{document}      This looks good: ![enter image description here](http://i.stack.imgur.com/jq6ZW.png) If I also load `MonTeX` and write some Manchu, it does not work:               \documentclass{article}     \usepackage{fontspec}     \setmainfont{Linux Libertine O}     \usepackage{mls} %Loading MonTeX     \begin{document}     \bithe{manju gisun}\\ %Typing Manchu     yǐ mǎn zhōng wèn wén\\     \emph{yǐ mǎn zhōng wèn wén}     \end{document}      The result: ![enter image description here](http://i.stack.imgur.com/ZA2eZ.png) In this file, the italicization has disappeared as well. Looking through the list of encodings in the `MonTeX` manual, I find---perhaps I'm wrong?---that the best encoding is `english` as document language, and `mls` as encoding. But adding these options to               \usepackage[english,mls]{mls}      doesn't change the output. The above is compiled with `XeLaTeX` but I've also compiled the same file with `LuaLateX` with the same result Does anyone know what I should do to resolve this?


title: Labeling and adding caption inside a figure

text: Seems like this question is rather closed. However, I feel that something is missing there. Inside a `figure` environment, the `\caption` alone is nice, but its real power comes from the combination with `\label`. This is what enables the user to enumerate the graphics in his/her document automatically and establish cross references. Is it possible to combine everything together? That is, have a figure which is something like:               |---------------------------|     |                           |     |       <The figure>        |     |                           |     | Figure 1. And its caption |     |---------------------------|      and labeled using `\label{fig:1}`, such that its caption is embedded in the figure itself (like the wonderful possibilities offered in the answers to the linked question). Then have something like `\ref{fig:1}` to refer to this figure. Is it possible to automate this? Somehow, let hand-coded caption communicate with the `\caption`+`\label`+`\ref` mechanism. I have to say that I don't even know where to start addressing this issue.


title: How can I print origdate with citeyear in biblatex-chicago?

text: With "options = {cmsdate=on}" textcite and parencite in biblatex-chicago will print only the origdate in the text. How can I make citeyear do that? It prints only the date.               \documentclass{article}     \usepackage[authordate,backend=biber]{biblatex-chicago}     \usepackage{filecontents}     \begin{filecontents}{\jobname.bib}     @Book{hume1739,       author       = {David Hume},       editor       = {David Fate Norton},       title        = {A Treatise of Human Nature},       publisher    = {Oxford University Press},       year         = 2000,       address      = {Oxford},       options      = {cmsdate=on},       origdate     = {1739/1740}     }     \end{filecontents}     \addbibresource{\jobname.bib}          \begin{document}          textcite: \textcite[111]{hume1739}          citeyear: \citeyear[111]{hume1739}          \printbibliography[heading=bibintoc]          \end{document}


title: How to install LamsTeX on TeX Live (Linux)?

text: LamsTeX macro package is on CTAN but is not installed in my TeX Live. How can I install it? Where should I put the files? Note that, in addition, LamsTeX uses the index-processor and dvipaste programs. So they should also be installed.


title: Two bibliography using thebibliography

text: I was happy with using `\begin{thebibliography} \bibitem \end{thebibliography}` (at the end of chapters of my thesis). I have added a new bibliography with continuous numbering (Manually numbering) at the end of my appendices(after some pages of ending of chapters). In the first bibliography, I converted my title from Bibliography to References (I used `\renewcommand{\bibname}{References}`) but in second bibliography I want title as "References (Cont.)". How can I do that? FYI: I didn't call any file for references. I wrote all of them manually using `\bibitem`.


title: Empty space in standalone document with textopo

text: The question is related to similar issues with standalone package: lots of empty space is added in addition to the desired figure. However, this time no empty paragraphs in source code. My MWE:               \documentclass[convert]{standalone}     \usepackage[english]{babel}     \usepackage{textopo}     \begin{document}     \begin{textopo}     \sequence{EIKKKLFWRAV[VAEFLAMTLFVFISIGSA]LGFNYPLERN}     \end{textopo}     \end{document}      Produces following png after running `pdflatex -shell-escape -synctex=1 -interaction=nonstopmode mwe.tex` ![apparently too wide output](http://i.stack.imgur.com/wY1q9.png) I suspect that the problem is in textopo package rather than standalone, however, I need confirmation from someone more experienced. And any workaround would be highly appreciated.


title: A question on feasible region

text: I faced a difficulty to name the corner point of the feasible region determined by the below LaTeX/TikZ code, who can help me.               \begin{figure}[htpb]     \centering     \begin{tikzpicture}              \draw[gray!50, thin, step=0.5] (-2,-2) grid (14,14);         \draw[very thick,->] (-2,0) -- (14,0) node[right] {$x$};         \draw[very thick,->] (0,-2) -- (0,14) node[above] {$y$};             \foreach \x in {-2,...,14} \draw (\x,0.5) -- (\x,-0.5) node[below] {\tiny\x};        \foreach \y in {-2,...,14} \draw (-0.5,\y) -- (0.5,\y) node[right] {\tiny\y};              \fill[blue!50!cyan,opacity=0.3] (0,0)-- (0,5) -- (6,11) -- (8,10) --(13,0) --cycle;     \put(0,0){A}\put(0,5){B}\put(6,11){C}\put(8,10){D}\put(13,0){E}         \draw (-2,3) -- node[above,sloped] {\tiny$-x+y\leq5$} (9,14);         \draw (6,14) -- node[above,sloped] {\tiny$2x+y\leq26$} (14,-2);         \draw (0,14) -- node[above right,sloped] {\tiny$2x+4y\leq56$} (14,7);          \end{tikzpicture}      \caption{Feasible Region of the problem}     \label{fig:ch3:c2}     \end{figure}


title: differences of pdf sync in TexShop

text: I have this stupid issue that bothers me. I use TexShop on two different computers, and when I command-click the source code (i.e., a forward-inverse search), each computer behaves differently. One of them marks the pdf-text with a red circle: ![enter image description here](http://i.stack.imgur.com/Dggl5.png) The other "highlights" the pdf-text: ![enter image description here](http://i.stack.imgur.com/1TBO6.png) I wasn't able to find out where the difference comes from, and how to change it. Both computers run snow leopard. I think I used the same distribution in both, but it is possible that they use different distribution. Any ideas how to control the way the selected text is marked? **EDIT** :   The one that is all red runs on OS X 10.6.8, Texshop2.47, Texlive2010 and gives red circle for all the sync methods.   The one that has highlight runs on 10.6.8, Texshop2.47, Texlive2011 and gives highlight only when the "syncTex ≥2010" option is selected.


title: Using a congratulatory (end of proof) box properly in LyX

text: I know how to enter the end of proof boxes in LyX: `\square`, `\blacksquare`. However, I don't like where it ends up in the PDF. Here's an example ![enter image description here](http://i.stack.imgur.com/H1UMY.jpg) I want it to mock the example below (cropped from Munkres' Topology) ![enter image description here](http://i.stack.imgur.com/YdO5D.jpg) How do I do this? This is how I currently enter boxes in LyX: ![enter image description here](http://i.stack.imgur.com/9MqQ3.jpg)


title: How modify the translation of a bibtex field?

text: When I use the "translator" field in bibtex (with fontspec and Italian as mainlanguage), for example in a entry like the following one:                   @Book{ apollodoro:2013,         author                   = "Apollodoro",         title                    = "Biblioteca",         editor                   = "P. Scarpi",         translator               = "M. G. Ciani",         publisher                = "Valla Mondadori",         location                 = "Milano",         year                     = "2013\textsuperscript{2}",         } I obtain "trad. da. M. G. Ciani". For, in my opinion, the most common and correct way to translate that string is "trad. it. di M. G. Ciani", I ask you if there is a way to change the current Italian tranlation.


title: greek in latex-template thesis

text: I am using TexMaker and I have just found a beautiful template for my thesis http://www.latextemplates.com/template/masters-doctoral-thesis I have the problem that i can't write greeks. I have tried to add the following commands `\usepackage[english,greek]{babel}` and `\usepackage[iso-8859-7]{inputenc}` but it returns errors. any advice?


title: Is there a way to configure a command to affect the following paragraph?

text: I have made the following small command to insert visible section breaks in a manuscript:               \makeatletter     \newcommand{\subsectionbreak}{         \vspace{1\baselineskip}         \centerline{\char"E030}         \vspace{1\baselineskip}         \@afterindentfalse\@afterheading     }     \makeatother      But I would also like to make the first three words of the following paragraph automatically rendered in small-caps without having to manually add an explicit command (such as `\testsc{first three words}`) to do so. I've read the responses to the question First few words of a chapter/section in small-caps?, and the highest rated response suggests configuring a manual command such as:               \def\scwords #1 #2 #3 {\textsc{#1} \textsc{#2} \textsc{#3} }     ...     \scwords Lorem ipsum delorem fugit however this goes      How might I go about adding the function of the latter command into the former so that `\subsectionbreak` causes the first three words of the following paragraph to render in small-caps?


title: bigger parentheses in equations

text: I have the following TeX equation:               r = (I_n - (.85) M^T)^{-1} (\frac{1 - (.85)}{5}) \cdot 1 \\      I want bigger parentheses around the term `(1-(.85)/5)`, how can I achieve this?   1. How can I get large parentheses?   2. Is there a general symbol for larger symbols such as `\dfrac{}{}` for fractions?   3. How can I do large brackets instead of parentheses?


title: Drawing a Venn diagram

text: Below is a Venn diagram I created in TikZ. ![enter image description here](http://i.stack.imgur.com/aLKTJ.png) Here is the code. I want to now add a set `E` such that `D` is a proper subset of `E` and `E` is a proper subset of `B`. It is apparent that the set `E` cannot be drawn as a circle. At best, it can the boundary of `E` can be the arc on the right side of `D`, coupled with a different arc on the left side between the boundaries of `B` and `D`. And I want to have a different color for `E`, say yellow. What is the best way to go about?               \documentclass{article}          \usepackage{tikz}     \begin{document}     \pagestyle{empty}     \begin{tikzpicture}         \begin{scope}[shift={(3cm,-5cm)}, fill opacity=0.5]             \draw[fill=red, draw = black] (0,0) circle (5);             \draw[fill=green, draw = black] (-1.5,0) circle (3);         \draw[fill=blue, draw = black] (1.5,0) circle (3);         \node at (0,4) (A) {\large\textbf{A}};         \node at (-2,1) (B) {\large\textbf{B}};         \node at (2,1) (C) {\large\textbf{C}};         \node at (0,0) (D) {\large\textbf{D}};         \end{scope}          \end{tikzpicture}     \end{document}


title: Shading an area bounded by curved paths between nodes

text: I am drawing a graph of sorts in `TikZ`, and I have several connected nodes in a cycle, and I would like to shade the area bounded by paths between those nodes. My problem is that the shading is not consistent with the arcs between the nodes (I have drawn the arcs between the nodes separately). My code looks like this:               \documentclass{article}     \usepackage{tikz}     \tikzset{state/.style={circle,draw=black, very thick,inner sep=3pt}}          \begin{document}          \begin{tikzpicture}          \node[state] (a) at (0,0) {$a$};     \node[state] (b) at (2,0) {$b$};     \node[state] (c) at (2,-1.5) {$c$};     \node[state] (d) at (0,-1.5) {$d$};     \draw (a) to (b);     \draw (a) to (d);     \draw (b) to (c);     \draw (c) to (d);     \draw (a) to [bend right=30] (b);     \draw (a) to [bend left=30] (d);     \draw (b) to [bend right=30] (c);     \draw (c) to [bend right=30] (d);     \path[fill=gray!50,opacity=.5] (a) to [bend right=30] (b) to [bend right=30] (c) to [bend right=30] (d) to [bend right=30] (a);          \end{tikzpicture}          \begin{tikzpicture}          \node[state] (a) at (0,0) {$a$};     \node[state] (b) at (2,0) {$b$};     \node[state] (c) at (2,-1.5) {$c$};     \node[state] (d) at (0,-1.5) {$d$};     \draw (a) to (b);     \draw (a) to (d);     \draw (b) to (c);     \draw (c) to (d);     \draw (a) to [bend right=30] (b);     \draw (a) to [bend left=30] (d);     \draw (b) to [bend right=30] (c);     \draw (c) to [bend right=30] (d);     \path[fill=gray!50,opacity=.5] (0,0) to [bend right=30] (2,0) to [bend right=30] (2,-1.5) to [bend right=30] (0,-1.4) to [bend right=30] (0,0);          \end{tikzpicture}          \end{document}      I tried two approaches. The first, I used node names as anchors for the shading, but this does not cover all the area bounded by my curves. It seems that the shading is using the outer edge of the nodes as anchors than the center. The second, I used the coordinates of the nodes as anchors, but this covers too much. As far as I can tell, this is caused by (a) the drawn arcs between the nodes having a shorter distance to bend the same amount, and (b) the radii of the nodes not being all equal, due to the varying size of the characters. The result is this: ![enter image description here](http://i.stack.imgur.com/jOTJM.jpg) I would like to keep the drawn arcs between nodes as they are (even though they are not symmetric across the central axes), and would like to shade the area bounded by those paths and the outer boundaries of my nodes, in effect this: ![enter image description here](http://i.stack.imgur.com/OCPKT.jpg) Any tips in this regard are appreciated!


title: Marking a grid with x and other symbols in tikz

text: I am new to using tikz. I have the following grid: ![enter image description here](http://i.stack.imgur.com/7b3Im.png)               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{positioning}     \usetikzlibrary{patterns}     \usetikzlibrary{shapes}     \usetikzlibrary{plotmarks}          \newcommand{\nvar}[2]{         \newlength{#1}         \setlength{#1}{#2}     }          \nvar{\dx}{1cm}          \begin{document}     \begin{tikzpicture}         % fill outside cells         \fill [orange!40] (-1,-1) rectangle ( 3, 0);          \fill [orange!40] (-1, 2) rectangle ( 3, 3);          \fill [orange!40] (-1, 0) rectangle ( 0, 2);          \fill [orange!40] ( 2, 0) rectangle ( 3, 2);      % pressure cells     \draw [semithick][help lines, step=\dx] (-1,-1) grid ( 3, 3);     \draw [thin,dashed][help lines, step=.5*\dx] (-1,-1) grid ( 3, 3);      \draw [red,thick] ( 0, 0) rectangle ( 2, 2);     \draw [red,thick] (-1,-1) rectangle ( 3, 3);          \end{tikzpicture}     \end{document}      I want to annotate the edges of my grid the to generate a picture that looks like this in tikz: ![enter image description here](http://i.stack.imgur.com/gc7YR.png)


title: How to get a double line subset symbol, (but not \Subset)?

text: The symbol I'm looking for appears in maths when the closure of an open set is contained in a bigger set; it's like two `\subset`, but doesn't look like `\Subset`. It's similar to `\ll`. How can I typeset that symbol? Some code showing the different symbols discussed above:               \documentclass{article}     \usepackage{amssymb}          \begin{document}     \ttfamily     \begin{tabular}{ll}     \string\subset  & $\subset$ \\     \string\Subset  & $\Subset$ \\     \string\ll          & $\ll$ \\     \end{tabular}     \end{document}      ![enter image description here](http://i.stack.imgur.com/cGwjR.png)


title: Widow penalty not working

text: It seems my Widowpenalty is not working, as nothing changes, even with a value of 10000. Is there some contradictory commands anywhere which may cause this problem? This is what I have               \documentclass[a4paper,12pt]{article}          \usepackage{amsmath,graphicx,fullpage,microtype,hyperref,subfig,hypcap,amsfonts}          \DisableLigatures{encoding=*,family=*}     \numberwithin{equation}{section}     \setlength{\parindent}{0px}     \widowpenalty=300     \clubpenalty=300     \hyphenpenalty=300     \interfootnotelinepenalty=300     \hypersetup{colorlinks,citecolor=black,filecolor=black,linkcolor=black,urlcolor=black}     \setlength{\skip\footins}{5mm}     \expandafter\def\expandafter\normalsize\expandafter{%     \normalsize     \setlength\abovedisplayskip{0pt plus 3pt minus 9pt}     \setlength\abovedisplayshortskip{0pt plus 3pt minus 9pt}     \setlength\belowdisplayskip{12pt plus 3pt minus 9pt}     \setlength\belowdisplayshortskip{12pt plus 3pt minus 9pt}     }     \begin{document}          If there is a region which has a larger density of points, this region has a larger volume. This is how curvature occurs in the causal-set. This instance would be similar to the surface of sphere, where the inner shells have a higher volume relative to the outer shells, corresponding to a positive curvature. But what is the coversion rate between the number of elements and volume? Several arguments exist which mostly point to the same answer. For example, when examining the entropy of a black hole horizon, it seems there is one bit of entropy per plaquette of size $8\pi G\hbar$. This leads to a discreteness scale $l=\sqrt{8\pi G\hbar}$ around the Planck length \cite{Sorkin2003}.\\ % speculates about size of element     \\     This means that there are two forces which determine the relative position of causal-set elements. First of all, there is a force which tells each element to 'take up' around a Plack volume of spacetime. You can visualize this as a set of elements which grow like soap-bubbles until they are all around the same size. Each bubble touches its surrounding bubbles such that the whole set makes a surface in the hyperspace.\\     \\     The second force which acts between the elements contrains those bubbles which are linked to each other. The step from one element to the next should also be about a Planck length long. Whenever two elements are causally linked, they are contrained to be around this distance away from eachother within the hyperspace.\\     \\     Given these two forces, we can try to think of aln algorithm which is able to gives coordinates to each of the causal-set elements within the hyperspace. The idea is quite similar to Henson's algorithm discussed in section~\ref{sec:Obtaining the Metric} above. He proposed using the time-like distance to the top of a causal-diamond and the distance to the bottom to determine and element's relative position \cite{Henson2006}. % Very similar method for finding coordinates for causal-set elements     By looking at the repulsive forces of the growing soap-bubble, while contraining them by Planck-sized links, a similar effect occurs.\\     \\     Let us now imagine an algorithm which starts off by placing the causal-set elements in a random position. For each element, it determines the position to every one of the other points and calculates the repulsive force $f_r(i, j)$ acting on it from every other element. It also looks at all the elements which are linked to it and calculates the attractive force $f_a(i, j)$ running only through those links.           \begin{subequations}     \label{eq:Forces}     \begin{align}     f_r(i, j) & = -\frac{K^2}{\parallel x_i - x_j\parallel} & i \neq j \hspace{8mm} i, j \in G \\     f_a(i, j) & = \frac{\parallel x_i - x_j\parallel^2}{K} & i \leftrightarrow j     \end{align}     \end{subequations}          These forces can then be used to displace the element slightly, where the process can start over again until a steady-state is reached. In principle, the two forces acting between all elements gives the causal-set a particular energy. The energy is minimised when the elements are in the 'right' position. This is what the algorithm does.\\     \\     Although we are looking at a Lorentzian manifold, the algorithm just described already exists for Euclidean and Riemanian manifolds. In fact, there is a large body of work done on so called 'graph-drawing algorithms', and in particular on 'spring embedders' where links are replaced by springs to form a mechanical system \cite{Kobourov2007}. % Review of spring-embedders and pseudo-code for Riemanian geometries     The spring forces on the elements move the system to a minimal energy state.\\     \\     In Riemanian manifolds, the algorithm is slightly more complicated in that distances are defined in terms of geodesics. In this case, the metric of the hyperspace into which you are embedding the elements is needed. More precisely, the algorithm computes the forces acting on an element $n$ at position $x$ in its tangent space $T_xM$ where $\tau_x$ is the map from the manifold $M$ to this tangent space \cite{Kobourov2002}. % Introduces spring-embedded graphs in Riemanian geometries     The pseudo-code for this algorithm is the following:          \begin{equation}     \label{eq:Riemanian algorithm}     \begin{array}{l}     \text{generate initial layout}(G)\\     \text{while not done do}\\     \hspace{5mm} \text{foreach } n \in G \text{ do}\\     \hspace{10mm} x := \text{position}[n]\\     \hspace{10mm} G' := \tau_x(G)\\     \hspace{10mm} x' := \text{force directed placement}(n, G')\\     \hspace{10mm} \text{position}[n] :=\tau_x^{-1}(x')\\     \hspace{5mm} \text{end}\\     \text{end}     \end{array}     \end{equation}          In theory, the Riemanian metric can be extended to a pseudo-Riemanian one, such as for Minkowski space. In practice, determining the map $\tau_x$ to the tangent space is the hardest step.\\     \\     These algorithms have also been translated to $Mathematica$ code \cite{Hu2005}. % Mathematica codes for spring embedders and also suggestion for multi-level drawing based on coarse-graining.      There are two different algorithms, one which has both repulsive and attractive forces running through every link, such that each link has an optimal Planckian size. The other has its repulsive force between every element such that they all take up about a Planck volume. For our causal-sets, a combination of these two algorithms may be most appropriate.\\     \\     \end{document}


title: How to add page with restriction notice?

text: How can I add on my thesis a page that has a restriction notice just after the cover page? There is a similar question but for adding copyrighting stuff on the footnote. I don't want to have a footnote in every page. I just want only the second page of the pdf document to be dedicated to that, which will say: "This thesis includes confidential material and should not be copied bla bla bla…" Thank you.


title: Find In Project regex not matching

text: If I do this:               grep -ri "\.'" .      in a terminal to search for the literal .' (dot apostrophe) , it seems to work and returns some hits. However, inside of Kile, using the Find in Files or Find in Project functions which use grep it returns no hits (though searching other normal strings does work, so I know it is searching the right files). Is there a different way I could specify this string? I also tried               .'     \.\'     \\.\\'     ".'"     "\.\'"     "\\.\\'"      but they did not work either.


title: how to set font size in "\rput"?

text: I can set the font in `\rput` like this               \rput(-0.76,0.7){\tiny $1$}      But how can I set more exact font in rput? for example: `6pt`?


title: How do you produce sign for set multiplication (from old math book) in LaTeX?

text: I'm reading an old book on Mathematical analysis and in the chapter on sets I found this: ![enter image description here](http://i.stack.imgur.com/3gqCK.jpg) This represents set multiplication and I want to reproduce this in my notes, but can't seem to find a way to do that. How can I do this in LaTeX?


title: Making a lattice with numbers on vertices

text: Anyone who is familiar with the problem of counting up/right going paths in a rectangle from bottom left corner to upper right corner knows that one way of doing this is doing it by recursion. I want to visualize this and therefore I need to make a lattice which has numbers on vertices of it. In the following matrix numbers are inside the squares but I want them on vertices or even better to have a gap in intersection of four lines and the number could be in that gap.               $\begin{array}{*{20}{c}}     \hline       | & 1&| & 1&| & 1&| & 1&| & 1&| & 1&| & 1| &  \\      \hline       | & 7&| & 6&| & 5&| & 4&| & 3&| & 2&| & 1| &  \\      \hline       | & {28}&| & {21}&| & {15}&| & {10}&| & 6&| & 3&| & 1| &  \\      \hline       | & {84}&| & {56}&| & {35}&| & {20}&| & {10}&| & 4&| & 1| & \\      \hline     \end{array}$      Something like this: ![enter image description here](http://i.stack.imgur.com/hWjLA.png) Important Note: Image has been edited after the question has been answered by the image in correct answer.


title: Set background color of a box with predefined width

text: I would like to have something like a minipage with colored background, i.e. a box where you can predefine the width and the background color. My attempt               \colorbox{green}{\begin{minipage}{\slwidth}     Some text     \end{minipage}}      lead to a box which was a bit wider than the original minipage. Any suggestions?


title: How to colour the pgfgantt canvas based on calendar dates

text: I am working on a `pgfgantt` document where all timelines are governed by real dates and where the titlelist shows week days based on the TikZ `calendar` library. I have used and modified the code from Custom calendar using TikZ to achieve this. The dates are converted to running numbers by using the `pgfcalendardatetojulian`. What I am now looking to do is to colour the background canvas of the Gantt plot so that weekdays are white and Sundays (or weekends, Sat-Sun and holidays) are highlighted by vertical (light) red stripes. In the picture from the MWE this is equal to the area between the two red dashed lines under each red S (for Sunday). This means using the calendar library to determine what parts of the background canvas should be coloured reddish. The question is how this can be done? MWE:               \documentclass{article}     \usepackage[a4paper]{geometry}     \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc}     \usepackage{pgfgantt}       \usepackage{pgfcalendar}          \newcount\startdate     \newcount\daynum     \pgfcalendardatetojulian{2012-01-09}{\startdate}     %Redefinition from pgfcalendar.code.tex     \def\pgfcalendarweekdayveryshortname#1{%       \translate{\ifcase#1M\or T\or W\or T\or F\or S\or S\fi}%     }     \protected\def\zzz{% Mod from http://tex.stackexchange.com/q/87550/19384     \pgfcalendarjuliantodate{\numexpr\startdate\relax}{\year}{\month}{\day}%     \pgfcalendarjuliantoweekday\startdate\daynum     {\ifnum\daynum=6\color{red}%     \tiny\pgfcalendarweekdayveryshortname{\daynum}%     \else     \tiny\pgfcalendarweekdayveryshortname{\daynum}%     \fi}%     \global\advance\startdate1}          \begin{document}     \noindent\resizebox{\textwidth}{!}{       \begin{tikzpicture}         \begin{ganttchart}[vgrid={*5{black,dotted},*2{red,dashed}},hgrid,%                            y unit chart=5mm,x unit=3mm]{20}           \gantttitle{Plan}{20} \\           \gantttitlelist[              title list options={var=\y,evaluate=\y  as \x using              "{\zzz}"}               ]{1,...,20}{1} \\           \ganttbar{Task 1}{2}{5} \\           \ganttlinkedbar{Task 2}{6}{8} \\           \ganttlinkedmilestone{Goal}{9}\\         \end{ganttchart}       \end{tikzpicture}     }     \end{document}      Resulting image but with a reddish shaded area added to show what I would like to achieve for all 'red days': ![enter image description here](http://i.stack.imgur.com/ycSkR.png)


title: Modifying .bst file --

text: First of all, I have checked for a similar questions, but I didn't find anything. Sorry if I am repeating what other people asked before. I need to modify a .bst file (particularly the unstr.bst) to change some things, but I can't find the functions (I can barely understand a .bst file). I have already managed to change the order of author names (from John Smith to Smith, John), but I couldn't change the following:   1. I need to have the references within the text in brackets [1], instead of parenthesis (1).   2. In the bibliography, all entries should be preceded by the index in brackets, like [1] Smith, John.   3. If two of more references are cited together, they should be separated by commas [1,3], and not semicolon [1;3].   4. (optional) If three or more consecutive references are cited together, the reference within text should be like [1-6], not [1;2;3;4;5;6] Can anyone help me on this? Thanks!


title: Fortran syntax highlighting in listings

text: I've got some Fortran 90 source code I want to put into my thesis appendix. For this I'm using the `listings` package. Is it possible to have colored syntax highlighting for the Fortran code?


title: Formatting Annotations in Comments

text: I like to format annotations that occur within comments of C source code with the listing package. Here is an example of the code:               //@ ghost unsigned int no_btn_press = 0;          /*@        @  behavior FewPresses:        @    assumes no_btn_press < 2;        @    ensures no_btn_press == \old(no_btn_press) + 1;        @    ensures \result == 0;       @  behavior EnoughPresses:        @    assumes no_btn_press >= 2;        @    ensures no_btn_press == 0;        @    ensures \result != 0;       @  complete behaviors FewPresses,EnoughPresses;       @  disjoint behaviors FewPresses,EnoughPresses;       @*/     char btnpress(void);      This is an example of an ACSL specification. ACSL is supported by listing, but the key words (behavior, assumes, etc) are not highlighted in the generated (PDF) document. Ihave tried with the `alsolanguage` option. Does someone know how to tweak listing to get the ACSL key words highlighted? Thanks in advance Frank


title: Latex Fonts error

text: I just downloaded MikTex and Texmaker, in order to write an article. But the compiler cannot compile mathematical formulas. When I put `\begin{equation} 'formula' \end{equation}`, I get the following error message:               35i,6n,27p,3241b,189s stack positions out of 5000i,500n,10000p,200000b,50000s     !pdfTeX error: pdflatex (file rtxr): Font rtxr at 657 not found     ==> Fatal error occurred, no output PDF file produced!      I get similar message when trying with $ or [... What should I do ? Thanks


title: tikzpicture and pdf - x axis partially disappears

text: I would like to know why the x axis partially disappears, given the following code. Is it a PDF problem? Also, is there any option to connect the midpoints automatically but not in a smooth fashion? The code is:               \documentclass[landscape]{article}          \usepackage{etex}     \usepackage{pgfplots}     \usepackage{siunitx}     \usepackage{tikz}          \usetikzlibrary{backgrounds,fadings}          \begin{document}          \begin{tikzpicture}%[show background grid]          \tikzstyle{every node}=[font=\scriptsize]          \begin{axis}[/tikz/ybar,      ybar legend,      xtick align=outside,     ymin=0,     axis y line*=left,     bar width=1.5cm,     axis x line*=left,      nodes near coords= {         \pgfmathfloattofixed{\pgfplotspointmeta}          \num[             scientific-notation = fixed,             fixed-exponent = 0,             round-mode = places,             round-precision = 2,             exponent-product=\cdot         ]{\pgfmathresult}},     enlarge x limits=false,     grid=none,        height=6cm,     title={},     xlabel={Intervalos de Clase},     ylabel=\rotatebox{-90}{$F_{i}$},     symbolic x coords={$<11.5$,$11.5$,$14.5$,$17.5$,$20.5$,$23.5$,$>23.5$},     xtick={$11.5$,$14.5$,$17.5$,$20.5$,$23.5$},     minor x tick num=1,      width=\textwidth]     \addplot[white,fill=white] coordinates {($<11.5$,0) ($>23.5$,0)};     \addplot[green!80!black,fill=green!40!white] coordinates {($11.5$,0.32)($14.5$,0.56)   ($17.5$,0.64) ($20.5$,0.76) ($23.5$,1.00)};     \addplot[thick,color=blue,line join=round, smooth] coordinates {($11.5$,0.32) ($14.5$,0.56) ($17.5$,0.64) ($20.5$,0.76) ($23.5$,1.00)};     \legend{}     \end{axis}     \end{tikzpicture}                     \begin{tikzpicture}[overlay]     \node[above] (red) at (0.8,2) {\footnotesize\textcolor{magenta}{Ojiva}};     \node (reddot) at (4.1,3.0) {};     \path[->, color=magenta, line width=0.75] (red) edge [out = 50, in = 145] (reddot);     \node[right] (gre) at (11.5,2.75) {\footnotesize\textcolor{cyan}{Histograma}};     \node (gredot) at (10,2.9) {};     \path[->, color=cyan, line width=0.75] (gre) edge [out = 160, in = 45] (gredot);     \end{tikzpicture}          \end{document}


title: Fit graph into specified dimensions pgfplots

text: I'm trying to get my graph to fit inside of the graph's dimensions (4in by 7.5in). I want the ymin of the graph to be the minimum y value of all my points and the ymax value the maximum y value for all of my points (so that my graph fits snugly but doesn't get cut off). My graph seems to go outside of the boundaries. I've tried to use `enlargelimits=true` but it adds too much whitespace. I've also tried `enlarge y limits={true, abs value=0.75},` and many different variations, however it doesn't appear to affect the graph at all. I could use xmin and xmax but I have ~20 graphs, and I don't really want to change each separately.               \begin{tikzpicture}         \begin{axis}[             xmin=1,             enlarge y limits={true, abs value=0.75},             xlabel=Atomic Number,             ylabel=Atomic Radius $(in$ $pm)$,             width=7.5in,             height=4in,             enlargelimits = false,             extra x ticks={1,84},             title={\large Atomic Number vs. Atomic Radius $(in$ $pm)$}]         \addplot[smooth,mark=none,black] plot coordinates {     (1,37.1) (2,31) (3,152) (4,112) (5,85) (6,77.2) (7,70) (8,73) (9,72) (10,71) (11,186) (12,160) (13,143) (14,117.6) (15,110) (16,103) (17,100) (18,98) (19,227) (20,197) (21,162) (22,147) (23,134) (24,128) (25,127) (26,126) (27,125) (28,124) (29,128) (30,134) (31,135) (32,122.3) (33,120) (34,119) (35,114) (36,112) (37,248) (38,215) (39,180) (40,160) (41,146) (42,139) (43,136) (44,134) (45,134) (46,137) (47,144) (48,151) (49,167) (50,140.5) (51,140) (52,142) (53,133) (54,131) (55,265) (56,222) (57,187) (58,182) (59,182) (60,181) (61,183) (62,180) (63,208) (64,180) (65,177) (66,178) (67,176) (68,176) (69,176) (70,193) (71,174) (72,159) (73,146) (74,139) (75,137) (76,135) (77,136) (78,139) (79,144) (80,151) (81,170) (82,146) (83,150) (84,168)     };          \end{axis}     \end{tikzpicture}      ![enter image description here](http://f.cl.ly/items/3i03382W2C2B080U062q/Screen%20Shot%202012-10-27%20at%2010.51.43%20AM.png)


title: How to draw frame with rounded corners around box

text: Is it possible to simply draw a frame around a box which has rounded corners, and be able to control frame width, frame color, frame radius, box background colour (preferably without having to use the complex TikZ package) eg. (this produces a framed box, but without the required rounded corners)               \documentclass{article}     \usepackage{graphicx}     \usepackage{color}     \usepackage{fancybox}     \begin{document}          \fboxsep=3pt     \fboxrule=2pt     \def\bordercolor{red}     \def\backgroundcolor{white}     \cornersize{0.9}     \fcolorbox{\bordercolor}{\backgroundcolor} {Here is some text}%          \end{document}


title: How to include a varying graphic in margins

text: I need to typeset a case report consisting mainly of text, with the occasional picture. This can be done in the `article` or `amsart` classes, of course, but I would like to include a varying graphic (a small gimmick) in the margins, much like in the LEGO Progress Report (the minifigures on pages 10, 16 and 17 for example). My question, therefore, is how I could achieve this?


title: Defining a variable inside an environment, but use it outside

text: How can I use a variable beyond the environment where it has been set? Following the MWE given below, how can I print the variable it both places (inside and outside the environment) ?               \documentclass{article}     \usepackage[utf8]{inputenc}          \newcommand\referenceSente{}     \newcommand{\defReferenceSente}[1]{\renewcommand{\referenceSente}{#1}}      \newcommand{\printReferenceSente}{\referenceSente}     \newenvironment{myEnvironment}[1]{\defReferenceSente{#1}}          \begin{document}     \begin{myEnvironment}{keyword}     Inside environment : \printReferenceSente     \end{myEnvironment}     Outside environment : \printReferenceSente          \end{document}


title: Identify tcolorbox page breaks

text: I would like to render a breakable `tcolorbox` with mulitple short paragraphs of text where each pair of paragraphs is separated by a rule.               \documentclass{article}          \usepackage{pgffor}     \usepackage{tcolorbox}     \tcbuselibrary{breakable}          \begin{document}          \begin{tcolorbox}[breakable]          \foreach \n in {1, ..., 10}       {         text\par        \hrulefill\par       }          \end{tcolorbox}          \end{document}      Page breaks should only occur at the rules. When a page break occurs, I would like to remove the rule that is right before or right after the page break as the paragraphs are already separated by the page break. Is there some way to identify the position at which a page break occurs within a breakable `tcolorbox`?


title: Remove prefix from figure caption in tufte-book document class

text: I want to get rid of prefixes in figure captions. I use MikTeX, XeLaTeX and `tufte-latex` style class. I've tried three variants:               \caption*{Foto}     \usepackage[labelformat=empty]{caption}     \captionsetup[figure]{labelformat=empty}      but no one helped. Am I doing something wrong? Here's MWE:               \documentclass[nofonts]{tufte-book}          \usepackage{polyglossia}     \setdefaultlanguage{russian}          \usepackage{fontspec}     \setmainfont{Palatino Linotype}          \usepackage{caption}          \begin{document}     \begin{figure}         \includegraphics[scale=0.75]{square.png}         \caption{Foto}     \end{figure}     \end{document}


title: Uppercase greek letters in math in italic/slanted format

text: I read that in math, capital Greek letters should be italic, just like all the other (Latin alphabet) letters. How do I do this? I use `\usepackage[charter]{mathdesign}` as my font.


title: Vertical position after navigating to hyperref hypertargets from hyperlinks seems too low

text: The vertical scroll position after navigating to a `\hypertarget` from a `\hyperlink` (described in the hyperref manual) seems to be too low. The scroll position is at the baseline of the `\hypertarget`, so the target cannot be seen after clicking a `\hyperlink`. If I run `latex -output-format pdf document.tex` twice on Mac OS X 10.8.2 to create a PDF from this document—               \documentclass{minimal}     \usepackage[colorlinks=true,raiselinks=true]{hyperref}     \usepackage{lipsum}     \begin{document}     \hyperlink{target1}{target1}     \hyperlink{target2}{target2}     %\hyperlink{target3}{target3}     \par\lipsum[1-7]     \lipsum*[8]     \hypertarget{target1}{target1}     \makeatletter\Hy@raisedlink{\hypertarget{target2}{target2}}\makeatother     %\raisebox{\ht\strutbox}{\hypertarget{target3}{target3}}     \end{document}      —all the `\hyperlink`s in the resulting document navigate to the baselines of their respective `\hypertarget`s. The example using `\Hy@raisedlink` is taken from hypertarget seems to aim a line too low. The example using `\raisebox` is taken from the same question, but I’ve commented it out because it shows different (but still unexpected) behavior. This question is related to Certain hyperlinks (memoir+hyperref) placed too low and hypertarget seems to aim a line too low, but I am asking it as a new question because I am not using memoir, and neither of the solutions described in hypertarget seems to aim a line too low seem to work for me. This issue seems to be the very thing that the hyperref option raiselinks is intended to address, but that option appears to have no effect on the example document. How should one make a `\hypertarget` (or equivalent) that is above the baseline? One could, I suppose, use `\Hy@raisedlink` with an empty `\hypertarget` (that is, a `\hypertarget` with no associated text), but I’m hoping there’s a better way.


title: Add text right below the algorithms

text: I try to add some texts used to illustrate the algorithms right below the bottom line of algorithms.               \documentclass{article}     \usepackage[ruled]{algorithm2e}     \usepackage{amssymb}     \usepackage{amsmath}     \usepackage[hang,flushmargin]{footmisc}     \usepackage{caption}     \begin{document}     \begin{algorithm}      \caption{How to write algorithms}\label{algorithm1}      \KwIn{this text}      \KwOut{how to write algorithm with \LaTeX2e }      initialization\;      \While{not at end of this document}{       read current\;       \eIf{understand}{        go to next section\;        current section becomes this one\;        }{        $y_0\leftarrow y$\;       }      }     \end{algorithm}     \end{document}      ![enter image description here](http://i.stack.imgur.com/dtoAu.png) I want to add some text below the bottom line as shown below: ![enter image description here](http://i.stack.imgur.com/P3X5c.png) Based on How to create footnote for algorithmicx's comment, one should be using a `minipage`. I update my codes as follows:               \documentclass{article}     \usepackage[ruled]{algorithm2e}     \usepackage{amssymb}     \usepackage{amsmath}     \usepackage[hang,flushmargin]{footmisc}     \usepackage{caption}     \begin{document}     \noindent\begin{minipage}{\textwidth}     \begin{algorithm}      \caption{How to write algorithms}\label{algorithm1}\footnotetext{$y_0$ denotes the initial value.}      \KwIn{this text}      \KwOut{how to write algorithm with \LaTeX2e }      initialization\;      \While{not at end of this document}{       read current\;       \eIf{understand}{        go to next section\;        current section becomes this one\;        }{        $y_0\leftarrow y$\;       }      }     \end{algorithm}     \renewcommand\footnoterule{}     \end{minipage}     \end{document}      but errors occur. Any suggestion will be greatly appreciated.


title: Booktabs and row color

text: As you may know, there is a problem of white space when you try to color rows with book tabs. I found the above solution. However, when you use `@{}` in `\begin{tabular}{@{}*{6}{>$c<$}@{}}` (in order to suppress the space in the edges) some color remains on the left and right, and I do not know how to put it off. Thanks               \documentclass[9pt]{extbook}     \usepackage[french]{keystroke}     \usepackage[utf8]{inputenc}     \usepackage{amsmath,amsfonts,amssymb,amsthm}     \usepackage[table]{xcolor}          \usepackage{array,multicol}          \usepackage[T1]{fontenc}     \usepackage{lmodern}      \usepackage[francais]{babel}          \usepackage{booktabs}                    \colorlet{tableheadcolor}{gray!25} % Table header colour = 25% gray     \newcommand{\headcol}{\rowcolor{tableheadcolor}} %he     \colorlet{tablerowcolor}{gray!10} % Table row separator colour = 10% gray     \newcommand{\rowcol}{\rowcolor{tablerowcolor}} %         % Command \topline consists of a (slightly modified) \toprule followed by a \heavyrule rule of colour tableheadcolor (hence, 2 separate rules)     \newcommand{\topline}{\arrayrulecolor{black}\specialrule{0.1em}{\abovetopsep}{0.5pt}%                 \arrayrulecolor{tableheadcolor}\specialrule{\belowrulesep}{0pt}{-3pt}%                 \arrayrulecolor{black}                 }         % Command \midline consists of 3 rules (top colour tableheadcolor, middle colour black, bottom colour white)     \newcommand{\midline}{\arrayrulecolor{tableheadcolor}\specialrule{\aboverulesep}{-1pt}{0pt}%                 \arrayrulecolor{black}\specialrule{\lightrulewidth}{0pt}{0pt}%                 \arrayrulecolor{white}\specialrule{\belowrulesep}{0pt}{-3pt}%                 \arrayrulecolor{black}                 }         % Command \rowmidlinecw consists of 3 rules (top colour tablerowcolor, middle colour black, bottom colour white)     \newcommand{\rowmidlinecw}{\arrayrulecolor{tablerowcolor}\specialrule{\aboverulesep}{0pt}{0pt}%                 \arrayrulecolor{black}\specialrule{\lightrulewidth}{0pt}{0pt}%                 \arrayrulecolor{white}\specialrule{\belowrulesep}{0pt}{0pt}%              \arrayrulecolor{black}}         % Command \rowmidlinewc consists of 3 rules (top colour white, middle colour black, bottom colour tablerowcolor)     \newcommand{\rowmidlinewc}{\arrayrulecolor{white}\specialrule{\aboverulesep}{0pt}{0pt}%                 \arrayrulecolor{black}\specialrule{\lightrulewidth}{0pt}{0pt}%                 \arrayrulecolor{tablerowcolor}\specialrule{\belowrulesep}{0pt}{0pt}%                 \arrayrulecolor{black}}         % Command \rowmidlinew consists of 1 white rule     \newcommand{\rowmidlinew}{\arrayrulecolor{white}\specialrule{\aboverulesep}{0pt}{0pt}%                 \arrayrulecolor{black}}         % Command \rowmidlinec consists of 1 tablerowcolor rule     \newcommand{\rowmidlinec}{\arrayrulecolor{tablerowcolor}\specialrule{\aboverulesep}{0pt}{0pt}%                 \arrayrulecolor{black}}         % Command \bottomline consists of 2 rules (top colour     \newcommand{\bottomline}{\arrayrulecolor{white}\specialrule{\aboverulesep}{0pt}{-2pt}%                 \arrayrulecolor{black}\specialrule{\heavyrulewidth}{0pt}{\belowbottomsep}}%     \newcommand{\bottomlinec}{\arrayrulecolor{tablerowcolor}\specialrule{\aboverulesep}{0pt}{0pt}%                 \arrayrulecolor{black}\specialrule{\heavyrulewidth}{0pt}{\belowbottomsep}}%          \begin{document}          \renewcommand{\arraystretch}{1.3}          \begin{tabular}{@{}*{6}{>$c<$}@{}}      \topline \headcol     x_i&y_i&\Delta[x_{i-1},x_i]&\Delta[x_{i-2},x_{i-1},x_i]&\Delta[x_{i-3},x_{i-2},x_{i-1},x_i]&\Delta[x_{i-4},x_{i-3},x_{i-2},x_{i-1},x_i]\\ \midline     x_0&{y_0}&&&& \\     \rowcol x_1&y_1&{\Delta[x_0,x_1]}&&& \\     x_2&y_2&\Delta[x_1,x_2]&{\Delta[x_0,x_1,x_2]}&& \\     \rowcol x_3&y_3&\Delta[x_2,x_3]&\Delta[x_1,x_2,x_3]&{\Delta[x_0,x_1,x_2,x_3]}& \\     x_4&y_4&\Delta[x_3,x_4]&\Delta[x_2,x_3,x_4]&\Delta[x_1,x_2,x_3,x_4]&{\Delta[x_0,x_1,x_2,x_3,x_4]} \\     \rowcol \vdots &\vdots &\vdots &\vdots &\vdots &\vdots  \\     \bottomline     \end{tabular}     \vspace{1cm}          \begin{tabular}{*{6}{>$c<$}}      \topline \headcol     x_i&y_i&\Delta[x_{i-1},x_i]&\Delta[x_{i-2},x_{i-1},x_i]&\Delta[x_{i-3},x_{i-2},x_{i-1},x_i]&\Delta[x_{i-4},x_{i-3},x_{i-2},x_{i-1},x_i]\\ \midline     x_0&{y_0}&&&& \\     \rowcol x_1&y_1&{\Delta[x_0,x_1]}&&& \\     x_2&y_2&\Delta[x_1,x_2]&{\Delta[x_0,x_1,x_2]}&& \\     \rowcol x_3&y_3&\Delta[x_2,x_3]&\Delta[x_1,x_2,x_3]&{\Delta[x_0,x_1,x_2,x_3]}& \\     x_4&y_4&\Delta[x_3,x_4]&\Delta[x_2,x_3,x_4]&\Delta[x_1,x_2,x_3,x_4]&{\Delta[x_0,x_1,x_2,x_3,x_4]} \\     \rowcol \vdots &\vdots &\vdots &\vdots &\vdots &\vdots  \\     \bottomline     \end{tabular}     \end{document}      ![enter image description here](http://i.stack.imgur.com/gYUia.png)


title: What is a good format or package for writing a commentary about a paper?

text: I often find myself writing commentaries on scientific papers. By this I mean an informal document written to collect all my comments regarding a peer reviewed publication (which is often about 10 pages, but can easily be from 5 to 20). These commentaries usually:   * Are short - 1-3 pages. Short sentences, short paragraphs, concise language where possible. Often use bullet point lists.   * Have simple, minimalistic but well defined formatting - the idea is to spend minimal time on fancy layouts (and avoid distracting the reader) to produce a short text which is as effortless as possible for the reader (usually a colleague) to consume. However, things like specific formatting for eg. species names or code are still useful (and used).   * May include figures, but often do not (there is no need).   * May include citations, but often do not (and since the document is informal, strictly formatted citations aren't really necessary).   * Make heavy use of sectioning with deep hierarchy to collect comments based on what part or aspect of the paper they pertain to. The function of such a commentary is to allow in-depth discussion of a paper when meeting at a set time is difficult, and to facilitate such discussion by enabling the participants to organize and flesh out their own comments before sharing them. I find that such commentaries are often necessary to write when discussing publications particularly relevant to one's research group, when collaborating on formal commentary (peer reviews) and for various course work revolving around discussing papers. _**My question is,_** is there already a LaTeX package out there meant precisely for writing such commentaries? If not, how do I iron out the details (margins, columns, heading styles) to create my own style? What advice is there for formatting and organizing such commentaries? Previously I have used the default style of Word 2010+. It doesn't look too pretty, but it is quite functional - there are many different heading and subheading styles, which are sufficiently distinct and don't get in the way too much, the default margins, paragraph spacings and bullet point list formats do a decent job of keeping separate units of text appropriately delimited with space. I have tried to cobble together a few lines my own LaTeX, using actual scientific publications as a vague basis. Unfortunately, scientific papers tend to be formatted with a much different document in mind (many figures, proper citations, dense text, limited subsectioning) which runs counter to what I would expect from a commentary. Also, if using columns, sometimes the commentary is so short that the last column looks too short and ugly. Still, it looks nicer than Word, but I haven't used it long enough to comment on functionality (ie. ease of reading). I know about the Tufte books package, and at first the "handout" seemed to be close, but it looks very different from what I was expecting. I don't need such a large margin for figures and footnotes, because I rarely have any. Also, to me the heading font doesn't stand out enough at a glance - it looks too similar to body text (maybe a boldface would work better).


title: Number Sets in Plain TeX

text: Okay, I know how to enter the standard number sets such as Z, Q, R, etc. into LaTeX, but how can I do this in plain TeX? I ask because I can't seem to find it anywhere, and really need them in the document I am currently composing. Thanks.


title: Sorting and citing names with 'von' prefix using biblatex

text: Consider a document whose author is "van Beethoven, Ludwig". I'd like to cite it as "van Beethoven" in the text and list it as "van Beethoven" in the references. This could be achieved with `useprefix=true`. However, I'd like to list the entry not under "v" but under "B" in the references. In Germany, this is often considered to be the proper way to treat names with von and van prefixes. I understand that I can get this behavior by adding a sortkey field to the relevant BibTeX entries, but an automatic solution would of course be preferable.


title: why my pictures in a beamer template are grey

text: I am using the theme in http://melmorabity.fedorapeople.org/latex/beamer/old/beamer-goddard/beamer- goddard-0.1.tar.bz2 My problem is when I insert a picture, my picture colors are all grey, I would like to insert my pictures and preserving their colors I will be appreciate for any help.


title: Emacs (AUCTeX) not writing to vc.tex file when using VC bundle in LaTeX document

text: I'm using GNU Emacs 24.1 for Mac OS X on Lion with the latest version of AUCTeX and the VC bundle to print version information in a footer on my LaTeX documents. The problem is that when I typeset my LaTeX document, it runs the suggested shell command through `\immediate\write18{./vc}` just fine, but it's not writing anything to the `vc.tex` file when the vc script is run. I've checked the log file every time, and the following line always appears:               runsystem(./vc)...executed safely (allowed).      I've spent the better part of a day trying to figure out why the `vc.tex` file is not being revised, and I've narrowed it down to a problem with Emacs/AUCTeX because TeXShop seems to be doing it just fine. Alternatively, I can always run the vc script in Terminal, but I'd like to figure out why the `\immediate\write{./vc}` line isn't working in Emacs. Any ideas??


title: Using arithmetic (other than foreach) to set label of nodes

text: I'd like to use integer variables to set the text inside the label of nodes, BUT WITHOUT using foreach (because these variables have their value set according to some conditional processing) Any clue? Thanks in advance, K.


title: Vertically fit a figure with caption to page

text: I have a very large(heightwise) figure and would like to fit it on a page with its caption, that I place below (document wide style which I would like to keep, and the figure fills the line anyhow, so placing the caption on the side is not a solution). Is there any way to scale the figure to fit the page with the caption? (I amaware of scalebox, but I would like to avoid scaling the captiontext).               \documentclass{report}     \usepackage{floatrow}     \usepackage[demo]{graphicx}     \floatsetup{style=ruled, footposition=caption, capposition=bottom, heightadjust=object}     \begin{document}     \begin{figure}       \includegraphics[height=1.2\textheight]{dummy}       \caption{this should be in text}     \end{figure}     \end{document}


title: One cell with multiple lines

text: I am trying to make a table that has some cells spanning across multiple lines, like this:![Table that I want](http://i.stack.imgur.com/08hYp.png) (I used print screen on my table and then edited it to show how I want it). I have been searching around and didn't find a way to do it, though I have seen similar problems but couldn't apply their solution to mine. This is the code I am using:               \begin{table}         \caption{Funções e conexões do conector X1}     \begin{center}     \begin{tabular}{|c|l|l|}         \hline         \textbf{X1} &\textbf{Descrição} &\textbf{Função} \\         \hline         1   &C      &Saída digital 1 \\         \hline         2   &NA     &a relé \\         \hline         3   &Dl1        &Entradas digitais \\         \hline         4   &Dl2        &optoacopladas \\         \hline         5   &COM 1,2    &1 e 2 \\         \hline         6   &Dl3        &Entrada digital 3 \\         \hline         7   &COM3           &optoacoplada \\         \hline         8   &Al1 +          &Entrada analógica 1 \\         \hline         9   &Al1 -      &diferencial \\         \hline     \end{tabular}     \end{center}     \end{table}      Thanks for the help.


title: Setting vertical margins on top and below align* environment

text: I'm using the amsmath `align*` environment to format multi line formulas. Unfortunately, the environment adds a lot of margin before and below the formula. I found only one solution to get rid of this margins, but I fear it is a little bit hacky:               \documentclass[12pt]{memoir}          \usepackage{amsmath}          \makeatletter         \newenvironment{myalign*}{%           \setlength{\abovedisplayskip}{-\baselineskip}%           \setlength{\abovedisplayshortskip}{\abovedisplayskip}%           \start@align\@ne\st@rredtrue\m@ne         }%         {\endalign}         \makeatother          \begin{document}          Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi et     consequat erat, non malesuada tortor. Phasellus porta cursus risus, eu     rutrum ligula suscipit sed. Proin vestibulum malesuada lacinia.     \begin{myalign*}     x &= 4 \times 5 \\     y &= x     \end{myalign*}     Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi et     consequat erat, non malesuada tortor. Phasellus porta cursus risus, eu     rutrum ligula suscipit sed. Proin vestibulum malesuada lacinia.          \end{document}      **UPDATE** : Also without the blank lines before and after the environment I get too much space. It works when I set both lengths to `0pt`. Is there also another way to avoid the margins?


I get the following error when I compile:               Syntax error; Undefined control sequence \EndIf      Code:               \usepackage{algorithm2e}           \begin{algorithm}[h]     \label{FecEncodeAndSendFECUnits}     \caption{Function for Receiving and FEC-decoding FEC-encoded Units of Data}     \KwIn{}     %\KwOut{codeRate}                   nrOfPacketsReceived = 0 \              HIGHEST\_FEC\_UNIT\_NR\_DECODED\_GLOBAL=0 \             \While{$true$}                 currentPacket = ListenToSocketForNewPkt () \                 $ nrOfPacketsReceived++ $ \                 $ currentFecUnit =ExtractValueOfPktHeader(currentPacket, FEC_UNIT_GLOBAL) $ \                 $ currentFecUnitModulo$ = $currentFecUnit$ \% NR\_OF\_PARALLELL\_FEC\_UNITS\_GLOBAL $ \                 $ currentSymbolNr$ = ExtractValueOfPktHeader($currentPacket$, SYMBOL\_NR\_GLOBAL) $ \                   packetForCurrentFecUnitGlobal[$currentFecUnitModulo$][$currentSymbolNr$] = ExtractDataOfPkt ($currentPacket$) \                 \If { $ currentFecUnit$ > $HIGHEST_FEC_UNIT_NR_DECODED_GLOBAL$ OR                 ( currentFecUnit == 0 AND   nrOfPacketsReceived == 1 ) }                   ExtractPktHeaderAndPutIntoGlobalFecUnitHeaderValues ()                  \EndIf                       \If {currentFecUnit > HIGHEST\_FEC\_UNIT\_NR\_DECODED\_GLOBAL }                                 lastFecUnitModulo  = (currentFecUnit -1 ) \% NR\_OF\_PARALLELL\_FEC\_UNITS\_GLOBAL  \                     DecodeFECUnit (lastFecUnitModulo, nrOfSrcSymbolsGlobal[lastFecUnitModulo], nrOfTotalSymbolsGlobal[lastFecUnitModulo], symbolSizeGlobal[lastFecUnitModulo], rateOfRedundantPkts[lastFecUnitModulo]) \                         $ HIGHEST\_FEC\_UNIT\_NR\_DECODED\_GLOBAL++$ \                    \EndIf                  \EndWhile                         \end{algorithm}      How do I solve this?


title: How do I create a simple multigraph in tikz?

text: I am trying to use the package tikz to create a simple multigraph that should look like this (done in MS Paint): ![A very bad picture](http://i.stack.imgur.com/BTPFP.png) I wrote a code using the package tikz to make something very similar. Here it is: ![Using tikz](http://i.stack.imgur.com/7DD0M.png) However, I don't know how to make it clear that the node 3 is connected to itself. Here is my code:               \begin{tikzpicture}            [scale=1,auto=left,every node/.style={circle,fill=blue!20}]            \node (n1) at (5,7) {1};            \node (n2) at (3,5)  {2};            \node (n3) at (5,5)  {3};            \node (n4) at (7,5) {4};            \node (n5) at (5,3)  {5};            \foreach \from/\to in {n1/n3,n2/n3,n4/n3,n5/n3}              \draw (\from) -- (\to);          \end{tikzpicture}      If anyone can help, I would really appreciate it!


title: TeXnicCenter problem, can't find input index file

text: I've just installed TeXnicCenter. The first error I have encountered is that when I try and build I get the following error: `Couldn't find input index file D:\File location\test nor D:\File location\test.idx.` Where test is what I have named my document. Does anyone know what's going on and how to solve this?


title: Maple package for Latex

text: I'm translating the book PHYSICS WITH MAPLE by Wang. It contains some codes and outputs from Maple of course. I was wondering do we have a package such as mcode or matlab-to-tikz ( MATLAB) for Maple too? The actual problem raises when I have formulas + codes in a box and I have to change the environments from verbatim or listing to math ones or using some specific commands over and over, it sometimes gets really exhausting. Besides I like to have high quality graphs which changes when I alter the code and run the program ,as it does in matlab-to-tikz. Here is a very basic sample of one of the boxes. ![enter image description here](http://i.stack.imgur.com/Umwl1.jpg)


title: Bibtex : Alpha-style citation without year

text: I use bibtex with `\bibliographystyle{alpha}`. How can I cite only the first letter of each author, and remove the year? Examples : (a) instead of [CHN13] , display [CHN] ; (b) instead of [Sil08] , display [S] Does anyone know a simple way to hack a `.bst` file to achieve that? This could sound akward. But my goal is to minimize the place taken by citations, while keeping the references identifiable. Hence, I intend to change by hand the bibitems in the .bbl file, in the cases where multiple labels occur. I have seen two similar questions, any answer for them would be equally interesting : LLNCS alpha numeric reference style alpha-style citation callout without year I have also looked into the manual "makebst" but I am unfamiliar with the language so couldn't understand where this issue is dealt. I am constrained to use Bibtex, because I also submit to journals which accept only `.bst` files, or ordinary `.bbl` files. (Reagarding my goal, it would be interesting to have a `.bst` file that resolves conflicts of multiple bibitems, adding a numerical counter when this happens. Though this looks hard to implement)


title: Tikz/PGF - Accessing custom anchors in \backgroundpath of custom shape

text: I'm trying to create a custom TikZ shape consisting of a rectangle with small arrows on the border (representing signal input/output ports). For the most part I can inherit from rectangle but I'm having some problems creating the input/output port arrows. Ideally, I would define anchors at the port locations and then use those to draw arrows in the backgroundpath section. Problem is, backgroundpath can't use normal anchors. One option is to make the port locations saved anchors, but then I don't have access to \northeast and \southwest. Without those, I'm having troubles getting the anchors to be on the actual border. The other option is just to duplicate the steps it takes to get to each anchor but I don't really like that. Here is an example of what I would like to do:               \makeatletter     \pgfdeclareshape{MyShape}     {         \inheritsavedanchors[from=rectangle]         \inheritanchorborder[from=rectangle]              \inheritanchor[from=rectangle]{center}         \inheritanchor[from=rectangle]{south}         \inheritanchor[from=rectangle]{west}         \inheritanchor[from=rectangle]{north}         \inheritanchor[from=rectangle]{east}         % etc.              \inheritbeforebackgroundpath[from=rectangle]         \inheritforegroundpath[from=rectangle]         \inheritbeforeforegroundpath[from=rectangle]              \anchor{inputA}{%             \southwest              \pgf@y = \advance \pgf@y by 3mm         }              \backgroundpath         {             \pgfsetarrowsend{Latex[length=3pt]}             \pgfpathmoveto{\inputA}             \pgfpathlineto{\northeast}             \pgfusepath{stroke}         }     }     \makeatother      Note: I know that code won't work because inputA is just a normal anchor;


title: Biblatex: cite command to create numeric citation without parentheses?

text: I have a large table which gives a literature overview and contains only citations in its cells. I'm using biblatex with a numeric format, so sources are normally cited as   * [33],    * [35-37, 49]   * [123, S. 54f] etc. The parentheses need a lot of space (the table has many columns), so I'd like to remove them (only) in this table:   Is there a `\cite` command which only gives the numeric key (and the pages) without parenthesis like   * 33   * 35-37, 49   * 123, S. 54f **Note** : I need this modification without [] _only in this one table_ , not in the rest of the document!


title: Modify Alpha bib style

text: I'm working with Latex for the first time, so I don't quite understand the syntax of the bibliography styels. For my thesis I need the citation to be 4 letters of author name/names and 2 numbers for year. For one author Mustermann [Must14], two autors [MuAn14], 3 authors [MuAB14] The closest style I found was alpha. But it only shows 3 letters. Is there a way to easily modify it?


title: Problem with too verbose generated citations

text: In the following MWE, bibtex generates different output for `\citep{}`, depending on which citations are used and which are not. I assume that the problem is related to breaking ambiguity since the two authors with last name _Li_ have different given names. In the case of only using `\citep{}` once with `Li2009` or `Li2009a`, I get a citation `(Li et al., 2009)`, when using both, I get `(Li, Handsaker, Wysoker, Fennell, Ruan, Homer, Marth, Abecasis & Durbin 2009) (Li, Yu, Li, Lam, Yiu, Kristiansen & Wang 2009)`. Is there any way to make the citation less verbose? I realize that there has to be **some** way to discriminate different authors with the same last name, but is there another one? Like using the second author only?               \documentclass{article}          \usepackage{filecontents}     \begin{filecontents}{\jobname.bib}     @article{Li2009,         Publisher = {{Oxford Univ Press}},         author = {Li, Heng and Handsaker, Bob and Wysoker, Alec and Fennell, Tim and Ruan, Jue and Homer, Nils and Marth, Gabor and Abecasis, Goncalo and Durbin, Richard},         title = {{The sequence alignment/map format and SAMtools}},         journal = {{Bioinformatics}},         volume = {25},         number = {16},         pages = {2078-2079},         year = {2009}     }          @article{Li2009a,         Publisher = {{Oxford Univ Press}},         author = {Li, Ruiqiang and Yu, Chang and Li, Yingrui and Lam, Tak-Wah and Yiu, Siu-Ming and Kristiansen, Karsten and Wang, Jun},         title = {{SOAP2: an improved ultrafast tool for short read alignment}},         journal = {{Bioinformatics}},         volume = {25},         number = {15},         pages = {1966-1967},         year = {2009}     }     \end{filecontents}          \usepackage[sort]{natbib}          \begin{document}          \citep{Li2009}     \citep{Li2009a}          \bibliographystyle{agsm}     \bibliography{\jobname} % no file ending necessary          \end{document}


title: Create command not using adjustbox package for inserting image

text: I am creating a test question using `exam.cls` and I think it would be different if i will include image in the question. But i dont really know how should I insert it. i found a solution code that does exactly what I am expecting but these only compiles in 2012 version of TeXLive. Mine was 2009. Is there other posible solution for this to work in 2009 version? Or is there other possible package inspite of using `adjustbox`?               \documentclass{exam}     \usepackage{graphicx}     \usepackage[export]{adjustbox}          \newcommand*{\Image}[1]{\includegraphics[width=1.0cm,height=!,valign=m]{#1}}%     \begin{document}     You can insert image here as     \Image{../activity/ddd}     and your text can continue after it     and spill onto the next line as well, so you can see how this works.     \end{document}      Help


title: How can we change the height of a header box

text: In my poster done using `baposter`, I need to change the height of the `\headerbox.` for example, I have this example:               \headerbox{Results}{name=results,column=2,span=2,row=1,below=results,above=references}{ body….}      here the width is like 2 column and determined by `span=2` and the other parameters are about the position, but about the height ? Because, in my case, I have a `\headerbox` and its contents are overflow despite that there is a space below this `\headerbox`. How can I change its height? thanks to help me


title: Make bibliography "invisible" (with bibtex)

text: While working on a long LateX document I would like the citations to be displayed correctly, but the bibliography itself not being added to the document. Is it possible to make the bibliography being compiled, but not producing output? (Maybe it's not even difficult, and I am just being stupid...)


title: Adding values to pgfplot legend

text: As a follow-up to my earlier question (here), here is a question that is perhaps a little more `latex` than `gnuplot`. having used gnuplot and pgfplots to generate a fitted curve, is there an easy way to have `latex` automatically report the fit parameters (in this case: Ymax, EC50, nH) from the `gnuplot` fit in the legend or caption? Here is a working example:               \documentclass[11pt]{article}     \usepackage{pgfplots}     \usepackage{filecontents}     \usepackage{xcolor}          \begin{filecontents}{drc1.dat}     2   17     5   55     10  96     20  125     50  144     100 147     200 147     500 146     \end{filecontents}                    \begin{document}          \begin{figure}[h!t]     \centering     \begin{tikzpicture}          \begin{axis}[         legend pos=north west,         xmode=log,         ymode=linear,         axis x line*=bottom,         axis y line*=left,         tick label style={font=\small},         grid=both,         tick align=outside,          tickpos=left,         xlabel= {[ACh]} (nM),         ylabel=Response (mm),        %%% GRAPH RANGE %%%             xmin=0.1, xmax=1000,             ymin=0, ymax=160,        %%%%%%%%%%%%%%             width=0.6\textwidth,             height=0.4\textwidth,         ]          \addplot[only marks, mark size=1.8, color=blue] file {drc1.dat};         % Now call gnuplot to fit this data         % The key is the raw gnuplot option         % which allows to write a gnuplot script file         \addlegendentry{{\tiny Experiment 1}}          \addplot+[raw gnuplot, draw=blue, mark=none, smooth] gnuplot {         set log x;         f(x)=Ymax/(1+(EC50/x)^nH);         % let gnuplot fit, using column 1 and 2 of the data file         % using the following initial guesses         Ymax=150;         nH=1;         EC50=50;          fit f(x) 'drc1.dat' using 1:2 via Ymax,EC50,nH;              % Next, plot the function and specify plot range              % The range should be approx. the same as the test.dat x range          plot [x=0.1:1000] f(x);            };                      \end{axis}     \end{tikzpicture}          \end{figure}          \end{document}      The TexShop console reports the results of the fit i.e.               Final set of parameters            Asymptotic Standard Error     =======================            ==========================          Ymax            = 146.818          +/- 3.228        (2.199%)     EC50            = 18.5506          +/- 0.9328       (5.028%)     nH              = 3.1713           +/- 0.5152       (16.25%)      which are also within the generated file `fit.log`. But are these accesible to latex?


title: Is it possible to customize only the section and subsection numbers or titles in memoir?

text: Like the question title says, is it possible to customize only the section and subsection numbers or titles in `memoir`? I know how to change the font for the entire block, but I would like to make the section numbers a bit smaller compared to the section title and to keep the subsection numbers upright while having the subsection title slanted. Also, I would like to be able to do some stuff to the title without affecting the numbers.


title: Customizing arrows with Tikz

text: I'm working with Tikz package and I want to create a new arrow tip. So I used the following code which I found in internet:               \documentclass[a4paper]{article}     \usepackage{tikz}     \usetikzlibrary{arrows}          \begin{document}          % Code for the new arrow tip, called halfcirc.     \pgfarrowsdeclare{halfcirc}{halfcirc}     {     \arrowsize=0.2pt     \advance\arrowsize by .5\pgflinewidth     \pgfarrowsleftextend{-4\arrowsize-.5\pgflinewidth}     \pgfarrowsrightextend{.5\pgflinewidth}     }     {     \arrowsize=0.2pt     \advance\arrowsize by .5\pgflinewidth     \pgfsetdash{}{0pt} % do not dash     \pgfsetroundjoin % fix join     \pgfsetroundcap % fix cap     \pgfpathmoveto{\pgfpoint{-4\arrowsize}{4\arrowsize}}     \pgfpatharc{90}{-90}{4\arrowsize}     \pgfusepathqstroke     }          % Declare a reversed version called revhalfcirc.     \pgfarrowsdeclarereversed{revhalfcirc}{revhalfcirc}{halfcirc}{halfcirc}          % Demonstration of the arrow tip.     \begin{tikzpicture}     \draw[help lines] (-3,-2) grid (3,2);     \draw[line width=10pt, revhalfcirc-halfcirc] (-2,0) -- (0,0);     \end{tikzpicture}          \end{document}      But an error pops up:               ! Undefined control sequence.     \pgf@arrow@right@revhalfcirc -> \arrowsize                                                 =0.2pt \advance \arrowsize by .5\...     l.32 ...pt, revhalfcirc-halfcirc] (-2,0) -- (0,0);          ?       What is the problem? I am a beginner in using Tikz.


title: Starting a PhD; Any guides to setting up a 'system'?

text: I'm starting a PhD and am being overwhelmed with the different possible ways people do things, and how they very rarely mix. I'm (obviously) sold on TeXing it, and have a ViM background I intend on continuing, and am using Mendeley for article tracking. _**Can anyone suggest/recommend a 'system' guide for managing a thesis-size work in TeX including citing/referencing/bibliography, images and charts etc?_** Another nice aid would be a way of integrating a project diary in the same system, but I'm open to experienced ideas about that. I used TeX for my MEng thesis but I'll admit that at the end it was barely holding together with the equivalent of duct-tape and love, would like to start off this with a bit more contributed-wisdom. Either way, unless the guide you recommend has already done an exemplary job, I plan on writing up my own 'guide' to hopefully help someone else down the line.


title: How to modify chapter name in headers in memoir

text: I modified the chapter title to be shown as `1\. ...`, but the headings still show `CHAPTER`. How can I remove the `chapter` in headings? Is there a way to modify the chapter style in the contents and heading at the same time? ![enter image description here](http://i.stack.imgur.com/zPGIJ.png)               \documentclass[12pt,oneside]{memoir}     \usepackage{lipsum}          \title{Document}     \author{prosseek}     % }          % http://tex.stackexchange.com/questions/97465/modify-default-memoir-chapter-style     \makeatletter     \newcommand{\fonttitle}{\chaptitlefont}     \makechapterstyle{mystyle}{%     \def\chapterheadstart{\vspace*{\beforechapskip}}     \def\printchaptername{}     \def\printchapternum{}     \def\printchapternonum{}     \def\printchaptertitle##1{\fonttitle \space \fonttitle \thechapter.\space \fonttitle ##1}     \def\afterchaptertitle{\par\nobreak\vskip \afterchapskip}     }     \makeatother          \chapterstyle{mystyle}          \begin{document}          \maketitle     \tableofcontents          \chapter{The Domain Problem and Stakeholders}     \section{First}     \lipsum           \end{document}


title: pgfdeclareshape with variable dimensions using pgfkeys

text: I am trying to define some shapes for TikZ using \pgfdeclareshape. I would like to use options to make their size adjustable, however I do not get it to work. This example compiles, but the size of the circle is not set properly (or at all). What am I doing wrong :?               \documentclass[oneside,12pt]{scrartcl}     \usepackage{tikz}     \usetikzlibrary{shapes}               \makeatletter     \pgfkeys{/tikz/mycirclesize/.code={\pgf@x = #1}}     \pgfkeys{/tikz/mycirclesize/.default = 0.75cm}     \pgfkeysgetvalue{/tikz/mycirclesize}{\macro}          \pgfdeclareshape{mycircle}     {         \savedanchor\centerpoint{             \pgf@x = .5\wd\pgfnodeparttextbox             \pgf@y = .5\ht\pgfnodeparttextbox         }         \anchor{center}{\centerpoint}              \saveddimen\circsize{ \macro }                   \backgroundpath{             \centerpoint                  \pgfkeys{/pgf/minimum size = \circsize}             \pgfset{inner sep=1pt}             \pgfnode{circle}{center}{}{}{\pgfusepath{draw}}         }          }          \makeatother          \begin{document}               \begin{tikzpicture}              \draw (0,0) node[mycircle, mycirclesize=2cm] {};     \end{tikzpicture}          \end{document}


title: TikZ finishes a morphed path with a straight segment

text: When, in TikZ, I apply a path morphing decoration (say, "snake") and specify the segment length option, I often finish up with a straight segment at the end of the path, such as ![enter image description here](http://i.stack.imgur.com/ZwUXA.png) which often is not the desired behavior. It happens in case there is no room for the whole decoration segment at the end of path. If I do not specify the segment length, it's all right, but I want to have some control over the decoration parameters. Do you know if there is a way to set the segment length softly in such a way that it is modified a bit automatically in order to get rid of these straight segments? The picture was produced with the following code:               \documentclass{article}          \usepackage{tikz}     \usetikzlibrary{decorations.pathmorphing}          \begin{document}     \begin{tikzpicture}         \draw[decorate, decoration = {snake, segment length = .4cm}] (0,0) -- (2,0);     \end{tikzpicture}     \end{document}


title: Header problem with book class

text: It seems I have a problem with the headers using the `book` class. On every chapter when the text is too long the chapter text and the section text merge. Also I don't know how I could make them lower case instead of upper case. The packages I use can be seen below:               \documentclass[12pt,oneside]{book}     \usepackage[english]{babel}      \usepackage{graphicx}      \usepackage{natbib}     \usepackage{appendix}     \usepackage{microtype}     \usepackage[utf8]{inputenc}     \usepackage[english]{isodate}     \usepackage[parfill]{parskip}      \usepackage[colorlinks,pagebackref,pdfpagelabels=true,plainpages=false]{hyperref}      \usepackage{fancyhdr}      \usepackage{makecell}      \usepackage{amsthm}      \usepackage{pdflscape}      \usepackage{multirow}      \usepackage{mdwlist}       I then include each chapter like this:               \begin{document}     \input{title.tex}     \tableofcontents     \input{overview/overview.tex}     \input{background/background.tex}     \input{chapter1/chapter1.tex}     \end{document}      Here is a bit of code from background:               \chapter{Introduction to Simulation}\label{part:background}          \section{A Simple Example}\label{sec:sim_example1}       There is of course content in between. First page of the chapter seems fine however second page of the chapter produces the text below but mangled. It looks a lot better below.               2.1. A SIMPLE EXAMPLEPART 2. INTRODUCTION TO SIMULATION


title: Why does a different font appear on Greek and different on English?

text: I'm trying to create a pdf that contains both English and Greek. But the two different languages appear in different fonts. Can someone tell me why? This is my code:               \documentclass[11pt,a4paper]{report}      \usepackage[utf8x]{inputenc}      \newcommand{\lt}{\latintext}      \newcommand{\gt}{\greektext}     \usepackage[english,greek]{babel}     \usepackage{graphicx}          \begin{document}           \newcommand{\resetfont}{\renewcommand{\familydefault}{put}\normalfont}     \begin{center}     \resetfont     \includegraphics[scale=0.25]{unipi_logo.jpg}\\     \Large      ΔΙΑΧΕΙΡΙΣΗ ΓΝΩΣΗΣ \\[0.5in]          \Large ΕΡΕΥΝΩΝΤΑΣ ΤΟΝ ΡΟΛΟ ΤΩΝ ΔΙΑΡΘΡΩΤΙΚΩΝ ΚΕΝΩΝ ΣΤΗΝ ΜΑΘΗΣΗ: ΜΙΑ ΕΜΠΕΙΡΙΚΗ ΕΡΕΥΝΑ ΤΩΝ ΣΟΥΗΔΙΚΩΝ ΦΑΡΜΑΚΕΙΩΝ\\[0.5in]           \lt     Fausto Di Vincenzo, Jens Hemphala, Mats Magnusson, Daniele Mascia      \end{center}     \end{document}      And this is what I get: ![enter image description here](http://i.stack.imgur.com/JRea1.png)


title: Why \linebreak doesn't work when text width is not set?

text: This is the code I have:               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{shapes}     \begin{document}     \tikz \node[rectangle split, rectangle split parts=2]       {first\nodepart{second}second\linebreak{}third};     \end{document}      Second and third lines are glued to each other. When I'm adding `text width=5em` to the style of this node — everything works fine. How can I make this `\linebreak` work, without explicit specification of the node width? Thanks.


title: How do I typeset continued fractions in Pringsheim's concise notation?

text: I would like to obtain the following formatting so as to write continued fractions in my equations without wasting vertical space. ![Sample of notation](http://i.stack.imgur.com/v9oCo.png) What I need is one command named `\cFrac` which writes one fraction and at the same time which adds vertical rules at the right of the denominator and at the left of the numerator. With this command, the preceding output will be typed : `A + \cFrac{B}{C} + \cFrac{D}{E}`. The sizes of the rules must be adapted to the size of the denominator and the numerator. ( _Added by Andrew Stacey_ : The duplicate question How to typeset a continued fraction in the following style? has an example from the recent literature together with links to more information.)


title: Publication details below chapter title

text: I would like to add some publication details below the title of the chapter. I got here already some useful comments, but I decided now to go with the epigraph environment. At the moment, the code looks as follows:               \documentclass{report}     \usepackage{epigraph}          \renewcommand{\epigraphwidth}{3.5in}     \renewcommand{\epigraphrule}{1pt}          \begin{document}          \chapter{Introduction}          \epigraph{The research described in this Chapter has been published in:}{      P. Moss, J. Morrison, and G. Ranger. {\it Seed production and seedling survival       in a $50$ year-old stand of Corsican pine in Britain}. Advances in Seed Physiology      and Technology 2007.      }           \noindent Here the chapter text goes..           \end{document}      It looks okayish, however, I am still a bit unsure about the appearance; it just does not look right... Maybe I can try left aligning the text, that might help. Anyone else an suggestion how I could improve this so that it looks a bit more "professional". Many thanks for your input!