title: How to maintain data to be both implemented and documented (in a personal package)

text: I'm looking for the best strategy for maintaining, in a personal package, a (long) list of data that has to be defined in the implementation and to be documented in the documentation. Let me be more explicit with the following use case: in this personal package, I define some expressions that have to be translated either in French or in English. For this, I make use of the `translator` package and, hence, create a French and an English dictionaries with same keys and corresponding translations: French dictionary:               \ProvidesDictionary {mypackage}{French}     \deftranslation {abstract}{Résumé}     \deftranslation {draft}{Brouillon}      English dictionary:               \ProvidesDictionary {mypackage}{English}     \deftranslation {abstract}{Abstract}     \deftranslation {draft}{Draft}      I want these translations to appear in the package's documentation, for instance as a table that shows the correspondence between French and English, like this:               | Label    | FrenchValue | EnglishValue |     |----------+-------------+--------------|     | abstract | Résumé      | Abstract     |     | draft    | Brouillon   | Draft        |      I can achieve this in the following way:               % \iffalse meta-comment     %<*internal>     \def\nameofplainTeX{plain}     \ifx\fmtname\nameofplainTeX\else       \expandafter\begingroup     \fi     %</internal>     %<*install>     \input docstrip.tex     \keepsilent     \askforoverwritefalse     \generate{       \file{\jobname.sty}{\from{\jobname.dtx}{package}}       \file{French.dict}{\from{\jobname.dtx}{French-dict}}       \file{English.dict}{\from{\jobname.dtx}{English-dict}}     }     %</install>     %<install>\endbatchfile     %<*internal>     \generate{       \file{\jobname.ins}{\from{\jobname.dtx}{install}}     }     \ifx\fmtname\nameofplainTeX       \expandafter\endbatchfile     \else       \expandafter\endgroup     \fi     %</internal>     %<*package>     \NeedsTeXFormat{LaTeX2e}     \ProvidesPackage{\jobname}     %</package>     %<*driver>     \documentclass{ltxdoc}     \usepackage{fontspec}     \usepackage{\jobname}     \begin{document}       \DocInput{\jobname.dtx}     \end{document}     %</driver>     % \fi     %     % \section{Dictionaries}     %     % Translations are summarized in Table~\ref{tab:translations}.     % \begin{table}[hb]     %   \centering     %   \begin{tabular}{lll}     %     Label    & French Value & English Value \\\hline     %     abstract & Résumé       & Abstract      \\     %     draft    & Brouillon    & Draft     %   \end{tabular}     %   \caption{Translations}     %   \label{tab:translations}     % \end{table}     %     %\StopEventually{}     %     % \subsection{French dictionary}     %     %    \begin{macrocode}     %<*French-dict>     %    \end{macrocode}     %     % \begin{description}     % \item[Identification:]     %    \begin{macrocode}     \ProvidesDictionary{\jobname}{French}     %    \end{macrocode}     % \item[Translations:]     %    \begin{macrocode}     \deftranslation{abstract}{Résumé}     \deftranslation{draft}{Brouillon}     %    \end{macrocode}     % \end{description}     %     %    \begin{macrocode}     %</French-dict>     %    \end{macrocode}     %     % \subsection{English dictionary}     %     %    \begin{macrocode}     %<*English-dict>     %    \end{macrocode}     %     % \begin{description}     % \item[Identification:]     %    \begin{macrocode}     \ProvidesDictionary{\jobname}{English}     %    \end{macrocode}     % \item[Translations:]     %    \begin{macrocode}     \deftranslation{abstract}{Abstract}     \deftranslation{draft}{Draft}     %    \end{macrocode}     % \end{description}     %     %    \begin{macrocode}     %</English-dict>     %    \end{macrocode}     %     % \Finale      The problem is that is not easy to maintain if the list of translation is long. Hence I'm looking for a strategy to have a single input of the data (the translations), for instance as a `.csv` file, and to be able to both:   * define them with the right `translator` syntax,   * document them, for instance as a table. In the following MCE, I am able to do this with:   1. the `docstrip`'s `\generate` macro that lets me create a `.csv` file containing the data,   2. the `\newwrite`, `\immediate`, `\openout`, `\write` TeX macros that let me write in the external French and English dictionaries files,   3. the `csvtools` package that lets me loop the `.csv` file to:      * populate the external French and English dictionaries files,     * create in one go a table displaying the content of the `.csv` file, but I wonder if it is the best way of doing.               % \iffalse meta-comment     %<*internal>     \def\nameofplainTeX{plain}     \ifx\fmtname\nameofplainTeX\else       \expandafter\begingroup     \fi     %</internal>     %<*install>     \input docstrip.tex     \keepsilent     \askforoverwritefalse     \generate{       \file{\jobname.sty}{\from{\jobname.dtx}{package}}       \nopreamble\nopostamble       \file{translations.csv}{\from{\jobname.dtx}{translations}}     }     %</install>     %<install>\endbatchfile     %<*internal>     \generate{       \file{\jobname.ins}{\from{\jobname.dtx}{install}}     }     \ifx\fmtname\nameofplainTeX       \expandafter\endbatchfile     \else       \expandafter\endgroup     \fi     %</internal>     %<*package>     \NeedsTeXFormat{LaTeX2e}     \ProvidesPackage{\jobname}     %</package>     %<*driver>     \documentclass{ltxdoc}     \usepackage{fontspec}     \usepackage{\jobname}     \begin{document}       \DocInput{\jobname.dtx}     \end{document}     %</driver>     % \fi     %     % Translations are summarized in Table~\ref{tab:translations}.     % \begin{table}[hb]     %   \centering     %   \CSVtotabular{expressions.csv}{lll}{^^A     %     Label & FrenchValue & EnglishValue\\\hline^^A     %   }{^^A     %     \insertLabel &     %     \insertFrenchValue &     %     \insertEnglishValue\\^^A     %   }{^^A     %     \insertLabel &     %     \insertFrenchValue &     %     \insertEnglishValue^^A     %   }     %   \caption{Translations}     %   \label{tab:translations}     % \end{table}     %     %\StopEventually{}     %     %    \begin{macrocode}     %<*translations>     %    \end{macrocode}     %     % Store the translations in an external, .csv, file.     %    \begin{macrocode}     Label,FrenchValue,EnglishValue     abstract,Résumé,Abstract     draft,Brouillon,Draft     %    \end{macrocode}     %     %    \begin{macrocode}     %</translations>     %    \end{macrocode}     %     %    \begin{macrocode}     %<*package>     %    \end{macrocode}     %     % Load the csvtools package.     %    \begin{macrocode}     \RequirePackage{csvtools}     %    \end{macrocode}     %     % Prepare to write to external dictionary files.     %    \begin{macrocode}     \newwrite\frenchdict     \immediate\openout\frenchdict=French.dict     \newwrite\englishdict     \immediate\openout\englishdict=English.dict     %    \end{macrocode}     %     % Identify the dictionaries in their corresponding files.     %    \begin{macrocode}     \immediate\write\frenchdict{%       \unexpanded{\ProvidesDictionary}{\jobname}{French}%     }%     \immediate\write\englishdict{%       \unexpanded{\ProvidesDictionary}{\jobname}{English}%     }%     %    \end{macrocode}     %     % Use the translations.csv file to populate the dictionaries files (thanks to     % csvtools package).     %    \begin{macrocode}     \applyCSVfile{translations.csv}{%       \immediate\write\frenchdict{%         \unexpanded{\deftranslation}{\insertLabel}{\insertFrenchValue}%       }%       \immediate\write\englishdict{%         \unexpanded{\deftranslation}{\insertLabel}{\insertEnglishValue}%       }%     }     %    \end{macrocode}     %     %    \begin{macrocode}     %</package>     %    \end{macrocode}     %     % \Finale


title: how to get x,y and z components of a coordinate?

text: I would like to be able to use `x`, `y` and `z` components of a defined coordinate in `TikZ` to reuse the values somewhere else in my code. For example, let's have something like,               \coordinate (p1) at (-2.6,0.7,0);      I would like to do something like as below,               \coordinate (p11) at (p1_x,p1_y,12);      How can I do this?


title: Does macros get applied to the source code before compilation?

text: I wonder if this is true.   1. The latex compiler first run though the document, and search for all the macro declarations.   2. the compiler then go though the document, apply each macro as a string substitution.   3. The compiler compile the document that has applied all the macros. If this is true, then are there ways to get the output of the second step?


title: How do we Draw a Bird in LaTeX

text: Yes, it's that time of the month again. It's time for somebody to ask how we can draw X in LaTeX. This time I'm asking the question and X is a bird. The reason why I'm interested in this question is that drawing "non- geometrical" shapes is difficult. Addign symmetry makes it even more difficult and I'd like to see the different solutions that are used. I welcome any answers but I'm especially keen on birds with symmetry. All solutions have to be original. The following is a possible example of what I'm looking for. First the design, which is inspired by Escher, but based on an original idea: ![bird design](http://csweb.ucc.ie/~dongen/TeX-SX/11--12/bird-design.png) Next the LaTeX output: ![LaTeX output](http://csweb.ucc.ie/~dongen/TeX-SX/11--12/bird.png) Following the suggestion of @Hooked, I provide a possible solution below.


title: Coloring chapters and sections with respect to parts

text: I am using the book document class and I want to produce a document with several parts, chapters, sections, sections and subsections. I would like to make it easier for the reader by coloring everything with respect to parts. For instance, I would like:   * The title for Part A to be blue   * The chapter titles inside Part A to be blue   * All the heading for the chapter titles in Part A to be blue and then..   * The title for Part B to be red   * The chapter titles inside Part B to be red   * All the heading for the chapter titles in Part B to be red etc.. Would anybody be able to help with something like that? Thanks a lot in advance! PS. The beginning of my document looks like this:               \documentclass[11pt,letterpaper]{book}     \usepackage{amsfonts,amsthm,amssymb}     \usepackage[tbtags]{amsmath}     \usepackage{color}          \usepackage{fancyhdr}     \pagestyle{fancy}     \fancyhead[LE,RO]{\slshape\thepage}     \fancyhead[RE]{\slshape \leftmark}     \fancyhead[LO]{\slshape \rightmark}          \renewcommand{\thepart}{\Alph{part}}     \renewcommand{\thechapter}{\Roman{chapter}}


title: Prevent column break in multicolumn index

