title: Biblatex, alphabetically enumerated

text: I hope that you can help me to get customized labels for my bibliography.   I want to get a specific format for labels in bibliography, using `\biblatex`; only two characters, alphabetically ordered:   1. The first character of the author's name.   2. A number, which is the list for the first character. I understood that I have to change the `\DeclareLabelalphaTemplate`; but I don't know how, I'm using this code:               \documentclass[11pt,a4paper]{article}          \usepackage[spanish, es-noshorthands]{babel}          \usepackage{csquotes}     \usepackage[backend=biber,style=alphabetic,backend=biber]{biblatex}     \usepackage{hyperref}     \addbibresource{bib.bib}          \DeclareLabelalphaTemplate{       \labelelement{         \field[final]{shorthand}         \field{label}         \field[strwidth=1,strside=left,ifnames=1,compound=false]{labelname}       }       \labelelement{ %I have to change or add here, I suppose.         \field[]{}       }     }          \begin{document}          These are my references, \cite{bael}, \cite{is}, \cite{macgregor}, \cite{morales}, \cite{nationalacademy-joints}, \cite{pfeiffer}.          \printbibliography               \end{document}      This is my bibliography data:               @book{morales,         author    = {R. Morales},         title     = {Diseño Estructural Sismorresistente},         publisher = {Fondo Editorial ICG},         year      = {2002},         address   = {Lima},         pages     = {4-5},         }          @book{macgregor,         author    = {J. MacGregor and J. Wight},         title     = {Reinforced Concrete Mechanics and Design},         publisher = {Prentice Hall},         date      = {2011},         location  = {Upper Saddle River, New Jersey},         pages     = {71-71},         }          @report{pfeiffer,         author    = {Michael J. Pfeiffer, and David Darwin},         title     = {Joint Design for Reinforced Concrete Buildings},         institution = {University of Kansas Structural Engineering and Materials Laboratory},         date      = {1987},         location  = {Lawrence, KS},         pages     = {73},         }          @book{seae,         author    = {Departamento de Tecnología Industrial},         title     = {Código Técnico de la Edificación. Documento Básico SE-AE Seguridad Estructural: Acciones en la Edificación},         location  = {Madrid},         date      = {2007},         pages     = {9},         }          @book{bael,         title    = {Règles de techniques de conception et de calcul des ouvrages et construction en béton armé suivant la méthode des états limites},         author   = {Ministère de l'Equipement des Transports et du Logement},         location = {Paris},         date     = {1999},         pages    = {86-87},         }          @book{is,         title    = {Plain and Reinforced Concrete - Code of Practice IS 456-2000},         edition  = {Fourth},         author   = {Bureau of Indian Standards},         location = {Nueva Delhi},         date     = {2000},         pages    = {86-87},         }          @report{pca-joints,         title    = {Buildings Movements and Joints},         author   = {Portland Cement Association},         location = {Skokie, Illinois},         date     = {1983},         pages    = {36},         }          @report{nationalacademy-joints,         title    = {Expansion Joints in Buildings},         author   = {Standing Commitee on Structural Engineering of the Federal Construction Council},         number   = {Technical Report No. 65},         institution    = {National Academy of Sciences},         location       = {Washington},         date           = {1974},         pagetotal      = {43},         }          @book{vallecilla,         author    = {C. Ramiro Vallecilla},         title     = {Fuerzas Sísmicas Principios y Aplicaciones NSR-98},         publisher = {Editorial Bauen},         location  = {Bogotá},         date      = {2003},         pages     = {192-201},         }          @online{senhami,         author          = {Servicion Nacional de Meteorología e Hidrología},         organization    = {Ministerio del Ambiente},         title           = {Datos Históricos},         url             = {http://www.senamhi.gob.pe/main_mapa.php?t=dHi},         }      This image depicts, what I want,![image](http://i.stack.imgur.com/zr9Fq.png)


title: Change font size of lstlistoflistings heading

text: How can I change font size of `lstlistoflistings` heading? Currently it is smaller than normal chapter heading title. Any ideas? Unfortunately I need to use document class from my university, my MWE: MWE:               \documentclass{aghdpl}     \usepackage[polish]{babel}     \usepackage[utf8]{inputenc}          \usepackage{enumerate}     \usepackage{listings}          \begin{document}               \tableofcontents     \clearpage          \chapter{Lorem ipsum}               \begin{lstlisting}[language=Java, caption=Caption,label=lst:registry]     public interface IRegistry     {         void Register(Device device);         List<Device> GetAll();         Device GetByUuid(UUID uuid);     }     \end{lstlisting}               \addcontentsline{toc}{chapter}{Listings}     \lstlistoflistings          \bibliographystyle{alpha}     \bibliography{bibliografia}          \end{document}      Document class is available here: https://www.sharelatex.com/project/5400ba9cf95f88391849bde8 When I've used `article` document class lstlistoflistings had same size as chapter size so probably it is connected to the document class :(. Unfortunately my tex knowledge is to small to solve this issue.


title: `xr` - temporarily redefine `\label` for exporting section counter to sister document?

text: # The goal My objective is to have continuous page (and possibly section) counters for several independent documents. The purpose is a cumulative dissertation where each paper should retain the journal's layout as much as possible, but the school requires continuous pagination. It's arguably going to look ugly, like several papers glued together, but that's essentially what it is. I'm aware that the clean way to proceed would probably be to extract the formatting information from the journals' `.cls`-files and pack into environments, but that would probably be a lot of work for someone as illiterate in plain `TeX` as I am. Therefore, I've tried, with some success, an alternative approach: a hack using the `xr` package. But there are some residual issues. Let me first explain what I've been doing: # My setup I have a main file which includes the introduction and conclusions. Its pagecounter and sectioncounter should both start at 1, so I have to update them with the values fed in from the last chapter of the body only at the breaking point. I have been having problems when trying to use `\setcounter{page}{\pageref{external-endfile}}` within the document which seem to have to do with the representation of `\pageref`'s output as a string rather than an integer, and seem to be triggered by the `babel` package so I feed the numbers into a `\newcounter` which I then read into the actual counters when needed. Here's what this main file looks like:               \documentclass{article}     \usepackage{xr} %imports labels from external document       \externaldocument[finalCh]{file1} %prefix external labels to avoid name clashes       \newcounter{finalcount}       \setcounter{finalcount}{\pageref{finalChendfile}}% probably not the most elegant way to pack the input file's page number into a numberical variable, but it works.       \stepcounter{finalcount}% +1 since counters are initialised at 0            \newcounter{othersectioncount}       \setcounter{othersectioncount}{\ref{finalChendfile}}     \usepackage{ifthen} %conditionals     \newcommand{\exportcounters}{         \ifthenelse{%                   \isodd{\thepage}} % if current page is odd-numbered                   {\newpage \ % new page, forced space to make sure the following command is actually parsed, i.e. the page not treated as totally empty                   }%                   {\relax}         \label{endfile}         \newpage     }          %... other packages     \usepackage[english]{babel} %for some reason I don't understand, this clashes with treating \pageref as a number, so you have to put it *after* determining the page number     \usepackage{lipsum}          \begin{document}          \tableofcontents     \section{Introduction}     \subsection{Subsection}     \lipsum[1-2]     \newpage         \subsection{Another subsection}     \exportcounters          \setcounter{section}{\theothersectioncount}     \section{Conclusions}     \setcounter{page}{\thefinalcount} %load the final pagenumber of the last chapter here          \lipsum[4-40]               \end{document}      Besides that, I have a file for the chapter, which looks like this:               \documentclass{article}     \usepackage{substr}     \usepackage{xr} %imports labels from external document     \usepackage{ifthen} %conditionals       \externaldocument[intro]{introandextro} %prefix external labels to avoid name clashes       \addtocounter{page}{\pageref{introendfile}}     \newcommand{\exportcounters}{         \ifthenelse{%                   \isodd{\thepage}} % if current page is odd-numbered                   {\newpage \ % new page, forced space to make sure the following command is actually parsed, i.e. the page not treated as totally empty                   }%                   {\relax}         \label{endfile}         \newpage     }          \usepackage{lipsum}          %\setcounter{section}{2}     \begin{document}          \setcounter{section}{\ref{introendfile}}     \section{Chapter I}     \subsection{intro}     \lipsum[1-4]     \newpage     \subsection{Chapter 1 body}     \lipsum[5-44]          \exportcounters     \label{endfile}               \end{document}      With this setup, I only need to run two times each "pdflatex introandextro", "pdflatex file1" and again "pdflatex introandextro" to get a continuous page and section numbering. (I have a shell script to do that for me.) I also have a Python script to extract all `toc`-relevant information from the different `aux`-files and compile the main file with that as its `toc` in order to get a table of contents referencing all sections no matter which file they appear in which mostly works as it should. As it should, `\addtocounter{page}{\pageref{introendfile}}` imports the pagecounter at the end of the introduction into file1. Also as it should, `\setcounter{section}{\ref{introendfile}}` eats the section part of the external references return value (1.2 in this case) and appropriately uses it to set the section counter. Unfortunately, it doesn't know what to do with the rest of the expression, so it spits it out again, writing ".2" on top of the page. That's ugly, so I'm trying to get rid of it. My hunch is that the best method for this would be to temporarily redefine `\label` within `\exportcounters` so that it only sends the topmost sectioning command to `.aux` and `.toc`, but my plain tex is not good enough to know where to start. # Residual Issues So my question: Can anyone give me hints how to redefine the `\label`-command appropriately? In other words, how do I make it tell the `.aux`-file `\newlabel{endfile}{{<thesection>}{12}}` rather than `\newlabel{endfile}{{<\thesection>.<\thesubsection>}{12}}` despite being embedded in a subsection or deeper? (Alternatively, how do I strip the part from '.' on away before feeding it into `\setcounter{section}{...}`? I've tried `\SubStringBefore` but that produces a string rather than a number, throwing me a "Missing number, treated as zero" error during compilation.) A second issue I'm having is that the need to insert an explicit `\newpage` where I want the first page to end in both documents, otherwise it would run on for two pages worth of text. This behavior seems to be triggered by `xr` (or the conjunction of `xr` and `lipsum`). Is this a known issue, and are there any workarounds that don't involve explicit `\newpage`s? Another (really quite minor) issue is that pdflatex complains about the use of `\ref` in the preamble ("Missing \begin{document}"), but I'm fine with just ignoring that if the result looks right. Or maybe it's possible to tackle this problem from quite a different angle? Is there a tool to assist people who don't understand much plain TeX in packing `.cls` formatting commands into an environment? Something like `\importasenvironment{<environmentname>}{<classname>.cls}`?


title: Brackets around a sum that has no top limit

text: MWE:               \documentclass[12pt]{article}     \usepackage{amsmath}          \begin{document}     \thispagestyle{empty}          \[ \mathcal{F} \left\{ \sum_j e^{-2i\pi\nu_j t} \right\} \]          \end{document}      Result: ![sum in brackets](http://i.stack.imgur.com/StUZs.png) The sum only has a limit at the bottom, but the bracket size is calculated as if it had both limits, leading to a lot of unneeded space at the top. Is there a way to make the brackets wrap only the bottom limit?


title: How to write "dumb" quotes?

text: I need to cite a part of a string, which contains "dumb" quotes, and I want to keep them like this. When I write the quotes like they are, I face two problems:   1. The spacing behind a quote is missing   2. Quotes which are followed by a vocal are transformed to umlauts For the example given below, my result document looks like: > Example: ä quoted part"followed by text. instead of > Example: "quoted part" followed by text.               \documentclass[ngerman]{scrbook}     \documentclass[ngerman]{scrbook}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage{babel}     \begin{document}     Example: "a quoted part" followed by text.     \end{document}      How can I escape those quote to get the desired result? Obviously my problem is caused by the `babel` package, but I need this because I am writing a German document.


title: How to set pdf start page to a given label?

text: I'm working on a longish document and am often working on sections in the middle, so that after compiling I have to do a fair bit of digging to find the bit I was working on. After a while this can get quite tiresome, particularly with tricky bits that require multiple compilations to chase up details. I am using the `hyperref` package and I know that I can set the starting page using a sequence like               \usepackage[pdfstartpage=7]{hyperref}.      While that works, I would like a method where I can leave the preamble alone and then just move around some label, say               \label{startviewinghere}.      Is this possible? As a secondary question: is it possible to control where in the starting view this anchor appears (i.e. at the top vs at the bottom)?


title: APA style in et al. format conversion

text: I want to generate the APA style reference in et al. format as shown under which I got from endnote… But when try in LaTeX I am getting all authors name typed up as shown below… Here I am attaching my `.tex` file, `.bib` file and output file… Output from my word document by using endnote > bla bla bla bla (Powers, Young et al. 2003 ; Heitjan 2011), bla bla bla > (Fleischhacker, Derks et al. 2012; Nakash, Hutton et al. 2008) and social > science studies(Green, Murphy et al. 2000; Hamano Yamaski et al. 2011) Output from my LaTeX file > bla bla bla bla (Powers, Young, Russell, & Pachana, 2003; Heitjan, 2011) , > bla bla bla (Fleischhacker, Derks, & Kahn, 2012; Nakash, Hutton, Lamb, > Gates, & Fisher, 2008) and social science studies (Green, Murphy, & Snyder, > 2000; Hamano et al., 2011) My `.tex` file               \documentclass[12 pt]{article}          \begin{document}     \par bla bla bla bla ~\cite{Powers03, Heitjan11} , bla bla bla ~\cite{Fleischhacker12, Nakash08} and social science studies~\cite{Green00, Hamano11}          \newpage     \label{REFERENCES}     \nocite{*}     \lhead{\emph{Bibliography}} % Change the page header to say "Bibliography"                    \bibliography{Bibliography1} % The references (bibliography) information are stored in the file named "Bibliography.bib"     \end{document}      My `.bib` file               @article{Acock05,     author = {Acock, Alan C.},     title = {Working With Missing Values},     journal = {Journal of Marriage \& Family},     volume = {67},     number = {4},     pages = {1012-1028},     year = {2005}     }          @article{baker88,     author = {Baker, Stuart G. and Laird, Nan M.},     title = {Regression Analysis for Categorical Variables With Outcome Subject to Nonignorable Nonresponse},     journal = {Journal of the American Statistical Association},     volume = {83},     number = {401},     pages = {62},     year = {1988}     }          @book{Bishop95,     author = {Bishop, Yvonne M. M. and Fienberg, Stephen E. and Holland, Paul W.},     title = {Discrete Multivariate Analysis : Theory and Practice},     publisher = {MIT Press},     pages = {560p.},     year = {1995}     }          @article{Blumenthal68,     author = {Blumenthal, Saul},     title = {MULTINOMIAL SAMPLING WITH PARTIALLY CATEGORIZED DATA},     journal = {Journal of the American Statistical Association},     volume = {63},     number = {322},     pages = {542},     year = {1968}     }          @book{Carpenter13,     author = {Carpenter, James R., Kenward Michael G.},     title = {Multiple imputation and its application},     publisher = {Wiley},     edition = {1st edition},     year = {2013}     }          @article{Elashoff47,     author = {Elashoff, Janet DixonElashoff R. M.},     journal = {Journal of the Royal Statistical Society: Series C (Applied Statistics)},     volume = {23},     number = {1},     pages = {26},     year = {1974}     }          @article{Fay86,     author = {Fay, Robert E.},     title = {Causal Models for Patterns of Nonresponse},     journal = {Journal of the American Statistical Association},     volume = {81},     number = {394},     pages = {354},     year = {1986}     }          @article{Fleischhacker12,     author = {Fleischhacker, W. Wolfgang and Derks, Eske and Kahn, Rene S.},     title = {Interpreting treatment trials in schizophrenia patients: lessons learned from EUFEST},     journal = {Schizophrenia Research},     volume = {138},     number = {1},     pages = {39-40},     year = {2012}     }          @article{Green00,     author = {Green, Robert G. and Murphy, Katrina D. and Snyder, Shelita M.},     title = {Should demographics be placed at the end or at the beginning of mailed questionnaires? An empirical answer to a persistent methodological question},     journal = {Social Work Research},     volume = {24},     number = {4},     pages = {237-241},     year = {2000}     }          @article{Hamano11,     author = {Hamano, Tsuyoshi and Yamasaki, Masayuki and Fujisawa, Yoshikazu and Ito, Katsuhisa and Nabika, Toru and Shiwaku, Kuninori},     title = {Social capital and psychological distress of elderly in Japanese rural communities},     journal = {Stress \& Health: Journal of the International Society for the Investigation of Stress},     volume = {27},     number = {2},     pages = {163-169},     year = {2011}     }          @article{Heitjan11,     author = {Heitjan, Daniel F.},     title = {Incomplete Data: What You Don't Know Might Hurt You},     journal = {Cancer Epidemiology, Biomarkers \& Prevention},     volume = {20},     number = {8},     pages = {1567-1570},     year = {2011}     }          @article{Hocking71,     author = {Hocking, R. R. and Oxspring, H. H.},     title = {Maximum Likelihood Estimation with Incomplete Multinomial Data},     journal = {Journal of the American Statistical Association},     volume = {66},     number = {333},     pages = {65},     year = {1971}     }          @article{Johnson11,     author = {Johnson, David R. and Young, Rebekah},     title = {Toward Best Practices in Analyzing Datasets with Missing Data: Comparisons and Recommendations},     journal = {Journal of Marriage \& Family},     volume = {73},     number = {5},     pages = {926-945},     year = {2011}     }          @article{Koch72,     author = {Koch, G. G. and Imrey, P. B. and Reinfurt, D. W.},     title = {Linear model analysis of categorical data with incomplete response vectors},     journal = {Biometrics},     volume = {28},     number = {3},     pages = {663-692},     year = {1972}     }          @article{Little82,     author = {Little, Roderick J. A.},     title = {Models for Nonresponse in Sample Surveys},     journal = {Journal of the American Statistical Association},     volume = {77},     number = {378},     pages = {237},     year = {1982}     }          @book{Little02,     author = {Little, Roderick J. A. , Rubin Donald B. },     title = {Statistical analysis with missing data},     publisher = {Hoboken N. J. Wiley},     edition = {2nd Edition},     year = {2002}     }          @book{McKnight07,     author = {McKnight, P. E. and McKnight, K. M. and Sidani, S. and Figueredo, A. J.},     title = {Missing data: a gentle introduction},     publisher = {Guilford Publications Guilford Press},     address = {New York, New York},     series = {Methodology in the Social Sciences},     pages = {251 p},     year = {2007}     }          @article{Meyer76,     author = {Meyer, M. B. and Jonas, B. S. and Tonascia, J. A.},     title = {Perinatal events associated with maternal smoking during pregnancy},     journal = {American Journal Of Epidemiology},     volume = {103},     number = {5},     pages = {464-476},     year = {1976}     }          @book{Molenberghs06,     author = {Molenberghs Geert, Kenward Michael G.},     title = {Missing data in clinical studies},     publisher = {Wiley InterScience Publication},     address = {Hoboken, N. J.},     year = {2006}     }          @article{Nakash08,     author = {Nakash, Rachel A. and Hutton, Jane L. and Lamb, Sarah E. and Gates, Simon and Fisher, Joanne},     title = {Response and non-response to postal questionnaire follow-up in a clinical trial – a qualitative study of the patient’s perspective},     journal = {Journal of Evaluation in Clinical Practice},     volume = {14},     number = {2},     pages = {226-235},     year = {2008}     }          @article{Powers03,     author = {Powers, Jennifer R. and Young, Anne F. and Russell, Anne and Pachana, Nancy A.},     title = {Implications of Non-Response of Older Women to a Short Form of the Center for Epidemiologic Studies Depression Scale},     journal = {International Journal of Aging and Human Development},     volume = {57},     number = {1},     pages = {37-54},     year = {2003}     }          @techreport{Puma09,     author = {Puma, Michael J. and Olsen, Robert B. and Bell, Stephen H. and Price, Cristofer and National Center for Education, Evaluation and Regional, Assistance},     title = {What to Do when Data Are Missing in Group Randomized Controlled Trials. NCEE 2009-0049},     institution = {National Center for Education Evaluation and Regional Assistance},     year = {2009}     }          @article{Raghunathan04,     author = {Raghunathan, Trivellore E.},     title = {WHAT DO WE DO WITH MISSING DATA?SOME OPTIONS FOR ANALYSIS OF INCOMPLETE DATA},     journal = {Annual Review of Public Health},     volume = {25},     number = {1},     pages = {99-117},     year = {2004}     }          @article{Shih87,     author = {Shih, W. J.},     title = {Maximum likelihood estimation and likelihood ratio test for square tables with missing data},     journal = {Statistics In Medicine},     volume = {6},     number = {1},     pages = {91-97},     year = {1987}     }          @article{Stasny86,     author = {Stasny, Elizabeth A.},     title = {Estimating Gross Flows Using Panel Data With Nonresponse: An Example From the Canadian Labour Force Survey},     journal = {Journal of the American Statistical Association},     volume = {81},     number = {393},     pages = {42},     year = {1986}     }


title: How to insert math with curly brackets into tikz decoration text along path?

text: I was going to write along an arc some math expression with curly brackets. Somehow the following snippet causes pdflatex to freeze.               \documentclass{article}     \usepackage{tikz}     \usetikzlibrary{decorations}     \usetikzlibrary{decorations.text}          \begin{document}          \begin{tikzpicture}          \draw[->,blue,      postaction={decorate,decoration={text along path, raise=4pt,       text={ $\{ hello \}${} },text color=blue,      text align={align=center}}}] (0,5) arc (90:0:5);          \end{tikzpicture}          \end{document}      How can I do it otherwise?


title: "Illegal parameter number" errors, in a macro for writing macro definitions to a file

text: **Problem.** I'm trying to write a command similar to `\newcommand`, but I'm having problems with _illegal parameter numbers_ : for reasons that I can't fix out, it's asking me to use parameters of the type `##1` rather than `#1`. I'm familiar with using the former in the case of nested definitions, _e.g._ in code-snippets such as `\def\foo#1{\def\bar##1{#1-##1}}`; but I don't understand why the error is coming up in what I'm trying to do. I'm hoping that someone can show me how to make parameters of the style `#1` suffice, in the example I describe below. **Details.** I'm trying to write a macro called `\newmacro`, which emulates the syntax of `\newcommand`, and which makes each macro write its own definition to an output file the first time it is used. Try out the minimal example below to see precisely what I mean:               \documentclass{article}     \makeatletter          \newwrite\macro@outfile     \immediate\openout\macro@outfile=\jobname.macros%     \typeout{Writing extra macros to file \jobname.macros}%          \def\macro@write#1#2{%         \immediate\write\macro@outfile{\string\renewcommand\string#1#2}%         \renewcommand#1#2%         #1%     }          \def\newmacro#1[#2]#3{%         \def#1{\macro@write{#1}{[#2]{#3}}}}          \makeatother      These macro definitions don't quite work properly: for instance, using the above pre-amble, the second invocation of `\newmacro` below throws an error.               \begin{document}          \newmacro\testmacro[1]{foo(##1)}     \testmacro{1}     \testmacro{2}          \newmacro\testmacro[1]{foo --- #1 ---}     \testmacro{3}     \testmacro{4}          \end{document}      If this document is compiled with the preamble above as `test.tex`, in addition to the usual output, a new file `test.macros` is created which will have the following content:               \renewcommand\testmacro[1]{foo(##1)}     \renewcommand\testmacro[1]{foo --- ##1 ---}      This is almost correct, and it is what I mean by the macro writing "its own definition" to an output file. However, I would like the stored definitions to use the parameters `#1` rather than `##1`, and for the invocation of `\newmacro` with the parameter `#1` not to throw errors. I'm hoping that someone can show me how to do this.


title: Does including the same figure placement specifier multiple times increase its weighting?

text: I keep seeing `\begin{figure}[hhhhtbp]` in a report I'm coauthoring. I asked the other author about it, and he said that he was told that including the 'h' multiple times increased the weighting of that placement specifier. However, my instincts tell me that the extra 'h's are redundant and that `\begin{figure}[hhhhtbp]` is exactly the same as `\begin{figure}[htbp]`, especially since an exclamation point can be used to force placement. But, I'm curious and haven't found a solid answer. So, does including the same figure placement specifier multiple times increase its weighting?


title: Selecting optical size?

text: For some time I've seen LaTeX-produced documents that had _slight_ differences in fonts. When you looked at them, they had the same Computer-Modern or Latin- Modern, however, they looked more stylized (more lightweight). By chance, and looking at another question here, I came across this document: http://dw.tug.org/pracjourn/2006-1/robertson/robertson.pdf in which I've seen clearly the difference, and has to do with optical size for a font at a given (output) point size. Here is a capture: ![enter image description here](http://i.stack.imgur.com/RWHZs.png) Look how the last line (even when they're all typeset at 12pt) looks with a more light font. I also noticed that in some Beamer documents using the sans- serif family (some had a more lightweight version of the font). So the question is, without using XeTeX or LuaTeX (just plain LaTeX/pdfTeX), how can I get that lightweight (optical at 17pt) font for the size I want? PD. I also noticed that there were some differences if one used tex->dvi->dvips->ps and pdflatex->pdf. In some .ps documents I've seen through the web, the fonts looked more lightweight by default. Maybe some TeX installations select those bigger optical sizes by default to obtain a more pleasing font rendering.


title: Set same height for all cells in longtable

text: I have created longtable with some text and I want set same height for all cells. It looks like:               \documentclass[11pt]{article}     \usepackage{longtable}     \begin{document}          \renewcommand{\tabcolsep}{0.5cm}     \renewcommand{\arraystretch}{2}          \begin{longtable}{ | p{7cm} | p{7cm} |}      \hline     TEXT TEXT TEXT TEXT.     &     TEXT TEXT TEXT.     \\ \hline     MORE TEXT TEXT TEXT TEXT TEXT TEXT  TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT      TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT TEXT     &     END.     \\ \hline     \end{longtable}          \end{document}      Is it possible to set same height for all cells in table?


title: Floats in the middle of paragraphs

text: How would you place a float like this with LaTeX? ![enter image description here](http://i.stack.imgur.com/RSbTm.jpg) Note that it's in the middle of a sentence. Normal float placement rules could only find the right page to put the float on. Then it's a matter of where on the page it's visually pleasing, regardless of where paragraph breaks happen to be. I think a placement in the middle of the page like this often looks better than at the top or bottom of the page, even though it perhaps has fallen out of style. (This example is printed in 1926.) **Added:** The point is not that the float should be in the middle of a paragraph. The float is at a predetermined position _on the page_. The point is instead that that _could_ be in the middle of a paragraph.


title: Change lineskip to fill the available space

text: Is there a way to change `lineskip` such that the text fills up a certain space? MWE               \documentclass{article}     \usepackage{blindtext}          \begin{document}     \begin{minipage}[c][\textheight]{\linewidth}     \blindtext     \end{minipage}     \end{document}      Where the first line is at the top of the page, and the last line is at the bottom, as if there were a `\vfill` after every line. Ideally, any solution would be fairly robust and allow a `wrapfigure` like Not so minimal working example               \documentclass{article}     \usepackage{blindtext}          \begin{document}     \noindent\begin{minipage}[c][\textheight]{\linewidth}     \blindtext       \begin{wrapfigure}{r}{2in}       \includegraphics[width=\linewidth]{picture.png}       \end{wrapfigure}       \blindtext     \end{minipage}     \end{document}


title: Nice formatting for theorems

text: I'm writing an article with some theorems and I would like to use special formatting for the theorems - my idea is putting a grey line in the side of the theorem. Can you please show me how to do this (I'm using LyX and don't often come in contact with LaTeX code)? Also, if you have other ideas for nice formatting for theorems, etc., I would like to hear it.


title: Using package locally

text: Is there a way to use a package locally? Here is the case... I NEED to use `\phiup` on my document, however it needs the using of package `pxfonts` or `txfonts`. However, when I use either of those packages, it will make the whole documents uglier, u may try writing `\Vdash` on your document with and without those packages, and see the difference. That's the point of my question. Can I use the package locally, or in this case, I want that `pxfonts` (or `txfonts`) package will be used only when I write `\phiup`, otherwise I just want to use the normal font.


title: Add tif image to LaTeX

text: I have to add `.tif` graphic in my LaTeX file, but it is not working.               \usepackage{graphicx}          \begin{figure}[h]         \begin{center}            \includegraphics[width=15mm]{myGraphic.tif}         \end{center}     \end{figure}      After some research, `.tif` files won't work in pdfLaTeX or something. But I need to have my figure with `.tif` extension (not `.jpg` or others). How can I add `.tif` figure in my `.tex` file?


title: What is the difference between pscurvepoints and curvepnodes?

text: What is the difference between `\pscurvepoints` (in `pstricks-add`) and `\curvepnodes` (in `pst-node`)?               \documentclass[pstricks]{standalone}     \usepackage{pst-node}     \usepackage{pst-plot}     \usepackage{pstricks-add}     \begin{document}     \pstVerb{realtime srand}%     \psLoop{25}{%     \begin{pspicture}(-2,-2)(2,2)         \pscircle*[linecolor=orange]{0.75}         \curvepnodes[plotpoints=100]{0}{360}{rand 16 mod 90 div 1.50 add t PtoC}{P}         %\pscurvepoints[plotpoints=100]{0}{360}{rand 16 mod 90 div 1.50 add t PtoC}{P}%==== option 2         \def\points{}%         \multido{\i=0+1}{\Pnodecount}{\xdef\points{\points (P\i)}}         %\multido{\i=0+1}{\Ppointcount}{\xdef\points{\points (P\i)}}%==== option 2         \expandafter\psccurve\points     \end{pspicture}}     \end{document}      When I enable the lines with `option 2` in comment and disable the corresponding lines, I just get a yolk.


title: Column break only if within first column of multicol

text: # Background Creating books automatically using LaTeX-escaped user-generated content. # Problem The book layouts make use of the multi-column package, with the book content separated into sections. If the second section is too long, is written entirely on the subsequent page, regardless of how much space remains after the first section. # Question How do you force the `multicols` package to only break to the next column while in the first column, but to _not_ break if within the second column? # Output The following figure illustrates the intent of the question; the second section should fill as much space in the second column of the first page as possible; overflowing to the second page whatever portion of the second section that does not fit: ![Fill Space](http://i.stack.imgur.com/2FmRh.png) # Code A minimal example to recreate the issue:               \documentclass{article}     \usepackage{lipsum}     \usepackage{multicol}          \raggedcolumns          \begin{document}          \begin{multicols*}{2}     \section{First}     \lipsum[1-3]          % Insert column break ONLY IF still within 1st column (e.g. if \lipsum[1-2] above).     % DO NOT insert column break if already in 2nd column (e.g. if \lipsum[1-3] above).     \columnbreak          \section{Second}     \lipsum[4-5]     \end{multicols*}          \end{document}      # Attempts I've tried using `multicols*` and `\raggedcolumns` to no avail. I thought that `\maxbalancingoverflow` would help, but could not get it to parse. # Related Questions I found useful, but did not offer any simple solutions:   * multicols not wrapping to 2nd column properly?   * How do I force a column-break in a multi-column page?   * Detecting current column in multicol   * How to prevent column break in multicols environment   * Writing in the first column first when using multicol package


title: Body text is overwriting a floating image

text: I'm learning to use ConTeXt by formatting a document. I've run into a problem with wrapped graphics. The body text overlaps the image when I use the `{\bf text}` function on this line (inside the red circle below), but when I remove the `{\bf text}` and use just the text, the text doesn't overlap the image (image 2). Can anybody help me retain the `{\bf text}` for this line without the text overlapping the image? With bold line, with overlap: ![enter image description here](http://i.stack.imgur.com/Hm2vm.jpg) Without bold line, no overlap: ![enter image description here](http://i.stack.imgur.com/VZthC.jpg)


title: Texmaker Toolbar More buttons

text: I've just updated Texmaker to 4.0.2. I've enabled the "file", "edit" and "tools" toolbars. But there is no buttons for changing font size etc. (E.g. in link below where is says "part", "label" and "tiny") ![enter image description here](http://i.stack.imgur.com/adX4j.png) In earlier versions I have installed of Texmaker these buttons have always been there from the start, but now I can't seem to find them. Any suggestions?


title: HTML-style table definition?

text: Is there any LaTeX environment which lets you express a table in a similar logical fashion to HTML or MediaWiki tables?   * Size defined by the number of cells found, rather than pre-specified in the table definition.   * Automatically puts lines in the right places without having to specify each line individually.   * Auto-scales columns to balance how much text each one has while fitting in page width.   * Cell entries have optional rowspan or colspan attribute.   * Word-wrap available in each cell.


title: Redrawing a curve in Tikz

text: I have copied a graph from a Pdf and I would like to redraw it neatly in latex. Would this be possible? ![graph](http://www.w3.org/2000/08/nba-manual/line-graph.gif) The above graph is an example of what I would like to plot. But I am not sure how to plot the curved line exactly the way it is.


title: biblatex-chicago and mk4ht oolatex: formatting errors

text: The MWE below using biblatex-chicago yields a few formatting errors when formatted by `mk4ht oolatex` (the same file formatted by `pdflatex` produces correct output): Report – with mk4ht oolatex: no space between title and number; month and day missing Online – with mk4ht oolatex: underscores missing in URL; month and day missing; “Visited on” instead of “Accessed” Article – with mk4ht oolatex: “number” instead of “no.”; month and day missing Book – with mk4ht oolatex: “edition” instead of “ed.”; “volumes” instead of “vols.”               \documentclass{article}     \begin{filecontents}{test1.bib}     @online{online,         Author = {Online, Otto},         Date = {1999-11-30},         Title = {A Website},         Url = {http://www.xxx.zzz/path_with_underscores/},         Urldate = {2011-07-28}}     @report{report,         Author = {Report, Rob},         Date = {1999-10-29},         Institution = {University of Massachusetts},         Number = {99-02},         Title = {A Stochastic Model},         Type = {techreport}}     @article{article,         Author = {Article, Art},         Date = {2000-10-23},         Journal = {A Journal},         Number = {2},         Title = {A Journal Article},         Volume = {7},         Pages = {123-234}}     @book{book,         Author = {Book, Bob},         Date = {2000},         Publisher = {The Publisher},         Location = {The Location},         Edition = {2},         Title = {A Book},         Volumes = {3}}     \end{filecontents}     \usepackage[utf8]{inputenc}     \usepackage[american]{babel}     \usepackage{csquotes}     \usepackage[authordate]{biblatex-chicago}     \addbibresource{test1.bib}     \begin{document}          \textcite{report} – with mk4ht oolatex: no space between title and number; month and day missing          \textcite{online} – with mk4ht oolatex: underscores missing in URL; month and day missing; “Visited on” instead of “Accessed”          \textcite{article} – with mk4ht oolatex: “number” instead of “no.”; month and day missing          \textcite{book} – with mk4ht oolatex: “edition” instead of “ed.”; “volumes” instead of “vols.”;          \printbibliography     \end{document}


title: Caption package error

text: Since today I am getting an error message when I use the caption package. This is a minimal working example:               \documentclass[12pt,a4paper]{report}     \usepackage[latin1]{inputenc}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage[font=small,labelfont=bf]{caption}     \usepackage{graphicx}     \begin{document}     \begin{figure}     \centering     \includegraphics[scale=0.5]{figure.jpg}     \caption{caption }     \end{figure}     \end{document}      I get the following error messages:               ! LaTeX Error: Command \@makecaption already defined.      Or name \end... illegal, see p.192 of the manual.     See the LaTeX manual or LaTeX Companion for explanation.          ! LaTeX Error: Command \@makecaption already defined.     Or name `\end... illegal`, see p.192 of the manual.     See the LaTeX manual or LaTeX Companion for explanation.          ! Undefined control sequence.     \caption@beginex ...tion@begin {#1}\caption@iflof     {\def \caption@tempa {#2}}...     l.12 \caption{this is caption}      I am using MikTex 2.9 for windows and I was using the 2012 version of the caption package. I then uploaded to a newer version but it didn't solve the problem. The file list:                *File List*       report.cls    2007/10/19 v1.4h Standard LaTeX document class       size12.clo    2007/10/19 v1.4h Standard LaTeX file (size option)     inputenc.sty    2008/03/30 v1.1d Input encoding file       latin1.def    2008/03/30 v1.1d Input encoding file      amsmath.sty    2000/07/18 v2.13 AMS math features      amstext.sty    2000/06/29 v2.01       amsgen.sty    1999/11/30 v2.0       amsbsy.sty    1999/11/29 v1.2d       amsopn.sty    1999/12/14 v2.01 operator names     amsfonts.sty    2009/06/22 v3.00 Basic AMSFonts support      amssymb.sty    2009/06/22 v3.00      caption.sty    2006/01/12 v3.0i Customising captions (AR)     caption3.sty    2012/01/12 v1.4b caption3 kernel (AR)       keyval.sty    1999/03/16 v1.13 key=value parser (DPC)     graphicx.sty    1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)     graphics.sty    2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)         trig.sty    1999/03/16 v1.09 sin cos tan (DPC)     graphics.cfg    2007/01/18 v1.5 graphics configuration of teTeX/TeXLive       pdftex.def    2011/05/27 v0.06d Graphics/color for pdfTeX     infwarerr.sty    2010/04/08 v1.3 Providing info/warning/error messages (HO)      ltxcmds.sty    2011/11/09 v1.22 LaTeX kernel commands for general use (HO)     supp-pdf.mkii      ***********


title: Natbib cite with abbreviation

text: I have a webpage I need to cite, whose author is a company (no real person specified). Its full name is Organization for the Advancement of Structured Information Standards, abbreviated OASIS. I want to have the OASIS in citations (OASIS, 2006), for example, but include the full company name in the list of references. I tried               author = "{OASIS}, {Organization for the Advancement of Structured Information Standards}"      that prints OASIS in the citations, but prints "OASIS, O.", in the list of references. If I do               author = "{OASIS, Organization for the Advancement of Structured Information Standards}"      then I have the full name in the list of references, but also in citations, which looks ugly. How can I have OASIS in citations and Organization for the Advancement of Structured Information Standards in the list of references? Another example I need is the World Wide Web Consortium. I would like to have it cited like W3C, for example: "(W3C, 2009)", but have the full name in the list of references: "The World Wide Web Consortium".


title: How to plot sectors in 3D with LaTeX?

text: I wish to have **two sectors** (one in blue color, the other in black pencil) **in 3D** , and they share the same vertex on the plane. The black pencil one lies on the plane, whereas the blue one is theta above the plane. The effect I am expecting is shown as the picture here. ![enter image description here](http://i.stack.imgur.com/rGnd4.jpg) It would be nice if I can also mark the three angles out. I really have no clues where to start. I have also tried searching but unfortunately failed.


title: Vertically center when using overlayarea

text: Consider the following MWE:               \begin{frame}       \frametitle{Foo}         \begin{overlayarea}{\textwidth}{0.8\textheight}           \begin{center}             \input{big_tikz_image_with_many_overlays.tex}           \end{center}         \end{overlayarea}              \begin{overlayarea}{\textwidth}{0.15\textheight}           \begin{center}             \only<8->{%                Some text             }           \end{center}         \end{overlayarea}     \end{frame}      Here, the TikZ element in the upper part has several overlays, and the "Some text" should appear from slide `n` and on. In order to avoid "jumpy" slide I used the `overlayarea` environment. The problem is that when using this environment, the vertical centering of the content is broken. The two blocks are pushed towards the upper part of the frame. I tried to add `\vfill` between the two, but it didn't help. How can I vertically center the content of the frame? Maybe, somehow enclose the two areas in a bigger box?


title: Same font embedded twice when including graphics created with standalone

text: I use `XeLaTeX`, `TikZ` and `standalone` to create a figure, e.g. a flowchart. When I use `includegraphics{}` to include that figure into another document which uses the _same_ font, then that font will be embedded into the pdf _once_ for the main document and then _again_ for each figure. To reproduce the problem, here is the code for a simple flowchart and another document that includes the flow chart pdf using `\includegraphics`.   The font XITS will be included twice.               % !TEX program = XeLaTeX     \documentclass[tikz=true]{standalone}     \usepackage{fontspec}     \setmainfont{XITS}      \usepackage{tikz}     \usetikzlibrary{shapes,arrows}     \usepackage{pgfplots}     \pgfplotsset{compat=newest}     %% ===================================================     \begin{document}     \tikzstyle{block} = [draw, rectangle, fill=blue!20, text width=9.5em, node distance=14em, text centered, minimum height=4em]     \tikzstyle{line} = [draw, -latex']     %     \begin{tikzpicture}[node distance = 2cm, auto]         \node [block] (Create) {create flowchart with TikZ and standalone};         \node [block, right of=Create] (Include) {include flowchart into main document};         \node [block, right of=Include] (CheckFont) {check which fonts have been embedded};         \path [line] (Create) -- (Include);         \path [line] (Include) -- (CheckFont);     \end{tikzpicture}     \end{document}      and the main document               % !TEX program = XeLaTeX     \documentclass[]{article}     \usepackage{graphicx}     \usepackage{fontspec}     \setmainfont{XITS}     % ===============     \begin{document}     Text before the figure.     \begin{figure}         \centering         \includegraphics{tikz_flowchart.pdf}          \caption{Some figure}         \label{fig:flowchart}     \end{figure}     Some more text.     \end{document}      In the document properties Adobe Reader shows XITS twice: ![XITS embedded twice](http://i.stack.imgur.com/2nO2c.png) If I include the Tikz flowchart directly into the main document, the font is emnbedded only once, but I don't want to compile it every time and sometimes I use other tools (e.g. Inkscape) to create figures (but they all use the same font). In order to have a smaller pdf file (and because I think this behavior is strange) I would like to have each font included only once. I am aware of the tool `pdfsizeopt`, as described in the question How to create small PDF files for the Internet, but while it does decrease the file size, it does not help with the issue of fonts being included multiple times.


title: How do I reuse a command name?

text: I like to give my commands names that correspond to their meaning rather than symbols they produce. For example, I would like to use the symbol `\amalg` to denote binary coproducts and `\coprod` to denote coproducts indexed by arbitrary sets, but I would like to call them `\coprod` and `\bigcoprod` respectively. If I try to write               \newcommand{\bigcoprod}{\coprod}     \renewcommand{\coprod}{\amalg}      then the first line interprets `\coprod` as already redefined by the second line and in the effect both `\bigcoprod` and `\coprod` produce the same symbol `\amalg`. How can I give a new meaning to `\coprod`, but in the same time retain access to its original meaning in order to rename it to `\bigcoprod`?


title: "Closed" (square) root symbol

text: I found a cool trick in the LaTeX wikibook which allows the square root sign to be altered such that it "closes" over its contents. Here's an example: ![closed root](http://i.stack.imgur.com/zHTm6.png) ("closed" root on the left, normal one on the right) The way they do this is as follows:               % New definition of square root:     % it renames \sqrt as \oldsqrt     \let\oldsqrt\sqrt     % it defines the new \sqrt in terms of the old one     \def\sqrt{\mathpalette\DHLhksqrt}     \def\DHLhksqrt#1#2{%     \setbox0=\hbox{$#1\oldsqrt{#2\,}$}\dimen0=\ht0     \advance\dimen0-0.2\ht0     \setbox2=\hbox{\vrule height\ht0 depth -\dimen0}%     {\box0\lower0.4pt\box2}} The cool thing is that (as far as I've tested it) this works regardless of the math font and with pdftex as well as xetex. However what is not possible is mulitple roots, such as `\sqrt[3]{a}`. Those produce incorrect output when this "trick" is being used. So my question is, is somebody able to tweak this code so that it works for multiple roots as well?


title: Table overlay in beamer on multiple rows

text: I want to include a table in my presentation (`beamer`) and this table has 2 panels. I want to first show the first panel and then the second panel, I have been trying to do it unfortunately without any luck. The table is like as shown below (I want to first show the results for `$\alpha=0.05$` and then `$\alpha=0.5$`):               \begin{frame}     \begin{table}     \caption{Table}     \begin{tabular}{l c c c c c c}     \hline \hline     No.  & {Ordinary} & {Blue} & {Pink} & {Yellow} & {Green} & {RCM}\\     \hline     &\multicolumn{6}{c}{$\alpha$=0.05}\\     H=2     &     95.0 &    75.3    &   75.7    &   79.5    &   72.0    &\\     H=3 & 95.6 &    87.0    &   87.3    &   87.6    &   85.2    &\\     H=4 & 95.0 &    91.6    &   91.9    &   90.3    &   90.2    & 93.3\\     H=5 & 95.2 &    93.5    &   93.7    &   91.3    &   91.8    & 94.3\\     H=6 & 94.9 &    93.8    &   94.1    &   92.6    &   92.8    & 94.7\\          &\multicolumn{6}{c}{$\alpha$=0.5}\\          H=2 & 95.0  &   91.4    &   91.2    &   79.5    &   99.9    &   \\     H=3 & 95.6  &   95.1    &   95.1    &   87.6    &   95.1    &   \\     H=4 & 95.0  &   94.8    &   94.8    &   90.3    &   93.5    & 95.5  \\     H=5 & 95.2  &   95.1    &   95.2    &   91.3    &   93.1    & 95.9  \\     H=6 & 94.9  &   94.8    &   94.8    &   92.6    &   93.4    & 95.5  \\     \hline     \end{tabular}     \end{table}     \end{frame}


title: Is there a way to change just the length of sentences / formulas?

text: I've made a document, but I've got a problem: Some formulas made out of fractions and roots look really small on the pdf-file. The formula is right, but the height of it makes some things almost unreadable. like:               $\sqrt{5 + \frac{(\frac{360}{\beta} \cdot \sin \beta) - \beta}{180-\beta}}$      So i just want the height of some formulas to change, not the whole text? Somebody knows how?


title: Proper way to use greek letters in an English document

text: I typically use LaTeX to write chemistry & physics documents with a lot of equations. I often will reference terms and variables and such in the text of my document. Typically I just do this by writing `$\gamma$`, but someone just pointed out to me that this prevents such characters from being copied out of the resulting PDF. I could go lookup a greek alphabet and past the character into the text file, then italicize it, but this seems painfully slow to say the least. Is there a better way of putting such characters into my document quickly other then using math-mode? I am already using               \usepackage[UTF8]{inputenc}     \usepackage[T1]{fontenc}     \usepackage{lmodern}      Which is the advise I've seen for making non-math mode text copy correctly. I'm using PDF(la)TeX if it makes a difference. As the discussion in the comments has shown, I have to specify: I'm on Windows 7, using Adobe Reader X v10.1.1.


title: Beamer: Reuse incremental overlay number from list item?

text: I'm using an item list with the overlay specification `<+(1)->`. For one of the items, I want a text after the item list to be uncovered simultaneously with the item. How can I achieve that?               \begin{frame}          \begin{itemize}[<+(1)->]     \item First item     \item ...     \item An item somewhere in the middle of the list     \item ...     \item Last item     \end{itemize}          Some text to be synchronized with the item in the middle of the list          \end{frame}      _Note:_ Although the text I want to be uncovered simultaneously with the list item is currently located after the list, I may decide to move it to before the list.


title: Install fonts to compile with LuaLaTeX

text: I would like, if possible, use the same font that the document http://www.h-k.fr/publications/data/Maths_pour_Physique___Chapitre_13.pdf to compile my files with LuaLaTeX. I first tried this `\usepackage[no- math]{fontspec} \usepackage[urw-garamond,uppercase = upright]{mathdesign}` for the body of the document, but the output pdf is empty ("The file is damaged and could not be repaired").               \documentclass[a4paper,12pt]{article}     %\usepackage[charter,uppercase = upright]{mathdesign}     \usepackage[urw-garamond,uppercase = upright]{mathdesign}     \usepackage{garamondx}     \usepackage[no-math]{fontspec}     \usepackage{luacode,luatextra,luaotfload}     \usepackage[frenchb]{babel}     \usepackage{amsmath,mathrsfs,amsthm}     \usepackage{titlesec,titletoc}     \setlength{\parindent}{0pt}     \makeatletter     \newcommand{\@classe}[1]{}     \newcommand{\classe}[1]{\gdef\@classe{#1}}     \newcommand{\@typedevoir}[1]{}     \newcommand{\typedevoir}[1]{\gdef\@typedevoir{#1}}     \newcommand{\@numerodevoir}[1]{}     \newcommand{\numerodevoir}[1]{\gdef\@numerodevoir{#1}}     \AtBeginDocument{\section{\@typedevoir\space\no\@numerodevoir}}     \titleformat{\section}[frame]      {\normalfont}      {\footnotesize\enspace\itshape\@classe\enspace--\enspace Le \@date\enspace}      {10pt}      {\fontspec[          Path = /home/fab/.fonts/,          Extension =.ttf,          Ligatures = TeX]     {zapf-humanist-601-bold-bt-1361502197}\Large\scshape\bfseries\filcenter}     \makeatother     \newtheoremstyle{exa}       {\topsep}{\topsep}       {}       {0pt}       {\strut\bfseries}       {}       {\newline}       {\rule[0pt]{1mm}{1mm} \thmname{#1}\thmnumber{\textup{#2}}          \thmnote{\textnormal{(#3)}}}       \textnormal{(#3)}}}       \theoremstyle{exa}       \newtheorem{ex}{Exercice}       \typedevoir{Devoir surveillé de Mathématiques}       \numerodevoir{1}       \date{22 août}       \classe{Seconde 2}       \begin{document}       \begin{ex}       Soit ABC un triangle et $\mathscr{C}$ son cercle circonscrit, M est le       point de $\mathscr{C}$ diamètralement opposé à A et N le point       d'intersection de $\mathscr{C}$ avec la perpendiculaire à $(BC)$ passant        par A.            Montrer que les droites $(MN)$ et $(BC)$ sont parallèles.      \end{ex}      \end{document}


title: Creating custom tabularx

text: I am trying to create a new environment in order to change the layout for tabularx, since the original is not looking like it should. I want the picture to be on the right side wrapped by the text. My idea was to create a new environment with new commands inside to align everything as I want, maybe someone has some tips for me how to do this, and how to structure everything? Thanks in advance...   My code is:               \documentclass[a4paper,12pt,oneside]{article}     \usepackage[dutch]{babel}  %Quotes won't work without babel     \usepackage[utf8]{inputenc}   %This is very important!     \usepackage[T1]{fontenc}          \usepackage{graphicx}     \usepackage[pdfborder={0 0 0}, breaklinks=true, pdftex=true, raiselinks=true]{hyperref}     %\usepackage{tabularx}     \RequirePackage{mypackage}          %\newcolumntype{Y}{>{\raggedright}X}          \begin{document}     \section{Description}     \begin{tabularx}%{\linewidth}{|Y|Y|}\hline          \multicolumn{}{}{some text}     \begin{itemize}     \item  Fixing     \item  Remastering     \item  Converting     \item  Control     \end{itemize}     % &      \begin{center} \resizebox{10cm}{!}{\includegraphics{picture.png}}\\\            \textit{picturedescription}\end{center}     %\tabularnewline \hline     \end{tabularx}     \end{document}      At the moment it is working like this, but i want to get it working without commenting anything out, or in case change some commands into my own. In addition my custom package looks like this, I want to do all the layouting there:               \NeedsTeXFormat{LaTeX2e}[1994/06/01]     \ProvidesPackage{mypackage}[2012/11/20]          \newenvironment{tabularx}{%         \begin{center}         \end{center}     }              \renewcommand{\multicolumn}{}     \endinput


title: How to draw a paraboloid in TikZ?

text: I am trying to draw a paraboloid using the following code:               \documentclass[border=5mm]{standalone}          \usepackage{tikz}     \usetikzlibrary{calc}          \begin{document}          \begin{tikzpicture}[scale=1,yscale=.5]          \draw (0,0) arc (180:0:2);     \draw ({2-sqrt(3)},1) arc (180:0:{sqrt(3)});     \draw ({2-sqrt(2)},2) arc (180:0:{sqrt(2)});     \draw (1,3) arc (180:0:1);          \draw (0,0) arc (-180:0:2);     \draw ({2-sqrt(3)},1) arc (-180:0:{sqrt(3)});     \draw ({2-sqrt(2)},2) arc (-180:0:{sqrt(2)});     \draw (1,3) arc (-180:0:1);          \draw (0,0) parabola bend (2,4) (4,0);     \draw ({2-sqrt(2)},{-sqrt(2)}) parabola bend (2,4) ({2+sqrt(2)},{sqrt(2)});          \draw ({2-sqrt(2)},{-sqrt(2)}) node [below] {0};     \draw [->]({2-sqrt(2)},{-sqrt(2)}) --++ (5,5);     \draw ({2-sqrt(2)},{-sqrt(2)}) --++ (-2,-2);     \draw [->]({2-sqrt(2)},{-sqrt(2)}) --++ (-3,3);     \draw ({2-sqrt(2)},{-sqrt(2)}) --++ (3,-3);          \end{tikzpicture}          \end{document}      Below is the result: ![enter image description here](http://i.stack.imgur.com/XkK8L.png) However, I cannot figure out how to draw the outline of the paraboloid. I also need to colour each horizontal band. Or, is there a better way to do this?


title: Unexpected conditional branch with \ifdim

text: I have a problem with the following code:               \newtoks\sectoks     \sectoks={\noindent}          \newtoks\subsubjectstyle     \subsubjectstyle={\emitsectglue 1\the\sectoks}          \newtoks\postsectoks     \postsectoks={\par\smallskip\noindent\kern-1sp\hskip1sp}          \long\def\subsubject#1\par{%       {\the\subsubjectstyle#1}\the\postsectoks}          \def\emitsectglue#1{%       \ifdim\lastskip=1sp         \nobreak       \else         \vskip0pt plus#1\baselineskip         \penalty-\numexpr#1*100+50\relax         \vskip0pt plus-#1\baselineskip         \vskip#1\baselineskip       \fi}          \long\def\blockquote#1\eol{%       \emitsectglue 1       \begingroup         \raggedright\narrower\noindent #1         \smallskip       \endgroup\noindent}          \tracingall          \subsubject       The following subsubject will choose the first if's true-branch.          \subsubject       But the following blockquote will not. Why is that?          \blockquote       Be conservative in what you send, liberal in what you receive     \eol          \bye      When using the `\subsubject` command followed by another `\subsubject`, the macros work as expected and do not add the vertical glue & negative penalty. However, when using the exact same code with another command, all of a sudden the right `\if`-branch doesn't get selected. I don't understand why is that.


title: Tikz: using external images as building blocks.

text: I would like to create a custom vector drawing in Inkscape and then use it many times in many tikz pictures. Is it possible?   Should I use PDF or SVG or other output from Inkscape?   How to use external vector image in Tikz node?   How to define anchors / dimensions(bounding box)?


title: Change item and subitem text colour in beamer lists

text: I am using `Montpellier` theme for `beamer` presentation. I need to change the item and subitem text colors. I also need to make the subitem text italics. How do I do that?


title: Enumerate list - numbers with prefix

text: How to make enumerate list format numbers like this: > REG/001 (content) > > REG/002 (content) > > REG/003 (content) I already managed to do the following:               \begin{enumerate}[label=\textbf{REG/\arabic*},leftmargin=*]     \item content     \end{enumerate}      using               \usepackage{enumitem}      but I don't know how to add leading zeros.


title: Mimic mathjax behavior on undefined control sequences

text: I recently posted something on math.stackexchange.com, and was astonished by the behavior of the auto-renderer on undefined sequences. Instead of stopping the compilation right here, it would display in the rendered text the name of the sequence in red, and just carry on processing the rest of the document. Needless to say, such a feature could prove incredibly useful for some usages of *TeX. One simple example is live-texing lecture notes, where a lot of spelling mistakes are likely to appear, but where one will prefer a successfully-compiled, badly-rendered document to a perfect, but half-compiled document. The `\--nonstopmode` option of `pdflatex` already offers some kind of such behavior, but then that's the opposite problem : the document is too well compiled, and the only way to find the errors is to either carefully proof- read the document, or to search through the log file. Hence the question: is there a way to get latex to replace "Undefined control sequence" errors with simple warnings, and in that case print the name of the faulty macro verbatim (with its arguments, expanded or not) in red (for example)? Or is it something too deeply buried in the core features of *TeX or mathjax, which would require to build a brand new engine? ![Example](http://i.stack.imgur.com/x6JUC.png)


title: Weird \nocite{*} behaviour with bibtex & beamer

text: I'm using BibTeX together with latex beamer and have a weird issue: the entries of my BibTeX file look like this one:                   @inproceedings{DBLP:conf/latin/BenderF00,           author    = {Michael A. Bender and                Martin Farach-Colton},           title     = {The {LCA} Problem Revisited},           booktitle = {LATIN},           year      = {2000},           pages     = {88-94},           ee        = {http://dx.doi.org/10.1007/10719839_9},           crossref  = {DBLP:conf/latin/2000},           bibsource = {DBLP, http://dblp.uni-trier.de}         }          @proceedings{DBLP:conf/latin/2000,          editor    = {Gaston H. Gonnet and                       Daniel Panario and                       Alfredo Viola},          title     = {LATIN 2000: Theoretical Informatics, 4th Latin American                       Symposium, Punta del Este, Uruguay, April 10-14, 2000,            Proceedings},          booktitle = {LATIN},          publisher = {Springer},          series    = {Lecture Notes in Computer Science},          volume    = {1776},          year      = {2000},          isbn      = {3-540-67306-7},          bibsource = {DBLP, http://dblp.uni-trier.de}          }      using `\cite{DBLP:conf/latin/BenderF00}` together with                   \begin{frame}[allowframebreaks]{Bibliography}         \begin{scriptsize}          %\nocite{*}  // commented out!!!!!!!!          \setbeamertemplate{bibliography item}[text]          \bibliographystyle{alpha}          \bibliography{literatur}         \end{scriptsize}         \end{frame}      gives me: > [BFC00] Michael A. Bender and Martin Farach-Colton. The LCA problem > revisited. In Gaston H. Gonnet, Daniel Panario, and Alfredo Viola, editors, > LATIN, volume 1776 of Lecture Notes in Computer Science, pages 88–94. > Springer, 2000. which is perfect. But when i don't cite `\cite{DBLP:conf/latin/BenderF00}` explicitly and use `\nocite{*}` instead i have the following result: > [BFC00] Michael A. Bender and Martin Farach-Colton. The LCA problem > revisited. In Gonnet et al. **[GPV00]** , pages 88–94. **with a new reference to [GPV00]** and so on... How can i avoid that behaviour? I'm pleased about every advice


title: table notes out of margin

text: Hi I am using TeXnicCenter, I have problems by writing notes at the foot of a Table:   by using `threeparttable`:               \documentclass[12pt,psfig,a4,final]{article}       \usepackage{threeparttable}        \begin {table}[htbp]        \centering        \begin{threeparttable}        \caption{Friendship Network Groups: Tie Strength\tmark[a] Comparison}        {\scriptsize{        \begin{center}        \begin{tabular}{p{.07\textwidth} p{.06\textwidth} p{.06\textwidth} p{.06\textwidth} p{.06\textwidth} p{.06\textwidth} p{.06\textwidth}}\\           \toprule       \multirow{2}{*}{\textbf{Network}} & \textbf{Mean} & \textbf{$\mathlarger{\sum}{w_e}$} &  \textbf{$Sd$} & \textbf{$n$} & \textbf{$u$} & \textbf{Median}\\\        & $\hat{w}_{e_{ij}}$ &  &  &  &  \\       \midrule       \textbf{$g_f$} & 4.24 & 16590 & 1.90 & 580 & 3910 & 4 \\[1.0em]       \textbf{$g_{fS}$} & 4.34 & 4954 & 1.77 & 156 & 1151 & 4 \\[1.0em]           \textbf{$g_{fM}$} & 4.24 & 8525 & 1.95 & 418 & 1986 & 5 \\[1.0em]           \bottomrule        \begin{tablenotes}       \item[a]{Here is estimated tie strength as the value $w_e$ given by $i$ of the edge $ij$ through a likert scale.}       \end{tablenotes}       \end{tabular}        \end{center}       }}       \end{threeparttable}       \end{table}        The problem is that the note stays just in one colum and if it is a longer one, it does go up-down vertically (just in one column!) and not horizontally.   This may have an easy solution, but I have not found it jet! Does someone have a solution?


title: Book's class page margins in ClassicThesis

text: how can obtain the normal page margins (that provided from book class) on the ClassThesis? i have try to comment this commands in ClassicThesis.sty                        {% Palatino or other                 \PackageInfo{classicthesis}{A4 paper, Palatino or other}                 \areaset[current]{336pt}{750pt} % ~ 336 * factor 2 + 33 head + 42 \the\footskip               \areaset{336pt}{761pt} % 686 (factor 2.2) + 33 head + 42 head \the\footskip 10pt                      \setlength{\marginparwidth}{7em}%                \setlength{\marginparsep}{2em}%            }%


title: \setstretch and fixme package. How to reset stretch to 1 for fixmes?

text: I am using               \usepackage{setspace}     \setstretch{1.5}     \usepackage[status=draft,layout=margin]{fixme}      in my document preamble. The notes are therefore also set with 1.5 stretch. How can I avoid that?


title: Drawing Flow Chart with LaTeX

text: TikZ can draw flow chart but I want some sort of a graphical tool where I can create flowchart in an interactive way and then somehow export to LaTeX. Any advice? I am not a geek and the interface should not be too intimidating. An on-line tool or an off-line package will be fine, but it should run on Linux.


title: KPfonts small caps italic

text: I don't seem to make `kpfonts` work with small caps italic text. This is my MWE:               \documentclass{article}     \usepackage{kpfonts}          \newcommand*{\mytext}{Testing 1 2 3 testing!}          \begin{document}       \textsc{\itshape\mytext} % this doesn't work            \textit{\scshape\mytext} % this doesn't either     \end{document}      This is what I get: ![enter image description here](http://i.stack.imgur.com/TtAIa.png) Any ideas?


title: Errors in table, missing \endgroup inserted <inserted text> \endgroup

text: Below is the latex example i am working on, it should generate two tables. One table with two columns, the other table is just one column. And i have a software program it makes any word in the table looks like _#blabla_ replaced as _\textcolor{green}{$#blabla$}_ But i got errors, what is the problem? ![asd](http://i.stack.imgur.com/dys24.png) It should produce a file looks like this ![enter image description here](http://i.stack.imgur.com/QHH5Q.png) Below is the original code, I am not sure if the formatting has any influence for the result, so I just copied it here directly, and posted the picture above.               \documentclass[a4paper,leqno,twoside]{article}     \usepackage[utf8]{inputenc}          \title{dd}          \usepackage{amsmath}     \usepackage{color}     \usepackage{tabu}     \usepackage{longtable}     \usepackage{supertabular}          \begin{document}          \maketitle          \section{Introduction}     it is a introduction          \subsection{it is a subsection}          \begin{longtabu} to \textwidth {|>{\footnotesize}X[1 , p]| X[3 , l ]| } \hline     \endfirsthead         \multicolumn{2}{c}         \endhead         \endfoot    \hline         \endlastfoot           sdf \newline  \newline  & >>Text \newline asdfl \textcolor{green}{$\#lksdjf$} asldkj.\newline          \end{longtabu}         \begin{longtabu} to \textwidth {>{\normalsize}X[p ] }             \endfirsthead    \multicolumn{1}{c}         \endhead         \endfoot         \endlastfoot    >>Text \newline >>Text         \end{longtabu}     \end{document}


title: How much space is a line, vertically?

text: How much space is a line, vertically ? E.g. something like "1.5em" ?


title: Define a special verbatim commmand

text: To learn more about Plain TeX, I try to define a special verbatim command `\verb{code}`, which puts `code` inside braces. When there is no braces in `code`, It's easy. But when there are some **balanced** braces inside `code`, it seems hard to define this command. Furthermore, there may be some `\\{` or `\\}` inside `code`. How could I define this? For example, I want `\verb{a{b\\}c\\{d}e}` to produce `a{b\\}c\\{d}e`.


title: BibTeX is not parsing my entries correctly

text: I'm trying to figure out how to work with BibTeX. The thing is, I think I've followed all I can make of BibTeX tutorials in the net still to no avail. So far, here's how my bibliography looks like (biblio.bib)               @ARTICLE{bovik_clark_geisler,     author="Alan Conrad Bovik, Marianna Clark and Wilson Geisler",     title={Multichannel texture analysis using localized spatial filters},     journal={IEEE Transactions on Pattern Analysis and Machine Intelligence},     volume={12},     year={1990},     pages={55-73},     }          @ARTICLE{marcos     author="Maria Sheila Angeli Marcos, Maricor Soriano and Caesar Saloma",     title={Classification of coral reef images from underwater video using neural networks},     journal={Optics Express},     volume={13},     number={22},     pages={8766-8771},     }          @ARTICLE{weldon     author="Thomas Weldon, William Higgins and Dennis Dunn",     title={Efficient Gabor Filter Design for Texture Segmentation},     journal={Pattern Recognition},     volume={29},     number={12},     pages={2005-2015},     }          @MISC{zhang     author="Dengsheng Zhang, Aylwin Wong, Maria Indrawan and Guojun Lu",     title={Content-based Image Retrieval Using Gabor Texture Features}     }      I've figured (correct me if I'm wrong) that BibTeX is using regular expressions to parse entries and its different contents, to produce the appropriate reference format depending on the specified style (ACM, IEEE, etc.). However, I can't figure out what this format is. I'm following the compilation process at http://www.bibtex.org/Using/ , but upon calling on `bibtex`, I get errors like               I was expecting a `,' or a `}'---line 25 of file biblio.bib     ...     Warning--to sort, need author or key in weldon     Warning--empty author in weldon     Warning--empty title in weldon     Warning--empty journal in weldon     Warning--empty year in weldon      Where line 25 is the author attribute of weldon. Same goes for marcos and zhang though zhang is only complaining for the key. What's a key then? How come I don't see it specified in online resources? I've also tried changing the curly braces in the attributes to quote marks but it still complains of the same errors. Is there anything I'm missing, any tutorial you may recommend to make this work? # UPDATE: So, I figured out, thanks to Wikipedia, that BibTeX parses using _and_ and not commas. However, I still get the same error. The output, before I changed them to _and_ , was something like               [1]          [2]          [3]          [4] Citation entry for bovik_clark_geisler      But Bovik and Clark's name isn't delimited at all and looks like one name. After reading Wikipedia, they got separated with a comma but still the same output (blank 1-3, citation for bovik_clark_geisler at 4).


title: Is it possible to use a non-monospace font in verbatim environments?

text: I know it runs contrary to a lot of the point, but I'd like to experiment with different fonts to see which I like better. I can't seem to find any reference to a way to do this, if it's at all possible. * * * Edit: I ended up using the following. It's better, but not quite to the point of what I'd like               \RequirePackage[T1]{fontenc}     \RequirePackage[scaled]{beramono}      The big problem I have is that I find the monospace fonts to be too spaced out, making text take up a lot more space on the line. If anybody has any other suggestions that would be great.


title: LaTeX Error: Too deeply nested

text: I'm trying to debug a > Too deeply nested error in LaTeX. It's not an obvious case of too deeply nested itemize or enumerate items. It's happening far into the document, at a `\begin{quote}`. Is there a way to get LaTeX to tell which counter(s) are causing the problem?


title: Alternative numbering for theorem

text: I am using `thmtools` as a front end to `amsthm` and I have a definition environment as follows.               \declaretheorem[         style=mydefinitionstyle,         name=Definition,         numberwithin=chapter     ]{definition}      And what I want is another environment, say called `definitionAlt`, which would be used to give an alternative definition of the one just given, i.e., it uses the same number/counter as the definition just given but adds an "a" (or "b" or whatever), without incrementing the counter, and cross-referencing would still work.               \begin{definition}     \label{def:main_definition}     This is a definition which is numbered 1.1     \end{definition}          \begin{definitionAlt}     \label{def:alt_definition}     This is an alternative definition to the preceding one, which is automatically numbered 1.1a     \end{definitionAlt}      I have seen similar questions such as What’s the most straightforward way to typeset theorems etc. when the numbering is entirely manual? which does some manual theorem numbering, but I cant find an answer that does exactly what I want. Doe anyone have any suggestions?


title: Is it possible to make Beamer pause-handout mode compatible with SageTeX?

text: I use SageTeX with Beamer for my classes. I need two sets of pdf files, one with the pause for the screen and the handout one to save trees. I use MikTeX under Windows. To get both I start with two lines               %\documentclass[handout]{beamer}     \documentclass{beamer}      and comment out one of them. To use SageTeX I need to compile my file with a Linux virtual machine a second time to get the result of my computation such as               \[2+2={\sage{2+2}}\]      I expect to do it only once for the two versions but I encounter the following difficulty with the following MWE:               %\documentclass[handout]{beamer}     \documentclass{beamer}     \usepackage{sagetex}% To compute with SAGE within the text     \begin{document}     \begin{frame}[fragile]{Minimum Working Example}          \textit{Compatibility SageTeX - Beamer in HandOut - Pause mode}          This is the first slide with a first Sage operation     \[2+2={\sage{2+2}}\]     Result should be $4$! and we pause          \pause          \          We add some new text before the next slide          \          \end{frame}          \begin{frame}[fragile]{Minimum Working Example}          \textit{Compatibility SageTeX - Beamer in HandOut - Pause mode}          A new Sage operation on this second slide     \[3+3={\sage{3+3}}\]     Result should be $6$!          Beamer requests three inline formulas from SageTeX in pause mode but only two in Handout mode.          So the result is six in pause mode and four in handout mode.     \end{frame}     \end{document}      As described in the MWE, it does not seem to be possible to compile in SageTeX only once to get the paused and handout document. If you compile in pause form, Beamer will request three inline formula from sageTeX , twice the 2+2 (because of the pause) and once the 3+3 so when you Texify again in Handout form, Beamer needs only the first two inline formulas and gives 3+3=4! If you start with the handout form then Beamer requests only two formulas from SageTeX. It works Ok for the handout of course but when you want the paused version,you get 2+2=4 before the pause, 2+2=6 after the pause and on the second slide you get 3+3=?? It is a lose-lose situation. Of course I can solve it compiling both versions but then it makes the handout option useless because I need to change the name of the TeX source to avoid recompiling with SageTeX. ![p.1 of the handout version with paused SagetEx compilation](http://i.stack.imgur.com/fvY85.jpg) ![p.2 of the handout version with paused SagetEx compilation](http://i.stack.imgur.com/eqWot.jpg)


title: TikZ: Thales circle, radius unknown

text: Is there any way to make a circle knowing just two points on its diameter? Here's the complete problem I'm trying to solve: there is a segment MN (but points M and N are calculated as an intersection of other lines so I don't know their coordinates) and I want to construct the Thales circle (to find some right angles). I've found some code for drawing part of the circumference, so I've modified it to               \coordinate (S_MN) at ($(M)!.5!(N)$);     \draw[red] (S_MN) let \p1 = ($(N)-(S_MN)$) in  ++({veclen(\x1,\y1)},0) arc (0:360:({veclen(\x1,\y1)}););      (I'm using the `calc` library), but the compilation runs into errors.               !package Tikz error: + or - expected. See the tikz documentation...      (Yeah, I admit that I dont know much about the TikZ construction I've used, unfortunately.) I've also tried to compute the radius by `$(M) - (N)$` (which I've seen somewhere), but without success. ---- edit --- (...) BUT I think I've found the problem - I've tried to remove packages form head of the doc and check if there is a problem -> once `\usepackage[czech]{babel}` package is %commented, everything runs normally               \documentclass[12pt,a4paper]{report}          \usepackage[czech]{babel}          \usepackage[cp1250]{inputenc}     \usepackage{graphicx}     \usepackage{amsthm}     \usepackage{amsmath}     \usepackage{epstopdf}          \usepackage{tikz}     \usetikzlibrary{calc}     \pgfmathsetseed{\pdfuniformdeviate 10000000}          \begin{document}     \begin{tikzpicture}     \draw[style=help lines] (0,0) grid[step=1cm] (3,3);     \coordinate (M) at (2,1);     \foreach \x in {1,...,5}{     \node (N) at ({random(0,3)},{random(0,3)}) {here};     \coordinate (S_MN) at ($(M)!.5!(N)$);     \draw[red] (S_MN)      let \p1 = ($(N)-(M)$),\n1 = {0.5*veclen(\x1,\y1)} in  ++(\n1,0) arc (0:360:\n1);     }     \end{tikzpicture}       \end{document}      * * * **edit2: I've used percusse's construction with cjorssen's "update" and it worked really fine. But now I've realized one problem - how coud I find that intersection with other line I've been talking about in first post? (summary: I've circle made by your way. There is also line, say, AB, which intersects the circle in two points. How could I detect them to draw that right angle for which I'm using Thales circle? Thanks in advance**


title: Table of contents, chapter titles, section titles, etc.. are centered and chapter titles start in the middle of the page

text: I am beginning my Thesis and this is only the second time I've used TEX. I'm not sure how to get my Table of Contents, Chapter Titles, Sections and Subsections to appear on the left indent. In addition, the table of contents and chapters all begin near the center of the page instead of at the top. Is this just how the thesis document is default? If so, is there a way to change these defaults? Here is my code (pulled all the packages from a friend's dissertation. not sure which are actually needed or not):               \documentclass[print,double]{thesis}     \usepackage[latin1]{inputenc}     \usepackage[english]{babel}     \usepackage{amsmath}     \usepackage{amsfonts}     \usepackage{amssymb}     \usepackage[sort&compress]{natbib}     \usepackage{comment}     \usepackage{subeqnarray}     \usepackage{color}     \usepackage{longtable}     \usepackage{graphicx}     \usepackage{mathrsfs}     \usepackage{multirow}     \usepackage{enumitem}     \usepackage{cancel}     \usepackage{colortbl}     \usepackage[table]{xcolor}     \usepackage[       backref=page,       unicode=true,       urlcolor = blue,       colorlinks = true,       citecolor = blue,       linkcolor = blue]{hyperref}          %\setlength{\bibsep}{0.0pt}      %\bibpunct{[}{]}{,}{n}{}{;}           \begin{document}          \frontmatter          \title{Title}     \author{Name}     \date{Date}          \maketitle          \tableofcontents          \mainmatter          \chapter{Introduction}         \section{Motivation}          \chapter{Thin Film Optical Semiconductors}         \section{Material Properties}         \section{Synthesis}             \subsection{Substrate Cleaning}             \subsection{Reactive Ion Sputtering}             \subsection{Atomic Layer Deposition}          \chapter{Thin Film Characterization}         \section{Profilometry}         \section{X-Ray Diffraction}         \section{Sepctroscopic Ellipsometry}          \chapter{Ultrafast Laser Induced Damage}         \section{Kelydsh Theory}         \section{Photoionization}             \subsection{Multiphoton Ionization}             \subsection{Tunnelling Ionization}         \section{Avalanche Ionization}          \chapter{Matlab Modeling of Absorption Phenomena in Optical Semiconductors}         \section{Parameterization Techniques}         \section{Multiphoton Versus Tunnelling Ionization}         \section{Electron Density Rate Equations}          \chapter{Analysis}         \section{Model Simulation Versus Experimental Results}             \subsection{Gallinium Arsenide}          \chapter{Future Work}         \section{Evolve Model to include Recombination Methods}         \section{Aquire Experimental Data for Additional Optical Materials}         \section{Fitting of Parameters within Model to Experimental Data}          \end{document}      Appreciate any help someone may provide!!! -Chris


title: Using \[ \] in text

text: I am currently writing out an introduction to LaTeX file for some coworkers. How would I insert `\\[` `\\]` as regular text and not starting math mode? FYI: The reason why I'm asking this is because I plan on surrounding them with `\texttt`.


title: Minted PHP with line numbers

text: I've added `minted` and inserted PHP code. The result is that I must put `< ?php` and `?>` tags to get the code colored, then if I want to display line numbers it starts from `< ? php` line like below:               1 < ? php     2 echo "abcd"     3 ? >      I don't want to have line numbers in the first and the last line and I don't like to put it all in the same line. this is the code from minted documentation:               \r\renewcommand{\theFancyVerbLine}{\sffamily     \textcolor[rgb]{0.5,0.5,1.0}{\scriptsize     \oldstylenums{\arabic{FancyVerbLine}}}}     \begin{minted}[linenos]{php}     <?php     echo "abcd"     ?>     \end{minted}      Anyone have solution for this? **SOLUTION** we use the firstline and lastline options to hide the tags.


title: Is it possible to add \chapter after a few \part's at the same level of hierarchy?

text: Consider the following code:               \documentclass{scrbook}     \usepackage[bookmarks, bookmarkstype=toc]{hyperref}          \begin{document}          \tableofcontents          \chapter{Introduction}          \part{First part}         \chapter{First chapter}         \chapter{Second chapter}          \part{Second part}         \chapter{Third chapter}         \chapter{Fourth chapter}          \chapter{Conclusion}          \end{document}      In the resulting PDF both tables of contents (the one produced by `\tableofcontents` and the list of PDF bookmarks) have the following hierarchy:               Introduction     First part     - First chapter     - Second chapter     Second part     - Third chapter     - Fourth chapter     - Conclusion      Is it possible to put 'Conclusion' at the same level of hierarchy with 'Introduction', 'First part' and 'Second part'?


title: Multipage "dcases" environment

text: I am using the "dcases" environment of the "mathtools" package with nested other environments inside it. The whole expression does not fit on a single page and so I am wondering if it is possible to spread it over more than page. `\displaybreak` inside the "dcases" environment does not work (as its use seems to be prohibited there). To just make 2 different "dcases" on each page is no so solution either because I do not want the bracket to close on the first page and reopen on the next. The main bracket of the "dcases" should end with a vertical line on the first page and start with an aligned vertical line on the next page. What I like to do is               \begin{dcases}       ... several cases ....       -> Suggest page break but continue this environment on the next page <-       .. more cases ...     \end{dcases}      EDIT: I tried to add pictures but it seem that my "reputation" is too low to do so - you can find the pictures here and here. The picture shows the first page and the beginning of the second page - the gray part is the space between the two pages. The "cases" bracket should span both pages.


title: style odd and even nodes near coords differently

text: I'm using this style definition in the preamble:               \pgfplotsset{       base/.style={         ymin=0,         xtick=data,         nodes near coords,       }     }          \pgfplotsset{       random/.style={         ybar=3pt,         bar width=10pt,         enlarge x limits=0.08,         tick label style={font=\small},         every axis y label/.style={at={(-0.06,0.5)},rotate=90},         every node near coord/.append style={font=\scriptsize},         every axis legend/.append style={font=\small},         legend style={at={(0.5,-0.2)},           anchor=north,legend columns=-1, style={font=\small}},         legend style={/tikz/every even column/.append style={column sep=0.4cm}}       }     }      to create the following tikzpicture:               \begin{tikzpicture}       \begin{axis}[           width=12.6cm,           base,           random,           ylabel={\%},           symbolic x coords={Google,Facebook,YouTube,Yahoo,Baidu,Wikipedia,QQ,Twitter,Taobao,Amazon},           x tick label style={rotate=45, anchor=east}         ]     \addplot coordinates {           (Google,1.33)           (Facebook,1.83)           (YouTube,1.06)           (Yahoo,1.38)           (Baidu,0)           (Wikipedia,3.13)           (QQ,0)           (Twitter,1.47)           (Taobao,1.00)           (Amazon,1.09)         };         \addplot coordinates {           (Google,1.59)           (Facebook,2.16)           (YouTube,2.76)           (Yahoo,1.61)           (Baidu,0)           (Wikipedia,3.13)           (QQ,0)           (Twitter,2.41)           (Taobao,3.19)           (Amazon,1.33)         };         \legend{Separated, Cascaded}       \end{axis}     \end{tikzpicture}      and as you can see for the wikipedia entry, the node numbers overlap: ![output image](http://i.stack.imgur.com/NgdjH.png) the font size is already small, so i would like not to deacrease it. how can I style differently the odd and even columns' nodes? thanks!


title: Is it possible to write text in 3D plots? (And newbie questions on 3d graphics)

text: I'm making my first steps in 3D graphics in LaTeX. What I got so far is this image ![output](http://i.stack.imgur.com/QBjDm.png) In the backgorund one can sense a small `D_g`; the blue domain should be denoted with that. The red surface should just be a function that lives on the blue domain, so what I'm looking for, as in the 2D case, is whether it is possible do write on the blue surface. If this is not the case, is there an easy way to reconstruct such a graphic in the classical TikZ way? What is important here, besides the blue domain, is that the red surface has to be steep near some of the boundaries. How does one determine the best viewing angle? Is it just trial and error, and experience? Once again: I only need a qualitative sketch of the situation in the image. Even, the axis are not really important. I'm grateful for any comment. Edit: An additional question: What is the best way to optimize 3D colored graphics for bw output? * * * ## Code               \documentclass{minimal}     \usepackage{tikz}     \usepackage{pgfplots}     \begin{document}     \begin{tikzpicture}     \begin{axis}[view={60}{45}]       \addplot3[surf, samples=30,domain=0:1, y domain=0:1,opacity=1,       color=blue]     (x,{y*((1/4)*cos(deg(2*pi*x))+1-x/2)},0);            \node (A) at (0,1,1) [above] {$D_g$};         \addplot3[surf, domain=0:1, y domain=0:1,color=red,opacity=0.5]       (x,{y*((1/4)*cos(deg(2*pi*x))+1-x/2)},{(1+sqrt(y)-sqrt(1-y))});      \end{axis}     \end{tikzpicture}     \end{document}


title: Combining Multiple Files Nicely

text: I am fairly inexperienced with Latex and would like to create a special document of paper summaries. I am trying to create a large number of files where each file contains the summary of a technical paper and then combine them into a single file. The summary file would have something like:               \papertitle{The Paper Title}     \dateread{January 1, 2013}     \begin{summary}      Technical summary here $for fun$.     \end{summary}     \cite{halespiles2008}      And the main paper would pull out a few of these fields and display them nicely with perhaps a custom command (and I was thinking about using something like this to loop through files, but whatever). What is the most appropriate command to input such a file and display only its title and summary and be sure its citation ends up in the references section?


title: align also ylabels in a TikZ matrix

text: I am aligning many `pgfplots` with the TikZ `\matrix`. The axes are automatically aligned correctly. How can I also align the `ylabels` automatically (because I am changing plotted data very often)?               \usepackage[latin1]{inputenc}     \usepackage[USenglish]{babel}          \usepackage{tikz,pgfplots}     \pgfplotsset{compat=newest}          %%%%%%%%%%%%%%%%%%%%%%%%%%%%          \begin{document}          \begin{figure} [H]         \centering         \begin{tikzpicture}         \matrix{            \begin{axis}[width=0.45\textwidth,height=0.45\textwidth,ylabel={ylabel 1}]                \addplot {x^2};             \end{axis}             \\             \begin{axis}[width=0.45\textwidth,height=0.45\textwidth,ylabel={ylabel 2}]                 \addplot {-(x^2)};             \end{axis}             \\            };     \end{tikzpicture}     \end{figure}          \end{document}      Not desired output: ![not desired](http://i.stack.imgur.com/IlzFe.png) Desired output: ![desired](http://i.stack.imgur.com/BBJOH.png) Again I had a close look at:   * Manual for `pgfplots` by Christian Feuersaenger   * Manual for `TikZ` & `PGF` by Till Tantau * * * ## edit thanks! Especially the the finer control is really good. Unfortunately now -- with this `ylabel absolute` -- linebreaks with `\\\` or `\newline` aren't possible anymore :-( Is there a trick? not working code:               \documentclass{article}     \usepackage{tikz,pgfplots}     \pgfplotsset{     compat=newest,      /pgfplots/myylabel absolute/.style={%       /pgfplots/every axis y label/.style={at={(0,0.5)},xshift=#1,rotate=90},       /pgfplots/every y tick scale label/.style={        at={(0,1)},above right,inner sep=0pt,yshift=0.3em        }        }      }          %%%%%%%%%%%%%%%%%%%%%%%%%%%%          \begin{document}          \begin{figure}     \centering     \begin{tikzpicture}     \matrix{        \begin{axis}[width=0.45\textwidth,height=0.45\textwidth,ylabel={ylabel  1 first line\\second line},myylabel absolute=-60]            \addplot {x^2};         \end{axis}         \\         \begin{axis}[width=0.45\textwidth,height=0.45\textwidth,ylabel={ylabel 2 first line\\second line},,myylabel absolute=-60]             \addplot {-(x^2)};         \end{axis}         \\        };     \end{tikzpicture}     \end{figure}          \end{document}


title: Improve footnotes citation with Biblatex

text: While using `biblatex` I want to display the full citations in footnotes, and in the text the following format `author (year)^citation number`. For now I am using as it is in the MWE. Is there a better way to achieve the same format and also for the citations for the same book, use the same number, i.e., use just `1` in the `rappaport:2002` instead of `1` and `3`?               \documentclass{article}          \usepackage[backend=biber,style=footnote-dw]{biblatex}     \addbibresource{\jobname.bib}          \usepackage{xparse}     \DeclareDocumentCommand{\myfootcite}{ O{} O{} m }{\citeauthor*[#1][]{#3}~(\citedate[][]{#3})\cite[][#2]{#3}}          \usepackage{filecontents}     \begin{filecontents*}{\jobname.bib}     @book{rappaport:2002,         title={Wireless Communications: Principles and Practice},         author={Theodore S.~Rappaport},         publisher={Prentice Hall},       month=jan,         year=2002,       isdn={978-0130422323},       edition=2,     }          @book{goldsmith:2004,         title={Wireless Communications},         author={Andrea Goldsmith},         publisher={Stanford University},         year=2004,         url={http://www.cs.ucdavis.edu/~liu/289I/Material/book-goldsmith.pdf},         urldate={2013-06},     }     \end{filecontents*}               \begin{document}     Test1~\myfootcite[p.~165][]{rappaport:2002}     \par     Test2~\myfootcite[p.~230][]{goldsmith:2004}     \par     Test3~\myfootcite[][]{rappaport:2002}     \end{document}


title: LaTeX + Biblatex: Author and Special Char result in an "Extra }"

text: maybe someone can help me ... here is a short example: # file: sample.tex               \documentclass[a4paper]{book}     \usepackage[english]{babel}     \usepackage{csquotes}     \usepackage[style=alphabetic,bibstyle=alphabetic,backend=bibtex8]{biblatex}     \bibliography{biblio}     \begin{document}     Referenz zu \cite{HA:02}.     \printbibliography     \end{document}      # file: biblio.bib               @phdthesis{HA:02,       author = {{H{\aa}rd af Segerstad}, Ylva},       //author = {{H\r{a}rd af Segerstad}, Ylva},       //author = {{Hard af Segerstad}, Ylva},       //author = {H{\aa}rd af Segerstad, Ylva},       year = {2002},     }      **Expected** first name = Ylva last name = Hård af Segerstad Therefore, the label should be "[Har02] Ylva Hård af Segerstad" (see example 1 and 2). **Result (Sample 1 and 2)**               ! Argument of \OT1\r has an extra }.     <inserted text>                  \par      l.33 \endentry      Sample 3 and 4 works, but   * **sample 3** : last name is "Hard af Segerstad" but without an "å"   * **sample 4** : works with "å" but the the last name seems to be "Segerstad" because the label is "[Seg02] and not "[Har02]" **How can the last name grouped as "Hard af Segerstad" with an "å"??**


title: Write18: LuaTeX has an encoding problem, where XeLaTeX does not

text: `xelatex` (with option `\--shell-escape`) compiles this document fine:               \documentclass{article}     \usepackage{fontspec}     \begin{document}     LuaTeX is not     \immediate\write18{echo uber | sed y/u/ü/ > inc.tex}     % or: \directlua{os.execute("echo uber | sed y/u/ü/ > inc.tex")}     \input{inc.tex}.     \end{document}      `lualatex` (with `\--shell-escape`) returns this error:               sed: -e expression #1, char 7: strings for `y' command are different lengths      Obviously LuaLaTeX has an encoding problem and treats “ü” as two characters, where XeLaTeX gets things fine. Is there any workaround?


title: Place text on left margin

text: Maybe I'm just not searching for the right thing, because this seems to be something that TeX would just 'have something' for. Is there any way to simply return to the left margin (or originating margin, in the case of bidi documents)? I want functionality similar to how `\llap` behaves when you use it on the start of a line. (This might be a bit of a red herring though, since interfacing with TeX's computed linebreaks is, in my experience, very messy.) ### MWE               \documentclass{article}          \newcommand\mystery[1]{%         Should be placed on left margin: \llap{#1}}          \begin{document}     Hello. This is some text to push this out to the side: \mystery{test}     \end{document}      I'd like to be able to put any hbox into `\mystery`, if possible.


title: How to move section number and section into margin with scrbook without titlesec

text: I need to move section number and section heading as shown in figure below. ![enter image description here](http://i.stack.imgur.com/OO1Va.jpg) MWE               \documentclass[12pt,twoside=semi]{scrbook}     \usepackage{blindtext}          \usepackage[showframe]{geometry}     \geometry{paperwidth=170mm, paperheight=240mm, left=42pt, top=40pt, textwidth=280pt, marginparsep=20pt, marginparwidth=100pt, textheight=560pt, footskip=40pt}          \begin{document}          \blinddocument          \end{document}