title: pgfplot: groupplots -- how old?

text: I'm trying to reproduce some examples from the pgfplot documentation, but `\usepgflibrary{groupplots}` does not succeed, while `shapes` does. In the documentation I can't find a hint if this feature is too new for my distribution, I have `texlive-full` in version `2009-15` ... is this too old? The error message is pretty clear:               ! I can't find file `pgflibrarygroupplots.code.tex'.     <argument> ...input pgflibrary\pgf@temp .code.tex                                                    \catcode `\@ =\csname pgf@...     l.5 \usepgflibrary{groupplots}      But as I'm working collaborative with colleagues, installing a more recent version is not a solution. **EDIT** This is the code I try to compile.               \documentclass{minimal}     \usepackage{pgfplots}     \usepackage{tikz}     \usepgfplotslibrary{groupplots}          \begin{document}     \begin{tikzpicture}          \begin{groupplot}[     group style={         group name=my plots,         group size=2 by 2,         xlabels at=edge bottom,         ylabels at=edge left     },height=4cm, width=4cm]     \nextgroupplot     \addplot coordinates {(0,0) (1,1) (2,2)};     \nextgroupplot     \addplot coordinates {(0,2) (1,1) (2,0)};     \nextgroupplot     \addplot coordinates {(0,2) (1,1) (2,1)};     \nextgroupplot     \addplot coordinates {(0,2) (1,1) (1,0)};     \end{groupplot}          \end{tikzpicture}     \end{document}      Here's what I get:               ! I can't find file `pgflibrarypgfplots.groupplots.code.tex'.     <argument> ...input pgflibrary\pgf@temp .code.tex                                                    \catcode `\@ =\csname pgf@...     l.4 \usepgflibrary{pgfplots.groupplots}          (Press Enter to retry, or Control-D to exit)


title: How to write program text in table

