{package-writing} is about writing packages. If your question is about choosing, installing, or using packages, choose {package} instead.

learn more… | top users | synonyms

0
votes
1answer
48 views

Using Foundation icons in LaTeX document

I have the fontawesome package in mind when asking this question? In fontawesome you can invoke the given symbol by typing its code to get it in the document. For example, \faCircleArrowDown gives the ...
5
votes
0answers
80 views

Looking for someone to help me finalize and distribute a class file

I'm not sure this is the right place to ask but I don't know where else to go ! I've been working on the design of my lecture notes for a little while and now that I'm happy with the result, I would ...
0
votes
0answers
33 views

A template for documentation for ctan

I got my Fill-Pages-Package (hopefully bug free) ready, which is my first package. Now I want to upload it on ctan. But first there must be a documentation. I've been searching for a template for the ...
1
vote
0answers
39 views

What is this wacky definition of \@makefnmark trying to accomplish?

A journal style file that shall remain nameless contains this code: \def\thestandardf@@tnote{\@arabic\c@footnote} \def\@makefnmark{% \hbox{% \ifx\thefootnote\thestandardf@@tnote \@...
1
vote
1answer
23 views

How do I write a basic .sty to call a custom Type 1 font I have installed?

I have installed several custom Type 1 fonts for use with pdflatex. The fonts work normally if I call them with \renewcommand{\<rmdefault/sfdefault/ttdefault/etc>}{<fontname>} I ...
3
votes
1answer
30 views

Use temporary length \dimen255, temporary count \count255

This Question is mainly important for package writing: I read in the TeX-Book that \count255 and \dimen255 are traditionally used for temporary. Now the number of registers has risen (see this ...
15
votes
1answer
147 views

What is exactly a hook in etoolbox

I understand well the \apptocmd and related tools of etoolbox package. However, I still not understand what \appto<hook>{<code>} and related do, even reading three time the handbook ? ...
7
votes
1answer
51 views

How can I generate precisely one warning within a tabularx environment?

I realise this is an unholy mix of expl3 and LaTeX-2e, but most of my code is like this at the moment, unfortunately. I want to be warned when I fail to set a particular variable. More specifically, ...
20
votes
2answers
1k views

In 2016, what are the advantages and disadvantages of the different methods to create a package?

Now we need to make some choices between TeX, LaTeX2e, LaTeX 3, ConTeXt(LuaTeX), LuaLaTeX, XeTeX, XeLaTeX and... I don't specially like the syntax of L3 but recently I was impressed by very ...
6
votes
2answers
68 views

Giving numerical value to a package

I am playing around with making a package for some of my LaTeX commands and environments. The problem I am encountering is that the package will need to take a numerical value, which have a default ...
3
votes
1answer
81 views

Modify page behaviour in a cookbook .sty file to manage complex recipes

I'm trying to edit a .sty file for the typesetting of recipe books. It's a modification by Alexis Flesch of cookybooky: link to the full package (with output) The problem is that the code is ...
6
votes
1answer
49 views

Package for special treatment of sequences of capitals

For linguistic writing, I frequently deal with input data where sequences of capitals should be typeset not as capitals, but should be treated specially, e.g. be typeset in lower case, small caps. ...
2
votes
1answer
43 views

How to check if a macro can be followed by a newline

I'm trying to create a class that allows you to define a name using \name{Whatever} This is defined as \newcommand{\name}[1]{\def\gsy@name{#1}} Whatever is passed to this is used in the header, ...
3
votes
0answers
49 views

Tikz version history information

I'm working on a package that works on top of tikz. It needs certain libraries (the tikz libraries quotes, positioning and intersections and the pgf library arrows.meta). Is there any way I can ...
4
votes
1answer
56 views

(is there/how to make) a package/macro like `enumerate` but for whole document sectioning

I just discovered the enumerate package, what excited me because some time ago I was wondering about something similar (options where a stands for \alph{<counter>}, A for \Alph{<counter>}, ...
4
votes
0answers
26 views

Consolidating similar packages [closed]

Are there any efforts being made towards consolidating packages with overlapping features? If I created a package that could provide extra features to another package, is it expected that I share this ...
2
votes
0answers
33 views

List of package requests?

I have recently entered the realm of package development and uploaded my first package to CTAN. Is there a master crowd-sourced list somewhere of issues/abilities that people would like to see solved/...
6
votes
1answer
48 views

l3doc adds unwanted backslash in margin box of {function}

I'm using l3doc for documenting some packages (I know it is not officially stable, but I like it …). I came to the problem that {function}{<list>} adds a backslash for every item in <list> ...
3
votes
1answer
42 views

“Extra \fi” error when defining mutually exclusive package options with conditionals

I have been trying to create a package, which loads the babel package and sets the language with an option. I've been getting strange errors when trying to define mutually exclusive package options, ...
2
votes
1answer
107 views

Fixing a LaTeX thesis style issues with formatting section headings

I am fairly new to LaTeX, but I decided to take it upon myself to use the .sty file the computer science department at my school had for the university's thesis style. As it turns out, there are a ...
16
votes
2answers
121 views

What is the simplest way to extract a URL from a .bib entry for use in \href{}{} (probably using Biblatex)?

I am trying to define a new macro with the following syntax: \citeimg*{<bibkey>} The unstarred form should simply produce \citeauthor{<bibkey>}, \citetitle{<bibkey>}, \citeyear{&...
29
votes
3answers
918 views

When to use TeX vs LaTeX for package writing

So I got into the whole idea of learning plain TeX (or what I think is plain TeX) and it's been very fun and rewarding. I also started writing some macros/packages for my personal use for now. Since ...
0
votes
0answers
41 views

Create your own style [duplicate]

I know this question has been asked many times, but I could not find a good answer for my question, yet... I wanted to develop my own thesis style i.e. \usepackage{harthesis}, which I did, but when I ...
0
votes
1answer
22 views

Placing the abstract on titlepage in custom class

Imagine I want to include my abstract to my titlepage. I would do something like this: \documentclass[10pt,english,a4paper]{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \title{My ...
4
votes
1answer
46 views

Are dynamic defaults possible with kvoptions?

I'm writing a package with two options; one of the defaults should change, depending on the other option. Currently, the definitions are: \SetupKeyvalOptions{family=gitlog,prefix=gitLog@} \...
28
votes
1answer
597 views

How does \usepackage differ from a simple \include or \input?

What does \usepackage do that is different than \input or \include? Does it simply import the commands in the package file to the current document or is it more complicated?
6
votes
1answer
44 views

Is it possible to implement a package dependency which is version specific?

This question should really ask what is the best way to implement a version-specific package dependency. However, if I try to ask that, the system threatens to close my question. In this answer, ...
8
votes
2answers
236 views

Encrypt and decrypt parts of text in a LaTeX source file

Assume that you have some text in parts of your LaTeX document that you only want people with a password to see. A reason could e.g. be a case with an guiding answer. You want to make the case public ...
1
vote
1answer
152 views

Has anybody implemented Society of Automotive Engineer (SAE) style bibliographies with a biblatex/biber solution?

There already exists an SAE class on CTAN contributed by Axel Franke, which although it is 15 years old (last update 2000-11-14) is still workable with a few tweaks, I think. The problem I am facing ...
13
votes
2answers
180 views

The following code compiles without error. How can I change that?

Unlike most questions on this site, my problem is that my code compiles without error and I do not want it to. I want to be able the check whether \command is defined and to do something if it is ...
3
votes
1answer
189 views

change title page margins ONLY without packages

I am trying to prepare a package for students that offers a uniform standard title page for their work (homework, reports, theses, and probably more). I have the title page laid out as it should be. ...
3
votes
1answer
79 views

How to put the section head on the same location as a slide title when using slidepage

I am developing my own beamer theme. As part of the theme I want the section slides to have the section title on the same position as the other slides. At this moment the position is a little off. ...
4
votes
1answer
169 views

Option argument for Beamer section slide

I am creating my own Beamer theme with a custom section slide. Ideally I would like the command \frame{\sectionpage} to have an additional, optional argument, that specifies the color of the ...
1
vote
1answer
38 views

How to \clist_set in \msg_new?

Is it possible to process a comma separated list within a LaTeX3 error message? For example I want to define a message for unknown values to a .choice key like in the following example. I use \test ...
1
vote
0answers
87 views

Writing modular classes

As an OOP programmer, I am very attracted to the idea of making separate files for independent features within a class definition, where each feature I feel is too long to be included inline in the ...
3
votes
2answers
154 views

Evaluate strings of key-value option in custom package by using a switch-case environment

I'm trying to write a custom package MyUnicodefonts where I'd like to store all my font settings for various math fonts and roman fonts (later also mono and sans). In my document I intend to choose ...
13
votes
2answers
239 views

Should expl3 code be used in packages intended to be compatible with multiple formats?

Maybe this question is just not a good idea in general, but, I'm curious. This could make package development simpler for some in the future. (Of course, this would not be forced on any package ...
5
votes
4answers
146 views

Help designing a package to use with personal notation

I am attempting to typeset a notation that I use for my own work, and I am struggling to create flexible commands. The notation involves placing mathematical symbols and expressions as if on the ...
6
votes
2answers
279 views

What is the difference between \@@par and \par?

In LaTeX internal code I came accross \@@par. How is this different from \par or \newline. When should I use \@@par if I am writing a package or class file? In general, there are so many other ...
4
votes
1answer
55 views

Problems using listxadd and xappto

I am a fairly experienced LaTeX user. Now, I am trying to get into learning the internals of LaTeX packages and classes. I do not know much about TeX coding. I thought a good beginning would be to try ...
3
votes
1answer
49 views

use multiple .dtx file to make only .sty file

I would like to split the voluminous .dtx of eledmac in multiple .dtx file. 1) one for the user handbook 2) many other for the package code + handbook. So my objectives are: 1) have multiple .dtx ...
4
votes
2answers
80 views

Writing a token list conditional with expl3

This is a follow-up question to LaTeX3 conditional with grouping fails to compile. I would like to write a token list conditional with expl3 that is fully expandable in order to use it as a predicate ...
3
votes
1answer
76 views

LaTeX3 conditional with grouping fails to compile

I am trying to write a LaTeX3 conditional using \prg_new_conditional:Nnn from the expl3 package. Since the code in the conditional needs to make assignments to some variables, I would like to use ...
8
votes
1answer
130 views

What is the most effective and efficient way to document a package?

I'm sure this must be a duplicate but the questions I've found don't quite address the question I have. Related questions include: How to modify package documentation How to document style files ...
5
votes
1answer
551 views

Define path for packages in the LaTeX file (analog of \input@path or \graphicspath for \usepackage)

How to specify path for additional packages in the LaTeX file itself? For graphics, you use \graphicspath{{a}{b}}, and then \includegraphics{file} finds b/file.pdf. EDIT: it should be \graphicspath{{...
2
votes
0answers
84 views

advanced LaTeX course [duplicate]

I am looking for some tutorial or video-class or something like that about LaTeX advanced course. I want to know more about macros and the creation of packages. Thanks for the attention!
4
votes
2answers
77 views

How can I set contents in a box of zero width and specified height, optionally rotating, using expl3 syntax?

Using Steven B. Segletes's answer, I can centre something horizontally, optionally rotating it, using \centering \makebox[0pt]{\rotatebox{<angle>}{<contents>}} \par However, I would ...
5
votes
1answer
229 views

How can I override geometry's scale in the preamble? (E.g. if a class or package has set a default using geometry.)

With some geometry options, it is possible to override a previous setting in the preamble. For example: \documentclass{article} \usepackage{geometry} \geometry{hmarginratio=1:1} \geometry{showframe,...
0
votes
0answers
65 views

How to go about learning to program in Tex? [duplicate]

I have been using Tex for a few years now and enjoyed the work of others (e.g., ctan packages, templates, styles). My question sees to practical code to learn from. What would be a good primer, or ...
7
votes
1answer
455 views

How can latex help me format and present lots of data in a report?

At work I am responsible for creating information security reports that contain long narratives and reference what we refer to as "vulnerabilities". These vulnerabilities are presented in a table. I ...