text: I am using `imakeidx` to generate a multicolumn index with `makeindex`. Here is an excerpt from my `.ind`:                 \item \BRbooktitlestyle {\BRepistlenumberstyle {1}Jean}                                \subitem \BRchapterstyle {2}\BRchvsep \BRversestyle {2} \dotfill                                 \textrm{18}                                                              \subitem \BRchapterstyle {4}\BRchvsep \BRversestyle {9}\BRvrsep \BRversestyle {10} \dotfill                     \textrm{18}         where `\BRfoo` are `bibleref` formatting macros. Unfortunately, the `\item` is at the bottom of a left column, so the `\subitems` get pushed to the right column: ![column break in index](http://i.stack.imgur.com/FozJj.png) Is there an equivalent to `\nobreak` which could be used here to prevent this behaviour, and how?


title: xticks steps using Pgfplots / dateplot

text: I am using `pgfplots` to plot the following diagram with monthtly data over 20 years. However, I am not quite satisfied with the labels on the x axis. I'd like to have steps of say 3 years (e.g. `1994, 1997, 2000, 2003, 2006, 2009, 2012`). Right now there are steps of 2 years and 3 years. Can anyone help? ![enter image description here](http://i.stack.imgur.com/K45bj.png)               \documentclass{article}        \usepackage{pgfplots}        \pgfplotsset{width=8cm,compat=newest}        \usepgfplotslibrary{dateplot}               \begin{document}          \begin{figure}[h!]        \begin{center}       \begin{tikzpicture}       \begin{axis}[           width=13cm, height=9cm,           date coordinates in=x,           xticklabel style={/pgf/number format/1000 sep=},           date ZERO=1993-01-01,           xticklabel={\year},               xmin={1993-01-01},               xmax={2013-11-01},               ymin=0.01,               ymax=30,               tick pos=left,                legend pos=outer north east,            legend cell align=left,            ]            \addplot table[x=year,y=greece] {data.csv};\addlegendentry{Greece}            \addplot table[x=year,y=portugal] {data.csv};\addlegendentry{Portugal}            \addplot table[x=year,y=ireland] {data.csv};\addlegendentry{Ireland}            \addplot table[x=year,y=italy] {data.csv};\addlegendentry{Italy}            \addplot table[x=year,y=spain] {data.csv};\addlegendentry{Spain}            \addplot table[x=year,y=belgium] {data.csv};\addlegendentry{Belgium}            \addplot table[x=year,y=austria] {data.csv};\addlegendentry{Austria}                \addplot table[x=year,y=france] {data.csv};\addlegendentry{France}                \addplot table[x=year,y=netherlands] {data.csv};\addlegendentry{Netherlands}                \addplot table[x=year,y=germany] {data.csv};\addlegendentry{Germany}             \end{axis}       \end{tikzpicture}       \end{center}       \end{figure}            \end{document}


title: Using doublequotes in bibtex fields and babel

text: I have autocreated (Mendeley - so editing by hand will be rendered useful on the next autocreation of the file) bib-files, which contain e.g. ". Unfortunately, those " are treated as the LaTeX instruction to e.g. add an additional point to a following i. What can I do to persuade LaTeX to "automask" them or something like this? The problem itself seem to be related to babel - but shorthandoff doesn't solve my problem :-(. test.tex:               \documentclass[10pt,a4paper]{article}     \usepackage[ngerman,english,german]{babel}  % deutschsprachig     \usepackage[utf8]{inputenc} % utf8 encoding     \usepackage[T1]{fontenc}    % Schriftkodierung     \usepackage{csquotes}     \usepackage[backend=biber, style=numeric-comp, language=english]{biblatex}     \addbibresource{lit.bib}          \begin{document}     I do cite\cite{Tsuzuki2012}.     \shorthandoff{"}     \printbibliography{}     \end{document}      lit.bib:               Automatically generated by Mendeley Desktop 1.10.3     Any changes to this file will be lost if it is regenerated by Mendeley.          BibTeX export options can be customized via Options -> BibTeX in Mendeley Desktop          @article{Tsuzuki2012,     annote = {in-depth discussion of the interactions},     author = {Tsuzuki, Seiji},     doi = {10.1039/c2pc90003c},     file = {:home/guntram/Dropbox/Uni/Literatur/Mendeley/pdf/Tsuzuki/Annual Reports Section C (Physical Chemistry)/Tsuzuki - 2012 - CH$\pi$ interactions.pdf:pdf},     issn = {0260-1826},     journal = {Annual Reports Section "C" (Physical Chemistry)},     keywords = {CH-pi,Methyl,Phenyl,bonding theory,hbb,review,theory,weak interactions},     language = {en},     mendeley-tags = {CH-pi,Methyl,Phenyl,bonding theory,hbb,review,theory,weak interactions},     month = may,     number = {1},     pages = {69},     publisher = {The Royal Society of Chemistry},     title = {{CH/$\pi$ \" interactions}},     url = {http://pubs.rsc.org/en/content/articlehtml/2012/pc/c2pc90003c},     volume = {108},     year = {2012}     }      The problem are the " in the title and the journal name which don't appear as such. pdflatex doesn't complain, biber yields: biber test               INFO - This is Biber 1.8     INFO - Logfile is 'test.blg'     INFO - Reading 'test.bcf'     INFO - Found 1 citekeys in bib section 0     INFO - Processing section 0     INFO - Looking for bibtex format file 'lit.bib' for section 0     INFO - Decoding LaTeX character macros into UTF-8     INFO - Found BibTeX data source 'lit.bib'     WARN - BibTeX subsystem: /tmp/zhImWwyF7r/lit.bib_7291.utf8, line 6, warning: 172 characters of junk seen at toplevel     INFO - Overriding locale 'de_DE.UTF-8' default tailoring 'variable = shifted' with 'variable = non-ignorable'     INFO - Sorting 'entry' list 'nty' keys     INFO - No sort tailoring available for locale 'de_DE.UTF-8'     INFO - Writing 'test.bbl' with encoding 'UTF-8'     INFO - Output to test.bbl     INFO - WARNINGS: 1      Anybody any idea on how I can change this behaviour on the LaTeX side?


title: Move ylabel with pgfplot

text: My ylabel is to far from ticks and I would like to make it closer. Especially ylabel of the right plots.               \begin{tikzpicture}          \begin{axis}[%     view={0}{90},     width=5.5cm,     height=4.5cm,     scale only axis,     xmin=0, xmax=148,     xlabel={iterations},     ymin=0, ymax=2500,     ylabel={number of infected nodes},     name=plot1,     legend style={at={(0.97,0.03)},anchor=south east,align=left,font=\tiny}]     \addplot [     color=mycolor1,     solid,     line width=0.5pt     ]     coordinates{      (0,0)(1,1261)(2,1261)(3,1261)(4,1231)(5,1231)(6,1231)(7,1231)(8,1230)(9,1422)(10,1421)(11,1421)(12,1394)(13,1234)(14,1415)(15,1415)(16,1415)(17,1413)(18,1366)(19,1345)(20,1414)(21,1411)(22,1411)(23,1415)(24,1415)(25,1415)(26,1414)(27,1413)(28,1421)(29,1419)(30,1419)(31,1422)(32,1422)(33,1417)(34,1416)(35,1422)(36,1423)(37,1418)(38,1421)(39,1422)(40,1422)(41,1423)(42,1421)(43,1421)(44,1423)(45,1423)(46,1420)(47,1423)(48,1422)(49,1423)(50,1421)(51,1422)(52,1418)(53,1421)(54,1409)(55,1423)(56,1408)(57,1420)(58,1403)(59,1418)(60,1422)(61,1418)(62,1423)(63,1423)(64,1420)(65,1422)(66,1422)(67,1423)(68,1422)(69,1423)(70,1423)(71,1421)(72,1422)(73,1421)(74,1423)(75,1422)(76,1423)(77,1422)(78,1420)(79,1422)(80,1422)(81,1422)(82,1423)(83,1423)(84,1423)(85,1420)(86,1422)(87,1423)(88,1419)(89,1415)(90,1419)(91,1422)(92,1418)(93,1423)(94,1422)(95,1421)(96,1418)(97,1421)(98,1423)(99,1419)(100,1420)(101,1422)(102,1422)(103,1422)(104,1422)(105,1421)(106,1421)(107,1419)(108,1421)(109,1422)(110,1422)(111,1421)(112,1421)(113,1423)(114,1423)(115,1423)(116,1423)(117,1423)(118,1421)(119,1422)(120,1423)(121,1415)(122,1422)(123,1421)(124,1418)(125,1423)(126,1419)(127,1420)(128,1418)(129,1422)(130,1423)(131,1421)(132,1423)(133,1415)(134,1423)(135,1420)(136,1420)(137,1422)(138,1423)(139,1420)(140,1422)(141,1422)(142,1422)(143,1423)(144,1420)(145,1422)(146,1421)(147,1420)(148,1422)      };     \addlegendentry{lower bound};          \addplot [     color=red,     solid,     line width=0.5pt     ]     coordinates{      (0,2318)(1,2317)(2,2317)(3,2317)(4,2312)(5,2310)(6,2309)(7,2308)(8,2307)(9,2309)(10,2306)(11,2306)(12,2304)(13,2297)(14,2232)(15,2226)(16,2217)(17,2212)(18,2248)(19,2240)(20,2175)(21,2191)(22,2190)(23,2179)(24,2173)(25,2152)(26,2121)(27,2120)(28,2143)(29,2150)(30,2071)(31,2091)(32,2023)(33,2006)(34,1957)(35,1959)(36,1955)(37,1892)(38,1943)(39,1910)(40,1901)(41,1861)(42,1856)(43,1886)(44,1890)(45,1869)(46,1916)(47,1838)(48,1801)(49,1865)(50,1833)(51,1829)(52,1861)(53,1808)(54,1812)(55,1889)(56,1806)(57,1800)(58,1780)(59,1776)(60,1780)(61,1813)(62,1801)(63,1728)(64,1755)(65,1754)(66,1795)(67,1685)(68,1682)(69,1734)(70,1721)(71,1831)(72,1698)(73,1658)(74,1612)(75,1692)(76,1680)(77,1633)(78,1622)(79,1692)(80,1594)(81,1702)(82,1663)(83,1616)(84,1655)(85,1769)(86,1655)(87,1704)(88,1668)(89,1705)(90,1563)(91,1578)(92,1587)(93,1608)(94,1603)(95,1581)(96,1617)(97,1502)(98,1661)(99,1665)(100,1740)(101,1588)(102,1541)(103,1571)(104,1599)(105,1533)(106,1559)(107,1619)(108,1582)(109,1533)(110,1641)(111,1502)(112,1535)(113,1594)(114,1577)(115,1595)(116,1539)(117,1658)(118,1614)(119,1466)(120,1552)(121,1580)(122,1498)(123,1589)(124,1602)(125,1586)(126,1460)(127,1505)(128,1438)(129,1485)(130,1458)(131,1625)(132,1476)(133,1458)(134,1460)(135,1433)(136,1475)(137,1547)(138,1463)(139,1475)(140,1444)(141,1428)(142,1505)(143,1484)(144,1468)(145,1451)(146,1621)(147,1489)(148,1422)      };     \addlegendentry{upper bound};          \end{axis}          \begin{axis}[%     view={0}{90},     width=5.5cm,     height=4.5cm,     scale only axis,     xmin=0, xmax=148,     xlabel={iterations},     ymin=0, ymax=70,     ylabel={blocking set size},     at=(plot1.right of south east), anchor=left of south west,     ]     \addplot [     color=blue,     solid,     line width=0.5pt,     forget plot     ]     coordinates{      (1,0)(2,1)(3,2)(4,3)(5,4)(6,5)(7,7)(8,8)(9,9)(10,10)(11,11)(12,12)(13,13)(14,14)(15,15)(16,16)(17,19)(18,20)(19,21)(20,22)(21,23)(22,23)(23,25)(24,25)(25,26)(26,27)(27,28)(28,29)(29,29)(30,30)(31,30)(32,33)(33,36)(34,35)(35,36)(36,38)(37,39)(38,39)(39,40)(40,41)(41,42)(42,42)(43,42)(44,44)(45,43)(46,45)(47,44)(48,45)(49,47)(50,47)(51,48)(52,46)(53,48)(54,49)(55,50)(56,50)(57,50)(58,52)(59,52)(60,52)(61,53)(62,52)(63,52)(64,52)(65,54)(66,54)(67,55)(68,55)(69,55)(70,57)(71,58)(72,58)(73,59)(74,57)(75,60)(76,58)(77,61)(78,60)(79,60)(80,61)(81,60)(82,61)(83,63)(84,60)(85,60)(86,61)(87,61)(88,61)(89,61)(90,61)(91,62)(92,62)(93,62)(94,62)(95,63)(96,62)(97,64)(98,62)(99,62)(100,65)(101,64)(102,64)(103,62)(104,64)(105,64)(106,64)(107,65)(108,64)(109,63)(110,65)(111,65)(112,66)(113,64)(114,65)(115,66)(116,66)(117,65)(118,65)(119,65)(120,66)(121,67)(122,65)(123,67)(124,65)(125,65)(126,66)(127,66)(128,67)(129,68)(130,68)(131,68)(132,68)(133,68)(134,68)(135,67)(136,68)(137,67)(138,68)(139,67)(140,68)(141,69)(142,68)(143,69)(144,68)(145,68)(146,67)(147,67)(148,67)(149,66)      };     \end{axis}     \end{tikzpicture}%


title: How to keep tables readable in code

text: What is the best practice for creating and updating tables in Latex? I am using Texmaker but I find it hard to update a table like adding entries or adding a column. I have to count entries which is kind of tedious. Is it better to first create a table in an excel type program and import it when finished? Example:               \begin{tabular}{|c|c|c|c|c|c|c|c|c|c|c|}     \hline      Study & Year & Method & • & • & • & • & • & o & Result num. & Result \\      \hline       • & • & autor & autor et al & autor. & autor & autor\cite{autor} &


title: How to include ConteXt version in document?

text: My question is exactly the same as this one: Include LaTeX version in document I want to include in my document: compiled with ConteXt version YYYY.MM.DD. Is it possible to do it automatically or I am stuck to do it manually?


title: biblatex: printing separate bibliographies

text: I'm using `biblatex` and I have it set up like this: In my bib file I have 3 sorts of entrys, online, booklet, and book. And in my thesis I want them printed separate like this:               \printbibliography[heading=subbibliography,title={Books},type=book, nottype=url, nottype=booklet, nottype=online]     \printbibliography[heading=subbibliography,title={Websites},type=online, nottype=book, nottype=booklet, nottype=url]     \printbibliography[heading=subbibliography,title={Misc},type=booklet]      For some reason this won't work, it still puts the websites where the books should be. And vice versa. The booklet thing does work though, it only shows my booklet entries there. I recently started using `biblatex` so this might be a stupid question.


title: Bibliography with different names and ordered by name

text: I would like to create two bibliographies with two different names. My two bibliographies are books.bib and articles.bib Doing :               \renewcommand{\refname}{References from Books}      after `\begin{document}` and then introducing the bibliograpy with :               \nocite*     \bibliographystyle{plain}      \bibliography{books} %      works for books.bib. I would like to the do the same thing with articles.bib and the title "References from articles". Moreover, I need items to be referenced in alphabetical order in both cases.


title: How to create a pre-processing command that accepts plain text and generates formatted text (based on configurable options)

text: Looking for the best way of creating a string-processing command in latex to achieve things like below:   * Given a long piece of normal text, and a set of keywords, automatically format the matching words inside the text (e.g. by adding \emph or \textbf etc..) based on some configurable options    * Given a long piece of normal text, convert each line into a list item (e.g. convert each \\ into an \item and enclose the whole inside \begin{itemize} etc... I am creating a style package that needs this feature to auto-format the plain text supplied by my package users (based on their keywords and other options supplied through command parameters etc.) What is the best approach? It looks like the \SearchList is only for xelatex. Interested in a generic implementation. Does latex have string replacement commands that help achieve this? Any existing packages or code samples would be of great help.


title: tikz setting font size to pts

text: I'm using tikz to create color boxes containing text. However I haven't been able to set font size within these boxes using pts. I found a snippet in this question that defines a `Boxed` command:               \newcommand{\Boxed}[2][]{%         % #1 = box draw/fill options         % #2 = text         \settowidth{\LengthOfText}{\mbox{#2}}%         \pgfmathsetlength{\LengthOfTextExceedingLineWidth}             {\LengthOfText-\linewidth}         \pgfmathsetlength{\TextWidth}{\LengthOfTextExceedingLineWidth > 0pt ? \linewidth : \LengthOfText}%         \begin{tikzpicture}[baseline, inner sep=2pt, outer sep=0]                 \tikzstyle{every node}=[font=\small]                 \node [text width=\TextWidth, #1] (Origin) {#2};                     (Origin.south west) rectangle (Origin.north east) ;         \end{tikzpicture}%     }      I've modified it a little, however using a `tikzstyle` I'm only able to set font to things like `\small`, `\tiny`, etc. I would like to set font size to 10pt.


title: How to customize Beamer "definition" environment?

text: I want to redefine the "definintion" block environment. From the original to this: `\begin{定理} 定理内容（theorem details) \end{定理}.` After a lot of test I notice there are some difference among Definitions, Theorems,Lemma block environment,and so on, such as itemization marker shape and color.I want replace definition with "定理“Any instructions will be appreciate,thanks advance. Here in the code:               \documentclass[mathserif,10pt]{beamer}      %\usecolortheme[named=Plum]{structure}      %\documentclass{beamer}     \usetheme{CambridgeUS}     \setbeamertemplate{navigation symbols}{}     %\setbeamertemplate{headline}{}     \setbeamertemplate{items}[square]     %\setbeamerfont{title}                    %\setbeamertemplate{footline}{}          \usepackage{CJKutf8}     %\usepackage{CJKspace}     %\usepackage{amsmath}     %\usepackage{latexsym,bm,amsmath,amssymb}          %\setbeamertemplate{navigation symbols}{}      \mode <presentation>          %\title[TINLPN]{There Is No Largest Prime Number}     %\author[赵]{赵moumou \\ \texttt{euclid@123.com}}     %\date[ISPN'80]{27th International Symposium of Prime Numbers\\}          \begin{document}          \begin{CJK}{UTF8}{gbsn}               %%     \title{专题Largest Prime Number}     \author[赵]{赵moumou \\ \texttt{euclid@tokoyo.edu}}     \institute[UMBC]{UMBCdjskfljadfl}     \date[2013-07-09]{27th International Symposium of Prime Numbers}     %%     %%第一个frame     \begin{frame}                    \titlepage     \end{frame}               %第二个frame     \begin{frame}       \frametitle{Frame名称}       \tableofcontents[pausesections]     \end{frame}               %About Section and Subsection     %\section{Motivation}     %\subsection{The Basic Problem That We Studied}               %%第三个frame%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \begin{frame}[t]       \frametitle{What Are Prime Numbers?}                   \begin{definition}{定理}         A \alert{prime number} is a number that has exactly two divisors.        \end{definition}         \pause       \begin{exampleblock} {例子}         \begin{itemize}         \item 2 is prime (two divisors: 1 and 2).           \pause         \item 3 is prime (two divisors: 1 and 3).           \pause         \item 4 is not prime (\alert{three} divisors: 1, 2, and 4).         \end{itemize}        \end{exampleblock}     \end{frame}          %%第四个frame%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \begin{frame}[t]     \frametitle{}     例题：\\     \small{$f'(x)=3x+89$}     已知$g(x)=x+\dfrac{1}{x}-\ln x$\\好题份额常量定积分历代快速就阿德理科sjdefdf     \end{frame}          \end{CJK}     \end {document}      Here is a screenshot about the relative frame by which I want to show "定理（theorem）“. ![enter image description here](http://i.stack.imgur.com/NRBM0.png)


title: How to top align text and image in table?

text: I am facing some problem in aligning (top-aligned) image and text in a table.               \documentclass[11pt,table,a4paper]{article}     \usepackage{array,ragged2e}     \usepackage{graphicx}     \usepackage[top=2cm, bottom=3cm,right=1cm, left=1cm, headsep=26pt]{geometry}     \usepackage[T1]{fontenc}     \usepackage{fancyhdr}     \usepackage[table]{xcolor}     \usepackage{sidecap}     \usepackage{longtable}     \usepackage{helvet}     \renewcommand{\familydefault}{\sfdefault}     \begin{document}                          % End of preamble and beginning of  text.     \arrayrulecolor{gray}     \begin{center}     \newcolumntype{M}[1]{>{\arraybackslash}p{#1}}      \renewcommand{\arraystretch}{2.0}\begin{longtable}{M{5cm}|M{6cm}|M{6cm}}     \hline     \rowcolor{gray}        \textbf{ Col1} &  \textbf{Col2} &  \textbf{Col3} \\ \hline      \vspace{0pt} \large{ABC} & \includegraphics[width=0.15\textheight, width=0.15\textwidth]{Europe_regions.png} \hspace{.1cm}    \includegraphics[width=0.15\textwidth]{male-female.png} &  \vspace{0pt} XYZ.       \\ \hline        \end{longtable}     \end{center}     \end{document}             % End of document.      ![enter image description here](http://i.stack.imgur.com/z4lJ3.png) How can i top-align image and text?


title: How can I tell LaTeX that an \input file is in a different encoding from inputenc?

text: I'm currently writing a .tex report with my wife. She's on a Windows machine and I'm running Linux over here; we've decided to encode our report in ISO-8859-1 (i.e., we use `\usepackage[latin1]{inputenc}` on the preamble). We're also generating lots of tables in R using `xtable()` and some other customized functions to output LaTeX. Whenever I sink an R output, I use this command: `sink(file("filename.tex", encoding = "ISO-8856-9"))`. There is, however, this one long table that contains lots of special characters. Whenever I try to sink this table as ISO I get this message:               Warning message:     invalid char string in output conversion        Even though it's just a warning, it prevents our LaTeX compiler from being able to correctly parse the command `\input{filename.tex}`. The workaround we have for this is using `encoding = "UTF-8"` in R, then opening the file on a text editor and saving it with ISO encoding. Then LaTeX compiles the file correctly with apparently all special characters. Is there a command by which I can tell LaTeX that a file I'm inputting has a different encoding from the main LaTeX file? In my mind, it would look something like this `\input[utf8]{filename.tex}` (but unfortunately `\input` or it's fellow `\include` don't take options).


title: pgfplots discarding xtick coordinates

text: I'm creating a several graphs with pgfplots. The problem I'm coming across is that some graphs do not have a value for the last coordinate as per the example below (and I want to keep the ticks on the x axis consistent).               \documentclass{standalone}          \usepackage{tikz}     \usepackage{pgfplots}          \begin{document}          \begin{tikzpicture}       \begin{axis}[xtick={1,2,5,10,20,50,100},xticklabels={1,2,5,10,20,50,100},unbounded coords=jump,xminorticks=false,yminorticks=false]         \addplot[smooth] coordinates {           (1.0000000000, 1.3562500000)           (2.0000000000, 1.2825000000)           (5.0000000000, NaN)           (10.0000000000, 4.2087500000)           (20.0000000000, 10.7962500000)           (50.0000000000, 91.7450000000)           (100.0000000000, NaN)         };       \end{axis}     \end{tikzpicture}               \end{document}      which produces: ![enter image description here](http://i.stack.imgur.com/LH7QR.png) Is there a way to force the x axis to include the tick and label for 100? The 'unbounded coords=jump' option does not help since there are no more lines to draw. Thanks


title: Double sum over i and j with i \neq j

text: I would like to represent a double sum with `i\neq j`. So I want two capital sigmas with text `i\neq j` underneath them. How can I achieve this?


title: Customize the way eqref works with tags

text: I'd like to have a version of `\eqref` that treats equations with a custom tag differently from the usual numbered equation. In particular, if I assign a tag to an equation, I'd like `\eqref` not to put parens around the reference. Below is an example.               \documentclass{article}     \usepackage{amsmath}     \begin{document}          \begin{equation}        \label{eq:normal}        a = b     \end{equation}     \begin{equation}        \label{eq:tagged}        y = max\{1,x\} \tag{$P(x)$}     \end{equation}          Equations \eqref{eq:normal} will display as "(1)" (i.e., with parens)     and \eqeref{eq:tagged} will display as "$P(x)$" (i.e., without parens).          \end{document}      How would I modify the `\eqref` command?


title: What's the proper way to write a vector with a single character subscript?

text: I've always(-ish) thought that the proper way to typeset a vector which is labeled by a letter with a single character subscript, like v1, was to set the arrow over just the letter, like `\vec{v}_1` (I realize the braces are superfluous here but I like to include them for clarity). But recently I have seen it argued that this is wrong, and that the proper way is to place the arrow over the combination of the letter and subscript, with `\vec{v_1}`. I have done this in the past but I consider the results of the former method to be better looking. Is there a standard recommendation to do this one way or another in the TeX world? Or is it a matter of personal preference? **EDIT:** to put the question another way, suppose you're proofreading a LaTeX document, and suppose that all the notation is clearly defined so that there is no ambiguity about what v-with-subscript-1-and-arrow-over-it means:   * If the author consistently writes `\vec{v_1}`, would you globally change it to `\vec{v}_1`?   * If the author consistently writes `\vec{v}_1`, would you globally change it to `\vec{v_1}`?   * Or neither of the above (i.e. it doesn't matter so respect the author's original preference)?


title: biblatex: Max names in alphabetic citation key

text: Is it possible to set the number of names to appear in a bibliography entry differently from the maximum number of names that appear in the citation key (using `alphabetic` style)? For example,               [ABCD06] Alice, Bob, Carol, and David. "Title", 2006.     [ABC+06] Alice, Bob, Carol, David, and Eve. "Title Revisted," 2007      This is how `alpha` behaves in BibTeX. With four authors, all are listed in both the entry and the citekey. With five or more, all authors are still listed in the entry but only the first three (with a +) are listed in the citekey. I played a little (without luck) with `maxnames`, `maxcitenames`, and `mincitenames` but figured it will be quicker to just ask.


title: need additional title in apa6

text: I am writing a short report and the title page has to look like this: > Short Report > > Reactions to ... > > Author   >  Affiliation I solved it q-n-d by using author as stand-in for "Reactions to..." , let affiliation empty (by using "`~`") and then used `\note` to enter author and affiliation. but by doing this, I only get "short report" on the first content page (repeat title). I would prefer to have "Reactions to...", so is there a way to put "Short Report" _above_ the regular title on the front page? or do I have to input the repeat title also manually? Of course I can add the code:               \title{Short Report }     \shorttitle{Stigma ...}     \author{Reaktionen auf ...}     \affiliation{~  }      \note{Henning \\ University of XyZ}       If I try a line break in `\title` i get various error codes like:               ! Argument of \@sect has an extra }.     <inserted text>     \par     l.80 \maketitle     I've run across a `}' that doesn't seem to match anything.     For example, `\def\a#1{...}' and `\a}' would produce     this error. If you simply proceed now, the `\par' that     I've just inserted will cause me to report a runaway     argument that might be the root of the problem. But if     your `}' was spurious, just type `2' and it will go away.      No idea what Texmaker wants to tell me here; a linebreak in `\note` works fine.


title: DVISVGM and PSTricks

text: EPS file conversion is not satisfactory with `dvisvgm` because labels are not displayed.                 \documentclass[a4paper,11pt]{article}       \usepackage{etex}       \usepackage[utf8]{inputenc}       \usepackage[T1]{fontenc}       \usepackage{lmodern}       \usepackage{mathtools,amsmath,amsfonts,amssymb,amsthm,mathrsfs,nccmath}       \usepackage{pstricks}       \usepackage{pstricks-add,pst-bezier,pst-tree,pst-sigsys,pst-grad,pst-all}       \usepackage[frenchb]{babel}       \begin{document}       \TeXtoEPS       \psset{xunit=4cm,yunit=2cm,algebraic=true,arrowscale=1.2}       \begin{pspicture}(-1.5,-3)(2.5,2.5)        \psgrid[gridwidth=0.6pt,subgriddiv=0,gridlabels=0,gridcolor=lightgray,xunit=0.25,yunit=0.5](-6,-6)(10,5)      \psaxes[linewidth=1pt,Dx=1,Dy=1,labels=none,ticksize=-3pt 0pt]{->} (0,0)(-1.5,-3)(2.5,2.5)      \psxTick[ticksize=-3pt](1.25){\frac{5}{4}}      \psxTick[ticksize=-3pt](0.666666666666){\frac{2}{3}}      \begin{psclip}      {\psframe[linestyle=none](-1.5,-3)(2.5,2.5)}      {\psplot[linewidth=0.8pt,plotpoints=2000]{0}{1.25}{6*x-3}}%      {\psplot[linewidth=0.8pt,plotpoints=2000]{0}{1.25}{1-(2-3*x)^2}}%      \end{psclip}      \psline[linestyle=dashed,dash=3pt 2pt](0,1)(0.666666666666,1) (0.666666666666,0)          \uput[dl](0,0){O}      \uput[d](1,0){I}      \uput[l](0,1){J}      \uput[ur](1.25,-2){$\mathscr{C}_{f}$}      \uput[ur](0.75,1){$\mathscr{C}_{g}$}      \uput[d](2.42,0){$x$}      \uput[l](0,2.35){$y$}      \end{pspicture}      \endTeXtoEPS      \end{document}       Compiled with this simple `Makefile`:                all:         latex fichier.tex         dvips -Ppk -V -E -o fichier.eps fichier.dvi         dvisvgm -E --libgs=/usr/lib/libgs.so.9 fichier.eps fichier.eps         gpicview fichier.svg


title: Draw ticks over external plot using pgfplots

text: I plotted a contour/surface plot with `gnuplot` using `set pm3d map` and want to include this picture via `\addplot graphics {...};`. When I match the plot area of the `axis` environment with the plot range of the gnuplot picture, the ticks from pgfplots are "behind" the plot and thus not visible anymore. Is there a possibility, to draw the coordinate system in the foreground, or do I have to turn the ticks to the outside of the plot? * * * The relevant part of the code should be:               \begin{tikzpicture}       \def\w {0.4*\textwidth};       \begin{axis}[           scale only axis,           width = \w,           height = \w,           xmin = 0.4,           xmax = 0.9,           ymin = -22.5,           ymax = 202.5,           scaled ticks = false,           xtick = {0.4,0.5,0.6,0.7,0.8,0.9},           xticklabels = {0.4,0.5,0.6,0.7,0.8,0.9},           xlabel = $\omega/\omega_p$,           ytick = {0,45,...,180},           yticklabels = {$0$,$\frac{\pi}{4}$,$\frac{\pi}{2}$,$\frac{3\pi}{4}$,$\pi$},           ylabel = angle $\varphi$ around center of sphere           ]         \addplot graphics[             xmin = 0.4,             xmax = 0.9,             ymin = -45,             ymax = 225,             xtick = {0.4,0.5,0.6,0.7,0.8,0.9},             ] {data/half.png};       \end{axis}     \end{tikzpicture}


title: BibTeX not in appearance order?

text: I have a `.bib` file. I am citing the references in the `.bib` file. However, the automatic numbering does not follow the same order as their appearance order. I have something like > My first reference is popping up very soon [1]. My second reference is > supposed to be 2, but it is 3 [3]. I am using the IEEE conference paper template, i.e.,               \documentclass[conference]{IEEEtran}      and I am not using any citation package. My reference section looks like               {\footnotesize     \bibliographystyle{unsrt}     \bibliography{paper}}      How can I fix it?


title: pgfplots: alignment and size of math in legend

text: The legend entries created by a more complex math formula as in this example are overlapping and the alignment to the lines is wrong.               \documentclass[]{scrbook}          \usepackage{pgfplots}     \usepackage{amsmath}          \begin{document}     \pgfplotsset{width=0.8\textwidth, height=0.6\textwidth}     \centering     \begin{tikzpicture}     \begin{axis}[scale only axis,samples=2000,              /pgfplots/enlargelimits=false,              legend style={legend pos=north west}]       \addplot[domain=0:30] gnuplot{5*exp(-((x-5*pi)/(2.5*pi))**2)*sin(2*x)+x};       \addplot[domain=0:30] gnuplot{x};       \legend{$f(x) = 5\exp\left(-\left(\dfrac{x-5\pi}{2.5\pi}\right)^2\right)                  \sin(2x) + x$,               $f(x)_\text{fit} = x$}     \end{axis}     \end{tikzpicture}     \end{document}      ![enter image description here](http://i.stack.imgur.com/EfesP.png)


title: Including a graphic in the contentsline of a Table of Contents

text: In a dictionary, I have the first page of each section — corresponding to a different letter of the alphabet — marked to appear in the table of contents, using the `titletoc` package:               \addcontentsline{toc}{section}{A}     ...     \addcontentsline{toc}{section}{B}      etc. This works just fine. However, this is a dictionary of a language with a non-Roman script, and when I try to include a graphic of the letters immediately after the Roman letters in the TOC:               \addcontentsline{toc}{section}{A \includegraphics{graphic_a.png}}     ...     \addcontentsline{toc}{section}{B \includegraphics{graphic_b.png}}      I get an error:               .tex:3412: TeX capacity exceeded, sorry [input stack size=5000].     \reserved@a ->\def \reserved@a                                     *{\@vspacer }\reserved@a      l.3412 ...tion}{A \includegraphics{graphic_a.png}}      The instruction `\includegraphics{graphic_a.png}` etc. works without problems in other contexts, but apparently it won't work in the `text` field of `\addcontentsline{toc}{type}{text}`. Perhaps only actual alphabet text is permitted there. Section 7.6. "Inserting a ﬁgure in the contents" of the Bezos documentation for `titlesec` and `titletoc` describes a way to insert a figure _before_ a TOC line using `\addtocontents` with `\protect`, but I haven't been able to adapt that information to what I am doing. Is there another way to accomplish my goal?


title: Need to remove blank page

text: I have a blank page in the middle of my document that I'm unsure how to remove. Beginning               \documentclass{article}     \usepackage[a6paper, top=1cm, bottom=1cm, left=1pt, right=1cm]{geometry}     \renewcommand{\familydefault}{\sfdefault}     \usepackage[table]{xcolor}     \usepackage{tabularx}     \usepackage{graphicx}      \DeclareGraphicsExtensions{.pdf,.jpeg,.png}          \newcommand{\tab}[1]{\hspace{.19\textwidth}\rlap{#1}}     \pagenumbering{gobble}          \begin{document}          {\bf \huge Pick List for Test Client}     \\          {\bf Prepared on Wed, 26 Mar 2014 15:13:33 -0400}     \\          \noindent\makebox[\linewidth]{\rule{2\paperwidth}{0.4pt}}     \\          {\large Total Orders: 6}       \\ \\            \def\arraystretch{1.3}%       \begin{tabularx}{\textwidth}{l !{\color{white}\vrule}!{\color{white}\vrule} X}         \rowcolor{black}         {\bf \large} & {\bf \large} \\       \rowcolor{black}        \textcolor{white}{\bf \huge Product} & \textcolor{white}{\bf \huge Quantity} \\         12345 - test SKU do not use & 33\\         SKU4 - test SKU do not use & 12\\         SKU3 - test SKU do not use & 14\\         SKU1 - test SKU do not use & 23\\         SKU5 - test SKU do not use & 6\\             SKU2 - test SKU do not use & 5\\     \end{tabularx}     \\ \\ \\           {\bf \large \hfill Picked By: \makebox[2.0in]{\hrulefill}}      \\ \\          {\bf \large \hfill Checked By: \makebox[2.0in]{\hrulefill}}               \newgeometry{left=0cm,top=0.2cm}     \includegraphics[scale=.225]{fake-label-easypost.png}       \restoregeometry          {\bf \huge PF Test}     \\ \\ \\          {\bf \large Packaging Slip}     \\          {\large Order \#: Test03.25.14-1}          {\large Order \#: Order Date: Mar 26th, 2014}     \\ \\           {\bf \large Ship To: }{\large Recipient Name}          \tab{\large 1234 Random Street}          \tab{\large City, ST, 12345-1234}          \tab{\large US}     \\ \\            \def\arraystretch{1.3}%       \begin{tabularx}{\textwidth}{l !{\color{white}\vrule}!{\color{white}\vrule} X !{\color{white}\vrule}!{\color{white}\vrule} l}         \rowcolor{black}         {\bf \large} & {\bf \large} & {\bf \large} \\       \rowcolor{black}        \textcolor{white}{\bf \large SKU} & \textcolor{white}{\bf \large Description} & \textcolor{white}{\bf \large Quantity} \\         12345 & test SKU do not use & 5\\     \end{tabularx}               \end{document}      Problem area               \newgeometry{left=0cm,top=0.2cm}     \includegraphics[scale=.225]{fake-label-easypost.png}       \restoregeometry      Source: https://gist.github.com/dasickis/aaa8937b38b349689814 * * * Edit: I got a solution that works so I added code-review tag. I know this code is hackish (understatement) and I'm wondering how I can improve it.


title: Why is unskip not working here?

text: I'm trying to define a macro to be used as follows:               \usepackage[normalem]{ulem}     \newcommand{\thesis}[1]{\uline{\ignorespaces #1\unskip}}     % underlining required by school - I know, I know          % later...          \thesis{       This is the beginning of a multi-line thesis statement.       I use one sentence on each line throughout my document.       Thus, the thesis is broken as in XKCD 1285.     }      The problem is that the `\unskip` doesn't gobble the final line break. If I add a comment (like `as in XKCD 1285.%`) then it works as expected, but isn't this what `\unskip` is supposed to do? The initial space is gobbled correctly. Without `\ignorespaces` there is an underlined space at the beginning, but `\ignorespaces` removes it. The `\unskip` is supposed to remove the underlined statement at the end, but doesn't. My understanding is that `\unskip` is kind of like `\ignorepreviousspace`. Is this correct? MWE:               \documentclass{article}     \usepackage[normalem]{ulem}     \newcommand{\thesis}[1]{\uline{\ignorespaces #1\unskip}}     \begin{document}     \thesis{       Foo.       Bar.       Baz.     } % comment at end of previous line gives desired output     \end{document}


title: How to make the table fill the entire horizontal space?

text: I want the table to fit the available horizontal space. How to fix this problem?               \documentclass[12pt]{article}     \usepackage[a4paper,hmargin=1cm,landscape,includemp,showframe]{geometry}     \usepackage{array}     \usepackage{xcolor}     \usepackage{helvet}     \pagestyle{empty}          \begin{document}          \begin{center}         \Huge\bfseries Mathematics and Physics Schedule     \end{center}          \noindent     \begin{tabular}{|>{\centering\arraybackslash}m{25mm}|*5{>{\centering\arraybackslash}m{\dimexpr\dimexpr\textwidth-25mm\relax/5\relax}|}}\hline     Time & Monday & Tuesday & Wednesday & Thursday & Friday \\\hline     16:00-16:30 &&&&&\\\hline     16:30-17:00 &&&&&\\\hline     17:00-17:30 &&&&&\\\hline     17:30-18:00 &&&&&\\\hline     18:00-18:30 &&&&&\\\hline     18:30-19:00 &&&&&\\\hline     \end{tabular}          \end{document}      ![enter image description here](http://i.stack.imgur.com/ioeLj.png)


title: Set Table width and separate some rows

text: I'm trying to make the table take the line width of the paper but I don't know how to do this. I want it to look like this: ![this](http://i.stack.imgur.com/2GZXG.png) However, it's appearing like this: ![this](http://i.stack.imgur.com/6grhu.png) This is the script I used:               \begin{table*}[htbp]       \centering       \caption{Add caption}         \begin{tabular}{rlrr}         \toprule         \multicolumn{1}{l}{\textbf{E}} & \textbf{A} & \multicolumn{1}{l}{\textbf{B}} & \multicolumn{1}{l}{\textbf{C}} \\         \midrule               & \textbf{q} & 0     & 0 \\         \multicolumn{1}{l}{\textbf{X}} & \textbf{w} & 0     & 0 \\               & \textbf{e} & 0     & 0 \\               & \textbf{r} & 0     & 0 \\         \multicolumn{1}{l}{\textbf{Y}} & \textbf{t} & 0     & 0 \\               & \textbf{y} & 0     & 0 \\               & \textbf{u} & 0     & 0 \\         \multicolumn{1}{l}{\textbf{Z}} & \textbf{i} & 0     & 0 \\               & \textbf{o} & 0     & 0 \\         \bottomrule         \end{tabular}%       \label{tab:addlabel}%     \end{table*}%


title: Error with inputenc and UTF-8 non-breaking space

text: This is a follow up to How to make non-breaking spaces (ties) in Org-mode that exports properly to LaTeX. One answer to the question is a solution that uses UTF-8 non-breaking spaces but these cause package errors even though the document compilation finishes. I have boiled it down to the following. The UTF-8 non-breaking space may not be possible to copy from the example. Therefore, it may have to be manually entered. In Emacs it can be entered with `C-x 8 Space`.               \documentclass{article}     \usepackage[utf8]{inputenc}          \begin{document}          e.g.~ example% non-breaking \240 space between ~ and example          \end{document}      This example gives the following error: > ! Package inputenc Error: Unicode char \u8: not set up for use with LaTeX. Note that there is an UTF-8 non-breaking space after the colon in that error message. How can fix this error? I use TeX Live 2011 updated (which I updated today).


title: Referencing equation counter value in custom float caption

text: I have used the `float` package to create an equation float, `eqfloat`, so I can add captions to equations. Within the `eqfloat` I used the equation environment to typeset the math. I want to keep the right hand arabic numbering within parentheses that is added by the equation environment but I also would like the `eqfloat` caption below the equation to use the same number as the equation environment. The following code achieves this by making the eqfloat use the same counter as the equation environment and then manually adjusting the equation numbering within each `eqfloat`. Is there a better way to make the `eqfloat` caption reference the current value of the equation environment counter? Is it possible to prevent the custom float environment from increasing the counter and only to reference the current value of the equation counter?               \documentclass[a4paper]{article}          \usepackage[margin=25pt, labelfont=bf]{caption}     \usepackage{amsmath, amsfonts, pifont, float, color, url}     \usepackage[pdftex, plainpages=false, pdfpagelabels, bookmarks=true]{hyperref}          \newfloat{eqfloat}{h}{eqflts}     \floatname{eqfloat}{Equation}     \makeatletter     \let\c@eqfloat\c@equation     \makeatother          \begin{document}         ...         \begin{eqfloat}             \begin{equation}                 E = mc^2             \end{equation}             \addtocounter{equation}{-1}             \caption{Equation caption here.}             \label{eq:example}         \end{eqfloat}          \end{document}


title: Custom command inside soul package's \hl

text: I'm having trouble with the `soul` package and its `\hl` command. The `soul` package's manual says I should not nest `soul` commands, which I didn't. `\textsc` works inside `\hl`. However, the following throws an `Argument of \name has an extra }` error:               \documentclass[a4paper,12pt,]{scrreprt}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage{soulutf8}     \usepackage{color}          \newcommand{\name}[1]{\textsc{#1}}          \begin{document}     % this one works     Hello \hl{\textsc{Calvin}}!          % this one will throw an error, with both soul and soulutf8     Hello \hl{\name{Calvin}}!     \end{document}      Am I missing something in the way that `\newcommand` works? Is this a known problem with the `soul` package? Any other suggestions for highlighting text - which may be longer and thus needs to be wrapped? Thanks for your reply.


title: Correct sort of bibliography

text: * Sorted by first author's last name.    * Works only from one author before works with other authors.   * If there is more than one work, then it needs to be like this: 2007a, 2007b,... Sort should be like this: Author A:   * Book1 2007   * Book2 2008   * Book 3 2006 other authors  Author B: ... The minimal working example I have sorts it first by year, then by author last name and sorts the works with other authors after. If I have multiple works from one author in one year it is correct in the text (shows 2007a etc) but not in the bibliography, shows: > Holson, Laura M. Gnome Core Apps. Oct. 28, 2013. URL :link.   >  — KDE Core Apps. Oct. 28, 2013. URL : link. The publisher is not shown when citing online articles.               \documentclass{report}     \usepackage[utf8]{inputenc}     \usepackage[ngerman,english]{babel} %bib Last language is main     \usepackage[babel,german=quotes]{csquotes} %bib     \usepackage[style=authoryear-icomp,sortcites,sorting=ynt,citetracker=true,bibstyle=verbose,backend=biber,maxnames=1,minnames=1,maxbibnames=99]{biblatex}     \AtEveryCitekey{\ifciteseen{}{\defcounter{maxnames}{99}}} %only show all authors     \DeclareNameAlias{sortname}{last-first} % std is last-first/first-last     %at the first occurrence     \renewcommand*{\multinamedelim}{\addslash} %replaces and/und with "`/"'     \renewcommand*{\finalnamedelim}{\addslash} %replaces and/und with "`/"'     \bibliography{projectthesis_lit.bib}          \linespread{1.3}     \sloppy%silbentrennung     \begin{document}     \nocite{*}     \printbibliography     \end{document}      projectthesis_lit.bib:               @ONLINE{gnomeApps,       title = {Gnome Core Apps},       author = {William Jon McCann},       year =     {2013},       month =    {10},       day = {28},       url = {https://wiki.gnome.org/action/login/Design/Apps}     }          @ONLINE{gnomeApps2,       title = {Gnome Core Apps},       author = {William Jon NcCann},       year =     {2013},       month =    {10},       day = {28},       url = {https://wiki.gnome.org/action/login/Design/Apps}     }     @ONLINE{gnomeAp23ps2,       title = {Gnome Core Apps},       author = {William Jon CcCann},       year =     {2013},       month =    {10},       day = {28},       url = {https://wiki.gnome.org/action/login/Design/Apps}     }          @ONLINE{gnom213eApps23,       title = {Gnome Core Apps},       author = {Laura M. Holson},       year =     {2013},       month =    {10},       day = {28},       url = {https://wiki.gnome.org/action/login/Design/Apps}     }          @ONLINE{gnom213eApps234,       title = {KDE Core Apps},       author = {Laura M. Holson},       year =     {2013},       month =    {10},       day = {28},       url = {https://wiki.gnome.org/action/login/Design/Apps}     }          @ONLINE{gnom213eApps2,       title = {Gnome Core Apps},       author = {Laura M. Holson and Miguel Helft},       publisher =    {MAMA},       year =     {2013},       month =    {10},       day = {28},       url = {https://wiki.gnome.org/action/login/Design/Apps}     }          @ONLINE{gnomeAp23423ps2,       title = {Gnome Core Apps},       author = {William Jon HeaCcCann},       publisher =    {Above the Crowd},       year =     {2013},       month =    {10},       day = {28},       url = {https://wiki.gnome.org/action/login/Design/Apps}     }          @ONLINE{sauce2,       title = {Gnome Core Apps},       author = {Bill Gurley},       publisher =    {Above the Crowd},       year =     {2013},       month =    {3},       day = {24},       url = {https://wiki.gnome.org/action/login/Design/Apps}     }


title: biblatex – sort by year AND month

text: > **Possible Duplicate:**   >  biblatex sorting by date I would like to sort my bibliography by year and month in reverse order. For example, a publication from Jan. 2011 should appear after one from Dec. 2011. Is there an easy way to do this?


title: How do I left-align entries in a matrix with \begin{matrix}?

text: I'd like to left align the -1 entry in the following matrix so that the 1s line up. Is there a way to get matrices to ignore signs in that way?               \begin{matrix}         1 & 1  \        1 & -1 \    \end{matrix}      Using `\flushright{-1}` doesn't seem to work.


title: How can I redefine (or alter) the bmatrix envrionment such that all entries are flushed right?

text: I've checked around here and have been unable to find anything that solves my problem. There are several other questions that ask similar things, but the solutions do not give a global way to apply the change. I've been using `\left[\begin{array}{rrr}...\end{array}\right]` for the longest time when typesetting matrices, but recently found `\bmatrix` to be much quicker to accomplish (almost) the same goal. The problem is that I don't like the fact that the entries are centered in their columns instead of flush right. Is there a way I can alter this behavior globally, or maybe `\renewenvironment{bmatrix}` so that I can mimic the behavior with an `array`, but use only `\begin{bmatrix}...\end{bmatrix}`? For example, I'd like the following two environments to look as close to the same as possible:               \left[\begin{array}{rrr}       x-y & 2 & 3n\\       2 & 4 & 2\\       a & x^2 & 2x^2-3     \end{array}\right]          \begin{bmatrix}       x-y & 2 & 3n\\       2 & 4 & 2\\       a & x^2 & 2x^2-3     \end{bmatrix}


title: Grid customized

text: I would like to build a grid such as the figure shown below where each grid point is surrounded by some of the two curves that describe below. First curve: an outline around the point forming a drawing of the symbol plus "+". See the figure below. Second curve: an outline around a drawing point forming the symbol minus "-". See the figure below. Question 1: How do I build a grid like the picture where I have a command to choose which of the above curves surrounds the grid point? Question 2: How do I assign color curves and points to the Grid? ![](http://i.stack.imgur.com/5C5ih.jpg) Question 3 How to connect a point in the Grid to a point up, down, left, right or in any diagornal? See figure below. ![](http://i.stack.imgur.com/sKgWz.jpg) Question 4 How to make a curve that surrounds many grids as shown below? ![](http://i.stack.imgur.com/FDke3.jpg)


title: Colored box around sentences

text: I want to have a colored box around the text/sentences and its width will be fixed to be 80% of the page width. I tried `\fcolorbox` but it can't break lines. It is possible to do it with _TikZ_ or is there a handy package available? Thx! ![enter image description here](http://i.stack.imgur.com/psfhr.png)


title: Latex makes some characters big

text: ![enter image description here](http://i.stack.imgur.com/WkEqE.png)Tried out the package for color coding Python code and when I did, the fonts in the entire document suddenly started acting weird. s, a, o and some other letters are typeset larger than others and the whole text just looks weird. Anyone got any ideas?               \documentclass{article}     \usepackage[swedish]{babel}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage{amsmath}     \usepackage{graphicx}          \usepackage[procnames]{listings}     \usepackage{color}          \begin{document}     \definecolor{keywords}{RGB}{255,0,90}     \definecolor{comments}{RGB}{0,0,113}     \definecolor{red}{RGB}{160,0,0}     \definecolor{green}{RGB}{0,150,0}          \lstset{language=Python,              basicstyle=\ttfamily\small,              keywordstyle=\color{keywords},             commentstyle=\color{comments},             stringstyle=\color{red},             showstringspaces=false,             identifierstyle=\color{green},             procnamekeys={def,class}}          \title{Python}     \author{Some guy}          \maketitle          \newpage          \section{Objektorientering}     Såhär skapar man en klass i Py:           \begin{lstlisting}     class Employee:         empCount = 0        # kommer shareas av alla instanser          def __init__(self, name, salary):         self.name = name         self.salary = salary         Employee.empcount += 1          def displayEmployee(self):         print "Name : " self.name, "Salary: ", self.salary     \end{lstlisting}     \lstinline|__init__| är klasskonstruktorn som anropas varje gång man skapar en ny instans.     \end{document}


title: XeTeX + Polyglossia: Incorrect presentation of Bengali glyph - how can I correct it?

text: I started using XeTeX with polyglossia for typesetting Bengali. I use the following command for turning on language-specific ligatures:               \newfontfamily\bengalifont[Script=Bengali]{FONTNAME}      Everything seems to work fine, except that if a consonant is followed by U+09CD (Virama) followed by U+09AF (Bengali letter Ya), I do not get the expected glyph in the output. The ligature is not formed for some reason. All other combinations seem to work. I have tried with multiple fonts, so I do not think it is a font issue. Here is a picture of the problem ![enter image description here](http://i.stack.imgur.com/NolxQ.png) Thanks a lot for your patience! Setup: MikTeX 2.9.4476 on 32-bit Windows 7


title: How to create a comma-separated list in LaTeX according to the number of elements in another list?

text: I have been looking for a way to create dynamically a comma-separated list consisting of `n` entries, all entries equal, defined by `\newcommand\mytext{species:}` (example) and `n` being the number of entries in `\newcommand\mylist`. `\newcommand\listtobegenerated` shows how it the defined list should look like. Is there some way to do it? I found this: Comma delimited lists , thinking that I might be able to modify it by changing the deletion to replacement, but the accepted answer's `\count@` and `\toks@` gave me errors, which I was not able to solve and thought that there must be some cleaner approach instead of using `\count@` and `\toks@`. Other answers to that question were for ConText and for expl3, and I'm looking for a LaTeX answer. So, how could I generate the content of `listtobegenerated` based on the content of `mytext` and the number of elements in `mylist`? Thank you :)               \documentclass[12pt]{article}     \usepackage[american]{babel}     \usepackage{graphicx}          \newcommand\mylist{Haliaeetus albicilla,Lagidium viscacia,Balaenoptera musculus,Panthera pardus orientalis,Human}     \newcommand\mytext{species:}          % this is the the list I attempt to generated based on the number of elements in mylist and the content of mytext:     \newcommand\listtobegenerated{species:,species:,species:,species:,species:}          % preamble:     \def\preamble{\expandafter\xpreamble\mylist,\relax,}     \def\xpreamble#1,{%     \ifx\relax#1%     \else     c%     \expandafter\xpreamble     \fi}          % tablestart:     \def\tablestart{%     \edef\temp{\noexpand\begin{tabular}{c\preamble}\noexpand\hline}%     \temp}          % listheadings:     \def\listheadings{%     \expandafter\xlistheadings\listtobegenerated,\relax,%     \expandafter\xlistheadings\mylist,\relax,%     \hline}          % xlistheadings     \def\xlistheadings#1,{%     \ifx\relax#1%     \expandafter\\     \else     &\textbf{#1}%     \expandafter\xlistheadings     \fi}          \begin{document}     \begin{table}     \scalebox{0.7}{     \tablestart     \listheadings     \end{tabular}     } % end scalebox     \caption{Caption goes here.}     \begin{enumerate}         \item Item number one.          \item Item number two.     \end{enumerate}     \end{table}     \end{document}


title: Latex cannot find `.sty` files

text: I am on a mac and I believe I am using MacTeX. I am getting errors of the sort:               File `fullpage.sty' not found.      When I run `locate fullpage.sty` I get               /usr/local/texlive/2013/texmf-dist/tex/latex/preprint/fullpage.sty      But when I run `kpsewhich fullpage.sty` I get nothing. I have already tried `sudo texhash` and `sudo mktexlsr` to no avail. I think the problem may be that I have two conflicting TeX Live versions installed—I recently installed QuTIP and I think during the process a basic version was installed via macports—but of this I am not certain. I have no idea how to proceed. I have two questions: How can I get LaTeX to find `fullpage.sty`? And, if someone can see the real cause of the above error or knows how to find it, how can I remedy the situation?


title: How do I use supertabular with my tabular code?

text: I'm trying to create a list of notation, but I've been unable to use `nomencl` as I would like so I'm using a table. I'd like the table to split as it goes over to the second column (the working example below doesn't have enough lines to split, but you get the idea). It would be nice if when it split it would also redo the table column titles at the top of the next column as well, is there any way of doing this? EDIT: I can see that supertabular may be the thing I need, how can I implement that code with it? It seems to not like `\columnwidth` and `\toprule`.               \documentclass[11pt, a4paper]{article}     \usepackage{multicol}     \usepackage[left=17.5mm,right=17.5mm,top=24.5mm,bottom=33.95mm]{geometry}     \usepackage{tabularx}     \usepackage{booktabs}     \usepackage{array}     \usepackage{supertabular}     \begin{document}     \begin{multicols*}{2}     \tablehead{\hline     Symbol&Description&Unit \hline}\\     \tabletail{\hline}\\     \begin{supertabular}{l l l}     $X$ &Description & $J\,kg^{-1}K^{-1}$ \\     $X$ &Description & $J\,kg^{-1}K^{-1}$ \\     $X$ &Description & $J\,kg^{-1}K^{-1}$ \\     $X$ &Description & $J\,kg^{-1}K^{-1}$ \\     $X$ &Description & $J\,kg^{-1}K^{-1}$ \\     $X$ &Description & $J\,kg^{-1}K^{-1}$ \\     $X$ &Description & $J\,kg^{-1}K^{-1}$ \\     $X$ &Description & $J\,kg^{-1}K^{-1}$ \\     $X$ &Description & $J\,kg^{-1}K^{-1}$ \\     $X$ &Description & $J\,kg^{-1}K^{-1}$ \\     $X$ &Description & $J\,kg^{-1}K^{-1}$ \\     $X$ &Description & $J\,kg^{-1}K^{-1}$ \\     $X$ &Description & $J\,kg^{-1}K^{-1}$ \\          \end{supertabular}     \end{multicols*}     \end{document}      I've also tried the following to get the table widths right, but then it doesn't use the second column of multicols.               {         p{\dimexpr.5\columnwidth-2\tabcolsep}         >{\centering\arraybackslash}p{\dimexpr.3\columnwidth-2\tabcolsep}         >{\raggedleft\arraybackslash}p{\dimexpr.2\columnwidth-2\tabcolsep}         }


title: Syntax for arara on texwork with preamble.tex as input file to be used for generating many different documents

text: I installed arara on windows and it is working properly as noted by running it from cmd shell. Is putting follwing syntax in a "template" preamble that I use as input file to generate multiple documents adequate to compile the document or I have to mention filename everytime in each tex file. I am using texwork. How can I make texwork automatically build the file as the file is changed ?               % arara: xelatex     % arara: xelatex     % arara: clean: { files: [ *.aux, *.bbl ] }     % arara: clean: { files: [ *.bcf, *.cod ] }      % arara: clean: { files: [ *.blg, *.lof ] }     % arara: clean: { files: [ *.lot, *.out ] }      % arara: clean: { files: [ *.toc, *.log ] }


title: Cannot determine size of graphic

text: I'm trying to include graphics in my Latex-file, which I compiled with latex+dvipdf on OS X. Latex however returns this error: "Cannot determine size of graphic" My graphic is exported from PowerPoint, so I have tried both .pdf and .png. I get the same errors for both. Sample code that doesn't work:               \begin{figure}[htb]     \begin{center}     \leavevmode     \includegraphics[width=0.8\textwidth]{graph.png}     \end{center}     \end{figure}      If I have to manually set some measurements of the image, please tell me how I can find out those measurements. I need the image to take up about 80% of text width and be centered. Thanks.


title: Error including a .png: Cannot determine size of graphic

text: I have a little problem: I am not able to put an image in my document. This is how I start:               \documentclass[a4paper,12pt,titlepage]{report}          \usepackage{fontenc}     \usepackage[italian]{babel}     \usepackage[utf8x]{inputenc}     \usepackage{graphicx}               \begin{document}          .          .          .          \begin{figure}[htbp]          \begin{center}          \includegraphics{mol.png}          \end{center}          \label{fig:uno}          \end{figure}          .          .          .          \end{document}      and this is the error report:               ERROR: LaTeX Error: Cannot determine size of graphic in mol.png (no BoundingBox).          --- TeX said ---          See the LaTeX manual or LaTeX Companion for explanation.     Type  H <return>  for immediate help.      ...                                                        l.67 \includegraphics{mol.png}      Some months ago I used the same procedure and it worked. I even tried to reproduce the `.dvi` file from the `.tex` file that I wrote some months ago but today doesn't work. Another question: how can I produce a `.pdf` file from a `.tex` file? I forgot it. I'm working on debian using emacs


\includegraphics[width=1in]{space.jpg}       This shows an error: **Latex Error: Cannot determine the size of graphic no bounding box** I am new to LaTeX, I learned and installed it in an hour. I need to submit the term paper written in LaTeX by tonight. A kind request, even if you feel like my efforts are inadequate, help me out. I tried my best. Just tell me the reason of error and how to fix it. I am using MikTeX and TeXnicCenter.


title: Endfloat: Customized figure caption p

text: I'm trying to change the style of the captions below figures in the following MWE. How can I change the style so that Endfloat still picks up the figure environment and sends the figures to the end of the chapter?                   \documentclass[oneside,12pt]{book}         \usepackage[tablesfirst,notablist]{endfloat}         \usepackage{titletoc}         \usepackage[demo]{graphicx}         \renewcommand\theposttable{\arabic{chapter}.\arabic{posttbl}}         \renewcommand\thepostfigure{\arabic{chapter}.\arabic{postfig}}          %This creates bold captions for the figures.%If you uncomment this, the figures don't go to the end of the chapter!!!!!     \makeatletter     \long\def\@maketblcaption#1#2{%         \vskip\abovecaptionskip         \begin{center}\normalsize\bf#1. \normalsize#2\end{center}         \vskip\belowcaptionskip}     \renewcommand{\figure}{\let\@makecaption\@maketblcaption\@float{figure}}     \makeatother              \begin{document}         \chapter{Data}         \startlist{lot}     \begin{figure}                                     \centering                                     \includegraphics{histoOne1}                                     \caption{My caption for this figure}                                     \label{fig:MyFigure}     \end{figure}              \printlist{lot}{}{\chapter*{List of tables in Chapter~\thechapter}}         \processdelayedfloats              \chapter{Learning}         \startlist{lot}     \begin{figure}                                     \centering                                     \includegraphics{histoOne1}                                     \caption{My caption for this figure}                                     \label{fig:MyFigure}     \end{figure}         \printlist{lot}{}{\chapter*{List of tables in Chapter~\thechapter}}         \processdelayedfloats              \end{document}


title: Independent coloring of contour and 3D plot in pgfplots

text: I have a problem with pgfplots where the addition of a contour plot at the bottom of a 3D plot changes the coloring of the surface plot. This is a simple example:               \documentclass[preview=true]{standalone}     \usepackage{pgfplots}     \usepackage{tikz}     \begin{document}          \def\zmin{-6}     \def\zmax{8}          \begin{tikzpicture}           \begin{axis}                  [                      zmin=\zmin,                      zmax=\zmax,                  ]                  \addplot3[                      contour gnuplot={                          output point meta=rawz,                          number=20,                          labels=false,                      },                      domain=-5:5,                      y domain=-5:5,                      samples=20,                      z filter/.code=\def\pgfmathresult{\zmin}                  ]                  {%                      min(x+y, \zmax)                  };                  \addplot3[                      surf,                      samples=20,                      domain=-5:5,                      y domain=-5:5                  ]                  {%                      max(min(x+y, \zmax), 0)                  };             \end{axis}         \end{tikzpicture}     \end{document}      This example turns out like this: ![Example image with contour](http://i.stack.imgur.com/eK6Nq.png) Without the contour, the resulting image is: ![Example image without contour](http://i.stack.imgur.com/JwvFy.png) What I would like to have is an image with the contourplot, but using the coloring of the surfplot as it is shown in the image without the contourplot. Any help is greatly appreciated.


title: How to write geometric arcs notation without arcs package?

text: I've tried some other packages: yhmath and mathdesign, and some codes:               \DeclareFontEncoding{FMX}{}{}%%%     \DeclareFontSubstitution{FMX}{futm}{m}{n}%%%     \DeclareSymbolFont{largesymbols}{FMX}{futm}{m}{n}     \DeclareMathAccent{\widearc}{\mathord}{largesymbols}{216}      and               \def\frown{\XeTeXmathaccent"0"1"23DC}      These solutions haven't work at all, some mess up my other symbols like parenthesis, brackets and so on. Is there a simple way to place an arc or similar over two or three letters? I made it to here, after some comments and trying to figure it out, I made the arc symbol like this.               \renewcommand{\overarc}[1]{\ooalign{\hfil\scalebox{0.9}{$#1$}\hfil\cr\hfil\raisebox{8pt}{\rotatebox{90}{\scalebox{1}{$)$}}}\hfil\cr}}      It worked well for my proporses. but any suggestions are welcome.


title: Question mark instead of citation number

text: I've browsed the forums and found a number of posts that have addressed this issue, but none of the solutions seem to work for me. I have the following script that I just copied from the bibtex home page to get familiar with it. Instead of the citation number I get a question mark. I compile using Latex+Bibtex+Latex+Latex+PDFLatex+ViewPDF just as has been previously suggested and the problem persists.               \documentclass[11pt]{article}     \usepackage{cite}          \begin{document}          \title{My Article}     \author{Nobody Jr.}     \date{Today}     \maketitle          Blablabla said Nobody ~\cite{Nobody06}.          \bibliography{mybib}{}     \bibliographystyle{plain}     \end{document}      My bibliography (Bib.bbl)               @misc{ Nobody06,     author = "Nobody Jr",     title = "My Article",     year = "2006" }       Looking at previous posts one thing that is concerning is that my .bbl looks empty as shown below. Further, I don't have a .blg               \begin{thebibliography}{}          \end{thebibliography}


title: BibTeX references problem

text: > **Possible Duplicate:**   >  Question mark instead of citation number I tried to add an existing BibTeX bibiography to my LyX document; it works fine when I add citations inside my document. But after compiling it, references are displayed as '?' in the PDF document and the bibliography list is not included.


title: Undefined citations using ACS example files

text: I'm trying to prepare a document based the American Chemical Society manuscript sample files, available here under the 'Standard submission option'. However, when I compile the unmodified `achemso-demo.tex` file, I get warnings that each of the citations is undefined, and they don't show up in the document. I have `achemso-demo.tex` in the same directory as `achemso.bib`. I'm new to LaTeX and don't really know where to start troubleshooting. I'm working in Texmaker using the LaTeX build option.


title: Citations not working in Sweave

text: I am trying to run this Sweave code in R.               \documentclass{article}          \begin{document}     \SweaveOpts{concordance=TRUE}          \section{Section}     I am citing \cite{ftest}.          \begin{thebibliography}{9}         \bibitem{ftest}http://www.mattblackwell.org/files/teaching/ftests.pdf     \end{thebibliography}          \end{document}      Now, everything runs fine, but I'm getting the warnings:               Citation `ftest' on page 1 undefined on input line 8.     There were undefined references.     Label(s) may have changed. Rerun to get cross-references right.      In the generated pdf, I get the references section and the referred link, but in the section, it shows:               "I am citing [?]."      My configuration is:   * Ubuntu 12.04   * pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009/Debian)   * R version 3.0.0 (2013-04-03) -- "Masked Marvel" PS:   1. I am new to LaTeX so please let me know if I can provide any additional information.   2. @Admins: I was not sure whether this is the right forum to post this, given that it is R specific, so please move it to the appropriate location.


title: How should I use BibTeX in TeX Live 2013?

text: Can anybody simply tell me how should I use BibTeX in TeX Live 2013? I saved my references in a `.bib` file and I write the following in my `.tex` file:               \documentclass{article}     \begin{document}     \bibliographystyle{plain}%Choose a bibliograhpic style     %     author~\cite{Meyer2000}.     %     \bibliography{Master}     \end{document}      What I should do afterwards? I compile it with BibTeX and PDFLaTeX but it does not help.


title: BibTex not working

text: I am trying to use BibTeX for references. Here is my code.               \documentclass[11pt, a4paper]{article}      \usepackage[latin1]{inputenc}     \usepackage{graphicx}          \setcounter{secnumdepth}{0}     \usepackage{cite}          \title{Draft Project Laser Bubbles}     \author{PTB}      \begin{document}     \maketitle          \abstract{     Optofluidics     }          \section{Theory}          Blablabla said Nobody ~\cite{Nobody06}.          \bibliographystyle{plain}     \bibliography{mybib}{}          \end{document}      And `mybib.bib` in the same folder:               @article{Nobody06,       author = "Nobody Jr",       title = "My Article",       year = "2006"     }          @article{mrx05,       author = "Mr. X",      Title = {Something Great},      publisher = "nob" # "ody"},      YEAR = 2005,      }      Error message: > This is BibTeX, Version 0.99d (MiKTeX 2.9)   > The top-level auxiliary file: Project-PTB-Draft.aux   > The style file: plain.bst   > Database file #1: mybib.bib   > Warning--I didn't find a database entry for "Nobody06"   > (There was 1 warning) I have tried `latex bibtex latex latex` (it is my Quick Build at the moment). Any ideas? :) First problem found: mybib.bib was in the wrong folder. _facepalm_. Put it in the right folder and it still doesn't work. The current error message: Process started This is BibTeX, Version 0.99d (MiKTeX 2.9) The top-level auxiliary file: Project-PTB-Draft.aux The style file: plain.bst Database file #1: mybib.bib You're missing an entry type---line 1 of file mybib.bib : @ : Process exited normally EDIT: I fixed it! I deleted the old .bib file and made a new one in texmaker. Then it worked! I guess an encoding problem or something :) Thanks guys!


title: How can I include the author name and citation number (not year) in the text?

text: I want my text to read like this - As mentioned by Author_name [Citation_number_in_bibliography], we have .... Example: As mentioned by Lamport [23], we have ....


title: No Bibtex output

text: I am trying to use bibtex in a thesis template, but it seems to give absolutely no output. Using the bibtex command gives me the output "I couldn't open file name ref.bib.aux", where ref.bib is the name of the bibtex database. On the other hand, using "Quick Build" in texmaker produces the output file, but without the references. Any ideas why? Thanks.


title: What happened to bibtex?

text: I have a manuscript which looks like:               \documentclass{article}                    \usepackage{amsmath, amsthm, amssymb}          \begin{document}          [...]       \cite{ref}       [...]       \cite{anotherref}       [...]       \bibliography{references}       \bibliographystle{plain}     \end{document}      My .bib file, references.bib, looks like this:               @book{ref,         title = {String theory and M-theory},         isbn = {978-0521860697},         publisher = {Cambridge University Press},         author = {Schwarz, John and Becker, Katrin and Becker, Melanie},         date = {2007-01-15}     }          @article{anotherref,         title = {Locality problem for the Liouville field},         volume = {274},         issn = {0370-2693},         url = {http://www.sciencedirect.com/science/article/pii/037026939291992I},         doi = {10.1016/0370-2693(92)91992-I},         pages = {323-330},         number = {3},         journaltitle = {Physics Letters B},         author = {Balog, J. and Palla, L.},         date = {1992-01-16},     }      For some reason, my manuscript does not compile properly. Instead of the inline references coming up as numbers, I get [ **?** ]'s. The bibliography does not appear at all. What's very surprising is that even the example in BibTeX's official website results in the same bug. Another manuscript that had previously compiled properly for me, now produces the same error. I am very puzzled by this. The bug is observed both in TeXmaker's Quick Build, and ShareLaTeX. Anybody knows the cause of this bug? Thanks! P.S. Please feel free to vote to close this if it is off-topic.


title: Question mark in output instead of citation number

text: Well it seems I found a treasure consisting of helpful and answering people. So I'll use it. I plan to use citations in my document. I started with making `thebibliography`. I'll keep it plain simple because I have 9 or 10 references. The code is:               \documentclass{llncs}     \usepackage{amssymb,latexsym,amsmath,makeidx,cite}     \begin{document}     ... By utilizing eye openness along with other facial features \cite{sandbach}.     \begin{thebibliography}{20}     \bibitem{sandbach}     Sandbach, G., Zafeiriou, S., Pantic, M. and Yin, L.:     Static and dynamic 3D facial expression recognition: A comprehensive survey.      Image and Vision Computing, 2012.     \end{thebibliography}     \end{document}      Download of `llncs.cls` under Springer - Information for LNCS Authors. My expected output is               ... facial features [1]      but I get               ... facial features[?]      When I hover `\cite{sandbach}` in the `tex` file it shows the correct bibitem entry as I mentioned above. Am I missing something?


title: Empty 'thebibliography' environment

text: I am writing a scientific article using LaTeX, with a separate .bib bibliography file, generated via a Zotero Firefox extension collection. When generating the .pdf document, I get the following error: > Empty 'thebibliography' environment on input line 3 The line 3 contains:               \usepackage{amsmath}      Thus, the Reference section is empty and every citation number in the text appears as [?]. I already tried several things:   * Inserting a `\nocite{*}` in the document   * Changing var `= {something}` to var `= {"something"}` in the BibTex file   * Removing all Unicode characters from the BibTex file But the error style persist. Any idea?


title: The citation is a question mark and the list of reference doesn't appear

text: I tried a lot of times, but the reference list doesn't appear and the citation in the text is always a question mark. This is my bib file.               \begin{filecontents}{mybib.bib}     @booklet{mwe,     author      = {{S}charrer, {M}artin},     year        = {2012},     title       = {The mwe-Package},     edition     = {0.3},     language    = {english},     lastchecked = {2012-07-12},     url         = {http://mirror.ctan.org/pkg/mwe},     note        = {macros/latex/contrib/mwe}     }          @Book{Renewal,     author = {Breuer, L. and Baum, D.},     title = {An Introduction to Queueing Theory and Matrix-Analytic Methods},     publisher = {Springer},     year = 2005,     }     \end{filecontents}      Next is my tex file.               \documentclass[a5paper]{article}          \usepackage{filecontents}          \usepackage[numbers]{natbib}       \usepackage{hyperref}                   \begin{document}     \section{First section}          Minimal Working Example MWE.          citations: \cite{Renewal}, \citep{mwe}, \citet{mwe}, \citep*{mwe}.           \bibliographystyle{unsrtnat}       \bibliography{mybib}               \end{document}      Both of 2 files are from a buddy's answer in the website. ![enter image description here](http://i.stack.imgur.com/oslOa.png)