Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chemical #436

Closed
wants to merge 26 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
7f6fde9
Fix makefile standalone flowchart png generation
cedounet Jan 3, 2025
194511d
Enable standalone chemical figures generation
cedounet Jan 9, 2025
ad94b9f
Enable abbreviations in standalone flowcharts
cedounet Jan 9, 2025
b57089b
Chang arrowheads to be cleaner LaTex style.
ramink Jan 4, 2025
311bd55
Update all flowchart arrows to LaTeX arrows
ramink Jan 7, 2025
d5ae131
Rearrange starter process flowchart
ramink Jan 3, 2025
42c9f31
Change "Repeat 3 times" elements to use "Latex" arrows
ramink Jan 9, 2025
d884d58
Change plots to use "Latex" arrows for the axes
ramink Jan 9, 2025
864127e
Reworked flowchart as per discussions
cedounet Jan 11, 2025
f6cf151
Remove the MWE from git
cedounet Jan 11, 2025
8b581f3
Use uppercase in flowcharts conditions
cedounet Jan 11, 2025
bcdaf79
Fix merge error in starter-process flowchart
cedounet Jan 11, 2025
d1e3390
Fix more uppercase in flowcharts
cedounet Jan 11, 2025
374fb7a
Delete rogue draft file
cedounet Jan 12, 2025
3b8dfd8
Layout "Repeat 3 Times" loops in better way.
ramink Jan 13, 2025
e73b0f3
Use a sans-serif math font for pgfplots
cedounet Jan 12, 2025
2c86529
Use sans-serif fonts with tex4ht
cedounet Jan 18, 2025
d0a5d6d
Fix duplicate font loading
hendricius Jan 20, 2025
75b015c
Remove debug flag on default website build
cedounet Jan 11, 2025
7f2f010
Simplify the epub size check
cedounet Jan 11, 2025
a93a19d
Reorder and add comments in makefile
cedounet Jan 11, 2025
9e267a2
Modernize target names in makefile
cedounet Jan 11, 2025
d02e99c
Fix merge errors
cedounet Jan 19, 2025
70d9078
Add latest dvisvgm drive for tex4ht
cedounet Jan 21, 2025
8fd1df9
Fix the chemical equation.
cedounet Jan 20, 2025
4f76169
Merge remote-tracking branch 'hendiricus/main' into chemical
cedounet Jan 21, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 75 additions & 0 deletions book/pgfsys-dvisvgm4ht.def
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
% Copyright 2021-2024 by Michal Hoftich
% Copyright 2006 by Till Tantau
%
% This file may be distributed and/or modified
%
% 1. under the LaTeX Project Public License and/or
% 2. under the GNU Public License.
%
% See the file doc/generic/pgf/licenses/LICENSE for more details.

\ProvidesFileRCS{pgfsys-dvisvgm4ht.def}

% Driver commands for tex4ht

%
% Load common pdf commands:
%

% we switched to dvisvgm driver by default. it supports patterns and other features
% dvips driver is available through the tikz+ option. It doesn't support everything,
% but it worked better with nested pictures in the past.
\ifdefined\ifOption
\ifOption{tikz+}{\input pgfsys-dvips.def}{\input pgfsys-dvisvgm.def}
\else
% load the dvips driver by default
\input pgfsys-dvisvgm.def
\fi


\catcode`\:=11%

% we must call most of these redefinitions in \AtBeginDocument, because \HLet is available
% only at that moment
\AtBeginDocument{%
% configure the output picture format to svg, as it will require dvisvgm
% post processing.
\Configure{Picture}{.svg}%

% insert picture hooks to pgfsys commands
% these redefinitions are usually called only with the \tikz command,
% they are ignored in tikzpicture environment
\def\:tempa#1{%
\texfourht@tikz@begin%
\csname o:pgfsys@typesetpicturebox:\endcsname{#1}
\texfourht@tikz@end%
}
\HLet\pgfsys@typesetpicturebox\:tempa

% we must remove Picture-alt in \pgfsys@beginpicture, because it can result in alt text included in the image
\def\:tempa{\Configure{Picture-alt}{}\texfourht@tikz@begin\o:pgfsys@beginpicture:}
\HLet\pgfsys@beginpicture\:tempa
\let\o:pgfsys@endpicture:\pgfsys@endpicture
\def\:tempa{\o:pgfsys@endpicture:}
\HLet\pgfsys@endpicture\:tempa

% start picture around TikZ and PGF environments
\ConfigureEnv{tikzpicture}{\begingroup\texfourht@tikz@begin}{\texfourht@tikz@end\endgroup}{}{}%
\ConfigureEnv{pgfpicture}{\begingroup\texfourht@tikz@begin}{\texfourht@tikz@end\endgroup}{}{}%
}

\def\texfourht@tikz@begin{
\protect\csname nested:math\endcsname% support display math
\Picture*[\csname a:Picture-alt\endcsname]{}%
}
\def\texfourht@tikz@end{\EndPicture}

\catcode`\:=12%


\endinput


%%% Local Variables:
%%% mode: latex
%%% End:
14 changes: 14 additions & 0 deletions book/tex4ebook.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,18 @@
font-family: 'Open Sans';
}
</style>}}

% Deal with chemical equations in a single svg
\ExplSyntaxOn
\def\standaloneenv#1{}
\pend:def\schemestart{\Picture+{}}
\append:def\CF_schemestop{\EndPicture}
\ExplSyntaxOff
\makeatletter
\def\texfourht@tikz@begin{
\protect\csname nested:math\endcsname% support display math
\Picture+[\csname a:Picture-alt\endcsname]{}%
}
\makeatother

\EndPreamble
12 changes: 12 additions & 0 deletions book/website.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,17 @@
}
\ConfigureToc{loc}{\HCode{<span class="lofToc">}}{\ }{}{\HCode{</span><br />}}

\ExplSyntaxOn
\def\standaloneenv#1{}
\pend:def\schemestart{\Picture+{}}
\append:def\CF_schemestop{\EndPicture}
\ExplSyntaxOff
\makeatletter
\def\texfourht@tikz@begin{
\protect\csname nested:math\endcsname% support display math
\Picture+[\csname a:Picture-alt\endcsname]{}%
}
\makeatother

\begin{document}
\EndPreamble
Loading