title: Creating simple frames

text: I want some of my text to be "framed". So far, I have horizontal lines generated by the `\separate` command in the following MWE:               \documentclass{article}     \newcommand\separate{\medskip\hrule\medskip} % nice page-long underscores     \begin{document}     Here is introductory text.     \separate     Here is text in the frame.     \separate     Here is concluding text.     \end{document}      Two questions: 1) How do I make the horizontal line extend just a tiny bit longer into the outer margin? (So that it runs just .2 inches or so beyond the text its framing...) 2) How do I add code generate little vertical lines to the horizontal ones? I want the "frame" to end up looking something like the following:                ----------------------------     |                                      |     ----------------------------      EDIT: To be more specific, I want this to work with the `fullwidth` environment, as in the following (updated) MWE:               \documentclass{article}     \usepackage{fullwidth}     \newcommand\separate{\medskip\hrule\medskip} % nice page-long underscores     \begin{document}          Here is introductory text.          \begin{fullwidth}[outermargin = -4cm, width = \linewidth + 4cm]     \separate     Here is text in the frame     \separate     \end{fullwidth}          Here is concluding text.     \end{document}


title: modifying pagerange in the index

text: In the index, my publisher requested to change the range of pages, with wherever possible no more than two digits. For example:               A, 1-23      B, 101-23   %(for 101-123)     C, 101-105  %(not 101-05, because the second number starts with a zero)     D, 101-222  %full range because 101-22 would be wrong       Indexing just turns out 101-123, not 101-23; how can I possibly modify this? This question is similar to this one for pageranges in crossreferences, but the required solution will be different I think. Example:               \begin{theindex}          \indexspace     \textbf{Nonsense}     \subitem More nonsense   \hspace{6pt} 440     \subitem Some sense      \hspace{6pt} 347–350     \subitem Out of order    \hspace{6pt} 320-411     \subitem Beyond repair   \hspace{6pt} 100-105          \end{theindex}      Should become:               \begin{theindex}          \indexspace     \textbf{Nonsense}     \subitem More nonsense   \hspace{6pt} 440     \subitem Some sense      \hspace{6pt} 347–50     \subitem Out of order    \hspace{6pt} 320-411     \subitem Beyond repair   \hspace{6pt} 100-105          \end{theindex}      (Crucial is the second one, 347-50)


title: How to separate Roman numerals for a range of numbers?

text: Arabic numerals are separated using en-dash:               pages 101--123, 2--3 and so on      What is typographically correct way to separate **Roman** numerals? For example: with en-dash               in the XIX--XX centuries       with en-dash plus two `\,`               in the XIX\,--\,XX centuries       or, maybe, with the usual dash               in the XIX\,---\,XX centuries


title: Problem installing MathPSfrag

text: I am trying to install MathPSfrag and I'm going through the MathPSfrag-Test.nb included in the download. The notebook asks me to input the paths to certain executables. My input looks like this:                 SetOptions[UnPSfrag,       GhostscriptExecutable ->         "C:\\Program Files\\gs\\gs8.70\\bin\\gswin32c.exe",         LaTeXExecutable ->         "C:\\Program Files\\MiKTeX 2.8\\miktex\\bin\\latex.exe",           DvipsExecutable ->         "C:\\Program Files\\MiKTeX 2.8\\miktex\\bin\\dvips.exe"];       I'm on a Windows Vista machine and quite sure that the paths are correct, but the notebook fails to find the programs. Has someone installed MathPSfrag succesfully under Windows and knows the right paths, or is there some obvious mistake?


title: Aligning text in S columns in a way that respects the decimal marker for numerical entries