text: I have to write a table with two columns and in each column I have to place small C code snippets. Using the `\code{}` in each column seems to be very tedious because I have to write `\code{}` in each line on each box of the table.               \begin{table}[htp]     \caption{Possible transformations}     \begin{minipage}{\columnwidth}     \centering     {\small     \begin{tabular}{|l|l|}\hline\hline     code1           & code2 \\\hline     \code{float PI = 3.14;} & \code{constexpr double PI = 3.14;} \\\hline     \code{if(A > B) A = B } & \code{void F(T\& A, const T\& B)}\\                     & \code{\{if (A>B) A=B; \} } \\\hline     \end{minipage}     \label{tab:general-transformation}     \end{table}      Also I want 2-3 lines of code in each box. How do I do that? Thanks.


title: Support for the punctuation symbols into a macro for characters count

text: ## Question about this macro: > Is possible to have a higher precision with this macro by adding some > punctuation symbols like ,.;:?!'() into the final count of the characters?               \documentclass{scrreprt}          \usepackage{classicthesis}                  \RequirePackage{xparse}             \RequirePackage{siunitx}             \RequirePackage{environ}             \RequirePackage{booktabs}          \ExplSyntaxOn          \bool_new:N \g_has_run_bool     \tl_new:N \l_aw_text_tl     \int_new:N \l_aw_tot_int     \int_new:N \g_aw_tot_alph_int     \int_new:N \g_wid_space_int     \int_new:N \g_space_int     \fp_new:N \g_rat_space_int     \fp_new:N \g_aw_avg_width_fp     \dim_new:N \myalphabetwidth     \dim_new:N \mytextwidth     \makeatletter     \input{\jobname.aux}     \tl_const:Nn \c_aw_the_alphabet_tl {abcdefghijklmnopqrstuvwxyz}          % this can be changed to an evironment or renamed or whatever     \NewDocumentCommand {\avgwidthstart} {}       {         \aw_avg_width:w       }          \NewDocumentCommand {\avgwidthend}{}{}          % Here is the environment version, using just "text" as a name is probably a bad idea.     \NewEnviron{avgtext}     {       \expandafter\avgwidthstart\BODY\avgwidthend     }          \cs_new:Npn \aw_avg_width:w #1 \avgwidthend       {         % if first run, then generate variables to be used         \bool_if:NF \g_has_run_bool           {             \tl_map_inline:Nn \c_aw_the_alphabet_tl             {               \int_new:c {g_##1_int}               \fp_new:c {g_rat_##1_fp}               \fp_new:c {g_wid_##1_fp}             }           }         \tl_set:Nn \l_aw_text_tl {#1}              % this can be used rather than the preceding line to take capital          % letters into account, but is Slooooooow         %\tl_set:Nx \l_aw_text_tl {\tl_expandable_lowercase:n {#1}}              \int_set:Nn \l_aw_tot_int {\tl_count:N \l_aw_text_tl}         \tl_map_function:NN \c_aw_the_alphabet_tl \aw_get_counts:n         \deal_with_spaces:n {#1}         \tl_map_function:NN \c_aw_the_alphabet_tl \aw_calc_ratios:n         \tl_map_function:NN \c_aw_the_alphabet_tl \aw_calc_avg_width:n         \fp_gset_eq:NN \g_aw_avg_width_fp \l_tmpa_fp         \fp_zero:N \l_tmpa_fp              % the dimension \myalphabetwidth gives the width of the alphabet based on your character freq,         % can be accessed by \the\myalphabetwidth         \dim_gset:Nn \myalphabetwidth {\fp_to_dim:n {\fp_eval:n {26*\g_aw_avg_width_fp}}}              % the dimension \mytextwidth gives the recommended \textwidth based on 66 chars per line.         % can be accessed by \the\mytextwidth         \dim_gset:Nn \mytextwidth {\fp_to_dim:n {\fp_eval:n {66*\g_aw_avg_width_fp}}}         \protected@write\@mainaux{}{\mytextwidth=\the\mytextwidth}         \bool_gset_true:N \g_has_run_bool              % and lastly print the content         #1       }          \makeatother          \cs_new:Npn \aw_get_counts:n #1       {         % make a temporary token list from the document body          \tl_set_eq:NN \l_tmpb_tl \l_aw_text_tl         % remove all occurrences of the character         \tl_remove_all:Nn \l_tmpb_tl {#1}         % add to appropriate int the number of occurrences of that character in current block         \int_set:Nn \l_tmpa_int {\int_eval:n{\l_aw_tot_int -\tl_count:N \l_tmpb_tl}}         % add to appropriate int the number of occurrences of that character in current block         \int_gadd:cn {g_#1_int} {\l_tmpa_int}         % add this to the total         \int_gadd:Nn \g_aw_tot_alph_int {\l_tmpa_int}       }          \cs_new:Npn \deal_with_spaces:n #1       {         \tl_set:Nn \l_tmpa_tl {#1}         % rescan body with spaces as characters         \tl_set_rescan:Nnn \l_tmpb_tl {\char_set_catcode_letter:N \ }{#1}         % find number of new characters introduced.  add to number of spaces and alph chars         \int_set:Nn \l_tmpa_int {\tl_count:N \l_tmpb_tl -\tl_count:N \l_tmpa_tl}         \int_gadd:Nn \g_space_int {\l_tmpa_int}         \int_gadd:Nn \g_aw_tot_alph_int {\l_tmpa_int}         % since this comes after the rest of chars are dealt with, tot_alph is final total         \fp_set:Nn \g_rat_space_fp {\g_space_int/\g_aw_tot_alph_int}         % get width of space and use it.  obviously space is stretchable, so i'll assume         % that the expansions and contractions cancel one another over large text.  is this         % a terrible assumption???         \hbox_set:Nn \l_tmpa_box {\ }         \fp_gset:Nn \g_wid_space_fp {\dim_to_fp:n {\box_wd:N \l_tmpa_box}}         \fp_add:Nn \l_tmpa_fp {\g_wid_space_fp*\g_rat_space_fp}       }          \cs_new:Npn \aw_calc_ratios:n #1       {         % divide number of occurrences of char by total alphabetic chars         \fp_gset:cn {g_rat_#1_fp}{{\int_use:c {g_#1_int}}/\g_aw_tot_alph_int}       }          \cs_new:Npn \aw_calc_avg_width:n #1       {         % only need to find char widths once         \bool_if:NF \g_has_run_bool           {             % find width of char box             \hbox_set:Nn \l_tmpa_box {#1}             \fp_gset:cn {g_wid_#1_fp}{\dim_to_fp:n {\box_wd:N \l_tmpa_box}}           }         % multiply it by char frequency and add to avg width         \fp_add:Nn \l_tmpa_fp {{\fp_use:c {g_wid_#1_fp}}*{\fp_use:c {g_rat_#1_fp}}}       }     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     % This part is just for fun. Delete it and the showtable command from the document if     % it isn't wanted         \newlength{\alphabet}%         \settowidth{\alphabet}{\normalfont abcdefghijklmnopqrstuvwxyz}%     \tl_new:N \l_aw_tab_rows_tl     \seq_new:N \g_aw_theor_rats_seq     \seq_new:N \g_aw_the_alphabet_seq          \seq_gset_split:Nnn \g_aw_theor_rats_seq {,}     {0.0651738,0.0124248,0.0217339,0.0349835,0.1041442,0.0197881,0.0158610,0.0492888,0.0558094,0.0009033,0.0050529,0.0331490,0.0202124,0.0564513,0.0596302,0.0137645,0.0008606,0.0497563,0.0515760,0.0729357,0.0225134,0.0082903,0.0171272,0.0013692,0.0145984,0.0007836,0.1918182}          \NewDocumentCommand {\showtable}{}         {           \clearpage           \aw_make_table:         }          \cs_generate_variant:Nn \seq_set_split:Nnn {NnV}     \cs_new:Npn \aw_make_table:         {           \thispagestyle{empty}           \seq_set_split:NnV \g_aw_the_alphabet_seq {} \c_aw_the_alphabet_tl           %takes corresponding letter/theoretical ratio pairs from sequences and applies function           \seq_mapthread_function:NNN \g_aw_the_alphabet_seq \g_aw_theor_rats_seq \aw_generate_row:nn           \begin{table}[h]           \centering           \sisetup{round-mode = places,round-precision = 5,output-decimal-marker={,},table-format = 3.5}           \begin{tabular}{llll}             \toprule             {Average\,\texttt{\textbackslash textwidth}}&{Average\,character\,width}&{Average\,alphabet\,width}&{Alphabet\,width}\\             \midrule             \the\mytextwidth&\fp_eval:n {round(\g_aw_avg_width_fp,5)}pt&\the\myalphabetwidth&\the\alphabet\\             \bottomrule           \end{tabular}\par           \end{table}           \vfil           \begin{center}             Total\,characters\,=\,\fp_eval:n {\g_aw_tot_alph_int}           \end{center}           \[%             \mathrm{Total\,line\,type}=\frac{\fp_eval:n {\g_aw_tot_alph_int}\cdot \fp_eval:n {round(\g_aw_avg_width_fp,5)}\mathrm{pt}}{\fp_eval:n {\g_aw_tot_alph_int*{round(\g_aw_avg_width_fp,5)}/({\g_aw_tot_alph_int}/66)}\mathrm{pt}}=\fp_eval:n {\g_aw_tot_alph_int/66}           \]           \vfil           \begin{table}[h]           \centering           \sisetup{round-mode = places,round-precision = 5,output-decimal-marker={,},table-format = 3.5}           \begin{tabular}{cSSS}             \toprule             {Letter}&{Actual}&{Theoretical}&{Difference}\\             \midrule             spaces&\fp_eval:n {\g_rat_space_fp*100}\%&19.18182\%&\fp_eval:n {{\g_rat_space_fp*100-19.18182}}\%\\             \tl_use:N \l_aw_tab_rows_tl             \bottomrule           \end{tabular}\par           \end{table}         }          \cs_new:Npn \aw_generate_row:nn #1#2         {           \tl_put_right:Nn \l_aw_tab_rows_tl {#1&}           \tl_put_right:Nx \l_aw_tab_rows_tl {\fp_eval:n {100*{\fp_use:c {g_rat_#1_fp}}}\%&}           \tl_put_right:Nn \l_aw_tab_rows_tl {\fp_eval:n{100*{#2}}\%&}           \tl_put_right:Nx \l_aw_tab_rows_tl {\fp_eval:n {{\fp_use:c {g_rat_#1_fp}*100-\fp_eval:n {#2}*100}}\%}           \tl_put_right:Nn \l_aw_tab_rows_tl {\\}         }          \ExplSyntaxOff          \begin{document}          \avgwidthstart     lorem ipsum dolor sit amet consectetur adipiscing elit aenean faucibus luctus diam id convallis mauris faucibus ut aenean accumsan dignissim posuere praesent et diam nec est lobortis faucibus fusce sit amet placerat velit curabitur tortor velit imperdiet imperdiet condimentum in blandit ac augue in vulputate volutpat ligula malesuada porta mi eleifend at praesent ut augue vel nulla molestie ornare ac a sem donec luctus volutpat ipsum sed consectetur maecenas at lacus a tortor congue blandit vestibulum elementum risus dapibus sem blandit adipiscing pellentesque vulputate ullamcorper vulputate in suscipit facilisis libero maecenas massa sapien      \avgwidthend          \showtable{}          \end{document}      > I have try the way below but... >   >   >                                                                   %ADD OTHER > SYMBOLS WITHOUT AN ORDER >     \tl_const:Nn \c_aw_the_alphabet_tl {abcdefghijklmnopqrstuvwxyz,.;:?!'} >   >                                                              %CHANGE 26 INTO > 33 (TOTAL OF CHARACTERS) >     \dim_gset:Nn \myalphabetwidth {\fp_to_dim:n {\fp_eval:n > {33*\g_aw_avg_width_fp}}} >   >   >     % ANALYZING THIS CHARACTERS I GET 32, NOT 33 WHY? >     % ALSO THE TABLE BELOW DON'T SHOW THE FREQUENCIES OF THE ADDED SYMBOLS, > WHY? >     % IF IS FOR THE CORRESPONDING TEORICAL VALUES DOES NOT MATTER, >     % THE TEORICAL VALUES CAN ARRIVE ONLY AT THE LAST CHARACTER THAT > CORRESPOND ONE VALUE >     % AND THAN LEAVE A WHITE SPACE OR ELSE CANCEL ALL THE TEORICAL VALUES >   >   >     \avgwidthstart >     abcdefghijklmnopqrstuvwxyz,.;:?!' >     \avgwidthend >


title: how a \framebox will appear around the text on a click

text: I use some framebox for some sentences. But I want it to appear in the same slide after next click. How can a frame appear around the text on a click in the presentation?


title: Tikz matrix with header row

text: How can I create a tikz matrix where the first row is a header row with nodes that are centered and all other rows after that have the text left aligned                  H1      H2      H3      adfsf   34993   ddddd      234     220     ,,,,,,      239494  349     ...      H1 is centered horizontally in it's column. Same for H2 and H3. All the other text is centered left in their columns


title: tikz matrix keep spaces in text

text: I have a tikz matrix                row1 & a  b  c  & d  e  f \\      row2 & 1  12 16 & 34 2  55 \\      ....      and I need to keep the spacing correct(basically use a monospaced font) for correctly alignment between rows. I can't make each letter into it's own column because it will mess up the total matrix(which is more complex than the example above). Some columns will not have to be spaced like this. I could possibly make the whole matrix monospaced though if it will preserve spacing? I've tried `\verbatim` but I get errors. The


title: Biblatex no printing "p." when page number ends in some letters

text: Using `biblatex.sty 2013/01/10 v2.5` and `biber version: 1.5`, given               \documentclass{article}     \usepackage{biblatex}     \addbibresource{pages.bib}          \begin{document}     \nocite{*}     \printbibliography     \end{document}      and the .bib file               @Article{A,       author =       {Some author},       title =        {Some title},       journal =      {Some journal},       year =         2013,       pages =        {1A}     }      the page number is generated as '1A' instead of 'p. 1A'. Note 1: The same happens if I replace the 'A' in '1A' by some letter not belonging to Roman numerals, i.e. I, V, X, L, C, D or M. Note 2: The same happens if I replace the `biber` backend by the `bibtex` one. Note 3: If I remove `biblatex` and I use `bibtex` instead, I got the right result.


title: biblatex continuous reverse numbering all but one category

text: I am updating my cv and the answer biblatex continuous reverse numbering... to my previous question solved my problem, until I realized that I should not count my unpublished articles (which I would like to show right after the published ones), the problem thus is:               **Articles (3)**     [6] great Article 2     [5] great Article 2     [4] great Article 1          **Submitted but unpublished Articles (2)**     - hopefully soon published Article 2     - hopefully soon published Article 1          **Presentations (2)**     [3] great Presentation 2     [2] great Presentation 1          **Thesis**     [1] great Thesis      I figured out by following this idea count references in `\AtDataInput` how to count just the items in a given category `\iscategory{article}` does the trick in the `\ifboolexpr{}{}{}` - which works great!


title: Enable and disable contents of \chapter command

text: I have large set of contents for the user. For a different user I would like to show different contents. For this I would like to produce different output by showing and not showing some of the contents (say chapters sections subsection) of the document. My Idea is: While writing chapter/section I declare it to enable showing to a specific user by setting argument to true or false. For example, > if (user1 == true) then it should be there in `user1.pdf` More specifically, something like: Macro is: `\chapter <chapterName1> [bool arg1][bool arg2][bool arg3]`               \chapter <chapterName1> [user1==true][user2==false][user3==false]           \chapter <chapterName2> [user1==true][user2==true][user3==false]          \section <sectionName1> [user1==true][user2==true][user3==true]      If I pass `user1` and `user3` as 'True', then my output should contain command (ex) : `\def\arg1=true, arg2=false, arg1=true \input{myfile}`               chapterName1          sectionName1      How can I do this?


title: What can go wrong when using macros as arguments of other macros?

text: Thats a problem I encountered several times during the last weeks. I try to use macros as arguments of other macros, and it doesn't work. The most recent example: I try to use `\addcontentsline` to put a name from a `datatool` database into the table of contents. _MWE 1:_               \documentclass{article}          \usepackage{datatool}          \DTLnewdb{database}          \DTLnewrow{database}     \DTLnewdbentry{database}{shortcut}{JD}     \DTLnewdbentry{database}{name}{John Doe}          \begin{document}          \tableofcontents          %this works and produces the output "John Doe"     \DTLfetch{database}{shortcut}{JD}{name}          %if I use the same command inside \addcontentsline,     %it doesn't work and returns errors     \addcontentsline{toc}{section}{\DTLfetch{database}{shortcut}{JD}{name}}          \end{document}      I'm not (only) asking for a solution to this particular problem, but for a more general explanation what I should consider when using macros as arguments of other macros and what can cause errors when doing so. I'm sorry if that's a stupid question, but I wasn't able to find any information about that topic, neither in _The LaTeX Companion_ nor the internet, although I spent many hours searching. **EDIT:** Please provide a general answer instead of only solving the problems in the MWEs, if possible. I'd like to understand a bit of what causes those errors and how to avoid them, and I imagine there are many unexperienced users out there who might also find this useful. To illustrate what kind of problems I'm talking about, here is another MWE with a problem similar to _MWE 1_. I tried to solve it by adding `\protect` randomly on several places (as egreg did in his answer with _MWE 1_ , except I guess HE knew what he was doing `;-)` ), but I couldn't make it work in this way. _MWE 2:_               \documentclass{article}          \usepackage{datatool}          \DTLnewdb{database}          \DTLnewrow{database}     \DTLnewdbentry{database}{shortcut}{JD}     \DTLnewdbentry{database}{name}{John Doe}          %command which reads and prints the name belonging to the shortcut     \newcommand{\readname}[1]{\DTLfetch{database}{shortcut}{#1}{name}}          %environment for some text written by the author whose shortcut is in the argument     \newenvironment{authorstext}[1]{%         \addcontentsline{toc}{subsection}{#1}%when this line is removed, everything works         {\textbf{#1} has written this text:}%     }{}          \begin{document}          \tableofcontents          \section{Authors}          %this doesn't work     \begin{authorstext}{\readname{JD}}     Some text by John Doe.     \end{authorstext}          %this works     \readname{JD}          \end{document}


title: Tikz add arrows to multiple segments of a `\draw` command

text: I'm drawing an org chart and I'd like to have arrows pointing to each of the nodes I do so. I'm also lazily using a single draw command to draw a line from each of the nodes as the last part of my process. Is there some way that I can specify an `[->]` going to C and B but not to hub1 in the example I've shown without drawing each line individually?               \documentclass[10pt]{article}     \usepackage{tikz}     \usetikzlibrary{calc,positioning}     \tikzstyle{a}=[rectangle,draw]          \begin{document}     \begin{tikzpicture}     \node [a] (A) at (0,0) {A};     \node [a,below=1cm of A] (B) {B};     \node [a,left=1cm of B] (C) {C};     \node [a,right=1cm of B] (D) {D};     \node [below=0.25cm of A] (hub1) {};     \draw [->] (A.south) -- (hub1.south) -| (C.north) (hub1.south) -- (B.north) (hub1.south) -| (D.north);          \end{tikzpicture}     \end{document}      editing on from @texenthusiast comment below I've tried using a `\foreach` loop to edit this, but now the arrow for B points the wrong way. Any thoughts?               \documentclass[a6]{minimal}     \usepackage{tikz}     \usetikzlibrary{calc,positioning}     \tikzstyle{a}=[rectangle,draw]          \begin{document}     \begin{tikzpicture}     \node [a] (A) at (0,0) {A};     \node [a,below=1cm of A] (B) {B};     \node [a,left=1cm of B] (C) {C};     \node [a,right=1cm of B] (D) {D};     \coordinate [below=0.6cm of A] (hub1) {};     \foreach \a/\b/\c in {C/east/0.1cm,B/north/0,D/west/-0.1cm}     \draw [->] (hub1) -| ($(\a.\b)+(\c,0)$) -- (\a.\b);     \end{tikzpicture}     \end{document}


title: Using small caps for abbreviations

text: I’m using small caps to mark up acronyms. Many style guides recommend this to make the acronyms stand out less among the lower-case letters. However, I didn’t find good advice of what to do with mixed-case acronyms, such as “OpenMP”. For consistency, I’m currently setting them in small caps as well, e.g. `\textsc{OpenMP}`. However, I feel that this defeats the original purpose of the small caps, and indeed it makes the abbreviation stand out disproportionately from the surrounding text, causing disruption. But all the other alternatives seem to have disadvantages as well. For reference, these are the alternatives that I can think of. ![rendered example](http://i.stack.imgur.com/AgBj8.png)   1. `\textsc{OpenMP}`, as mentioned above. Consistent with other abbreviations, in that it uses small caps all through. Inconsistent in that it makes _minuscules_ into small caps and preserves majuscules.   2. `\textsc{o}pen\textsc{mp}`, only small-cap the capitals, logically the most consistent with the other abbreviations, but looks prohibitive.   3. `OpenMP`, normal font. Am I missing something? What is the best alternative? What rationale can you offer for your decision? _Furthermore_ , I am currently defining my abbreviations via a convenient macro:               \newacronyms{api, cpu, dna, oop, OpenMP, …}      Which defines macros `\api`, `\cpu`, … `\OpenMP` etc. If possible, I’d like to preserve this style. I’m not sure how I could achieve such a convenient mechanism for methods 2 and 3 above. How would this be implemented?


title: What best combination of fonts for Serif, Sans, and Mono do you recommend?

text: Now that Xe(La)TeX is being increasingly used to deliver nifty documents, I am wondering if any recommendations have been published or discussed about the best combination of font families for mixing Serif, Sans Serif, and Monospace. For example, I know that Kieran Healy uses a nice combination of Minion Pro, Myriad Pro, and Pragmata (a LaTeX template is available at kjh-vita). Likewise, according to the American Association of University Presses, Minion, ITC New Baskerville and FF Scala & 4. FF Scala Sans are the top three best fonts, but see Top Typefaces Used by Book Design Winners. I have been playing myself with Apple Garamond, Fontin Sans and Menlo (Apple default monospaced font shipped with OS X 10.6), because all are available with any combination of `\itshape` and `\bfseries` (as described in The XeTeX Companion). So my question is just: What would you recommend as pretty looking and freely available fonts for typesetting a TeX or LaTeX document? Ideally, this should allow to use mathematical expressions as well. ( _one response per post please_ )


title: Is it possible to number an enumerate list?

text: I have an enumerated list using `{enumerate}` that looks like the following:               \begin{enumerate}[i.]     \item Cat     \item Dog     \item Horse     \end{enumerate}      But I want to know if it's possible to number the entire list? So that if this is the third list in my document and I want to refer back to Dog, I can call it 3ii and so that my enumerated list would look something like: 3 i. Cat ii. Dog iii. Horse


title: 2D surface on a 3D surface plot external data in a file

text: I am drawing a 3D surface from external data. Here they are:               0 0 -0.64     1 0 -0.5     2 0 -0.4     3 0 -0.31     4 0 -0.23     5 0 -0.2     6 0 -0.24     7 0 -0.32     8 0 -0.42     9 0 -0.59     10 0 -0.76          0 1 -0.54     1 1 -0.4     2 1 -0.27     3 1 -0.17     4 1 -0.08     5 1 -0.03     6 1 -0.05     7 1 -0.14     8 1 -0.27     9 1 -0.45     10 1 -0.63          0 2 -0.46     1 2 -0.31     2 2 -0.16     3 2 -0.03     4 2 0.07     5 2 0.12     6 2 0.11     7 2 0.02     8 2 -0.13     9 2 -0.32     10 2 -0.51          0 3 -0.44     1 3 -0.26     2 3 -0.08     3 3 0.07     4 3 0.18     5 3 0.25     6 3 0.24     7 3 0.14     8 3 -0.01     9 3 -0.2     10 3 -0.41          0 4 -0.44     1 4 -0.26     2 4 -0.04     3 4 0.13     4 4 0.25     5 4 0.32     6 4 0.31     7 4 0.22     8 4 0.07     9 4 -0.14     10 4 -0.37          0 5 -0.44     1 5 -0.26     2 5 -0.05     3 5 0.14     4 5 0.27     5 5 0.34     6 5 0.33     7 5 0.24     8 5 0.09     9 5 -0.12     10 5 -0.36          0 6 -0.48     1 6 -0.29     2 6 -0.08     3 6 0.09     4 6 0.22     5 6 0.29     6 6 0.28     7 6 0.2     8 6 0.06     9 6 -0.13     10 6 -0.35          0 7 -0.55     1 7 -0.34     2 7 -0.15     3 7 -0.0     4 7 0.11     5 7 0.18     6 7 0.18     7 7 0.11     8 7 -0.02     9 7 -0.2     10 7 -0.39          0 8 -0.63     1 8 -0.44     2 8 -0.27     3 8 -0.13     4 8 -0.03     5 8 0.04     6 8 0.04     7 8 -0.02     8 8 -0.13     9 8 -0.29     10 8 -0.45          0 9 -0.71     1 9 -0.59     2 9 -0.43     3 9 -0.28     4 9 -0.18     5 9 -0.13     6 9 -0.13     7 9 -0.17     8 9 -0.26     9 9 -0.38     10 9 -0.53          0 10 -0.83     1 10 -0.75     2 10 -0.59     3 10 -0.45     4 10 -0.35     5 10 -0.3     6 10 -0.3     7 10 -0.34     8 10 -0.42     9 10 -0.52     10 10 -0.66      I am using the following code to plot it:               \documentclass{article}     \usepackage{tikz}     \usepackage{pgfplots}     \pgfplotsset{compat=1.7}     \begin{document}       \begin{tikzpicture}         \begin{axis}[view={-20}{20}, grid=both]           \addplot3[surf] file {filename.txt};         \end{axis}       \end{tikzpicture}     \end{document}      You can see the result bellow: ![Result of the code:](http://i.stack.imgur.com/VVkd3.png) I want to know how I can add a 2D surface on top of this like this question. So the only difference I feel is that I have external data instead of a function. Thank you in advance.


title: Your best snowflake with Tikz

text: Christmas is coming, show me your best snowflakes made with Tikz :) ![enter image description here](http://i.stack.imgur.com/sNRNR.png)               \documentclass{standalone}          \usepackage{tikz}     \usetikzlibrary{decorations.fractals}     \usepackage{pgfplots}          \begin{document}          \begin{tikzpicture}[decoration=Koch snowflake]         \draw decorate{decorate{decorate{decorate{(0,0) -- (3,0)}}}};         \draw decorate{decorate{decorate{decorate{(3,0) -- (1.5,-3)}}}};         \draw decorate{decorate{decorate{decorate{(1.5,-3) -- (0,0)}}}};     \end{tikzpicture}          \begin{tikzpicture}     \begin{axis}[axis lines=none]     \addplot+[domain=0:2*pi,samples=1000,mark=none, color=black]     ({10*cos(deg(x)) + 2*cos(deg(4*deg(x))) +  2*cos(deg(10*deg(x)))},     {10*sin(deg(x)) + 2*sin(deg(4*deg(x))) +  2*sin(deg(10*deg(x)))});     \end{axis}     \end{tikzpicture}          \end{document}      **EDIT :** ![enter image description here](http://i.stack.imgur.com/MTxeN.png)               \documentclass{standalone}          \usepackage{tikz}     \usepackage{pgfplots}     \usetikzlibrary{shadings}     \definecolor{LightBlack}{rgb}{.4,.4,.4}     \definecolor{SoftBlack}{rgb}{.2,.2,.2}          \begin{document}          \begin{tikzpicture}     \fill[top color=LightBlack,bottom color=SoftBlack] (-1,6) rectangle (8,0);     \begin{axis}[axis lines=none]     \addplot+[domain=0:2*pi,samples=37,mark=none, color=white]     ({10*cos(10*deg(x)) + 1*cos(2*deg(x)) +  0.2*cos(deg(x)) + 0.1 * cos(0.5*deg(x))},     {10*sin(10*deg(x)) + 1*sin(2*deg(x)) +  0.2*sin(deg(x)) + 0.1 * sin(0.5*deg(x))});     \end{axis}     \end{tikzpicture}          \end{document}


title: Avoiding `Dimension too large' and `ill-formatted floating point' errors in tikz

text: I am attempting to draw some pictures using tikz, with the decorations library, and am encountering a `Dimension too large' error. I have read the 20+ other questions/answers about this error, and have not found them to contain a solution that works in my case. (Apologies if I missed something.) In particular, most of those question seem to have to do with using pgf to do computations, whereas I am just using it to draw, and the error is coming in some process internal to tikz calculating its line paths. Cutting to the chase, here is a MWE:               \documentclass{amsart}     \usepackage{tikz}     \usetikzlibrary{decorations.pathreplacing}     %\usetikzlibrary{fpu}     %\pgfkeys{/pgf/fpu=true, /pgf/fpu/output format=fixed}          \tikzset{         fuzzleft/.style={         preaction={draw,line width=2.5pt,black!25,decorate,decoration={curveto,raise=1.25pt}}}     }          \begin{document}     \begin{tikzpicture}         \draw[fuzzleft] (0,.5) arc (0:180:.2);     \end{tikzpicture}     \begin{tikzpicture}         \draw[fuzzleft] (0,.5) arc (0:180:.17);     \end{tikzpicture}     \end{document}      The first tikzpicture compiles, the second does not. When I put in the fpu and \pgfkeys lines (commented out above), as suggested in various answers, I then get an `ill-formatted floating point' error. (Solutions that involve modifying the picture code itself (eg scaling and changing the numbers to get the same image, changing the specific drawing commands or method, etc) will not help me --- I was coming up with such hacks on each individual picture, but eventually the hacks themselves became unworkable on my actual more elaborate pictures.)


title: Really short citations with bibtex?

text: I'm working on a document with an 8 page limit and by no means it's gonna fit a whole list of citations, and I'm looking for a way to have really short citations inline (i.e. no reference list afterwards). Something like               ... this has been studied in (Smith et. al., Phys. Rev. Lett. 100, 123456 (2012)) ...      I'm quite flexible about the particular style, although something based of revtex4 would be nice. Most of my references are journal articles, and the few books I have, I can put by hand if that simplifies things. I'm trying with package bibentry, but still not manage to find a style that fits my needs. Any ideas? For instance, I need "et al" whenever there is more than one author, no first name initials, no publication title. I need journal abbreviations (although I think this is a separate issue). Any help will be very appreciated... Thx


title: Install package svg.sty

text: I am using Kile to write latex documents. I want to include .svg picture in my document. After including               \usepackage{svg}       and compiling my document into pdf, I have an error:               "File 'svg.sty' not found. \usepackage "      So I downloaded package svg from ftp.tex.ac.uk but I don't know how to install it. I tried to use package manager, but it didn't see this as a package. Can someone suggest me how can I do that?


title: extra } when use titlesec package

text: In the `.tex` file, I want to use the package `titlesec`. But there is a error:               ! Argument of \subparagraph has an extra }.      Is there some simple method to fix this? The code is:               \documentclass{llncs}         \usepackage[compact]{titlesec}


title: How to change string 'and' in biblatex?

text: When the reference has 2 authors I would like the citation to appear as:               Sutherland & Varnam      Also, when the bibliography is printed (at the end of the manuscript) I don't want to see any `and` or `&` before the last author - just a list with all authors.


title: Alignment with brackets

text: I am having problem in the align environment when I have brackets. Here is my example.               \begin{align}     A& = B~~~&+c~~-D\\     E& = F&+G-H     \end{align}      However, a similar problem I have with the use of brackets in an equation is below which is **giving me an error**               \begin{align}     A& = \left(B~~~&+c~~-D\right)\\     E& = \left(F&+G-H \right)     \end{align}      Could some provide assistance with the second command. I need to align about the + or - signs. In summary, how can I make the second code work properly (when we have brackets in the equation). Here I don't find the use of `\left.` or `\right.` as the brackets are in the same line. Appreciate your efforts. Thanks.


title: Drawing a background grid based on \linespread value

text: I’m trying to help a friend set an Arabic book in LaTeX and I’m facing this very same uneven line spacing issue (except that the book is completely in Arabic). Now I’m trying to find the `\linespread` setting that is just big enough to ensure even line spacing but not any bigger, so I thought drawing a grid and visually examining the lines with different setting to find the desired ones. But, I do not even understand what, say, `1.5` in `\linespread{1.5}` actually mean (I read many discussions and answers but I still don’t get it), so I need help in:   * Setting a background grid (horizontal lines are enough).   * Make the spacing between grid lines follow `\linespread` setting i.e. they should represent the ideal line spacing if TeX didn’t do its vertical glue magic. (I tried `grid` option of `eso-pic` but couldn’t wrap my head around the meaning of its options to get what I described above).


title: ucthesis + polyglossia hebrew + hyperref = TeX capacity exceeded

text: I've run into an issue with the ucthesis class where using Hebrew language in polyglossia and using hyperref results in a "TeX capacity exceeded" error when using \maketitle (and only then!) I've put in some effort to find what seems to be the minimal code that still produces the error:               \documentclass{ucthesis}     \usepackage{polyglossia}     \usepackage{hyperref}     \setotherlanguage{hebrew}     \begin{document}     \maketitle     \end{document}      Note that this code has been pared down so much it should actually throw a different error, since I haven't defined all of the things ucthesis needs for \maketitle, but I wanted to create the minimal example. It is absolutely required to include the \maketitle line to produce the error; nothing else will create it. Even more confusingly, if I make a custom local ucthesis.cls and replace the \maketitle definition with:               \def\maketitle{a}      I can still produce the error. I have produced this error on both MiKTeX 2.9 on Windows XP and on MacTeX-2012 on Mac OS 10.7 (I'll give MacTeX-2013 a shot soon). Help?


title: how to split a rectangle?

text: I hope somebody can help me. I am search for a split of a rectangle like this:               \node[rectangle,draw,minimum width=3cm, minimum height=3cm] (rec) {};     \node[name=v1,minimum width=3cm * 0.16cm] at             ($(rec.north west)!0.5!(rec.west)!0.18!(rec.center)$){$v_1$};     \node[name=v2, minimum width=3cm * 0.16cm] at         ($(rec.south west)!0.5!(rec.west)!0.18!(rec.center)$){$v_2$};     \draw (rec.north west) rectangle ($(rec.west)!0.32!(rec.center)$) {};     \draw (rec.south west) rectangle ($(rec.west)!0.32!(rec.center)$) {};      But what can I do if I would like to create a rectangle with x variables?               4 variables     +---------+-------------+     |    v1   |             |     +---------+             |     |    d    |             |     +---------+             |     |    c2   |             |     +---------+             |     |    f    |             |     +---------+-------------+      I would like to use a 'for each'-loop and access my rec via north, south, etc. I appreciate any help. Thank you! ;-)


title: Insert the table environment into the tcolorbox environment

text: Is possible insert the `table` environment into the `tcolorbox` environment, made available by the package `tcolorbox`?               % !TEX program = pdflatex     % arara: pdflatex: {synctex: yes}     \documentclass[a4paper,11pt]{report}          % Generali     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage[italian]{babel}     \usepackage{microtype}     \usepackage[italian]{varioref}     \usepackage{relsize}     \usepackage{lipsum}     \usepackage{tabularx}          % Riquadri     \usepackage{tcolorbox}         \tcbuselibrary{theorems}          \begin{document}          \begin{tcolorbox}[adjusted title= Box1: Title.]     %\begin{table}[tb]     \begin{tabular}{cc}     a & b \\     c & d     \end{tabular}     %\end{table}     \end{tcolorbox}          \end{document}      Is there a way to insert a `table` with `caption` and `label`?