text: As I understand it, using various options for the `S` column in `siunitx`, I may produce columns containing both numerical and nonnumerical entries. I may have the numerical entries aligned at their decimal points. I may have the text entries either left-, right-, or center- justified with respect to the column's width. _Is it possible to have the numerical entries aligned by their decimal, while controlling the text entries' alignment as it relates to the decimal marker?_ To complicate things further, is it possible to apply alignments differently row by row? In particular, could I leave column-centered alignment for the head entry of a column, while making my special decimal marker-based alignment apply to later entries? The following MWE sort of produces what I want with exaggerated numbers, but I have manually forced some space in the last two entries to make it happen. I want to not have to do this.               \documentclass{article}          \usepackage{siunitx}               \newcommand*\heading[1]{\multicolumn{1}{c}{#1}}          \begin{document}               \begin{tabular}{S[table-format=9.3,table-text-alignment=center]}     \hline     \heading{Title}\\     \hline     1\\     2.000\\     6\\     24.0\\     123456789\\     {\phantom{123\,456\,78}\vdots\phantom{\,000}}\\     {\phantom{123\,456\,7}$f(n)$\phantom{\,00}}     \end{tabular}          \end{document}      ![*enter image description here*](http://i.stack.imgur.com/t7YHl.png) Note that I do want a centered title, and that ideally I actually want the remaining text entries centered with respect to a point that is roughly `0.5\ex` to the left of the decimal marker. Also, note that since I have such asymmetry between integer an fractional parts, I do not think that `table- number-alignment=center-decimal-marker` is helpful.


title: Citing with the "apacite" package and bibliography style

text: I use MacTex2011 distribution with BibDesk. I wrote a paper in documentclass{article}. For quotations, I'd have wanted it to output "FirstAuthor et al., year" for all references with more than 2 authors. However, it behaves quite strangely - for 3-author papers, sometimes it outputs all the names, some other times just FirstAuthor et al. Any idea why this could be, and how I might solve it? Many thanks!               \documentclass[10pt,letterpaper]{article}          \usepackage{cogsci}     \usepackage{pslatex}     \usepackage{apacite}      \begin{document}     \bibliographystyle{apacite}          \setlength{\bibleftmargin}{.125in}     \setlength{\bibindent}{-\bibleftmargin}     \bibliography{CogSci_Template2}     \end{document}       Here are the contents of `CogSci_Template2.bib`:               @incollection{antibayes,     Address = {Cambridge},     Author = {G. Baggio and K. Stenning and M. van Lambalgen},     Booktitle = {Cambridge {H}andbook of {F}ormal {S}emantics},     Date-Added = {2014-02-06 15:25:25 +0100},     Date-Modified = {2014-02-06 15:28:59 +0100},     Editor = {M. Aloni and P. Dekker},     Publisher = {Cambridge {U}niversity {P}ress},     Title = {The {C}ognitive {I}nterface},     Year = {in press}}          @article{pijnacker2,     Author = {J. Pijnacker and B. Geurts and M. van Lambalgen and J. Buitelaar and P. Hagoort},     Date-Added = {2014-02-06 15:14:32 +0100},     Date-Modified = {2014-02-06 15:17:39 +0100},     Journal = {Journal of {C}ognitive {N}euroscience},     Number = {2},     Pages = {471--480},     Title = {Reasoning with Exceptions: An Event-related Brain Potentials Study},     Volume = {23},     Year = {2010}}          @article{pijnacker,     Author = {J. Pijnacker and B. Geurts and M. van Lambalgen and C. Kan and J.K. Buitelaar and P. Hagoort},     Date-Added = {2014-02-06 14:37:10 +0100},     Date-Modified = {2014-02-06 14:39:00 +0100},     Journal = {Neuropsychologia},     Number = {644--651},     Title = {Defeasible reasoning in high-functioning adults with autism: Evidence for impaired exception handling},     Volume = {47},     Year = {2009}}          @article{baggio,     Author = {R. Baggio and M. van Lambalgen and P. Hagoort},     Date-Added = {2014-02-06 14:22:28 +0100},     Date-Modified = {2014-02-06 14:24:02 +0100},     Journal = {Journal of {M}emory and {L}anguage},     Pages = {36--53},     Title = {Computing and recomputing discourse models: An {ERP} study},     Volume = {59},     Year = {2008}}          @inproceedings{kowalski_sadri,     Author = {R. Kowalski and F. Sadri},     Booktitle = {Web Reasoning and Rule Systems},     Date-Added = {2014-02-05 15:43:59 +0100},     Date-Modified = {2014-02-05 16:29:50 +0100},     Editor = {Polleres, Axel and Swift, Terrance},     Pages = {1--23},     Publisher = {Springer Berlin Heidelberg},     Series = {Lecture Notes in Computer Science},     Title = {Integrating Logic Programming and Production Systems in Abductive Logic Programming Agents},     Volume = {5837},     Year = {2009}}          @book{anderson,     Address = {Mahwah, New Jersey},     Author = {J. R. Anderson},     Date-Added = {2014-02-05 15:27:59 +0100},     Date-Modified = {2014-02-05 16:10:22 +0100},     Publisher = {Lawrence {E}rlbaum {A}ssociates},     Title = {The architecture of cognition},     Year = {1983}}          @article{simul2,     Author = {V. Gallese and A. Goldman},     Date-Added = {2014-02-03 19:31:33 +0100},     Date-Modified = {2014-02-03 19:32:35 +0100},     Journal = {Trends in {C}ognitive {S}ciences},     Number = {12},     Pages = {493--501},     Title = {Mirror neurons and the simulation theory of mind-reading},     Volume = {2},     Year = {1998}}          @article{simul,     Author = {K. Zentgraf and J. Munzert and M. Bischoff and R.D. Newman-Norlund},     Date-Added = {2014-02-03 19:25:43 +0100},     Date-Modified = {2014-02-03 19:27:24 +0100},     Journal = {Vision {R}esearch},     Pages = {827--835},     Title = {Simulation during observation of human actions -- Theories, empirical studies, applications},     Volume = {51},     Year = {2011}}          @incollection{integrity_const,     Author = {Godfrey, P. and Grant, J. and Gryz, J. and Minker, J.},     Booktitle = {Logics for {D}atabases and {I}nformation {S}ystems},     Date-Added = {2014-02-03 15:27:38 +0100},     Date-Modified = {2014-02-08 11:53:32 +0100},     Editor = {Chomicki, J. and Saake, G.},     Pages = {265--306},     Publisher = {Springer {US}},     Series = {The {K}luwer {I}nternational {S}eries in {E}ngineering and {C}omputer {S}cience},     Title = {Integrity Constraints: Semantics and Applications},     Volume = {436},     Year = {1998},}          @inproceedings{reiterIC,     Address = {{S}an {F}rancisco, {CA}, {USA}},     Author = {Reiter, R.},     Booktitle = {Proceedings of the 2nd conference on {T}heoretical {A}spects of {R}easoning about {K}nowledge, {TARK}'88},     Date-Added = {2014-02-03 15:27:27 +0100},     Date-Modified = {2014-02-05 17:29:27 +0100},     Keywords = {integrity constraints, epistemic},     Pages = {97--111},     Publisher = {Morgan {K}aufmann {P}ublishers},     Title = {On integrity constraints},     Year = {1988}}          @article{etzioni_cwr,     Author = {Etzioni, O. and Golden, K. and Weld, D.S.},     Date-Added = {2014-02-03 12:37:30 +0100},     Date-Modified = {2014-02-03 23:49:41 +0100},     Journal = {Artificial {I}ntelligence},     Keywords = {closed world reasoning, planning algorithms},     Number = {1--2},     Pages = {113--148},     Title = {Sound and efficient closed-world reasoning for planning},     Volume = {89},     Year = {1997}}          @article{lifschitz2002,     Author = {Lifschitz, V.},     Date-Added = {2014-02-03 12:36:43 +0100},     Date-Modified = {2014-02-03 12:36:43 +0100},     Journal = {Artificial {I}ntelligence},     Keywords = {planning, nonmonotonic reasoning},     Month = {June},     Number = {1--2},     Pages = {39--54},     Title = {Answer set programming and plan generation},     Volume = {138},     Year = {2002}}          @article{estefania,     Author = {E. L. Gazzo-Casta{\~n}eda and M. Knauff},     Date-Added = {2014-02-01 03:20:17 +0100},     Date-Modified = {2014-02-03 15:34:02 +0100},     Journal = {Submitted for publication},     Title = {Defeasibility and the role of counterexamples in reasoning with legal conditionals}}          @article{beller,     Author = {S. Beller},     Date-Added = {2014-01-31 16:47:38 +0100},     Date-Modified = {2014-01-31 16:50:29 +0100},     Journal = {Thinking \& Reasoning},     Number = {4},     Pages = {305--341},     Title = {Deontic norms, deontic reasoning, and deontic conditionals},     Volume = {14},     Year = {2008}}          @article{paulus_kiraly,     Author = {M. Paulus and I. Kir\'{a}ly},     Date-Added = {2014-01-31 16:16:10 +0100},     Date-Modified = {2014-01-31 16:17:44 +0100},     Journal = {Journal of {E}xperimental {C}hild {P}sychology},     Number = {2},     Pages = {407--414},     Title = {Early rationality in action perception and production? A theoretical exposition},     Volume = {116},     Year = {2013}}          @article{luo_baillargeon,     Author = {Y. Luo and R. Baillargeon},     Date-Added = {2014-01-31 16:08:03 +0100},     Date-Modified = {2014-01-31 16:12:03 +0100},     Journal = {Psychological {S}cience},     Number = {8},     Pages = {601--608},     Title = {Can a Self-Propelled Box Have a Goal?: Psychological Reasoning in 5-Month-Old Infants},     Volume = {16},     Year = {2005}}          @inproceedings{baker_tenenbaum_saxe06,     Author = {C. L. Baker and J. Tenenbaum and R. Saxe},     Booktitle = {Advances in Neural Information Processing Systems},     Date-Added = {2014-01-30 12:16:28 +0100},     Date-Modified = {2014-02-01 00:11:49 +0100},     Publisher = {MIT Press},     Title = {Bayesian models of human action understanding},     Volume = {18},     Year = {2006}}          @article{baker_saxe_tenenbaum09,     Author = {C. L. Baker and J. Tenenbaum and R. Saxe},     Date-Added = {2014-01-30 12:11:35 +0100},     Date-Modified = {2014-02-05 23:44:19 +0100},     Journal = {Cognition},     Number = {3},     Pages = {329--349},     Title = {Action Understanding as Inverse Planning},     Volume = {113},     Year = {2009}}          @article{lombrozo_carey,     Author = {T. Lombrozo and S. Carey},     Date-Added = {2014-01-30 11:55:36 +0100},     Date-Modified = {2014-01-30 11:56:51 +0100},     Journal = {Cognition},     Number = {2},     Pages = {167--204},     Title = {Functional explanation and the function of explanation},     Volume = {99},     Year = {2006}}          @article{csibra_gergely07,     Author = {Csibra, G. and Gergely, G.},     Date-Added = {2014-01-30 11:53:57 +0100},     Date-Modified = {2014-01-31 11:19:59 +0100},     Journal = {Acta {P}sychologica},     Keywords = {teleological reasoning, inverse problem, prediction, means selection},     Number = {1},     Pages = {60--78},     Title = {`{O}bsessed with goals': Functions and mechanisms of teleological interpretation of actions in humans},     Volume = {124},     Year = {2007}}          @article{causality_infancy,     Author = {Saxe, R. and Carey, S.},     Date-Added = {2014-01-29 19:08:02 +0100},     Date-Modified = {2014-01-31 11:20:20 +0100},     Journal = {Acta {P}sychologica},     Keywords = {Cause; Infancy; Empiricism; Rationalism; Innateness; Intervention},     Number = {1-2},     Pages = {144--165},     Title = {The perception of causality in infancy},     Volume = {123},     Year = {2006}}          @inproceedings{mccarthy_hayes_philosAI,     Author = {McCarthy, J. and Hayes, P.},     Booktitle = {Machine {I}ntelligence},     Date-Added = {2014-01-29 16:37:34 +0100},     Date-Modified = {2014-02-01 00:55:14 +0100},     Editor = {B. Meltzer and D. Michie},     Pages = {463--502},     Publisher = {Edinburgh {U}niversity {P}ress},     Title = {Some Philosophical Problems from the Standpoint of Artificial Intelligence},     Volume = {4},     Year = {1969}}          @book{kowalski2011,     Address = {{N}ew {Y}ork},     Author = {Kowalski, R.},     Date-Added = {2014-01-29 16:36:59 +0100},     Date-Modified = {2014-02-05 16:38:25 +0100},     Keywords = {computational logic, proactive agents, reasoning},     Publisher = {Cambridge {U}niversity {P}ress},     Read = {0},     Title = {Computational Logic and Human Thinking: How to be Artificially Intelligent},     Year = {2011}}          @book{mueller_commonsense,     Address = {{S}an {F}rancisco, {CA}},     Author = {Mueller, E.T.},     Date-Added = {2014-01-29 16:11:31 +0100},     Date-Modified = {2014-02-05 17:35:16 +0100},     Publisher = {Morgan {K}aufmann {P}ublishers},     Title = {Commonsense {R}easoning},     Year = {2006}}          @inproceedings{williams81,     Address = {Cambridge},     Author = {Williams, B.},     Booktitle = {{M}oral {Lu}ck},     Date-Added = {2014-01-29 15:45:40 +0100},     Date-Modified = {2014-02-05 17:28:16 +0100},     Editor = {Williams, B.},     Pages = {101--113},     Publisher = {Cambridge {U}niversity {P}ress},     Title = {Internal and {E}xternal {R}easons},     Year = {1981}}          @article{braas,     Author = {M. Brass and R.M. Schmitt and S. Spengler and G. Gergely},     Date-Added = {2014-01-27 00:01:07 +0100},     Date-Modified = {2014-01-31 11:20:30 +0100},     Journal = {Current {B}iology},     Number = {24},     Pages = {2117--2121},     Title = {Investigating Action Understanding: Inferential Processes versus Action Simulation},     Volume = {17},     Year = {2007}}          @article{pollock97,     Author = {J. Pollock},     Date-Added = {2014-01-26 23:49:36 +0100},     Date-Modified = {2014-01-31 11:18:59 +0100},     Journal = {Nous},     Number = {2},     Pages = {143--169},     Title = {Reasoning about change and persistence: A solution to the frame problem},     Volume = {31},     Year = {1997}}          @book{pollock95,     Address = {{MA}, {USA}},     Author = {Pollock, J.L.},     Date-Added = {2014-01-26 23:49:08 +0100},     Date-Modified = {2014-02-05 17:30:05 +0100},     Publisher = {{MIT} {P}ress {C}ambridge},     Title = {Cognitive {C}arpentry: A {B}lueprint for {H}ow to {B}uild a {P}erson},     Year = {1995}}          @article{hickok,     Author = {G. Hickok},     Date-Added = {2014-01-26 23:46:54 +0100},     Date-Modified = {2014-01-31 11:19:43 +0100},     Journal = {Journal of Cognitive Neuroscience},     Number = {7},     Pages = {1229--1243},     Title = {Eight Problems for the Mirror Neuron Theory of Action Understanding in Monkeys and Humans},     Volume = {21},     Year = {2009}}          @article{nature2002,     Author = {Gergely, G. and Bekkering, H. and Kir\'{a}ly, I.},     Date-Added = {2014-01-26 23:43:16 +0100},     Date-Modified = {2014-01-26 23:43:16 +0100},     Journal = {Nature},     Keywords = {rational, selective imitation},     Pages = {755},     Title = {Rational imitation in preverbal infants},     Volume = {415},     Year = {2002}}          @article{kiraly2013,     Author = {Kir\'{a}ly, I. and Csibra, G. and Gergely, G.},     Date-Added = {2014-01-26 23:41:16 +0100},     Date-Modified = {2014-01-31 11:19:33 +0100},     Journal = {Journal of {E}xperimental {C}hild {P}sychology},     Number = {2},     Pages = {471--486},     Title = {Beyond rational imitation: Learning arbitrary means actions from communicative demonstrations},     Volume = {116},     Year = {2013}}          @book{PToE,     Address = {Malden},     Author = {van Lambalgen, M. and Hamm, F.},     Date-Added = {2014-01-26 23:40:14 +0100},     Date-Modified = {2014-02-01 01:57:52 +0100},     Publisher = {Blackwell {P}ublishing},     Title = {The {P}roper {T}reatment of {E}vents},     Year = {2005}}          @book{HRCS,     Author = {Stenning, K. and van Lambalgen, M.},     Date-Added = {2014-01-26 23:39:49 +0100},     Date-Modified = {2014-01-26 23:39:49 +0100},     Keywords = {closed world reasoning, neural networks, wason task},     Publisher = {Bradford {B}ook, {T}he {MIT} {P}ress, {C}ambridge, {M}assachussets},     Title = {Human {R}easoning and {C}ognitive {S}cience},     Year = {2008}}          @phdthesis{ada_doc,     Author = {A. Varga},     Date-Added = {2014-01-11 09:20:59 +0100},     Date-Modified = {2014-01-11 09:24:15 +0100},     School = {Department of Philosophy, Central European University, Budapest},     Title = {A Formal Model of Infants' Acquisition of Practical Knowledge from Observation},     Type = {Doctoral dissertation},     Year = {2013}}          @article{chater_vitany,     Author = {N. Chater and P. Vitanyi},     Date-Modified = {2014-01-31 11:20:09 +0100},     Journal = {Trends in Cognitive Sciences},     Number = {1},     Pages = {19--22},     Title = {Simplicity: a unifying principle in cognitive science?},     Volume = 7,     Year = 2003}          @phdthesis{varga,     Author = {A. Varga},     Date-Modified = {2014-01-26 23:34:02 +0100},     School = {Department of Philosophy, Central European University, Budapest},     Title = {A Formal Model of Infants' Acquisition of Practical Knowledge from Observation},     Type = {Doctoral dissertation},     Year = {2013}}          @book{schueler2005,     Address = {New York, NY},     Author = {G.F. Schueler},     Date-Modified = {2014-02-05 17:34:27 +0100},     Publisher = {Oxford University Press Inc.},     Title = {Reasons and Purposes: Human Rationality and the Teleological Explanation of Action},     Year = 2003}


title: Spacing in french documents?

text: I am currently writing a letter in French. I know that in the French language there are some (for other european languages) unusual spacings near question marks, colons and french guillemets. I write in utf8, so I can use guillements directly. My question is if in my minimal example below all spacings are correct:               \documentclass{letter}          \usepackage[utf8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage[francais]{babel}          \signature{Bob le bricoleur}          \address{Je\\ne\\sais\\pas}          \begin{document}          \begin{letter}{Ton\\adresse\\je\\crois}          \opening{Bonjour Bobette,}          j'espère que tu rapelle notre « arrangement ». La morale: il ne faut jamais pleurer. Tu sais ça?          \closing{Amicalement,}          \end{letter}          \end{document}      I am not sure if it would be better to make the needed spaces myself. Any ideas?


title: Conflict between TikZ package and memoir package - all packages updated

text: I am getting an error when I run memoir with the tikz package. I updated my TexLive distribution to the 2012 version so there should be no conflicting version problems. Memoir and tikz are both in my 2012 texlive path but the log file shows some odd dates. I pared everything down to the simplest example I could make and the error still remains. I am running TexShop on OS X and have tried typesetting both as Pdflatex and Tex+DVI. Here's the minimum working example. If I comment out \usepackage{tikz} it works fine if I leave it in it spots out an error (listed below). The log file, due to its length, can be found here.               \documentclass[]{memoir}     \usepackage{tikz}          \begin{document}          \frontmatter          \mainmatter     Test          \backmatter          \end{document}      The error I get is this:               ...     (/usr/local/texlive/2012/texmf-dist/tex/latex/latexconfig/color.cfg))     ! Extra \endcsname.     \@namelet ...fter \endcsname \csname #2\endcsname           l.14       Any assistance would be greatly appreciated as I am attempting to write some lecture notes up for a class that begins soon. Thanks!


title: How could one setup a layout for a dictionary? (if possible)

text: A friend asked me if I knew any free software for creating dictionaries - which is good at saving space (reduce total number of pages). Example: ![enter image description here](http://i.stack.imgur.com/zKBRm.jpg) I suppose this might be possible in LaTeX. Thankful for any suggestions or pointers.


title: How to make the subtitle (a or b) of an image position correctly?

text: I want the following subtitles (a or b) to be shown correctly not like the current view as shown in the following image: ![enter image description here](http://i.stack.imgur.com/XirRu.png) Also how can I add more spacing between the two images?               \begin{figure*}[htp]       \centering       \subfigure [a] {\includegraphics[scale=0.5]{lap1.png}}\quad       \subfigure [b]{\includegraphics[scale=0.5]{lap2.png}}       \hfill       \caption { (a) A ring graph (b) Its Laplacian matrix}     \end{figure*}


title: Replacement for hyperref

text: Is there other packages in LaTeX like `hyperref` that implement clicable links in pdfs? I mean, a package that does the same job but implement things in a different way and can be used as a general purpose package.


title: How to create a gaussian curve with pgfplot?

text: What I want: ![enter image description here](http://i.stack.imgur.com/q8Lf7.png) This is what I have so far in terms of code:               \newcommand\gauss[2]{1/(#2*sqrt(2*pi))*exp(-((x-#1)^2)/(2*#2^2))}      % Gauss function, parameters mu and sigma          \begin{tikzpicture}     \begin{axis}[every axis plot post/.append style={       mark=none,domain=-2:3,samples=50,smooth}, % All plots: from -2:2, 50 samples, smooth, no marks     axis x line*=bottom, % no box around the plot, only x and y axis     axis y line*=left, % the * suppresses the arrow tips     enlargelimits=upper] % extend the axes a bit to the right and top     \addplot {\gauss{0}{0.5}};     \addplot {\gauss{1}{0.75}};     \end{axis}     \end{tikzpicture}


title: hyperref or equivalent - I just want to generate clickable external links

text: I am hoping this is an easy question with a straightforward answer, but I have been poking around for a while now and I haven't seen any instructions for how to do this: I just want to add clickable links for URLs, I don't want to generate internal links at all. I have just installed hyperref, and I was hoping there was some nice option called "urlonly" or something but I can't see it.               \documentclass{article}     \usepackage{hyperref}     \begin{document}     \tableofcontents     \section{This is a section, but I don't want a link in the toc}     I want this link to work. \href{http://news.bbc.co.uk}{BBC news}     \end{document}      Can anyone tell me how to do this?


title: Moderncv Package Question

text: Must all `cventry` content be on the first page? My pdf doesn't print if there is too much content under my second `cventry`. How do I fix/work around this? MWE:               \documentclass[11pt,a4paper,sans]{moderncv}     \moderncvstyle{casual}     \moderncvcolor{blue}     \usepackage[scale=0.7]{geometry}     \name{John}{Doe}     \title{Resume title}     \address{street and number}{postcode city}{country}     \phone[mobile]{+1~(234)~567~890}          \begin{document}     \makecvtitle     \section{Education}     \cventry{year--year}{Degree}{Institution}{City}{\textit{Grade}}{Description}  % arguments 3 to 6 can be left empty     \cventry{year--year}{Degree}{Institution}{City}{\textit{Grade}}{Description}          \section{Master thesis}     \cvitem{title}{\emph{Title}}     \cvitem{supervisors}{Supervisors}     \cvitem{description}{Short thesis abstract}          \section{Experience}     \subsection{Vocational}     \cventry{year--year}{Job title}{Employer}{City}{}{General description no longer than 1--2 lines.\newline{}%     Detailed achievements:%     \begin{itemize}%     \item Achievement 1;     \item Achievement 2, with sub-achievements:     \begin{itemize}%     \item Sub-achievement (a);     \item Sub-achievement (b), with sub-sub-achievements (don't do this!);     \begin{itemize}     \item Sub-sub-achievement i;     \item Sub-sub-achievement ii;     \item Sub-sub-achievement iii;     \end{itemize}     \item Sub-achievement (c);     \end{itemize}     \item Achievement 3.     \end{itemize}}      Problem begins here:               \cventry{year--year}{Job title}{Employer}{City}{}{Description line 1\newline{}Description line 2}     \begin{itemize}%      Clone of code for `cventry` above. Prevents building in pdf if there is too much content for this `cventry`. Does this mean all professional experience must be on page 1?               \item Achievement 1;     \item Achievement 2, with sub-achievements:     \begin{itemize}%     \item Sub-achievement (a);     \item Sub-achievement (b), with sub-sub-achievements (don't do this!);     \begin{itemize}     \item Sub-sub-achievement i;     \item Sub-sub-achievement ii;     \item Sub-sub-achievement iii;     \end{itemize}     \item Sub-achievement (c);     \end{itemize}     \item Achievement 3.     \end{itemize}}          \subsection{Miscellaneous}     \cventry{year--year}{Job title}{Employer}{City}{}{Description}          \section{Languages}     \cvitemwithcomment{Language 1}{Skill level}{Comment}          \section{Computer skills}     \cvdoubleitem{category 1}{XXX, YYY, ZZZ}{category 4}{XXX, YYY, ZZZ}          \section{Interests}     \cvitem{hobby 1}{Description}          \end{document}


title: Upside-down syntax trees for linguistics with horizontal lines

text: I know that syntax analysis can be done in Latex using using TikZ, but the tree-structure that produces isn't really used in my country. Here, we mostly use straight lines instead of hierarchy trees. Here's an example what I want to achieve. I don't know where to start from. Is there any (more or less) easy way to do it? Any idea? ![enter image description here](http://i.stack.imgur.com/yK7IJ.png) * * * ## Edit: Even though all solutions provided until the moment are right, it would be nice to modify the following characteristics of the different diagrams you've proposed:   * **The sentence** that is being analysed ("La novela que me ha regalado mi hermana...") **should be on top of the graphic** and all words must be in the same line; "la" can't be immediately over "Det" and "está" shouldn't be immediately over "N/V".   * All the syntax functions of **the differents words** ("OP", "S/SN", "PN/SV", "Det"...) **should be centered with the respective lines they have above** (or at least near to the center but **without having to change manually the spacing** ).   * It should be possible to modify **the height of the diagram**.


title: How to convert pstricks animation to GIF file?

text: As an example, let's take this animation. How can I convert it to GIF file?


title: Constructing a dynamic PDF

text: I wish to create a dynamic PDF file to write an article. This article will contain some theorems. The user will click a theorem and this will drill down to reveal the proof of that theorem. I think its different than `hyperref` since the proof is not visible initially in the PDF file only clicking the theorem makes the proof visible. If someone can also give a sample script that'll be much appreciated.


title: Matrix multiplication (and other operations) macro using lua module

text: I am hoping to be able to create a macro to multiply matrices using a lua module. The module is here: https://raw.github.com/davidm/lua-matrix/master/lua/matrix.lua As suggested to me in a previous question I put my lua code in a separate lua file and `dofiled` it as below:               \documentclass{article}     \usepackage{xparse}     \usepackage{luacode}     \usepackage{fontspec}          \directlua{dofile("matrix.lua")}     \directlua{dofile("lua2.lua")}     \ExplSyntaxOn          \NewDocumentCommand{\matrixop}{ m m }     {         \luaexec{             matrop(#1,#2)         }     }     \ExplSyntaxOff          \begin{document}     \matrixop{{1,2,3},{4,5,6}}{{7,8,9},{10,11,12}}     \end{document}      Where the file `lua2.lua` contained the following:               function matrop (mat1, mat2)     local matrix = require 'matrix'     m1 = matrix {mat1}     m2 = matrix {mat2}     m3 = matrix.add(m1,m2)     a  = matrix.latex(m3,c)     tex.print(a)     end      The issue that arose with this is that in `matrix.lua` a matrix is defined as e.g. `m = matrix{{1,2,3},{4,5,6}}` Thus, I have to pass as `mat1` something that looks like `{1,2,3},{4,5,6}`. However, as it stands, in the code above `matrop(#1,#2)` is equivalent to `matrop({1,2,3},{4,5,6},{7,8,9},{10,11,12})` Where the comma separating the rows in `mat1` is visible to the macro and so `matrop` sees 4 comma separated arguments rather than 2 arguments that are comma separated. Lua understands me to have passed a pair of single row matrices after dropping the "extra" two arguments (this took forever to figure out). Adding extra braces around each argument to hide the commas doesn't work because it screws up the table that `matrix` is expecting. My idea was to replace the row separating comma by a `*`, pass that to `matrop`, revert the `*` to a comma in lua using strings, convert the strings back into tables and then pass that to the matrix command (this took much reading and fiddling, I don't know lua at all). The result is below:               \documentclass{article}     \usepackage{xparse}     \usepackage{luacode}     \usepackage{fontspec}          \directlua{dofile("matrix.lua")}     \directlua{dofile("lua2.lua")}     \ExplSyntaxOn          \NewDocumentCommand{\matrixop}{ m m }     {         % quotes are so that matrop sees args as strings         \luaexec{             matrop("{#1}","{#2}")         }     }     \ExplSyntaxOff          \begin{document}     % row separator now a *     \matrixop{{1,2,3}*{4,5,6}}{{7,8,9}*{10,11,12}}     \end{document}      Where `lua2.lua` is as follows:               function matrop (mat1, mat2)         -- replace *'s with ,'s         s1 = string.gsub(mat1,"*",",")         s2 = string.gsub(mat2,"*",",")              -- functions that load resulting strings         f1 = assert(loadstring("return"..s1))         f2 = assert(loadstring("return"..s2))              -- t1 and t2 are now tables (as I understand it)         t1 = f1()         t2 = f2()              local matrix = require 'matrix'         -- pass table entries (rows) to matrix definers         m1 = matrix {t1[1],t1[2]}         m2 = matrix {t2[1],t2[2]}         m3 = matrix.add(m1,m2)         a  = matrix.latex(m3,c)         tex.print(a)     end      I am sure that I have done many bad/improper/horrible things above. My question is: how in the world should I actually be doing this? Is there an easy way to pass the information needed to define the matrices to lua? Any and all suggestions, comments, tips, solutions etc. are welcome.


title: Combined entry column Journaltitle/Booktitle in JabRef

text: In the JabRef entry table, I’d like to have a column that displays the `journaltitle` for an `@article` entry and the `booktitle` for an `@incollection` (etc.) entry, rather than having a separate column for `journaltitle` and `booktitle`. They’re never both filled out in one entry, so I could save some column space here. Is there any way to achieve this?


title: Adding uncited work to natbib bibliography

text: I'd like to add a reference to my bibliography made with `natbib` in LaTeX. I've been citing a few different newspapers, but since there is no easy format in `natbib` for newspapers, I have been citing these sources manually in the footnotes. Since my bibliography file (made with BibDesk) does not include these newspaper references, the final bibliography excludes them. How can I manually add these newspapers to the final bibliography? I have been adding usualy citations with the following code:               \footnote{~\citealt[12]{Author}.}      This refers back to an entry for Author in my bibliography file from BibDesk But, when I want to cite a newspapers, I've just been using the following code:               \footnote{~\textit{Newspaper Title}, Date.}


title: Switching color and grayscale mode for \includegraphics

text: Suppose I have a document that includes a lot of colorful PDFs. Now I'd like to easily switch between "color" version and "greyscale version". I'm aware of `\DeclareGraphicsRule`, but I think this needs more tweaking. See the MWE below.               % engine: pdflatex     \documentclass{article}          \usepackage{xcolor,graphicx}          \iftrue     % code for "color" version     \else     % code for "grayscale" version     \fi          \begin{document}          \includegraphics{z4z.pdf}          \end{document}      You can use any image you want, but the one I used is here: http://kmlinux.fjfi.cvut.cz/~hejdato1/z4z.pdf The command that can be used to convert image to greyscale is e.g.               convert -density 600 #1.pdf -colorspace Gray #2.pdf      Last but not least, it would be nice if it worked both with and wihout the `.pdf` extension in `\includegraphics`.


title: Alternate lefthand/righthand width and check odd page in tcolorbox

text: I am creating a new environment using the `tcolorbox` package in the define options `pos=t,b,r,l` and `lwidth` and `rwidth` for margins, using the scheme `key=value` of `pgfkeys`. My idea is to create two new keys:   1. `pos=e`alternate `pos=l` and `pos=r` if page is even or odd. Like this:              pos/e/.style={\ifoddpage pos=l \else pos=r \fi}        2. `width=`if `pos=l` then `width=lwidth`, if `pos=r` then `width=rwidth`, if `pos=t,b` `width` will have the default value. This is the MWE:               \documentclass[10pt]{article}     \usepackage{lmodern}     \usepackage{tcolorbox}     \tcbuselibrary{listings,breakable,skins,xparse}     % Colors     \definecolor{hellgelb}{rgb}{1,1,0.85}     \definecolor{colKeys}{rgb}{0,0,1}     \definecolor{colIdentifier}{rgb}{0,0,0}     \definecolor{colComments}{rgb}{1,0,0}     \definecolor{colString}{rgb}{0,0.5,0}     % Listings settings      \lstset{         basicstyle=\ttfamily\small, %         identifierstyle=\color{colIdentifier}, %         keywordstyle=\color{colKeys}, %         stringstyle=\color{colString}, %         commentstyle=\color{colComments}, %         columns=flexible, %         extendedchars=true, %         showspaces=false, %         showstringspaces=false, %         breaklines=true, %         breakautoindent=true,%         includerangemarker=false,%         numbers=left,%         numbersep=3pt,%         numberstyle=\tiny\color{red}%         }     % General tcb options     \tcbset{         title style={draw=none,fill=none},left=3.5mm,right=1mm,top=-1.5mm,%         bottom=-1.5mm,sidebyside gap=5mm,middle=5mm,boxsep=0mm,%         graphic/.style 2 args={comment={\includegraphics[#1]{#2}}},% image coment         pos/.is choice,% Define pos=t,b,l,r         fcolor/.style={colframe=#1},% frame color         bcolor/.style={colback=#1},% background color         scolor/.style={drop fuzzy shadow=#1},% shadow color         lwhidth/.style={lefthand width=#1},%  width left         rwhidth/.style={righthand width=#1},%  width right         hsep/.style={sidebyside gap=#1},% Horizontal sep         vsep/.style={middle=#1}% Vertical sep,         }     % Position      \tcbset{         pos/r/.style={colback=red!5!white,colframe=red!75!black,center lower,%             listing outside text,freelance,drop fuzzy shadow=blue!50!black!50!white},%         pos/l/.style={colback=gray!50!white,center lower,%             text outside listing,freelance,drop fuzzy shadow=blue!50!black!50!white},%         pos/t/.style={colback=gray!50!white,center lower,%             listing above text,freelance,drop fuzzy shadow=blue!50!black!50!white},%         pos/b/.style={center upper,colback=gray!50!white,%             text above listing,freelance,drop fuzzy shadow=blue!50!black!50!white},%         myexample/.style={pos=l,listing options={language=TeX}}%,             }     % Define newtcblistin environment     \newtcblisting{exampleinner}[1]{myexample,#1}     % Define MYexample environment whit [] using xparse     \ExplSyntaxOn     \NewDocumentEnvironment{MYexample}{O{}}      {\exampleinner{#1}}{\endexampleinner}     \ExplSyntaxOff     \begin{document}          \begin{MYexample}[pos=l,hsep=1cm,lwhidth=2cm,fcolor=blue,bcolor=lightgray]     Text pos=l     Text pos=l     Text pos=l     Text pos=l     Text pos=l     \end{MYexample}          \end{document}


title: Newline/linebreak in \message

text: I want to prompt some messages to my console. I used               \message{Hi out there!}      Now i want some more Text but with an linebreak.               \message{Hello World %some line break here      Salut monde     }      Well i scanned the TeXbook for and tried many things but without result. I would welcome any (related) comments. BTW I want that to work with pdf(la)tex as well.


title: Change margin on a single landscape page in memoir

text: I have a document where I use memoir and I want to make a single landscape page with a big table where I need to change the margins for this page only to make the table fit. I have tried using the functions `\newgeometry{margin=1cm}` and `\restoregeometry` available via the package `geometry`, but I can not make it work with landscape. Does anyone know how to change the margins to make the table fit in the example below?               \documentclass[b5paper,10pt]{memoir}     \settypeblocksize{*}{11.5cm}{1.61803}     \setulmarginsandblock{3.2cm}{*}{*}     \checkandfixthelayout[nearest]     \usepackage{lipsum}     \usepackage{pdflscape}     \begin{document}     \lipsum          \begin{landscape}     \thispagestyle{empty}     \begin{table}[c]     \centering     \footnotesize         \caption{Big table AAAAAAAAAAAAAAAAAAAAAAAA BBBBBBBBBBBBBBBBBBBBBBB CCCCCCCCCCCCCCCCCCC}         \begin{tabular}{p{8cm}p{8cm}p{8cm}}         \toprule\\         AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA & BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB & CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC\\[2cm]         AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA & BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB & CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC\\[2cm]         AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA & BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB & CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC\\[2cm]         AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA & BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB & CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC\\[2cm]         AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA & BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB & CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC\\[2cm]         AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA & BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB & CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC\\[1cm]         AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA & BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB & CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC\\         \bottomrule         \end{tabular}     \end{table}     \end{landscape}     \lipsum     \end{document}


title: Plotting Population Regression Function with pgfplot

text: I want the make the following population regression function with `pgfplot`. ![enter image description here](http://i.stack.imgur.com/TLcP1.png) My attempted code is               \documentclass[border=5mm]{standalone}     \usepackage{pgfplots}               \begin{document}          \begin{tikzpicture}[ % Define Normal Probability Function     declare function={                 normal(\m,\s)=1/(2*\s*sqrt(pi))*exp(-(x-\m)^2/(2*\s^2));             }            ]     \begin{axis}[         no markers       , domain=-3.2:3.2       , samples=100       , ymin=0       , axis lines*=left       , xlabel=         , every axis y label/.style={at=(current axis.above origin),anchor=south}       , every axis x label/.style={at=(current axis.right of origin),anchor=west}       , height=5cm       , width=12cm       , xtick=\empty       , ytick=\empty       , enlargelimits=false       , clip=false       , axis on top       , grid = major       , hide x axis       , hide y axis       ]                    \addplot[cyan!50!black, rotate=-45] (x, {normal(0, 1)});          \end{axis}               \end{tikzpicture}          \end{document}      ![enter image description here](http://i.stack.imgur.com/SDSmR.png) Any help to get this graph will be highly appreciated. Thanks


title: How to edit the environment variable TEXINPUTS in winedt for adding different search paths ?

text: I want to edit the environment variable TEXINPUTS but i dont know how in windows platform with Winedt. I googled it many times but i didnt get what i need. I found how to reach TEXINPUTS by: options -> execution modes -> variables **For example, if i want to add the directory "C:\Texproject" to the directories searched by the latex, what should i type in the blank field of the TEXINPUTS ?** Thanks in advance


title: How to change \parskip in bibliography section?

text: I want to change a vertical interval between `\bibitem`-s in my bibliography section. Now it is the same as in the document:               \documentclass{article}     [...]     \begin{document}     \setlength{\parskip}{0.3cm}     [...]     \bibliographystyle{apalike}     \bibliography{my-bib-file}     \end{document}      I would like to set it to `0.1cm`. Is it possible?


title: How to enforce generation of PDF table of contents?

text: When I'm adding `\tableofcontents` to my document the PDF generated contains a nice list of sections/subsections on the left side, when viewed in Adobe Acrobat (I also use `hyperref` package). Everything is fine. But now I don't need this TOC to be visible in the document, but I want to keep it visible in the PDF. When I'm deleting `\tableofcontents` from the document it disappears in the PDF as well. How to solve it? ps. Maybe this is the problem (my log)?:               Package hyperref Warning: Option `bookmarks' has already been used,     (hyperref)                setting the option has no effect on input line 33.


title: Introspection and reflection with LaTeX/TeX macros

text: Below is a short program that can use `\meaning` and `\string` to let a combination of LaTeX and TeX commands to print out the listing of macros. Unsurprisingly (nothing can surprise me with TeX any more), the command can also list its own listing.               \makeatletter     \parindent0pt               \def\reflect{\@star@or@long\accommand}     \fboxrule=0.0pt          \def\accommand#1{\framebox[4cm][l]{\color{red}           {\tt\string#1:}} %          \parbox[t]{7cm}{\tt\expandafter\strip@prefix\meaning#1}}           \reflect{\reflect}\\     \reflect{\listoffigures}\\     \reflect{\section}\\     \reflect*{\thispagestyle}\\     \makeatother      I am contemplating to turn this into a package, where one can say `\reflect{command1, command2, command3}` and obtain a listing of the control sequences. Am I duplicating any package you know? Is there another approach than the above? Code fails in mathmode for example `\reflect{\gamma}`.


title: Abbreviations and acronyms

text: I need to make lists of acronyms, abbreviations and units. How do I do this in the easiest possible way? I tried looking into the glossaries package but it did not really seem like an easy solution to me as you need to read through several pages of documentation just to make it work... so what is the easiest way of creating these lists in latex?


title: scaling table vs changing font vs some other approach

text: ## subjective, but not opinionated At "normal" font sizes, my tables typically exceed page margins. I am asking for guidelines on how to solve this, having in mind the following: **I am an academic and I write papers in the social sciences.** My papers typically have a few (say around 10) tables -- the typical tables you find in social science papers, with lots of numbers (as opposed to formulas, figures, etc) and _always_ table notes. **I use statistical software (R, Stata) to construct my tables.** Although I have good command of these tools, I constantly struggle with setting standards to the tables I generate. So I keep asking myself:   1. Should I change font sizes inside the table environment (eg with a `\small` command inside the `table` environment -- which happens to be the approach I usually take), or   2. Should I do this globally (as shown in this post.), or   3. Should I `\resizebox` or use something similar? When building my tables, I have in mind:   1. I better be able to re-use the same code for my `beamer` presentations;   2. Although all my `.tex` code will go through the a journal-specific publishing process, I like to have nice-looking working paper versions;   3. Although around 10 tables make it to the final version of my paper, I typically generate around one hundred tables in the writing process. So my question then is, in this context, what guidelines are there that I could use to help me planning how to construct my LaTex tables? I am not asking for general `booktabs`-like guidelines; rather, I want to know how to write good latex code to consistently fit large-ish tables in a page, without generating eyesores.


title: Misalignment in frame break in LaTeX presentation

text: How can I split the frame in multiple parts? when I use `allowbreakframes` command, it hide my text and just show the figures. Please Help me. MWE:               \begin{document}           \subsection{Decimation}           \begin{frame}           \frametitle{Decimation}     \pause      Decimation is achieved first by passing a signal from anti aliasing filter.      \begin{figure}[hbtp]        \includegraphics[scale=0.5]{../../Desktop/figures/Mutlirate 1.jpg}        \caption{Down-Sampling}      \end{figure}     \pause      %\end{equation}           \begin{figure}[hbtp]        \includegraphics[scale=0.25]{../../Desktop/figures/Mutlirate 2.jpg}        \caption{Sinousoidal Signal}      \end{figure}           \begin{figure}[hbtp]        \includegraphics[scale=0.25]{../../Desktop/figures/Mutlirate 3.jpg}        \caption{Down-sampling of Sine wave}      \end{figure}           \end{frame}          \end{document}


title: How to sort text or how to make a tex-based test generator

text: Suppose I have a long file of a pile of test questions. I want to select a subset and make a test out of them. Of course I could copy/paste. But is there a package that helps to sort and display text? This is something like what bibtex does but I want to just insert text/questions by something like an "include", as in "include 95,22,43 from algebra.tex" to insert problems 95,22,43 from that file and enumerate them. The closest items I found is this Automatically generate workbook from a sort of database and the answers package.


title: Polyglossia and Biblatex - Changing local variables

text: I m using Biblatex with polyglossia and although I set german as my default language, the bibliography shortcuts are still in english. Here is a minimal working example:               \begin{filecontents*}{literatur.bib}          @article{Grothendieck,     author = {Grothendieck, A.},     title = {Sur quelques points d'algebre homologique, I},     language = {fr},     journal = {Tohoku Mathematical Journal},     volume = {9},     year = {1957},     pages = {119-221},     }     \end{filecontents*}          \documentclass{article}     \usepackage[babelshorthands]{polyglossia}      \setdefaultlanguage[spelling=new,latesthyphen=true]{german}      \usepackage[style=alphabetic,backend=biber,maxnames=5,maxalphanames=5,backref=true,backrefstyle=two+]{biblatex}     \renewbibmacro{in:}{}     \DefineBibliographyStrings{german}{%      backrefpage = {zit. auf S.},      backrefpages = {zit. auf S.},      }      \bibliography{literatur}          \begin{document}     This is a citation of \cite{Grothendieck}.     \printbibliography     \end{document}      With this I get "pp." instead of "S." and "cit. on p." instead of "zit. auf S.". How can I fix that? Thanks in advance.


title: How can I limit the scope of a \renewcommand instruction to "table" environments?

text: I want to use `\renewcommand{\arraystretch}{1.2}` to adjust the space between the lines in my table. Since I have used matrices all over my paper (and this command also affect the matrices) I want to limit the scope of this command only to apply within `table` environment. I know I can use another `\renewcommand{\arraystretch}{1}` to change back to the original value after `\end{table}`, however, I would like to know if there is any way to limit the scope of `\renewcommand`.


title: How to include exam class features in book class

text: I am currently writing up notes using the `book` class with three parts, one for lecturers notes, one for mine, and one for practice questions. I love the `exam` class for formatting questions, but I want the book class for all the formatting. Is there some way to integrate the `question` environment into this book class without just copying the needed parts from `exam.cls` or `book.cls` into my document/into a new package?               \documentclass{book} % I want it formatted like a book     %\documentclass[answers]{exam} % But have questions formatted like exam          \begin{document}     \title{My Revision Book}     \maketitle          \part{Notes}          % 'normal' LaTeX          \part{Practice questions/past exam papers}     \begin{questions}     \question     How long is a piece of string          \begin{solution}     This long $\leftarrow\rightarrow$ (not to scale).     \end{solution}     \end{questions}          \end{document}


title: Fit figure and caption on one page

text: I'm relatively new to LaTeX and trying to come to grips with it. I understand I can resize a figure to fit the column width or text height quite easily:               \includegraphics[width=1\columnwidth]...      or               \includegraphics[height=.1\textheight]...      I was wondering if there is an easy way to get a figure and its caption to fit in a page.


title: Scalebar Overlay and TikZ spy

text: This question uses code snippets from How to add a scalebar to an image and Drawing on an image with TikZ. I have an image with a scalebar (absolute positioning) overlay. Its length is determined by `ratio=absolute image length/scalebar length` which is used inside the image coordinate system `(0,0) to (1,1)`. I woul like to add a scalebar (of choosable length) on a spy view. But to issue the same rectangle scalebar i would need to know the width of the spy view relativ to the original image. I then could calculate the scalebar as `ratio/(rel.view.width) * magnification`. Also im having trouble simply putting the zoom view into a scope with relative coordinates as the `zoom` node seems only usable when using further `\spy`commands. What i would like to achieve: ![ScalebarSpy](http://i.stack.imgur.com/OR8Zs.jpg)               \documentclass{scrartcl}     % image source: http://www.mrulrichslandofbiology.com/images/cheek_cells_3.jpg     \usepackage{tikz}     \usepackage{siunitx}     \usetikzlibrary{positioning,calc,spy}          \newcommand{\scalebarandzoom}[4][white]{      \begin{tikzpicture}[font=\sffamily\small]            % IMAGE       \node[anchor=south west,inner sep=0] (image) at (0,0) { #2 };            % IMAGE SCOPE       \begin{scope}[x={(image.south east)},y={(image.north west)},spy using outlines={rectangle,size=1in}]            % Dirty hack so that spy sees the image content as it is otherwise          % out of the scope:            \node[anchor=south west,inner sep=0] (image) at (0,0) { #2 };               % GRID CODE          %\draw[help lines,xstep=.1,ystep=.1] (0,0) grid (1,1);          %\foreach \x in {0,1,...,9} { \node [anchor=north] at (\x/10,0) {0.\x}; }          %\foreach \y in {0,1,...,9} { \node [anchor=east] at (0,\y/10) {0.\y}; }               % SCALEBAR          \fill [#1,xshift=-2mm] (1-#4/#3,2mm) rectangle ++(#4/#3,1.5mm);          % SPY          \spy [red,magnification=3] on (0.6,0.4) in node (zoom) [right] at (1.1,0.5);       \end{scope}     \end{tikzpicture}     }          \begin{document}               \scalebarandzoom[orange]{\includegraphics[width=0.4\linewidth]{cheek.jpg}}{500}{50}               \end{document}


title: Hyperref, bibentry & natbib conflict - incorrect hyperlink

text: # Problem I want to cite references in text as well as quote the entire entry plus have a reference list at the end. For this I use `hyperref`, `bibentry` and `natbib`. I've taken as inspiration this post. The only difference is that I want to include a reference list as well. The problem is that the hyperlink points to the `\bibentry` rather than the entry in the reference. # MWE               \documentclass{article}     \usepackage{natbib}     \bibliographystyle{abbrvnat}          \usepackage{bibentry}     \makeatletter\let\saved@bibitem\@bibitem\makeatother     \usepackage{hyperref}     \makeatletter\let\@bibitem\saved@bibitem\makeatother          \begin{document}     \nobibliography*     Here is a citation \citet{elvis}     %\newpage %uncomment this line and the line below eliminates error but hyperlink still points to \bibentry          Here is the full entry \bibentry{elvis}     %\newpage %uncomment this line           \bibliography{bibliography}     \end{document}      The bib file, bibliography.bib               @Book{elvis,         author = "Elvis Presley",         title = "Turn Me One More Time",         publisher = "Jail House Books",         year = 1963,     }      # Warning The above code gives a warning:               destination with the same identifier (name{cite.elvis}) has been already used, duplicate ignored      # Solution?   * Interestingly, adding `\newpage`s to split up the `\citet` and `\bibentry` onto separate pages eliminates the warning but the hyperlinking is still wrong.   * Removing `natbib` but again hyperlinking does not work. Does anybody have any ideas how I can solve this problem?


title: ConTeXt: Enumeration, Comments cause undefined control sequence startformula error

text: I'm a LaTeX user working through some ConTeXt tutorials, and hit a brick wall pretty early. It makes me wonder if something is wrong with my setup, or if I'm not understanding something pretty fundamental, or if ConTeXt is a bit more brittle than I had hoped. I'm using MacTeX-2012. I'm getting errors when using both a formula and an enumeration with the `letter` option. Leaving out the `letter` option, this works great:               \defineenumeration[guess][location=left]     \starttext       \startformula         x = no error       \stopformula       \guess This is just a guess.          \stoptext      The following, however, causes `texexec` to fail with `Undefined control sequence` on `\startformula` and `\stopformula`:               \defineenumeration[guess][location=left, letter=it]     \starttext       \startformula         x = error       \stopformula       \guess This is just a guess.          \stoptext      Taking out the `formula` removes the error, so the enumeration with the `letter=it` option is working fine on its own. In testing this, I discovered (to my surprise) that commenting out the `letter` option gives the same error:               \defineenumeration[guess][location=left] %, letter=it]     \starttext       \startformula         x = error       \stopformula       \guess This is just a guess.          \stoptext      But taking out the `=` sign fixes it. No error when running:               \defineenumeration[guess][location=left] %, letter it]     \starttext       \startformula         x = no error       \stopformula       \guess This is just a guess.          \stoptext      However, it's not just the equals sign, as this works without error:               \defineenumeration[guess][location=left] %, bar=baz]     \starttext       \startformula         x = no error       \stopformula       \guess This is just a guess.          \stoptext      I am very confused. Am I doing something wrong?


title: How to get caption of figure/table using table reference?

text: How can I get the caption of figures and tables using their references? Something along the lines of `\refcaption{tab:mytable}` would print `This is a pretty table.`, which is the caption of the table below.               \documentclass{article}     \usepackage{booktabs,longtable,tabu}     \begin{document}          \begin{longtabu}{lll}         \toprule         h1 & h2 & h3 \\         \midrule       \endhead         \bottomrule         \caption{This is a pretty table.}         \label{tab:mytable}       \endlastfoot       a & b & c \\       d & e & f \\     \end{longtabu}          Table~\ref{tab:mytable} looks good and its description is the following: \textbf{HOW TO GET DESC?}.          \end{document}


title: LaTeX tufte-book how to wrap around chapter, section, subsection heading

text: I am writing a book using the package `tufte-book`. Some of my chapter titles and section titles are too long. But I don't know how to get it to wrap around instead of going into the margins and off the page. The code is below. I suspect it has to do with the `\begin{fullwidth}` command but I am not sure.               \titleformat{\chapter}%           [display]% shape           {\relax\ifthenelse{\NOT\boolean{@tufte@symmetric}}{\begin{fullwidth}}{}}% format applied to label+text           {\itshape         \thechapter}% label           {0pt}% horizontal separation between label and title body           {\Large\rmfamily\allcaps}% before the title body           [\ifthenelse{\NOT\boolean{@tufte@symmetric}}{\end{fullwidth}}{}]% after the title body              \titleformat{\section}%           [hang]% shape           {\normalfont\large\itshape}% format applied to label+text           {\thesection}% label           {1em}% horizontal separation between label and title body           {}% before the title body           []% after the title body              \titleformat{\subsection}%           [hang]% shape           {\normalfont\large\itshape}% format applied to label+text           {\thesubsection}% label           {1em}% horizontal separation between label and title body           {}% before the title body           []% after the title body


title: Xetex on Texlipse

text: I want to enable the use of unicode text in my latex files. How can I compile using Xetex in Texlipse? I can't seem to find the option to select which builder to use like in other IDEs.


title: Better way to center text below overline with given length

text: I need to create lines for signatures. I need 3 of them with different texts below them, but i want all lines to have the same length and the texts centered below them.   Tables with `\hline`s made the horizontal placement easy, but then the vertical placement of the lines was not as good as with `\overline`. The following code achieves centering the text under the (over-)line with length of `xDatum/Unterschrift Ausbildungsleiterx`, but the question is: is there a better way to do it, because this feels like a very 'odd' solution.               \documentclass{article}     \usepackage{calc}     \newcommand{\strich}[1]{%       \makebox[\width][c]{%         \makebox[0pt][l]{%           \makebox[\widthof{xDatum/Unterschrift\ Ausbildungsleiterx}]{%             #1%           }%         }%         \makebox{%           \ensuremath{%             \overline{%               \phantom{%                 \mathrm{xDatum/Unterschrift\ Ausbildungsleiterx}%               }%             }%           }%         }%       }%     }          \begin{document}         \begin{center}         \footnotesize{\strich{Datum/Unterschrift\ Auszubildender}}         \vspace{2.5cm}\\         \footnotesize{\strich{Datum/Unterschrift\ Betreuer}\hfill\strich{Datum/Unterschrift\ Ausbildungsleiter}}         \end{center}     \end{document}      Notice, that `Datum/Unterschrift Ausbildungsleiter` is the longest of the 3 texts i need to place under the signature-lines.


title: Choose \documentclass dependent on compiler

text: I am not able to compile this tex document               \documentclass{scrartcl}     % \documentclass{article}     \begin{document}     hello         \end{document}      with htlatex. I am able to do this using pdflatex. If I choose article (see 2nd line) as documentclass, everything is fine. However, I'd like to have pdfs using scrartcl. How can I switch between documentclasses dependent on the compiler I use?


title: How remove margin in a paragraph that continues in two pages?

text: I've created a document whose margins have different odd and even pages. I want to write a paragraph with no margin in two pages runs. If I use the command `\newgeometry` new paragraph starts at the top of new page, that I want to start at the same place. And the command `\begin{adjustwidth}{}{}` such marginalized different odd and even pages are not useful. Please guide me in this regard. I use this command for create margin:               \documentclass[11pt,fleqn]{book}      \usepackage[total={215mm,285mm},top=3cm,bottom=3cm,headsep=10pt,         vmargin=2cm,         outermargin=7cm,         innermargin=2.5cm,         marginparwidth=5cm,         marginparsep=10pt]{geometry}         \reversemarginpar           \usepackage{changepage}           \usepackage{lipsum}               \begin{document}                    \lipsum[5]\lipsum[5]\lipsum[5]\lipsum[5]      \begin{adjustwidth}{}{-5cm}       \lipsum[6]\lipsum[6]       \end{adjustwidth}                \newgeometry{left=2.5cm, right=2.5cm}      \lipsum[6]\lipsum[6]     \end{document}


title: beamer/beamerarticle: mode specification for frame doesn't work as expected

text: In the following example the `\section` comand (and its argument) is ignored as expected. But not all the content of the frame: The text and the first \tikz are not printed but the unknown color gives two errors (as do also unknown commands) and the graphics appears on the page (eso-pic is needed to get this effect). A `\stepcounter{section}` in the frame is executed too. I also tested the other way round: A `\begin{frame}<article>` in a beamer document: This doesn't work either. Is this a bug? (There is no problem if I use explicit `\mode` commands.)               \documentclass{scrartcl}     \usepackage{beamerarticle}     \usepackage{tikz}     \usepackage{eso-pic}     \newcommand\framegraphic[1]%       {\AddToShipoutPictureFG        {\AtPageCenter         {\includegraphics[width=5cm]{#1}%       }}}               \begin{document}     blabla          \section<presentation>{This section exists        \tikz\draw[color=unknowncolorA] (1,1)rectangle (0,0);       only in the presentation modes}          \begin{frame}<presentation>       some text      \tikz\draw[fill=red] (1,1)rectangle (0,0);      \tikz\draw[color=unknowncolorB] (1,1)rectangle (0,0);      \framegraphic{example-image-a}     \end{frame}          \end{document}


title: Allow page break in reference list

text: I am using the elsart-num bibliography style in an article document class. I find that my references overflow the page (only half of the citations show up). Any clues as to what I might be missing would be greatly appreciated.


title: Individual separator rule in moderncv

text: I would like to put a separator rule under each section and it should look like this picture: ![Separator rule](http://i.stack.imgur.com/RpvZD.jpg) So it should start with a small thickness then increase and then again a small thickness. Has anybody an idea how to do this? Regards


title: How to get a tight output when using pst-tree package and standalone class?

text: \documentclass[preview,border=3pt,varwidth]{standalone}     \usepackage{pst-tree}          \psset{levelsep=2,treesep=-2,angleA=90,angleB=-90,arm=12pt}          \def\psedge#1#2{\ncangle{#2}{#1}}          \begin{document}          \psTree{\Tcircle{36}}         \Tcircle{2}         \psTree{\Tcircle{18}}             \Tcircle{2}             \psTree{\Tcircle{9}}                 \Tcircle{3}                 \Tcircle{3}             \endpsTree         \endpsTree     \endpsTree          \end{document}      The code produces a trimmed output as follows. ![enter image description here](http://i.stack.imgur.com/ITM5o.png) How to fix this issue so I can get a correct tight output? ## Edit: For comparison purposes, let's comment some code in the preamble as follows.               \documentclass[border=3pt,preview,varwidth]{standalone}     \usepackage{pst-tree}          %\psset{levelsep=2,treesep=-2,angleA=90,angleB=-90,arm=12pt}     %     %\def\psedge#1#2{\ncangle{#2}{#1}}          \begin{document}          \psTree{\Tcircle{36}}         \Tcircle{2}         \psTree{\Tcircle{18}}             \Tcircle{2}             \psTree{\Tcircle{9}}                 \Tcircle{3}                 \Tcircle{3}             \endpsTree         \endpsTree     \endpsTree          \end{document}      The output looks fine! ![enter image description here](http://i.stack.imgur.com/1Gh0P.png)


title: Package sidecap not working with Lyx 2.0.4

text: I tryed to use the package `sidecap` to put the caption beside the immage, I didnt found any other (working ^^) way to do that apart `sidecap`, but it is not working. I tried to make a new file, article, add               \usepackage{sidecap}      in the preamble, and did the following:   * add a float figure,   * insert an image inside the box "float figure"   * write down a caption on the box labelled as "figure 1". When I compile, the caption and the string "figure 1:" is just under the image. Idk where I'm wrong.


title: How to make a dynamic comment box next to \address cluster?

text: I'm sure you're aware what \address{blah} is. Well, I'd like to make a boxed comment that's just as high as my address and stretches from the left margin of the document to 3cm to the left of the address: ![enter image description here](http://i.stack.imgur.com/PPxdV.png) * * *               \documentclass[standard]{letter}     \usepackage{invoice}     \address{\emph{Invoice from:} \\ My Address \\ My Address \\ My Address}     \signature{Piglet Master}     \date{23. May 2009}     \begin{document}       \begin{letter}{\emph{Invoice to:} \\ My Address \\ My Address \\ My Address}         \opening{Invoice no. 1}         My greeting \footnote{I am a man.}         \begin{invoice}{Euro}{0}           \ProjectTitle{Example Project}%           \Fee{Development} {1000.00} {1}         \end{invoice}         \closing{Invoice Release Authorization}       \end{letter}     \end{document}


title: How to change the name of Index section

text: I use the `makeidx` in the `extreport` and the command `\printindex` to print the index out. The Index name (index in English) was translated to Vietnamese automatically into "Chỉ mục". I want to change "Chỉ mục" into "Tra cứu theo vần", which is much easier to understand in Vietnamse, my native language. So how can I do? This is my MWE :               \documentclass[11pt,twoside]{extreport}     \usepackage[paperwidth=16cm,paperheight=24cm]{geometry}     \usepackage{amsmath,amsxtra,amssymb,latexsym,  amscd,amsfonts,enumerate,ifthen,stmaryrd,amsthm,amstext}     \usepackage[mathscr]{eucal}     \usepackage{graphics, graphpap,extsizes}     \usepackage[pdftex]{graphicx}     \usepackage{xspace}     \usepackage{mathrsfs}     \usepackage{makeidx}     \usepackage{indentfirst}     \usepackage[utf8]{inputenc}     \usepackage[utf8]{vietnam}     \usepackage{perpage}           \makeindex           \begin{document}     \section*{Chuyển sang tứ giác} \index{hình vuông}      \index{đối xứng trục}                 \index{đối xứng quay}           Nhóm đối xứng \index{Nhóm đối xứng, i.e the symmetric group} của một tứ giác.      \index{how can I do?} Ok let's see.      \newpage      \printindex     \end{document}      Here is the picture : ![enter image description here](http://i.stack.imgur.com/eQgpi.png)


title: How to simplify path?

text: I have the following MWE:                   \documentclass{standalone}         \usepackage{tikz}         \usetikzlibrary{calc}              \begin{document}           \begin{tikzpicture}              \coordinate (a) at (0,0);              \coordinate (b) at (1,-1);              \newlength{\vsep}              \setlength{\vsep}{0.5cm}              \coordinate (abovea) at ($(a) + (0,\vsep)$);              \coordinate (aboveb) at (b |- abovea);              \node[fill=black,circle,inner sep=2pt] at (a) {};              \node[fill=black,circle,inner sep=2pt] at (b) {};              \draw (a) -- (abovea) -- (aboveb) -- (b);         \end{tikzpicture}        \end{document}      It's quit verbose just to connect the points A and B and I am wondering how I can simplify it ?


title: Close/open the PDFviewer automatically while compiling

text: I am using **WinEdt 7.0** and my default **pdf viewer** is **FoxitReader**. So when I press **F9** (compile) in WindEdt, it compiles and shows the **pdf** automatically. I want to set the **winEdt** somehow that after some editing of the **tex** file, when I want to compile and view the **pdf** I just press the **F9** and the editor automatically closes the previous **pdf** and shows the updated **pdf** afterwards. If I try to recompile the file while the viewer is open the output would be:               I can't write on file 'filename.pdf'     please type another file name for output:      Simply I want to open/close the **pdf viewer** automatically from **WinEdt**. I think there is a script (something like that) for that (e.g. `\--single- instance` but I couldn't get it to work).


title: Reduce line spacing in minitoc package

text: I am using the `minitoc` package to add chapter TOC's in a thesis. The entire document (including the main table of contents) is doublespaced, but I want the chapter toc's to be single spaced. I specify the `minitoc` options in the document preamble as:               \usepackage[tight,k-tight]{minitoc}      The resulting chapter toc's are still double-spaced, though. How does one override the properties of the main table of contents to produce a single-spaced minitoc?


title: How to align standalone TikZ pictures horizontally?

text: Today I discovered the existence of this wonderful package called "standalone". I really love it because I have a lot of pictures in Tikz code and some of them have a very long code and it's very difficult to handle and annoying when I'm trying to concentrate on the text rather than on pictures. So here is my problem, I have some small pictures that I want to align in the same row (sometimes 2, 3 or 4 of them in the same row). Let's suppose that I have these stand alone pictures: Picture1.tex:                   \documentclass{standalone}         \usepackage{pgf,tikz}         \usetikzlibrary{arrows}         \pagestyle{empty}         \begin{document}         \begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=1.0cm,y=1.0cm]         \draw [domain=0.08:3.92] plot(\x,{(--1.04--0.32*\x)/1.96});         \draw (3.6,0.98) node[anchor=north west] {$l_a$};         \end{tikzpicture}         \end{document}      Picture2.tex:                   \documentclass{standalone}         \usepackage{pgf,tikz}         \usetikzlibrary{arrows}         \pagestyle{empty}         \begin{document}         \begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=1.0cm,y=1.0cm]         \draw [domain=0.08:3.92] plot(\x,{(--1.04--0.32*\x)/1.96});         \draw (3.6,0.98) node[anchor=north west] {$l_b$};         \end{tikzpicture}         \end{document}      Within the body of my main Tex file:               %...      impute(Picture1.tex)     impute(Picture2.tex)     %          I want my pictures look like this: ![enter image description here](http://i.stack.imgur.com/DM6rv.jpg) Also I wanted that my pictures have a general description below them. My first try was by using "figure" environment (\begin{figure}.../end{figure}) but the pictures are put in a different position rather than just after a given line of text, I don't want that the picture appears anywhere else like at the top of the page or something. Thank you so much for your help and so sorry if my question is so naive but I'm just starting to learn these things.


title: array of linked lists like in data structure

text: I want to implement an array of linked lists in La TeX like it appeared in data structure (graphic): the array elements are the numbers{1,2,3} and every number in the array is ahead of linked list{the first element in array is the head of the linked list a->b->null, where a and b are the nodes in the linked list, and so on to the other array elements} |1|->a->b->null |2|->c->null |3|->d->null can you help me in this?


title: Using arrows in an alignment

text: I would like to do something like the following. I am wondering if tikz-pgf would be the right tool to use. ![Universal Generalization](http://i.stack.imgur.com/oNPWJ.png) Except the (E.G.) should not be there. I'm pretty sure that is a typo.


title: pdflatex + java applet?

text: I am writing lecture notes in Euclidean/Noneuclidean geometry, see here. The lecture 10 is about geometric constructions, where I use some java applets for construction. So far I made a hyperlink from `.pdf` file to `.html` file, which contains the links to all constructions. But I would like to keep everything in one pdf- file. (So one could download single file and do everything offline.) Any ideas?


title: \autoref does not expand abbreviation automatically at beginning of line

text: Say there is an equation:               \begin{equation}     r^2 = x^2 + y^2 \text{.} \label{eq:circ}     \end{equation}      I can change the `autoref` label by using:               \def\equationautorefname{Eq.}      Now, using               \autoref{eq:circ} something something \autoref{eq:circ}.      gives `Eq. 1 something something Eq. 1.` However, I want the abbreviated versions to expand if they are at the beginning of a line. Essentially, I want this result here: `Equation 1 something something Eq. 1.` (all hyperlinked of-course). How do I make it happen?


title: How to place the item bullet at the top of a multiline item?

text: I have the following LaTeX code:               \documentclass[]{article}     \usepackage{amsmath}     \begin{document}          \newcommand{\A}{\begin{bmatrix} 1 & 0 \\ 0 & 1\end{bmatrix}}     \newcommand{\B}{\begin{bmatrix} 0 & -1 \\ 1 & 0\end{bmatrix}}              \begin{itemize}     \item $\begin{aligned}     BA&=\B \A\\&=\B=\B \A=BA     \end{aligned}$     \end{itemize}          \end{document}      My poor dot has the following wish: ![The poor dot](http://i.stack.imgur.com/rzARp.png) How can I fulfill his dream?


title: Gantt chart: How to make month and day like in MS project using pgfgantt

text: ![enter image description here](http://i.stack.imgur.com/yfPms.jpg) In the picture attached, the heading consist of Jun 23, 96 and M,T,W,T,F,S I need to start the project from 17 June 2014 to 31 July 2014 How can I do the same using pgfgantt. Any help will be appreciated. My code is as follows:               \documentclass[tikz]{standalone}     \usepackage{pgfgantt}     \title{Gantt Charts with the pgfgantt Package}     \begin{document}          %     %     \definecolor{barblue}{RGB}{153,204,254}     \definecolor{groupblue}{RGB}{51,102,254}     \definecolor{linkred}{RGB}{165,0,33}     \renewcommand\sfdefault{phv}     \renewcommand\mddefault{mc}     \renewcommand\bfdefault{bc}     \setganttlinklabel{s-s}{START-TO-START}     \setganttlinklabel{f-s}{}%{FINISH-TO-START}     \setganttlinklabel{f-f}{FINISH-TO-FINISH}     \sffamily     \begin{ganttchart}[         canvas/.append style={fill=none, draw=black!5, line width=.75pt},         hgrid style/.style={draw=black!5, line width=.75pt},         vgrid={*1{draw=black!5, line width=.75pt}},         today=32,         today rule/.style={           draw=black!34,           dash pattern=on 3.5pt off 4.5pt,           line width=1.5pt         },         today label font=\small\bfseries,         title/.style={draw=none, fill=none},         title label font=\bfseries\footnotesize,         title label node/.append style={below=7pt},         include title in canvas=false,         bar label font=\mdseries\small\color{black!70},         bar label node/.append style={left=2cm},         bar/.append style={draw=none, fill=black!63},         bar incomplete/.append style={fill=barblue},         bar progress label font=\mdseries\footnotesize\color{black!70},         group incomplete/.append style={fill=groupblue},         group left shift=0,         group right shift=0,         group height=.5,         group peaks tip position=0,         group label node/.append style={left=.6cm},         group progress label font=\bfseries\small,         link/.style={-latex, line width=1.5pt, linkred},         link label font=\scriptsize\bfseries,         link label node/.append style={below left=-2pt and 0pt}       ]{1}{39}       \gantttitle[         title label node/.append style={below left=7pt and -3pt}       ]{DAYS:\quad1}{1}       \gantttitlelist{2,...,39}{1} \\       \ganttgroup[progress=100]{Analysis}{1}{30} \\       \ganttbar[         progress=100,         name=WBS1A       ]{\textbf{Risk Analysis}}{1}{8} \\       \ganttbar[         progress=100,         name=WBS1B       ]{\textbf{System Requirement Specification}}{9}{10} \\       \ganttbar[         progress=100,         name=WBS1C       ]{\textbf{Functional Specification}}{11}{25} \\       \ganttbar[         progress=100,         name=WBS1D       ]{\textbf{Project Plan}}{26}{29} \\       \ganttbar[         progress=100,         name=WBS1E       ]{\textbf{Project Schedule}}{30}{30} \\       \ganttgroup[progress=70]{Design}{31}{32} \\       \ganttbar[progress=70]{\textbf{High Level Design}}{31}{32} \\       \ganttgroup[progress=0]{Coding}{33}{39} \\       \ganttbar[progress=0]{\textbf{Building Prototype}}{33}{39} \\       \ganttlink[link type=f-s]{WBS1A}{WBS1B}       \ganttlink[link type=f-s]{WBS1B}{WBS1C}       \ganttlink[         link type=f-s,         link label node/.append style=left       ]{WBS1C}{WBS1D}       \ganttlink[         link type=f-s,         link label node/.append style=left       ]{WBS1D}{WBS1E}     \end{ganttchart}          \end{document}


title: TeX capacity exceeded, when flexisym scrreport, hyperref, and section heading with math all used together

text: I'm getting the error:               TeX capacity exceeded, sorry [input stack size=5000]      Under the following very specific combination of packages and document class:               \documentclass{scrreprt}     \usepackage{hyperref}     \usepackage{flexisym}     \begin{document}     \chapter{When $\ne$.}     \end{document}      Removing either the `hyperref`, or `flexisym` package references, or changing the document class to `article` from `scrreport`, or removing the math content from the `\chapter` (or `\section` or `\subsection`) heading, appears to eliminate the issue. This looks pretty similar to "TeX capacity exceeded" because of a couple of raiseboxes in a \section? but changing the chapter reference to:               \chapter{When \protect$\ne$.}      doesn't seem to help. Is this a bug in one of the packages above? If not, what's the proper way to deal with this?


title: how to define a new section-like environment

text: If a `section` heading arrives at the end of a page, and there is no more space to include the later text body, the section heading will be shifted to the next page (the section, subsection, ..., all have this property, by default). Now, I want to define a new section-like environment. This environment has a red line below of its heading and we can insert our text underneath this line.


title: Defining custom sectioning commands

text: In a document of mine (`scrbook` class) I have to describe several different scenarios as part of a subsection. I originally used `\subsubsection` for each which are not numbered with the default setting of `secnumdepth`. I could change that counter but having something `1.2.3.1` for a scenario would not look good. A problem is that I can't proper `\ref`erence a specific scenario like this because the `\label` would point to the parent `\subsection`. Using a `enumerate` environment isn't really an option here as well. I would now define a sectioning-like macro `\scenario` which   * Is formatted like `\subsubsection*` of the used class (`scrbook` in my case).   * Starts with `Scenario \thescenario:~`, where `\thescenario` would be a single integer (1, 2, ...) independent of the parent section numbers.   * Can be `\label`ed and referenced correctly using `hyperref`s `\autoref`. My first approach was the following:               \documentclass{scrbook}     \usepackage{hyperref}     \newcounter{scenario}     \newcommand{\scenarioautorefname}{scenario}     \newcommand{\scenario}[1]{%        \refstepcounter{scenario}%        \subsubsection*{Scenario~\thescenario: #1}%        %\refstepcounter{scenario}%     }%          \begin{document}     \chapter{MWE}     \section{Grandparent}     \subsection{Parent}     \scenario{Foo}\label{sce:foo}     ...     \scenario{Bar}\label{sce:bar}     ...     In \autoref{sce:foo} ...     \end{document}      This gives me the format of `\subsubsection*`, but the issue is that it interferes with the `\refstepcounter`. If I put `\refstepcounter{scenario}` before it, the scenario number is correct but the `\autoref` will use `subsubsection` not `scenario` for the reference. If I put it at the end of the macro the reference name is correct but the number is off by one, i.e. one to low. Setting the number initially to 1 gives my the correct number in the `\scenario` line and the correct name in `\autoref` but there the number is off by one again, this time one to high. How can I define such a sectioning-like macro? I personally wouldn't mind using Koma-Script macros to do so, but would welcome a class-independent solution more.


title: Typewriter Animation Using the 'Animate' Package

text: I wanted to do something similar like here: Improving typewriter animation But using the `animate` package. I managed to get a very poor solution:               \documentclass{article}     \usepackage[latin1]{inputenc}          \usepackage{animate}     \usepackage{amsmath}          \usepackage[active,tightpage]{preview}     \PreviewEnvironment{animateinline}          \begin{document}          \begin{center}     \fboxsep1mm         \begin{animateinline}[autoplay,loop]{2}         % one frame per second         $\phantom{\text{Alles Gute zum Geburtstag!}}$         \newframe            $\text{Alles}\phantom{\text{ Gute zum Geburtstag!}}$         \newframe                $\text{Alles Gute}\phantom{\text{ zum Geburtstag!}}$         \newframe                $\text{Alles Gute zum}\phantom{\text{ Geburtstag!}}$         \newframe            $\text{Alles Gute zum Geburtstag}\phantom{\text{!}}$         \newframe            $\text{Alles Gute zum Geburtstag!}\phantom{\text{}}$                             \end{animateinline}     \end{center}          \end{document}      The **`\phantom`** is in my experience needed to **reserve** in all frames the same **space**. **Otherwise** the text gets **distorted**. Here is the result: http://www.bipede.de/Downloads/HB.pdf Has someone an idea how to get the very cool solution in Improving typewriter animation to work here? By the way, `Alles Gute zum Geburtstag` means `Happy Birthday` in German.


title: What's the best way to typeset C++ codes in latex?

text: I'm participating in a programming contest and we are allowed to prepare a team reference document which must not exceed 25 pages. Typically we will prepare many code templates and this year I'm trying to use latex to typeset these C++ codes and I want to know what's the best way to do that. Some requirements:   1. Since there is a page length limit I want to typeset my codes as compact as possible.   2. I want to have the C++ codes syntax highlighted.   3. If it is possible to generate a compact table of content in front, it would be best.


title: Automatic equation numbering in LyX

text: I would like to create automatic numbering of equations in LyX. when I entered               \renewcommand\[{\begin{equation}}     \renewcommand\]{\end{equation}}       for the "equation" environment it worked. However, when trying to make the align* environment numbering               \renewcommand{\begin{align*}}{\begin{align}}     \renewcommand{\end{align*}}{\end{align}}      it produces errors, such as "LaTeX Error: \begin{align*}undefined". how can I overcome this?


title: Tangent on parabola

text: I really was working on this now for a long time. I need a tangent line on a parabola; here is my working example:               \documentclass{minimal}     \usepackage{tikz}     \usetikzlibrary{arrows,calc,intersections,decorations.markings}     \usepackage{relsize}     \begin{document}     \begin{tikzpicture}[             ]             \draw[very thick, ->, >=stealth', line join=miter]   (6,0) node(xline)[right] {$x_i$} -|                               (0,6) node(yline)[above] {$y_i$};                 \draw[blue,thick,name path = line 1]          (4,1) coordinate () parabola (0,3);                 \draw[blue,thick,name path = line 2]         (4,2) coordinate ( ) parabola (0,4);                 \draw[blue,thick,name path = line 3]         (4,3) coordinate ( ) parabola (0,5);                 \draw[dashed ,name path = line 4](1,0) coordinate () -- (1,5);                 \draw[dashed ,name path = line 5](3,0) coordinate () -- (3,5);                 \fill[red,name intersections={of=line 1 and line 4}]     (intersection-1) circle (2pt) node { };         \end{tikzpicture}     \end{document}      Instead of the red dot I want a tangent line. Does anyone of you know how to do this? ![enter image description here](http://i.stack.imgur.com/h7OqC.png)               \begin{tikzpicture}[         tangent/.style={             decoration={                 markings,% switch on markings                 mark=                     at position #1                     with                     {                         \coordinate (tangent point-\pgfkeysvalueof{/pgf/decoration/mark info/sequence number}) at (0pt,0pt);                         \coordinate (tangent unit vector-\pgfkeysvalueof{/pgf/decoration/mark info/sequence number}) at (1,0pt);                     }             },             postaction=decorate         },         use tangent/.style={             shift=(tangent point-#1),             x=(tangent unit vector-#1),         },         use tangent/.default=1     ]         \draw[thick, <->, line join = miter->]   (6,0) node(xline)[right] {$x_i$} -|                           (0,6) node(yline)[above] {$y_i$};     \draw[dashed ,name path = line1](1,0) coordinate () -- (1,5);     \draw [blue,tangent=0.3,name path = line2] (4,1)    parabola  (0,3);     \fill[red,name intersections={of=line1 and line2}]     (intersection-1) circle (2pt) node {};     \draw [orange, thick, use tangent] (-1,0) -- (1,0) ;     \end{tikzpicture}


title: tikz picture inside of an enumerate environment

text: Is there a way I can make sure that the number of the enumerate environment stays in the top left of the tikzpicture? I'm using a custom environment that just wraps around the enumerate environment...               \documentclass{article}     \usepackage{tikz}     \usepackage{enumitem}          \usetikzlibrary{positioning}     \tikzstyle{dot} = [draw=black, fill=white, circle, inner sep=2pt]          \newenvironment{parts}       {\begin{enumerate}[label=\alph*)]}       {\end{enumerate}}          \begin{document}         \begin{parts}           \item              \begin{tikzpicture}               \node (a) {a};               \node (b) [above=1cm of a] {b};               \node (c) [right=1cm of a] {c};               \node (d) [above=1cm of c] {d};               \path                 (a) edge node {} (b)                 (a) edge node {} (d)                 (d) edge node {} (c);             \end{tikzpicture}         \end{parts}     \end{document}


title: Extract a graphic from the pdf document

text: I have a pdf file which contain text, image and text as :               text ....     My image     text ...      how can i do to print just the image on latex ?


title: classic table footnote with a twist

text: \documentclass{article}          \usepackage{hyperref}     \usepackage{tabularx}     \usepackage{footnote}          \makesavenoteenv{table}          \begin{document}          \begin{table}[htbp]      \begin{tabularx}{\textwidth}{XX}       \hline       foo\footnote{fuz} & bar       \hline      \end{tabularx}          \end{table}               \end{document}      I like the formating of the `tabularx` environemnt. However, it does not allow for the choice of positioning of the table (to the best of my knowledge). My understaning is that `tabularx` produces the footnote (which I tested), but on the other hand, `table` traps them, therefore I sought to `\usepackage{footnote}` and `\makesavenoteenv{table}`. What is wrong with my reasoning. One more caveat: I need to `hyperref` the `\footnote`s **EDIT** : The positioing of the footmark is unimporant. And preferably no hacks like `\footnotemark`


title: Media9 error with two .vws files

text: I've tried to include a second U3D model to my document and got the following error:               ! LaTeX error: "kernel/command-already-defined"     !      ! Control sequence \l_mix_vfile_stream already defined.      The (minimal) code to include the models is:               % COMPILED WITH PDF LATEX     % USING THE UP-TO-DATE VERSIONS OF media9 AND l3kernel     \documentclass[ a4paper, 11pt, twoside, openleft ]{book}     \usepackage[dvipdfmx]{media9}          \begin{document}     % Include model1     \includemedia[%     activate=onclick,%     deactivate=pageinvisible,%     3Dviews=model1.vws]{}%     {model1.u3d}% Binary file     % Include model2     \includemedia[%     activate=onclick,%     deactivate=pageinvisible,%     3Dviews=model2.vws]{}%     {model2.u3d}% Binary file     \end{document}      .u3d files are binary and the .vws looks like:               % modelX.vws - Nothing special here.     VIEW=MATLABfig     COO=0.35        0.35        0.05     C2C=3.8613     -4.3644       1.671     ROO=0.596     ROLL=0     ORTHO=0.83893          PART=Mesh1         RENDERMODE=SolidWireframe     END          PART=Mesh2         RENDERMODE=SolidWireframe     END     END      The error disappears if I remove the 3Dviews options from one of them. But then I cannot configure the rendering of one model (transparency, light, etc). I'm not familiar to the internals of latex, but looking at media9.sty it is clear that the command               \l_mix_vfile_stream      is used to open/close the .vws file. Is this a bug from media9? or from latex 3?


title: Using pdfpages stops figures from printing. Possible conflict with anuthesis package

text: I'm compiling my thesis and need to include some multi-page PDFs in various places. I'm using `pdfpages` in the usual way. I get error messages associated with all of the figures (not the PDFs I'm trying to including using the package but rather, pre-existing figures) in the thesis. I get errors of the form,               ./thesis.tex:40: Too many }'s.     \color@endbox ->\color@endgroup \egroup          1.40 \end{figure}      (except that I'm almost certain that I don't have too many `}`'s - It doesn't complain when I don't use `pdfpages`) and then, after I press Enter to ignore this, I get,               ./thesis.tex:40: LaTeX Error: \begin{document} ended by \end{figure}.          1.40 \end{figure}       Below is a minimal working example. When I run it as is, I get a figure printing and (obviously) no PDF inserted. When I uncomment `\usepackage{pdfpages}` and `\includepdf[pages={1-14}]{pdfdocument}`, run it and hit `Enter` repeatedly to ignore all the warnings and errors, I get a compiled document with the PDF pages included but the figure not longer appears. While using `pdfpages` I've tried going through and commenting out each other package, one at a time, to find a conflict. This suggests that the problem lies in the `anuthesis` package. I am required to use this package to format my thesis, so I'm not sure what I can do to solve the problem!               \documentclass[twoside,onecolumn,11pt,a4paper,openright]{book}          \usepackage{anuthesis}          \pdfoptionpdfminorversion 7          \usepackage{graphicx}          %\usepackage{pdfpages}%%%%%%%%%%%%%% UNCOMMENT THIS          \usepackage{fancyhdr}          \usepackage{amsmath}          \usepackage{amsfonts}          \usepackage{amssymb}          \usepackage{amstext}          \usepackage{array}          \usepackage{xspace}          \usepackage{xkeyval}          \usepackage{upgreek}          \usepackage{mathrsfs}          \usepackage[hidelinks]{hyperref}          \usepackage{cite}          \usepackage{url}          \usepackage[figure]{hypcap}          \usepackage{float}          \usepackage[CaptionAfterwards]{fltpage}          \usepackage{nomencl}               \begin{document}              %\includepdf[pages={1-14}]{pdfdocument} %%%%%%%%%%%%%%%% UNCOMMENT THIS              \tableofcontents               \cleardoublepage              \chapter{Chapter}          Some text here              \begin{figure}          \centering          \includegraphics[angle=0,width=0.45\textwidth]{figure.png}          \caption[Short caption]{\textbf{Long caption}. Long caption details.}          \label{fig:figure}          \end{figure}          \end{document}


title: Change title - moderncv - error stack size

text: I'm using moderncv and when I write this:               \documentclass[10pt,a4paper]{moderncv}     \moderncvtheme[blue]{classic}                     \usepackage[utf8]{inputenc}     \usepackage[scale=0.8]{geometry}          \firstname{\textcolor{darkgray}{zzzzzzzzzzz}}     \familyname{\textcolor{darkgray}{zzzzzzzzzzz}}     \title{\textcolor{darkgray}{zzzzzzzzzzz}}            \address{\textcolor{darkgray}{zzzzzzzzzzz}\textcolor{darkgray}{zzzzzzzzzzz}}         \mobile{\textcolor{darkgray}{zzzzzzzzzzz}}                        \email{\textcolor{darkgray}{zzzzzzzzzzz}}                                \begin{document}     \maketitle          {\medbreak}     \section{\textbf{zzzzzzzzzzz}}{\bigbreak}{\medbreak}     \cventry{pppppp}{zzzzzzzzzzz}{zzzzzzzzzzz}{zzzzzzzzzzz}{}{}{\smallbreak}     \cventry{ffff}{zzzzzzzzzzz}{zzzzzzzzzzz}{zzzzzzzzzzz}{}{}{\bigbreak}{\medbreak}     \section{\textbf{zzzzzzzzzzz}}{\bigbreak}{\medbreak}     \subsection{\textbf{zzzzzzzzzzz}}{\medbreak}{\smallbreak}     \cventry{kkkk}{zzzzzzzzzzz}{zzzzzzzzzzz}{zzzzzzzzzzz}{}     {zzzzzzzzzzz}     \cventry{kkkkkk}{zzzzzzzzzzz}{zzzzzzzzzzz}{zzzzzzzzzzz}{}{zzzzzzzzzzz}{\bigbreak}     \subsection{\textbf{zzzzzzzzzzz}}{\medbreak}{\smallbreak}     \cventry{2013}{zzzzzzzzzzz}{Java}{}{}{}{\smallbreak}     \cventry{}{zzzzzzzzzzz}{VB.Net}{}{}{}{\smallbreak}     \cventry{}{zzzzzzzzzzz}{zzzzzzzzzzz}{}{}{}{\smallbreak}     \cventry{2012}{zzzzzzzzzzz}{C++}{}{}{}{\smallbreak}     \cventry{}{zzzzzzzzzzz}{C}{}{}{\medbreak}     \section{\textbf{zzzzzzzzzzz}}{\bigbreak}{\medbreak}     \subsection{\textbf{zzzzzzzzzzz}}{\medbreak}     \cvcomputer{yyyy}{\textbf{zzzzzzzzzzz}}{zzzzzzzzzzz}{\textbf{zzzzzzzzzzz}}{\smallbreak}     \cvcomputer{yyyy}{\textbf{zzzzzzzzzzz} zzzzzzzzzzz}{}{}{\bigbreak}{\medbreak}     \subsection{\textbf{zzzzzzzzzzz}}{\medbreak}     \cvlanguage{zzzzzzzzzzz}{zzzzzzzzzzz}{}{\smallbreak}     \cvlanguage{zzzzzzzzzzz}{zzzzzzzzzzz}{}{\bigbreak}{\medbreak}     \section{\textbf{zzzzzzzzzzz}}{\bigbreak}{\medbreak}     \cventry{zzzzzzzzzzz}{zzzzzzzzzzz}{}{}{}{}{\smallbreak}     \cventry{zzzzzzzzzzz}{zzzzzzzzzzz}{}{}{}{}          \end{document}      I have this error : ! TeX capacity exceeded, sorry [parameter stack size=10000]. So how can I fixe it ? Thanks you very much ! :)