title: How can I add size of Tikz drawing into size of equation? (PART 2)

text: Related to:   - How can I add size of Tikz drawing into size of equation?   Code presented below is the result of combining code from solutions to:   - How can I add clips above matrix?   - How can I add some enhancement to the matrix               \documentclass{mwrep}        \usepackage{amsmath}      \usepackage{kbordermatrix}      \usepackage[nodisplayskipstretch]{setspace} \setstretch{1.5}      \usepackage{tikz}     \usetikzlibrary{calc}     \usetikzlibrary{decorations.pathreplacing}          \newcommand{\tzm}[1]{\tikz[overlay,remember picture,baseline] \node [anchor=base] (#1) {};}     \newcommand{\tzend}{\tikz[remember picture,baseline=0pt] \path (ClipLabel.north);}          \newcommand{\DrawBox}[4][]{%         \tikz[overlay,remember picture, rounded corners]{%             \coordinate (TopLeft)     at ($(#2)+(-0.2em,0.9em)$);             \coordinate (BottomRight) at ($(#3)+(0.2em,-0.3em)$);             %             \path (TopLeft); \pgfgetlastxy{\XCoord}{\IgnoreCoord};             \path (BottomRight); \pgfgetlastxy{\IgnoreCoord}{\YCoord};             \coordinate (LabelPoint) at ($(\XCoord,\YCoord)!0.5!(BottomRight)$);             %             \draw [red,#1] (TopLeft) rectangle (BottomRight);             \node [below=1.4ex, #1, fill=none, fill opacity=1] at (LabelPoint) {\footnotesize $#4$};         }     }          \newcommand{\DrawClip}[4][]{%         \tikz[overlay,remember picture]{%             \coordinate (Left)  at ($(#2)+(-0.1em,0.65em)$);             \coordinate (Right) at ($(#3)+(+0.1em,0.65em)$);             %             \path (Left); \pgfgetlastxy{\XCoord}{\IgnoreCoord};             \path (Right); \pgfgetlastxy{\IgnoreCoord}{\YCoord};             %             \draw[decoration=brace,decorate,black, #1] (Left.north west) -- (Right.north east)                node[midway,above=1pt, #1] (ClipLabel) {\footnotesize $#4$};         }     }          \begin{document}     Lorem ipsum dolor sit amet, consectetur adipisicing elit. Proin nibh augue, suscipit a, scelerisque sed, lacinia in, mi.     \begin{equation}     P=     \kbordermatrix{ \mathrm{state} & \tzm{L1}   1 &   2\tzm{R1} &  \tzm{L2}3   & 4\tzm{R2}    \\                                  1 & \tzm{TL1}0.5 & 0.5         &          0   & 0            \\                                  2 &          0.2 & 0.8\tzm{BR1}&          0   & 0            \\[0.9em]                                  3 &            0 &   0         & \tzm{TL2}0.1 & 0.9          \\                                  4 &            0 &   0         &          0.3 & 0.7\tzm{BR2}}     \DrawBox{TL1}{BR1}{P_1}     \DrawBox{TL2}{BR2}{P_2}     \DrawClip{L1}{R1}{S_1}     \DrawClip{L2}{R2}{S_2}     \tzend     \end{equation}     Lorem ipsum dolor sit amet, consectetur adipisicing elit. Proin nibh augue, suscipit a, scelerisque sed, lacinia in, mi.     \end{document}      I set `below=1.4ex` in `DrawBox` on purpose so the effect is clear. Normally I use `-0.1ex`. How can I extend size of the equation to the bottom? The problem is that `P_2` appears on the text.   I know how to extend size it in case of clips but I don't know how to to it in case of submatrices highlight (case when highlight is at the very bottom of matrix).


title: starred version of DeclareRobustCommand

text: I generally use `\newcommand*` instead `\newcommand` whenever it makes sense, to ease error checking if the command doesn't sensibly take multi-paragraph arguments. Is there a starred version of `\DeclareRobustCommand` that does the same checking (that it, it makes sure that the arguments to the command are not multi-paragraph)?


title: Forbid word breaking (ConTeXt)

text: In the following example               \definefont[Shehkl][name:Scheherazade*arabic at 15pt] % or file:amiri-regular.ttf*... file:alq.ttf          \definestartstop[Arab][commands=\setups{Arabic}]     \def\Arab{\doArab}     \def\Arab[#1]{     \startArab      \noindentation                 \setupalign[r2l]\Shehkl#1     \stopArab     }          \starttext          --------------------------------------------------------------------------------------------- (Fitra -\Arab[فطرة])          \stoptext      the last bracket in `(Fitra -\Arab[فطرة])` is set into the next line - a mistake of course. One way to avoid that (caused by not correctly handling arabic?) would be to put it all into something like `\neverbrakethis[]` - which I know from LaTeX, what is the equivalent here - or are there better solutions for this?


title: hyperlink in table of beamer

text: I am preparing a slide in beamer. One page of my slides is a table. I would like to use other pages to explain the table, I am thinking of adding sth like hyperlinks, if I click a cell of a table, then it goes to the explanation page, and it can also go back, which tool/package can I do it? Can someone show me an example? Thanks


title: Why do different fonts have different point sizes?

text: My "general" question is:   * Why do different fonts have different definitions of a "point"? Or in a concrete case:   * Why is Arial 12pt bigger than Times New Roman 12pt? The fact the definition of point size changes from one font to another confuses me. General or theoretical answers are welcome. PS: Although this question is not directly (La)TeX-related, at the same time it is, because, of course, (La)TeX uses fonts. **EDIT AND POSSIBLE ANSWER:** Here, a sample document with words of 20 repeated characters of each latin character, in Times (upper line) and Arial (just below it): ![Comparision-Arial-Times](http://i.stack.imgur.com/WQF1A.png) We can see that, 50% of letters, specially vowels, are bigger in Arial, 35% of similar size, and 15% are bigger in Times. But these differences in size are only real in width, since it changes the number of characters which can fit in a line (and in a page). About the vertical space consumed by both fonts, the x-height of Arial is bigger than Times (the x-height is which have in common the letters: pb), but the size of the x-height + ascenders (which have in common bh) or x-height + descender (which have in common pq) are the same in both fonts. ![Font size](http://i.stack.imgur.com/8E8XO.gif) In general, the "point size" of a font is the size of the x-height + ascender area's size + descender area's size, and the point size says nothing and gives no restrictions about the width of each character. So, the only reason Arial is bigger than Times is because of its width. Any other size difference depends only on the visual style of the font design (in this case, the fact Arial has a bigger x-height). Finally, how large is a point? does every font use the same definition of "point size"? In principle, the size of a point is 0.35278 mm, and thus 12pt (a pica), 12*0.35278 = 4.23333 mm. This point size is supposed to be a standard one, and it seems both Arial and Times New Roman uses this definition of point (tested with a rule in the screen :P). Although, in general, I don't know if, really, every modern font respect it and, according to some of the comments and other Internet sources, this seems not to be the case.


title: Incompatibility of Verse and Dialogue Packages?

text: I am trying to typeset a selection from a poem near the beginning of a document as well as typeset a portion of a dialogue later in the document. The verse package spins off an error (which various threads attribute to an incompatibility with the hyperref package) but if this is ignored the text typesets correctly. In my MWE, the error is still shown. If you run the MWE adding the dialogue section (it's commented out in the MWE) the verse does not typeset properly--it is no longer centered. Strangely, two figures (braces) are added to the beginning of the verse text and there are several other errors. The dialogue section is properly typeset. Remove the dialogue section and the verse section compiles properly--no extra characters and properly centered. I am using the bookest document class, but I ran the MWE through the Koma book class (scrbook) and got the same result. I am using Xelatex. Also, the package bookest ignores the a5 papersize option, I'm not sure why. Here is the MWE:               \documentclass[11pt,paper=a5,pagesize]{scrbook}%bookest            \usepackage[T1]{fontenc}       \usepackage[spanish]{babel}       \usepackage{verse}       %\usepackage{dialogue}       \usepackage{fontspec}       \usepackage{xunicode}       \usepackage{xltxtra}       \defaultfontfeatures{Mapping=tex-text}       \setromanfont[Mapping=tex-text]{Palatino Linotype}       \linespread{1.2}                 \usepackage{xunicode}            \begin{document}            Como dijo Tupac Shakur,                 \bigskip       \settowidth{\versewidth}{la vida de delincuente}       \begin{verse}[\versewidth]       la vida de delincuente\\       no la escogí\\       la vida de delincuente\\*       me escogió a mí       \end{verse}            %\begin{dialogue}            %\speak{Menón} Sí, Sócrates, pero, cómo es que dices eso de que no aprendemos, sino que lo que denominamos aprender es la reminiscencia? Podrías enseñarme que es así?            %\speak{Sócrates} Ya te dije poco antes, Menón, que eres difícil; ahora preguntas si puedo enseñarte yo, que estoy afirmando que no hay enseñanza, para hacerme en seguida caer en contradicción conmigo mismo.             %\speak{Menón} No, por Dios, Sócrates! No le dije con esa intención, sino por costumbre. Pero, si de algun modo puedes mostrarme que en efecto es así como dics, muéstramelo.        %\end{dialogue}                 \end{document}


title: Using pdfcrop within epstopdf?

text: Currently, my epstopdf is not able to convert eps to pdf correctly due to the **boundingbox (atend) bug** that the epstopdf does not support. However, I intend to use pdfcrop on the generated pdf file and that usually fix the white space problem. However, I have to manually fix every generated file. Is there a way to automate this in latex? For example, **automatically calling pdfcrop immediately after epstopdf**. I tried using DeclareGraphicsRule in epstopdf but it wasn't working. Please advise. Thanks a lot ! :)


title: Size of TikZ ellipse node

text: When I set the `minimum size` of an ellipse in a `tikzpicture` environment, it expands into a circle if the inner content does not grow as large as the ellipse shape itself. Is there any way around it?               \documentclass{article}     \usepackage{tikz}          \begin{document}     \begin{tikzpicture}     \usetikzlibrary{arrows}     \usetikzlibrary{shapes}     \tikzstyle{every node}=[draw, ellipse, minimum size=100pt,         align=center]     \node (a) {Alpha};     \node[left=150pt, below=30pt] (b) at (a) {Beta};     \end{tikzpicture}     \end{document}      It seems to me that, without something as wide as the ellipse length, TikZ is not able to define the width and height of the ellipse, but how can I set these variables?


title: No gridding for a single paragraph (ConTeXt)?

text: Is there a possibility to deactive `grid=yes` in the text for a single paragraph only? It should be something like `\nogrid{ paragraph.... }`. There is `\placeongrid{}` - but this does not allow page-breaking, so the whole paragraph is set as one on a new page, if breaking is needed. I think no minexample is needed here, any paragraph does it.


title: How do you generate a LaTeX template for a small college course?

text: I just started a course where every student has to write some stuff as a homework (10-15 pages).To ease the creation of such a document I want to provide a template for LaTeX (as it is most spread). I thought it would be easy when I provide a small archive where they will find a template.tex, with some basic layout settings, title page as well as some preselected packages, so they just can start typing their work. Additionally I will include some helpful latex documents in that archive and a basic directory structure. However, I wanted to make a modern template: Paying regard to l2tabu and consistency in the document was also an aim. I know I could hide most of the preamble in a separate document and let it include, but I wanted to have at least all template code in one single file. I think a document class would be too much work/overhead for this small course <20 attendees. How would you do that? If you are interested on my draft: http://www.informatik.uni- leipzig.de/~math/t.zip. As the course is in german, please regard specific European settings as paper format A4, etc.


title: List of my own publication

text: How do I include my own list of publication in report? This is my tex file:               \documentclass{article}     \usepackage{natbib}     % whatever you need here, basically a good idea is to use your real thesis header     \begin{document}     $ " $ Vacuum Linear Feed Through Drive using Stepper Motor and Lead Screw$ " $ by Kusum Soneji, NUiCONE 2013 ,4th Nirma University International Conference on Engineering.     \nocite{*}     \bibliographystyle{mystyle}     \bibliography{myrefbibfile}     \end{document}      and then I am generating `.bbl` file for it. in main file how to call it


title: Highlighted source code inline with Latex/Minted?

text: I am using the minted package (based on pygments) to do syntax-highlighting for xml-code in my Latex documents. However I did not find an option to make it display the code inline.               \mint{xml}|<?xml version="1.0" ?>|      does a single line but does not display inside a text line. Is that achievable using minted?


title: Why does hyperref bookmark work?

text: The `\appendix` command resets the section counter to zero:               *\documentclass{article}          *\show\appendix     (/usr/share/texmf-texlive/tex/latex/base/article.cls     Document Class: article 2007/10/19 v1.4h Standard LaTeX document class     (/usr/share/texmf-texlive/tex/latex/base/size10.clo))     > \appendix=\long macro:     ->\par \setcounter {section}{0}\setcounter {subsection}{0}\gdef \thesection {\@     Alph \c@section }.      My understanding of `\section` is that it creates a bookmark based on the current counter number? In the following, I feel that I reproduce the critical parts of what `\appendix` does before declaring `\section{six}`, but it does not work.               \documentclass{article}     \usepackage[final]{hyperref}     \begin{document}     \tableofcontents     \newpage     \section{one}     \newpage     \section{two}     \newpage     \section{three}     \newpage     \appendix     \section{four}     \newpage     \section{five}     \setcounter{section}{0}     \setcounter{subsection}{0}     \section{six}     \end{document}      Instead, `\section{six}` has a bookmark which leads to `\section{four}`. The output of LaTeX understandably shows:               pdfTeX warning (ext4): destination with the same identifier     (name{appendix.A}) has been already used, duplicate ignored      So I don't understand why this is happening. Does `\appendix` do more than what I think it is doing? The redefinition `\thesection` does not seem relevant here.


title: Variation on $\prec\prec$

text: Is there a standard TeX or LaTeX code for a symbol that bears the same relation to `\prec\prec` that `\ll` bears to `<<` ? (And how do I get TeX code to get rendered in a question posted here? I'm accustomed to writing things like `$\sum_{n=0}^\infty \frac{x^n}{n!}$` on math.stackexchange.com and having it look the way you'd expect it to.)


title: How to define pathname variables?

text: How do I define a variable (pathname) that can be recognized by various commands, such as \input{} and \includegraphics{} ? I tried the following               \newcommand{\patha}[]{./folderA}     \def \pathb {./folderB}     \input{\patha/file1}     \input{\pathb/file2}      It did not work. I am working with a few collaborators on a book. Each chapter is expected to have its own folder with images in a subfolder. However, we changed the folder names or path name several times, for various reasons. Each time, we will have to also change the pathname in the tex files. This takes a lot of time. It will be great if we can define a variable, say chapter1, and assign a pathname to it. In the tex file, we can then use the variable wherever needed. This way, when the folder name or path name is changed, we only need to update the variable. This will save us a lot of time. Any input would be greatly appreciated!


title: LuaTeX nil value errors

text: I tried to `lualatex` a document and got the following error:               ! LuaTeX error ./luasseq.lua:377: attempt to index field 'wd' (a nil value)     stack traceback:         ./luasseq.lua:377: in function 'sseq_register_size'         <\directlua >:1: in main chunk.     l.2 \directlua0{sseq_register_size()}          l.373 \end{sseq}}                      \end{center}      When I compiled the document at the beginning of May, this error didn't appear, and I haven't edited it since then (though I did upgrade from Ubuntu 10.10 to 11.04 in the meantime).   1. Does anyone know what this error means?   2. Any ideas how this error exists now when it didn't before? Has anyone else had problems with LuaTeX since updating Ubuntu? (I am certain the error was not there before because the document is an essay which I debugged and handed in before upgrading and haven't looked at since.) Edit: MWE:               \documentclass{article}     \usepackage{amsmath}      \usepackage{luasseq}     \begin{document}     \mbox{     \begin{sseq}{0...3}{0...2}     \ssdrop{Z}     \end{sseq}}     \end{document}      The error message (quoted above) refers to line 377 of luasseq.lua, which reads               currobj.wd = tex.wd[sseqboxno]      So if tex.wd doesn't exist anymore, does that mean I need an updated version of luasseq.lua? I haven't found one -- does anyone know if it exists? Oh, and `luatex --version` gives me               a@dell:~$ luatex --version     This is LuaTeX, Version beta-0.65.0-2011041019 (rev 4033)     Copyright 2010 Taco Hoekwater, the LuaTeX Team.


title: classics package throws weird error message

text: I can't get any documents built with the classics package to compile at all, including the package documentation source file. I have the package (v0.1 2013/02/02) installed correctly in my tex distro and I'm trying to compile with pdfTeX 3.1415926-2.5-1.40.14. Here's a minimal failing example from the package documentation:               \documentclass[11pt]{article}     \usepackage{classics}     \newclassic{Homer}{#1|:#1}     \begin{document}     \cite[{\Homer{3}[100--2]}]{Odyssey}     \begin{thebibliography}{10}     \bibitem[Od.]{Odyssey} Homer. \textit{Odyssey}.     \end{thebibliography}     \end{document}      When I try to build this file with > latex test.tex I get: > LaTeX Warning: Citation `Odyssey' on page 1 undefined on input line 6. > > ! Undefined control sequence. \LaTeX3 error: A sequence was misused. l.6 > \cite[{\Homer{3}[100--2]}]{Odyssey} > > ? If I try to force it through the build process it eventually hangs and says: > ? ! Argument of __prg_break: has an extra }. \par l.6 \cite[{\Homer{3}[100-- > 2]}]{Odyssey} > > ? Runaway argument? ! Paragraph ended before __prg_break: was complete. \par > l.6 \cite[{\Homer{3}[100--2]}]{Odyssey} > > ?


title: How to do pagenumbering in a fancy way

text: How do i get uneven increasing page numbers in the first half of my document, and in the second half in the second half? Example: 1,3,5,7,8,6,4,2 Here are my thoughts on how to solve it: My LaTeX document has `n` pages (`n` is always a multiple of 4), now i have to make a comparison of the counter `page` with `n` and depending on the resut print a different page number.               if page <= n/2 then printpagenumber(2*page-1)     else printpagenumber(2*n + 2 -2*page)      I have no knowledge of low level LaTeX manipuation but it is cear to me that the solution will involve some kind of counter arithmetic (with an conditional statement) together with redefining the command that actually prints the value of the `page` counter.


title: Correct delimiter height in TikZ

text: When using the `left delimiter` and `right delimiter` options, I am having the problem that their height is not equal to the node they are surrounding. Here is an example:               \documentclass{article}          \usepackage{fullpage}     \usepackage{tikz}     \usetikzlibrary{shapes, matrix}          \begin{document}          \tikzset{       withparens/.style = {draw, outer sep=0pt,         left delimiter=(, right delimiter=),         align=center},       withbraces/.style = {draw, outer sep=0pt,         left delimiter=\{, right delimiter=\},         align=center}     }          \begin{tikzpicture}         \node[withparens] {make};         \node[right=1.5cm, withparens] {make \\ node};         \node[right=3.5cm, withparens] {make \\ node \\ higher};     \end{tikzpicture}          \vspace{2em}          \begin{tikzpicture}         \node[withbraces] {make};         \node[right=1.5cm, withbraces] {make \\ node};         \node[right=3.5cm, withbraces] {make \\ node \\ higher};     \end{tikzpicture}          \end{document}      Which produces this: ![incorrect delimiter height](http://i.stack.imgur.com/tYlAy.png) Is the height of the delimiters approximated in some way, which cannot be controlled by the user? Or are they only available in specific heights and the best (nearest) option is chosen?


title: Vertical align at center in beamer slides using the [allowframebreaks] option and \newpage

text: I'm writing my thesis slides in beamer. I need to align vertically at center the slide's contents when I use the [allowframebreaks] option in the frame environment and the \newpage to start a new slide. As the next example:                   \begin{frame}[allowframebreaks]                         \frametitle{Outline}                         Some text....                              \newpage                         Some text....                         \begin{figure}[!ht]                              \input{myimage.pdf_tex}                         \end{figure}                              \newpage                         Some text....                         \begin{figure}[!ht]                              \input{myimage2.pdf_tex}                         \end{figure}              \end{frame}      Here both figures are always in the top of it's slide, but not in the vertical center. I need to center the content after breaking to a new slide with \newpage. Thanks in advance. I really appreciate your help.


title: Exclude everything from pdf document except images

text: is there any way to ONLY print out a pdf with all the image with the correct sizes as they appear in the single chapters/sections etc...? The reason is I want to only print out some pages (not the full article / thesis) containing only the images so that I can easily and cheap check wether the image quality is okay or not. Therefor, I don't need any tables, listings, TOC, the text etc... Thanks! **Edit** : Embed code #1:               \begin{figure}[htb]     \includegraphics[width=\textwidth]{flow1.pdf}     \caption{blaaaa}     \label{fig:blaaa}     \end{figure}      Embed code #2:               \begin{figure}[htb]     \centering     \hfill     \subfloat[htb][asd]{\fcolorbox{plotBord}{plotPadd}{\includegraphics[scale=\scalefaktorDbl]{figs/asdasd.png}}\label{fig:LZKf1}}     \hfill     \subfloat[htb][asd234asd]{\fcolorbox{plotBord}{plotPadd}{\includegraphics[scale=\scalefaktorDbl]{figs/asdasd}}\label{fig:asd}}     \hfill\null     \caption{aasd}\label{fig:asd}     \end{figure}


title: How can I do this diagram with tikz?

text: How can I do this diagram with tikz? ![](http://i.stack.imgur.com/QIw1l.png)


title: Fill a quadrant with PGFplots and axis equal=true

text: I need to fill quadrant three and want to use `axis equal=true`. However, using this setting changes the minimum value of x. How do I adjust this to fill the entire quadrant independent of `axis equal=true` or `axis equal=false`. The MWE below produces the result I want, but not if I uncomment the `axis equal=true` line.               \documentclass{standalone}     \usepackage{pgfplots}     \begin{document}     \begin{tikzpicture}          \newcommand*{\XAxisMin}{-4.5}     \newcommand*{\XAxisMax}{4.5}     \newcommand*{\YAxisMin}{-4.5}     \newcommand*{\YAxisMax}{4.5}          \begin{axis}[%axis equal=true,         axis y line=center, axis x line=middle, axis on top=true,         xmin=\XAxisMin, xmax=\XAxisMax, ymin=\YAxisMin, ymax=\YAxisMax,      ]           \fill[red!40]         (axis cs:\XAxisMin,\YAxisMin) --          (axis cs:0.0,\YAxisMin) --          (axis cs:0.0,0.0) --          (axis cs:\XAxisMin,0.0) --          cycle;          % Based on Jake's solution, this should have worked, but produces identical results for me (PGFversion: 2.10)     %        \fill[green!40]     %       (axis cs:\pgfkeysvalueof{/pgfplots/xmin},\pgfkeysvalueof{/pgfplots/ymin}) --      %       (axis cs:0.0,\pgfkeysvalueof{/pgfplots/ymin}) --      %       (axis cs:0.0,0.0) --      %       (axis cs:\pgfkeysvalueof{/pgfplots/xmin},0.0) --      %       cycle;               \end{axis}      \end{tikzpicture}      \end{document}


title: Automatically replace open quote with accent

text: Shaloha, My Emacs/AUCTeX combination used to automatically replace a single open quote ' with an accent `, as is required by LaTeX. Many machines and .emacs files later, it doesn't do that anymore. I suppose it's an AUCTeX option, but I couldn't find it. (I thought it would be in the Tex Quote AUCTeX customization menu, but no.) **How can I make the single open quote ' automatically replaced by `?**


title: Import data from a spreadsheet into latex and create multiple pdf files for each row in LaTeX

text: I have a form which I assign to people to fill them out as a google form, and get the responses in a spreadsheet (xlsx or ods file formats). I need to file a report based on their answers, which means I have to generate a pdf file for each row of the spreadsheet. Here is an example. Imagine this is the first three rows of the soreadsheet:               Name Question1 Question2 Question3     Name1 Answer1.1 Answer2.1 Answer 3.1     Name2 Answer1.2 Answer2.2 Answer 3.2      What I need to get is two pdf files named `Name1.pdf` and `Name2.pdf` which first one contains something like this:               Name: Name1     Question1: Answer1.1     Question2: Answer2.1     Question3: Answer3.1      And so on. I was thinking that one might write a script in python and read each row of the file and give it as an input to `pdflatex` command on a template file, but I don't have much ideas on how to really start on this.


title: slide dependent subitemize in beamer

text: I'm not sure if I do it well but I have what follows:               \documentclass[10pt,fleqn,t]{beamer}     \begin{document}     \frame[t]{     \begin{block}{Title}          \begin{itemize}          \item text 1          \only<1>{%              \begin{itemize}%                 \item subtext 1                 \item subtext 2              \end{itemize}}      \only<2-3>{\item text 2}      \only<3>{\item text 3}          \end{itemize}     \end{block}}     \end{document}      When the items move vertically when moving forward in the presentation: is there a way to fix this? (I've tried `\onslide` instead but it freezes vertical space which I do not want). **Added:** (by Andrew Stacey) To clarify the problem: it is that in the above document, the `text 1` (which is shown on all slides) shifts vertically ever- so-slightly-but-noticeably between frames 1 and 2. As it is the first item in the list and there is plenty of space on the slide, this doesn't not seem the right behaviour.


title: Poor man's double acute accent

text: I want to typeset the double acute accent (also known as Hungarian umlaut, usually typeset with \H{}) in a font that does not have it. Is there an easy way to "fake" it with two single accents? Minimial example:               \documentclass[12pt]{article}     \pagestyle{empty}     \usepackage[T1]{fontenc}     \newcommand*{\augie}[1]{\fontfamily{augie}\selectfont #1}     \begin{document}     \augie{Erdos Erd\'os Erd\H{o}s}     \end{document}      Result: ![MWE](http://i.stack.imgur.com/p0Myu.png)


title: An hbox-vbox-halign permeable macro, is it possible?

text: I currently have a Plain TeX file which does something like this in a multitude of places:               \indent\hbox{\vbox{\halign{#\hfil\quad&#\hfil\cr     ... table content here ...     }}}      I would love to abstract things out so that this could instead read as:               \mySpecialHAlign{     ... table content here ...     }      However, such a macro is not easy for a relative newbie such as myself to define, for reasons that will be obvious to anybody who gives it a try. Is this sort of macro technically possible to create with the right sort of TeX incantations, or am I doomed to repeat the whole hbox-vbox-halign preamble each and every time? (Note again that I'm using Plain TeX)


title: How to do grid typesetting with amsmath?

text: Following the advice in the answer to this question, I did set a huge negative `\lineskiplimit`. However, it turned out that `align` got quite upset about this. So my question is: what would you recommend to achieve (at least partially) grid typesetting with `amsmath`? By "partially" I mean that I accept not adhering to grid when there are, say, lots of theorem-like environments etc. on a page, but on pages with only text/sections/inline math I'd prefer to have it. I am rather afraid of using any packages for grid typesetting, since in the class I am using I redefined a lot of LaTeX internals (for example, I coded theorems, sections, enumerations from scratch, not even 100% compatibly with pure LaTeX). (I know this is risky, but "though this be madness, yet there's method in't";).) So now I have a few options.   1. Redefine align & friends to temporarily set `\lineskiplimit` to 0pt. Not something I'd like to do, obviously.   2. Set `\lineskiplimit` back to 0pt, and `\smash` (or display) manually all "too big" formulae. Currently I am leaning towards 2., but are there any other ideas?


title: Format title: section number flush left and title centered?

text: How can I format with the **_titlesec_** package that I get somethine like this (this is a twocolumn document): ![enter image description here](http://i.stack.imgur.com/je1KP.png) I do not know how to get the number to the left and the title in the center is this possible? Thanks a lot!!!


title: Where do I find the source code of beamer in a MiKTeX installation?

text: I'm looking for the source code of default beamer themes (`*.sty`) for studying purpose. A file content search for keywords like `\setbeamertemplate` only returns `texworks.exe`. If these definitions are only shipped as binaries, is there another way to install the source?


title: How to recenter the *compilation* buffer (on C-c C-x)? No process for this document

text: I have a `.tex/.Rnw` document which is compiled with a makefile. During the compilation, I would like to use `C-c C-l` (as for standard `.tex` files) to recenter the output buffer so that I can follow it. However, this gives me (Emacs 24, Ubuntu 12.10): `No process for this document.` I'd guess this is because there is no association with LaTeX anymore (`make` could do anything). The output buffer is called `*compilation*`, so if one could define `C-c C-l` to recenter this output buffer, that would solve it.


title: Specify newcommand to provide default argument to existing command

text: I have an existing command, defined within a \newenvironment:               \newcommand{\param}[3]{\textbf{##1} & \emph{##2} & ##3 \\ }      That command on its own works fine. What I want to be able to do is to alias this command for typical use cases. The second argument to this command is a type, so I want something like:               \providecommand{\number}{}     \renewcommand{\number}[2]{\param{##1}{number}{##2}}      However, this gives the error: `Argument of \number has an extra }.` This error appears even if the `\number` command is never used. What would the cause of this be?


title: Templates for "notes-examples-... environment"

text: Books often use special environments to display examples, theoretical details, notes, etc. Here is one example: ![enter image description here](http://i.stack.imgur.com/kwusa.png) Do you know any website that collects templates for this kind of special environments (something similar to "beamer theme gallery" but for "notes environments")?


title: Table centering in latex

text: I created a table, but it is a little skewed to the right. Any idea how to fix it? The code is :               \documentclass{article}     \usepackage{booktabs}          \begin{document}     \begin{tabular}{lllllll}          \toprule     \multicolumn{1}{l}{Parameters} &     \multicolumn{2}{c}{Model $A$}    &     \multicolumn{2}{c}{Model $B$}    \\      \cmidrule(lr){2-3}     \cmidrule(lr){4-5}           &     \multicolumn{1}{c}{Coefficient} &     \multicolumn{1}{c}{95\% Bayesian Interval}     &     \multicolumn{1}{c}{Coefficient} &     \multicolumn{1}{c}{95\% Bayesian Interval}     \\     \midrule                    concern &0.006     & (  -0.036, 0.047) & 0.010 & (-0.029,0.050) \\     \bottomrule     \end{tabular}               \end{document}


title: text and image wrapping in latex tables

text: I was trying to insert pictures with captions in a table in latex. I have read some posts here about adding pictures in the table using \raisebox. I tried something like               \begin{table}[ht]     \begin{center}     \begin{tabular}{|c|c|c|c|}     \hline      Query Structure & The most similar structure & The second most similar structure & The    third most similar structure \\     \hline     \raisebox{-.5\height}{\includegraphics[scale=0.2]{GS_Ade_PathwayA_I1A_B3LYP_631Gd}} &     \raisebox{-.5\height}{\includegraphics[scale=0.2]{GS_Ade_PathwayA_I1A_B3LYP_631Gd}} & \raisebox{-.5\height}{\includegraphics[scale=0.2]{GS_Ade_PathwayA_I1A_G3MP2B3}} &\raisebox{-.5\height}{\includegraphics[scale=0.2]{GS_Ade_PathwayA_I1A_G3B3}}\\     \hline     \end{tabular}     \end{center}     \end{table}      It worked. But I want these pictures with captions. At first, I tried to add caption{} in raisebox directly like:               \raisebox{-.5\height}{\includegraphics[scale=0.2]{GS_Ade_PathwayA_I1A_B3LYP_631Gd} \caption{structure GS\_Ade\_PathwayA\_I1A\_B3LYP\_631Gd}}           I got error msg for writing latex like this. So I tired to put the captions in the next row with no \hline in between to work around.               \begin{table}[ht]     \label{table2}     \begin{center} %Note American spelling     \begin{tabular}{| p{0.25\textwidth} | p{0.25\textwidth} | p{0.25\textwidth} |   p{0.25\textwidth} |}     \hline     Query Structure & The most similar structure & The second most similar structure & The    third most similar structure \\     \hline     \raisebox{-.5\height}{\includegraphics[scale=0.2]{GS_Ade_PathwayA_I1A_B3LYP_631Gd}} & raisebox{-.5\height}{\includegraphics[scale=0.2]{GS_Ade_PathwayA_I1A_B3LYP_631Gd}} & \raisebox{-.5\height}{\includegraphics[scale=0.2]{GS_Ade_PathwayA_I1A_G3MP2B3}} &\raisebox{-.5\height}{\includegraphics[scale=0.2]{GS_Ade_PathwayA_I1A_G3B3}} \\     GS\_Ade\_PathwayA\_I1A\_B3LYP\_631Gd.out1.ar &GS\_Ade\_PathwayA\_I1A\_B3LYP\_631Gd.out1.ar &GS\_Ade\_PathwayA\_I1A\_G3MP2B3.out1.ar &GS\_Ade\_PathwayA\_I1A\_G3B3.out1.ar \\     \hline     \caption{Results Table}     \end{tabular}     \end{center}     \end{table}      By doing above, I got two problems with the result.   1. The pictures are not centered in each cell. Although I have set the height of the raisbox, the pictures are still closely attached to the upper cell edge.   2. I have set the width of each column to be 1/4 width of the \textwidth. It worked for the texts in the header. Some long text such as "The second most similar structure" was splited into two rows. However, for the text under the pictures, they were all overlapped. I think Latex consider it as a whole word, so it didn't split into multiple rows. Can anyone suggest how to solve these problems? Thank you.


title: Limits used as exponents -- how to write under the limit symbol without using \displaymath?

text: If one needs to write a limit as an exponent, one might have this dilemma: if you use `\displaymath`, "x to infinity" will be nicely printed under the lim symbol, but your exponent will be using the normal font and will appear very big on the page. If you take out the `\displaymath` instruction, the exponent will use the small font, but now the part "x to infinity" is not a subscript to the "lim" symbol anymore, it just follows it. Trying to use any font size instructions with `\displaystyle`, or actually inside the math mode, does not seem to work for me! Does anybody know any trick to get around this? This is the horrible expression I am fighting with (might be easier to make my point this way):               $e^{\left(\, \displaystyle \lim_{x \,\rightarrow\, \infty}      \frac{\, 2x \sin{\frac{1}{x}} \,}{ 1 \,-\, \sin{\frac{1}{x}}}      \,\right) } \,;$      I can't get the last exponent to behave, because it contains the limit (it's the last exponent, the one for the number `e`). If I take out the `\displaystyle`, the limit gets messed up, as explained above.


title: Make a book list at the end of a document based on books mentioned in footnotes

text: Is this possible to automatize? I would like everything that is in the footnotes (author(s), title, year of publication/edition) except page numbers or chapter specifications. If it could be made to work, do I have to write the footnotes in some uniform way?


title: Matrix ball construction table

text: I want to draw a table similar to this               \begin{tabular}{ c | c | c}     $\bigcirc$ &  &  \\ \hline        & $\bigcirc$ &  \\ \hline        &  & $\bigcirc$ \\     \end{tabular}      for the subject of matrix ball construction, but for this I need to put more than one ball in a cell, and they cannot just be listed in a horizontal line (supposed to be in a NW to SE diagonal). Also the balls will need to be filled with numbers for later in the theory, any help with this will be very much appreciated! *edit; realised that the number filling problem can be solved with tikz


title: How to align PGFplot subplots

text: I am using the matlab2tikz MATLAB function to export a MATLAB figure with subplots to tikz code. Unfortunately the subplots do not align properly. The post PGFplot to occupy full \linewidth, and aligned y=axis across tikzpicture seems to address a similar issue. However, I looked at the code in the .tikz file, and it appears to use the method suggested in the answer to that post, but the plots are still not aligned correctly. Below is an image to show this with the corresponding code. Sorry it's a bit long, it was as minimal as I could make it but still reproduce the issue. How can I get the plots to align properly? Thanks in advance! ![Figures are not properly aligned](http://i.stack.imgur.com/9ESCt.jpg)               \documentclass{article}          \usepackage{pgfplots}     \usetikzlibrary{external}     \tikzexternalize[prefix=compiled_figures/]     \pgfplotsset{try min ticks=3}     \pgfplotsset{max space between ticks=50pt}                    \begin{document}     \begin{figure}[!htbp]         \centering         \newlength\figureheight          \newlength\figurewidth          \setlength\figureheight{3cm}          \setlength\figurewidth{2cm}         \tikzset{external/remake next}                  \begin{tikzpicture}                  \begin{axis}[%             width=\figurewidth,             height=\figureheight,             scale only axis,             xmin=0, xmax=3,             ymin=-0.5, ymax=1.5,             name=plot3,             title={$p = 2$}]             \addplot [             color=blue,             solid,             line width=2.0pt,             forget plot             ]             coordinates{              (0,0.46)(0.25,0.80)(0.5,1.02)(0.75,1.27)(1,0.59)(1.25,0.15)(1.5,-0.02)(1.75,-0.27)(2,-0.05)(2.25,0.03)(2.5,0)(2.75,0)(3,0)              };             \end{axis}                  \begin{axis}[%             width=\figurewidth,             height=\figureheight,             scale only axis,             xmin=0, xmax=1.5,             ymin=0, ymax=1,             ylabel={$\phi(t)$},             name=plot1,             at=(plot3.left of south west), anchor=right of south east,             title={$p = 1$}]             \addplot [             color=blue,             solid,             line width=2.0pt,             forget plot             ]             coordinates{              (0,1)(0.25,1)(0.5,1)(0.75,1)(1,0)(1.25,0)(1.5,0)              };             \end{axis}                  \begin{axis}[%             width=\figurewidth,             height=\figureheight,             scale only axis,             xmin=0, xmax=1,             ymin=-1, ymax=1,             ylabel={$\psi(t)$},             name=plot2,             at=(plot1.below south west), anchor=above north west]             \addplot [             color=blue,             solid,             line width=2.0pt,             forget plot             ]             coordinates{              (0,1)(0.25,1)(0.5,-1)(0.75,-1)(1,0)              };             \end{axis}                  \begin{axis}[%             width=\figurewidth,             height=\figureheight,             scale only axis,             xmin=-1, xmax=1.5,             ymin=-2, ymax=2,             name=plot4,             at=(plot2.right of south east), anchor=left of south west]             \addplot [             color=blue,             solid,             line width=2.0pt,             forget plot             ]             coordinates{              (-1,-0.125)(-0.75,-0.217)(-0.5,-0.274)(-0.25,-0.341)(0,0.707)(0.25,1.457)(0.5,-0.091)(0.75,-1.02)(1,-0.216)(1.25,0.124)(1.5,0)              };             \end{axis}                  \begin{axis}[%             width=\figurewidth,             height=\figureheight,             scale only axis,             xmin=-2, xmax=2,             ymin=-1, ymax=1.5,             name=plot6,             at=(plot4.right of south east), anchor=left of south west]             \addplot [             color=blue,             solid,             line width=2.0pt,             forget plot             ]             coordinates{              (-2,0.023)(-1.75,0.056)(-1.5,0.089)(-1.25,0.128)(-1,-0.017)(-0.75,-0.238)(-0.5,-0.444)(-0.25,-0.699)(0,0.136)(0.25,1.416)(0.5,0.599)(0.75,-0.787)(1,-0.443)(1.25,0.146)(1.5,0.056)(1.75,-0.0234374999975261)(2,0)              };             \end{axis}                  \begin{axis}[%             width=\figurewidth,             height=\figureheight,             scale only axis,             xmin=0, xmax=4.5,             ymin=-0.5, ymax=1.5,             at=(plot6.above north west), anchor=below south west,             title={$p = 3$}]             \addplot [             color=blue,             solid,             line width=2.0pt,             forget plot             ]             coordinates{              (0,0.221)(0.25,0.536)(0.5,0.842)(0.75,1.212)(1,0.991)(1.25,0.547)(1.5,0.19)(1.75,-0.285)(2,-0.259)(2.25,-0.069)(2.5,-0.032)(2.75,0.070)(3,0.046)(3.25,-0.015)(3.5,-0.006)(3.75,0.002)(4,0)(4.25,0)(4.5,0)              };             \end{axis}             \end{tikzpicture}%          \end{figure}     \end{document}


title: Example on how to use pgfkeys and pgfopts for class or package

text: Is there a tutorial on how to create a package or class with pgfkeys/pgfopts that goes beyond this pdf? keyval.pdf In particular I would be interested on how I can create package/class options and new commands that pass options to tikz-drawings (such as colours, line length/width, shape).


title: Protext 64-bit executables for Windows

text: I'm on Windows 7 Enterprise 64bit. Are there 64-bit executables for Windows? I'm using the proTeXt TeX distribution: http://www.tug.org/protext/


title: 3D line plot in pgfplots

text: I have the following problem with `pgfplots` and `\addplot3`. I have a graph in [0,1]x[0,1] that should display a mesh plot and a line plot that traces a particular line across the mesh. The line plot is characterized by the following triplet (x, 0.8-x, f(x,y)), which is really (x, 0.8-x, f(x)). In the code below, f(x,y) is called `fgm` and f(x) is called `fgmct`. Here's the working code:               \documentclass{standalone}     \usepackage{pgfplots}          \pgfplotsset{compat=1.6}          \begin{document}          \pgfplotsset{     colormap={whitered}{color(0cm)=(white); color(1cm)=(orange!75!red)}     }          \begin{tikzpicture}[     scale=1,     declare function={fgm(\theta)=1+\theta*(1-2*x)*(1-2*y);},     declare function={fgmct(\theta,\val)=1+\theta*(1-2*x)*(1-2*(\val-x));}]          \begin{axis}[     colormap name=whitered,     width=15cm,     view={-45}{60},     enlargelimits=false,     disabledatascaling,     grid=major,     domain=0:1,     y domain=0:1,     samples=30,     xlabel=$x_1$,     ylabel=$x_2$,     zlabel={$f(x_1,x_2)$},     colorbar horizontal,     colorbar style={         at={(0,0.9)},         anchor=south west,         width=0.25*\pgfkeysvalueof{/pgfplots/parent axis width},         title={$f(x_1,x_2)$}     }     ]          \addplot3 [surf] {fgm(-0.5)};     \addplot3 [domain=0:0.8, y domain=0:0.8, samples y=30, black!70, smooth] (x, 0.8-x, {fgmct(-0.5,0.8)});          \end{axis}     \end{tikzpicture}     \end{document}      Here is what happens: ![enter image description here](http://i.stack.imgur.com/A5orm.png) Seems to me that I should only see the concave line across the surface plot, without the wrap-arounds and the straight line going across it. I would appreciate any pointers as to what I'm doing wrong here.


title: Adding a blank line in algorithm2e

text: Is there any way to add a blank line in algorithm2e? I have the following document:               \documentclass{article}     \usepackage[linesnumbered]{algorithm2e}% http://ctan.org/pkg/algorithm2e     \begin{document}     \begin{algorithm}     \SetAlgoLined     i = 1 + j\\     % I would like to add a \linebreak here     j = 1 + i\\     \end{algorithm}     \end{document}      This outputs: ![enter image description here](http://i.stack.imgur.com/0WbeI.png) I would like to have: ![enter image description here](http://i.stack.imgur.com/fkYLQ.png) If I add `\\\` or `\linebreak` between `i = 1 + j\\\` and `j = 1 + i\\\` I get the following error message: ![enter image description here](http://i.stack.imgur.com/vzFEp.png)


title: Using normal IEEEtran bibliography style, but also citing with author names

text: I would like to use the `IEEEtran` bibliography style as usual, but I would also like to write sentences like `"Doe and Smith used X Y Z"`. I would like that to be automatic. ie, I will write `\special_cite{doe1999} used X Y Z` and it will automatically produce the author names, with adding `et al.` where applicable. This is similar to using `\citeauthor*` in natbib.               \documentclass{article}          \begin{document}          Doe and Smith used X Y Z \cite{doe1999}.          \bibliographystyle{IEEEtran} \begin{thebibliography}{1}          \bibitem{doe1999}   Doe, John, and Smith, John          \emph{\LaTeX: A Document Preparation System}.         Addison Wesley, Massachusetts,   2nd Edition, 1994.          \end{thebibliography}          \end{document}


title: Comparing MathJax and MathML

text: My organisation needs to update its website, which, in particular, will host a number of blogs and wikis on mathematics-related themes. We need to use some way of rendering of LaTeX on our web pages. Given a choice of MathJax and MathML, which one would you recommend? Any other solutions?


title: Amoeba shape with TikZ

text: I would like to draw generic amoeba-like shapes with TikZ and don't really want to think too deeply about its boundary. Basically a closed connected set with smooth locally convex boundaries. Any ideas how to do this easily?


title: setting \@fpsep only impacts empty pages

text: I want LaTeX to place each figure of my document on a separate page, but not on an empty page. On several places on the net I found that               \makeatletter     \setlength\@fpsep{\textheight}     \makeatother      should yield what I want, so i put it in my preamble. Unfortunately this only effects figures on otherwise empty pages. Is it possible to separate figures by a minimum distance that are embedded in text?


title: How to graph a function using TikZ?

text: I want to plot this function with a big range says, `(-10,000:10,000)`, unfortunately I couldn't figure out how to set the `domain`, or `xrange` correctly to scale the graph nicely. This is what I have so far:               \begin{tikzpicture}[scale=1.0]         \draw[] plot[id=ff] function{             set xrange [-10:10.5];             plot 14*x - x**2;         };     \end{tikzpicture}      I wonder is there a simple way to draw a function with large domain? I tried some values, gnuplot always complain about the domain is too large! then how I could I draw says x = (-100, 10000)? Any suggestion would be greatly appreciated.


title: Issue with `pgflibrary` and MiKTeX

text: After reading "Tikz shape similar to rectangle with selective drawing of borders," I tried to compile the following code:               \documentclass[tikz]{standalone}     \usetikzlibrary{chains} \usetikzlibrary{qrr.shapes.openrectangle}     \tikzset{nodes={rounded corners, text height=\heightof{f}, text width=\widthof{aaaa}, ultra thick, draw, open rectangle fill=blue!40, shape=open rectangle,       append after command={(\tikzlastnode.south west) edge[to path={rectangle (\tikztotarget)}, very thin] (\tikzlastnode.north east)}}}     \begin{document}     \begin{tikzpicture}[x=1.1cm, Start chain/.style={start chain=ch#1 going below}, Start chain/.list={1,...,4}, node distance=+2pt]\ttfamily     \foreach \ch/\si in {1/{e, n, w, s},                          2/{nws, ews, ens, enw},                          3/{en, nw, ws, es},                          4/{, full, ew, ns}}       \foreach \Si in \si         \node[at=(right:\ch), on chain=ch\ch, open rectangle sides=\Si] {\Si};     \end{tikzpicture}     \end{document}      but received the following error:               ! I can't find file `pgflibraryqrr.shapes.openrectangle.code.tex'.     <argument> ...input pgflibrary\pgf@temp .code.tex      I checked my MiKTeX installation, and the `epigraph` package is included therein. How do I resolve this issue?


title: Why are my tables running off the edge of the page in ConTeXt?

text: I need to make a table which fits to the `\textwidth`, or essentially, the width generally available to text on the page. I have created columns of 20%, 60%, and 20%, which should fit the width, however, when I compile it, the final column runs off the edge of the page:               \setuppapersize             [A5]     \setuplayout                [backspace=40mm, topspace=10mm, width=98mm, height=190mm]     \starttext         \starttable[|xp(0.2\textwidth)|xp(0.6\textwidth)|xp(0.2\textwidth)|]             \HL             \NC A \NC \input knuth \NC Notes \NR             \NC B \NC \input knuth \NC \NR             \HL         \stoptable     \stoptext        * Why is my table running off the edge of the page?   * How can I create tables which fit to the `\textwidth`?


title: Error: ! LaTeX Error: File `book.cls' not found

text: I am using Ubuntu on my laptop. I am new to using LaTeX. I have recently installed Texmaker and I am writing a dissertation; I downloaded a template somewhere from the internet. It has been working fine. But today, when I tried to compile it into a PDF, I got this error:               ! LaTeX Error: File `book.cls' not found.      I have looked at other posts, but I have no idea what they meant. Can someone explain to me in layman terms, how can I solve this problem ? Texmaker said the error is produced in `Latex/Classes/PhDthesisPSnPDF.cls` line. So I opened the file and this is what I have from line 31 to line 37               %If you want to use a Book style document then uncomment the following 3 lines and comment the above 8 report style lines:     \DeclareOption*{\PassOptionsToClass{\CurrentOption}{book}}     \ProcessOptions\relax     \ifx\pdfoutput\undefined        \LoadClass[dvips, a4paper]{book}     \else        \LoadClass[pdftex, a4paper]{book}     \fi


title: Why is \markboth not working?

text: I'm attempting to make my own headers for a book I'm writing. I want to alternate between two headings: "Left" and "Right" My problem is: I'm not getting the Left and Right printing out when I use `\markboth`. The code is               \documentclass{book}          \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage{graphicx}     \usepackage{graphics,color}     \usepackage[superscript]{cite}          \begin{document}     \pagestyle{myheadings}     \markboth{Right}{Left}          First page     \newpage     Second page     \newpage     Third page     \newpage     Fourth page           \end{document}      This provides:   ![enter image description here](http://i.stack.imgur.com/lSPjC.png) 2nd page:   ![enter image description here](http://i.stack.imgur.com/N6fQb.png) But I want like this (below):   ![enter image description here](http://i.stack.imgur.com/6igy1.png) 2nd page:   ![enter image description here](http://i.stack.imgur.com/waoaR.png) 3rd:   ![enter image description here](http://i.stack.imgur.com/0m2dO.png) 4th:   ![enter image description here](http://i.stack.imgur.com/c6Ywt.png)


title: Outlined characters in Beamer

text: Following Outlined characters, you can make selectable outlined text using the `contour` package. For example, the following writes "Text text text contour text", with "contour" in green with a red outline. It compiles and displays as expected (using `pdflatex` and `lualatex`):               \documentclass[12pt]{article}     \usepackage[outline]{contour}     \begin{document}     Text text text \contour{red}{\textcolor{green}{contour}} text.     \end{document}      However, when I try to do the same in a Beamer presentation—               \documentclass{beamer}     \usepackage[outline]{contour}     \begin{document}     \begin{frame}{Example}     Text text text \contour{red}{\textcolor{green}{contour}} text.     \end{frame}     \end{document}      —it fails to compile, with the error               ! Use of \\@contour doesn't match its definition.     \beamer@ifnextcharospec #1#2->\def \reserved@a {                                                     #1}\def \reserved@b {#2}\fut...     l.14 \end{frame}          ?       How can I use the outline effect in a Beamer presentation?


title: Line goes out of paragraph, when I give hyperlink

text: I'm trying to hyperlink `\url{http://brollace.blogspot.de/2012/03/havok- tutorial-content-tools-part-1.html.}`, but when I compile it, the line goes out of the boundary of paragraph. Can anybody knows why? ![enter image description here](http://i.stack.imgur.com/Mklfs.png)


title: German hyphenation does not work

text: My _babel_ configuration includes _ngerman_ and _english_ ...               \documentclass[     oneside, openright, titlepage,     dottedtoc, numbers=noenddot,     headinclude, footinclude=true,     cleardoublepage=empty, abstractoff,     BCOR=5mm, paper=a4, fontsize=11pt,     ngerman,     american,     draft     ]     {scrreprt}          \PassOptionsToPackage{utf8}{inputenc}     \usepackage{inputenc}     \usepackage[ngerman,english]{babel}     \usepackage[pdfspacing]{classicthesis}          \begin{document}          % Disable paragraph indentation.     \setlength{\parindent}{0pt}          9. Wie lange benötigen die Personen für die Erfassung/Aktualisierung     der Daten vor Ort und bei der Nachbearbeitung im Büro?\\          10. Verwenden Sie ein kommerzielles Hardware- oder Software-Produkt     für die Verwaltung\\          \end{document}      ..., however, the hyphenation seems to be not working correctly, as I can see in _draft_ mode. ![German hypenation](http://i.stack.imgur.com/FWt4Q.png) **Questions:**   * What do I need to configure in order to use auto-hyphenation?   * Side question: Why do I need to add `\\\` to get an empty line between `9.` and `10.`?


title: MultiScript Bibliography using biber/xelatex/polyglossia

text: I have succeeded in having a multiscript document using polyglossia. I tried to use biber to have a multiscript bibliography. Every thing compiles well but the Arabic Script in the .bib file doesn't print in the pdf file. It appears correctly in the TexWorks log but doesn't appear at all int he pdf file, with no related warning in the log, and even after forcing utf-8 encoding. Here is the Minimal code: in main.tex:               \documentclass[12pt,a4paper]{article}          \usepackage{polyglossia}     \setmainlanguage{english}     \setotherlanguage{arabic}          \usepackage{fontspec}     \newfontfamily\arabicfont[Script=Arabic,Scale=3]{Arabic Typesetting}          \usepackage[backend=biber,bibencoding=utf8,sorting=nyt]{biblatex}     \addbibresource{References/newref.bib}      in newref.bib               @article{arabic1,     author ={عزيزة مبارك العلوني, مريم عبد الرحمن السهلي, مهرة فارس المطيري, ندى محمد ميمني},     journal = {رسالة ماجستير غير منشورة},     title = {برنامج تعليمي الكتروني في تنمية بعض من مهارات الاستعداد للقراءة لدى  أطفال ما قبل المدرسة},     url = {http://www.minshawi.com/node/2241},     year = 2011     }      **Update:** here is the log:               Package biblatex Warning: Biber reported the following issues     (biblatex)                with 'arabic1':     (biblatex)                - Name "ط¹ط²ظٹط²ط© ظ…ط¨ط§ط±ظƒ ط§ظ„ط¹ظ„ظˆظ†ظٹ, ظ…ط±ظٹظ     … ط¹ط¨ط¯ ط§ظ„ط±طظ…ظ† ط§ظ„ط³ظ‡ظ„ظٹ, ظ…ظ‡ط±ط© ظپط§ط±ط³ ط§ظ„ظ…ط·ظٹط±ظٹ, ظ†ط¯ظ‰ ظ…     طظ…ط¯ ظ…ظٹظ…ظ†ظٹ" has too many commas: skipping name.          )     Package biblatex Info: Reference section=0 on input line 74.     Package biblatex Info: Reference segment=0 on input line 74.     Requested font "[lmsans12-regular]:mapping=tex-text" at 12.0pt      -> C:/Program Files/MiKTeX 2.9/fonts/opentype/public/lm/lmsans12-regular.otf     Requested font "[lmsans10-regular]:mapping=tex-text" at 10.95pt      -> C:/Program Files/MiKTeX 2.9/fonts/opentype/public/lm/lmsans10-regular.otf     Requested font "[lmsans10-bold]:mapping=tex-text" at 12.0pt      -> C:/Program Files/MiKTeX 2.9/fonts/opentype/public/lm/lmsans10-bold.otf     File: TitlePage/GUC-logo-ss.ps Graphic file (type eps)      <TitlePage/GUC-logo-ss.ps>     Requested font "[lmsans17-regular]:mapping=tex-text" at 17.28pt      -> C:/Program Files/MiKTeX 2.9/fonts/opentype/public/lm/lmsans17-regular.otf     File: TitlePage/logo2.eps Graphic file (type eps)      <TitlePage/logo2.eps>     Requested font "[lmsans10-bold]:mapping=tex-text" at 17.28pt      -> C:/Program Files/MiKTeX 2.9/fonts/opentype/public/lm/lmsans10-bold.otf          Overfull \vbox (91.82722pt too high) detected at line 83      []          Requested font "[lmsans10-bold]:mapping=tex-text" at 10.95pt      -> C:/Program Files/MiKTeX 2.9/fonts/opentype/public/lm/lmsans10-bold.otf     Requested font "[lmroman10-regular]:mapping=tex-text" at 10.95pt      -> C:/Program Files/MiKTeX 2.9/fonts/opentype/public/lm/lmroman10-regular.otf     [1          ] [1          ] ("E:\Lolla\My Work\Masters\Thesis files\Thesis\main.toc"     Requested font "[lmroman12-bold]:mapping=tex-text" at 12.0pt      -> C:/Program Files/MiKTeX 2.9/fonts/opentype/public/lm/lmroman12-bold.otf     Requested font "[lmroman8-regular]:mapping=tex-text" at 8.0pt      -> C:/Program Files/MiKTeX 2.9/fonts/opentype/public/lm/lmroman8-regular.otf     Requested font "[lmroman6-regular]:mapping=tex-text" at 6.0pt      -> C:/Program Files/MiKTeX 2.9/fonts/opentype/public/lm/lmroman6-regular.otf     Requested font "cmmi12" at 12.0pt      -> cmmi12     Requested font "cmmi8" at 8.0pt      -> cmmi8     Requested font "cmmi6" at 6.0pt      -> cmmi6     Requested font "cmsy10" at 12.0pt      -> cmsy10     Requested font "cmsy8" at 8.0pt      -> cmsy8     Requested font "cmsy6" at 6.0pt      -> cmsy6     LaTeX Font Info:    External font `cmex10' loaded for size     (Font)              <12> on input line 7.     LaTeX Font Info:    External font `cmex10' loaded for size     (Font)              <8> on input line 7.     LaTeX Font Info:    External font `cmex10' loaded for size     (Font)              <6> on input line 7.     Requested font "cmr8" at 8.0pt      -> cmr8     Requested font "cmr6" at 6.0pt      -> cmr6      [2])     \tf@toc=\write4      [3]      Two things I noticed in the log, Joseph: first the Arabic Characters don't show here either, although they showed in the TexWorks log correctly. Also, there is the msans font requested. I have no idea why it is requested. As a workaround, I will try to set the English font to the same font for Arabic and see what happens...